repo stringclasses 192
values | path stringlengths 4 115 | func_name stringlengths 0 45 | original_string stringlengths 74 24k | language stringclasses 1
value | code stringlengths 74 24k | code_tokens listlengths 23 4.2k | docstring stringlengths 2 23.7k | docstring_tokens listlengths 1 810 | sha stringclasses 192
values | url stringlengths 90 200 | partition stringclasses 1
value | summary stringlengths 6 313 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jgthms/bulma | docs/lib/main.js | removeFromArray | function removeFromArray(array, value) {
if (array.includes(value)) {
var value_index = array.indexOf(value);
array.splice(value_index, 1);
}
return array;
} | javascript | function removeFromArray(array, value) {
if (array.includes(value)) {
var value_index = array.indexOf(value);
array.splice(value_index, 1);
}
return array;
} | [
"function",
"removeFromArray",
"(",
"array",
",",
"value",
")",
"{",
"if",
"(",
"array",
".",
"includes",
"(",
"value",
")",
")",
"{",
"var",
"value_index",
"=",
"array",
".",
"indexOf",
"(",
"value",
")",
";",
"array",
".",
"splice",
"(",
"value_index... | Utils | [
"Utils"
] | 305d51ccc5afadc4cc66da8f37257c72c0a73500 | https://github.com/jgthms/bulma/blob/305d51ccc5afadc4cc66da8f37257c72c0a73500/docs/lib/main.js#L439-L446 | train | Remove value from array | [
30522,
3853,
6366,
19699,
9626,
11335,
2100,
1006,
9140,
1010,
3643,
1007,
1063,
2065,
1006,
9140,
1012,
2950,
1006,
3643,
1007,
1007,
1063,
13075,
3643,
1035,
5950,
1027,
9140,
1012,
5950,
11253,
1006,
3643,
1007,
1025,
9140,
1012,
11867,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 (oModel) {
var mHeaders;
if (!oModel) {
return "";
}
if (typeof oModel.getHeaders === "function") {
mHeaders = oModel.getHeaders();
if (mHeaders) {
return mHeaders["x-csrf-token"];
}
}
return "";
} | javascript | function (oModel) {
var mHeaders;
if (!oModel) {
return "";
}
if (typeof oModel.getHeaders === "function") {
mHeaders = oModel.getHeaders();
if (mHeaders) {
return mHeaders["x-csrf-token"];
}
}
return "";
} | [
"function",
"(",
"oModel",
")",
"{",
"var",
"mHeaders",
";",
"if",
"(",
"!",
"oModel",
")",
"{",
"return",
"\"\"",
";",
"}",
"if",
"(",
"typeof",
"oModel",
".",
"getHeaders",
"===",
"\"function\"",
")",
"{",
"mHeaders",
"=",
"oModel",
".",
"getHeaders"... | Returns XSRF Token from the Odata Model. Returns empty string if retrieval failed
@param {sap.ui.model.odata.ODataModel} oModel - OData Model
@returns {String} XSRF Token
@private | [
"Returns",
"XSRF",
"Token",
"from",
"the",
"Odata",
"Model",
".",
"Returns",
"empty",
"string",
"if",
"retrieval",
"failed"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L126-L138 | train | Returns the CSRF token from the given model | [
30522,
3853,
1006,
18168,
10244,
2140,
1007,
1063,
13075,
1049,
4974,
2545,
1025,
2065,
1006,
999,
18168,
10244,
2140,
1007,
1063,
2709,
1000,
1000,
1025,
1065,
2065,
1006,
2828,
11253,
18168,
10244,
2140,
1012,
2131,
4974,
2545,
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... | |
expressjs/express | lib/response.js | ondirectory | function ondirectory() {
if (done) return;
done = true;
var err = new Error('EISDIR, read');
err.code = 'EISDIR';
callback(err);
} | javascript | function ondirectory() {
if (done) return;
done = true;
var err = new Error('EISDIR, read');
err.code = 'EISDIR';
callback(err);
} | [
"function",
"ondirectory",
"(",
")",
"{",
"if",
"(",
"done",
")",
"return",
";",
"done",
"=",
"true",
";",
"var",
"err",
"=",
"new",
"Error",
"(",
"'EISDIR, read'",
")",
";",
"err",
".",
"code",
"=",
"'EISDIR'",
";",
"callback",
"(",
"err",
")",
";... | directory | [
"directory"
] | dc538f6e810bd462c98ee7e6aae24c64d4b1da93 | https://github.com/expressjs/express/blob/dc538f6e810bd462c98ee7e6aae24c64d4b1da93/lib/response.js#L1027-L1034 | train | Called when the directory is empty | [
30522,
3853,
2006,
4305,
2890,
16761,
2100,
1006,
1007,
1063,
2065,
1006,
2589,
1007,
2709,
1025,
2589,
1027,
2995,
1025,
13075,
9413,
2099,
1027,
2047,
7561,
1006,
1005,
1041,
2483,
4305,
2099,
1010,
3191,
1005,
1007,
1025,
9413,
2099,
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... |
muaz-khan/RecordRTC | RecordRTC.js | function(config) {
this.audioBlob = config.audioBlob;
this.videoBlob = config.videoBlob;
this.gifBlob = config.gifBlob;
this.init();
return this;
} | javascript | function(config) {
this.audioBlob = config.audioBlob;
this.videoBlob = config.videoBlob;
this.gifBlob = config.gifBlob;
this.init();
return this;
} | [
"function",
"(",
"config",
")",
"{",
"this",
".",
"audioBlob",
"=",
"config",
".",
"audioBlob",
";",
"this",
".",
"videoBlob",
"=",
"config",
".",
"videoBlob",
";",
"this",
".",
"gifBlob",
"=",
"config",
".",
"gifBlob",
";",
"this",
".",
"init",
"(",
... | This method stores blobs in IndexedDB.
@method
@memberof DiskStorage
@internal
@example
DiskStorage.Store({
audioBlob: yourAudioBlob,
videoBlob: yourVideoBlob,
gifBlob : yourGifBlob
}); | [
"This",
"method",
"stores",
"blobs",
"in",
"IndexedDB",
"."
] | 3c6bad427b9da35c1cf617199ed13dda056c38ba | https://github.com/muaz-khan/RecordRTC/blob/3c6bad427b9da35c1cf617199ed13dda056c38ba/RecordRTC.js#L4487-L4495 | train | The base class for the image | [
30522,
3853,
1006,
9530,
8873,
2290,
1007,
1063,
2023,
1012,
5746,
16558,
16429,
1027,
9530,
8873,
2290,
1012,
5746,
16558,
16429,
1025,
2023,
1012,
2678,
16558,
16429,
1027,
9530,
8873,
2290,
1012,
2678,
16558,
16429,
1025,
2023,
1012,
210... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js | function (sId, oBindingContext) {
var oBlockLayoutCell;
if (oBindingContext.getObject().teaser) { // teaser cell (loads fragment from demo app)
try {
sap.ui.loader.config({paths:{"test-resources":"test-resources"}});
var sRelativePath = sap.ui.require.toUrl(oBindingContext.getObject().teaser);
... | javascript | function (sId, oBindingContext) {
var oBlockLayoutCell;
if (oBindingContext.getObject().teaser) { // teaser cell (loads fragment from demo app)
try {
sap.ui.loader.config({paths:{"test-resources":"test-resources"}});
var sRelativePath = sap.ui.require.toUrl(oBindingContext.getObject().teaser);
... | [
"function",
"(",
"sId",
",",
"oBindingContext",
")",
"{",
"var",
"oBlockLayoutCell",
";",
"if",
"(",
"oBindingContext",
".",
"getObject",
"(",
")",
".",
"teaser",
")",
"{",
"// teaser cell (loads fragment from demo app)",
"try",
"{",
"sap",
".",
"ui",
".",
"lo... | /* =========================================================== /* lifecycle methods /* ===========================================================
Factory function for creating the demo app cells
@param {string} sId the id for the current cell
@param {sap.ui.model.Context} oBindingContext the context for the current ... | [
"/",
"*",
"===========================================================",
"/",
"*",
"lifecycle",
"methods",
"/",
"*",
"===========================================================",
"Factory",
"function",
"for",
"creating",
"the",
"demo",
"app",
"cells"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js#L273-L297 | train | Creates a cell with the given id and binding context | [
30522,
3853,
1006,
15765,
1010,
27885,
22254,
2075,
8663,
18209,
1007,
1063,
13075,
27885,
7878,
8485,
5833,
29109,
2140,
1025,
2065,
1006,
27885,
22254,
2075,
8663,
18209,
1012,
2131,
16429,
20614,
1006,
1007,
1012,
27071,
1007,
1063,
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... | |
summernote/summernote | src/js/base/core/dom.js | listNext | function listNext(node, pred) {
pred = pred || func.fail;
const nodes = [];
while (node) {
if (pred(node)) { break; }
nodes.push(node);
node = node.nextSibling;
}
return nodes;
} | javascript | function listNext(node, pred) {
pred = pred || func.fail;
const nodes = [];
while (node) {
if (pred(node)) { break; }
nodes.push(node);
node = node.nextSibling;
}
return nodes;
} | [
"function",
"listNext",
"(",
"node",
",",
"pred",
")",
"{",
"pred",
"=",
"pred",
"||",
"func",
".",
"fail",
";",
"const",
"nodes",
"=",
"[",
"]",
";",
"while",
"(",
"node",
")",
"{",
"if",
"(",
"pred",
"(",
"node",
")",
")",
"{",
"break",
";",
... | listing next siblings (until predicate hit).
@param {Node} node
@param {Function} [pred] - predicate function | [
"listing",
"next",
"siblings",
"(",
"until",
"predicate",
"hit",
")",
"."
] | 8dcafb8107453006b905ef697a529c42e76beb3f | https://github.com/summernote/summernote/blob/8dcafb8107453006b905ef697a529c42e76beb3f/src/js/base/core/dom.js#L334-L344 | train | List next node in a node list | [
30522,
3853,
2862,
2638,
18413,
1006,
13045,
1010,
3653,
2094,
1007,
1063,
3653,
2094,
1027,
3653,
2094,
1064,
1064,
4569,
2278,
1012,
8246,
1025,
9530,
3367,
14164,
1027,
1031,
1033,
1025,
2096,
1006,
13045,
1007,
1063,
2065,
1006,
3653,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/aria/aria.js | hasAriaLabel | function hasAriaLabel(element) {
var node = angular.element(element)[0] || element;
/* Check if compatible node type (ie: not HTML Document node) */
if (!node.hasAttribute) {
return false;
}
/* Check label or description attributes */
return node.hasAttribute('aria-label') || node.hasAtt... | javascript | function hasAriaLabel(element) {
var node = angular.element(element)[0] || element;
/* Check if compatible node type (ie: not HTML Document node) */
if (!node.hasAttribute) {
return false;
}
/* Check label or description attributes */
return node.hasAttribute('aria-label') || node.hasAtt... | [
"function",
"hasAriaLabel",
"(",
"element",
")",
"{",
"var",
"node",
"=",
"angular",
".",
"element",
"(",
"element",
")",
"[",
"0",
"]",
"||",
"element",
";",
"/* Check if compatible node type (ie: not HTML Document node) */",
"if",
"(",
"!",
"node",
".",
"hasAt... | Check if expected element has aria label attribute
@param element | [
"Check",
"if",
"expected",
"element",
"has",
"aria",
"label",
"attribute"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/aria/aria.js#L181-L191 | train | Check if element has aria label or aria - labelledby or aria - descriptions | [
30522,
3853,
2038,
10980,
20470,
2884,
1006,
5783,
1007,
1063,
13075,
13045,
1027,
16108,
1012,
5783,
1006,
5783,
1007,
1031,
1014,
1033,
1064,
1064,
5783,
1025,
1013,
1008,
4638,
2065,
11892,
13045,
2828,
1006,
29464,
1024,
2025,
16129,
62... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/project/SidebarView.js | _updateUIStates | function _updateUIStates() {
var spriteIndex,
ICON_CLASSES = ["splitview-icon-none", "splitview-icon-vertical", "splitview-icon-horizontal"],
layoutScheme = MainViewManager.getLayoutScheme();
if (layoutScheme.columns > 1) {
spriteIndex = 1;
} else if (layoutS... | javascript | function _updateUIStates() {
var spriteIndex,
ICON_CLASSES = ["splitview-icon-none", "splitview-icon-vertical", "splitview-icon-horizontal"],
layoutScheme = MainViewManager.getLayoutScheme();
if (layoutScheme.columns > 1) {
spriteIndex = 1;
} else if (layoutS... | [
"function",
"_updateUIStates",
"(",
")",
"{",
"var",
"spriteIndex",
",",
"ICON_CLASSES",
"=",
"[",
"\"splitview-icon-none\"",
",",
"\"splitview-icon-vertical\"",
",",
"\"splitview-icon-horizontal\"",
"]",
",",
"layoutScheme",
"=",
"MainViewManager",
".",
"getLayoutScheme"... | Update state of splitview and option elements
@private | [
"Update",
"state",
"of",
"splitview",
"and",
"option",
"elements"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/SidebarView.js#L130-L154 | train | Update UI states | [
30522,
3853,
1035,
10651,
27020,
12259,
2015,
1006,
1007,
1063,
13075,
11867,
17625,
22254,
10288,
1010,
12696,
1035,
4280,
1027,
1031,
1000,
3975,
8584,
1011,
12696,
1011,
3904,
1000,
1010,
1000,
3975,
8584,
1011,
12696,
1011,
7471,
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... |
catapult-project/catapult | netlog_viewer/netlog_viewer/ui_webui_resources_js_util.js | announceAccessibleMessage | function announceAccessibleMessage(msg) {
var element = document.createElement('div');
element.setAttribute('aria-live', 'polite');
element.style.position = 'relative';
element.style.left = '-9999px';
element.style.height = '0px';
element.innerText = msg;
document.body.appendChild(element);
window.setTi... | javascript | function announceAccessibleMessage(msg) {
var element = document.createElement('div');
element.setAttribute('aria-live', 'polite');
element.style.position = 'relative';
element.style.left = '-9999px';
element.style.height = '0px';
element.innerText = msg;
document.body.appendChild(element);
window.setTi... | [
"function",
"announceAccessibleMessage",
"(",
"msg",
")",
"{",
"var",
"element",
"=",
"document",
".",
"createElement",
"(",
"'div'",
")",
";",
"element",
".",
"setAttribute",
"(",
"'aria-live'",
",",
"'polite'",
")",
";",
"element",
".",
"style",
".",
"posi... | Add an accessible message to the page that will be announced to
users who have spoken feedback on, but will be invisible to all
other users. It's removed right away so it doesn't clutter the DOM.
@param {string} msg The text to be pronounced. | [
"Add",
"an",
"accessible",
"message",
"to",
"the",
"page",
"that",
"will",
"be",
"announced",
"to",
"users",
"who",
"have",
"spoken",
"feedback",
"on",
"but",
"will",
"be",
"invisible",
"to",
"all",
"other",
"users",
".",
"It",
"s",
"removed",
"right",
"... | 992929ffccac68827869a497f01ee4d653ed4f25 | https://github.com/catapult-project/catapult/blob/992929ffccac68827869a497f01ee4d653ed4f25/netlog_viewer/netlog_viewer/ui_webui_resources_js_util.js#L35-L46 | train | announce a message to the user that is not accessible | [
30522,
3853,
14970,
6305,
9623,
19307,
7834,
3736,
3351,
1006,
5796,
2290,
1007,
1063,
13075,
5783,
1027,
6254,
1012,
3443,
12260,
3672,
1006,
1005,
4487,
2615,
1005,
1007,
1025,
5783,
1012,
2275,
19321,
3089,
8569,
2618,
1006,
1005,
9342,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/lines-around-directive.js | reportError | function reportError(node, location, expected) {
context.report({
node,
messageId: expected ? "expected" : "unexpected",
data: {
value: node.expression.value,
location
},
fix(fixer) {
... | javascript | function reportError(node, location, expected) {
context.report({
node,
messageId: expected ? "expected" : "unexpected",
data: {
value: node.expression.value,
location
},
fix(fixer) {
... | [
"function",
"reportError",
"(",
"node",
",",
"location",
",",
"expected",
")",
"{",
"context",
".",
"report",
"(",
"{",
"node",
",",
"messageId",
":",
"expected",
"?",
"\"expected\"",
":",
"\"unexpected\"",
",",
"data",
":",
"{",
"value",
":",
"node",
".... | Report errors for newlines around directives.
@param {ASTNode} node Node to check.
@param {string} location Whether the error was found before or after the directive.
@param {boolean} expected Whether or not a newline was expected or unexpected.
@returns {void} | [
"Report",
"errors",
"for",
"newlines",
"around",
"directives",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/lines-around-directive.js#L113-L130 | train | Reports an error in the context of a node. | [
30522,
3853,
6398,
29165,
1006,
13045,
1010,
3295,
1010,
3517,
1007,
1063,
6123,
1012,
3189,
1006,
1063,
13045,
1010,
4471,
3593,
1024,
3517,
1029,
1000,
3517,
1000,
1024,
1000,
9223,
1000,
1010,
2951,
1024,
1063,
3643,
1024,
13045,
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... |
fex-team/webuploader | dist/webuploader.withoutimage.js | function( name, callback, context ) {
var me = this,
set;
if ( !callback ) {
return this;
}
set = this._events || (this._events = []);
eachEvent( name, callback, function( name, callbac... | javascript | function( name, callback, context ) {
var me = this,
set;
if ( !callback ) {
return this;
}
set = this._events || (this._events = []);
eachEvent( name, callback, function( name, callbac... | [
"function",
"(",
"name",
",",
"callback",
",",
"context",
")",
"{",
"var",
"me",
"=",
"this",
",",
"set",
";",
"if",
"(",
"!",
"callback",
")",
"{",
"return",
"this",
";",
"}",
"set",
"=",
"this",
".",
"_events",
"||",
"(",
"this",
".",
"_events"... | 绑定事件。
`callback`方法在执行时,arguments将会来源于trigger的时候携带的参数。如
```javascript
var obj = {};
// 使得obj有事件行为
Mediator.installTo( obj );
obj.on( 'testa', function( arg1, arg2 ) {
console.log( arg1, arg2 ); // => 'arg1', 'arg2'
});
obj.trigger( 'testa', 'arg1', 'arg2' );
```
如果`callback`中,某一个方法`return false`了,则后续的其他`callback`都不... | [
"绑定事件。"
] | 7094e4476c5af3b06993d91dde2d223200b9feb7 | https://github.com/fex-team/webuploader/blob/7094e4476c5af3b06993d91dde2d223200b9feb7/dist/webuploader.withoutimage.js#L580-L602 | train | Add event handler | [
30522,
3853,
1006,
2171,
1010,
2655,
5963,
1010,
6123,
1007,
1063,
13075,
2033,
1027,
2023,
1010,
2275,
1025,
2065,
1006,
999,
2655,
5963,
1007,
1063,
2709,
2023,
1025,
1065,
2275,
1027,
2023,
1012,
1035,
2824,
1064,
1064,
1006,
2023,
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... | |
dcloudio/mui | examples/hello-mui/js/mui.imageViewer.js | function() {
var self = this;
//绑定图片 tap 事件
document.addEventListener(enterEventName, function(event) {
if (!self.viewer) return;
var target = event.target;
if (!self.checkImage(target)) return;
self.viewer.style.display = 'block';
setTimeout(function() {
self.viewer.style.opacity = 1;... | javascript | function() {
var self = this;
//绑定图片 tap 事件
document.addEventListener(enterEventName, function(event) {
if (!self.viewer) return;
var target = event.target;
if (!self.checkImage(target)) return;
self.viewer.style.display = 'block';
setTimeout(function() {
self.viewer.style.opacity = 1;... | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
";",
"//绑定图片 tap 事件",
"document",
".",
"addEventListener",
"(",
"enterEventName",
",",
"function",
"(",
"event",
")",
"{",
"if",
"(",
"!",
"self",
".",
"viewer",
")",
"return",
";",
"var",
"target",
... | 绑定事件 | [
"绑定事件"
] | ff74c90a1671a552f3604b1288bf38a4126312d0 | https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/hello-mui/js/mui.imageViewer.js#L78-L189 | train | Add event listeners | [
30522,
3853,
1006,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
1013,
1013,
100,
1822,
100,
100,
11112,
1751,
100,
6254,
1012,
5587,
18697,
3372,
9863,
24454,
1006,
4607,
18697,
3372,
18442,
1010,
3853,
1006,
2724,
1007,
1063,
2065,
1006,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
angular/material | src/core/util/util.js | function(element) {
var parent = $mdUtil.getClosest(element, 'form');
var form = parent ? angular.element(parent).controller('form') : null;
return form ? form.$submitted : false;
} | javascript | function(element) {
var parent = $mdUtil.getClosest(element, 'form');
var form = parent ? angular.element(parent).controller('form') : null;
return form ? form.$submitted : false;
} | [
"function",
"(",
"element",
")",
"{",
"var",
"parent",
"=",
"$mdUtil",
".",
"getClosest",
"(",
"element",
",",
"'form'",
")",
";",
"var",
"form",
"=",
"parent",
"?",
"angular",
".",
"element",
"(",
"parent",
")",
".",
"controller",
"(",
"'form'",
")",
... | Returns true if the parent form of the element has been submitted.
@param element An AngularJS or HTML5 element.
@returns {boolean} | [
"Returns",
"true",
"if",
"the",
"parent",
"form",
"of",
"the",
"element",
"has",
"been",
"submitted",
"."
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/util.js#L803-L808 | train | Returns true if the element is submitted | [
30522,
3853,
1006,
5783,
1007,
1063,
13075,
6687,
1027,
1002,
9108,
21823,
2140,
1012,
2131,
20464,
27465,
2102,
1006,
5783,
1010,
1005,
2433,
1005,
1007,
1025,
13075,
2433,
1027,
6687,
1029,
16108,
1012,
5783,
1006,
6687,
1007,
1012,
11486... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/ripple/ripple.js | InkRippleDirective | function InkRippleDirective ($mdButtonInkRipple, $mdCheckboxInkRipple) {
return {
controller: angular.noop,
link: function (scope, element, attr) {
attr.hasOwnProperty('mdInkRippleCheckbox')
? $mdCheckboxInkRipple.attach(scope, element)
: $mdButtonInkRipple.attach(scope, elemen... | javascript | function InkRippleDirective ($mdButtonInkRipple, $mdCheckboxInkRipple) {
return {
controller: angular.noop,
link: function (scope, element, attr) {
attr.hasOwnProperty('mdInkRippleCheckbox')
? $mdCheckboxInkRipple.attach(scope, element)
: $mdButtonInkRipple.attach(scope, elemen... | [
"function",
"InkRippleDirective",
"(",
"$mdButtonInkRipple",
",",
"$mdCheckboxInkRipple",
")",
"{",
"return",
"{",
"controller",
":",
"angular",
".",
"noop",
",",
"link",
":",
"function",
"(",
"scope",
",",
"element",
",",
"attr",
")",
"{",
"attr",
".",
"has... | @ngdoc directive
@name mdInkRipple
@module material.core.ripple
@description
The `md-ink-ripple` directive allows you to specify the ripple color or if a ripple is allowed.
@param {string|boolean} md-ink-ripple A color string `#FF0000` or boolean (`false` or `0`) for
preventing ripple
@usage
### String values
<hljs ... | [
"@ngdoc",
"directive",
"@name",
"mdInkRipple",
"@module",
"material",
".",
"core",
".",
"ripple"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/ripple/ripple.js#L50-L59 | train | Directive to be used to add an ink - ripple icon to the element | [
30522,
3853,
10710,
29443,
21132,
7442,
15277,
1006,
1002,
9108,
8569,
15474,
19839,
29443,
10814,
1010,
1002,
9108,
5403,
3600,
8758,
19839,
29443,
10814,
1007,
1063,
2709,
1063,
11486,
1024,
16108,
1012,
2053,
7361,
1010,
4957,
1024,
3853,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eslint/eslint | lib/util/source-code-utils.js | getSourceCodeOfFiles | function getSourceCodeOfFiles(patterns, providedOptions, providedCallback) {
const sourceCodes = {};
const globPatternsList = typeof patterns === "string" ? [patterns] : patterns;
let options, callback;
const defaultOptions = Object.assign({}, baseDefaultOptions, { cwd: process.cwd() });
if (typeo... | javascript | function getSourceCodeOfFiles(patterns, providedOptions, providedCallback) {
const sourceCodes = {};
const globPatternsList = typeof patterns === "string" ? [patterns] : patterns;
let options, callback;
const defaultOptions = Object.assign({}, baseDefaultOptions, { cwd: process.cwd() });
if (typeo... | [
"function",
"getSourceCodeOfFiles",
"(",
"patterns",
",",
"providedOptions",
",",
"providedCallback",
")",
"{",
"const",
"sourceCodes",
"=",
"{",
"}",
";",
"const",
"globPatternsList",
"=",
"typeof",
"patterns",
"===",
"\"string\"",
"?",
"[",
"patterns",
"]",
":... | This callback is used to measure execution status in a progress bar
@callback progressCallback
@param {number} The total number of times the callback will be called.
Gets the SourceCode of a single file, or set of files.
@param {string[]|string} patterns A filename, directory name, or glob, or an array of them
@param... | [
"This",
"callback",
"is",
"used",
"to",
"measure",
"execution",
"status",
"in",
"a",
"progress",
"bar"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/source-code-utils.js#L63-L101 | train | Get sourceCode of files matching a glob pattern | [
30522,
3853,
4152,
8162,
3401,
16044,
7245,
9463,
2015,
1006,
7060,
1010,
3024,
30524,
3367,
3120,
23237,
1027,
1063,
1065,
1025,
9530,
3367,
1043,
4135,
2497,
4502,
12079,
3619,
9863,
1027,
2828,
11253,
7060,
1027,
1027,
1027,
1000,
5164,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SeleniumHQ/selenium | javascript/node/selenium-webdriver/lib/logging.js | consoleHandler | function consoleHandler(entry) {
if (typeof console === 'undefined' || !console) {
return;
}
var timestamp = new Date(entry.timestamp);
var msg =
'[' + timestamp.getUTCFullYear() + '-' +
pad(timestamp.getUTCMonth() + 1) + '-' +
pad(timestamp.getUTCDate()) + 'T' +
pad(timestamp.getUT... | javascript | function consoleHandler(entry) {
if (typeof console === 'undefined' || !console) {
return;
}
var timestamp = new Date(entry.timestamp);
var msg =
'[' + timestamp.getUTCFullYear() + '-' +
pad(timestamp.getUTCMonth() + 1) + '-' +
pad(timestamp.getUTCDate()) + 'T' +
pad(timestamp.getUT... | [
"function",
"consoleHandler",
"(",
"entry",
")",
"{",
"if",
"(",
"typeof",
"console",
"===",
"'undefined'",
"||",
"!",
"console",
")",
"{",
"return",
";",
"}",
"var",
"timestamp",
"=",
"new",
"Date",
"(",
"entry",
".",
"timestamp",
")",
";",
"var",
"ms... | Logs all messages to the Console API.
@param {!Entry} entry the entry to log. | [
"Logs",
"all",
"messages",
"to",
"the",
"Console",
"API",
"."
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/selenium-webdriver/lib/logging.js#L539-L563 | train | console handler for console. log | [
30522,
3853,
10122,
11774,
3917,
1006,
4443,
1007,
1063,
2065,
1006,
2828,
11253,
10122,
1027,
1027,
1027,
1005,
6151,
28344,
1005,
1064,
1064,
999,
10122,
1007,
1063,
2709,
1025,
1065,
13075,
2335,
15464,
2361,
1027,
2047,
3058,
1006,
4443... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
exceljs/exceljs | spec/integration/workbook/workbook.spec.js | rangeCheck | function rangeCheck(name, members) {
var ranges = wb2.definedNames.getRanges(name);
expect(ranges.name).to.equal(name);
if (members.length) {
expect(ranges.ranges).to.have.members(members);
} else {
expect(ranges.ranges.length).to.equal(0);
... | javascript | function rangeCheck(name, members) {
var ranges = wb2.definedNames.getRanges(name);
expect(ranges.name).to.equal(name);
if (members.length) {
expect(ranges.ranges).to.have.members(members);
} else {
expect(ranges.ranges.length).to.equal(0);
... | [
"function",
"rangeCheck",
"(",
"name",
",",
"members",
")",
"{",
"var",
"ranges",
"=",
"wb2",
".",
"definedNames",
".",
"getRanges",
"(",
"name",
")",
";",
"expect",
"(",
"ranges",
".",
"name",
")",
".",
"to",
".",
"equal",
"(",
"name",
")",
";",
"... | ranges | [
"ranges"
] | c6ee7a14d5e0e5a07bf0e475aa4dd7b9a1e907f2 | https://github.com/exceljs/exceljs/blob/c6ee7a14d5e0e5a07bf0e475aa4dd7b9a1e907f2/spec/integration/workbook/workbook.spec.js#L445-L453 | train | Check if the name is a valid range | [
30522,
3853,
2846,
5403,
3600,
1006,
2171,
1010,
2372,
1007,
1063,
13075,
8483,
1027,
25610,
2475,
1012,
4225,
18442,
2015,
1012,
2131,
24388,
2229,
1006,
2171,
1007,
1025,
5987,
1006,
8483,
1012,
2171,
1007,
1012,
2000,
1012,
5020,
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.fl/src/sap/ui/fl/context/ContextManager.js | function (oParameter, aRuntimeContext) {
var sSelector = oParameter.selector;
var sOperator = oParameter.operator;
var oValue = oParameter.value;
switch (sOperator) {
case "EQ":
return this._checkEquals(sSelector, oValue, aRuntimeContext);
case "NE":
return !this._checkEquals(sSelector, o... | javascript | function (oParameter, aRuntimeContext) {
var sSelector = oParameter.selector;
var sOperator = oParameter.operator;
var oValue = oParameter.value;
switch (sOperator) {
case "EQ":
return this._checkEquals(sSelector, oValue, aRuntimeContext);
case "NE":
return !this._checkEquals(sSelector, o... | [
"function",
"(",
"oParameter",
",",
"aRuntimeContext",
")",
"{",
"var",
"sSelector",
"=",
"oParameter",
".",
"selector",
";",
"var",
"sOperator",
"=",
"oParameter",
".",
"operator",
";",
"var",
"oValue",
"=",
"oParameter",
".",
"value",
";",
"switch",
"(",
... | Checks a single condition of a context object. Returns true if the condition matches the current runtime context.
@param {Object} oParameter - context within an sap.ui.fl.Change
@param {string} oParameter.selector - key of a runtime context
@param {string} oParameter.operator - determine which comparison has to be exe... | [
"Checks",
"a",
"single",
"condition",
"of",
"a",
"context",
"object",
".",
"Returns",
"true",
"if",
"the",
"condition",
"matches",
"the",
"current",
"runtime",
"context",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/context/ContextManager.js#L187-L201 | train | Checks if the given parameter is valid. | [
30522,
3853,
1006,
6728,
5400,
22828,
1010,
28217,
7292,
8663,
18209,
1007,
1063,
13075,
7020,
12260,
16761,
1027,
6728,
5400,
22828,
1012,
27000,
1025,
13075,
2061,
4842,
8844,
1027,
6728,
5400,
22828,
1012,
6872,
1025,
13075,
9242,
5657,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/api/encodeGlobal.js | encodeGlobal | function encodeGlobal(output) {
var book = output.getBook();
var bookFS = book.getContentFS();
var logger = output.getLogger();
var outputFolder = output.getRoot();
var plugins = output.getPlugins();
var blocks = Plugins.listBlocks(plugins);
var result = {
log: logger,
confi... | javascript | function encodeGlobal(output) {
var book = output.getBook();
var bookFS = book.getContentFS();
var logger = output.getLogger();
var outputFolder = output.getRoot();
var plugins = output.getPlugins();
var blocks = Plugins.listBlocks(plugins);
var result = {
log: logger,
confi... | [
"function",
"encodeGlobal",
"(",
"output",
")",
"{",
"var",
"book",
"=",
"output",
".",
"getBook",
"(",
")",
";",
"var",
"bookFS",
"=",
"book",
".",
"getContentFS",
"(",
")",
";",
"var",
"logger",
"=",
"output",
".",
"getLogger",
"(",
")",
";",
"var"... | Encode a global context into a JS object
It's the context for page's hook, etc
@param {Output} output
@return {Object} | [
"Encode",
"a",
"global",
"context",
"into",
"a",
"JS",
"object",
"It",
"s",
"the",
"context",
"for",
"page",
"s",
"hook",
"etc"
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/api/encodeGlobal.js#L25-L255 | train | Encode global data | [
30522,
3853,
4372,
16044,
23296,
16429,
2389,
1006,
6434,
1007,
1063,
13075,
2338,
1027,
6434,
1012,
2131,
8654,
1006,
1007,
1025,
13075,
2338,
10343,
1027,
2338,
1012,
2131,
8663,
6528,
24475,
2015,
1006,
1007,
1025,
13075,
8833,
4590,
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... |
firebase/firebase-js-sdk | packages/auth/demo/public/script.js | onLinkWithGenericIdPCredential | function onLinkWithGenericIdPCredential() {
var providerId = $('#link-generic-idp-provider-id').val();
var idToken = $('#link-generic-idp-id-token').val();
var accessToken = $('#link-generic-idp-access-token').val();
var provider = new firebase.auth.OAuthProvider(providerId);
activeUser().linkWithCredential(
... | javascript | function onLinkWithGenericIdPCredential() {
var providerId = $('#link-generic-idp-provider-id').val();
var idToken = $('#link-generic-idp-id-token').val();
var accessToken = $('#link-generic-idp-access-token').val();
var provider = new firebase.auth.OAuthProvider(providerId);
activeUser().linkWithCredential(
... | [
"function",
"onLinkWithGenericIdPCredential",
"(",
")",
"{",
"var",
"providerId",
"=",
"$",
"(",
"'#link-generic-idp-provider-id'",
")",
".",
"val",
"(",
")",
";",
"var",
"idToken",
"=",
"$",
"(",
"'#link-generic-idp-id-token'",
")",
".",
"val",
"(",
")",
";",... | Links with a generic IdP credential. | [
"Links",
"with",
"a",
"generic",
"IdP",
"credential",
"."
] | 491598a499813dacc23724de5e237ec220cc560e | https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/demo/public/script.js#L760-L768 | train | Link with generic IDP credential | [
30522,
3853,
2006,
13767,
24415,
6914,
22420,
3593,
15042,
5596,
24271,
1006,
1007,
1063,
13075,
10802,
3593,
1027,
1002,
1006,
1005,
1001,
4957,
1011,
12391,
1011,
8909,
2361,
1011,
10802,
1011,
8909,
1005,
1007,
1012,
11748,
1006,
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... |
moleculerjs/moleculer | src/middlewares/circuit-breaker.js | halfOpenWait | function halfOpenWait(item, ctx) {
item.state = C.CIRCUIT_HALF_OPEN_WAIT;
item.ep.state = false;
// Anti-stick protection
item.cbTimer = setTimeout(() => halfOpen(item, ctx), item.opts.halfOpenTime);
item.cbTimer.unref();
} | javascript | function halfOpenWait(item, ctx) {
item.state = C.CIRCUIT_HALF_OPEN_WAIT;
item.ep.state = false;
// Anti-stick protection
item.cbTimer = setTimeout(() => halfOpen(item, ctx), item.opts.halfOpenTime);
item.cbTimer.unref();
} | [
"function",
"halfOpenWait",
"(",
"item",
",",
"ctx",
")",
"{",
"item",
".",
"state",
"=",
"C",
".",
"CIRCUIT_HALF_OPEN_WAIT",
";",
"item",
".",
"ep",
".",
"state",
"=",
"false",
";",
"// Anti-stick protection",
"item",
".",
"cbTimer",
"=",
"setTimeout",
"(... | Change circuit-breaker status to half-open waiting. First request is invoked after half-open.
@param {Object} item
@param {Context} ctx | [
"Change",
"circuit",
"-",
"breaker",
"status",
"to",
"half",
"-",
"open",
"waiting",
".",
"First",
"request",
"is",
"invoked",
"after",
"half",
"-",
"open",
"."
] | f95aadc2d61b0d0e3c643a43c3ed28bca6425cde | https://github.com/moleculerjs/moleculer/blob/f95aadc2d61b0d0e3c643a43c3ed28bca6425cde/src/middlewares/circuit-breaker.js#L165-L172 | train | Wait for the half - open process to finish | [
30522,
3853,
2431,
26915,
21547,
2102,
1006,
8875,
1010,
14931,
2595,
1007,
1063,
8875,
1012,
2110,
1027,
1039,
1012,
4984,
1035,
2431,
1035,
2330,
1035,
3524,
1025,
8875,
1012,
4958,
1012,
2110,
1027,
6270,
1025,
1013,
1013,
3424,
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... |
BrainJS/brain.js | dist/recurrent/matrix/row-pluck-b.js | rowPluckB | function rowPluckB(product, left, rowIndex) {
var columns = left.columns;
var rowBase = columns * rowIndex;
for (var column = 0; column < columns; column++) {
left.deltas[rowBase + column] = product.deltas[column];
}
} | javascript | function rowPluckB(product, left, rowIndex) {
var columns = left.columns;
var rowBase = columns * rowIndex;
for (var column = 0; column < columns; column++) {
left.deltas[rowBase + column] = product.deltas[column];
}
} | [
"function",
"rowPluckB",
"(",
"product",
",",
"left",
",",
"rowIndex",
")",
"{",
"var",
"columns",
"=",
"left",
".",
"columns",
";",
"var",
"rowBase",
"=",
"columns",
"*",
"rowIndex",
";",
"for",
"(",
"var",
"column",
"=",
"0",
";",
"column",
"<",
"c... | adds {from} deltas into {m} deltas
@param {Matrix} product
@param {Matrix} left
@param {Number} rowIndex | [
"adds",
"{",
"from",
"}",
"deltas",
"into",
"{",
"m",
"}",
"deltas"
] | ab09bfc74a0d29d4731dcbdebfa17aeba7f7b1ef | https://github.com/BrainJS/brain.js/blob/ab09bfc74a0d29d4731dcbdebfa17aeba7f7b1ef/dist/recurrent/matrix/row-pluck-b.js#L13-L19 | train | rowPluckB - Plucks a row into the left | [
30522,
3853,
5216,
24759,
12722,
2497,
1006,
4031,
1010,
2187,
1010,
5216,
22254,
10288,
1007,
1063,
13075,
7753,
1027,
2187,
1012,
7753,
1025,
13075,
5216,
15058,
1027,
7753,
1008,
5216,
22254,
10288,
1025,
2005,
1006,
13075,
5930,
1027,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Helper.js | function (mCacheQueryOptions, aPaths, fnFetchMetadata,
sRootMetaPath, mNavigationPropertyPaths, sPrefix) {
var aExpands = [],
mExpands = {},
mResult,
aSelects,
mSelects = {};
/*
* Filter where only structural properties pass through.
*
* @param {boolean} bSkipFirstSegment
* ... | javascript | function (mCacheQueryOptions, aPaths, fnFetchMetadata,
sRootMetaPath, mNavigationPropertyPaths, sPrefix) {
var aExpands = [],
mExpands = {},
mResult,
aSelects,
mSelects = {};
/*
* Filter where only structural properties pass through.
*
* @param {boolean} bSkipFirstSegment
* ... | [
"function",
"(",
"mCacheQueryOptions",
",",
"aPaths",
",",
"fnFetchMetadata",
",",
"sRootMetaPath",
",",
"mNavigationPropertyPaths",
",",
"sPrefix",
")",
"{",
"var",
"aExpands",
"=",
"[",
"]",
",",
"mExpands",
"=",
"{",
"}",
",",
"mResult",
",",
"aSelects",
... | Returns a copy of given query options where "$expand" and "$select" are replaced by the
intersection with the given (navigation) property paths.
@param {object} mCacheQueryOptions
A map of query options as returned by
{@link sap.ui.model.odata.v4.ODataModel#buildQueryOptions}
@param {string[]} aPaths
The "14.5.11 Expr... | [
"Returns",
"a",
"copy",
"of",
"given",
"query",
"options",
"where",
"$expand",
"and",
"$select",
"are",
"replaced",
"by",
"the",
"intersection",
"with",
"the",
"given",
"(",
"navigation",
")",
"property",
"paths",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Helper.js#L712-L810 | train | Filter the given meta path and returns the corresponding structural property | [
30522,
3853,
1006,
22432,
5403,
4226,
2854,
7361,
9285,
1010,
9706,
8988,
2015,
1010,
1042,
2078,
7959,
10649,
11368,
8447,
2696,
1010,
5034,
17206,
11368,
22068,
2705,
1010,
24098,
18891,
12540,
21572,
4842,
3723,
15069,
2015,
1010,
11867,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | _createMROFList | function _createMROFList() {
var paneList = MainViewManager.getPaneIdList(),
mrofList = [],
fileList,
index;
var pane, file, mrofEntry, paneCount, fileCount;
// Iterate over the pane ID list
for (paneCount = 0; paneCount < paneList.length; paneCount+... | javascript | function _createMROFList() {
var paneList = MainViewManager.getPaneIdList(),
mrofList = [],
fileList,
index;
var pane, file, mrofEntry, paneCount, fileCount;
// Iterate over the pane ID list
for (paneCount = 0; paneCount < paneList.length; paneCount+... | [
"function",
"_createMROFList",
"(",
")",
"{",
"var",
"paneList",
"=",
"MainViewManager",
".",
"getPaneIdList",
"(",
")",
",",
"mrofList",
"=",
"[",
"]",
",",
"fileList",
",",
"index",
";",
"var",
"pane",
",",
"file",
",",
"mrofEntry",
",",
"paneCount",
"... | This function is used to create mrof when a project is opened for the firt time with the recent files feature
This routine acts as a logic to migrate existing viewlist to mrof structure
@private | [
"This",
"function",
"is",
"used",
"to",
"create",
"mrof",
"when",
"a",
"project",
"is",
"opened",
"for",
"the",
"firt",
"time",
"with",
"the",
"recent",
"files",
"feature",
"This",
"routine",
"acts",
"as",
"a",
"logic",
"to",
"migrate",
"existing",
"viewli... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/NavigationAndHistory/main.js#L320-L343 | train | Create the MROF list | [
30522,
3853,
1035,
3443,
2213,
3217,
10258,
2923,
1006,
1007,
1063,
13075,
5997,
2923,
1027,
2364,
8584,
24805,
4590,
1012,
2131,
9739,
7416,
19422,
2923,
1006,
1007,
1010,
2720,
11253,
9863,
1027,
1031,
1033,
1010,
5371,
9863,
1010,
5950,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
dimsemenov/PhotoSwipe | src/js/gestures.js | function(e, isDown) {
_preventObj.prevent = !_closestElement(e.target, _options.isClickableElement);
_shout('preventDragEvent', e, isDown, _preventObj);
return _preventObj.prevent;
} | javascript | function(e, isDown) {
_preventObj.prevent = !_closestElement(e.target, _options.isClickableElement);
_shout('preventDragEvent', e, isDown, _preventObj);
return _preventObj.prevent;
} | [
"function",
"(",
"e",
",",
"isDown",
")",
"{",
"_preventObj",
".",
"prevent",
"=",
"!",
"_closestElement",
"(",
"e",
".",
"target",
",",
"_options",
".",
"isClickableElement",
")",
";",
"_shout",
"(",
"'preventDragEvent'",
",",
"e",
",",
"isDown",
",",
"... | amount of pixels to drag to determine direction of swipe | [
"amount",
"of",
"pixels",
"to",
"drag",
"to",
"determine",
"direction",
"of",
"swipe"
] | 80607e12542a1a54ecefa837649e862b35dffd25 | https://github.com/dimsemenov/PhotoSwipe/blob/80607e12542a1a54ecefa837649e862b35dffd25/src/js/gestures.js#L99-L105 | train | prevent drag event | [
30522,
3853,
1006,
1041,
1010,
2003,
7698,
1007,
1063,
1035,
4652,
16429,
3501,
1012,
4652,
1027,
999,
1035,
7541,
12260,
3672,
1006,
1041,
1012,
4539,
1010,
1035,
7047,
1012,
2003,
20464,
6799,
3085,
12260,
3672,
1007,
1025,
1035,
11245,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/runner.js | extraGlobals | function extraGlobals() {
if (typeof process === 'object' && typeof process.version === 'string') {
var parts = process.version.split('.');
var nodeVersion = parts.reduce(function(a, v) {
return (a << 8) | v;
});
// 'errno' was renamed to process._errno in v0.9.11.
if (nodeVersion < 0x00090... | javascript | function extraGlobals() {
if (typeof process === 'object' && typeof process.version === 'string') {
var parts = process.version.split('.');
var nodeVersion = parts.reduce(function(a, v) {
return (a << 8) | v;
});
// 'errno' was renamed to process._errno in v0.9.11.
if (nodeVersion < 0x00090... | [
"function",
"extraGlobals",
"(",
")",
"{",
"if",
"(",
"typeof",
"process",
"===",
"'object'",
"&&",
"typeof",
"process",
".",
"version",
"===",
"'string'",
")",
"{",
"var",
"parts",
"=",
"process",
".",
"version",
".",
"split",
"(",
"'.'",
")",
";",
"v... | Array of globals dependent on the environment.
@return {Array}
@deprecated
@todo remove; long since unsupported
@private | [
"Array",
"of",
"globals",
"dependent",
"on",
"the",
"environment",
"."
] | 9b00fedb610241e33f7592c40164e42a38a793cf | https://github.com/mochajs/mocha/blob/9b00fedb610241e33f7592c40164e42a38a793cf/lib/runner.js#L1027-L1041 | train | Returns an array of global variables that are needed to pass to the next function | [
30522,
3853,
4469,
23296,
16429,
9777,
1006,
1007,
1063,
2065,
1006,
2828,
11253,
2832,
1027,
1027,
1027,
1005,
4874,
1005,
1004,
1004,
2828,
11253,
2832,
1012,
2544,
1027,
1027,
1027,
1005,
5164,
1005,
1007,
1063,
13075,
3033,
1027,
2832,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-js | lib/service.js | apiAttemptEvent | function apiAttemptEvent(request) {
var api = request.service.api.operations[request.operation];
var monitoringEvent = {
Type: 'ApiCallAttempt',
Api: api ? api.name : request.operation,
Version: 1,
Service: request.service.api.serviceId || request.service.api.endpointPrefix,
Fqdn: ... | javascript | function apiAttemptEvent(request) {
var api = request.service.api.operations[request.operation];
var monitoringEvent = {
Type: 'ApiCallAttempt',
Api: api ? api.name : request.operation,
Version: 1,
Service: request.service.api.serviceId || request.service.api.endpointPrefix,
Fqdn: ... | [
"function",
"apiAttemptEvent",
"(",
"request",
")",
"{",
"var",
"api",
"=",
"request",
".",
"service",
".",
"api",
".",
"operations",
"[",
"request",
".",
"operation",
"]",
";",
"var",
"monitoringEvent",
"=",
"{",
"Type",
":",
"'ApiCallAttempt'",
",",
"Api... | Event recording metrics for an API call attempt.
@returns {object} a subset of api call attempt metrics
@api private | [
"Event",
"recording",
"metrics",
"for",
"an",
"API",
"call",
"attempt",
"."
] | c23e5f0edd150f8885267e5f7c8a564f8e6e8562 | https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/service.js#L326-L361 | train | Creates a monitoring event for a given API call | [
30522,
3853,
17928,
19321,
6633,
13876,
18697,
3372,
1006,
5227,
1007,
1063,
13075,
17928,
1027,
5227,
1012,
2326,
1012,
17928,
1012,
3136,
1031,
5227,
1012,
3169,
1033,
1025,
13075,
8822,
18697,
3372,
1027,
1063,
2828,
1024,
1005,
29197,
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... |
SeleniumHQ/selenium | javascript/selenium-core/scripts/htmlutils.js | AjaxsltEngine | function AjaxsltEngine() {
// private
var ignoreAttributesWithoutValue = false;
function selectLogic(xpath, contextNode, namespaceResolver, firstMatch) {
// DGF set xpathdebug = true (using getEval, if you like) to turn on JS
// XPath debugging
//xpathdebug = true;
var context;
... | javascript | function AjaxsltEngine() {
// private
var ignoreAttributesWithoutValue = false;
function selectLogic(xpath, contextNode, namespaceResolver, firstMatch) {
// DGF set xpathdebug = true (using getEval, if you like) to turn on JS
// XPath debugging
//xpathdebug = true;
var context;
... | [
"function",
"AjaxsltEngine",
"(",
")",
"{",
"// private",
"var",
"ignoreAttributesWithoutValue",
"=",
"false",
";",
"function",
"selectLogic",
"(",
"xpath",
",",
"contextNode",
",",
"namespaceResolver",
",",
"firstMatch",
")",
"{",
"// DGF set xpathdebug = true (using g... | Implements XPathEngine. | [
"Implements",
"XPathEngine",
"."
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L1167-L1230 | train | AJAX SLIDEE engine | [
30522,
3853,
18176,
14540,
6528,
11528,
2063,
1006,
1007,
1063,
1013,
1013,
2797,
13075,
8568,
19321,
3089,
8569,
4570,
24415,
5833,
10175,
5657,
1027,
6270,
1025,
3853,
7276,
27179,
1006,
26726,
8988,
1010,
6123,
3630,
3207,
1010,
3415,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
caolan/async | lib/whilst.js | whilst | function whilst(test, iteratee, callback) {
callback = onlyOnce(callback);
var _fn = wrapAsync(iteratee);
var _test = wrapAsync(test);
var results = [];
function next(err, ...rest) {
if (err) return callback(err);
results = rest;
if (err === false) return;
_test(chec... | javascript | function whilst(test, iteratee, callback) {
callback = onlyOnce(callback);
var _fn = wrapAsync(iteratee);
var _test = wrapAsync(test);
var results = [];
function next(err, ...rest) {
if (err) return callback(err);
results = rest;
if (err === false) return;
_test(chec... | [
"function",
"whilst",
"(",
"test",
",",
"iteratee",
",",
"callback",
")",
"{",
"callback",
"=",
"onlyOnce",
"(",
"callback",
")",
";",
"var",
"_fn",
"=",
"wrapAsync",
"(",
"iteratee",
")",
";",
"var",
"_test",
"=",
"wrapAsync",
"(",
"test",
")",
";",
... | Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
stopped, or an error occurs.
@name whilst
@static
@memberOf module:ControlFlow
@method
@category Control Flow
@param {AsyncFunction} test - asynchronous truth test to perform before each
execution of `iteratee`. Invoked with ().
@param {Asy... | [
"Repeatedly",
"call",
"iteratee",
"while",
"test",
"returns",
"true",
".",
"Calls",
"callback",
"when",
"stopped",
"or",
"an",
"error",
"occurs",
"."
] | 4330d536c106592139fa82062494c9dba0da1fdb | https://github.com/caolan/async/blob/4330d536c106592139fa82062494c9dba0da1fdb/lib/whilst.js#L39-L60 | train | Whilst test the cache | [
30522,
3853,
5819,
1006,
3231,
1010,
2009,
22139,
2063,
1010,
2655,
5963,
1007,
1063,
2655,
5963,
1027,
2069,
2239,
3401,
1006,
2655,
5963,
1007,
1025,
13075,
1035,
1042,
2078,
1027,
10236,
3022,
6038,
2278,
1006,
2009,
22139,
2063,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eslint/eslint | lib/rules/capitalized-comments.js | processComment | function processComment(comment) {
const options = normalizedOptions[comment.type],
commentValid = isCommentValid(comment, options);
if (!commentValid) {
const messageId = capitalize === "always"
? "unexpectedLowercaseComment"
... | javascript | function processComment(comment) {
const options = normalizedOptions[comment.type],
commentValid = isCommentValid(comment, options);
if (!commentValid) {
const messageId = capitalize === "always"
? "unexpectedLowercaseComment"
... | [
"function",
"processComment",
"(",
"comment",
")",
"{",
"const",
"options",
"=",
"normalizedOptions",
"[",
"comment",
".",
"type",
"]",
",",
"commentValid",
"=",
"isCommentValid",
"(",
"comment",
",",
"options",
")",
";",
"if",
"(",
"!",
"commentValid",
")",... | Process a comment to determine if it needs to be reported.
@param {ASTNode} comment The comment node to process.
@returns {void} | [
"Process",
"a",
"comment",
"to",
"determine",
"if",
"it",
"needs",
"to",
"be",
"reported",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/capitalized-comments.js#L268-L293 | train | Process a comment | [
30522,
3853,
2832,
9006,
3672,
1006,
7615,
1007,
1063,
9530,
3367,
7047,
1027,
3671,
3550,
7361,
9285,
1031,
7615,
1012,
2828,
1033,
1010,
7615,
10175,
3593,
1027,
2003,
9006,
3672,
10175,
3593,
1006,
7615,
1010,
7047,
1007,
1025,
2065,
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... |
spencermountain/compromise | src/index.js | function(str, lex) {
if (lex) {
w.plugin({
words: lex
});
}
let doc = buildText(str, w);
doc.tagger();
return doc;
} | javascript | function(str, lex) {
if (lex) {
w.plugin({
words: lex
});
}
let doc = buildText(str, w);
doc.tagger();
return doc;
} | [
"function",
"(",
"str",
",",
"lex",
")",
"{",
"if",
"(",
"lex",
")",
"{",
"w",
".",
"plugin",
"(",
"{",
"words",
":",
"lex",
"}",
")",
";",
"}",
"let",
"doc",
"=",
"buildText",
"(",
"str",
",",
"w",
")",
";",
"doc",
".",
"tagger",
"(",
")",... | the main function | [
"the",
"main",
"function"
] | 526b1cab28a45ccbb430fbf2824db420acd587cf | https://github.com/spencermountain/compromise/blob/526b1cab28a45ccbb430fbf2824db420acd587cf/src/index.js#L10-L19 | train | Build a text document | [
30522,
3853,
1006,
2358,
2099,
1010,
17244,
1007,
1063,
2065,
1006,
17244,
1007,
1063,
1059,
1012,
13354,
2378,
1006,
1063,
2616,
1024,
17244,
1065,
1007,
1025,
1065,
2292,
9986,
1027,
3857,
18209,
1006,
2358,
2099,
1010,
1059,
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... | |
adobe/brackets | src/language/CSSUtils.js | getCompleteSelectors | function getCompleteSelectors(info, useGroup) {
if (info.parentSelectors) {
// Show parents with / separators.
var completeSelectors = info.parentSelectors + " / ";
if (useGroup && info.selectorGroup) {
completeSelectors += info.selectorGroup;
} el... | javascript | function getCompleteSelectors(info, useGroup) {
if (info.parentSelectors) {
// Show parents with / separators.
var completeSelectors = info.parentSelectors + " / ";
if (useGroup && info.selectorGroup) {
completeSelectors += info.selectorGroup;
} el... | [
"function",
"getCompleteSelectors",
"(",
"info",
",",
"useGroup",
")",
"{",
"if",
"(",
"info",
".",
"parentSelectors",
")",
"{",
"// Show parents with / separators.",
"var",
"completeSelectors",
"=",
"info",
".",
"parentSelectors",
"+",
"\" / \"",
";",
"if",
"(",
... | Return a string that shows the literal parent hierarchy of the selector
in info.
@param {!SelectorInfo} info
@param {boolean=} useGroup true to append selectorGroup instead of selector
@return {string} the literal parent hierarchy of the selector | [
"Return",
"a",
"string",
"that",
"shows",
"the",
"literal",
"parent",
"hierarchy",
"of",
"the",
"selector",
"in",
"info",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/CSSUtils.js#L668-L683 | train | Get complete selectors | [
30522,
3853,
2131,
9006,
10814,
4570,
12260,
24817,
1006,
18558,
1010,
2224,
17058,
1007,
1063,
2065,
1006,
18558,
1012,
3008,
12260,
24817,
1007,
1063,
1013,
1013,
2265,
3008,
2007,
1013,
19802,
25879,
5668,
1012,
13075,
28123,
12260,
24817,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
catapult-project/catapult | tracing/third_party/oboe/src/instanceApi.js | addMultipleNodeOrPathListeners | function addMultipleNodeOrPathListeners(eventId, listenerMap) {
for( var pattern in listenerMap ) {
addSingleNodeOrPathListener(eventId, pattern, listenerMap[pattern]);
}
} | javascript | function addMultipleNodeOrPathListeners(eventId, listenerMap) {
for( var pattern in listenerMap ) {
addSingleNodeOrPathListener(eventId, pattern, listenerMap[pattern]);
}
} | [
"function",
"addMultipleNodeOrPathListeners",
"(",
"eventId",
",",
"listenerMap",
")",
"{",
"for",
"(",
"var",
"pattern",
"in",
"listenerMap",
")",
"{",
"addSingleNodeOrPathListener",
"(",
"eventId",
",",
"pattern",
",",
"listenerMap",
"[",
"pattern",
"]",
")",
... | Add several listeners at a time, from a map | [
"Add",
"several",
"listeners",
"at",
"a",
"time",
"from",
"a",
"map"
] | 992929ffccac68827869a497f01ee4d653ed4f25 | https://github.com/catapult-project/catapult/blob/992929ffccac68827869a497f01ee4d653ed4f25/tracing/third_party/oboe/src/instanceApi.js#L183-L188 | train | Add multiple node - or - leaf listeners to the event queue | [
30522,
3853,
5587,
12274,
7096,
11514,
7770,
10244,
2953,
15069,
9863,
24454,
2015,
1006,
2724,
3593,
1010,
19373,
2863,
2361,
1007,
1063,
2005,
1006,
13075,
5418,
1999,
19373,
2863,
2361,
1007,
1063,
9909,
2075,
7770,
10244,
2953,
15069,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular/material | src/core/services/layout/layout.js | translateWithValueToCssClass | function translateWithValueToCssClass(scope, element, attrs) {
var updateFn = updateClassWithValue(element, className, attrs);
var unwatch = attrs.$observe(attrs.$normalize(className), updateFn);
updateFn(getNormalizedAttrValue(className, attrs, ""));
scope.$on("$destroy", function() { unwatch(... | javascript | function translateWithValueToCssClass(scope, element, attrs) {
var updateFn = updateClassWithValue(element, className, attrs);
var unwatch = attrs.$observe(attrs.$normalize(className), updateFn);
updateFn(getNormalizedAttrValue(className, attrs, ""));
scope.$on("$destroy", function() { unwatch(... | [
"function",
"translateWithValueToCssClass",
"(",
"scope",
",",
"element",
",",
"attrs",
")",
"{",
"var",
"updateFn",
"=",
"updateClassWithValue",
"(",
"element",
",",
"className",
",",
"attrs",
")",
";",
"var",
"unwatch",
"=",
"attrs",
".",
"$observe",
"(",
... | Add as transformed class selector(s), then
remove the deprecated attribute selector | [
"Add",
"as",
"transformed",
"class",
"selector",
"(",
"s",
")",
"then",
"remove",
"the",
"deprecated",
"attribute",
"selector"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/layout/layout.js#L288-L294 | train | translate the value of the class attribute to the correct value | [
30522,
3853,
17637,
24415,
10175,
23361,
10085,
4757,
26266,
1006,
9531,
1010,
5783,
1010,
2012,
16344,
2015,
1007,
1063,
13075,
10651,
2546,
2078,
1027,
10651,
26266,
24415,
10175,
5657,
1006,
5783,
1010,
2465,
18442,
1010,
2012,
16344,
2015... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
nhn/tui.editor | src/js/codemirror/continuelist.js | incrementRemainingMarkdownListNumbers | function incrementRemainingMarkdownListNumbers(cm, pos) {
var startLine = pos.line, lookAhead = 0, skipCount = 0;
var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];
do {
lookAhead += 1;
var nextLineNumber = startLine + lookAhead;
var nextLine = cm.getLine(nextLineNumber),... | javascript | function incrementRemainingMarkdownListNumbers(cm, pos) {
var startLine = pos.line, lookAhead = 0, skipCount = 0;
var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];
do {
lookAhead += 1;
var nextLineNumber = startLine + lookAhead;
var nextLine = cm.getLine(nextLineNumber),... | [
"function",
"incrementRemainingMarkdownListNumbers",
"(",
"cm",
",",
"pos",
")",
"{",
"var",
"startLine",
"=",
"pos",
".",
"line",
",",
"lookAhead",
"=",
"0",
",",
"skipCount",
"=",
"0",
";",
"var",
"startItem",
"=",
"listRE",
".",
"exec",
"(",
"cm",
"."... | Auto-updating Markdown list numbers when a new item is added to the middle of a list | [
"Auto",
"-",
"updating",
"Markdown",
"list",
"numbers",
"when",
"a",
"new",
"item",
"is",
"added",
"to",
"the",
"middle",
"of",
"a",
"list"
] | e75ab08c2a7ab07d1143e318f7cde135c5e3002e | https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/codemirror/continuelist.js#L67-L100 | train | Increment remaining markdown list numbers | [
30522,
3853,
4297,
28578,
4765,
28578,
8113,
2075,
10665,
7698,
9863,
19172,
17198,
1006,
4642,
1010,
13433,
2015,
1007,
1063,
13075,
2707,
4179,
1027,
13433,
2015,
1012,
2240,
1010,
2298,
4430,
13775,
1027,
1014,
1010,
13558,
3597,
16671,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
uber/deck.gl | modules/core/src/lifecycle/create-props.js | checkDeprecatedProps | function checkDeprecatedProps(layerName, propsInstance, deprecatedProps) {
if (!propsInstance) {
return;
}
for (const name in deprecatedProps) {
if (hasOwnProperty(propsInstance, name)) {
const nameStr = `${layerName || 'Layer'}: ${name}`;
for (const newPropName of deprecatedProps[name]) {
... | javascript | function checkDeprecatedProps(layerName, propsInstance, deprecatedProps) {
if (!propsInstance) {
return;
}
for (const name in deprecatedProps) {
if (hasOwnProperty(propsInstance, name)) {
const nameStr = `${layerName || 'Layer'}: ${name}`;
for (const newPropName of deprecatedProps[name]) {
... | [
"function",
"checkDeprecatedProps",
"(",
"layerName",
",",
"propsInstance",
",",
"deprecatedProps",
")",
"{",
"if",
"(",
"!",
"propsInstance",
")",
"{",
"return",
";",
"}",
"for",
"(",
"const",
"name",
"in",
"deprecatedProps",
")",
"{",
"if",
"(",
"hasOwnPro... | /* eslint-disable max-depth | [
"/",
"*",
"eslint",
"-",
"disable",
"max",
"-",
"depth"
] | a2010448b7f268bbd03617b812334c68a6b9e5b2 | https://github.com/uber/deck.gl/blob/a2010448b7f268bbd03617b812334c68a6b9e5b2/modules/core/src/lifecycle/create-props.js#L55-L73 | train | Check deprecated properties | [
30522,
3853,
4638,
3207,
28139,
12921,
21572,
4523,
1006,
6741,
18442,
1010,
24387,
7076,
26897,
1010,
2139,
28139,
12921,
21572,
4523,
1007,
1063,
2065,
1006,
999,
24387,
7076,
26897,
1007,
1063,
2709,
1025,
1065,
2005,
1006,
9530,
3367,
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... |
zeit/now-cli | src/util/is-zeit-world.js | isZeitWorld | function isZeitWorld(ns) {
if (!ns.length) {
return false;
}
return ns.every(host => host.endsWith('.zeit.world'));
} | javascript | function isZeitWorld(ns) {
if (!ns.length) {
return false;
}
return ns.every(host => host.endsWith('.zeit.world'));
} | [
"function",
"isZeitWorld",
"(",
"ns",
")",
"{",
"if",
"(",
"!",
"ns",
".",
"length",
")",
"{",
"return",
"false",
";",
"}",
"return",
"ns",
".",
"every",
"(",
"host",
"=>",
"host",
".",
"endsWith",
"(",
"'.zeit.world'",
")",
")",
";",
"}"
] | Given an array of nameservers (ie: as returned
by `resolveNs` from Node, assert that they're
zeit.world's. | [
"Given",
"an",
"array",
"of",
"nameservers",
"(",
"ie",
":",
"as",
"returned",
"by",
"resolveNs",
"from",
"Node",
"assert",
"that",
"they",
"re",
"zeit",
".",
"world",
"s",
"."
] | b53d907b745126113bc3e251ac2451088026a363 | https://github.com/zeit/now-cli/blob/b53d907b745126113bc3e251ac2451088026a363/src/util/is-zeit-world.js#L6-L11 | train | Check if the network is a zeit world | [
30522,
3853,
2003,
4371,
4183,
11108,
1006,
24978,
1007,
1063,
2065,
1006,
999,
24978,
1012,
3091,
1007,
1063,
2709,
6270,
1025,
1065,
2709,
24978,
1012,
2296,
1006,
3677,
1027,
1028,
3677,
1012,
4515,
24415,
1006,
1005,
1012,
27838,
4183,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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-core/src/bootstrap.js | getRoot | function getRoot() {
/**
* Return existing root if found.
*/
const existingRoot = document.getElementById(ROOT_ID);
if (existingRoot) {
return existingRoot;
}
/**
* If no existing root, create and return a new root.
*/
const newRoot = document.createElement('div');
... | javascript | function getRoot() {
/**
* Return existing root if found.
*/
const existingRoot = document.getElementById(ROOT_ID);
if (existingRoot) {
return existingRoot;
}
/**
* If no existing root, create and return a new root.
*/
const newRoot = document.createElement('div');
... | [
"function",
"getRoot",
"(",
")",
"{",
"/**\n * Return existing root if found.\n */",
"const",
"existingRoot",
"=",
"document",
".",
"getElementById",
"(",
"ROOT_ID",
")",
";",
"if",
"(",
"existingRoot",
")",
"{",
"return",
"existingRoot",
";",
"}",
"/**\n ... | Get DOM element where app will mount. | [
"Get",
"DOM",
"element",
"where",
"app",
"will",
"mount",
"."
] | 2488556590cbfdcefa626f2f2de01e7a160cf6ee | https://github.com/netlify/netlify-cms/blob/2488556590cbfdcefa626f2f2de01e7a160cf6ee/packages/netlify-cms-core/src/bootstrap.js#L33-L49 | train | Returns the root element | [
30522,
3853,
2131,
3217,
4140,
1006,
1007,
1063,
1013,
1008,
1008,
1008,
2709,
4493,
7117,
2065,
2179,
1012,
1008,
1013,
9530,
3367,
4493,
3217,
4140,
1027,
6254,
1012,
2131,
12260,
3672,
3762,
3593,
1006,
7117,
1035,
8909,
1007,
1025,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/utils/StringMatch.js | addMatch | function addMatch(match) {
// Pull off the character index
var c = match.index;
var newPoints = 0;
// A match means that we need to do some scoring bookkeeping.
// Start with points added for any match
if (DEBUG_SCORES) {
scoreDebu... | javascript | function addMatch(match) {
// Pull off the character index
var c = match.index;
var newPoints = 0;
// A match means that we need to do some scoring bookkeeping.
// Start with points added for any match
if (DEBUG_SCORES) {
scoreDebu... | [
"function",
"addMatch",
"(",
"match",
")",
"{",
"// Pull off the character index",
"var",
"c",
"=",
"match",
".",
"index",
";",
"var",
"newPoints",
"=",
"0",
";",
"// A match means that we need to do some scoring bookkeeping.",
"// Start with points added for any match",
"i... | Adds a matched character to the appropriate range | [
"Adds",
"a",
"matched",
"character",
"to",
"the",
"appropriate",
"range"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/StringMatch.js#L572-L668 | train | Add a match to the match table. | [
30522,
3853,
5587,
18900,
2818,
1006,
2674,
1007,
1063,
1013,
1013,
4139,
2125,
1996,
2839,
5950,
13075,
1039,
1027,
2674,
1012,
5950,
1025,
13075,
2047,
26521,
1027,
1014,
1025,
1013,
1013,
1037,
2674,
2965,
2008,
2057,
2342,
2000,
2079,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SeleniumHQ/selenium | javascript/selenium-core/scripts/htmlutils.js | function( force ) {
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
}
var r = parseFloat(jQuery.css(this.elem, this.prop, force));
return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
} | javascript | function( force ) {
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
}
var r = parseFloat(jQuery.css(this.elem, this.prop, force));
return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
} | [
"function",
"(",
"force",
")",
"{",
"if",
"(",
"this",
".",
"elem",
"[",
"this",
".",
"prop",
"]",
"!=",
"null",
"&&",
"(",
"!",
"this",
".",
"elem",
".",
"style",
"||",
"this",
".",
"elem",
".",
"style",
"[",
"this",
".",
"prop",
"]",
"==",
... | Get the current size | [
"Get",
"the",
"current",
"size"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L8182-L8189 | train | Get the current value of the property | [
30522,
3853,
1006,
2486,
1007,
1063,
2065,
1006,
2023,
1012,
3449,
6633,
1031,
2023,
1012,
17678,
1033,
999,
1027,
19701,
1004,
1004,
1006,
999,
2023,
1012,
3449,
6633,
1012,
2806,
1064,
1064,
2023,
1012,
3449,
6633,
1012,
2806,
1031,
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... | |
jgraph/mxgraph | javascript/mxClient.js | mxPartitionLayout | function mxPartitionLayout(graph, horizontal, spacing, border)
{
mxGraphLayout.call(this, graph);
this.horizontal = (horizontal != null) ? horizontal : true;
this.spacing = spacing || 0;
this.border = border || 0;
} | javascript | function mxPartitionLayout(graph, horizontal, spacing, border)
{
mxGraphLayout.call(this, graph);
this.horizontal = (horizontal != null) ? horizontal : true;
this.spacing = spacing || 0;
this.border = border || 0;
} | [
"function",
"mxPartitionLayout",
"(",
"graph",
",",
"horizontal",
",",
"spacing",
",",
"border",
")",
"{",
"mxGraphLayout",
".",
"call",
"(",
"this",
",",
"graph",
")",
";",
"this",
".",
"horizontal",
"=",
"(",
"horizontal",
"!=",
"null",
")",
"?",
"hori... | Copyright (c) 2006-2015, JGraph Ltd
Copyright (c) 2006-2015, Gaudenz Alder
Class: mxPartitionLayout
Extends <mxGraphLayout> for partitioning the parent cell vertically or
horizontally by filling the complete area with the child cells. A horizontal
layout partitions the height of the given parent whereas a a non-hori... | [
"Copyright",
"(",
"c",
")",
"2006",
"-",
"2015",
"JGraph",
"Ltd",
"Copyright",
"(",
"c",
")",
"2006",
"-",
"2015",
"Gaudenz",
"Alder",
"Class",
":",
"mxPartitionLayout"
] | 33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44 | https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L29803-L29809 | train | A partition layout that is used to layout a graph. | [
30522,
3853,
25630,
19362,
3775,
3508,
8485,
5833,
1006,
10629,
1010,
9876,
1010,
12403,
6129,
1010,
3675,
1007,
1063,
30524,
1006,
2023,
1010,
10629,
1007,
1025,
2023,
1012,
9876,
1027,
1006,
9876,
999,
1027,
19701,
1007,
1029,
9876,
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... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | templateAlias | function templateAlias(oElement, oWithControl) {
var sName = oElement.getAttribute("name"),
oNewValue,
oOldValue,
sValue = oElement.getAttribute("value");
if (sName && sName[0] === ".") {
sName = sName.slice(1);
}
if (!sName || sName.includes(".")) {
error("Missing proper relat... | javascript | function templateAlias(oElement, oWithControl) {
var sName = oElement.getAttribute("name"),
oNewValue,
oOldValue,
sValue = oElement.getAttribute("value");
if (sName && sName[0] === ".") {
sName = sName.slice(1);
}
if (!sName || sName.includes(".")) {
error("Missing proper relat... | [
"function",
"templateAlias",
"(",
"oElement",
",",
"oWithControl",
")",
"{",
"var",
"sName",
"=",
"oElement",
".",
"getAttribute",
"(",
"\"name\"",
")",
",",
"oNewValue",
",",
"oOldValue",
",",
"sValue",
"=",
"oElement",
".",
"getAttribute",
"(",
"\"value\"",
... | Processes a <template:alias> instruction.
@param {Element} oElement
the <template:alias> XML DOM element
@param {sap.ui.core.util._with} oWithControl
the "with" control
@returns {sap.ui.base.SyncPromise}
A sync promise which resolves with <code>undefined</code> as soon as the
<template:alias> instruction has been full... | [
"Processes",
"a",
"<template",
":",
"alias",
">",
"instruction",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1380-L1405 | train | Creates an alias for the given element. | [
30522,
3853,
23561,
22786,
2015,
1006,
1051,
12260,
3672,
1010,
27593,
8939,
8663,
13181,
2140,
1007,
1063,
13075,
1055,
18442,
1027,
1051,
12260,
3672,
1012,
2131,
19321,
3089,
8569,
2618,
1006,
1000,
2171,
1000,
1007,
1010,
2028,
2860,
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.table/src/sap/ui/table/TableColumnUtils.js | function(oTable, sColumnId, iLevel) {
var oColumnMapItem = TableColumnUtils.getColumnMapItem(oTable, sColumnId);
if (!oColumnMapItem) {
return undefined;
}
var aParents = [];
for (var i = 0; i < oColumnMapItem.parents.length; i++) {
var oParent = oColumnMapItem.parents[i];
if (iLevel === und... | javascript | function(oTable, sColumnId, iLevel) {
var oColumnMapItem = TableColumnUtils.getColumnMapItem(oTable, sColumnId);
if (!oColumnMapItem) {
return undefined;
}
var aParents = [];
for (var i = 0; i < oColumnMapItem.parents.length; i++) {
var oParent = oColumnMapItem.parents[i];
if (iLevel === und... | [
"function",
"(",
"oTable",
",",
"sColumnId",
",",
"iLevel",
")",
"{",
"var",
"oColumnMapItem",
"=",
"TableColumnUtils",
".",
"getColumnMapItem",
"(",
"oTable",
",",
"sColumnId",
")",
";",
"if",
"(",
"!",
"oColumnMapItem",
")",
"{",
"return",
"undefined",
";"... | Returns an array of the column information about all columns which span the column identified by sColumnId.
If there is no "parent", it returns undefined.
@param {sap.ui.table.Table} oTable Instance of the table.
@param {string} sColumnId ID of the column for which the Span-parent shall be found.
@param {int} [iLevel]... | [
"Returns",
"an",
"array",
"of",
"the",
"column",
"information",
"about",
"all",
"columns",
"which",
"span",
"the",
"column",
"identified",
"by",
"sColumnId",
".",
"If",
"there",
"is",
"no",
"parent",
"it",
"returns",
"undefined",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableColumnUtils.js#L183-L198 | train | Returns an array of the parents of the column with the given id. | [
30522,
3853,
1006,
27178,
3085,
1010,
8040,
4747,
2819,
3490,
2094,
1010,
17869,
15985,
1007,
1063,
13075,
1051,
25778,
2819,
2078,
2863,
23270,
6633,
1027,
2795,
25778,
2819,
24072,
12146,
1012,
2131,
25778,
2819,
2078,
2863,
23270,
6633,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
postmanlabs/newman | npm/server.js | createRedirectServer | function createRedirectServer () {
var server;
server = http.createServer(function (req, res) {
var hops,
data = '';
// path: /{n}
if ((/^\/\d+$/).test(req.url)) {
hops = parseInt(req.url.substring(1), 10) - 1;
// redirect until all hops are covered... | javascript | function createRedirectServer () {
var server;
server = http.createServer(function (req, res) {
var hops,
data = '';
// path: /{n}
if ((/^\/\d+$/).test(req.url)) {
hops = parseInt(req.url.substring(1), 10) - 1;
// redirect until all hops are covered... | [
"function",
"createRedirectServer",
"(",
")",
"{",
"var",
"server",
";",
"server",
"=",
"http",
".",
"createServer",
"(",
"function",
"(",
"req",
",",
"res",
")",
"{",
"var",
"hops",
",",
"data",
"=",
"''",
";",
"// path: /{n}",
"if",
"(",
"(",
"/",
... | Redirect + Echo Server
- Follows specified redirects -> /<redirects-count>
- Redirects with specified response code -> /status/<response-code>
- Echos final request URL, Method, Headers and Body
@example
var s = createRedirectServer();
s.listen(3000, function() {
console.log(s.port);
s.close();
}); | [
"Redirect",
"+",
"Echo",
"Server",
"-",
"Follows",
"specified",
"redirects",
"-",
">",
"/",
"<redirects",
"-",
"count",
">",
"-",
"Redirects",
"with",
"specified",
"response",
"code",
"-",
">",
"/",
"status",
"/",
"<response",
"-",
"code",
">",
"-",
"Ech... | c05a5a1e82aa3c2021e94ba09e627ba4718af69e | https://github.com/postmanlabs/newman/blob/c05a5a1e82aa3c2021e94ba09e627ba4718af69e/npm/server.js#L76-L121 | train | Create a server that redirects to the specified URL | [
30522,
3853,
3443,
5596,
7442,
16649,
2121,
6299,
1006,
1007,
1063,
13075,
8241,
1025,
8241,
1027,
8299,
1012,
9005,
2121,
6299,
1006,
3853,
1006,
2128,
4160,
1010,
24501,
1007,
1063,
13075,
6154,
2015,
1010,
2951,
1027,
1005,
1005,
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/thirdparty/less.js | function (env, op, other) {
/*jshint noempty:false */
var value = tree.operate(env, op, this.value, other.value),
unit = this.unit.clone();
if (op === '+' || op === '-') {
if (unit.numerator.length === 0 && unit.denominator.length === 0) {
unit.numerator ... | javascript | function (env, op, other) {
/*jshint noempty:false */
var value = tree.operate(env, op, this.value, other.value),
unit = this.unit.clone();
if (op === '+' || op === '-') {
if (unit.numerator.length === 0 && unit.denominator.length === 0) {
unit.numerator ... | [
"function",
"(",
"env",
",",
"op",
",",
"other",
")",
"{",
"/*jshint noempty:false */",
"var",
"value",
"=",
"tree",
".",
"operate",
"(",
"env",
",",
"op",
",",
"this",
".",
"value",
",",
"other",
".",
"value",
")",
",",
"unit",
"=",
"this",
".",
"... | In an operation between two Dimensions, we default to the first Dimension's unit, so `1px + 2` will yield `3px`. | [
"In",
"an",
"operation",
"between",
"two",
"Dimensions",
"we",
"default",
"to",
"the",
"first",
"Dimension",
"s",
"unit",
"so",
"1px",
"+",
"2",
"will",
"yield",
"3px",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/less.js#L3480-L3511 | train | returns the result of the operation | [
30522,
3853,
1006,
4372,
2615,
1010,
6728,
1010,
2060,
1007,
1063,
1013,
1008,
1046,
17426,
2102,
2053,
6633,
13876,
2100,
1024,
6270,
1008,
1013,
13075,
3643,
1027,
3392,
1012,
5452,
1006,
4372,
2615,
1010,
6728,
1010,
2023,
1012,
3643,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/extensibility/ExtensionManager.js | getAvailableUpdates | function getAvailableUpdates() {
var result = [];
Object.keys(extensions).forEach(function (extensionId) {
var extensionInfo = extensions[extensionId];
// skip extensions that are not installed or are not in the registry
if (!extensionInfo.installInfo || !extensionInf... | javascript | function getAvailableUpdates() {
var result = [];
Object.keys(extensions).forEach(function (extensionId) {
var extensionInfo = extensions[extensionId];
// skip extensions that are not installed or are not in the registry
if (!extensionInfo.installInfo || !extensionInf... | [
"function",
"getAvailableUpdates",
"(",
")",
"{",
"var",
"result",
"=",
"[",
"]",
";",
"Object",
".",
"keys",
"(",
"extensions",
")",
".",
"forEach",
"(",
"function",
"(",
"extensionId",
")",
"{",
"var",
"extensionInfo",
"=",
"extensions",
"[",
"extensionI... | Gets an array of extensions that are currently installed and can be updated to a new version
@return {Array.<{id: string, installVersion: string, registryVersion: string}>}
where id = extensionId
installVersion = currently installed version of extension
registryVersion = latest version compatible with current Brackets | [
"Gets",
"an",
"array",
"of",
"extensions",
"that",
"are",
"currently",
"installed",
"and",
"can",
"be",
"updated",
"to",
"a",
"new",
"version"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/ExtensionManager.js#L693-L710 | train | get available updates | [
30522,
3853,
2131,
12462,
11733,
3468,
6279,
27122,
1006,
1007,
1063,
13075,
2765,
1027,
1031,
1033,
1025,
4874,
1012,
6309,
1006,
14305,
1007,
1012,
18921,
6776,
1006,
3853,
1006,
5331,
3593,
1007,
1063,
13075,
5331,
2378,
14876,
1027,
143... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
nhn/tui.editor | src/js/extensions/chart/chart.js | parseURL2ChartData | function parseURL2ChartData(url, callback) {
const success = code => {
const chartData = parseDSV2ChartData(code);
callback(chartData);
};
const fail = () => callback(null);
$.get(url).done(success).fail(fail);
} | javascript | function parseURL2ChartData(url, callback) {
const success = code => {
const chartData = parseDSV2ChartData(code);
callback(chartData);
};
const fail = () => callback(null);
$.get(url).done(success).fail(fail);
} | [
"function",
"parseURL2ChartData",
"(",
"url",
",",
"callback",
")",
"{",
"const",
"success",
"=",
"code",
"=>",
"{",
"const",
"chartData",
"=",
"parseDSV2ChartData",
"(",
"code",
")",
";",
"callback",
"(",
"chartData",
")",
";",
"}",
";",
"const",
"fail",
... | parse code from url
@param {string} url - remote csv/tsv file url
@param {Function} callback - callback function
@ignore | [
"parse",
"code",
"from",
"url"
] | e75ab08c2a7ab07d1143e318f7cde135c5e3002e | https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/chart/chart.js#L224-L233 | train | Parse a chart from a url | [
30522,
3853,
11968,
3366,
3126,
2140,
2475,
7507,
5339,
2850,
2696,
1006,
24471,
2140,
1010,
2655,
5963,
1007,
1063,
9530,
3367,
3112,
1027,
3642,
1027,
1028,
1063,
9530,
3367,
3673,
2850,
2696,
1027,
11968,
6924,
2015,
2615,
2475,
7507,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ColorlibHQ/AdminLTE | plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js | function(options) {
var nextNode = node.nextSibling,
types = (options && options.nodeTypes) ? options.nodeTypes : defaultNodeTypes;
if (!nextNode) {
return null;
}
if (
(!wysihtml5.lang.array(types).contains(nextNode.nodeType)) || // nodeTypes ch... | javascript | function(options) {
var nextNode = node.nextSibling,
types = (options && options.nodeTypes) ? options.nodeTypes : defaultNodeTypes;
if (!nextNode) {
return null;
}
if (
(!wysihtml5.lang.array(types).contains(nextNode.nodeType)) || // nodeTypes ch... | [
"function",
"(",
"options",
")",
"{",
"var",
"nextNode",
"=",
"node",
".",
"nextSibling",
",",
"types",
"=",
"(",
"options",
"&&",
"options",
".",
"nodeTypes",
")",
"?",
"options",
".",
"nodeTypes",
":",
"defaultNodeTypes",
";",
"if",
"(",
"!",
"nextNode... | var node = wysihtml5.dom.domNode(element).next({nodeTypes: [1,3], ignoreBlankTexts: true}); | [
"var",
"node",
"=",
"wysihtml5",
".",
"dom",
".",
"domNode",
"(",
"element",
")",
".",
"next",
"(",
"{",
"nodeTypes",
":",
"[",
"1",
"3",
"]",
"ignoreBlankTexts",
":",
"true",
"}",
")",
";"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L5356-L5372 | train | Returns the next sibling of node | [
30522,
3853,
1006,
7047,
1007,
1063,
13075,
2279,
3630,
3207,
1027,
13045,
1012,
2279,
5332,
9709,
1010,
4127,
1027,
1006,
7047,
1004,
1004,
7047,
1012,
13045,
13874,
2015,
1007,
1029,
7047,
1012,
13045,
13874,
2015,
1024,
12398,
3630,
3207... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
ColorlibHQ/AdminLTE | bower_components/ion.rangeSlider/js/ion.rangeSlider.js | function (e) {
if (!this.dragging) {
return;
}
var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
this.coords.x_pointer = x - this.coords.x_gap;
this.calc();
} | javascript | function (e) {
if (!this.dragging) {
return;
}
var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
this.coords.x_pointer = x - this.coords.x_gap;
this.calc();
} | [
"function",
"(",
"e",
")",
"{",
"if",
"(",
"!",
"this",
".",
"dragging",
")",
"{",
"return",
";",
"}",
"var",
"x",
"=",
"e",
".",
"pageX",
"||",
"e",
".",
"originalEvent",
".",
"touches",
"&&",
"e",
".",
"originalEvent",
".",
"touches",
"[",
"0",... | Mousemove or touchmove
only for handlers
@param e {Object} event object | [
"Mousemove",
"or",
"touchmove",
"only",
"for",
"handlers"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/bower_components/ion.rangeSlider/js/ion.rangeSlider.js#L766-L775 | train | ontouchstart event | [
30522,
3853,
1006,
1041,
1007,
1063,
2065,
1006,
999,
2023,
1012,
11920,
1007,
1063,
2709,
1025,
1065,
13075,
1060,
1027,
1041,
1012,
3931,
2595,
1064,
1064,
1041,
1012,
2434,
18697,
3372,
1012,
12817,
1004,
1004,
1041,
1012,
2434,
18697,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/function-paren-newline.js | shouldHaveNewlines | function shouldHaveNewlines(elements, hasLeftNewline) {
if (multilineArgumentsOption && elements.length === 1) {
return hasLeftNewline;
}
if (multilineOption || multilineArgumentsOption) {
return elements.some((element, index) => index !== elements.len... | javascript | function shouldHaveNewlines(elements, hasLeftNewline) {
if (multilineArgumentsOption && elements.length === 1) {
return hasLeftNewline;
}
if (multilineOption || multilineArgumentsOption) {
return elements.some((element, index) => index !== elements.len... | [
"function",
"shouldHaveNewlines",
"(",
"elements",
",",
"hasLeftNewline",
")",
"{",
"if",
"(",
"multilineArgumentsOption",
"&&",
"elements",
".",
"length",
"===",
"1",
")",
"{",
"return",
"hasLeftNewline",
";",
"}",
"if",
"(",
"multilineOption",
"||",
"multiline... | ---------------------------------------------------------------------- Helpers ----------------------------------------------------------------------
Determines whether there should be newlines inside function parens
@param {ASTNode[]} elements The arguments or parameters in the list
@param {boolean} hasLeftNewline `t... | [
"----------------------------------------------------------------------",
"Helpers",
"----------------------------------------------------------------------",
"Determines",
"whether",
"there",
"should",
"be",
"newlines",
"inside",
"function",
"parens"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/function-paren-newline.js#L87-L98 | train | returns true if there are any new lines | [
30522,
3853,
2323,
14650,
7974,
12735,
1006,
3787,
1010,
2038,
2571,
6199,
2638,
13668,
3170,
1007,
1063,
2065,
1006,
4800,
4179,
2906,
22850,
11187,
7361,
3508,
1004,
1004,
3787,
1012,
3091,
1027,
1027,
1027,
1015,
1007,
1063,
2709,
2038,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/mobiscroll/js/mobiscroll-scroller.js | setVal | function setVal(fill, change, time, noscroll, temp, manual) {
if (visible && !noscroll) {
scrollToPos(time, undefined, manual);
}
v = s.formatResult(that.temp);
if (!temp) {
that.values = that.temp.slice(0);
that.val = v;
... | javascript | function setVal(fill, change, time, noscroll, temp, manual) {
if (visible && !noscroll) {
scrollToPos(time, undefined, manual);
}
v = s.formatResult(that.temp);
if (!temp) {
that.values = that.temp.slice(0);
that.val = v;
... | [
"function",
"setVal",
"(",
"fill",
",",
"change",
",",
"time",
",",
"noscroll",
",",
"temp",
",",
"manual",
")",
"{",
"if",
"(",
"visible",
"&&",
"!",
"noscroll",
")",
"{",
"scrollToPos",
"(",
"time",
",",
"undefined",
",",
"manual",
")",
";",
"}",
... | ##### END: MODIFIED BY SAP | [
"#####",
"END",
":",
"MODIFIED",
"BY",
"SAP"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/mobiscroll/js/mobiscroll-scroller.js#L469-L492 | train | set val | [
30522,
3853,
2275,
10175,
1006,
6039,
1010,
2689,
1010,
2051,
1010,
16839,
26775,
14511,
1010,
8915,
8737,
1010,
6410,
1007,
1063,
2065,
1006,
5710,
1004,
1004,
999,
16839,
26775,
14511,
1007,
1063,
17186,
14399,
2891,
1006,
2051,
1010,
305... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/key-spacing.js | verifyGroupAlignment | function verifyGroupAlignment(properties) {
const length = properties.length,
widths = properties.map(getKeyWidth), // Width of keys, including quotes
align = alignmentOptions.on; // "value" or "colon"
let targetWidth = Math.max(...widths),
beforeC... | javascript | function verifyGroupAlignment(properties) {
const length = properties.length,
widths = properties.map(getKeyWidth), // Width of keys, including quotes
align = alignmentOptions.on; // "value" or "colon"
let targetWidth = Math.max(...widths),
beforeC... | [
"function",
"verifyGroupAlignment",
"(",
"properties",
")",
"{",
"const",
"length",
"=",
"properties",
".",
"length",
",",
"widths",
"=",
"properties",
".",
"map",
"(",
"getKeyWidth",
")",
",",
"// Width of keys, including quotes",
"align",
"=",
"alignmentOptions",
... | Verifies correct vertical alignment of a group of properties.
@param {ASTNode[]} properties List of Property AST nodes.
@returns {void} | [
"Verifies",
"correct",
"vertical",
"alignment",
"of",
"a",
"group",
"of",
"properties",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/key-spacing.js#L548-L584 | train | Verifies that a group has at least one key - value pair. | [
30522,
3853,
20410,
17058,
11475,
16206,
3672,
1006,
5144,
1007,
1063,
9530,
3367,
3091,
1027,
5144,
1012,
3091,
1010,
9381,
2015,
1027,
5144,
1012,
4949,
1006,
2131,
14839,
9148,
11927,
2232,
1007,
1010,
1013,
1013,
9381,
1997,
6309,
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... |
adobe/brackets | src/document/DocumentManager.js | getNextPrevFile | function getNextPrevFile(inc) {
DeprecationWarning.deprecationWarning("Use MainViewManager.traverseToNextViewByMRU() instead of DocumentManager.getNextPrevFile()", true);
var result = MainViewManager.traverseToNextViewByMRU(inc);
if (result) {
return result.file;
}
re... | javascript | function getNextPrevFile(inc) {
DeprecationWarning.deprecationWarning("Use MainViewManager.traverseToNextViewByMRU() instead of DocumentManager.getNextPrevFile()", true);
var result = MainViewManager.traverseToNextViewByMRU(inc);
if (result) {
return result.file;
}
re... | [
"function",
"getNextPrevFile",
"(",
"inc",
")",
"{",
"DeprecationWarning",
".",
"deprecationWarning",
"(",
"\"Use MainViewManager.traverseToNextViewByMRU() instead of DocumentManager.getNextPrevFile()\"",
",",
"true",
")",
";",
"var",
"result",
"=",
"MainViewManager",
".",
"t... | Get the next or previous file in the working set, in MRU order (relative to currentDocument). May
return currentDocument itself if working set is length 1.
@deprecated use MainViewManager.traverseToNextViewByMRU() instead | [
"Get",
"the",
"next",
"or",
"previous",
"file",
"in",
"the",
"working",
"set",
"in",
"MRU",
"order",
"(",
"relative",
"to",
"currentDocument",
")",
".",
"May",
"return",
"currentDocument",
"itself",
"if",
"working",
"set",
"is",
"length",
"1",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/document/DocumentManager.js#L286-L293 | train | Get the next file in the list of views | [
30522,
3853,
2131,
2638,
30524,
5582,
1006,
1000,
2224,
2364,
8584,
24805,
4590,
1012,
20811,
5524,
18413,
8584,
3762,
2213,
6820,
1006,
1007,
2612,
1997,
6254,
24805,
4590,
1012,
2131,
2638,
18413,
28139,
2615,
8873,
2571,
1006,
1007,
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... |
ecomfe/zrender | src/Element.js | function (zr) {
this.__zr = null;
// 移除动画
var animators = this.animators;
if (animators) {
for (var i = 0; i < animators.length; i++) {
zr.animation.removeAnimator(animators[i]);
}
}
if (this.clipPath) {
this.clipPath.r... | javascript | function (zr) {
this.__zr = null;
// 移除动画
var animators = this.animators;
if (animators) {
for (var i = 0; i < animators.length; i++) {
zr.animation.removeAnimator(animators[i]);
}
}
if (this.clipPath) {
this.clipPath.r... | [
"function",
"(",
"zr",
")",
"{",
"this",
".",
"__zr",
"=",
"null",
";",
"// 移除动画",
"var",
"animators",
"=",
"this",
".",
"animators",
";",
"if",
"(",
"animators",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"animators",
".",
"lengt... | Remove self from zrender instance.
Not recursively because it will be invoked when element added to storage.
@param {module:zrender/ZRender} zr | [
"Remove",
"self",
"from",
"zrender",
"instance",
".",
"Not",
"recursively",
"because",
"it",
"will",
"be",
"invoked",
"when",
"element",
"added",
"to",
"storage",
"."
] | 30321b57cba3149c30eacb0c1e18276f0f001b9f | https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/Element.js#L242-L255 | train | remove self from zr | [
30522,
3853,
1006,
1062,
2099,
1007,
1063,
2023,
1012,
1035,
1035,
1062,
2099,
1027,
19701,
1025,
1013,
1013,
100,
100,
100,
100,
13075,
25132,
2015,
1027,
2023,
1012,
25132,
2015,
1025,
2065,
1006,
25132,
2015,
1007,
1063,
2005,
1006,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
tensorflow/tfjs-models | posenet/demos/coco.js | drawMultiplePosesResults | function drawMultiplePosesResults(poses) {
const canvas = multiPersonCanvas();
drawResults(
canvas, poses, guiState.multiPoseDetection.minPartConfidence,
guiState.multiPoseDetection.minPoseConfidence);
const {part, showHeatmap, showOffsets, showDisplacements} =
guiState.visualizeOutputs;
cons... | javascript | function drawMultiplePosesResults(poses) {
const canvas = multiPersonCanvas();
drawResults(
canvas, poses, guiState.multiPoseDetection.minPartConfidence,
guiState.multiPoseDetection.minPoseConfidence);
const {part, showHeatmap, showOffsets, showDisplacements} =
guiState.visualizeOutputs;
cons... | [
"function",
"drawMultiplePosesResults",
"(",
"poses",
")",
"{",
"const",
"canvas",
"=",
"multiPersonCanvas",
"(",
")",
";",
"drawResults",
"(",
"canvas",
",",
"poses",
",",
"guiState",
".",
"multiPoseDetection",
".",
"minPartConfidence",
",",
"guiState",
".",
"m... | Draw the results from the multi-pose estimation on to a canvas | [
"Draw",
"the",
"results",
"from",
"the",
"multi",
"-",
"pose",
"estimation",
"on",
"to",
"a",
"canvas"
] | af194797c90cc5bcac1060d3cd41b0258a34c7dc | https://github.com/tensorflow/tfjs-models/blob/af194797c90cc5bcac1060d3cd41b0258a34c7dc/posenet/demos/coco.js#L134-L147 | train | Draws the results of a multi - pose detection on the canvas | [
30522,
3853,
4009,
12274,
7096,
11514,
2571,
20688,
21338,
2229,
11314,
2015,
1006,
22382,
1007,
1063,
9530,
3367,
10683,
1027,
4800,
27576,
9336,
12044,
1006,
1007,
1025,
4009,
6072,
11314,
2015,
1006,
10683,
1010,
22382,
1010,
26458,
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... |
adobe/brackets | src/project/WorkingSetSort.js | get | function get(command) {
var commandID;
if (!command) {
console.error("Attempting to get a Sort method with a missing required parameter: command");
return;
}
if (typeof command === "string") {
commandID = command;
} else {
commandI... | javascript | function get(command) {
var commandID;
if (!command) {
console.error("Attempting to get a Sort method with a missing required parameter: command");
return;
}
if (typeof command === "string") {
commandID = command;
} else {
commandI... | [
"function",
"get",
"(",
"command",
")",
"{",
"var",
"commandID",
";",
"if",
"(",
"!",
"command",
")",
"{",
"console",
".",
"error",
"(",
"\"Attempting to get a Sort method with a missing required parameter: command\"",
")",
";",
"return",
";",
"}",
"if",
"(",
"t... | Retrieves a Sort object by id
@param {(string|Command)} command A command ID or a command object.
@return {?Sort} | [
"Retrieves",
"a",
"Sort",
"object",
"by",
"id"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/WorkingSetSort.js#L98-L111 | train | Get a Sort method from the cache | [
30522,
3853,
2131,
1006,
3094,
1007,
1063,
13075,
3094,
3593,
1025,
2065,
1006,
999,
3094,
1007,
1063,
10122,
1012,
7561,
1006,
1000,
7161,
2000,
2131,
1037,
4066,
4118,
2007,
1037,
4394,
3223,
16381,
1024,
3094,
1000,
1007,
30524,
3094,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular/material | src/core/util/animation/animate.js | finished | function finished(ev) {
if (ev && ev.target !== element[0]) return;
if (ev) $timeout.cancel(timer);
element.off($mdConstant.CSS.TRANSITIONEND, finished);
// Never reject since ngAnimate may cause timeouts due missed transitionEnd events
resolve();
} | javascript | function finished(ev) {
if (ev && ev.target !== element[0]) return;
if (ev) $timeout.cancel(timer);
element.off($mdConstant.CSS.TRANSITIONEND, finished);
// Never reject since ngAnimate may cause timeouts due missed transitionEnd events
resolve();
} | [
"function",
"finished",
"(",
"ev",
")",
"{",
"if",
"(",
"ev",
"&&",
"ev",
".",
"target",
"!==",
"element",
"[",
"0",
"]",
")",
"return",
";",
"if",
"(",
"ev",
")",
"$timeout",
".",
"cancel",
"(",
"timer",
")",
";",
"element",
".",
"off",
"(",
"... | Upon timeout or transitionEnd, reject or resolve (respectively) this promise.
NOTE: Make sure this transitionEnd didn't bubble up from a child | [
"Upon",
"timeout",
"or",
"transitionEnd",
"reject",
"or",
"resolve",
"(",
"respectively",
")",
"this",
"promise",
".",
"NOTE",
":",
"Make",
"sure",
"this",
"transitionEnd",
"didn",
"t",
"bubble",
"up",
"from",
"a",
"child"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/animation/animate.js#L75-L84 | train | Called when the transition is finished | [
30522,
3853,
2736,
1006,
23408,
1007,
1063,
2065,
1006,
23408,
1004,
1004,
23408,
1012,
4539,
999,
1027,
1027,
5783,
1031,
1014,
1033,
1007,
2709,
1025,
2065,
1006,
23408,
1007,
1002,
2051,
5833,
1012,
17542,
1006,
25309,
1007,
1025,
5783,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jgraph/mxgraph | javascript/mxClient.js | mxLine | function mxLine(bounds, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
} | javascript | function mxLine(bounds, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
} | [
"function",
"mxLine",
"(",
"bounds",
",",
"stroke",
",",
"strokewidth",
")",
"{",
"mxShape",
".",
"call",
"(",
"this",
")",
";",
"this",
".",
"bounds",
"=",
"bounds",
";",
"this",
".",
"stroke",
"=",
"stroke",
";",
"this",
".",
"strokewidth",
"=",
"(... | Copyright (c) 2006-2015, JGraph Ltd
Copyright (c) 2006-2015, Gaudenz Alder
Class: mxLine
Extends <mxShape> to implement a horizontal line shape.
This shape is registered under <mxConstants.SHAPE_LINE> in
<mxCellRenderer>.
Constructor: mxLine
Constructs a new line shape.
Parameters:
bounds - <mxRectangle> that de... | [
"Copyright",
"(",
"c",
")",
"2006",
"-",
"2015",
"JGraph",
"Ltd",
"Copyright",
"(",
"c",
")",
"2006",
"-",
"2015",
"Gaudenz",
"Alder",
"Class",
":",
"mxLine"
] | 33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44 | https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L27402-L27408 | train | A line is a wrapper around the mxShape | [
30522,
3853,
25630,
4179,
1006,
19202,
1010,
6909,
1010,
6909,
9148,
11927,
2232,
1007,
1063,
25630,
7377,
5051,
1012,
2655,
1006,
2023,
1007,
1025,
2023,
1012,
19202,
1027,
19202,
1025,
2023,
1012,
6909,
1027,
6909,
1025,
2023,
1012,
6909,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/player.js | function(angle) {
this.dir = (this.dir + angle + circle) % circle;
// Calculate the rotation vector and update the orientation of the listener.
var x = Math.cos(this.dir);
var y = 0;
var z = Math.sin(this.dir);
Howler.orientation(x, y, z, 0, 1, 0);
} | javascript | function(angle) {
this.dir = (this.dir + angle + circle) % circle;
// Calculate the rotation vector and update the orientation of the listener.
var x = Math.cos(this.dir);
var y = 0;
var z = Math.sin(this.dir);
Howler.orientation(x, y, z, 0, 1, 0);
} | [
"function",
"(",
"angle",
")",
"{",
"this",
".",
"dir",
"=",
"(",
"this",
".",
"dir",
"+",
"angle",
"+",
"circle",
")",
"%",
"circle",
";",
"// Calculate the rotation vector and update the orientation of the listener.",
"var",
"x",
"=",
"Math",
".",
"cos",
"("... | Rotate the player's viewing direction.
@param {Number} angle Angle to rotate by. | [
"Rotate",
"the",
"player",
"s",
"viewing",
"direction",
"."
] | 030db918dd8ce640afd57e172418472497e8f113 | https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/player.js#L39-L47 | train | Update the rotation vector of the listener. | [
30522,
3853,
1006,
6466,
1007,
1063,
2023,
1012,
16101,
1027,
1006,
2023,
1012,
16101,
1009,
6466,
1009,
4418,
1007,
1003,
4418,
1025,
1013,
1013,
18422,
1996,
9963,
9207,
1998,
10651,
1996,
10296,
1997,
1996,
19373,
1012,
13075,
1060,
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... | |
getsentry/sentry-javascript | packages/browser/src/loader.js | function(content) {
// content.e = error
// content.p = promise rejection
// content.f = function call the Sentry
if (
(content.e ||
content.p ||
(content.f && content.f.indexOf('capture') > -1) ||
(content.f && content.f.indexOf('showReportDialog') > -1)) &&
lazy
... | javascript | function(content) {
// content.e = error
// content.p = promise rejection
// content.f = function call the Sentry
if (
(content.e ||
content.p ||
(content.f && content.f.indexOf('capture') > -1) ||
(content.f && content.f.indexOf('showReportDialog') > -1)) &&
lazy
... | [
"function",
"(",
"content",
")",
"{",
"// content.e = error",
"// content.p = promise rejection",
"// content.f = function call the Sentry",
"if",
"(",
"(",
"content",
".",
"e",
"||",
"content",
".",
"p",
"||",
"(",
"content",
".",
"f",
"&&",
"content",
".",
"f",
... | Create a namespace and attach function that will store captured exception Because functions are also objects, we can attach the queue itself straight to it and save some bytes | [
"Create",
"a",
"namespace",
"and",
"attach",
"function",
"that",
"will",
"store",
"captured",
"exception",
"Because",
"functions",
"are",
"also",
"objects",
"we",
"can",
"attach",
"the",
"queue",
"itself",
"straight",
"to",
"it",
"and",
"save",
"some",
"bytes"... | a872223343fecf7364473b78bede937f1eb57bd0 | https://github.com/getsentry/sentry-javascript/blob/a872223343fecf7364473b78bede937f1eb57bd0/packages/browser/src/loader.js#L29-L46 | train | Add the content to the data queue | [
30522,
3853,
1006,
4180,
1007,
1063,
1013,
1013,
4180,
1012,
1041,
1027,
7561,
1013,
1013,
4180,
1012,
1052,
1027,
4872,
13893,
1013,
1013,
4180,
1012,
1042,
1027,
3853,
2655,
1996,
2741,
2854,
2065,
1006,
1006,
4180,
1012,
1041,
1064,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SheetJS/js-xlsx | xlsx.js | parse_BIFF2STR | function parse_BIFF2STR(blob, length, opts) {
var cell = parse_XLSCell(blob, 6);
++blob.l;
var str = parse_XLUnicodeString2(blob, length-7, opts);
cell.t = 'str';
cell.val = str;
return cell;
} | javascript | function parse_BIFF2STR(blob, length, opts) {
var cell = parse_XLSCell(blob, 6);
++blob.l;
var str = parse_XLUnicodeString2(blob, length-7, opts);
cell.t = 'str';
cell.val = str;
return cell;
} | [
"function",
"parse_BIFF2STR",
"(",
"blob",
",",
"length",
",",
"opts",
")",
"{",
"var",
"cell",
"=",
"parse_XLSCell",
"(",
"blob",
",",
"6",
")",
";",
"++",
"blob",
".",
"l",
";",
"var",
"str",
"=",
"parse_XLUnicodeString2",
"(",
"blob",
",",
"length",... | /* BIFF2_??? where ??? is the name from [XLS] | [
"/",
"*",
"BIFF2_???",
"where",
"???",
"is",
"the",
"name",
"from",
"[",
"XLS",
"]"
] | 9a6d8a1d3d80c78dad5201fb389316f935279cdc | https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L6561-L6568 | train | BIFF2 STR | [
30522,
3853,
11968,
3366,
1035,
12170,
4246,
2475,
3367,
2099,
1006,
1038,
4135,
2497,
1010,
3091,
1010,
23569,
2015,
1007,
1063,
13075,
3526,
1027,
11968,
3366,
1035,
28712,
11020,
5349,
1006,
1038,
4135,
2497,
1010,
1020,
1007,
1025,
1009... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/editor/EditorStatusBar.js | _updateIndentType | function _updateIndentType(fullPath) {
var indentWithTabs = Editor.getUseTabChar(fullPath);
$indentType.text(indentWithTabs ? Strings.STATUSBAR_TAB_SIZE : Strings.STATUSBAR_SPACES);
$indentType.attr("title", indentWithTabs ? Strings.STATUSBAR_INDENT_TOOLTIP_SPACES : Strings.STATUSBAR_INDENT_TOOL... | javascript | function _updateIndentType(fullPath) {
var indentWithTabs = Editor.getUseTabChar(fullPath);
$indentType.text(indentWithTabs ? Strings.STATUSBAR_TAB_SIZE : Strings.STATUSBAR_SPACES);
$indentType.attr("title", indentWithTabs ? Strings.STATUSBAR_INDENT_TOOLTIP_SPACES : Strings.STATUSBAR_INDENT_TOOL... | [
"function",
"_updateIndentType",
"(",
"fullPath",
")",
"{",
"var",
"indentWithTabs",
"=",
"Editor",
".",
"getUseTabChar",
"(",
"fullPath",
")",
";",
"$indentType",
".",
"text",
"(",
"indentWithTabs",
"?",
"Strings",
".",
"STATUSBAR_TAB_SIZE",
":",
"Strings",
"."... | Update indent type and size
@param {string} fullPath Path to file in current editor | [
"Update",
"indent",
"type",
"and",
"size"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/EditorStatusBar.js#L123-L128 | train | Update indent type and width label | [
30522,
3853,
1035,
10651,
22254,
4765,
13874,
1006,
2440,
15069,
1007,
1063,
13075,
27427,
4765,
24415,
2696,
5910,
1027,
3559,
1012,
2131,
8557,
2696,
9818,
8167,
1006,
2440,
15069,
1007,
1025,
1002,
27427,
4765,
13874,
1012,
3793,
1006,
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... |
ecomfe/zrender | src/graphic/Path.js | function (key, value) {
// FIXME
if (key === 'shape') {
this.setShape(value);
this.__dirtyPath = true;
this._rect = null;
}
else {
Displayable.prototype.attrKV.call(this, key, value);
}
} | javascript | function (key, value) {
// FIXME
if (key === 'shape') {
this.setShape(value);
this.__dirtyPath = true;
this._rect = null;
}
else {
Displayable.prototype.attrKV.call(this, key, value);
}
} | [
"function",
"(",
"key",
",",
"value",
")",
"{",
"// FIXME",
"if",
"(",
"key",
"===",
"'shape'",
")",
"{",
"this",
".",
"setShape",
"(",
"value",
")",
";",
"this",
".",
"__dirtyPath",
"=",
"true",
";",
"this",
".",
"_rect",
"=",
"null",
";",
"}",
... | Overwrite attrKV | [
"Overwrite",
"attrKV"
] | 30321b57cba3149c30eacb0c1e18276f0f001b9f | https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/graphic/Path.js#L295-L305 | train | Set the attribute value | [
30522,
3853,
1006,
3145,
1010,
3643,
1007,
1063,
1013,
1013,
8081,
4168,
2065,
1006,
3145,
1027,
1027,
1027,
1005,
4338,
1005,
1007,
1063,
2023,
1012,
4520,
3270,
5051,
1006,
3643,
1007,
1025,
2023,
1012,
1035,
1035,
6530,
15069,
1027,
29... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/extensions/default/JavaScriptRefactoring/RefactoringUtils.js | getUniqueIdentifierName | function getUniqueIdentifierName(scopes, prefix, num) {
if (!scopes) {
return prefix;
}
var props = scopes.reduce(function(props, scope) {
return _.union(props, _.keys(scope.props));
}, []);
if (!props) {
return prefix;
}
num... | javascript | function getUniqueIdentifierName(scopes, prefix, num) {
if (!scopes) {
return prefix;
}
var props = scopes.reduce(function(props, scope) {
return _.union(props, _.keys(scope.props));
}, []);
if (!props) {
return prefix;
}
num... | [
"function",
"getUniqueIdentifierName",
"(",
"scopes",
",",
"prefix",
",",
"num",
")",
"{",
"if",
"(",
"!",
"scopes",
")",
"{",
"return",
"prefix",
";",
"}",
"var",
"props",
"=",
"scopes",
".",
"reduce",
"(",
"function",
"(",
"props",
",",
"scope",
")",... | Gets a unique identifier name in the scope that starts with prefix
@param {!Scope} scopes - an array of all scopes returned from tern (each element contains 'props' with identifiers
in that scope)
@param {!string} prefix - prefix of the identifier
@param {number} num - number to start checking for
@return {!string} ide... | [
"Gets",
"a",
"unique",
"identifier",
"name",
"in",
"the",
"scope",
"that",
"starts",
"with",
"prefix"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/JavaScriptRefactoring/RefactoringUtils.js#L148-L171 | train | get unique identifier name | [
30522,
3853,
2131,
19496,
4226,
5178,
16778,
8873,
11795,
14074,
1006,
9531,
2015,
1010,
17576,
1010,
16371,
2213,
1007,
1063,
2065,
1006,
999,
9531,
2015,
1007,
1063,
2709,
17576,
1025,
1065,
13075,
24387,
1027,
9531,
2015,
1012,
5547,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ColorlibHQ/AdminLTE | plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js | function(object, property, value, setter) {
try { object[property] = value; } catch(e) {}
try { object.__defineGetter__(property, function() { return value; }); } catch(e) {}
if (setter) {
try { object.__defineSetter__(property, function() {}); } catch(e) {}
}
if (!wysihtml5.brow... | javascript | function(object, property, value, setter) {
try { object[property] = value; } catch(e) {}
try { object.__defineGetter__(property, function() { return value; }); } catch(e) {}
if (setter) {
try { object.__defineSetter__(property, function() {}); } catch(e) {}
}
if (!wysihtml5.brow... | [
"function",
"(",
"object",
",",
"property",
",",
"value",
",",
"setter",
")",
"{",
"try",
"{",
"object",
"[",
"property",
"]",
"=",
"value",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"}",
"try",
"{",
"object",
".",
"__defineGetter__",
"(",
"property",
... | Method to unset/override existing variables
@example
// Make cookie unreadable and unwritable
this._unset(document, "cookie", "", true); | [
"Method",
"to",
"unset",
"/",
"override",
"existing",
"variables"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L7055-L7074 | train | This function is used to set a property on an object | [
30522,
3853,
1006,
4874,
1010,
3200,
1010,
3643,
1010,
2275,
3334,
1007,
1063,
3046,
1063,
4874,
1031,
3200,
1033,
1027,
3643,
1025,
1065,
4608,
1006,
1041,
1007,
1063,
1065,
3046,
1063,
4874,
1012,
1035,
1035,
9375,
18150,
3334,
1035,
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... | |
dimsemenov/PhotoSwipe | src/js/gestures.js | function() {
var yOffset = _panOffset.y - self.currItem.initialPosition.y; // difference between initial and current position
return 1 - Math.abs( yOffset / (_viewportSize.y / 2) );
} | javascript | function() {
var yOffset = _panOffset.y - self.currItem.initialPosition.y; // difference between initial and current position
return 1 - Math.abs( yOffset / (_viewportSize.y / 2) );
} | [
"function",
"(",
")",
"{",
"var",
"yOffset",
"=",
"_panOffset",
".",
"y",
"-",
"self",
".",
"currItem",
".",
"initialPosition",
".",
"y",
";",
"// difference between initial and current position",
"return",
"1",
"-",
"Math",
".",
"abs",
"(",
"yOffset",
"/",
... | amount of pixels to drag to determine direction of swipe | [
"amount",
"of",
"pixels",
"to",
"drag",
"to",
"determine",
"direction",
"of",
"swipe"
] | 80607e12542a1a54ecefa837649e862b35dffd25 | https://github.com/dimsemenov/PhotoSwipe/blob/80607e12542a1a54ecefa837649e862b35dffd25/src/js/gestures.js#L126-L129 | train | Returns the y offset of the last pan | [
30522,
3853,
1006,
1007,
1063,
13075,
10930,
21807,
3388,
1027,
1035,
6090,
27475,
3388,
1012,
1061,
1011,
2969,
1012,
12731,
18752,
18532,
1012,
3988,
26994,
1012,
1061,
1025,
1013,
1013,
4489,
2090,
3988,
1998,
2783,
2597,
2709,
1015,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/search/QuickOpen.js | _getPluginsForCurrentContext | function _getPluginsForCurrentContext() {
var curDoc = DocumentManager.getCurrentDocument();
if (curDoc) {
var languageId = curDoc.getLanguage().getId();
return _providerRegistrationHandler.getProvidersForLanguageId(languageId);
}
return _providerRegistrationHan... | javascript | function _getPluginsForCurrentContext() {
var curDoc = DocumentManager.getCurrentDocument();
if (curDoc) {
var languageId = curDoc.getLanguage().getId();
return _providerRegistrationHandler.getProvidersForLanguageId(languageId);
}
return _providerRegistrationHan... | [
"function",
"_getPluginsForCurrentContext",
"(",
")",
"{",
"var",
"curDoc",
"=",
"DocumentManager",
".",
"getCurrentDocument",
"(",
")",
";",
"if",
"(",
"curDoc",
")",
"{",
"var",
"languageId",
"=",
"curDoc",
".",
"getLanguage",
"(",
")",
".",
"getId",
"(",
... | Helper function to get the plugins based on the type of the current document.
@private
@returns {Array} Returns the plugings based on the languageId of the current document. | [
"Helper",
"function",
"to",
"get",
"the",
"plugins",
"based",
"on",
"the",
"type",
"of",
"the",
"current",
"document",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/QuickOpen.js#L111-L120 | train | Get the plugins registered for the current language | [
30522,
3853,
1035,
2131,
24759,
15916,
7076,
29278,
10841,
14343,
3372,
8663,
18209,
1006,
1007,
1063,
13075,
12731,
20683,
2278,
1027,
6254,
24805,
4590,
1012,
2131,
10841,
14343,
3372,
3527,
24894,
4765,
1006,
1007,
1025,
2065,
1006,
12731,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/ui/redux/modules/entities.js | getReducerName | function getReducerName(type) {
const trailer = type.match(/s$/) ? '' : 's';
return `${type.slice(0, 1).toLowerCase()}${type.slice(1)}${trailer}`;
} | javascript | function getReducerName(type) {
const trailer = type.match(/s$/) ? '' : 's';
return `${type.slice(0, 1).toLowerCase()}${type.slice(1)}${trailer}`;
} | [
"function",
"getReducerName",
"(",
"type",
")",
"{",
"const",
"trailer",
"=",
"type",
".",
"match",
"(",
"/",
"s$",
"/",
")",
"?",
"''",
":",
"'s'",
";",
"return",
"`",
"${",
"type",
".",
"slice",
"(",
"0",
",",
"1",
")",
".",
"toLowerCase",
"(",... | ~~~~~~~~ // Reducers // ~~~~~~~~ // | [
"~~~~~~~~",
"//",
"Reducers",
"//",
"~~~~~~~~",
"//"
] | e24ce7f7b41246e700c4b9bdb6b34b6652ad589b | https://github.com/getinsomnia/insomnia/blob/e24ce7f7b41246e700c4b9bdb6b34b6652ad589b/packages/insomnia-app/app/ui/redux/modules/entities.js#L10-L13 | train | Get reducer name | [
30522,
3853,
2131,
5596,
18796,
12789,
4168,
1006,
2828,
1007,
1063,
9530,
3367,
9117,
1027,
2828,
1012,
2674,
1006,
1013,
1055,
1002,
1013,
1007,
1029,
1005,
1005,
1024,
1005,
1055,
1005,
1025,
2709,
1036,
1002,
1063,
2828,
1012,
14704,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
airyland/vux | src/components/range/lib/matches-selector.js | match | function match (el, selector) {
if (!el || el.nodeType !== 1) return false
if (vendor) return vendor.call(el, selector)
var nodes = all(selector, el.parentNode)
for (var i = 0; i < nodes.length; ++i) {
if (nodes[i] === el) return true
}
return false
} | javascript | function match (el, selector) {
if (!el || el.nodeType !== 1) return false
if (vendor) return vendor.call(el, selector)
var nodes = all(selector, el.parentNode)
for (var i = 0; i < nodes.length; ++i) {
if (nodes[i] === el) return true
}
return false
} | [
"function",
"match",
"(",
"el",
",",
"selector",
")",
"{",
"if",
"(",
"!",
"el",
"||",
"el",
".",
"nodeType",
"!==",
"1",
")",
"return",
"false",
"if",
"(",
"vendor",
")",
"return",
"vendor",
".",
"call",
"(",
"el",
",",
"selector",
")",
"var",
"... | Match `el` to `selector`.
@param {Element} el
@param {String} selector
@return {Boolean}
@api public | [
"Match",
"el",
"to",
"selector",
"."
] | 484fc3c18bdca99b0c08efbb678c0ee0f5ceedd6 | https://github.com/airyland/vux/blob/484fc3c18bdca99b0c08efbb678c0ee0f5ceedd6/src/components/range/lib/matches-selector.js#L38-L46 | train | match el with selector | [
30522,
3853,
2674,
1006,
3449,
1010,
27000,
1007,
1063,
2065,
1006,
999,
3449,
1064,
1064,
3449,
1012,
13045,
13874,
999,
1027,
1027,
1015,
1007,
2709,
6270,
2065,
1006,
21431,
1007,
2709,
21431,
1012,
2655,
1006,
3449,
1010,
27000,
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... |
mui-org/material-ui | docs/src/pages/components/slider/CustomValueReducerSlider.js | valueReducer | function valueReducer(rawValue, props, event) {
const { disabled, max, min, step } = props;
function roundToStep(number) {
return Math.round(number / step) * step;
}
if (!disabled && step) {
if (rawValue > min && rawValue < max) {
if (rawValue === max - step) {
// If moving the Slider us... | javascript | function valueReducer(rawValue, props, event) {
const { disabled, max, min, step } = props;
function roundToStep(number) {
return Math.round(number / step) * step;
}
if (!disabled && step) {
if (rawValue > min && rawValue < max) {
if (rawValue === max - step) {
// If moving the Slider us... | [
"function",
"valueReducer",
"(",
"rawValue",
",",
"props",
",",
"event",
")",
"{",
"const",
"{",
"disabled",
",",
"max",
",",
"min",
",",
"step",
"}",
"=",
"props",
";",
"function",
"roundToStep",
"(",
"number",
")",
"{",
"return",
"Math",
".",
"round"... | a value reducer that will snap to multiple of 10 but also to the edge value
Useful here because the max=104 is not a multiple of 10 | [
"a",
"value",
"reducer",
"that",
"will",
"snap",
"to",
"multiple",
"of",
"10",
"but",
"also",
"to",
"the",
"edge",
"value",
"Useful",
"here",
"because",
"the",
"max",
"=",
"104",
"is",
"not",
"a",
"multiple",
"of",
"10"
] | 1555e52367835946382fbf2a8f681de71318915d | https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/docs/src/pages/components/slider/CustomValueReducerSlider.js#L16-L39 | train | Reducer for value | [
30522,
3853,
3643,
5596,
18796,
2099,
1006,
6315,
10175,
5657,
1010,
24387,
1010,
2724,
1007,
1063,
9530,
3367,
1063,
9776,
1010,
4098,
1010,
8117,
1010,
3357,
1065,
1027,
24387,
1025,
3853,
2461,
13122,
2618,
2361,
1006,
2193,
1007,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eslint/eslint | lib/util/glob-utils.js | resolveFileGlobPatterns | function resolveFileGlobPatterns(patterns, options) {
if (options.globInputPaths === false) {
return patterns;
}
const processPathExtensions = processPath(options);
return patterns.map(processPathExtensions);
} | javascript | function resolveFileGlobPatterns(patterns, options) {
if (options.globInputPaths === false) {
return patterns;
}
const processPathExtensions = processPath(options);
return patterns.map(processPathExtensions);
} | [
"function",
"resolveFileGlobPatterns",
"(",
"patterns",
",",
"options",
")",
"{",
"if",
"(",
"options",
".",
"globInputPaths",
"===",
"false",
")",
"{",
"return",
"patterns",
";",
"}",
"const",
"processPathExtensions",
"=",
"processPath",
"(",
"options",
")",
... | ------------------------------------------------------------------------------ Public Interface ------------------------------------------------------------------------------
Resolves any directory patterns into glob-based patterns for easier handling.
@param {string[]} patterns File patterns (such as ... | [
"------------------------------------------------------------------------------",
"Public",
"Interface",
"------------------------------------------------------------------------------",
"Resolves",
"any",
"directory",
"patterns",
"into",
"glob",
"-",
"based",
"patterns",
"for",
"easier"... | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/glob-utils.js#L166-L174 | train | Resolve glob patterns | [
30522,
3853,
10663,
8873,
23115,
4135,
2497,
4502,
12079,
3619,
1006,
7060,
1010,
7047,
1007,
1063,
2065,
1006,
7047,
1012,
1043,
4135,
8428,
18780,
15069,
2015,
1027,
1027,
1027,
6270,
1007,
1063,
2709,
7060,
1025,
1065,
9530,
3367,
2832,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ColorlibHQ/AdminLTE | bower_components/ion.rangeSlider/js/ion.rangeSlider.js | function (percent) {
var min = this.options.min,
max = this.options.max,
min_decimals = min.toString().split(".")[1],
max_decimals = max.toString().split(".")[1],
min_length, max_length,
avg_decimals = 0,
abs = 0... | javascript | function (percent) {
var min = this.options.min,
max = this.options.max,
min_decimals = min.toString().split(".")[1],
max_decimals = max.toString().split(".")[1],
min_length, max_length,
avg_decimals = 0,
abs = 0... | [
"function",
"(",
"percent",
")",
"{",
"var",
"min",
"=",
"this",
".",
"options",
".",
"min",
",",
"max",
"=",
"this",
".",
"options",
".",
"max",
",",
"min_decimals",
"=",
"min",
".",
"toString",
"(",
")",
".",
"split",
"(",
"\".\"",
")",
"[",
"1... | Convert percent to real values
@param percent {Number} X in percent
@returns {Number} X in real | [
"Convert",
"percent",
"to",
"real",
"values"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/bower_components/ion.rangeSlider/js/ion.rangeSlider.js#L1770-L1835 | train | get the value of the option | [
30522,
3853,
1006,
3867,
1007,
1063,
13075,
8117,
1027,
2023,
1012,
7047,
1012,
8117,
1010,
4098,
1027,
2023,
1012,
7047,
1012,
4098,
1010,
8117,
1035,
26066,
2015,
1027,
8117,
1012,
2000,
3367,
4892,
1006,
1007,
1012,
3975,
1006,
1000,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/view/MainViewManager.js | _makeFirstPaneResizable | function _makeFirstPaneResizable() {
var firstPane = _panes[FIRST_PANE];
Resizer.makeResizable(firstPane.$el,
_orientation === HORIZONTAL ? Resizer.DIRECTION_VERTICAL : Resizer.DIRECTION_HORIZONTAL,
_orientation === HORIZONTAL ? Resizer.POSITIO... | javascript | function _makeFirstPaneResizable() {
var firstPane = _panes[FIRST_PANE];
Resizer.makeResizable(firstPane.$el,
_orientation === HORIZONTAL ? Resizer.DIRECTION_VERTICAL : Resizer.DIRECTION_HORIZONTAL,
_orientation === HORIZONTAL ? Resizer.POSITIO... | [
"function",
"_makeFirstPaneResizable",
"(",
")",
"{",
"var",
"firstPane",
"=",
"_panes",
"[",
"FIRST_PANE",
"]",
";",
"Resizer",
".",
"makeResizable",
"(",
"firstPane",
".",
"$el",
",",
"_orientation",
"===",
"HORIZONTAL",
"?",
"Resizer",
".",
"DIRECTION_VERTICA... | Makes the first pane resizable
@private | [
"Makes",
"the",
"first",
"pane",
"resizable"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/view/MainViewManager.js#L1136-L1146 | train | Make the first pane resizable | [
30522,
3853,
1035,
2191,
8873,
12096,
9739,
18702,
21335,
3468,
1006,
1007,
1063,
13075,
2034,
9739,
2063,
1027,
1035,
6090,
2229,
1031,
2034,
1035,
6090,
2063,
1033,
1025,
24501,
17629,
1012,
9338,
2229,
21335,
3468,
1006,
2034,
9739,
2063... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalVersionInfo.js | function (oODataModelInstance) {
var iVersion;
var sODataModelName;
// check if the given object has metadata and a class name
if (oODataModelInstance && oODataModelInstance.getMetadata) {
sODataModelName = oODataModelInstance.getMetadata().getName();
}
switch (sODataModelName) {
case "sap.u... | javascript | function (oODataModelInstance) {
var iVersion;
var sODataModelName;
// check if the given object has metadata and a class name
if (oODataModelInstance && oODataModelInstance.getMetadata) {
sODataModelName = oODataModelInstance.getMetadata().getName();
}
switch (sODataModelName) {
case "sap.u... | [
"function",
"(",
"oODataModelInstance",
")",
"{",
"var",
"iVersion",
";",
"var",
"sODataModelName",
";",
"// check if the given object has metadata and a class name",
"if",
"(",
"oODataModelInstance",
"&&",
"oODataModelInstance",
".",
"getMetadata",
")",
"{",
"sODataModelNa... | find out which model is used | [
"find",
"out",
"which",
"model",
"is",
"used"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalVersionInfo.js#L21-L38 | train | Returns the version of the given object | [
30522,
3853,
1006,
1051,
13390,
15464,
10244,
24412,
26897,
1007,
1063,
13075,
4921,
2545,
3258,
1025,
13075,
14904,
15464,
10244,
19666,
14074,
1025,
1013,
1013,
4638,
2065,
1996,
2445,
4874,
2038,
27425,
1998,
1037,
2465,
2171,
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... | |
TryGhost/Ghost | core/server/api/v0.1/tags.js | doQuery | function doQuery(options) {
return models.Tag.add(options.data.tags[0], _.omit(options, ['data']))
.then((model) => {
return {
tags: [urlsForTag(model.id, model.toJSON(options), options)]
};
});
} | javascript | function doQuery(options) {
return models.Tag.add(options.data.tags[0], _.omit(options, ['data']))
.then((model) => {
return {
tags: [urlsForTag(model.id, model.toJSON(options), options)]
};
});
} | [
"function",
"doQuery",
"(",
"options",
")",
"{",
"return",
"models",
".",
"Tag",
".",
"add",
"(",
"options",
".",
"data",
".",
"tags",
"[",
"0",
"]",
",",
"_",
".",
"omit",
"(",
"options",
",",
"[",
"'data'",
"]",
")",
")",
".",
"then",
"(",
"(... | ### Model Query
Make the call to the Model layer
@param {Object} options
@returns {Object} options | [
"###",
"Model",
"Query",
"Make",
"the",
"call",
"to",
"the",
"Model",
"layer"
] | bb7bb55cf3e60af99ebbc56099928827b58461bc | https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/api/v0.1/tags.js#L115-L122 | train | Query for tags | [
30522,
3853,
2079,
4226,
2854,
1006,
7047,
1007,
1063,
2709,
4275,
1012,
6415,
1012,
5587,
1006,
7047,
1012,
2951,
1012,
22073,
1031,
1014,
1033,
1010,
1035,
1012,
18168,
4183,
1006,
7047,
1010,
1031,
1005,
2951,
1005,
1033,
1007,
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... |
MoePlayer/DPlayer | demo/modernizr.js | cssToDOM | function cssToDOM(name) {
return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
return m1 + m2.toUpperCase();
}).replace(/^-/, '');
} | javascript | function cssToDOM(name) {
return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
return m1 + m2.toUpperCase();
}).replace(/^-/, '');
} | [
"function",
"cssToDOM",
"(",
"name",
")",
"{",
"return",
"name",
".",
"replace",
"(",
"/",
"([a-z])-([a-z])",
"/",
"g",
",",
"function",
"(",
"str",
",",
"m1",
",",
"m2",
")",
"{",
"return",
"m1",
"+",
"m2",
".",
"toUpperCase",
"(",
")",
";",
"}",
... | cssToDOM takes a kebab-case string and converts it to camelCase
e.g. box-sizing -> boxSizing
@access private
@function cssToDOM
@param {string} name - String name of kebab-case prop we want to convert
@returns {string} The camelCase version of the supplied name | [
"cssToDOM",
"takes",
"a",
"kebab",
"-",
"case",
"string",
"and",
"converts",
"it",
"to",
"camelCase",
"e",
".",
"g",
".",
"box",
"-",
"sizing",
"-",
">",
"boxSizing"
] | f5c53f082634a6e5af56cfc72978ad7bad49b989 | https://github.com/MoePlayer/DPlayer/blob/f5c53f082634a6e5af56cfc72978ad7bad49b989/demo/modernizr.js#L566-L570 | train | Converts a CSS string to a DOM string | [
30522,
3853,
20116,
16033,
9527,
1006,
2171,
1007,
1063,
2709,
2171,
1012,
5672,
1006,
1013,
1006,
1031,
1037,
1011,
1062,
1033,
1007,
1011,
1006,
1031,
1037,
1011,
1062,
1033,
1007,
1013,
1043,
1010,
3853,
1006,
2358,
2099,
1010,
23290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Freeboard/freeboard | js/freeboard.thirdparty.js | function(target, settings) {
var nodeName, inline, inst;
nodeName = target.nodeName.toLowerCase();
inline = (nodeName === "div" || nodeName === "span");
if (!target.id) {
this.uuid += 1;
target.id = "dp" + this.uuid;
}
inst = this._newInst($(target), inline);
inst.settings = $.extend({}, settings ||... | javascript | function(target, settings) {
var nodeName, inline, inst;
nodeName = target.nodeName.toLowerCase();
inline = (nodeName === "div" || nodeName === "span");
if (!target.id) {
this.uuid += 1;
target.id = "dp" + this.uuid;
}
inst = this._newInst($(target), inline);
inst.settings = $.extend({}, settings ||... | [
"function",
"(",
"target",
",",
"settings",
")",
"{",
"var",
"nodeName",
",",
"inline",
",",
"inst",
";",
"nodeName",
"=",
"target",
".",
"nodeName",
".",
"toLowerCase",
"(",
")",
";",
"inline",
"=",
"(",
"nodeName",
"===",
"\"div\"",
"||",
"nodeName",
... | /* Attach the date picker to a jQuery selection.
@param target element - the target input field or division or span
@param settings object - the new settings to use for this date picker instance (anonymous) | [
"/",
"*",
"Attach",
"the",
"date",
"picker",
"to",
"a",
"jQuery",
"selection",
"."
] | 38789f6e8bd3d04f7d3b2c3427e509d00f2610fc | https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/js/freeboard.thirdparty.js#L7754-L7769 | train | Creates a datepicker instance | [
30522,
3853,
1006,
4539,
1010,
10906,
1007,
1063,
13075,
13045,
18442,
1010,
23881,
1010,
16021,
2102,
1025,
13045,
18442,
1027,
4539,
1012,
13045,
18442,
1012,
2000,
27663,
18992,
3366,
1006,
1007,
1025,
23881,
1027,
1006,
13045,
18442,
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... | |
ColorlibHQ/AdminLTE | plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js | _changeLinks | function _changeLinks(composer, anchors, attributes) {
var oldAttrs;
for (var a = anchors.length; a--;) {
// Remove all old attributes
oldAttrs = anchors[a].attributes;
for (var oa = oldAttrs.length; oa--;) {
anchors[a].removeAttribute(oldAttrs.item(oa).name);
}
// Set ne... | javascript | function _changeLinks(composer, anchors, attributes) {
var oldAttrs;
for (var a = anchors.length; a--;) {
// Remove all old attributes
oldAttrs = anchors[a].attributes;
for (var oa = oldAttrs.length; oa--;) {
anchors[a].removeAttribute(oldAttrs.item(oa).name);
}
// Set ne... | [
"function",
"_changeLinks",
"(",
"composer",
",",
"anchors",
",",
"attributes",
")",
"{",
"var",
"oldAttrs",
";",
"for",
"(",
"var",
"a",
"=",
"anchors",
".",
"length",
";",
"a",
"--",
";",
")",
"{",
"// Remove all old attributes",
"oldAttrs",
"=",
"anchor... | Changes attributes of links | [
"Changes",
"attributes",
"of",
"links"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L10351-L10369 | train | Change all links in an array of anchors to the new ones | [
30522,
3853,
1035,
2689,
13767,
2015,
1006,
4543,
1010,
24674,
1010,
12332,
1007,
1063,
13075,
2214,
19321,
2869,
1025,
2005,
1006,
13075,
1037,
1027,
24674,
1012,
3091,
1025,
1037,
1011,
1011,
1025,
1007,
1063,
1013,
1013,
6366,
2035,
2214... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/LiveDevelopment/main.js | _setImplementation | function _setImplementation(multibrowser) {
if (multibrowser) {
// set implemenation
LiveDevImpl = MultiBrowserLiveDev;
// update styles for UI status
_status = [
{ tooltip: Strings.LIVE_DEV_STATUS_TIP_NOT_CONNECTED, style: "warning" },
... | javascript | function _setImplementation(multibrowser) {
if (multibrowser) {
// set implemenation
LiveDevImpl = MultiBrowserLiveDev;
// update styles for UI status
_status = [
{ tooltip: Strings.LIVE_DEV_STATUS_TIP_NOT_CONNECTED, style: "warning" },
... | [
"function",
"_setImplementation",
"(",
"multibrowser",
")",
"{",
"if",
"(",
"multibrowser",
")",
"{",
"// set implemenation",
"LiveDevImpl",
"=",
"MultiBrowserLiveDev",
";",
"// update styles for UI status",
"_status",
"=",
"[",
"{",
"tooltip",
":",
"Strings",
".",
... | Sets the MultiBrowserLiveDev implementation if multibrowser is truthy,
keeps default LiveDevelopment implementation based on CDT otherwise.
It also resets the listeners and UI elements. | [
"Sets",
"the",
"MultiBrowserLiveDev",
"implementation",
"if",
"multibrowser",
"is",
"truthy",
"keeps",
"default",
"LiveDevelopment",
"implementation",
"based",
"on",
"CDT",
"otherwise",
".",
"It",
"also",
"resets",
"the",
"listeners",
"and",
"UI",
"elements",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/main.js#L279-L311 | train | set the implementation of LiveDevelopment | [
30522,
3853,
1035,
2275,
5714,
10814,
3672,
3370,
1006,
4800,
12618,
9333,
2121,
1007,
1063,
2065,
1006,
4800,
12618,
9333,
2121,
1007,
1063,
1013,
1013,
2275,
17727,
16930,
8189,
3508,
2973,
6777,
5714,
24759,
1027,
4800,
12618,
9333,
2121... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
KaTeX/KaTeX | dockers/screenshotter/screenshotter.js | tryConnect | function tryConnect() {
if (!seleniumIP) {
process.nextTick(buildDriver);
return;
}
const sock = net.connect({
host: seleniumIP,
port: +seleniumPort,
});
sock.on("connect", function() {
sock.end();
attempts = 0;
process.nextTick(buildDriver);
... | javascript | function tryConnect() {
if (!seleniumIP) {
process.nextTick(buildDriver);
return;
}
const sock = net.connect({
host: seleniumIP,
port: +seleniumPort,
});
sock.on("connect", function() {
sock.end();
attempts = 0;
process.nextTick(buildDriver);
... | [
"function",
"tryConnect",
"(",
")",
"{",
"if",
"(",
"!",
"seleniumIP",
")",
"{",
"process",
".",
"nextTick",
"(",
"buildDriver",
")",
";",
"return",
";",
"}",
"const",
"sock",
"=",
"net",
".",
"connect",
"(",
"{",
"host",
":",
"seleniumIP",
",",
"por... | //////////////////////////////////////////////////////////////////// Wait for container to become ready | [
"////////////////////////////////////////////////////////////////////",
"Wait",
"for",
"container",
"to",
"become",
"ready"
] | 17bfb247b88070267f3e5c7b21fe4a360fdf49d9 | https://github.com/KaTeX/KaTeX/blob/17bfb247b88070267f3e5c7b21fe4a360fdf49d9/dockers/screenshotter/screenshotter.js#L206-L225 | train | Try to connect to the selenium server | [
30522,
3853,
3046,
8663,
2638,
6593,
1006,
1007,
1063,
2065,
1006,
999,
7367,
7770,
5007,
11514,
1007,
1063,
2832,
1012,
2279,
26348,
1006,
3857,
23663,
2099,
1007,
1025,
2709,
1025,
1065,
9530,
3367,
28407,
1027,
5658,
1012,
7532,
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... |
goldfire/howler.js | examples/player/player.js | function() {
var self = this;
// Get the Howl we want to manipulate.
var sound = self.playlist[self.index].howl;
// Puase the sound.
sound.pause();
// Show the play button.
playBtn.style.display = 'block';
pauseBtn.style.display = 'none';
} | javascript | function() {
var self = this;
// Get the Howl we want to manipulate.
var sound = self.playlist[self.index].howl;
// Puase the sound.
sound.pause();
// Show the play button.
playBtn.style.display = 'block';
pauseBtn.style.display = 'none';
} | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
";",
"// Get the Howl we want to manipulate.",
"var",
"sound",
"=",
"self",
".",
"playlist",
"[",
"self",
".",
"index",
"]",
".",
"howl",
";",
"// Puase the sound.",
"sound",
".",
"pause",
"(",
")",
";... | Pause the currently playing track. | [
"Pause",
"the",
"currently",
"playing",
"track",
"."
] | 030db918dd8ce640afd57e172418472497e8f113 | https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/player/player.js#L124-L136 | train | Pause the current item | [
30522,
3853,
1006,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
1013,
1013,
2131,
1996,
22912,
2057,
2215,
2000,
17708,
1012,
13075,
2614,
1027,
2969,
1012,
2377,
9863,
1031,
2969,
1012,
5950,
1033,
1012,
22912,
1025,
1013,
1013,
16405,
11022... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/MessageBox.js | image | function image(oIcon) {
var oImage = new Image({
id: sDialogId + "--icon",
tooltip: rb && rb.getText("MSGBOX_ICON_" + oIcon),
decorative: true
});
oImage.addStyleClass("sapUiMboxIcon");
oImage.addStyleClass(mIconClass[oIcon]);
return oImage;
} | javascript | function image(oIcon) {
var oImage = new Image({
id: sDialogId + "--icon",
tooltip: rb && rb.getText("MSGBOX_ICON_" + oIcon),
decorative: true
});
oImage.addStyleClass("sapUiMboxIcon");
oImage.addStyleClass(mIconClass[oIcon]);
return oImage;
} | [
"function",
"image",
"(",
"oIcon",
")",
"{",
"var",
"oImage",
"=",
"new",
"Image",
"(",
"{",
"id",
":",
"sDialogId",
"+",
"\"--icon\"",
",",
"tooltip",
":",
"rb",
"&&",
"rb",
".",
"getText",
"(",
"\"MSGBOX_ICON_\"",
"+",
"oIcon",
")",
",",
"decorative"... | creates an Image for the given icon type | [
"creates",
"an",
"Image",
"for",
"the",
"given",
"icon",
"type"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/MessageBox.js#L243-L252 | train | Creates an Image object for the given icon. | [
30522,
3853,
3746,
1006,
1051,
28524,
1007,
1063,
13075,
1051,
9581,
3351,
1027,
2047,
3746,
1006,
1063,
8909,
1024,
17371,
4818,
8649,
3593,
1009,
1000,
1011,
1011,
12696,
1000,
1010,
6994,
25101,
1024,
21144,
1004,
1004,
21144,
1012,
2131... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/util/glob-utils.js | processPath | function processPath(options) {
const cwd = (options && options.cwd) || process.cwd();
let extensions = (options && options.extensions) || [".js"];
extensions = extensions.map(ext => ext.replace(/^\./u, ""));
let suffix = "/**";
if (extensions.length === 1) {
suffix += `/*.${extensions[0]... | javascript | function processPath(options) {
const cwd = (options && options.cwd) || process.cwd();
let extensions = (options && options.extensions) || [".js"];
extensions = extensions.map(ext => ext.replace(/^\./u, ""));
let suffix = "/**";
if (extensions.length === 1) {
suffix += `/*.${extensions[0]... | [
"function",
"processPath",
"(",
"options",
")",
"{",
"const",
"cwd",
"=",
"(",
"options",
"&&",
"options",
".",
"cwd",
")",
"||",
"process",
".",
"cwd",
"(",
")",
";",
"let",
"extensions",
"=",
"(",
"options",
"&&",
"options",
".",
"extensions",
")",
... | Checks if a provided path is a directory and returns a glob string matching
all files under that directory if so, the path itself otherwise.
Reason for this is that `glob` needs `/**` to collect all the files under a
directory where as our previous implementation without `glob` simply walked
a directory that is passed... | [
"Checks",
"if",
"a",
"provided",
"path",
"is",
"a",
"directory",
"and",
"returns",
"a",
"glob",
"string",
"matching",
"all",
"files",
"under",
"that",
"directory",
"if",
"so",
"the",
"path",
"itself",
"otherwise",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/glob-utils.js#L51-L86 | train | Process a directory path to a glob pattern | [
30522,
3853,
2832,
15069,
1006,
7047,
1007,
1063,
9530,
3367,
19296,
2094,
1027,
1006,
7047,
1004,
1004,
7047,
1012,
19296,
2094,
1007,
1064,
1064,
2832,
1012,
19296,
2094,
1006,
1007,
1025,
2292,
14305,
1027,
1006,
7047,
1004,
1004,
7047,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
dequelabs/axe-core | lib/core/utils/preload-cssom.js | processCssomAssets | function processCssomAssets(nestedAssets) {
const result = [];
nestedAssets.forEach(item => {
if (Array.isArray(item)) {
result.push(...processCssomAssets(item));
} else {
result.push(item);
}
});
return result;
} | javascript | function processCssomAssets(nestedAssets) {
const result = [];
nestedAssets.forEach(item => {
if (Array.isArray(item)) {
result.push(...processCssomAssets(item));
} else {
result.push(item);
}
});
return result;
} | [
"function",
"processCssomAssets",
"(",
"nestedAssets",
")",
"{",
"const",
"result",
"=",
"[",
"]",
";",
"nestedAssets",
".",
"forEach",
"(",
"item",
"=>",
"{",
"if",
"(",
"Array",
".",
"isArray",
"(",
"item",
")",
")",
"{",
"result",
".",
"push",
"(",
... | Process results from `loadCssom` queues of all root nodes
NOTE:
using `axe.utils.queue` from various `loadCssom` paths, returns a nested array of arrays at various depths,
hence the need to flatten arrays
@param {Array<Object>} assets CSSOM assets for each root
@returns {Object} CSSOM object | [
"Process",
"results",
"from",
"loadCssom",
"queues",
"of",
"all",
"root",
"nodes",
"NOTE",
":",
"using",
"axe",
".",
"utils",
".",
"queue",
"from",
"various",
"loadCssom",
"paths",
"returns",
"a",
"nested",
"array",
"of",
"arrays",
"at",
"various",
"depths",... | 727323c07980e2291575f545444d389fb942906f | https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/core/utils/preload-cssom.js#L152-L164 | train | Process nested cssom assets | [
30522,
3853,
2832,
6169,
25426,
27241,
3215,
1006,
9089,
11960,
11393,
3215,
1007,
1063,
9530,
3367,
2765,
1027,
1031,
1033,
1025,
9089,
11960,
11393,
3215,
1012,
18921,
6776,
1006,
8875,
1027,
1028,
1063,
2065,
1006,
9140,
1012,
18061,
113... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | mergeScaleConfig | function mergeScaleConfig(/* config objects ... */) {
return helpers$1.merge({}, [].slice.call(arguments), {
merger: function(key, target, source, options) {
if (key === 'xAxes' || key === 'yAxes') {
var slen = source[key].length;
var i, type, scale;
if (!target[key]) {
target[key] = [];
}
... | javascript | function mergeScaleConfig(/* config objects ... */) {
return helpers$1.merge({}, [].slice.call(arguments), {
merger: function(key, target, source, options) {
if (key === 'xAxes' || key === 'yAxes') {
var slen = source[key].length;
var i, type, scale;
if (!target[key]) {
target[key] = [];
}
... | [
"function",
"mergeScaleConfig",
"(",
"/* config objects ... */",
")",
"{",
"return",
"helpers$1",
".",
"merge",
"(",
"{",
"}",
",",
"[",
"]",
".",
"slice",
".",
"call",
"(",
"arguments",
")",
",",
"{",
"merger",
":",
"function",
"(",
"key",
",",
"target"... | Recursively merge the given config objects representing the `scales` option
by incorporating scale defaults in `xAxes` and `yAxes` array items, then
returns a deep copy of the result, thus doesn't alter inputs. | [
"Recursively",
"merge",
"the",
"given",
"config",
"objects",
"representing",
"the",
"scales",
"option",
"by",
"incorporating",
"scale",
"defaults",
"in",
"xAxes",
"and",
"yAxes",
"array",
"items",
"then",
"returns",
"a",
"deep",
"copy",
"of",
"the",
"result",
... | ddfaceb4a8e65a41f163e2fdc4eab49384b810a1 | https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/blob/ddfaceb4a8e65a41f163e2fdc4eab49384b810a1/vendor/chart.js/Chart.js#L8300-L8333 | train | Merge scale config objects into target config object | [
30522,
3853,
13590,
15782,
2571,
8663,
8873,
2290,
1006,
1013,
1008,
9530,
8873,
2290,
5200,
1012,
1012,
1012,
1008,
1013,
1007,
1063,
2709,
2393,
2545,
1002,
1015,
1012,
13590,
1006,
1063,
1065,
1010,
1031,
1033,
1012,
14704,
1012,
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... |
SAP/openui5 | src/sap.ui.unified/src/sap/ui/unified/Menu.js | _migrateDataTojQueryUI110 | function _migrateDataTojQueryUI110(data){
var withinElement = jQuery(window);
data.within = {
element: withinElement,
isWindow: true,
offset: withinElement.offset() || { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
width: withinElement.width(),
... | javascript | function _migrateDataTojQueryUI110(data){
var withinElement = jQuery(window);
data.within = {
element: withinElement,
isWindow: true,
offset: withinElement.offset() || { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
width: withinElement.width(),
... | [
"function",
"_migrateDataTojQueryUI110",
"(",
"data",
")",
"{",
"var",
"withinElement",
"=",
"jQuery",
"(",
"window",
")",
";",
"data",
".",
"within",
"=",
"{",
"element",
":",
"withinElement",
",",
"isWindow",
":",
"true",
",",
"offset",
":",
"withinElement... | /*!
The following code is taken from
jQuery UI 1.10.3 - 2013-11-18
jquery.ui.position.js
http://jqueryui.com
Copyright 2013 jQuery Foundation and other contributors; Licensed MIT
TODO: Get rid of this coding when jQuery UI 1.8 is no longer supported and the framework was switched to jQuery UI 1.9 ff. | [
"/",
"*",
"!",
"The",
"following",
"code",
"is",
"taken",
"from",
"jQuery",
"UI",
"1",
".",
"10",
".",
"3",
"-",
"2013",
"-",
"11",
"-",
"18",
"jquery",
".",
"ui",
".",
"position",
".",
"js"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.unified/src/sap/ui/unified/Menu.js#L1242-L1258 | train | Migrate jQuery UI110 data to jQuery UI110 data | [
30522,
3853,
1035,
13447,
6790,
3406,
3501,
4226,
2854,
10179,
14526,
2692,
1006,
2951,
1007,
1063,
13075,
2306,
12260,
3672,
1027,
1046,
4226,
2854,
1006,
3332,
1007,
1025,
2951,
1012,
2306,
1027,
1063,
5783,
1024,
2306,
12260,
3672,
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... |
jhipster/generator-jhipster | generators/aws-containers/lib/cloudFormation.js | _getStackLogLine | function _getStackLogLine(stack, indentation = 0) {
const time = chalk.blue(`${stack.Timestamp.toLocaleTimeString()}`);
const spacing = _.repeat('\t', indentation);
const status = _formatStatus(stack.ResourceStatus);
const stackName = chalk.grey(stack.StackName);
const resourceType = chalk.bold(sta... | javascript | function _getStackLogLine(stack, indentation = 0) {
const time = chalk.blue(`${stack.Timestamp.toLocaleTimeString()}`);
const spacing = _.repeat('\t', indentation);
const status = _formatStatus(stack.ResourceStatus);
const stackName = chalk.grey(stack.StackName);
const resourceType = chalk.bold(sta... | [
"function",
"_getStackLogLine",
"(",
"stack",
",",
"indentation",
"=",
"0",
")",
"{",
"const",
"time",
"=",
"chalk",
".",
"blue",
"(",
"`",
"${",
"stack",
".",
"Timestamp",
".",
"toLocaleTimeString",
"(",
")",
"}",
"`",
")",
";",
"const",
"spacing",
"=... | Generate an enriched string to display a CloudFormation Stack creation event.
@param stack Stack event
@param indentation level of indentation to display (between the date and the rest of the log)
@returns {string}
@private | [
"Generate",
"an",
"enriched",
"string",
"to",
"display",
"a",
"CloudFormation",
"Stack",
"creation",
"event",
"."
] | f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff | https://github.com/jhipster/generator-jhipster/blob/f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff/generators/aws-containers/lib/cloudFormation.js#L311-L319 | train | Returns a line that prints the stack log | [
30522,
3853,
1035,
4152,
2696,
3600,
21197,
4179,
1006,
9991,
1010,
27427,
19304,
1027,
1014,
1007,
1063,
9530,
3367,
2051,
1027,
16833,
1012,
2630,
1006,
1036,
1002,
1063,
9991,
1012,
2335,
15464,
2361,
1012,
2000,
4135,
9289,
20624,
7834,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/switch-colon-spacing.js | getColonToken | function getColonToken(node) {
if (node.test) {
return sourceCode.getTokenAfter(node.test, astUtils.isColonToken);
}
return sourceCode.getFirstToken(node, 1);
} | javascript | function getColonToken(node) {
if (node.test) {
return sourceCode.getTokenAfter(node.test, astUtils.isColonToken);
}
return sourceCode.getFirstToken(node, 1);
} | [
"function",
"getColonToken",
"(",
"node",
")",
"{",
"if",
"(",
"node",
".",
"test",
")",
"{",
"return",
"sourceCode",
".",
"getTokenAfter",
"(",
"node",
".",
"test",
",",
"astUtils",
".",
"isColonToken",
")",
";",
"}",
"return",
"sourceCode",
".",
"getFi... | true by default
Get the colon token of the given SwitchCase node.
@param {ASTNode} node The SwitchCase node to get.
@returns {Token} The colon token of the node. | [
"true",
"by",
"default",
"Get",
"the",
"colon",
"token",
"of",
"the",
"given",
"SwitchCase",
"node",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/switch-colon-spacing.js#L59-L64 | train | Get colon token from given node | [
30522,
3853,
2131,
25778,
12162,
11045,
2078,
1006,
13045,
1007,
1063,
2065,
1006,
13045,
1012,
3231,
1007,
1063,
2709,
3120,
16044,
1012,
2131,
18715,
8189,
6199,
2121,
1006,
13045,
1012,
3231,
1010,
2004,
8525,
3775,
4877,
1012,
2003,
257... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/Configuration.js | function(sType, sSymbol) {
check(sType == "decimal" || sType == "group" || sType == "plusSign" || sType == "minusSign", "sType must be decimal, group, plusSign or minusSign");
this._set("symbols-latn-" + sType, sSymbol);
return this;
} | javascript | function(sType, sSymbol) {
check(sType == "decimal" || sType == "group" || sType == "plusSign" || sType == "minusSign", "sType must be decimal, group, plusSign or minusSign");
this._set("symbols-latn-" + sType, sSymbol);
return this;
} | [
"function",
"(",
"sType",
",",
"sSymbol",
")",
"{",
"check",
"(",
"sType",
"==",
"\"decimal\"",
"||",
"sType",
"==",
"\"group\"",
"||",
"sType",
"==",
"\"plusSign\"",
"||",
"sType",
"==",
"\"minusSign\"",
",",
"\"sType must be decimal, group, plusSign or minusSign\"... | Defines the string to be used for the given number symbol.
Calling this method with a null or undefined symbol removes a previously set symbol string.
Note that an empty string is explicitly allowed.
If a symbol is defined, it will be preferred over symbols derived from the current locale.
See class {@link sap.ui.co... | [
"Defines",
"the",
"string",
"to",
"be",
"used",
"for",
"the",
"given",
"number",
"symbol",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Configuration.js#L1913-L1917 | train | Sets the symbol for the given type | [
30522,
3853,
1006,
2358,
18863,
1010,
7020,
24335,
14956,
1007,
1063,
4638,
1006,
2358,
18863,
1027,
1027,
1000,
26066,
1000,
1064,
1064,
2358,
18863,
1027,
1027,
1000,
2177,
1000,
1064,
1064,
2358,
18863,
1027,
1027,
1000,
4606,
5332,
1620... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
aws/aws-sdk-js | lib/s3/managed_upload.js | ManagedUpload | function ManagedUpload(options) {
var self = this;
AWS.SequentialExecutor.call(self);
self.body = null;
self.sliceFn = null;
self.callback = null;
self.parts = {};
self.completeInfo = [];
self.fillQueue = function() {
self.callback(new Error('Unsupported body payload ' + typeof sel... | javascript | function ManagedUpload(options) {
var self = this;
AWS.SequentialExecutor.call(self);
self.body = null;
self.sliceFn = null;
self.callback = null;
self.parts = {};
self.completeInfo = [];
self.fillQueue = function() {
self.callback(new Error('Unsupported body payload ' + typeof sel... | [
"function",
"ManagedUpload",
"(",
"options",
")",
"{",
"var",
"self",
"=",
"this",
";",
"AWS",
".",
"SequentialExecutor",
".",
"call",
"(",
"self",
")",
";",
"self",
".",
"body",
"=",
"null",
";",
"self",
".",
"sliceFn",
"=",
"null",
";",
"self",
"."... | Creates a managed upload object with a set of configuration options.
@note A "Body" parameter is required to be set prior to calling {send}.
@option options params [map] a map of parameters to pass to the upload
requests. The "Body" parameter is required to be specified either on
the service or in the params option.
@... | [
"Creates",
"a",
"managed",
"upload",
"object",
"with",
"a",
"set",
"of",
"configuration",
"options",
"."
] | c23e5f0edd150f8885267e5f7c8a564f8e6e8562 | https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/s3/managed_upload.js#L81-L94 | train | ManagedUpload constructor. | [
30522,
3853,
3266,
6279,
11066,
1006,
7047,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
22091,
2015,
1012,
25582,
10288,
8586,
16161,
2099,
1012,
2655,
1006,
2969,
1007,
1025,
2969,
1012,
2303,
1027,
19701,
1025,
2969,
1012,
14704,
2546,
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... |
SeleniumHQ/selenium | third_party/js/mozmill/shared-modules/toolbars.js | autoCompleteResults_getUnderlinedText | function autoCompleteResults_getUnderlinedText(result, type) {
this._controller.assertJS("subject.resultNode != null",
{resultNode: result.getNode()});
// Get the description element of the given title or url
var description = null;
switch (type) {
case "title":
... | javascript | function autoCompleteResults_getUnderlinedText(result, type) {
this._controller.assertJS("subject.resultNode != null",
{resultNode: result.getNode()});
// Get the description element of the given title or url
var description = null;
switch (type) {
case "title":
... | [
"function",
"autoCompleteResults_getUnderlinedText",
"(",
"result",
",",
"type",
")",
"{",
"this",
".",
"_controller",
".",
"assertJS",
"(",
"\"subject.resultNode != null\"",
",",
"{",
"resultNode",
":",
"result",
".",
"getNode",
"(",
")",
"}",
")",
";",
"// Get... | Returns the underlined text of all results from the text or URL
@param {ElemBase} result
Autocomplete result which has to be checked
@param {string} type
Type of element to check (text or url)
@returns An array of substrings which are underlined
@type {Array of string} | [
"Returns",
"the",
"underlined",
"text",
"of",
"all",
"results",
"from",
"the",
"text",
"or",
"URL"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/toolbars.js#L155-L181 | train | Get the underlined text of the given result | [
30522,
3853,
8285,
9006,
10814,
3334,
2229,
11314,
2015,
1035,
2131,
20824,
18194,
18209,
1006,
2765,
1010,
2828,
1007,
1063,
2023,
1012,
1035,
11486,
1012,
20865,
22578,
1006,
1000,
3395,
1012,
2765,
3630,
3207,
999,
1027,
19701,
1000,
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... |
laurent22/joplin | ElectronClient/app/main.js | profileFromArgs | function profileFromArgs(args) {
if (!args) return null;
const profileIndex = args.indexOf('--profile');
if (profileIndex <= 0 || profileIndex >= args.length - 1) return null;
const profileValue = args[profileIndex + 1];
return profileValue ? profileValue : null;
} | javascript | function profileFromArgs(args) {
if (!args) return null;
const profileIndex = args.indexOf('--profile');
if (profileIndex <= 0 || profileIndex >= args.length - 1) return null;
const profileValue = args[profileIndex + 1];
return profileValue ? profileValue : null;
} | [
"function",
"profileFromArgs",
"(",
"args",
")",
"{",
"if",
"(",
"!",
"args",
")",
"return",
"null",
";",
"const",
"profileIndex",
"=",
"args",
".",
"indexOf",
"(",
"'--profile'",
")",
";",
"if",
"(",
"profileIndex",
"<=",
"0",
"||",
"profileIndex",
">="... | Likewise, we want to know if a profile is specified early, in particular to save the window state data. | [
"Likewise",
"we",
"want",
"to",
"know",
"if",
"a",
"profile",
"is",
"specified",
"early",
"in",
"particular",
"to",
"save",
"the",
"window",
"state",
"data",
"."
] | beb428b246cecba4630a3ca57b472f43c0933a43 | https://github.com/laurent22/joplin/blob/beb428b246cecba4630a3ca57b472f43c0933a43/ElectronClient/app/main.js#L29-L35 | train | Get the profile value from the args | [
30522,
3853,
6337,
19699,
9626,
10623,
2015,
1006,
12098,
5620,
1007,
1063,
2065,
1006,
999,
12098,
5620,
1007,
2709,
19701,
1025,
9530,
3367,
6337,
22254,
10288,
1027,
12098,
5620,
1012,
5950,
11253,
1006,
1005,
1011,
1011,
6337,
1005,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (oEntitySet, oNavigationProperty) {
var sCreatable = oNavigationProperty["sap:creatable"],
sCreatablePath = oNavigationProperty["sap:creatable-path"],
oInsertRestrictions,
oNonInsertable = {"NavigationPropertyPath" : oNavigationProperty.name},
aNonInsertableNavigationProperties;
if (sCre... | javascript | function (oEntitySet, oNavigationProperty) {
var sCreatable = oNavigationProperty["sap:creatable"],
sCreatablePath = oNavigationProperty["sap:creatable-path"],
oInsertRestrictions,
oNonInsertable = {"NavigationPropertyPath" : oNavigationProperty.name},
aNonInsertableNavigationProperties;
if (sCre... | [
"function",
"(",
"oEntitySet",
",",
"oNavigationProperty",
")",
"{",
"var",
"sCreatable",
"=",
"oNavigationProperty",
"[",
"\"sap:creatable\"",
"]",
",",
"sCreatablePath",
"=",
"oNavigationProperty",
"[",
"\"sap:creatable-path\"",
"]",
",",
"oInsertRestrictions",
",",
... | Convert sap:creatable and sap:creatable-path at navigation property to V4 annotation
'Org.OData.Capabilities.V1.InsertRestrictions/NonInsertableNavigationProperties' at
the given entity set.
If both V2 annotations 'sap:creatable' and 'sap:creatable-path' are given the service is
broken and the navigation property is ad... | [
"Convert",
"sap",
":",
"creatable",
"and",
"sap",
":",
"creatable",
"-",
"path",
"at",
"navigation",
"property",
"to",
"V4",
"annotation",
"Org",
".",
"OData",
".",
"Capabilities",
".",
"V1",
".",
"InsertRestrictions",
"/",
"NonInsertableNavigationProperties",
"... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L817-L851 | train | Checks if the navigation property is inconsistent with v2 annotations | [
30522,
3853,
1006,
1051,
4765,
3012,
13462,
1010,
2006,
18891,
12540,
21572,
4842,
3723,
1007,
1063,
13075,
8040,
16416,
10880,
1027,
2006,
18891,
12540,
21572,
4842,
3723,
1031,
1000,
20066,
1024,
13675,
5243,
10880,
1000,
1033,
1010,
8040,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
eslint/eslint | lib/rules/func-names.js | reportUnexpectedUnnamedFunction | function reportUnexpectedUnnamedFunction(node) {
context.report({
node,
messageId: "unnamed",
data: { name: astUtils.getFunctionNameWithKind(node) }
});
} | javascript | function reportUnexpectedUnnamedFunction(node) {
context.report({
node,
messageId: "unnamed",
data: { name: astUtils.getFunctionNameWithKind(node) }
});
} | [
"function",
"reportUnexpectedUnnamedFunction",
"(",
"node",
")",
"{",
"context",
".",
"report",
"(",
"{",
"node",
",",
"messageId",
":",
"\"unnamed\"",
",",
"data",
":",
"{",
"name",
":",
"astUtils",
".",
"getFunctionNameWithKind",
"(",
"node",
")",
"}",
"}"... | Reports that an unnamed function should be named
@param {ASTNode} node - The node to report in the event of an error.
@returns {void} | [
"Reports",
"that",
"an",
"unnamed",
"function",
"should",
"be",
"named"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/func-names.js#L129-L135 | train | Reports an unexpected unnamed function. | [
30522,
3853,
3189,
9816,
2595,
5051,
10985,
4609,
18442,
20952,
4609,
7542,
1006,
13045,
1007,
1063,
6123,
1012,
3189,
1006,
1063,
13045,
1010,
4471,
3593,
1024,
1000,
13294,
1000,
1010,
2951,
1024,
1063,
2171,
1024,
2004,
8525,
3775,
4877,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/_Parser.js | tokenizeDoubleQuotedString | function tokenizeDoubleQuotedString(sNext, sOption, iAt) {
var c,
sEscape,
bEscaping = false,
i;
for (i = 1; i < sNext.length; i += 1) {
if (bEscaping) {
bEscaping = false;
} else {
c = sNext[i];
if (c === "%") {
sEscape = sNext.slice(i + 1, i + 3);
if (rEscapeDigits.test(sEsca... | javascript | function tokenizeDoubleQuotedString(sNext, sOption, iAt) {
var c,
sEscape,
bEscaping = false,
i;
for (i = 1; i < sNext.length; i += 1) {
if (bEscaping) {
bEscaping = false;
} else {
c = sNext[i];
if (c === "%") {
sEscape = sNext.slice(i + 1, i + 3);
if (rEscapeDigits.test(sEsca... | [
"function",
"tokenizeDoubleQuotedString",
"(",
"sNext",
",",
"sOption",
",",
"iAt",
")",
"{",
"var",
"c",
",",
"sEscape",
",",
"bEscaping",
"=",
"false",
",",
"i",
";",
"for",
"(",
"i",
"=",
"1",
";",
"i",
"<",
"sNext",
".",
"length",
";",
"i",
"+=... | Tokenizes a c-like string. It starts and ends with a double quote, backslash is the escape
character. Both characters may be %-encoded.
@param {string} sNext The untokenized input starting with the opening quote
@param {string} sOption The option string (for an error message)
@param {number} iAt The position in the op... | [
"Tokenizes",
"a",
"c",
"-",
"like",
"string",
".",
"It",
"starts",
"and",
"ends",
"with",
"a",
"double",
"quote",
"backslash",
"is",
"the",
"escape",
"character",
".",
"Both",
"characters",
"may",
"be",
"%",
"-",
"encoded",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Parser.js#L655-L680 | train | Tokenizes a double - quoted string | [
30522,
3853,
19204,
3550,
7140,
3468,
28940,
27428,
3367,
4892,
1006,
1055,
2638,
18413,
1010,
2061,
16790,
1010,
24264,
2102,
1007,
1063,
13075,
1039,
1010,
7367,
15782,
5051,
1010,
2022,
15782,
4691,
1027,
6270,
1010,
1045,
1025,
2005,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/language/HTMLDOMDiff.js | function () {
var prev = prevNode();
if (prev && !prev.children) {
newEdit = {
type: "textReplace",
content: prev.content
};
} else {
newEdit = {
type: "textDelete"
... | javascript | function () {
var prev = prevNode();
if (prev && !prev.children) {
newEdit = {
type: "textReplace",
content: prev.content
};
} else {
newEdit = {
type: "textDelete"
... | [
"function",
"(",
")",
"{",
"var",
"prev",
"=",
"prevNode",
"(",
")",
";",
"if",
"(",
"prev",
"&&",
"!",
"prev",
".",
"children",
")",
"{",
"newEdit",
"=",
"{",
"type",
":",
"\"textReplace\"",
",",
"content",
":",
"prev",
".",
"content",
"}",
";",
... | Adds a textDelete edit for text node that is not in the new tree.
Note that we actually create a textReplace rather than a textDelete
if the previous node in current tree was a text node. We do this because
text nodes are not individually addressable and a delete event would
end up clearing out both that previous text ... | [
"Adds",
"a",
"textDelete",
"edit",
"for",
"text",
"node",
"that",
"is",
"not",
"in",
"the",
"new",
"tree",
".",
"Note",
"that",
"we",
"actually",
"create",
"a",
"textReplace",
"rather",
"than",
"a",
"textDelete",
"if",
"the",
"previous",
"node",
"in",
"c... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/HTMLDOMDiff.js#L266-L309 | train | This function is called when the text is inserted in the new DOM. It will add the textEdit to the new DOM. | [
30522,
3853,
1006,
1007,
1063,
13075,
3653,
2615,
1027,
3653,
16022,
10244,
1006,
1007,
1025,
2065,
1006,
3653,
2615,
1004,
1004,
999,
3653,
2615,
1012,
2336,
1007,
1063,
2047,
2098,
4183,
1027,
1063,
2828,
1024,
1000,
3793,
2890,
24759,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
eslint/eslint | lib/rules/no-extra-parens.js | ruleApplies | function ruleApplies(node) {
if (node.type === "JSXElement" || node.type === "JSXFragment") {
const isSingleLine = node.loc.start.line === node.loc.end.line;
switch (IGNORE_JSX) {
// Exclude this JSX element from linting
case "all":
... | javascript | function ruleApplies(node) {
if (node.type === "JSXElement" || node.type === "JSXFragment") {
const isSingleLine = node.loc.start.line === node.loc.end.line;
switch (IGNORE_JSX) {
// Exclude this JSX element from linting
case "all":
... | [
"function",
"ruleApplies",
"(",
"node",
")",
"{",
"if",
"(",
"node",
".",
"type",
"===",
"\"JSXElement\"",
"||",
"node",
".",
"type",
"===",
"\"JSXFragment\"",
")",
"{",
"const",
"isSingleLine",
"=",
"node",
".",
"loc",
".",
"start",
".",
"line",
"===",
... | Determines if this rule should be enforced for a node given the current configuration.
@param {ASTNode} node - The node to be checked.
@returns {boolean} True if the rule should be enforced for this node.
@private | [
"Determines",
"if",
"this",
"rule",
"should",
"be",
"enforced",
"for",
"a",
"node",
"given",
"the",
"current",
"configuration",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-extra-parens.js#L90-L117 | train | Checks if a given node is allowed to be linted | [
30522,
3853,
3627,
29098,
11983,
1006,
13045,
1007,
1063,
2065,
1006,
13045,
1012,
2828,
1027,
1027,
1027,
1000,
1046,
2015,
2595,
12260,
3672,
1000,
1064,
1064,
13045,
1012,
2828,
1027,
1027,
1027,
1000,
1046,
2015,
2595,
27843,
21693,
476... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/timepicker/bootstrap-timepicker.js | function() {
if (this.isInline) {
return;
}
var widgetWidth = this.$widget.outerWidth(), widgetHeight = this.$widget.outerHeight(), visualPadding = 10, windowWidth =
$(window).width(), windowHeight = $(window).height(), scrollTop = $(window).scrollTop();
var zIndex = parseInt(th... | javascript | function() {
if (this.isInline) {
return;
}
var widgetWidth = this.$widget.outerWidth(), widgetHeight = this.$widget.outerHeight(), visualPadding = 10, windowWidth =
$(window).width(), windowHeight = $(window).height(), scrollTop = $(window).scrollTop();
var zIndex = parseInt(th... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"isInline",
")",
"{",
"return",
";",
"}",
"var",
"widgetWidth",
"=",
"this",
".",
"$widget",
".",
"outerWidth",
"(",
")",
",",
"widgetHeight",
"=",
"this",
".",
"$widget",
".",
"outerHeight",
"(",
")... | This method was adapted from bootstrap-datepicker. | [
"This",
"method",
"was",
"adapted",
"from",
"bootstrap",
"-",
"datepicker",
"."
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/timepicker/bootstrap-timepicker.js#L659-L712 | train | Calculate the position of the widget | [
30522,
3853,
1006,
1007,
1063,
2065,
1006,
2023,
1012,
2003,
2378,
4179,
1007,
1063,
2709,
1025,
1065,
13075,
15536,
24291,
9148,
11927,
2232,
1027,
2023,
1012,
1002,
15536,
24291,
1012,
6058,
9148,
11927,
2232,
1006,
1007,
1010,
15536,
242... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
aws/aws-sdk-js | lib/service.js | defineMethods | function defineMethods(svc) {
AWS.util.each(svc.prototype.api.operations, function iterator(method) {
if (svc.prototype[method]) return;
var operation = svc.prototype.api.operations[method];
if (operation.authtype === 'none') {
svc.prototype[method] = function (params, callback) {
... | javascript | function defineMethods(svc) {
AWS.util.each(svc.prototype.api.operations, function iterator(method) {
if (svc.prototype[method]) return;
var operation = svc.prototype.api.operations[method];
if (operation.authtype === 'none') {
svc.prototype[method] = function (params, callback) {
... | [
"function",
"defineMethods",
"(",
"svc",
")",
"{",
"AWS",
".",
"util",
".",
"each",
"(",
"svc",
".",
"prototype",
".",
"api",
".",
"operations",
",",
"function",
"iterator",
"(",
"method",
")",
"{",
"if",
"(",
"svc",
".",
"prototype",
"[",
"method",
... | Adds one method for each operation described in the api configuration
@api private | [
"Adds",
"one",
"method",
"for",
"each",
"operation",
"described",
"in",
"the",
"api",
"configuration"
] | c23e5f0edd150f8885267e5f7c8a564f8e6e8562 | https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/service.js#L663-L677 | train | Define methods for the service | [
30522,
3853,
9375,
11368,
6806,
5104,
1006,
17917,
2278,
1007,
1063,
22091,
2015,
1012,
21183,
4014,
1012,
2169,
1006,
17917,
2278,
1012,
8773,
1012,
17928,
1012,
3136,
1010,
3853,
2009,
6906,
4263,
1006,
4118,
1007,
1063,
2065,
1006,
17917... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SeleniumHQ/selenium | common/src/web/jquery-1.3.2.js | function(isTimeout){
// The request was aborted, clear the interval and decrement jQuery.active
if (xhr.readyState == 0) {
if (ival) {
// clear poll interval
clearInterval(ival);
ival = null;
// Handle the global AJAX counter
if ( s.global && ! --jQuery.active )
jQuery.event.tri... | javascript | function(isTimeout){
// The request was aborted, clear the interval and decrement jQuery.active
if (xhr.readyState == 0) {
if (ival) {
// clear poll interval
clearInterval(ival);
ival = null;
// Handle the global AJAX counter
if ( s.global && ! --jQuery.active )
jQuery.event.tri... | [
"function",
"(",
"isTimeout",
")",
"{",
"// The request was aborted, clear the interval and decrement jQuery.active",
"if",
"(",
"xhr",
".",
"readyState",
"==",
"0",
")",
"{",
"if",
"(",
"ival",
")",
"{",
"// clear poll interval",
"clearInterval",
"(",
"ival",
")",
... | Wait for a response to come back | [
"Wait",
"for",
"a",
"response",
"to",
"come",
"back"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/common/src/web/jquery-1.3.2.js#L3553-L3616 | train | The ajax request is complete | [
30522,
3853,
1006,
21541,
14428,
5833,
1007,
1063,
1013,
1013,
1996,
5227,
2001,
11113,
15613,
1010,
3154,
1996,
13483,
1998,
11703,
28578,
4765,
1046,
4226,
2854,
1012,
3161,
2065,
1006,
1060,
8093,
1012,
3201,
9153,
2618,
1027,
1027,
1014... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.