repo stringclasses 195
values | path stringlengths 4 99 | func_name stringlengths 0 41 | original_string stringlengths 72 56.1k | language stringclasses 1
value | code stringlengths 72 56.1k | code_tokens listlengths 25 8.12k | docstring stringlengths 2 12.5k | docstring_tokens listlengths 1 449 | sha stringclasses 197
values | url stringlengths 88 186 | partition stringclasses 1
value | summary stringlengths 8 338 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SeleniumHQ/selenium | third_party/js/mozmill/shared-modules/modal-dialog.js | mdObserver | function mdObserver(aOpener, aCallback) {
this._opener = aOpener;
this._callback = aCallback;
this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
this.exception = null;
this.finished = false;
} | javascript | function mdObserver(aOpener, aCallback) {
this._opener = aOpener;
this._callback = aCallback;
this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
this.exception = null;
this.finished = false;
} | [
"function",
"mdObserver",
"(",
"aOpener",
",",
"aCallback",
")",
"{",
"this",
".",
"_opener",
"=",
"aOpener",
";",
"this",
".",
"_callback",
"=",
"aCallback",
";",
"this",
".",
"_timer",
"=",
"Cc",
"[",
"\"@mozilla.org/timer;1\"",
"]",
".",
"createInstance",... | Observer object to find the modal dialog spawned by a controller
@constructor
@class Observer used to find a modal dialog
@param {object} aOpener
Window which is the opener of the modal dialog
@param {function} aCallback
The callback handler to use to interact with the modal dialog | [
"Observer",
"object",
"to",
"find",
"the",
"modal",
"dialog",
"spawned",
"by",
"a",
"controller"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/modal-dialog.js#L55-L62 | train | A function that is called when the md - observer is ready. | [
30522,
3853,
9108,
16429,
8043,
6299,
1006,
20118,
11837,
2121,
1010,
9353,
8095,
5963,
1007,
1063,
2023,
1012,
1035,
16181,
1027,
20118,
11837,
2121,
1025,
2023,
1012,
1035,
2655,
5963,
1027,
9353,
8095,
5963,
1025,
2023,
1012,
1035,
25309... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 = zr;
// 添加动画
var animators = this.animators;
if (animators) {
for (var i = 0; i < animators.length; i++) {
zr.animation.addAnimator(animators[i]);
}
}
if (this.clipPath) {
this.clipPath.addSel... | javascript | function (zr) {
this.__zr = zr;
// 添加动画
var animators = this.animators;
if (animators) {
for (var i = 0; i < animators.length; i++) {
zr.animation.addAnimator(animators[i]);
}
}
if (this.clipPath) {
this.clipPath.addSel... | [
"function",
"(",
"zr",
")",
"{",
"this",
".",
"__zr",
"=",
"zr",
";",
"// 添加动画",
"var",
"animators",
"=",
"this",
".",
"animators",
";",
"if",
"(",
"animators",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"animators",
".",
"length"... | Add self from zrender instance.
Not recursively because it will be invoked when element added to storage.
@param {module:zrender/ZRender} zr | [
"Add",
"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#L222-L235 | train | ZRZR 动画动画动画动画动画动画动画动画动画动画动画动画动画动画动画动 | [
30522,
3853,
1006,
1062,
2099,
1007,
1063,
2023,
1012,
1035,
1035,
1062,
2099,
1027,
1062,
2099,
1025,
1013,
1013,
100,
1779,
100,
100,
13075,
25132,
2015,
1027,
2023,
1012,
25132,
2015,
1025,
2065,
1006,
25132,
2015,
1007,
1063,
2005,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/format/NumberFormat.js | parseNumberAndUnit | function parseNumberAndUnit(mUnitPatterns, sValue) {
var oBestMatch = {
numberValue: undefined,
cldrCode: []
};
if (typeof sValue !== "string") {
return oBestMatch;
}
var iBestLength = Number.POSITIVE_INFINITY;
var sUnitCode, sKey;
for (sUnitCode in mUnitPatterns) {
for (sKey in mUnitPatterns[... | javascript | function parseNumberAndUnit(mUnitPatterns, sValue) {
var oBestMatch = {
numberValue: undefined,
cldrCode: []
};
if (typeof sValue !== "string") {
return oBestMatch;
}
var iBestLength = Number.POSITIVE_INFINITY;
var sUnitCode, sKey;
for (sUnitCode in mUnitPatterns) {
for (sKey in mUnitPatterns[... | [
"function",
"parseNumberAndUnit",
"(",
"mUnitPatterns",
",",
"sValue",
")",
"{",
"var",
"oBestMatch",
"=",
"{",
"numberValue",
":",
"undefined",
",",
"cldrCode",
":",
"[",
"]",
"}",
";",
"if",
"(",
"typeof",
"sValue",
"!==",
"\"string\"",
")",
"{",
"return... | Returns the cldr code and the number value by checking each pattern and finding the best match.
1. iterate over each unit pattern, e.g. "{0}m", "{0}km"
1a. convert it to a reg exp pattern, e.g. "^(.+)m$"
1b. match it with the input "12km" and store the value "12k" and the unit value "m"
1c. do this for each pattern an... | [
"Returns",
"the",
"cldr",
"code",
"and",
"the",
"number",
"value",
"by",
"checking",
"each",
"pattern",
"and",
"finding",
"the",
"best",
"match",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/format/NumberFormat.js#L1884-L1955 | train | Parses the input value and returns the best match | [
30522,
3853,
11968,
5054,
29440,
5685,
19496,
2102,
1006,
14163,
3490,
25856,
20097,
3619,
1010,
17917,
2389,
5657,
1007,
1063,
13075,
15578,
3367,
18900,
2818,
1027,
1063,
2193,
10175,
5657,
1024,
6151,
28344,
1010,
18856,
13626,
16044,
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... |
facebook/relay | packages/relay-runtime/util/getRelayHandleKey.js | getRelayHandleKey | function getRelayHandleKey(
handleName: string,
key: ?string,
fieldName: ?string,
): string {
if (key && key !== DEFAULT_HANDLE_KEY) {
return `__${key}_${handleName}`;
}
invariant(
fieldName != null,
'getRelayHandleKey: Expected either `fieldName` or `key` in `handle` to be provided',
);
re... | javascript | function getRelayHandleKey(
handleName: string,
key: ?string,
fieldName: ?string,
): string {
if (key && key !== DEFAULT_HANDLE_KEY) {
return `__${key}_${handleName}`;
}
invariant(
fieldName != null,
'getRelayHandleKey: Expected either `fieldName` or `key` in `handle` to be provided',
);
re... | [
"function",
"getRelayHandleKey",
"(",
"handleName",
":",
"string",
",",
"key",
":",
"?",
"string",
",",
"fieldName",
":",
"?",
"string",
",",
")",
":",
"string",
"{",
"if",
"(",
"key",
"&&",
"key",
"!==",
"DEFAULT_HANDLE_KEY",
")",
"{",
"return",
"`",
... | @internal
Helper to create a unique name for a handle field based on the handle name, handle key and
source field. | [
"@internal"
] | 7fb9be5182b9650637d7b92ead9a42713ac30aa4 | https://github.com/facebook/relay/blob/7fb9be5182b9650637d7b92ead9a42713ac30aa4/packages/relay-runtime/util/getRelayHandleKey.js#L23-L37 | train | Returns the key for a relay handle | [
30522,
3853,
2131,
16570,
4710,
11774,
2571,
14839,
1006,
5047,
18442,
1024,
5164,
1010,
3145,
1024,
1029,
5164,
1010,
2492,
18442,
1024,
1029,
5164,
1010,
1007,
1024,
5164,
1063,
2065,
1006,
3145,
1004,
1004,
3145,
999,
1027,
1027,
12398,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
TryGhost/Ghost | core/server/data/importer/index.js | function (directory) {
// Globs match content in the root or inside a single directory
var extMatchesBase = glob.sync(this.getExtensionGlob(this.getExtensions(), ROOT_OR_SINGLE_DIR), {cwd: directory}),
extMatchesAll = glob.sync(
this.getExtensionGlob(this.getExtensions(), ALL... | javascript | function (directory) {
// Globs match content in the root or inside a single directory
var extMatchesBase = glob.sync(this.getExtensionGlob(this.getExtensions(), ROOT_OR_SINGLE_DIR), {cwd: directory}),
extMatchesAll = glob.sync(
this.getExtensionGlob(this.getExtensions(), ALL... | [
"function",
"(",
"directory",
")",
"{",
"// Globs match content in the root or inside a single directory",
"var",
"extMatchesBase",
"=",
"glob",
".",
"sync",
"(",
"this",
".",
"getExtensionGlob",
"(",
"this",
".",
"getExtensions",
"(",
")",
",",
"ROOT_OR_SINGLE_DIR",
... | Checks the content of a zip folder to see if it is valid.
Importable content includes any files or directories which the handlers can process
Importable content must be found either in the root, or inside one base directory
@param {String} directory
@returns {Promise} | [
"Checks",
"the",
"content",
"of",
"a",
"zip",
"folder",
"to",
"see",
"if",
"it",
"is",
"valid",
".",
"Importable",
"content",
"includes",
"any",
"files",
"or",
"directories",
"which",
"the",
"handlers",
"can",
"process",
"Importable",
"content",
"must",
"be"... | bb7bb55cf3e60af99ebbc56099928827b58461bc | https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/data/importer/index.js#L138-L165 | train | Returns true if the directory contains importable files or images | [
30522,
3853,
1006,
14176,
1007,
1063,
1013,
1013,
1043,
4135,
5910,
2674,
4180,
1999,
1996,
7117,
2030,
2503,
1037,
2309,
14176,
13075,
4654,
29418,
10649,
2229,
15058,
1027,
1043,
4135,
2497,
1012,
26351,
1006,
2023,
1012,
2131,
10288,
290... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
angular/material | src/core/util/animation/animate.js | function (source, destination) {
if (!source) return null;
destination = destination || {};
angular.forEach('left top right bottom width height'.split(' '), function (key) {
destination[key] = Math.round(source[key]);
});
destination.width = destination.width || (destination.rig... | javascript | function (source, destination) {
if (!source) return null;
destination = destination || {};
angular.forEach('left top right bottom width height'.split(' '), function (key) {
destination[key] = Math.round(source[key]);
});
destination.width = destination.width || (destination.rig... | [
"function",
"(",
"source",
",",
"destination",
")",
"{",
"if",
"(",
"!",
"source",
")",
"return",
"null",
";",
"destination",
"=",
"destination",
"||",
"{",
"}",
";",
"angular",
".",
"forEach",
"(",
"'left top right bottom width height'",
".",
"split",
"(",
... | Clone the Rect and calculate the height/width if needed | [
"Clone",
"the",
"Rect",
"and",
"calculate",
"the",
"height",
"/",
"width",
"if",
"needed"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/animation/animate.js#L220-L233 | train | Returns the nearest ancestor of source | [
30522,
3853,
1006,
3120,
1010,
7688,
1007,
1063,
2065,
1006,
999,
3120,
1007,
2709,
19701,
1025,
7688,
1027,
7688,
1064,
1064,
1063,
1065,
1025,
16108,
1012,
18921,
6776,
1006,
1005,
2187,
2327,
2157,
3953,
9381,
4578,
1005,
1012,
3975,
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... | |
facebook/create-react-app | packages/react-dev-utils/webpackHotDevClient.js | handleSuccess | function handleSuccess() {
clearOutdatedErrors();
var isHotUpdate = !isFirstCompilation;
isFirstCompilation = false;
hasCompileErrors = false;
// Attempt to apply hot updates or reload.
if (isHotUpdate) {
tryApplyUpdates(function onHotUpdateSuccess() {
// Only dismiss it when we're sure it's a h... | javascript | function handleSuccess() {
clearOutdatedErrors();
var isHotUpdate = !isFirstCompilation;
isFirstCompilation = false;
hasCompileErrors = false;
// Attempt to apply hot updates or reload.
if (isHotUpdate) {
tryApplyUpdates(function onHotUpdateSuccess() {
// Only dismiss it when we're sure it's a h... | [
"function",
"handleSuccess",
"(",
")",
"{",
"clearOutdatedErrors",
"(",
")",
";",
"var",
"isHotUpdate",
"=",
"!",
"isFirstCompilation",
";",
"isFirstCompilation",
"=",
"false",
";",
"hasCompileErrors",
"=",
"false",
";",
"// Attempt to apply hot updates or reload.",
"... | Successful compilation. | [
"Successful",
"compilation",
"."
] | 57ef103440c24e41b0d7dc82b7ad7fc1dc817eca | https://github.com/facebook/create-react-app/blob/57ef103440c24e41b0d7dc82b7ad7fc1dc817eca/packages/react-dev-utils/webpackHotDevClient.js#L97-L112 | train | Handle the success of the compilation. | [
30522,
3853,
16024,
14194,
9623,
2015,
1006,
1007,
1063,
3154,
5833,
13701,
4063,
29165,
2015,
1006,
1007,
1025,
13075,
2003,
12326,
6279,
13701,
1027,
999,
2003,
8873,
12096,
9006,
8197,
13490,
1025,
2003,
8873,
12096,
9006,
8197,
13490,
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... |
openlayers/openlayers | src/ol/format/TopoJSON.js | readMultiLineStringGeometry | function readMultiLineStringGeometry(object, arcs) {
const coordinates = [];
for (let i = 0, ii = object['arcs'].length; i < ii; ++i) {
coordinates[i] = concatenateArcs(object['arcs'][i], arcs);
}
return new MultiLineString(coordinates);
} | javascript | function readMultiLineStringGeometry(object, arcs) {
const coordinates = [];
for (let i = 0, ii = object['arcs'].length; i < ii; ++i) {
coordinates[i] = concatenateArcs(object['arcs'][i], arcs);
}
return new MultiLineString(coordinates);
} | [
"function",
"readMultiLineStringGeometry",
"(",
"object",
",",
"arcs",
")",
"{",
"const",
"coordinates",
"=",
"[",
"]",
";",
"for",
"(",
"let",
"i",
"=",
"0",
",",
"ii",
"=",
"object",
"[",
"'arcs'",
"]",
".",
"length",
";",
"i",
"<",
"ii",
";",
"+... | Create a multi-linestring from a TopoJSON geometry object.
@param {TopoJSONMultiLineString} object TopoJSON object.
@param {Array<Array<import("../coordinate.js").Coordinate>>} arcs Array of arcs.
@return {MultiLineString} Geometry. | [
"Create",
"a",
"multi",
"-",
"linestring",
"from",
"a",
"TopoJSON",
"geometry",
"object",
"."
] | f366eaea522388fb575b11010e69d309164baca7 | https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/format/TopoJSON.js#L245-L251 | train | Read a multi line string geometry from an object | [
30522,
3853,
3191,
12274,
7096,
18622,
5267,
18886,
3070,
3351,
8462,
11129,
1006,
4874,
1010,
29137,
1007,
1063,
9530,
3367,
12093,
1027,
1031,
1033,
1025,
2005,
1006,
2292,
1045,
1027,
1014,
1010,
2462,
1027,
4874,
1031,
1005,
29137,
1005... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eslint/eslint | lib/rules/curly.js | isOneLiner | function isOneLiner(node) {
const first = sourceCode.getFirstToken(node),
last = sourceCode.getLastToken(node);
return first.loc.start.line === last.loc.end.line;
} | javascript | function isOneLiner(node) {
const first = sourceCode.getFirstToken(node),
last = sourceCode.getLastToken(node);
return first.loc.start.line === last.loc.end.line;
} | [
"function",
"isOneLiner",
"(",
"node",
")",
"{",
"const",
"first",
"=",
"sourceCode",
".",
"getFirstToken",
"(",
"node",
")",
",",
"last",
"=",
"sourceCode",
".",
"getLastToken",
"(",
"node",
")",
";",
"return",
"first",
".",
"loc",
".",
"start",
".",
... | Determines if a given node is a one-liner.
@param {ASTNode} node The node to check.
@returns {boolean} True if the node is a one-liner.
@private | [
"Determines",
"if",
"a",
"given",
"node",
"is",
"a",
"one",
"-",
"liner",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/curly.js#L99-L104 | train | Check if node is a one - liner | [
30522,
3853,
11163,
11877,
26455,
1006,
13045,
1007,
1063,
9530,
3367,
2034,
1027,
3120,
16044,
1012,
2131,
8873,
12096,
18715,
2368,
1006,
13045,
1007,
1010,
2197,
1027,
3120,
16044,
1012,
2131,
8523,
9284,
7520,
1006,
13045,
1007,
1025,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular/material | release.js | getNewVersion | function getNewVersion () {
header();
const options = getVersionOptions(oldVersion);
let key, version;
log(`The current version is ${oldVersion.cyan}.`);
log('');
log('What should the next version be?');
for (key in options) { log((+key + 1) + ') ' + options[ key ].cyan); }
log('');
... | javascript | function getNewVersion () {
header();
const options = getVersionOptions(oldVersion);
let key, version;
log(`The current version is ${oldVersion.cyan}.`);
log('');
log('What should the next version be?');
for (key in options) { log((+key + 1) + ') ' + options[ key ].cyan); }
log('');
... | [
"function",
"getNewVersion",
"(",
")",
"{",
"header",
"(",
")",
";",
"const",
"options",
"=",
"getVersionOptions",
"(",
"oldVersion",
")",
";",
"let",
"key",
",",
"version",
";",
"log",
"(",
"`",
"${",
"oldVersion",
".",
"cyan",
"}",
"`",
")",
";",
"... | prompts the user for the new version | [
"prompts",
"the",
"user",
"for",
"the",
"new",
"version"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/release.js#L114-L179 | train | Get the new version | [
30522,
3853,
2131,
2638,
2860,
27774,
1006,
1007,
1063,
20346,
1006,
1007,
1025,
9530,
3367,
7047,
1027,
2131,
27774,
7361,
9285,
1006,
2214,
27774,
1007,
1025,
2292,
3145,
1010,
2544,
1025,
8833,
1006,
1036,
1996,
2783,
2544,
2003,
1002,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ecomfe/zrender | src/graphic/helper/text.js | renderPlainText | function renderPlainText(hostEl, ctx, text, style, rect, prevEl) {
'use strict';
var needDrawBg = needDrawBackground(style);
var prevStyle;
var checkCache = false;
var cachedByMe = ctx.__attrCachedBy === ContextCachedBy.PLAIN_TEXT;
// Only take and check cache for `Text` el, but not RectText.... | javascript | function renderPlainText(hostEl, ctx, text, style, rect, prevEl) {
'use strict';
var needDrawBg = needDrawBackground(style);
var prevStyle;
var checkCache = false;
var cachedByMe = ctx.__attrCachedBy === ContextCachedBy.PLAIN_TEXT;
// Only take and check cache for `Text` el, but not RectText.... | [
"function",
"renderPlainText",
"(",
"hostEl",
",",
"ctx",
",",
"text",
",",
"style",
",",
"rect",
",",
"prevEl",
")",
"{",
"'use strict'",
";",
"var",
"needDrawBg",
"=",
"needDrawBackground",
"(",
"style",
")",
";",
"var",
"prevStyle",
";",
"var",
"checkCa... | Avoid setting to ctx according to prevEl if possible for performance in scenarios of large amount text. | [
"Avoid",
"setting",
"to",
"ctx",
"according",
"to",
"prevEl",
"if",
"possible",
"for",
"performance",
"in",
"scenarios",
"of",
"large",
"amount",
"text",
"."
] | 30321b57cba3149c30eacb0c1e18276f0f001b9f | https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/graphic/helper/text.js#L81-L234 | train | Render plain text | [
30522,
3853,
17552,
24759,
22325,
10288,
2102,
1006,
21071,
1010,
14931,
2595,
1010,
3793,
1010,
2806,
1010,
28667,
2102,
1010,
3653,
15985,
1007,
1063,
1005,
2224,
9384,
1005,
1025,
13075,
2342,
7265,
2860,
2497,
2290,
1027,
2342,
7265,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.ux3/src/sap/ui/ux3/ExactList.js | function(oList, iLevel){
oList._iLevel = iLevel;
var aLists = oList.getSubLists();
for (var i = 0; i < aLists.length; i++) {
setLevel(aLists[i], iLevel + 1);
}
} | javascript | function(oList, iLevel){
oList._iLevel = iLevel;
var aLists = oList.getSubLists();
for (var i = 0; i < aLists.length; i++) {
setLevel(aLists[i], iLevel + 1);
}
} | [
"function",
"(",
"oList",
",",
"iLevel",
")",
"{",
"oList",
".",
"_iLevel",
"=",
"iLevel",
";",
"var",
"aLists",
"=",
"oList",
".",
"getSubLists",
"(",
")",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"aLists",
".",
"length",
";",
"i",
... | Sets the level of the list and its sublists | [
"Sets",
"the",
"level",
"of",
"the",
"list",
"and",
"its",
"sublists"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/ExactList.js#L1223-L1229 | train | Sets the level of the list | [
30522,
3853,
1006,
19330,
2923,
1010,
17869,
15985,
1007,
1063,
19330,
2923,
1012,
1035,
17869,
15985,
1027,
17869,
15985,
1025,
13075,
4862,
12837,
1027,
19330,
2923,
1012,
4152,
12083,
27103,
1006,
1007,
1025,
2005,
1006,
13075,
1045,
1027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/base/ExpressionParser.js | error | function error(sMessage, sInput, iAt) {
var oError = new SyntaxError(sMessage);
oError.at = iAt;
oError.text = sInput;
if (iAt !== undefined) {
sMessage += " at position " + iAt;
}
Log.error(sMessage, sInput, sExpressionParser);
throw oError;
} | javascript | function error(sMessage, sInput, iAt) {
var oError = new SyntaxError(sMessage);
oError.at = iAt;
oError.text = sInput;
if (iAt !== undefined) {
sMessage += " at position " + iAt;
}
Log.error(sMessage, sInput, sExpressionParser);
throw oError;
} | [
"function",
"error",
"(",
"sMessage",
",",
"sInput",
",",
"iAt",
")",
"{",
"var",
"oError",
"=",
"new",
"SyntaxError",
"(",
"sMessage",
")",
";",
"oError",
".",
"at",
"=",
"iAt",
";",
"oError",
".",
"text",
"=",
"sInput",
";",
"if",
"(",
"iAt",
"!=... | Throws a SyntaxError with the given <code>sMessage</code> as <code>message</code>, its
<code>at</code> property set to <code>iAt</code> and its <code>text</code> property to
<code>sInput</code>.
In addition, logs a corresponding error message to the console with <code>sInput</code>
as details.
@param {string} sMessage... | [
"Throws",
"a",
"SyntaxError",
"with",
"the",
"given",
"<code",
">",
"sMessage<",
"/",
"code",
">",
"as",
"<code",
">",
"message<",
"/",
"code",
">",
"its",
"<code",
">",
"at<",
"/",
"code",
">",
"property",
"set",
"to",
"<code",
">",
"iAt<",
"/",
"co... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/ExpressionParser.js#L491-L501 | train | Error handler for syntax error | [
30522,
3853,
7561,
1006,
15488,
7971,
4270,
1010,
8254,
18780,
1010,
30524,
1025,
2065,
1006,
24264,
2102,
999,
1027,
1027,
6151,
28344,
1007,
1063,
15488,
7971,
4270,
1009,
1027,
1000,
2012,
2597,
1000,
1009,
24264,
2102,
1025,
1065,
8833,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jakesgordon/javascript-state-machine | src/config.js | Config | function Config(options, StateMachine) {
options = options || {};
this.options = options; // preserving original options can be useful (e.g visualize plugin)
this.defaults = StateMachine.defaults;
this.states = [];
this.transitions = [];
this.map = {};
this.lifecycle = this.configu... | javascript | function Config(options, StateMachine) {
options = options || {};
this.options = options; // preserving original options can be useful (e.g visualize plugin)
this.defaults = StateMachine.defaults;
this.states = [];
this.transitions = [];
this.map = {};
this.lifecycle = this.configu... | [
"function",
"Config",
"(",
"options",
",",
"StateMachine",
")",
"{",
"options",
"=",
"options",
"||",
"{",
"}",
";",
"this",
".",
"options",
"=",
"options",
";",
"// preserving original options can be useful (e.g visualize plugin)",
"this",
".",
"defaults",
"=",
"... | ------------------------------------------------------------------------------------------------- | [
"-------------------------------------------------------------------------------------------------"
] | 0d603577423244228cebcd62e60dbbfff27c6ea3 | https://github.com/jakesgordon/javascript-state-machine/blob/0d603577423244228cebcd62e60dbbfff27c6ea3/src/config.js#L10-L30 | train | Config constructor. | [
30522,
3853,
9530,
8873,
2290,
1006,
7047,
1010,
2110,
22911,
14014,
1007,
1063,
7047,
1027,
7047,
1064,
1064,
1063,
1065,
1025,
2023,
1012,
7047,
1027,
7047,
1025,
1013,
1013,
15224,
2434,
7047,
2064,
2022,
6179,
1006,
1041,
1012,
1043,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/RTAElementMover.js | fnIsValidForMove | function fnIsValidForMove(oOverlay, bOnRegistration) {
var bValid = false,
oDesignTimeMetadata = oOverlay.getDesignTimeMetadata(),
oParentElementOverlay = oOverlay.getParentElementOverlay();
if (!oDesignTimeMetadata || !oParentElementOverlay) {
return false;
}
var oRelevantContainer = oOverlay.getRel... | javascript | function fnIsValidForMove(oOverlay, bOnRegistration) {
var bValid = false,
oDesignTimeMetadata = oOverlay.getDesignTimeMetadata(),
oParentElementOverlay = oOverlay.getParentElementOverlay();
if (!oDesignTimeMetadata || !oParentElementOverlay) {
return false;
}
var oRelevantContainer = oOverlay.getRel... | [
"function",
"fnIsValidForMove",
"(",
"oOverlay",
",",
"bOnRegistration",
")",
"{",
"var",
"bValid",
"=",
"false",
",",
"oDesignTimeMetadata",
"=",
"oOverlay",
".",
"getDesignTimeMetadata",
"(",
")",
",",
"oParentElementOverlay",
"=",
"oOverlay",
".",
"getParentEleme... | Check if the element is editable for the move
@param {sap.ui.dt.Overlay} oOverlay The overlay being moved or the aggregation overlay
@param {boolean} bOnRegistration if embedded, false if not
@return {boolean} true if editable | [
"Check",
"if",
"the",
"element",
"is",
"editable",
"for",
"the",
"move"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/RTAElementMover.js#L108-L153 | train | Checks if the given Overlay is valid for move. | [
30522,
3853,
1042,
8977,
10175,
3593,
14192,
21818,
1006,
1051,
7840,
8485,
1010,
14753,
2890,
24063,
8156,
1007,
1063,
13075,
1038,
10175,
3593,
1027,
6270,
1010,
24040,
5332,
16206,
7292,
11368,
8447,
2696,
1027,
1051,
7840,
8485,
1012,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/incubator-echarts | src/util/graphic.js | centerGraphic | function centerGraphic(rect, boundingRect) {
// Set rect to center, keep width / height ratio.
var aspect = boundingRect.width / boundingRect.height;
var width = rect.height * aspect;
var height;
if (width <= rect.width) {
height = rect.height;
}
else {
width = rect.width;
... | javascript | function centerGraphic(rect, boundingRect) {
// Set rect to center, keep width / height ratio.
var aspect = boundingRect.width / boundingRect.height;
var width = rect.height * aspect;
var height;
if (width <= rect.width) {
height = rect.height;
}
else {
width = rect.width;
... | [
"function",
"centerGraphic",
"(",
"rect",
",",
"boundingRect",
")",
"{",
"// Set rect to center, keep width / height ratio.",
"var",
"aspect",
"=",
"boundingRect",
".",
"width",
"/",
"boundingRect",
".",
"height",
";",
"var",
"width",
"=",
"rect",
".",
"height",
"... | Get position of centered element in bounding box.
@param {Object} rect element local bounding box
@param {Object} boundingRect constraint bounding box
@return {Object} element position containing x, y, width, and height | [
"Get",
"position",
"of",
"centered",
"element",
"in",
"bounding",
"box",
"."
] | 4d0ea095dc3929cb6de40c45748826e7999c7aa8 | https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/util/graphic.js#L130-L151 | train | Center the image in the cluster | [
30522,
3853,
2415,
14773,
1006,
28667,
2102,
1010,
5391,
2075,
2890,
6593,
1007,
1063,
1013,
1013,
2275,
28667,
2102,
2000,
2415,
1010,
2562,
9381,
1013,
4578,
6463,
1012,
13075,
7814,
1027,
5391,
2075,
2890,
6593,
1012,
9381,
1013,
5391,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_AnnotationHelperExpression.js | function (oInterface, oPathValue) {
var bExpression = oPathValue.asExpression,
aParts = [],
oResult,
aResults = [];
// needed so that we can safely call the forEach
Basics.expectType(oPathValue, "array");
oPathValue.value.forEach(function (oUnused, i) {
// an embedded concat must use expres... | javascript | function (oInterface, oPathValue) {
var bExpression = oPathValue.asExpression,
aParts = [],
oResult,
aResults = [];
// needed so that we can safely call the forEach
Basics.expectType(oPathValue, "array");
oPathValue.value.forEach(function (oUnused, i) {
// an embedded concat must use expres... | [
"function",
"(",
"oInterface",
",",
"oPathValue",
")",
"{",
"var",
"bExpression",
"=",
"oPathValue",
".",
"asExpression",
",",
"aParts",
"=",
"[",
"]",
",",
"oResult",
",",
"aResults",
"=",
"[",
"]",
";",
"// needed so that we can safely call the forEach",
"Basi... | Handling of "14.5.3.1.1 Function odata.concat".
@param {sap.ui.core.util.XMLPreprocessor.IContext|sap.ui.model.Context} oInterface
the callback interface related to the current formatter call
@param {object} oPathValue
path and value information pointing to the parameters array (see Expression object)
@returns {object... | [
"Handling",
"of",
"14",
".",
"5",
".",
"3",
".",
"1",
".",
"1",
"Function",
"odata",
".",
"concat",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_AnnotationHelperExpression.js#L190-L221 | train | Converts an array of parameters to strings | [
30522,
3853,
1006,
1051,
18447,
2121,
12172,
1010,
6728,
8988,
10175,
5657,
1007,
1063,
13075,
2022,
2595,
20110,
3258,
1027,
6728,
8988,
10175,
5657,
1012,
2004,
10288,
20110,
3258,
1010,
4237,
2015,
1027,
1031,
1033,
1010,
10848,
23722,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.m/src/sap/m/HyphenationSupport.js | diffTexts | function diffTexts(mTextsMain, mTextsToDiff) {
var aDiffs = [];
Object.keys(mTextsMain).forEach(function(sKey) {
if (!(sKey in mTextsToDiff && mTextsMain[sKey] === mTextsToDiff[sKey])) {
aDiffs.push(sKey);
}
});
return aDiffs;
} | javascript | function diffTexts(mTextsMain, mTextsToDiff) {
var aDiffs = [];
Object.keys(mTextsMain).forEach(function(sKey) {
if (!(sKey in mTextsToDiff && mTextsMain[sKey] === mTextsToDiff[sKey])) {
aDiffs.push(sKey);
}
});
return aDiffs;
} | [
"function",
"diffTexts",
"(",
"mTextsMain",
",",
"mTextsToDiff",
")",
"{",
"var",
"aDiffs",
"=",
"[",
"]",
";",
"Object",
".",
"keys",
"(",
"mTextsMain",
")",
".",
"forEach",
"(",
"function",
"(",
"sKey",
")",
"{",
"if",
"(",
"!",
"(",
"sKey",
"in",
... | Checks which keys are not present in mTextsToDiff or their values are different
@param {map} mTextsMain The map of texts to compare
@param {map} mTextsToDiff The map of texts to compare against
@returns {Array} An array containing all keys for which there is difference
@private | [
"Checks",
"which",
"keys",
"are",
"not",
"present",
"in",
"mTextsToDiff",
"or",
"their",
"values",
"are",
"different"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/HyphenationSupport.js#L89-L97 | train | diff text objects | [
30522,
3853,
4487,
4246,
18209,
2015,
1006,
11047,
10288,
3215,
24238,
1010,
11047,
10288,
3215,
3406,
4305,
4246,
1007,
1063,
13075,
27133,
21807,
1027,
1031,
1033,
1025,
4874,
1012,
6309,
1006,
11047,
10288,
3215,
24238,
1007,
1012,
18921,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | js/mui.jsonp.js | function(url, data, jsonpParam, callbacnName) {
if (jsonpParam) {
url = url.replace(jsonpParam + '=?', jsonpParam + '=' + callbacnName);
} else {
data['callback'] = callbacnName;
}
var buffer = [];
for (var key in data) {
buffer.push(key + '=' + encodeURIComponent(data[key]));
}
return url + (url... | javascript | function(url, data, jsonpParam, callbacnName) {
if (jsonpParam) {
url = url.replace(jsonpParam + '=?', jsonpParam + '=' + callbacnName);
} else {
data['callback'] = callbacnName;
}
var buffer = [];
for (var key in data) {
buffer.push(key + '=' + encodeURIComponent(data[key]));
}
return url + (url... | [
"function",
"(",
"url",
",",
"data",
",",
"jsonpParam",
",",
"callbacnName",
")",
"{",
"if",
"(",
"jsonpParam",
")",
"{",
"url",
"=",
"url",
".",
"replace",
"(",
"jsonpParam",
"+",
"'=?'",
",",
"jsonpParam",
"+",
"'='",
"+",
"callbacnName",
")",
";",
... | 转换 URL,JSONP 只支持 get 方式的 queryString ,需将 data 拼入 url | [
"转换",
"URL,JSONP",
"只支持",
"get",
"方式的",
"queryString",
"需将",
"data",
"拼入",
"url"
] | ff74c90a1671a552f3604b1288bf38a4126312d0 | https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/js/mui.jsonp.js#L30-L41 | train | Add callback to url | [
30522,
3853,
1006,
24471,
2140,
1010,
2951,
1010,
1046,
3385,
13944,
6444,
1010,
2655,
3676,
2278,
9516,
4168,
1007,
1063,
2065,
1006,
1046,
3385,
13944,
6444,
1007,
1063,
24471,
2140,
1027,
24471,
2140,
1012,
5672,
1006,
1046,
3385,
13944,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/jquery.sap.history.js | onHashChange | function onHashChange(sHash){
var oRoute, iStep, oParsedHash, iNewHashIndex, sNavType;
//handle the nonbookmarkable hash
if (currentHash === undefined) {
//url with hash opened from bookmark
oParsedHash = parseHashToObject(sHash);
if (!oParsedHash || !oParsedHash.bBookmarkable) {
if (jQuery.... | javascript | function onHashChange(sHash){
var oRoute, iStep, oParsedHash, iNewHashIndex, sNavType;
//handle the nonbookmarkable hash
if (currentHash === undefined) {
//url with hash opened from bookmark
oParsedHash = parseHashToObject(sHash);
if (!oParsedHash || !oParsedHash.bBookmarkable) {
if (jQuery.... | [
"function",
"onHashChange",
"(",
"sHash",
")",
"{",
"var",
"oRoute",
",",
"iStep",
",",
"oParsedHash",
",",
"iNewHashIndex",
",",
"sNavType",
";",
"//handle the nonbookmarkable hash",
"if",
"(",
"currentHash",
"===",
"undefined",
")",
"{",
"//url with hash opened fr... | This is the main function that handles the hash change event.
@private | [
"This",
"is",
"the",
"main",
"function",
"that",
"handles",
"the",
"hash",
"change",
"event",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L577-L669 | train | This function is called when the hash is changed | [
30522,
3853,
2006,
14949,
16257,
18003,
2063,
1006,
21146,
4095,
1007,
1063,
13075,
20298,
10421,
1010,
21541,
13699,
1010,
6728,
11650,
2098,
14949,
2232,
1010,
1999,
7974,
14949,
10606,
3207,
2595,
1010,
1055,
2532,
2615,
13874,
1025,
1013,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
nhn/tui.editor | src/js/wysiwygCommands/code.js | styleCode | function styleCode(editor, sq) {
if (!sq.hasFormat('PRE') && sq.hasFormat('code')) {
sq.changeFormat(null, {tag: 'code'});
removeUnnecessaryCodeInNextToRange(editor.getSelection().cloneRange());
} else if (!sq.hasFormat('a') && !sq.hasFormat('PRE')) {
if (sq.hasFormat('b')) {
sq.removeBold();
... | javascript | function styleCode(editor, sq) {
if (!sq.hasFormat('PRE') && sq.hasFormat('code')) {
sq.changeFormat(null, {tag: 'code'});
removeUnnecessaryCodeInNextToRange(editor.getSelection().cloneRange());
} else if (!sq.hasFormat('a') && !sq.hasFormat('PRE')) {
if (sq.hasFormat('b')) {
sq.removeBold();
... | [
"function",
"styleCode",
"(",
"editor",
",",
"sq",
")",
"{",
"if",
"(",
"!",
"sq",
".",
"hasFormat",
"(",
"'PRE'",
")",
"&&",
"sq",
".",
"hasFormat",
"(",
"'code'",
")",
")",
"{",
"sq",
".",
"changeFormat",
"(",
"null",
",",
"{",
"tag",
":",
"'co... | Style code.
@param {object} editor - editor instance
@param {object} sq - squire editor instance | [
"Style",
"code",
"."
] | e75ab08c2a7ab07d1143e318f7cde135c5e3002e | https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/wysiwygCommands/code.js#L62-L81 | train | Style code in the editor | [
30522,
3853,
2806,
16044,
1006,
3559,
1010,
5490,
1007,
1063,
2065,
1006,
999,
5490,
1012,
2038,
14192,
4017,
1006,
1005,
3653,
1005,
1007,
1004,
1004,
5490,
1012,
2038,
14192,
4017,
1006,
1005,
3642,
1005,
1007,
1007,
1063,
5490,
1012,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular/material | src/components/menu/js/menuServiceProvider.js | calculateMenuPosition | function calculateMenuPosition(el, opts) {
var containerNode = el[0],
openMenuNode = el[0].firstElementChild,
openMenuNodeRect = openMenuNode.getBoundingClientRect(),
boundryNode = $document[0].body,
boundryNodeRect = boundryNode.getBoundingClientRect();
var menuStyle = $wi... | javascript | function calculateMenuPosition(el, opts) {
var containerNode = el[0],
openMenuNode = el[0].firstElementChild,
openMenuNodeRect = openMenuNode.getBoundingClientRect(),
boundryNode = $document[0].body,
boundryNodeRect = boundryNode.getBoundingClientRect();
var menuStyle = $wi... | [
"function",
"calculateMenuPosition",
"(",
"el",
",",
"opts",
")",
"{",
"var",
"containerNode",
"=",
"el",
"[",
"0",
"]",
",",
"openMenuNode",
"=",
"el",
"[",
"0",
"]",
".",
"firstElementChild",
",",
"openMenuNodeRect",
"=",
"openMenuNode",
".",
"getBoundingC... | Computes menu position and sets the style on the menu container
@param {HTMLElement} el - the menu container element
@param {object} opts - the interim element options object | [
"Computes",
"menu",
"position",
"and",
"sets",
"the",
"style",
"on",
"the",
"menu",
"container"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/menu/js/menuServiceProvider.js#L442-L576 | train | Calculates the position of the menu in the DOM | [
30522,
3853,
18422,
3549,
6279,
19234,
1006,
3449,
1010,
23569,
2015,
1007,
1063,
13075,
11661,
3630,
3207,
1027,
3449,
1031,
1014,
1033,
1010,
2330,
3549,
27819,
3207,
1027,
3449,
1031,
1014,
1033,
1012,
2034,
12260,
3672,
19339,
1010,
233... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | onSetPersistence | function onSetPersistence() {
var type = $('#persistence-type').val();
try {
auth.setPersistence(type).then(function() {
log('Persistence state change to "' + type + '".');
alertSuccess('Persistence state change to "' + type + '".');
}, function(error) {
alertError('Error: ' + error.code);... | javascript | function onSetPersistence() {
var type = $('#persistence-type').val();
try {
auth.setPersistence(type).then(function() {
log('Persistence state change to "' + type + '".');
alertSuccess('Persistence state change to "' + type + '".');
}, function(error) {
alertError('Error: ' + error.code);... | [
"function",
"onSetPersistence",
"(",
")",
"{",
"var",
"type",
"=",
"$",
"(",
"'#persistence-type'",
")",
".",
"val",
"(",
")",
";",
"try",
"{",
"auth",
".",
"setPersistence",
"(",
"type",
")",
".",
"then",
"(",
"function",
"(",
")",
"{",
"log",
"(",
... | Changes the Auth state persistence to the specified one. | [
"Changes",
"the",
"Auth",
"state",
"persistence",
"to",
"the",
"specified",
"one",
"."
] | 491598a499813dacc23724de5e237ec220cc560e | https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/demo/public/script.js#L289-L301 | train | Set persistence state | [
30522,
3853,
14447,
7347,
27870,
5897,
1006,
1007,
1063,
13075,
2828,
1027,
1002,
1006,
1005,
1001,
28297,
1011,
2828,
1005,
1007,
1012,
11748,
1006,
1007,
1025,
3046,
1063,
8740,
2705,
1012,
2275,
7347,
27870,
5897,
1006,
2828,
1007,
1012,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Freeboard/freeboard | js/freeboard.thirdparty.js | function(inst, date, defaultDate) {
var offsetNumeric = function(offset) {
var date = new Date();
date.setDate(date.getDate() + offset);
return date;
},
offsetString = function(offset) {
try {
return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
offset, $.datepicker._g... | javascript | function(inst, date, defaultDate) {
var offsetNumeric = function(offset) {
var date = new Date();
date.setDate(date.getDate() + offset);
return date;
},
offsetString = function(offset) {
try {
return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
offset, $.datepicker._g... | [
"function",
"(",
"inst",
",",
"date",
",",
"defaultDate",
")",
"{",
"var",
"offsetNumeric",
"=",
"function",
"(",
"offset",
")",
"{",
"var",
"date",
"=",
"new",
"Date",
"(",
")",
";",
"date",
".",
"setDate",
"(",
"date",
".",
"getDate",
"(",
")",
"... | /* A date may be specified as an exact value or a relative one. | [
"/",
"*",
"A",
"date",
"may",
"be",
"specified",
"as",
"an",
"exact",
"value",
"or",
"a",
"relative",
"one",
"."
] | 38789f6e8bd3d04f7d3b2c3427e509d00f2610fc | https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/js/freeboard.thirdparty.js#L9062-L9115 | train | This function is used to set the date property of the datepicker object. | [
30522,
3853,
1006,
16021,
2102,
1010,
3058,
1010,
12398,
13701,
1007,
1063,
13075,
16396,
19172,
22420,
1027,
3853,
1006,
16396,
1007,
1063,
13075,
3058,
1027,
2047,
3058,
1006,
1007,
1025,
3058,
1012,
2275,
13701,
1006,
3058,
1012,
2131,
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... | |
apache/incubator-echarts | src/chart/sankey/sankeyLayout.js | computeNodeBreadths | function computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) {
// Used to mark whether the edge is deleted. if it is deleted,
// the value is 0, otherwise it is 1.
var remainEdges = [];
// Storage each node's indegree.
var indegreeArr = [];
//Used to storage the node w... | javascript | function computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) {
// Used to mark whether the edge is deleted. if it is deleted,
// the value is 0, otherwise it is 1.
var remainEdges = [];
// Storage each node's indegree.
var indegreeArr = [];
//Used to storage the node w... | [
"function",
"computeNodeBreadths",
"(",
"nodes",
",",
"edges",
",",
"nodeWidth",
",",
"width",
",",
"height",
",",
"orient",
",",
"nodeAlign",
")",
"{",
"// Used to mark whether the edge is deleted. if it is deleted,",
"// the value is 0, otherwise it is 1.",
"var",
"remain... | Compute the x-position for each node.
Here we use Kahn algorithm to detect cycle when we traverse
the node to computer the initial x position.
@param {module:echarts/data/Graph~Node} nodes node of sankey view
@param {number} nodeWidth the dx of the node
@param {number} width the whole width of the area to draw t... | [
"Compute",
"the",
"x",
"-",
"position",
"for",
"each",
"node",
"."
] | 4d0ea095dc3929cb6de40c45748826e7999c7aa8 | https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/chart/sankey/sankeyLayout.js#L110-L179 | train | Compute the breadths of nodes | [
30522,
3853,
24134,
3630,
3207,
27035,
26830,
1006,
14164,
1010,
7926,
1010,
13045,
9148,
11927,
2232,
1010,
9381,
1010,
4578,
1010,
16865,
1010,
13045,
11475,
16206,
1007,
1063,
1013,
1013,
2109,
2000,
2928,
3251,
1996,
3341,
2003,
17159,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | getRangeSelectors | function getRangeSelectors(range) {
// There's currently no immediate way to access a given line in a Document, because it's just
// stored as a string. Eventually, we should have Documents cache the lines in the document
// as well, or make them use CodeMirror documents which do the same thing.... | javascript | function getRangeSelectors(range) {
// There's currently no immediate way to access a given line in a Document, because it's just
// stored as a string. Eventually, we should have Documents cache the lines in the document
// as well, or make them use CodeMirror documents which do the same thing.... | [
"function",
"getRangeSelectors",
"(",
"range",
")",
"{",
"// There's currently no immediate way to access a given line in a Document, because it's just",
"// stored as a string. Eventually, we should have Documents cache the lines in the document",
"// as well, or make them use CodeMirror documents ... | Given a TextRange, extracts the selector(s) for the rule in the range and returns it.
Assumes the range only contains one rule; if there's more than one, it will return the
selector(s) for the first rule.
@param {TextRange} range The range to extract the selector(s) from.
@return {string} The selector(s) for the rule i... | [
"Given",
"a",
"TextRange",
"extracts",
"the",
"selector",
"(",
"s",
")",
"for",
"the",
"rule",
"in",
"the",
"range",
"and",
"returns",
"it",
".",
"Assumes",
"the",
"range",
"only",
"contains",
"one",
"rule",
";",
"if",
"there",
"s",
"more",
"than",
"on... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/CSSUtils.js#L1826-L1845 | train | Get the selectors for a given range | [
30522,
3853,
2131,
24388,
6810,
2571,
24817,
1006,
2846,
1007,
1063,
1013,
1013,
2045,
1005,
1055,
2747,
2053,
6234,
2126,
2000,
3229,
1037,
2445,
2240,
1999,
1037,
6254,
1010,
2138,
2009,
1005,
1055,
2074,
1013,
1013,
8250,
2004,
1037,
5... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SheetJS/js-xlsx | xlsx.js | parse_WsBool | function parse_WsBool(blob, length, opts) {
var flags = opts && opts.biff == 8 || length == 2 ? blob.read_shift(2) : (blob.l += length, 0);
return { fDialog: flags & 0x10 };
} | javascript | function parse_WsBool(blob, length, opts) {
var flags = opts && opts.biff == 8 || length == 2 ? blob.read_shift(2) : (blob.l += length, 0);
return { fDialog: flags & 0x10 };
} | [
"function",
"parse_WsBool",
"(",
"blob",
",",
"length",
",",
"opts",
")",
"{",
"var",
"flags",
"=",
"opts",
"&&",
"opts",
".",
"biff",
"==",
"8",
"||",
"length",
"==",
"2",
"?",
"blob",
".",
"read_shift",
"(",
"2",
")",
":",
"(",
"blob",
".",
"l"... | /* [MS-XLS] 2.4.351 | [
"/",
"*",
"[",
"MS",
"-",
"XLS",
"]",
"2",
".",
"4",
".",
"351"
] | 9a6d8a1d3d80c78dad5201fb389316f935279cdc | https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L5794-L5797 | train | WSBool Parse a boolean from a blob | [
30522,
3853,
11968,
3366,
1035,
1059,
19022,
13669,
1006,
1038,
4135,
2497,
1010,
3091,
1010,
23569,
2015,
1007,
1063,
13075,
9245,
1027,
23569,
2015,
1004,
1004,
23569,
2015,
1012,
12170,
4246,
1027,
1027,
1022,
1064,
1064,
3091,
1027,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SeleniumHQ/selenium | third_party/js/mozmill/shared-modules/sessionstore.js | aboutSessionRestore_getWindows | function aboutSessionRestore_getWindows() {
var windows = [ ];
var tree = this.tabList.getNode();
for (var ii = 0; ii < tree.view.rowCount; ii++) {
if (tree.view.isContainer(ii)) {
windows.push({
index: windows.length,
listIndex : ii,
... | javascript | function aboutSessionRestore_getWindows() {
var windows = [ ];
var tree = this.tabList.getNode();
for (var ii = 0; ii < tree.view.rowCount; ii++) {
if (tree.view.isContainer(ii)) {
windows.push({
index: windows.length,
listIndex : ii,
... | [
"function",
"aboutSessionRestore_getWindows",
"(",
")",
"{",
"var",
"windows",
"=",
"[",
"]",
";",
"var",
"tree",
"=",
"this",
".",
"tabList",
".",
"getNode",
"(",
")",
";",
"for",
"(",
"var",
"ii",
"=",
"0",
";",
"ii",
"<",
"tree",
".",
"view",
".... | Get restorable windows
@returns List of windows
@type {array of object} | [
"Get",
"restorable",
"windows"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/sessionstore.js#L194-L211 | train | Get windows from the restore table | [
30522,
3853,
2055,
8583,
10992,
28533,
5686,
1035,
2131,
11101,
15568,
1006,
1007,
1063,
13075,
3645,
1027,
1031,
1033,
1025,
13075,
3392,
1027,
2023,
1012,
21628,
9863,
1012,
2131,
3630,
3207,
1006,
1007,
1025,
2005,
1006,
13075,
2462,
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... |
ColorlibHQ/AdminLTE | plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js | _handleAttributes | function _handleAttributes(oldNode, newNode, rule, clearInternals) {
var attributes = {}, // fresh new set of attributes to set on newNode
setClass = rule.set_class, // classes to set
addClass = rule.add_class, // add cla... | javascript | function _handleAttributes(oldNode, newNode, rule, clearInternals) {
var attributes = {}, // fresh new set of attributes to set on newNode
setClass = rule.set_class, // classes to set
addClass = rule.add_class, // add cla... | [
"function",
"_handleAttributes",
"(",
"oldNode",
",",
"newNode",
",",
"rule",
",",
"clearInternals",
")",
"{",
"var",
"attributes",
"=",
"{",
"}",
",",
"// fresh new set of attributes to set on newNode",
"setClass",
"=",
"rule",
".",
"set_class",
",",
"// classes to... | TODO: refactor. Too long to read | [
"TODO",
":",
"refactor",
".",
"Too",
"long",
"to",
"read"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L6312-L6450 | train | handle attributes on the current node | [
30522,
3853,
1035,
5047,
19321,
3089,
8569,
4570,
1006,
2214,
3630,
3207,
1010,
2047,
3630,
3207,
1010,
3627,
1010,
3154,
18447,
11795,
9777,
1007,
1063,
13075,
12332,
1027,
1063,
1065,
1010,
1013,
1013,
4840,
2047,
2275,
1997,
12332,
2000,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Dogfalo/materialize | extras/noUiSlider/nouislider.js | eventTap | function eventTap ( event ) {
// The tap event shouldn't propagate up
event.stopPropagation();
var proposal = calcPointToPercentage(event.calcPoint);
var handleNumber = getClosestHandle(proposal);
// Tackle the case that all handles are 'disabled'.
... | javascript | function eventTap ( event ) {
// The tap event shouldn't propagate up
event.stopPropagation();
var proposal = calcPointToPercentage(event.calcPoint);
var handleNumber = getClosestHandle(proposal);
// Tackle the case that all handles are 'disabled'.
... | [
"function",
"eventTap",
"(",
"event",
")",
"{",
"// The tap event shouldn't propagate up",
"event",
".",
"stopPropagation",
"(",
")",
";",
"var",
"proposal",
"=",
"calcPointToPercentage",
"(",
"event",
".",
"calcPoint",
")",
";",
"var",
"handleNumber",
"=",
"getCl... | Move closest handle to tapped location. | [
"Move",
"closest",
"handle",
"to",
"tapped",
"location",
"."
] | 1122efadad8f1433d404696f7613e3cc13fb83a4 | https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/extras/noUiSlider/nouislider.js#L1607-L1638 | train | Tackle the slider. | [
30522,
3853,
2724,
2696,
2361,
1006,
2724,
1007,
1063,
1013,
1013,
1996,
11112,
2724,
5807,
1005,
1056,
17678,
16098,
2618,
2039,
2724,
1012,
2644,
21572,
4502,
12540,
1006,
1007,
1025,
13075,
6378,
1027,
10250,
21906,
25785,
14399,
2121,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eslint/eslint | lib/rules/no-mixed-operators.js | includesBothInAGroup | function includesBothInAGroup(groups, left, right) {
return groups.some(group => group.indexOf(left) !== -1 && group.indexOf(right) !== -1);
} | javascript | function includesBothInAGroup(groups, left, right) {
return groups.some(group => group.indexOf(left) !== -1 && group.indexOf(right) !== -1);
} | [
"function",
"includesBothInAGroup",
"(",
"groups",
",",
"left",
",",
"right",
")",
"{",
"return",
"groups",
".",
"some",
"(",
"group",
"=>",
"group",
".",
"indexOf",
"(",
"left",
")",
"!==",
"-",
"1",
"&&",
"group",
".",
"indexOf",
"(",
"right",
")",
... | Checks whether any group which includes both given operator exists or not.
@param {Array.<string[]>} groups - A list of groups to check.
@param {string} left - An operator.
@param {string} right - Another operator.
@returns {boolean} `true` if such group existed. | [
"Checks",
"whether",
"any",
"group",
"which",
"includes",
"both",
"given",
"operator",
"exists",
"or",
"not",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-mixed-operators.js#L64-L66 | train | Returns true if the given group includes both left and right | [
30522,
3853,
2950,
18384,
10606,
8490,
22107,
1006,
2967,
1010,
2187,
1010,
2157,
1007,
1063,
2709,
2967,
1012,
2070,
1006,
2177,
1027,
1028,
2177,
1012,
5950,
11253,
1006,
2187,
1007,
999,
1027,
1027,
1011,
1015,
1004,
1004,
2177,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/extensibility/ExtensionManager.js | remove | function remove(id) {
var result = new $.Deferred();
if (extensions[id] && extensions[id].installInfo) {
Package.remove(extensions[id].installInfo.path)
.done(function () {
extensions[id].installInfo = null;
result.resolve();
... | javascript | function remove(id) {
var result = new $.Deferred();
if (extensions[id] && extensions[id].installInfo) {
Package.remove(extensions[id].installInfo.path)
.done(function () {
extensions[id].installInfo = null;
result.resolve();
... | [
"function",
"remove",
"(",
"id",
")",
"{",
"var",
"result",
"=",
"new",
"$",
".",
"Deferred",
"(",
")",
";",
"if",
"(",
"extensions",
"[",
"id",
"]",
"&&",
"extensions",
"[",
"id",
"]",
".",
"installInfo",
")",
"{",
"Package",
".",
"remove",
"(",
... | Removes the installed extension with the given id.
@param {string} id The id of the extension to remove.
@return {$.Promise} A promise that's resolved when the extension is removed or
rejected with an error if there's a problem with the removal. | [
"Removes",
"the",
"installed",
"extension",
"with",
"the",
"given",
"id",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/ExtensionManager.js#L396-L412 | train | Remove extension | [
30522,
3853,
6366,
1006,
8909,
1007,
1063,
13075,
2765,
1027,
2047,
1002,
1012,
13366,
28849,
2094,
1006,
1007,
1025,
2065,
1006,
14305,
1031,
8909,
1033,
1004,
1004,
14305,
1031,
8909,
1033,
1012,
16500,
2378,
14876,
1007,
1063,
7427,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SeleniumHQ/selenium | third_party/js/mozmill/shared-modules/addons.js | addonsManager_setCategory | function addonsManager_setCategory(aSpec) {
var spec = aSpec || { };
var category = spec.category;
var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;
if (!category)
throw new Error(arguments.callee.name + ": Category not specified.");
this._controller.click(category);
if (... | javascript | function addonsManager_setCategory(aSpec) {
var spec = aSpec || { };
var category = spec.category;
var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;
if (!category)
throw new Error(arguments.callee.name + ": Category not specified.");
this._controller.click(category);
if (... | [
"function",
"addonsManager_setCategory",
"(",
"aSpec",
")",
"{",
"var",
"spec",
"=",
"aSpec",
"||",
"{",
"}",
";",
"var",
"category",
"=",
"spec",
".",
"category",
";",
"var",
"waitFor",
"=",
"(",
"spec",
".",
"waitFor",
"==",
"undefined",
")",
"?",
"t... | Select the given category
@param {object} aSpec
Information for selecting a category
Elements: category - Category element
waitFor - Wait until the category has been selected
[optional - default: true] | [
"Select",
"the",
"given",
"category"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L698-L710 | train | Sets the category of the add - ons | [
30522,
3853,
5587,
5644,
24805,
4590,
1035,
2275,
16280,
20255,
2100,
1006,
2004,
5051,
2278,
1007,
1063,
13075,
28699,
1027,
2004,
5051,
2278,
1064,
1064,
1063,
1065,
1025,
13075,
4696,
1027,
28699,
1012,
4696,
1025,
13075,
3524,
29278,
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... |
vuejs/vue-devtools | src/util.js | internalSearchArray | function internalSearchArray (array, searchTerm, seen, depth) {
if (depth > SEARCH_MAX_DEPTH) {
return false
}
let match = false
let value
for (let i = 0; i < array.length; i++) {
value = array[i]
match = internalSearchCheck(searchTerm, null, value, seen, depth + 1)
if (match) {
break
... | javascript | function internalSearchArray (array, searchTerm, seen, depth) {
if (depth > SEARCH_MAX_DEPTH) {
return false
}
let match = false
let value
for (let i = 0; i < array.length; i++) {
value = array[i]
match = internalSearchCheck(searchTerm, null, value, seen, depth + 1)
if (match) {
break
... | [
"function",
"internalSearchArray",
"(",
"array",
",",
"searchTerm",
",",
"seen",
",",
"depth",
")",
"{",
"if",
"(",
"depth",
">",
"SEARCH_MAX_DEPTH",
")",
"{",
"return",
"false",
"}",
"let",
"match",
"=",
"false",
"let",
"value",
"for",
"(",
"let",
"i",
... | Executes a search on each value of the provided array
@param {*} array Search target
@param {string} searchTerm Search string
@param {Map<any,boolean>} seen Map containing the search result to prevent stack overflow by walking on the same object multiple times
@param {number} depth Deep search depth level, which is cap... | [
"Executes",
"a",
"search",
"on",
"each",
"value",
"of",
"the",
"provided",
"array"
] | 4de4b86388453cd07f0c1bf967d43a4dd4b011c9 | https://github.com/vuejs/vue-devtools/blob/4de4b86388453cd07f0c1bf967d43a4dd4b011c9/src/util.js#L447-L461 | train | Internal search function | [
30522,
3853,
4722,
17310,
11140,
2906,
9447,
1006,
9140,
1010,
3945,
3334,
2213,
1010,
2464,
1010,
5995,
1007,
1063,
2065,
1006,
5995,
1028,
3945,
1035,
4098,
1035,
5995,
1007,
1063,
2709,
6270,
1065,
2292,
2674,
1027,
6270,
2292,
3643,
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... |
nodejs/node-gyp | lib/install.js | eaccesFallback | function eaccesFallback (err) {
var noretry = '--node_gyp_internal_noretry'
if (-1 !== argv.indexOf(noretry)) return cb(err)
var tmpdir = os.tmpdir()
gyp.devDir = path.resolve(tmpdir, '.node-gyp')
log.warn('EACCES', 'user "%s" does not have permission to access the dev dir "%s"', os.userInfo().usern... | javascript | function eaccesFallback (err) {
var noretry = '--node_gyp_internal_noretry'
if (-1 !== argv.indexOf(noretry)) return cb(err)
var tmpdir = os.tmpdir()
gyp.devDir = path.resolve(tmpdir, '.node-gyp')
log.warn('EACCES', 'user "%s" does not have permission to access the dev dir "%s"', os.userInfo().usern... | [
"function",
"eaccesFallback",
"(",
"err",
")",
"{",
"var",
"noretry",
"=",
"'--node_gyp_internal_noretry'",
"if",
"(",
"-",
"1",
"!==",
"argv",
".",
"indexOf",
"(",
"noretry",
")",
")",
"return",
"cb",
"(",
"err",
")",
"var",
"tmpdir",
"=",
"os",
".",
... | The EACCES fallback is a workaround for npm's `sudo` behavior, where
it drops the permissions before invoking any child processes (like
node-gyp). So what happens is the "nobody" user doesn't have
permission to create the dev dir. As a fallback, make the tmpdir() be
the dev dir for this installation. This is not ideal,... | [
"The",
"EACCES",
"fallback",
"is",
"a",
"workaround",
"for",
"npm",
"s",
"sudo",
"behavior",
"where",
"it",
"drops",
"the",
"permissions",
"before",
"invoking",
"any",
"child",
"processes",
"(",
"like",
"node",
"-",
"gyp",
")",
".",
"So",
"what",
"happens"... | 721eb691cf15556cc2700eda0558d5bad5f84232 | https://github.com/nodejs/node-gyp/blob/721eb691cf15556cc2700eda0558d5bad5f84232/lib/install.js#L400-L412 | train | fallback to install | [
30522,
3853,
19413,
9468,
2229,
13976,
5963,
1006,
9413,
2099,
1007,
1063,
13075,
4496,
3388,
2854,
1027,
1005,
1011,
1011,
13045,
1035,
1043,
22571,
1035,
4722,
1035,
4496,
3388,
2854,
1005,
2065,
1006,
1011,
1015,
999,
1027,
1027,
12098,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/ProjectModel.js | _getFSObject | function _getFSObject(path) {
if (!path) {
return path;
} else if (_pathIsFile(path)) {
return FileSystem.getFileForPath(path);
}
return FileSystem.getDirectoryForPath(path);
} | javascript | function _getFSObject(path) {
if (!path) {
return path;
} else if (_pathIsFile(path)) {
return FileSystem.getFileForPath(path);
}
return FileSystem.getDirectoryForPath(path);
} | [
"function",
"_getFSObject",
"(",
"path",
")",
"{",
"if",
"(",
"!",
"path",
")",
"{",
"return",
"path",
";",
"}",
"else",
"if",
"(",
"_pathIsFile",
"(",
"path",
")",
")",
"{",
"return",
"FileSystem",
".",
"getFileForPath",
"(",
"path",
")",
";",
"}",
... | @private
Gets the FileSystem object (either a File or Directory) based on the path provided.
@param {string} path Path to retrieve | [
"@private"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/ProjectModel.js#L156-L163 | train | Get the fs object for a given path | [
30522,
3853,
1035,
2131,
10343,
16429,
20614,
1006,
4130,
1007,
1063,
2065,
1006,
999,
4130,
1007,
1063,
2709,
4130,
1025,
1065,
2842,
2065,
1006,
1035,
4130,
2483,
8873,
2571,
1006,
4130,
1007,
1007,
1063,
2709,
6764,
27268,
6633,
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... |
aws/aws-sdk-js | lib/request.js | eachItem | function eachItem(callback) {
var self = this;
function wrappedCallback(err, data) {
if (err) return callback(err, null);
if (data === null) return callback(null, null);
var config = self.service.paginationConfig(self.operation);
var resultKey = config.resultKey;
if (Array.isArray... | javascript | function eachItem(callback) {
var self = this;
function wrappedCallback(err, data) {
if (err) return callback(err, null);
if (data === null) return callback(null, null);
var config = self.service.paginationConfig(self.operation);
var resultKey = config.resultKey;
if (Array.isArray... | [
"function",
"eachItem",
"(",
"callback",
")",
"{",
"var",
"self",
"=",
"this",
";",
"function",
"wrappedCallback",
"(",
"err",
",",
"data",
")",
"{",
"if",
"(",
"err",
")",
"return",
"callback",
"(",
"err",
",",
"null",
")",
";",
"if",
"(",
"data",
... | Enumerates over individual items of a request, paging the responses if
necessary.
@api experimental
@since v1.4.0 | [
"Enumerates",
"over",
"individual",
"items",
"of",
"a",
"request",
"paging",
"the",
"responses",
"if",
"necessary",
"."
] | c23e5f0edd150f8885267e5f7c8a564f8e6e8562 | https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/request.js#L515-L536 | train | Iterates over all items in the resource | [
30522,
3853,
2169,
4221,
2213,
1006,
2655,
5963,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
3853,
5058,
9289,
20850,
8684,
1006,
9413,
2099,
1010,
2951,
1007,
1063,
2065,
1006,
9413,
2099,
1007,
2709,
2655,
5963,
1006,
9413,
2099,
1010,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/controls/InteractionTree.js | initializePopOverInteractionData | function initializePopOverInteractionData() {
var $li = jQuery(this).parent().parent();
var index = parseInt($li.attr('data-interaction-index'));
var interaction = that.interactions[index];
if (!interaction) {
return;
}
dur... | javascript | function initializePopOverInteractionData() {
var $li = jQuery(this).parent().parent();
var index = parseInt($li.attr('data-interaction-index'));
var interaction = that.interactions[index];
if (!interaction) {
return;
}
dur... | [
"function",
"initializePopOverInteractionData",
"(",
")",
"{",
"var",
"$li",
"=",
"jQuery",
"(",
"this",
")",
".",
"parent",
"(",
")",
".",
"parent",
"(",
")",
";",
"var",
"index",
"=",
"parseInt",
"(",
"$li",
".",
"attr",
"(",
"'data-interaction-index'",
... | /* eslint-enable no-loop-func | [
"/",
"*",
"eslint",
"-",
"enable",
"no",
"-",
"loop",
"-",
"func"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/controls/InteractionTree.js#L795-L814 | train | Initializes the popover interaction data | [
30522,
3853,
3988,
4697,
16340,
7840,
18447,
6906,
7542,
2850,
2696,
1006,
1007,
1063,
13075,
1002,
5622,
1027,
1046,
4226,
2854,
1006,
2023,
1007,
1012,
6687,
1006,
1007,
1012,
6687,
1006,
1007,
1025,
13075,
5950,
1027,
11968,
20240,
3372,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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(command, commandValue) {
var obj = wysihtml5.commands[command],
args = wysihtml5.lang.array(arguments).get(),
method = obj && obj.state;
if (method) {
args.unshift(this.composer);
return method.apply(obj, args);
} else {
try {
// try/catch for buggy... | javascript | function(command, commandValue) {
var obj = wysihtml5.commands[command],
args = wysihtml5.lang.array(arguments).get(),
method = obj && obj.state;
if (method) {
args.unshift(this.composer);
return method.apply(obj, args);
} else {
try {
// try/catch for buggy... | [
"function",
"(",
"command",
",",
"commandValue",
")",
"{",
"var",
"obj",
"=",
"wysihtml5",
".",
"commands",
"[",
"command",
"]",
",",
"args",
"=",
"wysihtml5",
".",
"lang",
".",
"array",
"(",
"arguments",
")",
".",
"get",
"(",
")",
",",
"method",
"="... | Check whether the current command is active
If the caret is within a bold text, then calling this with command "bold" should return true
@param {String} command The command string which to check (eg. "bold", "italic", "insertUnorderedList")
@param {String} [commandValue] The command value parameter (eg. for "insertIma... | [
"Check",
"whether",
"the",
"current",
"command",
"is",
"active",
"If",
"the",
"caret",
"is",
"within",
"a",
"bold",
"text",
"then",
"calling",
"this",
"with",
"command",
"bold",
"should",
"return",
"true"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js#L10256-L10271 | train | Returns true if the command is in the cache | [
30522,
3853,
1006,
3094,
1010,
3094,
10175,
5657,
1007,
1063,
13075,
27885,
3501,
1027,
1059,
7274,
19190,
21246,
2140,
2629,
1012,
10954,
1031,
3094,
1033,
1010,
12098,
5620,
1027,
1059,
7274,
19190,
21246,
2140,
2629,
1012,
11374,
1012,
9... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/RenameHandler.js | function (bRestoreFocus, oEvent) {
if (!this._bBlurOrKeyDownStarted) {
this._bBlurOrKeyDownStarted = true;
if (oEvent) {
RenameHandler._preventDefault.call(this, oEvent);
RenameHandler._stopPropagation.call(this, oEvent);
}
return this._emitLabelChangeEvent()
.then(function (fnErrorHan... | javascript | function (bRestoreFocus, oEvent) {
if (!this._bBlurOrKeyDownStarted) {
this._bBlurOrKeyDownStarted = true;
if (oEvent) {
RenameHandler._preventDefault.call(this, oEvent);
RenameHandler._stopPropagation.call(this, oEvent);
}
return this._emitLabelChangeEvent()
.then(function (fnErrorHan... | [
"function",
"(",
"bRestoreFocus",
",",
"oEvent",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_bBlurOrKeyDownStarted",
")",
"{",
"this",
".",
"_bBlurOrKeyDownStarted",
"=",
"true",
";",
"if",
"(",
"oEvent",
")",
"{",
"RenameHandler",
".",
"_preventDefault",
".",
... | Handles events after rename has been performed
@param {boolean} bRestoreFocus - to restore focus to overlay after rename completes
@private | [
"Handles",
"events",
"after",
"rename",
"has",
"been",
"performed"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/RenameHandler.js#L291-L307 | train | Handles the event that the label has changed. | [
30522,
3853,
1006,
22451,
5686,
14876,
7874,
1010,
1051,
18697,
3372,
1007,
1063,
2065,
1006,
999,
2023,
1012,
1035,
22861,
7630,
29165,
14839,
7698,
14117,
3064,
1007,
1063,
2023,
1012,
1035,
22861,
7630,
29165,
14839,
7698,
14117,
3064,
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... | |
jgraph/mxgraph | javascript/mxClient.js | function(value, nodeName, attributeName, attributeValue)
{
if (value != null && !isNaN(value.nodeType) && (nodeName == null ||
value.nodeName.toLowerCase() == nodeName.toLowerCase()))
{
return attributeName == null ||
value.getAttribute(attributeName) == attributeValue;
}
return false;
... | javascript | function(value, nodeName, attributeName, attributeValue)
{
if (value != null && !isNaN(value.nodeType) && (nodeName == null ||
value.nodeName.toLowerCase() == nodeName.toLowerCase()))
{
return attributeName == null ||
value.getAttribute(attributeName) == attributeValue;
}
return false;
... | [
"function",
"(",
"value",
",",
"nodeName",
",",
"attributeName",
",",
"attributeValue",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
"&&",
"!",
"isNaN",
"(",
"value",
".",
"nodeType",
")",
"&&",
"(",
"nodeName",
"==",
"null",
"||",
"value",
".",
"nodeNa... | Function: isNode
Returns true if the given value is an XML node with the node name
and if the optional attribute has the specified value.
This implementation assumes that the given value is a DOM node if the
nodeType property is numeric, that is, if isNaN returns false for
value.nodeType.
Parameters:
value - Object... | [
"Function",
":",
"isNode"
] | 33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44 | https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L2578-L2588 | train | Checks if the value is a valid node | [
30522,
3853,
1006,
3643,
1010,
13045,
18442,
1010,
17961,
18442,
1010,
17961,
10175,
5657,
1007,
1063,
2065,
1006,
3643,
999,
1027,
19701,
1004,
1004,
999,
3475,
2319,
1006,
3643,
1012,
13045,
13874,
1007,
1004,
1004,
1006,
13045,
18442,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/type/DateTimeBase.js | getErrorMessage | function getErrorMessage(oType) {
return sap.ui.getCore().getLibraryResourceBundle().getText(
isDateOnly(oType) ? "EnterDate" : "EnterDateTime",
[oType.formatValue(isDateOnly(oType) ? oDemoDate : oDemoDateTime, "string")]);
} | javascript | function getErrorMessage(oType) {
return sap.ui.getCore().getLibraryResourceBundle().getText(
isDateOnly(oType) ? "EnterDate" : "EnterDateTime",
[oType.formatValue(isDateOnly(oType) ? oDemoDate : oDemoDateTime, "string")]);
} | [
"function",
"getErrorMessage",
"(",
"oType",
")",
"{",
"return",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"getLibraryResourceBundle",
"(",
")",
".",
"getText",
"(",
"isDateOnly",
"(",
"oType",
")",
"?",
"\"EnterDate\"",
":",
"\"EnterDateTime\"",
",",... | /*
Returns the matching locale-dependent error message for the type based on the constraints.
@param {sap.ui.model.odata.type.DateTimeBase} oType
The type
@returns {string}
The locale-dependent error message | [
"/",
"*",
"Returns",
"the",
"matching",
"locale",
"-",
"dependent",
"error",
"message",
"for",
"the",
"type",
"based",
"on",
"the",
"constraints",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/DateTimeBase.js#L39-L43 | train | Returns the error message for the given type | [
30522,
3853,
2131,
2121,
29165,
7834,
3736,
3351,
1006,
27178,
18863,
1007,
1063,
2709,
20066,
1012,
21318,
1012,
2131,
17345,
1006,
1007,
1012,
2131,
29521,
19848,
16363,
6499,
3126,
3401,
27265,
2571,
1006,
1007,
1012,
2131,
18209,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/extensibility/node/ExtensionManagerDomain.js | _cmdDownloadFile | function _cmdDownloadFile(downloadId, url, proxy, callback, pCallback) {
// Backwards compatibility check, added in 0.37
if (typeof proxy === "function") {
callback = proxy;
proxy = undefined;
}
if (pendingDownloads[downloadId]) {
callback(Errors.DOWNLOAD_ID_IN_USE, null);
... | javascript | function _cmdDownloadFile(downloadId, url, proxy, callback, pCallback) {
// Backwards compatibility check, added in 0.37
if (typeof proxy === "function") {
callback = proxy;
proxy = undefined;
}
if (pendingDownloads[downloadId]) {
callback(Errors.DOWNLOAD_ID_IN_USE, null);
... | [
"function",
"_cmdDownloadFile",
"(",
"downloadId",
",",
"url",
",",
"proxy",
",",
"callback",
",",
"pCallback",
")",
"{",
"// Backwards compatibility check, added in 0.37",
"if",
"(",
"typeof",
"proxy",
"===",
"\"function\"",
")",
"{",
"callback",
"=",
"proxy",
";... | Implements "downloadFile" command, asynchronously. | [
"Implements",
"downloadFile",
"command",
"asynchronously",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/node/ExtensionManagerDomain.js#L386-L429 | train | Download a file from the server | [
30522,
3853,
1035,
4642,
14141,
12384,
11066,
8873,
2571,
1006,
8816,
3593,
1010,
24471,
2140,
1010,
24540,
1010,
2655,
5963,
1010,
7473,
8095,
5963,
1007,
1063,
1013,
1013,
11043,
21778,
4638,
1010,
2794,
1999,
1014,
1012,
4261,
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... |
goldfire/howler.js | dist/howler.js | function() {
var self = this;
var url = null;
// If no audio is available, quit immediately.
if (Howler.noAudio) {
self._emit('loaderror', null, 'No audio support.');
return;
}
// Make sure our source is in an array.
if (typeof self._src === 'string') {
... | javascript | function() {
var self = this;
var url = null;
// If no audio is available, quit immediately.
if (Howler.noAudio) {
self._emit('loaderror', null, 'No audio support.');
return;
}
// Make sure our source is in an array.
if (typeof self._src === 'string') {
... | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
";",
"var",
"url",
"=",
"null",
";",
"// If no audio is available, quit immediately.",
"if",
"(",
"Howler",
".",
"noAudio",
")",
"{",
"self",
".",
"_emit",
"(",
"'loaderror'",
",",
"null",
",",
"'No au... | Load the audio file.
@return {Howler} | [
"Load",
"the",
"audio",
"file",
"."
] | 030db918dd8ce640afd57e172418472497e8f113 | https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L624-L701 | train | Load the audio file. | [
30522,
3853,
1006,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
13075,
24471,
2140,
1027,
19701,
1025,
1013,
1013,
2065,
2053,
5746,
2003,
2800,
1010,
8046,
3202,
1012,
2065,
1006,
22912,
2121,
1012,
2053,
19513,
3695,
1007,
1063,
2969,
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... | |
apache/incubator-echarts | src/coord/parallel/Parallel.js | function (data, callback, start, end) {
start == null && (start = 0);
end == null && (end = data.count());
var axesMap = this._axesMap;
var dimensions = this.dimensions;
var dataDimensions = [];
var axisModels = [];
zrUtil.each(dimensions, function (axisDim) {
... | javascript | function (data, callback, start, end) {
start == null && (start = 0);
end == null && (end = data.count());
var axesMap = this._axesMap;
var dimensions = this.dimensions;
var dataDimensions = [];
var axisModels = [];
zrUtil.each(dimensions, function (axisDim) {
... | [
"function",
"(",
"data",
",",
"callback",
",",
"start",
",",
"end",
")",
"{",
"start",
"==",
"null",
"&&",
"(",
"start",
"=",
"0",
")",
";",
"end",
"==",
"null",
"&&",
"(",
"end",
"=",
"data",
".",
"count",
"(",
")",
")",
";",
"var",
"axesMap",... | Travel data for one time, get activeState of each data item.
@param {module:echarts/data/List} data
@param {Functio} cb param: {string} activeState 'active' or 'inactive' or 'normal'
{number} dataIndex
@param {number} [start=0] the start dataIndex that travel from.
@param {number} [end=data.count()] the next dataIndex ... | [
"Travel",
"data",
"for",
"one",
"time",
"get",
"activeState",
"of",
"each",
"data",
"item",
"."
] | 4d0ea095dc3929cb6de40c45748826e7999c7aa8 | https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/parallel/Parallel.js#L359-L396 | train | get active state | [
30522,
3853,
1006,
2951,
1010,
2655,
5963,
1010,
2707,
1010,
2203,
1007,
1063,
2707,
1027,
1027,
19701,
1004,
1004,
1006,
2707,
1027,
1014,
1007,
1025,
2203,
1027,
1027,
19701,
1004,
1004,
1006,
2203,
1027,
2951,
1012,
4175,
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... | |
adobe/brackets | src/extensibility/node/ExtensionManagerDomain.js | _cmdInstall | function _cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, _doUpdate) {
if (!options || !options.disabledDirectory || !options.apiVersion || !options.systemExtensionDirectory) {
callback(new Error(Errors.MISSING_REQUIRED_OPTIONS), null);
return;
}
function validat... | javascript | function _cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, _doUpdate) {
if (!options || !options.disabledDirectory || !options.apiVersion || !options.systemExtensionDirectory) {
callback(new Error(Errors.MISSING_REQUIRED_OPTIONS), null);
return;
}
function validat... | [
"function",
"_cmdInstall",
"(",
"packagePath",
",",
"destinationDirectory",
",",
"options",
",",
"callback",
",",
"pCallback",
",",
"_doUpdate",
")",
"{",
"if",
"(",
"!",
"options",
"||",
"!",
"options",
".",
"disabledDirectory",
"||",
"!",
"options",
".",
"... | Implements the "install" command in the "extensions" domain.
There is no need to call validate independently. Validation is the first
thing that is done here.
After the extension is validated, it is installed in destinationDirectory
unless the extension is already present there. If it is already present,
a determinat... | [
"Implements",
"the",
"install",
"command",
"in",
"the",
"extensions",
"domain",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/node/ExtensionManagerDomain.js#L217-L313 | train | Installs a package. zip to the specified destination directory. | [
30522,
3853,
1035,
4642,
8718,
9153,
3363,
1006,
7427,
15069,
1010,
7688,
4305,
2890,
16761,
2100,
1010,
7047,
1010,
2655,
5963,
1010,
7473,
8095,
5963,
1010,
1035,
2079,
6279,
13701,
1007,
1063,
2065,
1006,
999,
7047,
1064,
1064,
999,
70... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SeleniumHQ/selenium | third_party/js/mozmill/shared-modules/addons.js | addonsManager_disableAddon | function addonsManager_disableAddon(aSpec) {
var spec = aSpec || { };
spec.button = "disable";
var button = this.getAddonButton(spec);
this._controller.click(button);
} | javascript | function addonsManager_disableAddon(aSpec) {
var spec = aSpec || { };
spec.button = "disable";
var button = this.getAddonButton(spec);
this._controller.click(button);
} | [
"function",
"addonsManager_disableAddon",
"(",
"aSpec",
")",
"{",
"var",
"spec",
"=",
"aSpec",
"||",
"{",
"}",
";",
"spec",
".",
"button",
"=",
"\"disable\"",
";",
"var",
"button",
"=",
"this",
".",
"getAddonButton",
"(",
"spec",
")",
";",
"this",
".",
... | Disables the specified add-on
@param {object} aSpec
Information on which add-on to operate on
Elements: addon - Add-on element | [
"Disables",
"the",
"specified",
"add",
"-",
"on"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L361-L367 | train | Disable an add - on | [
30522,
3853,
5587,
5644,
24805,
4590,
1035,
4487,
19150,
4215,
5280,
1006,
2004,
5051,
2278,
1007,
1063,
13075,
28699,
1027,
2004,
5051,
2278,
1064,
1064,
1063,
1065,
1025,
28699,
1012,
6462,
1027,
1000,
4487,
19150,
1000,
1025,
13075,
6462... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | findSpecialCharacters | function findSpecialCharacters(str) {
var i, c;
// the beginning of the string is always special
var specials = [0];
// lastSegmentSpecialsIndex starts off with the assumption that
// there are no segments
var lastSegmentSpecialsIndex = 0;
// used to track down... | javascript | function findSpecialCharacters(str) {
var i, c;
// the beginning of the string is always special
var specials = [0];
// lastSegmentSpecialsIndex starts off with the assumption that
// there are no segments
var lastSegmentSpecialsIndex = 0;
// used to track down... | [
"function",
"findSpecialCharacters",
"(",
"str",
")",
"{",
"var",
"i",
",",
"c",
";",
"// the beginning of the string is always special",
"var",
"specials",
"=",
"[",
"0",
"]",
";",
"// lastSegmentSpecialsIndex starts off with the assumption that",
"// there are no segments",... | /*
Identifies the "special" characters in the given string.
Special characters for matching purposes are:
* the first character
* "/" and the character following the "/"
* "_", "." and "-" and the character following it
* an uppercase character that follows a lowercase one (think camelCase)
The returned object contai... | [
"/",
"*",
"Identifies",
"the",
"special",
"characters",
"in",
"the",
"given",
"string",
".",
"Special",
"characters",
"for",
"matching",
"purposes",
"are",
":"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/StringMatch.js#L61-L106 | train | find special characters in the string | [
30522,
3853,
4858,
5051,
13247,
7507,
22648,
7747,
1006,
2358,
2099,
1007,
1063,
13075,
1045,
1010,
1039,
1025,
1013,
1013,
1996,
2927,
1997,
1996,
5164,
2003,
2467,
2569,
13075,
19247,
1027,
1031,
1014,
1033,
1025,
1013,
1013,
16180,
13910... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | body-pix/demos/index.js | setupFPS | function setupFPS() {
stats.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom
if (guiState.showFps) {
document.body.appendChild(stats.dom);
}
} | javascript | function setupFPS() {
stats.showPanel(0); // 0: fps, 1: ms, 2: mb, 3+: custom
if (guiState.showFps) {
document.body.appendChild(stats.dom);
}
} | [
"function",
"setupFPS",
"(",
")",
"{",
"stats",
".",
"showPanel",
"(",
"0",
")",
";",
"// 0: fps, 1: ms, 2: mb, 3+: custom",
"if",
"(",
"guiState",
".",
"showFps",
")",
"{",
"document",
".",
"body",
".",
"appendChild",
"(",
"stats",
".",
"dom",
")",
";",
... | Sets up a frames per second panel on the top-left of the window | [
"Sets",
"up",
"a",
"frames",
"per",
"second",
"panel",
"on",
"the",
"top",
"-",
"left",
"of",
"the",
"window"
] | af194797c90cc5bcac1060d3cd41b0258a34c7dc | https://github.com/tensorflow/tfjs-models/blob/af194797c90cc5bcac1060d3cd41b0258a34c7dc/body-pix/demos/index.js#L342-L347 | train | Setup the FPS panel | [
30522,
3853,
16437,
22540,
2015,
1006,
1007,
1063,
26319,
1012,
2265,
9739,
2884,
1006,
1014,
1007,
1025,
1013,
1013,
1014,
1024,
1042,
4523,
1010,
1015,
1024,
5796,
1010,
1016,
1024,
16914,
1010,
1017,
1009,
1024,
7661,
2065,
1006,
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... |
summernote/summernote | src/js/summernote.js | function() {
const type = $.type(lists.head(arguments));
const isExternalAPICalled = type === 'string';
const hasInitOptions = type === 'object';
const options = $.extend({}, $.summernote.options, hasInitOptions ? lists.head(arguments) : {});
// Update options
options.langInfo = $.extend(true,... | javascript | function() {
const type = $.type(lists.head(arguments));
const isExternalAPICalled = type === 'string';
const hasInitOptions = type === 'object';
const options = $.extend({}, $.summernote.options, hasInitOptions ? lists.head(arguments) : {});
// Update options
options.langInfo = $.extend(true,... | [
"function",
"(",
")",
"{",
"const",
"type",
"=",
"$",
".",
"type",
"(",
"lists",
".",
"head",
"(",
"arguments",
")",
")",
";",
"const",
"isExternalAPICalled",
"=",
"type",
"===",
"'string'",
";",
"const",
"hasInitOptions",
"=",
"type",
"===",
"'object'",... | Summernote API
@param {Object|String}
@return {this} | [
"Summernote",
"API"
] | 8dcafb8107453006b905ef697a529c42e76beb3f | https://github.com/summernote/summernote/blob/8dcafb8107453006b905ef697a529c42e76beb3f/src/js/summernote.js#L13-L45 | train | This method is called by the summernote API to initialize the context | [
30522,
3853,
1006,
1007,
1063,
9530,
3367,
2828,
1027,
1002,
1012,
2828,
1006,
7201,
1012,
2132,
1006,
9918,
1007,
1007,
1025,
9530,
3367,
2003,
10288,
16451,
7911,
24330,
24164,
2094,
1027,
2828,
1027,
1027,
1027,
1005,
5164,
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... | |
Microsoft/BotFramework-WebChat | packages/component/src/Activity/SendStatus.js | sendFailed | function sendFailed(language, replace) {
const text = localize('SEND_FAILED_KEY', language);
const retry = localize('Retry', language);
const match = /\{Retry\}/.exec(text);
if (match) {
return (
<React.Fragment>
{ text.substr(0, match.index) }
{ replace(retry) }
{ text.substr... | javascript | function sendFailed(language, replace) {
const text = localize('SEND_FAILED_KEY', language);
const retry = localize('Retry', language);
const match = /\{Retry\}/.exec(text);
if (match) {
return (
<React.Fragment>
{ text.substr(0, match.index) }
{ replace(retry) }
{ text.substr... | [
"function",
"sendFailed",
"(",
"language",
",",
"replace",
")",
"{",
"const",
"text",
"=",
"localize",
"(",
"'SEND_FAILED_KEY'",
",",
"language",
")",
";",
"const",
"retry",
"=",
"localize",
"(",
"'Retry'",
",",
"language",
")",
";",
"const",
"match",
"=",... | TODO: [P4] Currently, this is the only place which use a templated string We could refactor this into a general component if there are more templated strings | [
"TODO",
":",
"[",
"P4",
"]",
"Currently",
"this",
"is",
"the",
"only",
"place",
"which",
"use",
"a",
"templated",
"string",
"We",
"could",
"refactor",
"this",
"into",
"a",
"general",
"component",
"if",
"there",
"are",
"more",
"templated",
"strings"
] | 8bc934d3d07d1ca901d52b5e3a9481fddcdbd91e | https://github.com/Microsoft/BotFramework-WebChat/blob/8bc934d3d07d1ca901d52b5e3a9481fddcdbd91e/packages/component/src/Activity/SendStatus.js#L12-L28 | train | Send failed message | [
30522,
3853,
4604,
7011,
18450,
1006,
2653,
1010,
5672,
1007,
1063,
9530,
3367,
3793,
1027,
2334,
4697,
1006,
1005,
4604,
1035,
3478,
1035,
3145,
1005,
1010,
2653,
1007,
1025,
9530,
3367,
2128,
11129,
1027,
2334,
4697,
1006,
1005,
2128,
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... |
SheetJS/js-xlsx | xlsx.js | write_BrtCellIgnoreEC | function write_BrtCellIgnoreEC(ref) {
var o = new_buf(24);
o.write_shift(4, 4);
o.write_shift(4, 1);
write_UncheckedRfX(ref, o);
return o;
} | javascript | function write_BrtCellIgnoreEC(ref) {
var o = new_buf(24);
o.write_shift(4, 4);
o.write_shift(4, 1);
write_UncheckedRfX(ref, o);
return o;
} | [
"function",
"write_BrtCellIgnoreEC",
"(",
"ref",
")",
"{",
"var",
"o",
"=",
"new_buf",
"(",
"24",
")",
";",
"o",
".",
"write_shift",
"(",
"4",
",",
"4",
")",
";",
"o",
".",
"write_shift",
"(",
"4",
",",
"1",
")",
";",
"write_UncheckedRfX",
"(",
"re... | /* [MS-XLSB] 2.4.309 BrtCellIgnoreEC | [
"/",
"*",
"[",
"MS",
"-",
"XLSB",
"]",
"2",
".",
"4",
".",
"309",
"BrtCellIgnoreEC"
] | 9a6d8a1d3d80c78dad5201fb389316f935279cdc | https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L13745-L13751 | train | Write a BrtCellIgnoreEC to the buffer | [
30522,
3853,
4339,
1035,
7987,
13535,
13348,
26745,
9910,
2278,
1006,
25416,
1007,
1063,
13075,
1051,
1027,
2047,
1035,
20934,
2546,
1006,
2484,
1007,
1025,
1051,
1012,
4339,
1035,
5670,
1006,
1018,
1010,
1018,
1007,
1025,
1051,
1012,
4339,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
openlayers/openlayers | src/ol/format/TopoJSON.js | transformArc | function transformArc(arc, scale, translate) {
let x = 0;
let y = 0;
for (let i = 0, ii = arc.length; i < ii; ++i) {
const vertex = arc[i];
x += vertex[0];
y += vertex[1];
vertex[0] = x;
vertex[1] = y;
transformVertex(vertex, scale, translate);
}
} | javascript | function transformArc(arc, scale, translate) {
let x = 0;
let y = 0;
for (let i = 0, ii = arc.length; i < ii; ++i) {
const vertex = arc[i];
x += vertex[0];
y += vertex[1];
vertex[0] = x;
vertex[1] = y;
transformVertex(vertex, scale, translate);
}
} | [
"function",
"transformArc",
"(",
"arc",
",",
"scale",
",",
"translate",
")",
"{",
"let",
"x",
"=",
"0",
";",
"let",
"y",
"=",
"0",
";",
"for",
"(",
"let",
"i",
"=",
"0",
",",
"ii",
"=",
"arc",
".",
"length",
";",
"i",
"<",
"ii",
";",
"++",
... | Apply a linear transform to an arc. The provided arc is modified in place.
@param {Array<import("../coordinate.js").Coordinate>} arc Arc.
@param {Array<number>} scale Scale for each dimension.
@param {Array<number>} translate Translation for each dimension. | [
"Apply",
"a",
"linear",
"transform",
"to",
"an",
"arc",
".",
"The",
"provided",
"arc",
"is",
"modified",
"in",
"place",
"."
] | f366eaea522388fb575b11010e69d309164baca7 | https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/src/ol/format/TopoJSON.js#L381-L392 | train | Transform an arc | [
30522,
3853,
10938,
2906,
2278,
1006,
8115,
1010,
4094,
1010,
17637,
1007,
1063,
2292,
1060,
1027,
1014,
1025,
2292,
1061,
1027,
1014,
1025,
2005,
1006,
2292,
1045,
1027,
1014,
1010,
2462,
1027,
8115,
1012,
3091,
1025,
1045,
1026,
2462,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js | scopeLookup | function scopeLookup(sQualifiedName, sPropertyName) {
var sSchema;
/*
* Sets <code>vLocation</code> and delegates to {@link log}.
*/
function logWithLocation() {
vLocation = vLocation
|| sTarget && sPropertyName && sTarget + "/" + sPropertyName;
return log.apply(this, arguments);
... | javascript | function scopeLookup(sQualifiedName, sPropertyName) {
var sSchema;
/*
* Sets <code>vLocation</code> and delegates to {@link log}.
*/
function logWithLocation() {
vLocation = vLocation
|| sTarget && sPropertyName && sTarget + "/" + sPropertyName;
return log.apply(this, arguments);
... | [
"function",
"scopeLookup",
"(",
"sQualifiedName",
",",
"sPropertyName",
")",
"{",
"var",
"sSchema",
";",
"/*\n\t\t\t\t * Sets <code>vLocation</code> and delegates to {@link log}.\n\t\t\t\t */",
"function",
"logWithLocation",
"(",
")",
"{",
"vLocation",
"=",
"vLocation",
"||",... | /*
Looks up the given qualified name in the global scope.
@param {string} sQualifiedName
A qualified name
@param {string} [sPropertyName]
Where the qualified name was found
@returns {boolean}
Whether to continue after scope lookup | [
"/",
"*",
"Looks",
"up",
"the",
"given",
"qualified",
"name",
"in",
"the",
"global",
"scope",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js#L1168-L1201 | train | This function is called by the scope constructor to look up a qualified name in the scope. | [
30522,
3853,
9531,
4135,
21940,
2361,
1006,
5490,
8787,
7810,
18442,
1010,
11867,
18981,
15010,
18442,
1007,
1063,
13075,
7020,
5403,
2863,
1025,
1013,
1008,
1008,
4520,
1026,
3642,
1028,
1058,
4135,
10719,
1026,
1013,
3642,
1028,
1998,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/extensions/default/RecentProjects/main.js | keydownHook | function keydownHook(event) {
var keyHandled = false;
switch (event.keyCode) {
case KeyEvent.DOM_VK_UP:
selectNextItem(-1);
keyHandled = true;
break;
case KeyEvent.DOM_VK_DOWN:
selectNextItem(+1);
keyHandled = true;
... | javascript | function keydownHook(event) {
var keyHandled = false;
switch (event.keyCode) {
case KeyEvent.DOM_VK_UP:
selectNextItem(-1);
keyHandled = true;
break;
case KeyEvent.DOM_VK_DOWN:
selectNextItem(+1);
keyHandled = true;
... | [
"function",
"keydownHook",
"(",
"event",
")",
"{",
"var",
"keyHandled",
"=",
"false",
";",
"switch",
"(",
"event",
".",
"keyCode",
")",
"{",
"case",
"KeyEvent",
".",
"DOM_VK_UP",
":",
"selectNextItem",
"(",
"-",
"1",
")",
";",
"keyHandled",
"=",
"true",
... | Handles the Key Down events
@param {KeyboardEvent} event
@return {boolean} True if the key was handled | [
"Handles",
"the",
"Key",
"Down",
"events"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/RecentProjects/main.js#L210-L243 | train | keydown hook for the keydown event | [
30522,
3853,
3145,
7698,
6806,
6559,
1006,
2724,
1007,
1063,
13075,
3145,
11774,
3709,
1027,
6270,
1025,
6942,
1006,
2724,
1012,
3145,
16044,
1007,
1063,
2553,
3145,
18697,
3372,
1012,
14383,
1035,
1058,
2243,
1035,
2039,
1024,
7276,
2638,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/brackets.js | _beforeHTMLReady | function _beforeHTMLReady() {
// Add the platform (mac, win or linux) to the body tag so we can have platform-specific CSS rules
$("body").addClass("platform-" + brackets.platform);
// Browser-hosted version may also have different CSS (e.g. since '#titlebar' is shown)
if (brackets.inBr... | javascript | function _beforeHTMLReady() {
// Add the platform (mac, win or linux) to the body tag so we can have platform-specific CSS rules
$("body").addClass("platform-" + brackets.platform);
// Browser-hosted version may also have different CSS (e.g. since '#titlebar' is shown)
if (brackets.inBr... | [
"function",
"_beforeHTMLReady",
"(",
")",
"{",
"// Add the platform (mac, win or linux) to the body tag so we can have platform-specific CSS rules",
"$",
"(",
"\"body\"",
")",
".",
"addClass",
"(",
"\"platform-\"",
"+",
"brackets",
".",
"platform",
")",
";",
"// Browser-hoste... | Setup event handlers prior to dispatching AppInit.HTML_READY | [
"Setup",
"event",
"handlers",
"prior",
"to",
"dispatching",
"AppInit",
".",
"HTML_READY"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/brackets.js#L369-L487 | train | Before HTML ready | [
30522,
3853,
1035,
2077,
11039,
19968,
16416,
5149,
1006,
1007,
1063,
1013,
1013,
5587,
1996,
4132,
1006,
6097,
1010,
2663,
2030,
11603,
1007,
2000,
1996,
2303,
6415,
2061,
2057,
2064,
2031,
4132,
1011,
3563,
20116,
2015,
3513,
1002,
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.unified/src/sap/ui/unified/CalendarTimeInterval.js | _renderTimesRow | function _renderTimesRow(bSkipFocus){
var oDate = this._getFocusedDate();
var oTimesRow = this.getAggregation("timesRow");
if (!bSkipFocus) {
oTimesRow.setDate(CalendarUtils._createLocalDate(oDate, true));
} else {
oTimesRow.displayDate(CalendarUtils._createLocalDate(oDate, true));
}
// change head... | javascript | function _renderTimesRow(bSkipFocus){
var oDate = this._getFocusedDate();
var oTimesRow = this.getAggregation("timesRow");
if (!bSkipFocus) {
oTimesRow.setDate(CalendarUtils._createLocalDate(oDate, true));
} else {
oTimesRow.displayDate(CalendarUtils._createLocalDate(oDate, true));
}
// change head... | [
"function",
"_renderTimesRow",
"(",
"bSkipFocus",
")",
"{",
"var",
"oDate",
"=",
"this",
".",
"_getFocusedDate",
"(",
")",
";",
"var",
"oTimesRow",
"=",
"this",
".",
"getAggregation",
"(",
"\"timesRow\"",
")",
";",
"if",
"(",
"!",
"bSkipFocus",
")",
"{",
... | /*
sets the date in the used Month controls
@param {boolean} bSkipFocus if set no focus is set to the date | [
"/",
"*",
"sets",
"the",
"date",
"in",
"the",
"used",
"Month",
"controls"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.unified/src/sap/ui/unified/CalendarTimeInterval.js#L1287-L1301 | train | Render the times row | [
30522,
3853,
1035,
17552,
7292,
21338,
5004,
1006,
18667,
3211,
14376,
10085,
2271,
1007,
1063,
13075,
1051,
13701,
1027,
2023,
1012,
1035,
2131,
14876,
7874,
22367,
3686,
1006,
1007,
1025,
13075,
27178,
14428,
21338,
5004,
1027,
2023,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/reflection/BaseTreeModifier.js | function(oElement, sType) {
var oInstance = ObjectPath.get(sType);
if (typeof oInstance === "function") {
return oElement instanceof oInstance;
} else {
return false;
}
} | javascript | function(oElement, sType) {
var oInstance = ObjectPath.get(sType);
if (typeof oInstance === "function") {
return oElement instanceof oInstance;
} else {
return false;
}
} | [
"function",
"(",
"oElement",
",",
"sType",
")",
"{",
"var",
"oInstance",
"=",
"ObjectPath",
".",
"get",
"(",
"sType",
")",
";",
"if",
"(",
"typeof",
"oInstance",
"===",
"\"function\"",
")",
"{",
"return",
"oElement",
"instanceof",
"oInstance",
";",
"}",
... | Checks if the element is an instance of the type.
@param {object} oElement - Element to be checked
@param {string} sType - Type that the element should be checked against
@returns {boolean} <code>true</code> if the element is an instance of the type | [
"Checks",
"if",
"the",
"element",
"is",
"an",
"instance",
"of",
"the",
"type",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/reflection/BaseTreeModifier.js#L266-L273 | train | Returns true if the given element is an instance of the given type | [
30522,
3853,
1006,
30524,
18863,
1007,
1025,
2065,
1006,
2828,
11253,
1051,
7076,
26897,
1027,
1027,
1027,
1000,
3853,
1000,
1007,
1063,
2709,
1051,
12260,
3672,
6013,
11253,
1051,
7076,
26897,
1025,
1065,
2842,
1063,
2709,
6270,
1025,
1065... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SeleniumHQ/selenium | third_party/js/mozmill/shared-modules/downloads.js | downloadManager_cleanAll | function downloadManager_cleanAll(downloads) {
// Cancel any active downloads
this.cancelActiveDownloads();
// If no downloads have been specified retrieve the list from the database
if (downloads === undefined || downloads.length == 0)
downloads = this.getAllDownloads();
else
downloads... | javascript | function downloadManager_cleanAll(downloads) {
// Cancel any active downloads
this.cancelActiveDownloads();
// If no downloads have been specified retrieve the list from the database
if (downloads === undefined || downloads.length == 0)
downloads = this.getAllDownloads();
else
downloads... | [
"function",
"downloadManager_cleanAll",
"(",
"downloads",
")",
"{",
"// Cancel any active downloads",
"this",
".",
"cancelActiveDownloads",
"(",
")",
";",
"// If no downloads have been specified retrieve the list from the database",
"if",
"(",
"downloads",
"===",
"undefined",
"... | Cancel any active downloads, remove the files, and clean
up the Download Manager database
@param {Array of download} downloads
Downloaded files which should be deleted (optional) | [
"Cancel",
"any",
"active",
"downloads",
"remove",
"the",
"files",
"and",
"clean",
"up",
"the",
"Download",
"Manager",
"database"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/downloads.js#L132-L147 | train | Clean all the downloaded files | [
30522,
3853,
8816,
24805,
4590,
1035,
4550,
8095,
1006,
22956,
1007,
1063,
1013,
1013,
17542,
2151,
3161,
22956,
2023,
1012,
17542,
19620,
7698,
11066,
2015,
1006,
1007,
1025,
1013,
1013,
2065,
2053,
22956,
2031,
2042,
9675,
12850,
1996,
28... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
pagekit/vue-resource | dist/vue-resource.esm.js | query | function query (options$$1, next) {
var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1);
each(options$$1.params, function (value, key) {
if (urlParams.indexOf(key) === -1) {
query[key] = value;
}
});
query = Url.params(query);
if (query... | javascript | function query (options$$1, next) {
var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1);
each(options$$1.params, function (value, key) {
if (urlParams.indexOf(key) === -1) {
query[key] = value;
}
});
query = Url.params(query);
if (query... | [
"function",
"query",
"(",
"options$$1",
",",
"next",
")",
"{",
"var",
"urlParams",
"=",
"Object",
".",
"keys",
"(",
"Url",
".",
"options",
".",
"params",
")",
",",
"query",
"=",
"{",
"}",
",",
"url",
"=",
"next",
"(",
"options$$1",
")",
";",
"each"... | Query Parameter Transform. | [
"Query",
"Parameter",
"Transform",
"."
] | fe268fa1d6053ede5f34aef9a11e1a424a70446c | https://github.com/pagekit/vue-resource/blob/fe268fa1d6053ede5f34aef9a11e1a424a70446c/dist/vue-resource.esm.js#L463-L480 | train | Query the url for the resource | [
30522,
3853,
23032,
1006,
7047,
1002,
1002,
1015,
1010,
2279,
1007,
1063,
13075,
24471,
14277,
5400,
5244,
1027,
4874,
1012,
6309,
1006,
24471,
2140,
1012,
7047,
1012,
11498,
5244,
1007,
1010,
23032,
1027,
1063,
1065,
1010,
24471,
2140,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/extensions/default/RecentProjects/main.js | renderDelete | function renderDelete() {
return $("<div id='recent-folder-delete' class='trash-icon'>×</div>")
.mouseup(function (e) {
// Don't let the click bubble upward.
e.stopPropagation();
// Remove the project from the preferences.
var re... | javascript | function renderDelete() {
return $("<div id='recent-folder-delete' class='trash-icon'>×</div>")
.mouseup(function (e) {
// Don't let the click bubble upward.
e.stopPropagation();
// Remove the project from the preferences.
var re... | [
"function",
"renderDelete",
"(",
")",
"{",
"return",
"$",
"(",
"\"<div id='recent-folder-delete' class='trash-icon'>×</div>\"",
")",
".",
"mouseup",
"(",
"function",
"(",
"e",
")",
"{",
"// Don't let the click bubble upward.",
"e",
".",
"stopPropagation",
"(",
")"... | Create the "delete" button that shows up when you hover over a project. | [
"Create",
"the",
"delete",
"button",
"that",
"shows",
"up",
"when",
"you",
"hover",
"over",
"a",
"project",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/RecentProjects/main.js#L114-L138 | train | Render the delete button | [
30522,
3853,
17552,
9247,
12870,
1006,
1007,
1063,
2709,
1002,
1006,
1000,
1026,
4487,
2615,
8909,
1027,
1005,
3522,
1011,
19622,
1011,
3972,
12870,
1005,
2465,
1027,
1005,
11669,
1011,
12696,
1005,
1028,
1004,
2335,
1025,
1026,
1013,
4487,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.layout/src/sap/ui/layout/form/FormElement.js | _fieldOnAfterRendering | function _fieldOnAfterRendering(oEvent){
// call function of parent (if assigned)
var oParent = this.oElement.getParent();
if (oParent && oParent.contentOnAfterRendering) {
oParent.contentOnAfterRendering( this.oElement, oEvent.srcControl);
}
} | javascript | function _fieldOnAfterRendering(oEvent){
// call function of parent (if assigned)
var oParent = this.oElement.getParent();
if (oParent && oParent.contentOnAfterRendering) {
oParent.contentOnAfterRendering( this.oElement, oEvent.srcControl);
}
} | [
"function",
"_fieldOnAfterRendering",
"(",
"oEvent",
")",
"{",
"// call function of parent (if assigned)",
"var",
"oParent",
"=",
"this",
".",
"oElement",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"oParent",
"&&",
"oParent",
".",
"contentOnAfterRendering",
")",
... | /*
If onAfterRendering of a field is processed the Form (layout) might need to change it. | [
"/",
"*",
"If",
"onAfterRendering",
"of",
"a",
"field",
"is",
"processed",
"the",
"Form",
"(",
"layout",
")",
"might",
"need",
"to",
"change",
"it",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.layout/src/sap/ui/layout/form/FormElement.js#L490-L498 | train | called after the field is rendered | [
30522,
3853,
1035,
2492,
7856,
6199,
28849,
11563,
2075,
1006,
1051,
18697,
3372,
1007,
1063,
1013,
1013,
2655,
3853,
1997,
6687,
1006,
2065,
4137,
1007,
13075,
6728,
12069,
3372,
1027,
2023,
1012,
1051,
12260,
3672,
1012,
2131,
19362,
4765... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aws/aws-sdk-js | doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/doctools.js | function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
} | javascript | function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
} | [
"function",
"(",
")",
"{",
"var",
"path",
"=",
"document",
".",
"location",
".",
"pathname",
";",
"var",
"parts",
"=",
"path",
".",
"split",
"(",
"/",
"\\/",
"/",
")",
";",
"$",
".",
"each",
"(",
"DOCUMENTATION_OPTIONS",
".",
"URL_ROOT",
".",
"split"... | get the current relative url | [
"get",
"the",
"current",
"relative",
"url"
] | c23e5f0edd150f8885267e5f7c8a564f8e6e8562 | https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/doctools.js#L230-L239 | train | Get the current page | [
30522,
3853,
1006,
1007,
1063,
13075,
4130,
1027,
6254,
1012,
3295,
1012,
4130,
18442,
1025,
13075,
3033,
1027,
4130,
1012,
3975,
1006,
1013,
1032,
1013,
1013,
1007,
1025,
1002,
1012,
2169,
1006,
12653,
1035,
7047,
1012,
24471,
2140,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
transloadit/uppy | examples/transloadit/main.js | openModal | function openModal () {
robodog.pick({
restrictions: {
allowedFileTypes: ['.png']
},
waitForEncoding: true,
params: {
auth: { key: TRANSLOADIT_KEY },
template_id: TEMPLATE_ID
},
providers: [
'webcam'
]
// if providers need custom config
// webcam: {
// ... | javascript | function openModal () {
robodog.pick({
restrictions: {
allowedFileTypes: ['.png']
},
waitForEncoding: true,
params: {
auth: { key: TRANSLOADIT_KEY },
template_id: TEMPLATE_ID
},
providers: [
'webcam'
]
// if providers need custom config
// webcam: {
// ... | [
"function",
"openModal",
"(",
")",
"{",
"robodog",
".",
"pick",
"(",
"{",
"restrictions",
":",
"{",
"allowedFileTypes",
":",
"[",
"'.png'",
"]",
"}",
",",
"waitForEncoding",
":",
"true",
",",
"params",
":",
"{",
"auth",
":",
"{",
"key",
":",
"TRANSLOAD... | robodog.modal | [
"robodog",
".",
"modal"
] | 7ae18bf992d544a64da998f033258ec09a3de275 | https://github.com/transloadit/uppy/blob/7ae18bf992d544a64da998f033258ec09a3de275/examples/transloadit/main.js#L81-L99 | train | open modal | [
30522,
3853,
2330,
5302,
9305,
1006,
1007,
1063,
6487,
7716,
8649,
1012,
4060,
1006,
1063,
9259,
1024,
1063,
3039,
8873,
7485,
18863,
2015,
1024,
1031,
1005,
1012,
1052,
3070,
1005,
1033,
1065,
1010,
3524,
29278,
2368,
3597,
4667,
1024,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/extensions/default/NavigationAndHistory/main.js | _handlePaneMerge | function _handlePaneMerge(e, paneId) {
var index;
var targetPaneId = MainViewManager.FIRST_PANE;
$.each(_mrofList, function (itrIndex, value) {
if (value && value.paneId === paneId) { // We have got an entry which needs merge
// Before modifying the actual pane info ... | javascript | function _handlePaneMerge(e, paneId) {
var index;
var targetPaneId = MainViewManager.FIRST_PANE;
$.each(_mrofList, function (itrIndex, value) {
if (value && value.paneId === paneId) { // We have got an entry which needs merge
// Before modifying the actual pane info ... | [
"function",
"_handlePaneMerge",
"(",
"e",
",",
"paneId",
")",
"{",
"var",
"index",
";",
"var",
"targetPaneId",
"=",
"MainViewManager",
".",
"FIRST_PANE",
";",
"$",
".",
"each",
"(",
"_mrofList",
",",
"function",
"(",
"itrIndex",
",",
"value",
")",
"{",
"... | Merges the entries to a single pane if split view have been merged Then purges duplicate entries in mrof list | [
"Merges",
"the",
"entries",
"to",
"a",
"single",
"pane",
"if",
"split",
"view",
"have",
"been",
"merged",
"Then",
"purges",
"duplicate",
"entries",
"in",
"mrof",
"list"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/NavigationAndHistory/main.js#L701-L723 | train | Merge the pane info with the current pane info | [
30522,
3853,
1035,
5047,
9739,
21382,
20800,
1006,
1041,
1010,
6090,
7416,
2094,
1007,
1063,
13075,
5950,
1025,
13075,
4539,
9739,
7416,
2094,
1027,
2364,
8584,
24805,
4590,
1012,
2034,
1035,
6090,
2063,
1025,
1002,
1012,
2169,
1006,
1035,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aframevr/aframe | src/components/cursor.js | function (evt) {
// Raycast again for touch.
if (this.data.rayOrigin === 'mouse' && evt.type === 'touchstart') {
this.onMouseMove(evt);
this.el.components.raycaster.checkIntersections();
evt.preventDefault();
}
this.twoWayEmit(EVENTS.MOUSEDOWN);
this.cursorDownEl = this.intersecte... | javascript | function (evt) {
// Raycast again for touch.
if (this.data.rayOrigin === 'mouse' && evt.type === 'touchstart') {
this.onMouseMove(evt);
this.el.components.raycaster.checkIntersections();
evt.preventDefault();
}
this.twoWayEmit(EVENTS.MOUSEDOWN);
this.cursorDownEl = this.intersecte... | [
"function",
"(",
"evt",
")",
"{",
"// Raycast again for touch.",
"if",
"(",
"this",
".",
"data",
".",
"rayOrigin",
"===",
"'mouse'",
"&&",
"evt",
".",
"type",
"===",
"'touchstart'",
")",
"{",
"this",
".",
"onMouseMove",
"(",
"evt",
")",
";",
"this",
".",... | Trigger mousedown and keep track of the mousedowned entity. | [
"Trigger",
"mousedown",
"and",
"keep",
"track",
"of",
"the",
"mousedowned",
"entity",
"."
] | 24acc78a7299a4cdfe3ef617f4d40ddf6275c992 | https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/cursor.js#L225-L235 | train | Mouse move event handler | [
30522,
3853,
1006,
23408,
2102,
1007,
1063,
1013,
1013,
4097,
10526,
2153,
2005,
3543,
1012,
2065,
1006,
2023,
1012,
2951,
1012,
4097,
10050,
11528,
1027,
1027,
1027,
1005,
8000,
1005,
1004,
1004,
23408,
2102,
1012,
2828,
1027,
1027,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
ReactiveX/rxjs | docs_app/src/app/search/search-worker.js | handleMessage | function handleMessage(message) {
var type = message.data.type;
var id = message.data.id;
var payload = message.data.payload;
switch(type) {
case 'load-index':
makeRequest(SEARCH_TERMS_URL, function(searchInfo) {
index = createIndex(loadIndex(searchInfo));
self.postMessage({type: type,... | javascript | function handleMessage(message) {
var type = message.data.type;
var id = message.data.id;
var payload = message.data.payload;
switch(type) {
case 'load-index':
makeRequest(SEARCH_TERMS_URL, function(searchInfo) {
index = createIndex(loadIndex(searchInfo));
self.postMessage({type: type,... | [
"function",
"handleMessage",
"(",
"message",
")",
"{",
"var",
"type",
"=",
"message",
".",
"data",
".",
"type",
";",
"var",
"id",
"=",
"message",
".",
"data",
".",
"id",
";",
"var",
"payload",
"=",
"message",
".",
"data",
".",
"payload",
";",
"switch... | The worker receives a message to load the index and to query the index | [
"The",
"worker",
"receives",
"a",
"message",
"to",
"load",
"the",
"index",
"and",
"to",
"query",
"the",
"index"
] | 1037a1d1e6b80c7218e7ffdf8c0d96a612653a4f | https://github.com/ReactiveX/rxjs/blob/1037a1d1e6b80c7218e7ffdf8c0d96a612653a4f/docs_app/src/app/search/search-worker.js#L42-L59 | train | handle a message from the cluster | [
30522,
3853,
5047,
7834,
3736,
3351,
1006,
4471,
1007,
1063,
13075,
2828,
1027,
4471,
1012,
2951,
1012,
2828,
1025,
13075,
8909,
1027,
4471,
1012,
2951,
1012,
8909,
1025,
13075,
18093,
1027,
4471,
1012,
2951,
1012,
18093,
1025,
6942,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/widgets/Dialogs.js | showModalDialog | function showModalDialog(dlgClass, title, message, buttons, autoDismiss) {
var templateVars = {
dlgClass: dlgClass,
title: title || "",
message: message || "",
buttons: buttons || [{ className: DIALOG_BTN_CLASS_PRIMARY, id: DIALOG_BTN_OK, text: Strings.OK }... | javascript | function showModalDialog(dlgClass, title, message, buttons, autoDismiss) {
var templateVars = {
dlgClass: dlgClass,
title: title || "",
message: message || "",
buttons: buttons || [{ className: DIALOG_BTN_CLASS_PRIMARY, id: DIALOG_BTN_OK, text: Strings.OK }... | [
"function",
"showModalDialog",
"(",
"dlgClass",
",",
"title",
",",
"message",
",",
"buttons",
",",
"autoDismiss",
")",
"{",
"var",
"templateVars",
"=",
"{",
"dlgClass",
":",
"dlgClass",
",",
"title",
":",
"title",
"||",
"\"\"",
",",
"message",
":",
"messag... | Creates a new general purpose modal dialog using the default template and the template variables given
as parameters as described.
@param {string} dlgClass A class name identifier for the dialog. Typically one of DefaultDialogs.*
@param {string=} title The title of the dialog. Can contain HTML markup. Defaults to "".
... | [
"Creates",
"a",
"new",
"general",
"purpose",
"modal",
"dialog",
"using",
"the",
"default",
"template",
"and",
"the",
"template",
"variables",
"given",
"as",
"parameters",
"as",
"described",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/widgets/Dialogs.js#L397-L407 | train | Show a modal dialog | [
30522,
3853,
2265,
5302,
9305,
27184,
8649,
1006,
21469,
18195,
27102,
1010,
2516,
1010,
4471,
1010,
11287,
1010,
8285,
10521,
15630,
2015,
1007,
1063,
13075,
23561,
10755,
2015,
1027,
1063,
21469,
18195,
27102,
1024,
21469,
18195,
27102,
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... |
aws/aws-sdk-js | features/extra/cleanup.js | function() {
var fs = require('fs');
var path = require('path');
var fixturePath = path.resolve('./features/extra/fixtures/tmp');
if (fs.existsSync(fixturePath)) {
fs.readdirSync(fixturePath).forEach(function(file) {
fs.unlinkSync(path.join(fixturePath, file));
});
fs.rmdirSync... | javascript | function() {
var fs = require('fs');
var path = require('path');
var fixturePath = path.resolve('./features/extra/fixtures/tmp');
if (fs.existsSync(fixturePath)) {
fs.readdirSync(fixturePath).forEach(function(file) {
fs.unlinkSync(path.join(fixturePath, file));
});
fs.rmdirSync... | [
"function",
"(",
")",
"{",
"var",
"fs",
"=",
"require",
"(",
"'fs'",
")",
";",
"var",
"path",
"=",
"require",
"(",
"'path'",
")",
";",
"var",
"fixturePath",
"=",
"path",
".",
"resolve",
"(",
"'./features/extra/fixtures/tmp'",
")",
";",
"if",
"(",
"fs",... | Delete fixtures | [
"Delete",
"fixtures"
] | c23e5f0edd150f8885267e5f7c8a564f8e6e8562 | https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/features/extra/cleanup.js#L33-L43 | train | Remove all the fixtures | [
30522,
3853,
1006,
1007,
1063,
13075,
1042,
2015,
1027,
5478,
1006,
1005,
1042,
2015,
1005,
1007,
1025,
13075,
4130,
1027,
5478,
1006,
1005,
4130,
1005,
1007,
1025,
13075,
15083,
15069,
1027,
4130,
1012,
10663,
1006,
1005,
1012,
1013,
2838,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
wuchangming/spy-debugger | buildin_modules/weinre/web/client/StylesSidebarPane.js | shouldCommitValueSemicolon | function shouldCommitValueSemicolon(text, cursorPosition)
{
// FIXME: should this account for semicolons inside comments?
var openQuote = "";
for (var i = 0; i < cursorPosition; ++i) {
var ch = text[i];
if (ch === "\\" && openQuote !== "")
... | javascript | function shouldCommitValueSemicolon(text, cursorPosition)
{
// FIXME: should this account for semicolons inside comments?
var openQuote = "";
for (var i = 0; i < cursorPosition; ++i) {
var ch = text[i];
if (ch === "\\" && openQuote !== "")
... | [
"function",
"shouldCommitValueSemicolon",
"(",
"text",
",",
"cursorPosition",
")",
"{",
"// FIXME: should this account for semicolons inside comments?",
"var",
"openQuote",
"=",
"\"\"",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"cursorPosition",
";",
"++... | remove color swatch and the like | [
"remove",
"color",
"swatch",
"and",
"the",
"like"
] | 55c1dda0dff0c44920673711656ddfd7ff03c307 | https://github.com/wuchangming/spy-debugger/blob/55c1dda0dff0c44920673711656ddfd7ff03c307/buildin_modules/weinre/web/client/StylesSidebarPane.js#L1550-L1564 | train | check if the character at cursorPosition is a backslash | [
30522,
3853,
2323,
9006,
22930,
10175,
15808,
23238,
25778,
2239,
1006,
3793,
1010,
12731,
25301,
14536,
19234,
1007,
1063,
1013,
1013,
8081,
4168,
1024,
2323,
2023,
4070,
2005,
4100,
25778,
5644,
2503,
7928,
1029,
13075,
2330,
28940,
12184,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/TreeBindingAdapter.js | function() {
// ensure only TreeBindings are enhanced which have not been enhanced yet
if (!(this instanceof TreeBinding) || this._bIsAdapted) {
return;
}
// apply the methods of the adapters prototype to the TreeBinding instance
for (var fn in TreeBindingAdapter.prototype) {
if (TreeBindingAda... | javascript | function() {
// ensure only TreeBindings are enhanced which have not been enhanced yet
if (!(this instanceof TreeBinding) || this._bIsAdapted) {
return;
}
// apply the methods of the adapters prototype to the TreeBinding instance
for (var fn in TreeBindingAdapter.prototype) {
if (TreeBindingAda... | [
"function",
"(",
")",
"{",
"// ensure only TreeBindings are enhanced which have not been enhanced yet",
"if",
"(",
"!",
"(",
"this",
"instanceof",
"TreeBinding",
")",
"||",
"this",
".",
"_bIsAdapted",
")",
"{",
"return",
";",
"}",
"// apply the methods of the adapters pro... | Adapter for TreeBindings to add the ListBinding functionality and use the
tree structure in list based controls.
@alias sap.ui.model.TreeBindingAdapter
@class
@experimental This module is only for experimental and internal use!
@protected | [
"Adapter",
"for",
"TreeBindings",
"to",
"add",
"the",
"ListBinding",
"functionality",
"and",
"use",
"the",
"tree",
"structure",
"in",
"list",
"based",
"controls",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/TreeBindingAdapter.js#L35-L73 | train | Creates a new TreeBinding instance | [
30522,
3853,
1006,
1007,
1063,
1013,
1013,
5676,
2069,
3392,
8428,
4667,
2015,
2024,
9412,
2029,
2031,
2025,
2042,
9412,
2664,
2065,
1006,
999,
1006,
2023,
6013,
11253,
3392,
8428,
4667,
1007,
1064,
1064,
2023,
1012,
1035,
20377,
8447,
13... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/language/XMLUtils.js | getValueQuery | function getValueQuery(tagInfo) {
var query;
if (tagInfo.token.string === "=") {
return "";
}
// Remove quotation marks in query.
query = tagInfo.token.string.substr(1, tagInfo.offset - 1);
// Get the last option to use as a query to support multiple options.... | javascript | function getValueQuery(tagInfo) {
var query;
if (tagInfo.token.string === "=") {
return "";
}
// Remove quotation marks in query.
query = tagInfo.token.string.substr(1, tagInfo.offset - 1);
// Get the last option to use as a query to support multiple options.... | [
"function",
"getValueQuery",
"(",
"tagInfo",
")",
"{",
"var",
"query",
";",
"if",
"(",
"tagInfo",
".",
"token",
".",
"string",
"===",
"\"=\"",
")",
"{",
"return",
"\"\"",
";",
"}",
"// Remove quotation marks in query.",
"query",
"=",
"tagInfo",
".",
"token",... | Return the query text of a value.
@param {!{token: Object, tokenType: number, offset: number, exclusionList: Array.<string>, tagName: string, attrName: string, shouldReplace: boolean}}
@return {string} The query to use to matching hints. | [
"Return",
"the",
"query",
"text",
"of",
"a",
"value",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/XMLUtils.js#L278-L288 | train | Get the value query from the tagInfo | [
30522,
3853,
2131,
10175,
5657,
4226,
2854,
1006,
6415,
2378,
14876,
1007,
1063,
13075,
23032,
1025,
2065,
1006,
6415,
2378,
14876,
1012,
19204,
1012,
5164,
1027,
1027,
1027,
1000,
1027,
1000,
1007,
1063,
2709,
1000,
1000,
1025,
1065,
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... |
SeleniumHQ/selenium | javascript/selenium-core/scripts/selenium-api.js | getFailureMessage | function getFailureMessage(exceptionMessage) {
var msg = 'Snapsie failed: ';
if (exceptionMessage) {
if (exceptionMessage ==
"Automation server can't create object") {
msg += 'Is it installed? Does it have permission to run '
... | javascript | function getFailureMessage(exceptionMessage) {
var msg = 'Snapsie failed: ';
if (exceptionMessage) {
if (exceptionMessage ==
"Automation server can't create object") {
msg += 'Is it installed? Does it have permission to run '
... | [
"function",
"getFailureMessage",
"(",
"exceptionMessage",
")",
"{",
"var",
"msg",
"=",
"'Snapsie failed: '",
";",
"if",
"(",
"exceptionMessage",
")",
"{",
"if",
"(",
"exceptionMessage",
"==",
"\"Automation server can't create object\"",
")",
"{",
"msg",
"+=",
"'Is i... | targeting snapsIE >= 0.2 | [
"targeting",
"snapsIE",
">",
"=",
"0",
".",
"2"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/selenium-api.js#L2982-L2998 | train | getFailureMessage - returns a message that was passed to snapsie | [
30522,
3853,
2131,
7011,
4014,
5397,
7834,
3736,
3351,
1006,
6453,
7834,
3736,
3351,
1007,
1063,
13075,
5796,
2290,
1027,
1005,
20057,
2666,
3478,
1024,
1005,
1025,
2065,
1006,
6453,
7834,
3736,
3351,
1007,
1063,
2065,
1006,
6453,
7834,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
markdown-it/markdown-it | support/demo_template/index.js | injectLineNumbers | function injectLineNumbers(tokens, idx, options, env, slf) {
var line;
if (tokens[idx].map && tokens[idx].level === 0) {
line = tokens[idx].map[0];
tokens[idx].attrJoin('class', 'line');
tokens[idx].attrSet('data-line', String(line));
}
return slf.renderToken(tokens, idx, options, env,... | javascript | function injectLineNumbers(tokens, idx, options, env, slf) {
var line;
if (tokens[idx].map && tokens[idx].level === 0) {
line = tokens[idx].map[0];
tokens[idx].attrJoin('class', 'line');
tokens[idx].attrSet('data-line', String(line));
}
return slf.renderToken(tokens, idx, options, env,... | [
"function",
"injectLineNumbers",
"(",
"tokens",
",",
"idx",
",",
"options",
",",
"env",
",",
"slf",
")",
"{",
"var",
"line",
";",
"if",
"(",
"tokens",
"[",
"idx",
"]",
".",
"map",
"&&",
"tokens",
"[",
"idx",
"]",
".",
"level",
"===",
"0",
")",
"{... | Inject line numbers for sync scroll. Notes: - We track only headings and paragraphs on first level. That's enough. - Footnotes content causes jumps. Level limit filter it automatically. | [
"Inject",
"line",
"numbers",
"for",
"sync",
"scroll",
".",
"Notes",
":",
"-",
"We",
"track",
"only",
"headings",
"and",
"paragraphs",
"on",
"first",
"level",
".",
"That",
"s",
"enough",
".",
"-",
"Footnotes",
"content",
"causes",
"jumps",
".",
"Level",
"... | ba6830ba13fb92953a91fb90318964ccd15b82c4 | https://github.com/markdown-it/markdown-it/blob/ba6830ba13fb92953a91fb90318964ccd15b82c4/support/demo_template/index.js#L169-L177 | train | Inject line numbers into the tokens | [
30522,
3853,
1999,
20614,
4179,
19172,
17198,
1006,
19204,
2015,
1010,
8909,
2595,
1010,
7047,
1010,
4372,
2615,
1010,
22889,
2546,
1007,
1063,
13075,
2240,
1025,
2065,
1006,
19204,
2015,
1031,
8909,
2595,
1033,
1012,
4949,
1004,
1004,
1920... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
keplergl/kepler.gl | scripts/action-table-maker.js | addActionCreator | function addActionCreator(path, actionMap, filePath) {
const {node, parentPath} = path;
if (node.arguments.length && parentPath.node && parentPath.node.id) {
const action = parentPath.node.id.name;
const firstArg = node.arguments[0];
const actionType = firstArg.property ? firstArg.property.name : firs... | javascript | function addActionCreator(path, actionMap, filePath) {
const {node, parentPath} = path;
if (node.arguments.length && parentPath.node && parentPath.node.id) {
const action = parentPath.node.id.name;
const firstArg = node.arguments[0];
const actionType = firstArg.property ? firstArg.property.name : firs... | [
"function",
"addActionCreator",
"(",
"path",
",",
"actionMap",
",",
"filePath",
")",
"{",
"const",
"{",
"node",
",",
"parentPath",
"}",
"=",
"path",
";",
"if",
"(",
"node",
".",
"arguments",
".",
"length",
"&&",
"parentPath",
".",
"node",
"&&",
"parentPa... | Parse createAction function to add action to action type
@param {*} path
@param {*} actionMap
@param {*} filePath | [
"Parse",
"createAction",
"function",
"to",
"add",
"action",
"to",
"action",
"type"
] | 779238435707cc54335c2d00001e4b9334b314aa | https://github.com/keplergl/kepler.gl/blob/779238435707cc54335c2d00001e4b9334b314aa/scripts/action-table-maker.js#L99-L112 | train | Add action creator | [
30522,
3853,
5587,
18908,
3258,
16748,
8844,
1006,
4130,
1010,
2895,
2863,
2361,
1010,
5371,
15069,
1007,
1063,
9530,
3367,
1063,
13045,
1010,
6687,
15069,
1065,
1027,
4130,
1025,
2065,
1006,
13045,
1012,
9918,
1012,
3091,
1004,
1004,
6687,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular/material | src/core/services/gesture/gesture.js | gestureEnd | function gestureEnd(ev) {
if (!pointer || !typesMatch(ev, pointer)) return;
updatePointerState(ev, pointer);
pointer.endTime = +Date.now();
if (ev.type !== 'pointercancel') {
runHandlers('end', ev);
}
lastPointer = pointer;
pointer = null;
} | javascript | function gestureEnd(ev) {
if (!pointer || !typesMatch(ev, pointer)) return;
updatePointerState(ev, pointer);
pointer.endTime = +Date.now();
if (ev.type !== 'pointercancel') {
runHandlers('end', ev);
}
lastPointer = pointer;
pointer = null;
} | [
"function",
"gestureEnd",
"(",
"ev",
")",
"{",
"if",
"(",
"!",
"pointer",
"||",
"!",
"typesMatch",
"(",
"ev",
",",
"pointer",
")",
")",
"return",
";",
"updatePointerState",
"(",
"ev",
",",
"pointer",
")",
";",
"pointer",
".",
"endTime",
"=",
"+",
"Da... | /*
If an end event happens of the right type, update the pointer, run endHandlers, and save the pointer as 'lastPointer' | [
"/",
"*",
"If",
"an",
"end",
"event",
"happens",
"of",
"the",
"right",
"type",
"update",
"the",
"pointer",
"run",
"endHandlers",
"and",
"save",
"the",
"pointer",
"as",
"lastPointer"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/gesture/gesture.js#L681-L693 | train | End gesture event handler | [
30522,
3853,
9218,
10497,
1006,
23408,
1007,
1063,
2065,
1006,
999,
20884,
1064,
1064,
999,
4127,
18900,
2818,
1006,
23408,
1010,
20884,
1007,
1007,
2709,
1025,
10651,
8400,
2545,
12259,
1006,
23408,
1010,
20884,
1007,
1025,
20884,
1012,
22... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
nhn/tui.editor | src/js/wysiwygCommands/tableRemoveRow.js | focusToFirstTd | function focusToFirstTd(sq, range, $tr, tableMgr) {
const nextFocusCell = $tr.find('td').get(0);
range.setStart(nextFocusCell, 0);
range.collapse(true);
tableMgr.setLastCellNode(nextFocusCell);
sq.setSelection(range);
} | javascript | function focusToFirstTd(sq, range, $tr, tableMgr) {
const nextFocusCell = $tr.find('td').get(0);
range.setStart(nextFocusCell, 0);
range.collapse(true);
tableMgr.setLastCellNode(nextFocusCell);
sq.setSelection(range);
} | [
"function",
"focusToFirstTd",
"(",
"sq",
",",
"range",
",",
"$tr",
",",
"tableMgr",
")",
"{",
"const",
"nextFocusCell",
"=",
"$tr",
".",
"find",
"(",
"'td'",
")",
".",
"get",
"(",
"0",
")",
";",
"range",
".",
"setStart",
"(",
"nextFocusCell",
",",
"0... | Focus to first TD in given TR
@param {SquireExt} sq Squire instance
@param {Range} range Range object
@param {jQuery} $tr jQuery wrapped TR
@param {object} tableMgr Table manager | [
"Focus",
"to",
"first",
"TD",
"in",
"given",
"TR"
] | e75ab08c2a7ab07d1143e318f7cde135c5e3002e | https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/wysiwygCommands/tableRemoveRow.js#L53-L60 | train | Focus to first TD | [
30522,
3853,
3579,
3406,
8873,
12096,
2102,
2094,
1006,
5490,
1010,
2846,
1010,
1002,
19817,
1010,
2795,
24798,
2099,
1007,
1063,
9530,
3367,
2279,
14876,
7874,
29109,
2140,
1027,
1002,
19817,
1012,
2424,
1006,
1005,
14595,
1005,
1007,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
apache/incubator-echarts | src/component/tooltip/TooltipContent.js | function () {
// FIXME
// Move this logic to ec main?
var container = this._container;
var stl = container.currentStyle
|| document.defaultView.getComputedStyle(container);
var domStyle = container.style;
if (domStyle.position !== 'absolute' && stl.position !=... | javascript | function () {
// FIXME
// Move this logic to ec main?
var container = this._container;
var stl = container.currentStyle
|| document.defaultView.getComputedStyle(container);
var domStyle = container.style;
if (domStyle.position !== 'absolute' && stl.position !=... | [
"function",
"(",
")",
"{",
"// FIXME",
"// Move this logic to ec main?",
"var",
"container",
"=",
"this",
".",
"_container",
";",
"var",
"stl",
"=",
"container",
".",
"currentStyle",
"||",
"document",
".",
"defaultView",
".",
"getComputedStyle",
"(",
"container",
... | Update when tooltip is rendered | [
"Update",
"when",
"tooltip",
"is",
"rendered"
] | 4d0ea095dc3929cb6de40c45748826e7999c7aa8 | https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/tooltip/TooltipContent.js#L194-L207 | train | Set the tooltip to relative | [
30522,
3853,
1006,
1007,
1063,
1013,
1013,
8081,
4168,
1013,
1013,
2693,
2023,
7961,
2000,
14925,
2364,
1029,
13075,
11661,
1027,
2023,
1012,
1035,
11661,
1025,
13075,
2358,
2140,
1027,
11661,
1012,
14731,
27983,
1064,
1064,
6254,
1012,
123... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | requireFor | function requireFor(oElement) {
var mAlias2URN = {},
oAttribute = oElement.getAttributeNodeNS(sNAMESPACE, "require"),
sModuleNames,
aURNs;
function asyncRequire() {
return new SyncPromise(function (resolve) {
// Note: currently there is no way to detect failure
sap.ui.require(aU... | javascript | function requireFor(oElement) {
var mAlias2URN = {},
oAttribute = oElement.getAttributeNodeNS(sNAMESPACE, "require"),
sModuleNames,
aURNs;
function asyncRequire() {
return new SyncPromise(function (resolve) {
// Note: currently there is no way to detect failure
sap.ui.require(aU... | [
"function",
"requireFor",
"(",
"oElement",
")",
"{",
"var",
"mAlias2URN",
"=",
"{",
"}",
",",
"oAttribute",
"=",
"oElement",
".",
"getAttributeNodeNS",
"(",
"sNAMESPACE",
",",
"\"require\"",
")",
",",
"sModuleNames",
",",
"aURNs",
";",
"function",
"asyncRequir... | Load required modules for the given element (a)synchronously, according to its
"template:require" attribute which may contain either a space separated list of
dot-separated module names or a JSON representation of a map from alias to
slash-separated Unified Resource Names (URNs). In the first case, the resulting
module... | [
"Load",
"required",
"modules",
"for",
"the",
"given",
"element",
"(",
"a",
")",
"synchronously",
"according",
"to",
"its",
"template",
":",
"require",
"attribute",
"which",
"may",
"contain",
"either",
"a",
"space",
"separated",
"list",
"of",
"dot",
"-",
"sep... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1272-L1315 | train | This function is called by sap. ui. require to determine the module name of the module. | [
30522,
3853,
5478,
29278,
1006,
1051,
12260,
3672,
1007,
1063,
13075,
16007,
3022,
2475,
14287,
1027,
1063,
1065,
1010,
1051,
19321,
3089,
8569,
2618,
1027,
1051,
12260,
3672,
1012,
2131,
19321,
3089,
8569,
6528,
10244,
3619,
1006,
1055,
18... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/caja-html-sanitizer.js | escapeCssUrlChar | function escapeCssUrlChar(ch) {
return cssUrlChars[ch]
|| (cssUrlChars[ch] = (ch < '\x10' ? '%0' : '%')
+ ch.charCodeAt(0).toString(16));
} | javascript | function escapeCssUrlChar(ch) {
return cssUrlChars[ch]
|| (cssUrlChars[ch] = (ch < '\x10' ? '%0' : '%')
+ ch.charCodeAt(0).toString(16));
} | [
"function",
"escapeCssUrlChar",
"(",
"ch",
")",
"{",
"return",
"cssUrlChars",
"[",
"ch",
"]",
"||",
"(",
"cssUrlChars",
"[",
"ch",
"]",
"=",
"(",
"ch",
"<",
"'\\x10'",
"?",
"'%0'",
":",
"'%'",
")",
"+",
"ch",
".",
"charCodeAt",
"(",
"0",
")",
".",
... | Maps chars to URI escaped equivalents: "\n" -> "%0a".
@private | [
"Maps",
"chars",
"to",
"URI",
"escaped",
"equivalents",
":",
"\\",
"n",
"-",
">",
"%0a",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js#L857-L861 | train | Escape a CSS URL character | [
30522,
3853,
4019,
6169,
26210,
29358,
2906,
1006,
10381,
1007,
1063,
2709,
20116,
26210,
29358,
11650,
1031,
10381,
1033,
1064,
1064,
1006,
20116,
26210,
29358,
11650,
1031,
10381,
1033,
1027,
1006,
10381,
1026,
1005,
1032,
1060,
10790,
1005... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/editor/CodeHintManager.js | _handleKeydownEvent | function _handleKeydownEvent(jqEvent, editor, event) {
keyDownEditor = editor;
if (!(event.ctrlKey || event.altKey || event.metaKey) &&
(event.keyCode === KeyEvent.DOM_VK_ENTER ||
event.keyCode === KeyEvent.DOM_VK_RETURN ||
event.keyCode === KeyEvent.DOM... | javascript | function _handleKeydownEvent(jqEvent, editor, event) {
keyDownEditor = editor;
if (!(event.ctrlKey || event.altKey || event.metaKey) &&
(event.keyCode === KeyEvent.DOM_VK_ENTER ||
event.keyCode === KeyEvent.DOM_VK_RETURN ||
event.keyCode === KeyEvent.DOM... | [
"function",
"_handleKeydownEvent",
"(",
"jqEvent",
",",
"editor",
",",
"event",
")",
"{",
"keyDownEditor",
"=",
"editor",
";",
"if",
"(",
"!",
"(",
"event",
".",
"ctrlKey",
"||",
"event",
".",
"altKey",
"||",
"event",
".",
"metaKey",
")",
"&&",
"(",
"e... | Handles keys related to displaying, searching, and navigating the hint list.
This gets called before handleChange.
TODO: Ideally, we'd get a more semantic event from the editor that told us
what changed so that we could do all of this logic without looking at
key events. Then, the purposes of handleKeyEvent and handle... | [
"Handles",
"keys",
"related",
"to",
"displaying",
"searching",
"and",
"navigating",
"the",
"hint",
"list",
".",
"This",
"gets",
"called",
"before",
"handleChange",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/CodeHintManager.js#L556-L564 | train | Handles a keydown event. | [
30522,
3853,
1035,
5047,
14839,
7698,
18697,
3372,
1006,
1046,
4160,
18697,
3372,
1010,
3559,
1010,
2724,
1007,
1063,
3145,
7698,
2098,
15660,
1027,
3559,
1025,
2065,
1006,
999,
1006,
2724,
1012,
14931,
12190,
14839,
1064,
1064,
2724,
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... |
lovell/sharp | lib/operation.js | blur | function blur (sigma) {
if (!is.defined(sigma)) {
// No arguments: default to mild blur
this.options.blurSigma = -1;
} else if (is.bool(sigma)) {
// Boolean argument: apply mild blur?
this.options.blurSigma = sigma ? -1 : 0;
} else if (is.number(sigma) && is.inRange(sigma, 0.3, 1000)) {
// Num... | javascript | function blur (sigma) {
if (!is.defined(sigma)) {
// No arguments: default to mild blur
this.options.blurSigma = -1;
} else if (is.bool(sigma)) {
// Boolean argument: apply mild blur?
this.options.blurSigma = sigma ? -1 : 0;
} else if (is.number(sigma) && is.inRange(sigma, 0.3, 1000)) {
// Num... | [
"function",
"blur",
"(",
"sigma",
")",
"{",
"if",
"(",
"!",
"is",
".",
"defined",
"(",
"sigma",
")",
")",
"{",
"// No arguments: default to mild blur",
"this",
".",
"options",
".",
"blurSigma",
"=",
"-",
"1",
";",
"}",
"else",
"if",
"(",
"is",
".",
"... | Blur the image.
When used without parameters, performs a fast, mild blur of the output image.
When a `sigma` is provided, performs a slower, more accurate Gaussian blur.
@param {Number} [sigma] a value between 0.3 and 1000 representing the sigma of the Gaussian mask, where `sigma = 1 + radius / 2`.
@returns {Sharp}
@th... | [
"Blur",
"the",
"image",
".",
"When",
"used",
"without",
"parameters",
"performs",
"a",
"fast",
"mild",
"blur",
"of",
"the",
"output",
"image",
".",
"When",
"a",
"sigma",
"is",
"provided",
"performs",
"a",
"slower",
"more",
"accurate",
"Gaussian",
"blur",
"... | 05d76eeadfe54713606a615185b2da047923406b | https://github.com/lovell/sharp/blob/05d76eeadfe54713606a615185b2da047923406b/lib/operation.js#L157-L171 | train | Blur the image from the specified sigma | [
30522,
3853,
14819,
1006,
13201,
1007,
1063,
2065,
1006,
999,
2003,
1012,
4225,
1006,
13201,
1007,
1007,
1063,
1013,
1013,
2053,
9918,
1024,
12398,
2000,
10256,
14819,
2023,
1012,
7047,
1012,
14819,
5332,
21693,
2050,
1027,
1011,
1015,
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... |
GitbookIO/gitbook | lib/models/templateBlock.js | extractKwargs | function extractKwargs(args) {
var last = args[args.length - 1];
return (is.object(last) && last.__keywords)? args.pop() : {};
} | javascript | function extractKwargs(args) {
var last = args[args.length - 1];
return (is.object(last) && last.__keywords)? args.pop() : {};
} | [
"function",
"extractKwargs",
"(",
"args",
")",
"{",
"var",
"last",
"=",
"args",
"[",
"args",
".",
"length",
"-",
"1",
"]",
";",
"return",
"(",
"is",
".",
"object",
"(",
"last",
")",
"&&",
"last",
".",
"__keywords",
")",
"?",
"args",
".",
"pop",
"... | Extract kwargs from an arguments array
@param {Array} args
@return {Object} | [
"Extract",
"kwargs",
"from",
"an",
"arguments",
"array"
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/models/templateBlock.js#L276-L279 | train | Extract keywords from arguments | [
30522,
3853,
14817,
2243,
9028,
5620,
1006,
12098,
5620,
1007,
1063,
13075,
2197,
30524,
3769,
1006,
1007,
1024,
1063,
1065,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/routing/Router.js | function(oData, fnFunction, oListener) {
return this.attachEvent(Router.M_EVENTS.BYPASSED, oData, fnFunction, oListener);
} | javascript | function(oData, fnFunction, oListener) {
return this.attachEvent(Router.M_EVENTS.BYPASSED, oData, fnFunction, oListener);
} | [
"function",
"(",
"oData",
",",
"fnFunction",
",",
"oListener",
")",
"{",
"return",
"this",
".",
"attachEvent",
"(",
"Router",
".",
"M_EVENTS",
".",
"BYPASSED",
",",
"oData",
",",
"fnFunction",
",",
"oListener",
")",
";",
"}"
] | The 'bypassed' event is fired, when no route of the router matches the changed URL hash
@name sap.ui.core.routing.Router#bypassed
@event
@param {sap.ui.base.Event} oEvent
@param {sap.ui.base.EventProvider} oEvent.getSource
@param {object} oEvent.getParameters
@param {string} oEvent.getParameters.hash the current URL h... | [
"The",
"bypassed",
"event",
"is",
"fired",
"when",
"no",
"route",
"of",
"the",
"router",
"matches",
"the",
"changed",
"URL",
"hash"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/Router.js#L949-L951 | train | attaches the bypassed event to the router | [
30522,
3853,
1006,
1051,
2850,
2696,
1010,
1042,
2078,
11263,
27989,
1010,
19330,
27870,
3678,
1007,
1063,
2709,
2023,
1012,
29489,
15338,
1006,
2799,
2099,
1012,
1049,
1035,
2824,
1012,
27539,
1010,
1051,
2850,
2696,
1010,
1042,
2078,
1126... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | cleanAvailableUpdates | function cleanAvailableUpdates(updates) {
return updates.reduce(function (arr, updateInfo) {
var extDefinition = extensions[updateInfo.id];
if (!extDefinition || !extDefinition.installInfo) {
// extension has been uninstalled in the meantime
return arr;
... | javascript | function cleanAvailableUpdates(updates) {
return updates.reduce(function (arr, updateInfo) {
var extDefinition = extensions[updateInfo.id];
if (!extDefinition || !extDefinition.installInfo) {
// extension has been uninstalled in the meantime
return arr;
... | [
"function",
"cleanAvailableUpdates",
"(",
"updates",
")",
"{",
"return",
"updates",
".",
"reduce",
"(",
"function",
"(",
"arr",
",",
"updateInfo",
")",
"{",
"var",
"extDefinition",
"=",
"extensions",
"[",
"updateInfo",
".",
"id",
"]",
";",
"if",
"(",
"!",
... | Takes the array returned from getAvailableUpdates() as an input and removes those entries
that are no longer current - when currently installed version of an extension
is equal or newer than registryVersion returned by getAvailableUpdates().
This function is designed to work without the necessity to download extension ... | [
"Takes",
"the",
"array",
"returned",
"from",
"getAvailableUpdates",
"()",
"as",
"an",
"input",
"and",
"removes",
"those",
"entries",
"that",
"are",
"no",
"longer",
"current",
"-",
"when",
"currently",
"installed",
"version",
"of",
"an",
"extension",
"is",
"equ... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/ExtensionManager.js#L722-L737 | train | cleanAvailableUpdates - clean the available updates | [
30522,
3853,
4550,
12462,
11733,
3468,
6279,
27122,
1006,
14409,
1007,
1063,
2709,
14409,
1012,
5547,
1006,
3853,
1006,
12098,
2099,
1010,
10651,
2378,
14876,
1007,
1063,
13075,
4654,
2102,
30524,
16294,
22753,
1064,
1064,
999,
4654,
2102,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Shopify/draggable | src/Draggable/Plugins/Mirror/Mirror.js | resetMirror | function resetMirror({mirror, source, options, ...args}) {
return withPromise((resolve) => {
let offsetHeight;
let offsetWidth;
if (options.constrainDimensions) {
const computedSourceStyles = getComputedStyle(source);
offsetHeight = computedSourceStyles.getPropertyValue('height');
offse... | javascript | function resetMirror({mirror, source, options, ...args}) {
return withPromise((resolve) => {
let offsetHeight;
let offsetWidth;
if (options.constrainDimensions) {
const computedSourceStyles = getComputedStyle(source);
offsetHeight = computedSourceStyles.getPropertyValue('height');
offse... | [
"function",
"resetMirror",
"(",
"{",
"mirror",
",",
"source",
",",
"options",
",",
"...",
"args",
"}",
")",
"{",
"return",
"withPromise",
"(",
"(",
"resolve",
")",
"=>",
"{",
"let",
"offsetHeight",
";",
"let",
"offsetWidth",
";",
"if",
"(",
"options",
... | Applys mirror styles
@param {Object} state
@param {HTMLElement} state.mirror
@param {HTMLElement} state.source
@param {Object} state.options
@return {Promise}
@private | [
"Applys",
"mirror",
"styles"
] | ecc04b2cdb8b5009664862472ff8cb237c38cfeb | https://github.com/Shopify/draggable/blob/ecc04b2cdb8b5009664862472ff8cb237c38cfeb/src/Draggable/Plugins/Mirror/Mirror.js#L366-L390 | train | Reset mirror to its default values | [
30522,
3853,
25141,
14503,
29165,
1006,
1063,
5259,
1010,
3120,
1010,
7047,
1010,
1012,
1012,
1012,
12098,
5620,
1065,
1007,
1063,
2709,
2007,
21572,
28732,
1006,
1006,
10663,
1007,
1027,
1028,
1063,
2292,
16396,
26036,
13900,
1025,
2292,
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/thirdparty/less.js | expectChar | function expectChar(arg, msg) {
if (input.charAt(i) === arg) {
skipWhitespace(1);
return arg;
}
error(msg || "expected '" + arg + "' got '" + input.charAt(i) + "'");
} | javascript | function expectChar(arg, msg) {
if (input.charAt(i) === arg) {
skipWhitespace(1);
return arg;
}
error(msg || "expected '" + arg + "' got '" + input.charAt(i) + "'");
} | [
"function",
"expectChar",
"(",
"arg",
",",
"msg",
")",
"{",
"if",
"(",
"input",
".",
"charAt",
"(",
"i",
")",
"===",
"arg",
")",
"{",
"skipWhitespace",
"(",
"1",
")",
";",
"return",
"arg",
";",
"}",
"error",
"(",
"msg",
"||",
"\"expected '\"",
"+",... | Specialization of expect() | [
"Specialization",
"of",
"expect",
"()"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/less.js#L266-L272 | train | expectChar - Check if the character is a valid character | [
30522,
3853,
5987,
7507,
2099,
1006,
12098,
2290,
1010,
5796,
2290,
1007,
1063,
2065,
1006,
7953,
1012,
25869,
4017,
1006,
1045,
1007,
1027,
1027,
1027,
12098,
2290,
1007,
1063,
13558,
2860,
16584,
2229,
15327,
1006,
1015,
1007,
1025,
2709,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
openlayers/openlayers | examples/wms-custom-proj.js | DECtoSEX | function DECtoSEX(angle) {
// Extract DMS
const deg = parseInt(angle, 10);
const min = parseInt((angle - deg) * 60, 10);
const sec = (((angle - deg) * 60) - min) * 60;
// Result in degrees sex (dd.mmss)
return deg + min / 100 + sec / 10000;
} | javascript | function DECtoSEX(angle) {
// Extract DMS
const deg = parseInt(angle, 10);
const min = parseInt((angle - deg) * 60, 10);
const sec = (((angle - deg) * 60) - min) * 60;
// Result in degrees sex (dd.mmss)
return deg + min / 100 + sec / 10000;
} | [
"function",
"DECtoSEX",
"(",
"angle",
")",
"{",
"// Extract DMS",
"const",
"deg",
"=",
"parseInt",
"(",
"angle",
",",
"10",
")",
";",
"const",
"min",
"=",
"parseInt",
"(",
"(",
"angle",
"-",
"deg",
")",
"*",
"60",
",",
"10",
")",
";",
"const",
"sec... | Convert DEC angle to SEX DMS | [
"Convert",
"DEC",
"angle",
"to",
"SEX",
"DMS"
] | f366eaea522388fb575b11010e69d309164baca7 | https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/examples/wms-custom-proj.js#L193-L203 | train | Convert DMS angle to sex | [
30522,
3853,
11703,
22282,
2595,
1006,
6466,
1007,
1063,
1013,
1013,
14817,
1040,
5244,
9530,
3367,
2139,
2290,
1027,
11968,
20240,
3372,
1006,
6466,
1010,
2184,
1007,
1025,
9530,
3367,
8117,
1027,
11968,
20240,
3372,
1006,
1006,
6466,
1011... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/JSUtils/HintUtils.js | annotateKeywords | function annotateKeywords(keywords) {
return keywords.map(function (t) {
t.keyword = true;
t.origin = "ecmascript";
return t;
});
} | javascript | function annotateKeywords(keywords) {
return keywords.map(function (t) {
t.keyword = true;
t.origin = "ecmascript";
return t;
});
} | [
"function",
"annotateKeywords",
"(",
"keywords",
")",
"{",
"return",
"keywords",
".",
"map",
"(",
"function",
"(",
"t",
")",
"{",
"t",
".",
"keyword",
"=",
"true",
";",
"t",
".",
"origin",
"=",
"\"ecmascript\"",
";",
"return",
"t",
";",
"}",
")",
";"... | /*
Annotate a list of tokens as keywords
@param {Array.<Object>} keyword - list of keyword tokens
@return {Array.<Object>} - the input array; to each object in the array a
new keyword {boolean} property has been added to indicate that the
hint is a keyword. | [
"/",
"*",
"Annotate",
"a",
"list",
"of",
"tokens",
"as",
"keywords"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/HintUtils.js#L166-L172 | train | annotate keywords with a keyword | [
30522,
3853,
5754,
17287,
23125,
3240,
22104,
1006,
3145,
22104,
1007,
1063,
2709,
3145,
22104,
1012,
4949,
1006,
3853,
1006,
1056,
1007,
1063,
1056,
1012,
3145,
18351,
1027,
2995,
1025,
1056,
1012,
4761,
1027,
1000,
14925,
9335,
23235,
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... |
apache/incubator-echarts | src/component/helper/BrushTargetManager.js | getScales | function getScales(xyMinMaxCurr, xyMinMaxOrigin) {
var sizeCurr = getSize(xyMinMaxCurr);
var sizeOrigin = getSize(xyMinMaxOrigin);
var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]];
isNaN(scales[0]) && (scales[0] = 1);
isNaN(scales[1]) && (scales[1] = 1);
return scales;
} | javascript | function getScales(xyMinMaxCurr, xyMinMaxOrigin) {
var sizeCurr = getSize(xyMinMaxCurr);
var sizeOrigin = getSize(xyMinMaxOrigin);
var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]];
isNaN(scales[0]) && (scales[0] = 1);
isNaN(scales[1]) && (scales[1] = 1);
return scales;
} | [
"function",
"getScales",
"(",
"xyMinMaxCurr",
",",
"xyMinMaxOrigin",
")",
"{",
"var",
"sizeCurr",
"=",
"getSize",
"(",
"xyMinMaxCurr",
")",
";",
"var",
"sizeOrigin",
"=",
"getSize",
"(",
"xyMinMaxOrigin",
")",
";",
"var",
"scales",
"=",
"[",
"sizeCurr",
"[",... | We have to process scale caused by dataZoom manually, although it might be not accurate. | [
"We",
"have",
"to",
"process",
"scale",
"caused",
"by",
"dataZoom",
"manually",
"although",
"it",
"might",
"be",
"not",
"accurate",
"."
] | 4d0ea095dc3929cb6de40c45748826e7999c7aa8 | https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/component/helper/BrushTargetManager.js#L445-L452 | train | Returns the scales of the image | [
30522,
3853,
4152,
9289,
2229,
1006,
1060,
24335,
2378,
17848,
10841,
12171,
1010,
1060,
24335,
2378,
17848,
10050,
11528,
1007,
1063,
13075,
2946,
10841,
12171,
1027,
4152,
4697,
1006,
1060,
24335,
2378,
17848,
10841,
12171,
1007,
1025,
1307... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
material-components/material-components-web | scripts/cherry-pick-commits.js | attemptCherryPicks | async function attemptCherryPicks(tag, list, mode) {
const results = {
successful: [],
conflicted: [],
skipped: [],
};
console.log(`Checking out ${tag}`);
await simpleGit.checkout([tag]);
for (const logLine of list) {
if (shouldSkipCommit(logLine, mode)) {
results.skipped.push(logLine)... | javascript | async function attemptCherryPicks(tag, list, mode) {
const results = {
successful: [],
conflicted: [],
skipped: [],
};
console.log(`Checking out ${tag}`);
await simpleGit.checkout([tag]);
for (const logLine of list) {
if (shouldSkipCommit(logLine, mode)) {
results.skipped.push(logLine)... | [
"async",
"function",
"attemptCherryPicks",
"(",
"tag",
",",
"list",
",",
"mode",
")",
"{",
"const",
"results",
"=",
"{",
"successful",
":",
"[",
"]",
",",
"conflicted",
":",
"[",
"]",
",",
"skipped",
":",
"[",
"]",
",",
"}",
";",
"console",
".",
"l... | Checks out the given tag and attempts to cherry-pick each commit in the list against it. If a conflict is encountered, that cherry-pick is aborted and processing moves on to the next commit. | [
"Checks",
"out",
"the",
"given",
"tag",
"and",
"attempts",
"to",
"cherry",
"-",
"pick",
"each",
"commit",
"in",
"the",
"list",
"against",
"it",
".",
"If",
"a",
"conflict",
"is",
"encountered",
"that",
"cherry",
"-",
"pick",
"is",
"aborted",
"and",
"proce... | 9f8b9ae5103ff86de4f6a5cb02e700d6eb851e5f | https://github.com/material-components/material-components-web/blob/9f8b9ae5103ff86de4f6a5cb02e700d6eb851e5f/scripts/cherry-pick-commits.js#L122-L158 | train | Attempts to cherry - picks the specified branch | [
30522,
2004,
6038,
2278,
3853,
3535,
7474,
2854,
24330,
5705,
1006,
6415,
1010,
2862,
1010,
5549,
1007,
1063,
9530,
3367,
3463,
1027,
1063,
3144,
1024,
1031,
1033,
1010,
4736,
2098,
1024,
1031,
1033,
1010,
16791,
1024,
1031,
1033,
1010,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/Utils.js | function (ascii) {
var asciiArray = ascii.split(",");
var parsedString = "";
jQuery.each(asciiArray, function (index, asciiChar) {
parsedString += String.fromCharCode(asciiChar);
});
return parsedString;
} | javascript | function (ascii) {
var asciiArray = ascii.split(",");
var parsedString = "";
jQuery.each(asciiArray, function (index, asciiChar) {
parsedString += String.fromCharCode(asciiChar);
});
return parsedString;
} | [
"function",
"(",
"ascii",
")",
"{",
"var",
"asciiArray",
"=",
"ascii",
".",
"split",
"(",
"\",\"",
")",
";",
"var",
"parsedString",
"=",
"\"\"",
";",
"jQuery",
".",
"each",
"(",
"asciiArray",
",",
"function",
"(",
"index",
",",
"asciiChar",
")",
"{",
... | Converts ASCII coding into a string. Required for restoring stored code extensions
@param {String} ascii string containing ascii code valid numbers separated by ','
@returns {String} parsedString parsed string | [
"Converts",
"ASCII",
"coding",
"into",
"a",
"string",
".",
"Required",
"for",
"restoring",
"stored",
"code",
"extensions"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/Utils.js#L816-L826 | train | Parse the given ascii string | [
30522,
3853,
1006,
2004,
6895,
2072,
1007,
1063,
13075,
2004,
6895,
2401,
11335,
2100,
1027,
2004,
6895,
2072,
1012,
3975,
1006,
1000,
1010,
1000,
1007,
1025,
13075,
11968,
6924,
3367,
4892,
1027,
1000,
1000,
1025,
1046,
4226,
2854,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SeleniumHQ/selenium | javascript/atoms/dom.js | getOverflowParent | function getOverflowParent(e) {
var position = bot.dom.getEffectiveStyle(e, 'position');
if (position == 'fixed') {
treatAsFixedPosition = true;
// Fixed-position element may only overflow the viewport.
return e == htmlElem ? null : htmlElem;
} else {
var parent = bot.dom.getParentEl... | javascript | function getOverflowParent(e) {
var position = bot.dom.getEffectiveStyle(e, 'position');
if (position == 'fixed') {
treatAsFixedPosition = true;
// Fixed-position element may only overflow the viewport.
return e == htmlElem ? null : htmlElem;
} else {
var parent = bot.dom.getParentEl... | [
"function",
"getOverflowParent",
"(",
"e",
")",
"{",
"var",
"position",
"=",
"bot",
".",
"dom",
".",
"getEffectiveStyle",
"(",
"e",
",",
"'position'",
")",
";",
"if",
"(",
"position",
"==",
"'fixed'",
")",
"{",
"treatAsFixedPosition",
"=",
"true",
";",
"... | Return the closest ancestor that the given element may overflow. | [
"Return",
"the",
"closest",
"ancestor",
"that",
"the",
"given",
"element",
"may",
"overflow",
"."
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/atoms/dom.js#L655-L688 | train | Returns the parent element of the element that can overflow the viewport. | [
30522,
3853,
2131,
7840,
12314,
19362,
4765,
1006,
1041,
1007,
1063,
13075,
2597,
1027,
28516,
1012,
14383,
1012,
2131,
12879,
25969,
24653,
27983,
1006,
1041,
1010,
1005,
2597,
1005,
1007,
1025,
2065,
1006,
2597,
1027,
1027,
1005,
4964,
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... |
goldfire/howler.js | examples/3d/js/controls.js | function(event) {
var touches = event.touches[0];
// Reset the states.
this.touchEnd(event);
// Determine which key to simulate.
if (touches.pageY < window.innerHeight * 0.3) {
this.key(true, {keyCode: 38});
} else if (touches.pageY > window.innerHeight * 0.7) {
this.key(true, {key... | javascript | function(event) {
var touches = event.touches[0];
// Reset the states.
this.touchEnd(event);
// Determine which key to simulate.
if (touches.pageY < window.innerHeight * 0.3) {
this.key(true, {keyCode: 38});
} else if (touches.pageY > window.innerHeight * 0.7) {
this.key(true, {key... | [
"function",
"(",
"event",
")",
"{",
"var",
"touches",
"=",
"event",
".",
"touches",
"[",
"0",
"]",
";",
"// Reset the states.",
"this",
".",
"touchEnd",
"(",
"event",
")",
";",
"// Determine which key to simulate.",
"if",
"(",
"touches",
".",
"pageY",
"<",
... | Listen for touch events and determine which key to simulate.
@param {Object} event DOM event data including the position touched. | [
"Listen",
"for",
"touch",
"events",
"and",
"determine",
"which",
"key",
"to",
"simulate",
"."
] | 030db918dd8ce640afd57e172418472497e8f113 | https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/controls.js#L55-L71 | train | Touch end handler | [
30522,
3853,
1006,
2724,
1007,
1063,
13075,
12817,
1027,
2724,
1012,
12817,
1031,
1014,
1033,
1025,
1013,
1013,
25141,
1996,
2163,
1012,
2023,
1012,
3543,
10497,
1006,
2724,
1007,
1025,
1013,
1013,
5646,
2029,
3145,
2000,
26633,
1012,
2065,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/search/FindInFilesUI.js | _searchIfRequired | function _searchIfRequired() {
if (!FindUtils.isInstantSearchDisabled() && _findBar && _findBar._options.multifile && !_findBar._options.replace) {
setTimeout(_defferedSearch, 100);
}
} | javascript | function _searchIfRequired() {
if (!FindUtils.isInstantSearchDisabled() && _findBar && _findBar._options.multifile && !_findBar._options.replace) {
setTimeout(_defferedSearch, 100);
}
} | [
"function",
"_searchIfRequired",
"(",
")",
"{",
"if",
"(",
"!",
"FindUtils",
".",
"isInstantSearchDisabled",
"(",
")",
"&&",
"_findBar",
"&&",
"_findBar",
".",
"_options",
".",
"multifile",
"&&",
"!",
"_findBar",
".",
"_options",
".",
"replace",
")",
"{",
... | Schedules a search on search scope/filter changes. Have to schedule as when we listen to this event, the file filters
might not have been updated yet. | [
"Schedules",
"a",
"search",
"on",
"search",
"scope",
"/",
"filter",
"changes",
".",
"Have",
"to",
"schedule",
"as",
"when",
"we",
"listen",
"to",
"this",
"event",
"the",
"file",
"filters",
"might",
"not",
"have",
"been",
"updated",
"yet",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/FindInFilesUI.js#L447-L451 | train | Search if required | [
30522,
3853,
1035,
3945,
10128,
2890,
15549,
5596,
1006,
1007,
1063,
2065,
1006,
999,
2424,
21823,
4877,
1012,
2003,
7076,
5794,
3215,
14644,
2818,
10521,
3085,
2094,
1006,
1007,
1004,
1004,
1035,
2424,
8237,
1004,
1004,
1035,
2424,
8237,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
radare/radare2 | shlr/www/graph/js-graph-it.js | findCanvas | function findCanvas(canvasId) {
for (var i = 0; i < canvases.length; i++)
if(canvases[i].id == canvasId)
return canvases[i];
return null;
} | javascript | function findCanvas(canvasId) {
for (var i = 0; i < canvases.length; i++)
if(canvases[i].id == canvasId)
return canvases[i];
return null;
} | [
"function",
"findCanvas",
"(",
"canvasId",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"canvases",
".",
"length",
";",
"i",
"++",
")",
"if",
"(",
"canvases",
"[",
"i",
"]",
".",
"id",
"==",
"canvasId",
")",
"return",
"canvases",
"[... | /*
Utility functions | [
"/",
"*",
"Utility",
"functions"
] | bf5e3028810a0ec7c267c6fe4bfad639b4819e35 | https://github.com/radare/radare2/blob/bf5e3028810a0ec7c267c6fe4bfad639b4819e35/shlr/www/graph/js-graph-it.js#L1173-L1178 | train | Find canvas by id | [
30522,
3853,
2424,
9336,
12044,
1006,
10683,
3593,
1007,
1063,
2005,
1006,
13075,
1045,
1027,
1014,
1025,
1045,
1026,
10683,
2229,
1012,
3091,
1025,
1045,
1009,
1009,
1007,
2065,
1006,
10683,
2229,
1031,
1045,
1033,
1012,
8909,
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... |
GeekyAnts/vue-native-core | dist/react-vue-helper.js | transitionGroupWeb | function transitionGroupWeb (Component, createElement) {
return (function (Component) {
function TransitionGroup () {
Component.apply(this, arguments);
}
if ( Component ) TransitionGroup.__proto__ = Component;
TransitionGroup.prototype = Object.create( Component && Component.prototype );
Tr... | javascript | function transitionGroupWeb (Component, createElement) {
return (function (Component) {
function TransitionGroup () {
Component.apply(this, arguments);
}
if ( Component ) TransitionGroup.__proto__ = Component;
TransitionGroup.prototype = Object.create( Component && Component.prototype );
Tr... | [
"function",
"transitionGroupWeb",
"(",
"Component",
",",
"createElement",
")",
"{",
"return",
"(",
"function",
"(",
"Component",
")",
"{",
"function",
"TransitionGroup",
"(",
")",
"{",
"Component",
".",
"apply",
"(",
"this",
",",
"arguments",
")",
";",
"}",
... | unfinished | [
"unfinished"
] | a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e | https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/dist/react-vue-helper.js#L2377-L2394 | train | The transitionGroupWeb is a wrapper around the React. createElement method | [
30522,
3853,
6653,
17058,
8545,
2497,
1006,
6922,
1010,
3443,
12260,
3672,
1007,
1063,
2709,
1006,
3853,
1006,
6922,
1007,
1063,
3853,
6653,
17058,
1006,
1007,
1063,
6922,
1012,
6611,
1006,
2023,
1010,
9918,
1007,
1025,
1065,
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... |
GitbookIO/gitbook | lib/api/decodeConfig.js | decodeGlobal | function decodeGlobal(config, result) {
var values = result.values;
delete values.generator;
delete values.output;
return config.updateValues(values);
} | javascript | function decodeGlobal(config, result) {
var values = result.values;
delete values.generator;
delete values.output;
return config.updateValues(values);
} | [
"function",
"decodeGlobal",
"(",
"config",
",",
"result",
")",
"{",
"var",
"values",
"=",
"result",
".",
"values",
";",
"delete",
"values",
".",
"generator",
";",
"delete",
"values",
".",
"output",
";",
"return",
"config",
".",
"updateValues",
"(",
"values... | Decode changes from a JS API to a config object
@param {Config} config
@param {Object} result: result from API
@return {Config} | [
"Decode",
"changes",
"from",
"a",
"JS",
"API",
"to",
"a",
"config",
"object"
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/api/decodeConfig.js#L8-L15 | train | Decode a global result | [
30522,
3853,
21933,
3207,
23296,
16429,
2389,
1006,
9530,
8873,
2290,
1010,
2765,
1007,
1063,
13075,
5300,
1027,
2765,
1012,
5300,
1025,
3972,
12870,
5300,
1012,
13103,
1025,
3972,
12870,
5300,
1012,
6434,
1025,
2709,
9530,
8873,
2290,
1012... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js | deleteMetadataForEntry | function deleteMetadataForEntry(self, key) {
var iIndex = self._metadata.__byKey__[key];
delete self._metadata.__byKey__[key];
delete self._metadata.__byIndex__[iIndex];
seekMetadataLRU(self);
} | javascript | function deleteMetadataForEntry(self, key) {
var iIndex = self._metadata.__byKey__[key];
delete self._metadata.__byKey__[key];
delete self._metadata.__byIndex__[iIndex];
seekMetadataLRU(self);
} | [
"function",
"deleteMetadataForEntry",
"(",
"self",
",",
"key",
")",
"{",
"var",
"iIndex",
"=",
"self",
".",
"_metadata",
".",
"__byKey__",
"[",
"key",
"]",
";",
"delete",
"self",
".",
"_metadata",
".",
"__byKey__",
"[",
"key",
"]",
";",
"delete",
"self",... | Deletes all metadata for given key
@param self the instance
@param key the key for the entry | [
"Deletes",
"all",
"metadata",
"for",
"given",
"key"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js#L820-L825 | train | Delete metadata for the given key | [
30522,
3853,
3972,
12870,
11368,
8447,
2696,
29278,
4765,
2854,
1006,
2969,
1010,
3145,
1007,
1063,
13075,
2462,
13629,
2595,
1027,
2969,
1012,
1035,
27425,
1012,
1035,
1035,
2011,
14839,
1035,
1035,
1031,
30524,
1035,
1035,
1031,
3145,
103... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.layout/src/sap/ui/layout/form/ColumnLayout.js | function(aRows, iField, oLD, oOptions, iLabelSize) {
var iRemain = 0;
var oRow;
for (i = 0; i < aRows.length; i++) {
if (iField >= aRows[i].first && iField <= aRows[i].last) {
oRow = aRows[i];
break;
}
}
if (!oLD) {
oOptions.Size = Math.floor(oRow.availableCell... | javascript | function(aRows, iField, oLD, oOptions, iLabelSize) {
var iRemain = 0;
var oRow;
for (i = 0; i < aRows.length; i++) {
if (iField >= aRows[i].first && iField <= aRows[i].last) {
oRow = aRows[i];
break;
}
}
if (!oLD) {
oOptions.Size = Math.floor(oRow.availableCell... | [
"function",
"(",
"aRows",
",",
"iField",
",",
"oLD",
",",
"oOptions",
",",
"iLabelSize",
")",
"{",
"var",
"iRemain",
"=",
"0",
";",
"var",
"oRow",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"aRows",
".",
"length",
";",
"i",
"++",
")",
"{",
... | determine size of Field | [
"determine",
"size",
"of",
"Field"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.layout/src/sap/ui/layout/form/ColumnLayout.js#L506-L533 | train | This function is called by the layout to determine if the field is a default field | [
30522,
3853,
1006,
12098,
15568,
1010,
2065,
12891,
1010,
2214,
1010,
1051,
7361,
9285,
1010,
6335,
16336,
4877,
4697,
1007,
1063,
13075,
20868,
14545,
2378,
1027,
1014,
1025,
13075,
20298,
2860,
1025,
2005,
1006,
1045,
1027,
1014,
1025,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.