repo stringclasses 192
values | path stringlengths 4 115 | func_name stringlengths 0 45 | original_string stringlengths 74 24k | language stringclasses 1
value | code stringlengths 74 24k | code_tokens listlengths 23 4.2k | docstring stringlengths 2 23.7k | docstring_tokens listlengths 1 810 | sha stringclasses 192
values | url stringlengths 90 200 | partition stringclasses 1
value | summary stringlengths 6 313 | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
angular/material | docs/app/js/codepen.js | Codepen | function Codepen($demoAngularScripts, $document, codepenDataAdapter) {
// The following URL used to be HTTP and not HTTPS to allow us to do localhost testing
// It's no longer working, for more info:
// https://blog.codepen.io/2017/03/31/codepen-going-https/
var CODEPEN_API = 'https://codepen.io/pen/de... | javascript | function Codepen($demoAngularScripts, $document, codepenDataAdapter) {
// The following URL used to be HTTP and not HTTPS to allow us to do localhost testing
// It's no longer working, for more info:
// https://blog.codepen.io/2017/03/31/codepen-going-https/
var CODEPEN_API = 'https://codepen.io/pen/de... | [
"function",
"Codepen",
"(",
"$demoAngularScripts",
",",
"$document",
",",
"codepenDataAdapter",
")",
"{",
"// The following URL used to be HTTP and not HTTPS to allow us to do localhost testing",
"// It's no longer working, for more info:",
"// https://blog.codepen.io/2017/03/31/codepen-goin... | Provides a service to open a code example in codepen. | [
"Provides",
"a",
"service",
"to",
"open",
"a",
"code",
"example",
"in",
"codepen",
"."
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/docs/app/js/codepen.js#L7-L57 | train | Codepen is a demo model that is used to generate a code phrase. | [
30522,
3853,
3642,
11837,
1006,
1002,
9703,
5654,
7934,
22483,
2015,
1010,
1002,
6254,
1010,
3642,
11837,
2850,
2696,
8447,
13876,
2121,
1007,
1063,
1013,
1013,
1996,
2206,
24471,
2140,
2109,
2000,
2022,
8299,
1998,
2025,
16770,
2000,
3499,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/Component.js | processOptions | function processOptions(vObj, bIgnoreLazy) {
assert(
(typeof vObj === 'string' && vObj) ||
(typeof vObj === 'object' && typeof vObj.name === 'string' && vObj.name),
"reference either must be a non-empty string or an object with a non-empty 'name' and an optional 'url' property");
if ( typeof vObj ==... | javascript | function processOptions(vObj, bIgnoreLazy) {
assert(
(typeof vObj === 'string' && vObj) ||
(typeof vObj === 'object' && typeof vObj.name === 'string' && vObj.name),
"reference either must be a non-empty string or an object with a non-empty 'name' and an optional 'url' property");
if ( typeof vObj ==... | [
"function",
"processOptions",
"(",
"vObj",
",",
"bIgnoreLazy",
")",
"{",
"assert",
"(",
"(",
"typeof",
"vObj",
"===",
"'string'",
"&&",
"vObj",
")",
"||",
"(",
"typeof",
"vObj",
"===",
"'object'",
"&&",
"typeof",
"vObj",
".",
"name",
"===",
"'string'",
"... | /*
Process .url and .lazy options.
For preloadBundles, lazy will be ignored | [
"/",
"*",
"Process",
".",
"url",
"and",
".",
"lazy",
"options",
".",
"For",
"preloadBundles",
"lazy",
"will",
"be",
"ignored"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Component.js#L2540-L2555 | train | Process options | [
30522,
3853,
2832,
7361,
9285,
1006,
29536,
2497,
3501,
1010,
2502,
12131,
10581,
9096,
1007,
1063,
20865,
1006,
1006,
2828,
11253,
29536,
2497,
3501,
1027,
1027,
1027,
1005,
5164,
1005,
1004,
1004,
29536,
2497,
3501,
1007,
1064,
1064,
1006... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
TryGhost/Ghost | core/server/services/url/utils.js | getAdminUrl | function getAdminUrl() {
var adminUrl = config.get('admin:url'),
subDir = getSubdir();
if (!adminUrl) {
return;
}
if (!adminUrl.match(/\/$/)) {
adminUrl += '/';
}
adminUrl = urlJoin(adminUrl, subDir, '/');
adminUrl = deduplicateSubDir(adminUrl);
return adminUrl... | javascript | function getAdminUrl() {
var adminUrl = config.get('admin:url'),
subDir = getSubdir();
if (!adminUrl) {
return;
}
if (!adminUrl.match(/\/$/)) {
adminUrl += '/';
}
adminUrl = urlJoin(adminUrl, subDir, '/');
adminUrl = deduplicateSubDir(adminUrl);
return adminUrl... | [
"function",
"getAdminUrl",
"(",
")",
"{",
"var",
"adminUrl",
"=",
"config",
".",
"get",
"(",
"'admin:url'",
")",
",",
"subDir",
"=",
"getSubdir",
"(",
")",
";",
"if",
"(",
"!",
"adminUrl",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"adminUrl",
"... | admin:url is optional | [
"admin",
":",
"url",
"is",
"optional"
] | bb7bb55cf3e60af99ebbc56099928827b58461bc | https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/services/url/utils.js#L149-L164 | train | Get admin url | [
30522,
3853,
2131,
4215,
10020,
3126,
2140,
1006,
1007,
1063,
13075,
4748,
10020,
3126,
2140,
1027,
9530,
8873,
2290,
1012,
2131,
1006,
1005,
4748,
10020,
1024,
24471,
2140,
1005,
1007,
1010,
4942,
4305,
2099,
1027,
4152,
12083,
4305,
2099,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/project/ProjectManager.js | _displayCreationError | function _displayCreationError(e, errorInfo) {
window.setTimeout(function () {
var error = errorInfo.type,
isFolder = errorInfo.isFolder,
name = errorInfo.name;
if (error === FileSystemError.ALREADY_EXISTS) {
_showErrorDialog(ERR_TYPE_CREA... | javascript | function _displayCreationError(e, errorInfo) {
window.setTimeout(function () {
var error = errorInfo.type,
isFolder = errorInfo.isFolder,
name = errorInfo.name;
if (error === FileSystemError.ALREADY_EXISTS) {
_showErrorDialog(ERR_TYPE_CREA... | [
"function",
"_displayCreationError",
"(",
"e",
",",
"errorInfo",
")",
"{",
"window",
".",
"setTimeout",
"(",
"function",
"(",
")",
"{",
"var",
"error",
"=",
"errorInfo",
".",
"type",
",",
"isFolder",
"=",
"errorInfo",
".",
"isFolder",
",",
"name",
"=",
"... | @private
Event handler which displays an error based on a problem creating a file.
@param {$.Event} e jQuery event object
@param {{type:any,isFolder:boolean}} errorInfo Information passed in the error events | [
"@private"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/ProjectManager.js#L175-L193 | train | Display creation error | [
30522,
3853,
1035,
4653,
16748,
3370,
2121,
29165,
1006,
1041,
1010,
7561,
2378,
14876,
1007,
1063,
3332,
1012,
2275,
7292,
5833,
1006,
3853,
1006,
1007,
1063,
13075,
7561,
1027,
7561,
2378,
14876,
1012,
2828,
1010,
2003,
10371,
2121,
1027,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/LiveDevelopment/MultiBrowserImpl/protocol/LiveDevProtocol.js | _receive | function _receive(clientId, msgStr) {
var msg = JSON.parse(msgStr),
event = msg.method || "event",
deferred;
if (msg.id) {
deferred = _responseDeferreds[msg.id];
if (deferred) {
delete _responseDeferreds[msg.id];
if (msg.err... | javascript | function _receive(clientId, msgStr) {
var msg = JSON.parse(msgStr),
event = msg.method || "event",
deferred;
if (msg.id) {
deferred = _responseDeferreds[msg.id];
if (deferred) {
delete _responseDeferreds[msg.id];
if (msg.err... | [
"function",
"_receive",
"(",
"clientId",
",",
"msgStr",
")",
"{",
"var",
"msg",
"=",
"JSON",
".",
"parse",
"(",
"msgStr",
")",
",",
"event",
"=",
"msg",
".",
"method",
"||",
"\"event\"",
",",
"deferred",
";",
"if",
"(",
"msg",
".",
"id",
")",
"{",
... | @private
Handles a message received from the remote protocol handler via the transport.
If the message has an `id` field, it's assumed to be a response to a previous
request, and will be passed along to the original promise returned by `_send()`.
Otherwise, it's treated as an event and dispatched.
TODO: we should proba... | [
"@private",
"Handles",
"a",
"message",
"received",
"from",
"the",
"remote",
"protocol",
"handler",
"via",
"the",
"transport",
".",
"If",
"the",
"message",
"has",
"an",
"id",
"field",
"it",
"s",
"assumed",
"to",
"be",
"a",
"response",
"to",
"a",
"previous",... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/MultiBrowserImpl/protocol/LiveDevProtocol.js#L101-L126 | train | receive a message from the client | [
30522,
3853,
1035,
4374,
1006,
7396,
3593,
1010,
5796,
5620,
16344,
1007,
1063,
13075,
5796,
2290,
1027,
1046,
3385,
1012,
11968,
3366,
1006,
5796,
5620,
16344,
1007,
1010,
2724,
1027,
5796,
2290,
1012,
4118,
1064,
1064,
1000,
2724,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/dom/jquery/hasTabIndex.js | function(oElem) {
var iTabIndex = jQuery.prop(oElem, "tabIndex");
// compensate for 'specialties' in the implementation of jQuery.prop:
// - it returns undefined for text, comment and attribute nodes
// - when calculating an implicit tabindex for focusable/clickable elements, it ignores the 'disabled' attribu... | javascript | function(oElem) {
var iTabIndex = jQuery.prop(oElem, "tabIndex");
// compensate for 'specialties' in the implementation of jQuery.prop:
// - it returns undefined for text, comment and attribute nodes
// - when calculating an implicit tabindex for focusable/clickable elements, it ignores the 'disabled' attribu... | [
"function",
"(",
"oElem",
")",
"{",
"var",
"iTabIndex",
"=",
"jQuery",
".",
"prop",
"(",
"oElem",
",",
"\"tabIndex\"",
")",
";",
"// compensate for 'specialties' in the implementation of jQuery.prop:",
"// - it returns undefined for text, comment and attribute nodes",
"// - whe... | This module provides the {@link jQuery#hasTabIndex} API.
@namespace
@name module:sap/ui/dom/jquery/hasTabIndex
@public
@since 1.58
Returns <code>true</code> if the first element has a set tabindex.
@return {boolean} If the first element has a set tabindex
@public
@name jQuery#hasTabIndex
@author SAP SE
@since 0.9.0... | [
"This",
"module",
"provides",
"the",
"{",
"@link",
"jQuery#hasTabIndex",
"}",
"API",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/dom/jquery/hasTabIndex.js#L27-L37 | train | Returns true if the element has a tabindex attribute | [
30522,
3853,
1006,
1051,
12260,
2213,
1007,
1063,
13075,
2009,
28518,
13629,
2595,
1027,
1046,
4226,
2854,
1012,
17678,
1006,
1051,
12260,
2213,
1010,
1000,
21628,
22254,
10288,
1000,
1007,
1025,
1013,
1013,
19079,
2005,
1005,
2569,
7368,
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... | |
electron/electron | script/bump-version.js | updateInfoPlist | async function updateInfoPlist (version) {
const filePath = path.resolve(__dirname, '..', 'atom', 'browser', 'resources', 'mac', 'Info.plist')
const file = plist.parse(await readFile(filePath, { encoding: 'utf8' }))
file.CFBundleVersion = version
file.CFBundleShortVersionString = version
await writeFile(fil... | javascript | async function updateInfoPlist (version) {
const filePath = path.resolve(__dirname, '..', 'atom', 'browser', 'resources', 'mac', 'Info.plist')
const file = plist.parse(await readFile(filePath, { encoding: 'utf8' }))
file.CFBundleVersion = version
file.CFBundleShortVersionString = version
await writeFile(fil... | [
"async",
"function",
"updateInfoPlist",
"(",
"version",
")",
"{",
"const",
"filePath",
"=",
"path",
".",
"resolve",
"(",
"__dirname",
",",
"'..'",
",",
"'atom'",
",",
"'browser'",
",",
"'resources'",
",",
"'mac'",
",",
"'Info.plist'",
")",
"const",
"file",
... | update CFBundle version information and overwrite pre-existing file TODO(codebytere): provide these version fields at GN build time | [
"update",
"CFBundle",
"version",
"information",
"and",
"overwrite",
"pre",
"-",
"existing",
"file",
"TODO",
"(",
"codebytere",
")",
":",
"provide",
"these",
"version",
"fields",
"at",
"GN",
"build",
"time"
] | 6e29611788277729647acf465f10db1ea6f15788 | https://github.com/electron/electron/blob/6e29611788277729647acf465f10db1ea6f15788/script/bump-version.js#L124-L132 | train | Update info. plist with new version | [
30522,
2004,
6038,
2278,
3853,
10651,
2378,
14876,
24759,
2923,
1006,
2544,
1007,
1063,
9530,
3367,
5371,
15069,
1027,
4130,
1012,
10663,
1006,
1035,
1035,
16101,
18442,
1010,
1005,
1012,
1012,
1005,
1010,
1005,
13787,
1005,
1010,
1005,
166... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/MenuBar.js | function(oThis, oEvent, sDir){
oEvent.stopPropagation();
oEvent.preventDefault();
if (!oThis.sCurrentFocusedItemRefId) {
return;
}
var sFollowingFocusItemId = null;
if (oThis.sLastVisibleItemId && ((oThis.sCurrentFocusedItemRefId == oThis.sLastVisibleItemId && sDir == "next") || sDir == "last")) {
s... | javascript | function(oThis, oEvent, sDir){
oEvent.stopPropagation();
oEvent.preventDefault();
if (!oThis.sCurrentFocusedItemRefId) {
return;
}
var sFollowingFocusItemId = null;
if (oThis.sLastVisibleItemId && ((oThis.sCurrentFocusedItemRefId == oThis.sLastVisibleItemId && sDir == "next") || sDir == "last")) {
s... | [
"function",
"(",
"oThis",
",",
"oEvent",
",",
"sDir",
")",
"{",
"oEvent",
".",
"stopPropagation",
"(",
")",
";",
"oEvent",
".",
"preventDefault",
"(",
")",
";",
"if",
"(",
"!",
"oThis",
".",
"sCurrentFocusedItemRefId",
")",
"{",
"return",
";",
"}",
"va... | Focus the next (depending on the given direction) step | [
"Focus",
"the",
"next",
"(",
"depending",
"on",
"the",
"given",
"direction",
")",
"step"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/MenuBar.js#L551-L584 | train | This function is called when the user clicks on an item in the list. It is also called by the focusHandler when the item is clicked. | [
30522,
3853,
1006,
27178,
24158,
1010,
1051,
18697,
3372,
1010,
17371,
4313,
1007,
1063,
1051,
18697,
3372,
1012,
2644,
21572,
4502,
12540,
1006,
1007,
1025,
1051,
18697,
3372,
1012,
4652,
3207,
7011,
11314,
1006,
1007,
1025,
2065,
1006,
99... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/type/Date.js | getModelFormatter | function getModelFormatter() {
if (!oModelFormatter) {
oModelFormatter = DateFormat.getDateInstance({
pattern : 'yyyy-MM-dd',
strictParsing : true,
UTC : true
});
}
return oModelFormatter;
} | javascript | function getModelFormatter() {
if (!oModelFormatter) {
oModelFormatter = DateFormat.getDateInstance({
pattern : 'yyyy-MM-dd',
strictParsing : true,
UTC : true
});
}
return oModelFormatter;
} | [
"function",
"getModelFormatter",
"(",
")",
"{",
"if",
"(",
"!",
"oModelFormatter",
")",
"{",
"oModelFormatter",
"=",
"DateFormat",
".",
"getDateInstance",
"(",
"{",
"pattern",
":",
"'yyyy-MM-dd'",
",",
"strictParsing",
":",
"true",
",",
"UTC",
":",
"true",
"... | Returns a formatter that formats the date into YYYY-MM-DD. Creates it lazily.
@returns {sap.ui.core.format.DateFormat}
the formatter | [
"Returns",
"a",
"formatter",
"that",
"formats",
"the",
"date",
"into",
"YYYY",
"-",
"MM",
"-",
"DD",
".",
"Creates",
"it",
"lazily",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/Date.js#L58-L67 | train | Returns the formatter for the model. | [
30522,
3853,
2131,
5302,
9247,
14192,
20097,
1006,
1007,
1063,
2065,
1006,
999,
18168,
10244,
10270,
2953,
18900,
3334,
1007,
1063,
18168,
10244,
10270,
2953,
18900,
3334,
1027,
3058,
14192,
4017,
1012,
2131,
13701,
7076,
26897,
1006,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/file/FileUtils.js | readAsText | function readAsText(file) {
var result = new $.Deferred();
// Measure performance
var perfTimerName = PerfUtils.markStart("readAsText:\t" + file.fullPath);
result.always(function () {
PerfUtils.addMeasurement(perfTimerName);
});
// Read file
file.rea... | javascript | function readAsText(file) {
var result = new $.Deferred();
// Measure performance
var perfTimerName = PerfUtils.markStart("readAsText:\t" + file.fullPath);
result.always(function () {
PerfUtils.addMeasurement(perfTimerName);
});
// Read file
file.rea... | [
"function",
"readAsText",
"(",
"file",
")",
"{",
"var",
"result",
"=",
"new",
"$",
".",
"Deferred",
"(",
")",
";",
"// Measure performance",
"var",
"perfTimerName",
"=",
"PerfUtils",
".",
"markStart",
"(",
"\"readAsText:\\t\"",
"+",
"file",
".",
"fullPath",
... | Asynchronously reads a file as UTF-8 encoded text.
@param {!File} file File to read
@return {$.Promise} a jQuery promise that will be resolved with the
file's text content plus its timestamp, or rejected with a FileSystemError string
constant if the file can not be read. | [
"Asynchronously",
"reads",
"a",
"file",
"as",
"UTF",
"-",
"8",
"encoded",
"text",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/file/FileUtils.js#L70-L89 | train | Reads a file as text | [
30522,
3853,
3191,
14083,
10288,
2102,
1006,
5371,
1007,
1063,
13075,
2765,
1027,
2047,
1002,
1012,
13366,
28849,
2094,
1006,
1007,
1025,
1013,
1013,
5468,
2836,
13075,
2566,
6199,
14428,
12789,
4168,
1027,
2566,
11263,
3775,
4877,
1012,
60... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/LiveDevelopment/Agents/DOMAgent.js | _onFinishedLoadingDOM | function _onFinishedLoadingDOM() {
var request = new XMLHttpRequest();
request.open("GET", exports.url);
request.onload = function onLoad() {
if ((request.status >= 200 && request.status < 300) ||
request.status === 304 || request.status === 0) {
_... | javascript | function _onFinishedLoadingDOM() {
var request = new XMLHttpRequest();
request.open("GET", exports.url);
request.onload = function onLoad() {
if ((request.status >= 200 && request.status < 300) ||
request.status === 304 || request.status === 0) {
_... | [
"function",
"_onFinishedLoadingDOM",
"(",
")",
"{",
"var",
"request",
"=",
"new",
"XMLHttpRequest",
"(",
")",
";",
"request",
".",
"open",
"(",
"\"GET\"",
",",
"exports",
".",
"url",
")",
";",
"request",
".",
"onload",
"=",
"function",
"onLoad",
"(",
")"... | Load the source document and match it with the DOM tree | [
"Load",
"the",
"source",
"document",
"and",
"match",
"it",
"with",
"the",
"DOM",
"tree"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/Agents/DOMAgent.js#L163-L181 | train | Load the source file from the server | [
30522,
3853,
1035,
2006,
16294,
13295,
18570,
9527,
1006,
1007,
1063,
13075,
5227,
1027,
2047,
20950,
11039,
25856,
2890,
15500,
1006,
1007,
1025,
5227,
1012,
2330,
1006,
1000,
2131,
1000,
1010,
14338,
1012,
24471,
2140,
1007,
1025,
5227,
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/coord/View.js | function (data, noRoam, out) {
var transform = noRoam ? this._rawTransform : this.transform;
out = out || [];
return transform
? v2ApplyTransform(out, data, transform)
: vector.copy(out, data);
} | javascript | function (data, noRoam, out) {
var transform = noRoam ? this._rawTransform : this.transform;
out = out || [];
return transform
? v2ApplyTransform(out, data, transform)
: vector.copy(out, data);
} | [
"function",
"(",
"data",
",",
"noRoam",
",",
"out",
")",
"{",
"var",
"transform",
"=",
"noRoam",
"?",
"this",
".",
"_rawTransform",
":",
"this",
".",
"transform",
";",
"out",
"=",
"out",
"||",
"[",
"]",
";",
"return",
"transform",
"?",
"v2ApplyTransfor... | Convert a single (lon, lat) data item to (x, y) point.
@param {Array.<number>} data
@param {boolean} noRoam
@param {Array.<number>} [out]
@return {Array.<number>} | [
"Convert",
"a",
"single",
"(",
"lon",
"lat",
")",
"data",
"item",
"to",
"(",
"x",
"y",
")",
"point",
"."
] | 4d0ea095dc3929cb6de40c45748826e7999c7aa8 | https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/View.js#L256-L262 | train | Returns a vector of the alternatives of the given data | [
30522,
3853,
1006,
2951,
1010,
4496,
10441,
2213,
1010,
2041,
1007,
1063,
13075,
10938,
1027,
4496,
10441,
2213,
1029,
2023,
1012,
1035,
6315,
6494,
3619,
14192,
1024,
2023,
1012,
10938,
1025,
2041,
1027,
2041,
1064,
1064,
1031,
1033,
1025,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
adobe/brackets | src/search/QuickOpen.js | QuickNavigateDialog | function QuickNavigateDialog() {
this.$searchField = undefined; // defined when showDialog() is called
// ModalBar event handlers & callbacks
this._handleCloseBar = this._handleCloseBar.bind(this);
// QuickSearchField callbacks
this._handleItemSelect = this._h... | javascript | function QuickNavigateDialog() {
this.$searchField = undefined; // defined when showDialog() is called
// ModalBar event handlers & callbacks
this._handleCloseBar = this._handleCloseBar.bind(this);
// QuickSearchField callbacks
this._handleItemSelect = this._h... | [
"function",
"QuickNavigateDialog",
"(",
")",
"{",
"this",
".",
"$searchField",
"=",
"undefined",
";",
"// defined when showDialog() is called",
"// ModalBar event handlers & callbacks",
"this",
".",
"_handleCloseBar",
"=",
"this",
".",
"_handleCloseBar",
".",
"bind",
"(",... | QuickNavigateDialog class
@constructor | [
"QuickNavigateDialog",
"class"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/QuickOpen.js#L199-L216 | train | QuickNavigateDialog constructor. | [
30522,
3853,
4248,
2532,
5737,
11644,
4818,
8649,
1006,
1007,
1063,
2023,
1012,
1002,
3945,
3790,
1027,
6151,
28344,
1025,
1013,
1013,
4225,
2043,
2265,
27184,
8649,
1006,
1007,
2003,
2170,
1013,
1013,
16913,
2389,
8237,
2724,
28213,
2015,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | lib/jsdoc/ui5/plugin.js | location | function location(doclet) {
var filename = (doclet.meta && doclet.meta.filename) || "unknown";
return " #" + ui5data(doclet).id + "@" + filename + (doclet.meta.lineno != null ? ":" + doclet.meta.lineno : "") + (doclet.synthetic ? "(synthetic)" : "");
} | javascript | function location(doclet) {
var filename = (doclet.meta && doclet.meta.filename) || "unknown";
return " #" + ui5data(doclet).id + "@" + filename + (doclet.meta.lineno != null ? ":" + doclet.meta.lineno : "") + (doclet.synthetic ? "(synthetic)" : "");
} | [
"function",
"location",
"(",
"doclet",
")",
"{",
"var",
"filename",
"=",
"(",
"doclet",
".",
"meta",
"&&",
"doclet",
".",
"meta",
".",
"filename",
")",
"||",
"\"unknown\"",
";",
"return",
"\" #\"",
"+",
"ui5data",
"(",
"doclet",
")",
".",
"id",
"+",
... | Creates a human readable location info for a given doclet.
@param {Doclet} doclet Doclet to get a location info for
@returns {string} A human readable location info | [
"Creates",
"a",
"human",
"readable",
"location",
"info",
"for",
"a",
"given",
"doclet",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/ui5/plugin.js#L1759-L1762 | train | Return the location of the file. | [
30522,
3853,
3295,
1006,
9986,
7485,
1007,
1063,
13075,
5371,
18442,
1027,
30524,
1025,
2709,
1000,
1001,
1000,
1009,
21318,
2629,
2850,
2696,
1006,
9986,
7485,
1007,
1012,
8909,
1009,
1000,
1030,
1000,
1009,
5371,
18442,
1009,
1006,
9986,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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-ex-assign.js | checkVariable | function checkVariable(variable) {
astUtils.getModifyingReferences(variable.references).forEach(reference => {
context.report({ node: reference.identifier, messageId: "unexpected" });
});
} | javascript | function checkVariable(variable) {
astUtils.getModifyingReferences(variable.references).forEach(reference => {
context.report({ node: reference.identifier, messageId: "unexpected" });
});
} | [
"function",
"checkVariable",
"(",
"variable",
")",
"{",
"astUtils",
".",
"getModifyingReferences",
"(",
"variable",
".",
"references",
")",
".",
"forEach",
"(",
"reference",
"=>",
"{",
"context",
".",
"report",
"(",
"{",
"node",
":",
"reference",
".",
"ident... | Finds and reports references that are non initializer and writable.
@param {Variable} variable - A variable to check.
@returns {void} | [
"Finds",
"and",
"reports",
"references",
"that",
"are",
"non",
"initializer",
"and",
"writable",
"."
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-ex-assign.js#L39-L43 | train | Check variable references | [
30522,
3853,
4638,
10755,
19210,
1006,
8023,
1007,
1063,
2004,
8525,
3775,
4877,
1012,
2131,
5302,
4305,
14116,
2890,
25523,
2015,
1006,
8023,
1012,
7604,
1007,
1012,
18921,
6776,
1006,
4431,
1027,
1028,
1063,
6123,
1012,
3189,
1006,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
laurent22/joplin | Clipper/joplin-webclipper/content_scripts/Readability.js | function() {
var doc = this._doc;
// Remove all style tags in head
this._removeNodes(doc.getElementsByTagName("style"));
if (doc.body) {
this._replaceBrs(doc.body);
}
this._replaceNodeTags(doc.getElementsByTagName("font"), "SPAN");
} | javascript | function() {
var doc = this._doc;
// Remove all style tags in head
this._removeNodes(doc.getElementsByTagName("style"));
if (doc.body) {
this._replaceBrs(doc.body);
}
this._replaceNodeTags(doc.getElementsByTagName("font"), "SPAN");
} | [
"function",
"(",
")",
"{",
"var",
"doc",
"=",
"this",
".",
"_doc",
";",
"// Remove all style tags in head",
"this",
".",
"_removeNodes",
"(",
"doc",
".",
"getElementsByTagName",
"(",
"\"style\"",
")",
")",
";",
"if",
"(",
"doc",
".",
"body",
")",
"{",
"t... | Prepare the HTML document for readability to scrape it.
This includes things like stripping javascript, CSS, and handling terrible markup.
@return void | [
"Prepare",
"the",
"HTML",
"document",
"for",
"readability",
"to",
"scrape",
"it",
".",
"This",
"includes",
"things",
"like",
"stripping",
"javascript",
"CSS",
"and",
"handling",
"terrible",
"markup",
"."
] | beb428b246cecba4630a3ca57b472f43c0933a43 | https://github.com/laurent22/joplin/blob/beb428b246cecba4630a3ca57b472f43c0933a43/Clipper/joplin-webclipper/content_scripts/Readability.js#L431-L442 | train | Remove all style tags in head and body | [
30522,
3853,
1006,
1007,
1063,
13075,
9986,
1027,
2023,
1012,
1035,
9986,
1025,
1013,
1013,
6366,
2035,
2806,
22073,
1999,
2132,
2023,
1012,
1035,
6366,
3630,
6155,
1006,
9986,
1012,
2131,
12260,
8163,
3762,
15900,
18442,
1006,
1000,
2806,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js | function (oRouteMatch) {
var that = this;
var mRouteArguments = oRouteMatch.getParameter("arguments");
var oModelData = {};
oModelData.layer = mRouteArguments.layer;
oModelData.namespace = decodeURIComponent(mRouteArguments.namespace);
oModelData.fileName = mRouteArguments.fileName;
oModelData.fil... | javascript | function (oRouteMatch) {
var that = this;
var mRouteArguments = oRouteMatch.getParameter("arguments");
var oModelData = {};
oModelData.layer = mRouteArguments.layer;
oModelData.namespace = decodeURIComponent(mRouteArguments.namespace);
oModelData.fileName = mRouteArguments.fileName;
oModelData.fil... | [
"function",
"(",
"oRouteMatch",
")",
"{",
"var",
"that",
"=",
"this",
";",
"var",
"mRouteArguments",
"=",
"oRouteMatch",
".",
"getParameter",
"(",
"\"arguments\"",
")",
";",
"var",
"oModelData",
"=",
"{",
"}",
";",
"oModelData",
".",
"layer",
"=",
"mRouteA... | Handler if a route was matched;
Obtains information about layer, namespace, filename, and file type from the route's arguments, and then requests content from Layered Repository.
@param {Object} oRouteMatch - route object which is specified in the router and matched via regexp
@returns {Promise} - <code>LRepConnector</... | [
"Handler",
"if",
"a",
"route",
"was",
"matched",
";",
"Obtains",
"information",
"about",
"layer",
"namespace",
"filename",
"and",
"file",
"type",
"from",
"the",
"route",
"s",
"arguments",
"and",
"then",
"requests",
"content",
"from",
"Layered",
"Repository",
"... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js#L62-L87 | train | This function is called when a route matches the content of a page | [
30522,
3853,
1006,
20298,
10421,
18900,
2818,
1007,
1063,
13075,
2008,
1027,
2023,
1025,
13075,
2720,
5833,
14644,
22850,
11187,
1027,
20298,
10421,
18900,
2818,
1012,
2131,
28689,
22828,
1006,
1000,
9918,
1000,
1007,
1025,
13075,
18168,
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... | |
dcloudio/mui | examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js | function ()
{
var i, thand, since, newList;
// add timed handlers scheduled for addition
// NOTE: we add before remove in the case a timed handler is
// added and then deleted before the next _onIdle() call.
while (this.addTimeds.length > 0) {
this.timedH... | javascript | function ()
{
var i, thand, since, newList;
// add timed handlers scheduled for addition
// NOTE: we add before remove in the case a timed handler is
// added and then deleted before the next _onIdle() call.
while (this.addTimeds.length > 0) {
this.timedH... | [
"function",
"(",
")",
"{",
"var",
"i",
",",
"thand",
",",
"since",
",",
"newList",
";",
"// add timed handlers scheduled for addition\r",
"// NOTE: we add before remove in the case a timed handler is\r",
"// added and then deleted before the next _onIdle() call.\r",
"while",
"(",
... | PrivateFunction: _onIdle
_Private_ handler to process events during idle cycle.
This handler is called every 100ms to fire timed handlers that
are ready and keep poll requests going. | [
"PrivateFunction",
":",
"_onIdle",
"_Private_",
"handler",
"to",
"process",
"events",
"during",
"idle",
"cycle",
"."
] | ff74c90a1671a552f3604b1288bf38a4126312d0 | https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L3440-L3486 | train | Called by the TTY service to update the related information of the related information. | [
30522,
3853,
1006,
1007,
1063,
13075,
1045,
1010,
2084,
2094,
1010,
2144,
1010,
2047,
9863,
1025,
1013,
1013,
5587,
22313,
28213,
2015,
5115,
2005,
2804,
1013,
1013,
3602,
1024,
2057,
5587,
2077,
6366,
1999,
1996,
2553,
1037,
22313,
28213,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
google/closure-library | closure/goog/html/sanitizer/noclobber.js | getElementStyleSheet | function getElementStyleSheet(element) {
assertHTMLElement(element);
return genericPropertyGet(
Methods.SHEET_GETTER, element, 'sheet', function(sheet) {
return sheet instanceof CSSStyleSheet;
});
} | javascript | function getElementStyleSheet(element) {
assertHTMLElement(element);
return genericPropertyGet(
Methods.SHEET_GETTER, element, 'sheet', function(sheet) {
return sheet instanceof CSSStyleSheet;
});
} | [
"function",
"getElementStyleSheet",
"(",
"element",
")",
"{",
"assertHTMLElement",
"(",
"element",
")",
";",
"return",
"genericPropertyGet",
"(",
"Methods",
".",
"SHEET_GETTER",
",",
"element",
",",
"'sheet'",
",",
"function",
"(",
"sheet",
")",
"{",
"return",
... | Returns an element's style without falling prey to things like
<form><input name="style"></form>.
@param {!Element} element
@return {!CSSStyleSheet} | [
"Returns",
"an",
"element",
"s",
"style",
"without",
"falling",
"prey",
"to",
"things",
"like",
"<form",
">",
"<input",
"name",
"=",
"style",
">",
"<",
"/",
"form",
">",
"."
] | 97390e9ca4483cebb9628e06026139fbb3023d65 | https://github.com/google/closure-library/blob/97390e9ca4483cebb9628e06026139fbb3023d65/closure/goog/html/sanitizer/noclobber.js#L296-L302 | train | Returns the style sheet of an HTMLElement | [
30522,
3853,
2131,
12260,
8163,
27983,
4095,
15558,
1006,
5783,
1007,
1063,
20865,
11039,
19968,
12260,
3672,
1006,
5783,
1007,
1025,
2709,
12391,
21572,
4842,
3723,
18150,
1006,
4725,
1012,
7123,
1035,
2131,
3334,
1010,
5783,
1010,
1005,
7... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eslint/eslint | lib/util/report-translator.js | createProblem | function createProblem(options) {
const problem = {
ruleId: options.ruleId,
severity: options.severity,
message: options.message,
line: options.loc.start.line,
column: options.loc.start.column + 1,
nodeType: options.node && options.node.type || null
};
/*
... | javascript | function createProblem(options) {
const problem = {
ruleId: options.ruleId,
severity: options.severity,
message: options.message,
line: options.loc.start.line,
column: options.loc.start.column + 1,
nodeType: options.node && options.node.type || null
};
/*
... | [
"function",
"createProblem",
"(",
"options",
")",
"{",
"const",
"problem",
"=",
"{",
"ruleId",
":",
"options",
".",
"ruleId",
",",
"severity",
":",
"options",
".",
"severity",
",",
"message",
":",
"options",
".",
"message",
",",
"line",
":",
"options",
"... | Creates information about the report from a descriptor
@param {Object} options Information about the problem
@param {string} options.ruleId Rule ID
@param {(0|1|2)} options.severity Rule severity
@param {(ASTNode|null)} options.node Node
@param {string} options.message Error message
@param {string} [options.messageId] ... | [
"Creates",
"information",
"about",
"the",
"report",
"from",
"a",
"descriptor"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/report-translator.js#L197-L225 | train | Creates a problem object from the options | [
30522,
3853,
3443,
21572,
3468,
2213,
1006,
7047,
1007,
1063,
9530,
3367,
3291,
1027,
1063,
3627,
3593,
1024,
7047,
1012,
3627,
3593,
1010,
18976,
1024,
7047,
1012,
18976,
1010,
4471,
1024,
7047,
1012,
4471,
1010,
2240,
1024,
7047,
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.m/src/sap/m/FormattedText.js | sanitizeHTML | function sanitizeHTML(sText) {
return sanitizeHTML0(sText, {
tagPolicy: fnPolicy.bind(this),
uriRewriter: function (sUrl) {
// by default we use the URL whitelist to check the URLs
if (URLWhitelist.validate(sUrl)) {
return sUrl;
}
}
});
} | javascript | function sanitizeHTML(sText) {
return sanitizeHTML0(sText, {
tagPolicy: fnPolicy.bind(this),
uriRewriter: function (sUrl) {
// by default we use the URL whitelist to check the URLs
if (URLWhitelist.validate(sUrl)) {
return sUrl;
}
}
});
} | [
"function",
"sanitizeHTML",
"(",
"sText",
")",
"{",
"return",
"sanitizeHTML0",
"(",
"sText",
",",
"{",
"tagPolicy",
":",
"fnPolicy",
".",
"bind",
"(",
"this",
")",
",",
"uriRewriter",
":",
"function",
"(",
"sUrl",
")",
"{",
"// by default we use the URL whitel... | Sanitizes HTML tags and attributes according to a given policy.
@param {string} sText The HTML to sanitize
@return {string} The sanitized HTML
@private | [
"Sanitizes",
"HTML",
"tags",
"and",
"attributes",
"according",
"to",
"a",
"given",
"policy",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/FormattedText.js#L269-L279 | train | Sanitize HTML to be valid HTML | [
30522,
3853,
2624,
25090,
4371,
11039,
19968,
1006,
26261,
18413,
1007,
1063,
2709,
2624,
25090,
4371,
11039,
19968,
2692,
1006,
26261,
18413,
1010,
1063,
6415,
18155,
2594,
2100,
1024,
1042,
16275,
23518,
2100,
1012,
14187,
1006,
2023,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
blueimp/jQuery-File-Upload | js/jquery.fileupload-ui.js | function (e, data) {
if (e.isDefaultPrevented()) {
return false;
}
var that = $(this).data('blueimp-fileupload') ||
$(this).data('fileupload');
if (data.context && data.dataType &&
data.da... | javascript | function (e, data) {
if (e.isDefaultPrevented()) {
return false;
}
var that = $(this).data('blueimp-fileupload') ||
$(this).data('fileupload');
if (data.context && data.dataType &&
data.da... | [
"function",
"(",
"e",
",",
"data",
")",
"{",
"if",
"(",
"e",
".",
"isDefaultPrevented",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"var",
"that",
"=",
"$",
"(",
"this",
")",
".",
"data",
"(",
"'blueimp-fileupload'",
")",
"||",
"$",
"(",
"th... | Callback for the start of each file upload request: | [
"Callback",
"for",
"the",
"start",
"of",
"each",
"file",
"upload",
"request",
":"
] | 4586771d65482dc9678c7e48d245a1501bf96ff5 | https://github.com/blueimp/jQuery-File-Upload/blob/4586771d65482dc9678c7e48d245a1501bf96ff5/js/jquery.fileupload-ui.js#L143-L165 | train | Called when a file upload is sent | [
30522,
3853,
1006,
1041,
1010,
2951,
1007,
1063,
2065,
1006,
1041,
1012,
2003,
3207,
7011,
11314,
28139,
15338,
2098,
1006,
1007,
1007,
1063,
2709,
6270,
1025,
1065,
13075,
2008,
1027,
1002,
1006,
2023,
1007,
1012,
2951,
1006,
1005,
2630,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/XMLTemplateProcessor.js | getObjectFallback | function getObjectFallback(oClassObject) {
// some modules might not return a class definition, so we fallback to the global
// this is against the AMD definition, but is required for backward compatibility
if (!oClassObject) {
Log.error("Control '" + sClassName + "' did not return a class definition f... | javascript | function getObjectFallback(oClassObject) {
// some modules might not return a class definition, so we fallback to the global
// this is against the AMD definition, but is required for backward compatibility
if (!oClassObject) {
Log.error("Control '" + sClassName + "' did not return a class definition f... | [
"function",
"getObjectFallback",
"(",
"oClassObject",
")",
"{",
"// some modules might not return a class definition, so we fallback to the global",
"// this is against the AMD definition, but is required for backward compatibility",
"if",
"(",
"!",
"oClassObject",
")",
"{",
"Log",
"."... | ensure that control and library are loaded | [
"ensure",
"that",
"control",
"and",
"library",
"are",
"loaded"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L481-L492 | train | This function is called by the control constructor to get the object class from the global object path | [
30522,
3853,
2131,
16429,
20614,
13976,
5963,
1006,
1051,
26266,
16429,
20614,
1007,
1063,
1013,
1013,
2070,
14184,
2453,
2025,
2709,
1037,
2465,
6210,
1010,
2061,
2057,
2991,
5963,
2000,
1996,
3795,
1013,
1013,
2023,
2003,
2114,
1996,
2572... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/FileSyncManager.js | presentConflicts | function presentConflicts(title) {
var allConflicts = editConflicts.concat(deleteConflicts);
function presentConflict(docInfo, i) {
var result = new $.Deferred(),
promise = result.promise(),
doc = docInfo.doc,
fileTime = docInfo.fileTime;
... | javascript | function presentConflicts(title) {
var allConflicts = editConflicts.concat(deleteConflicts);
function presentConflict(docInfo, i) {
var result = new $.Deferred(),
promise = result.promise(),
doc = docInfo.doc,
fileTime = docInfo.fileTime;
... | [
"function",
"presentConflicts",
"(",
"title",
")",
"{",
"var",
"allConflicts",
"=",
"editConflicts",
".",
"concat",
"(",
"deleteConflicts",
")",
";",
"function",
"presentConflict",
"(",
"docInfo",
",",
"i",
")",
"{",
"var",
"result",
"=",
"new",
"$",
".",
... | Walks through all the documents in "editConflicts" & "deleteConflicts" and prompts the user
about each one. Processing is sequential: if the user chooses to reload a document, the next
prompt is not shown until after the reload has completed.
@param {string} title Title of the dialog.
@return {$.Promise} Resolved/reje... | [
"Walks",
"through",
"all",
"the",
"documents",
"in",
"editConflicts",
"&",
"deleteConflicts",
"and",
"prompts",
"the",
"user",
"about",
"each",
"one",
".",
"Processing",
"is",
"sequential",
":",
"if",
"the",
"user",
"chooses",
"to",
"reload",
"a",
"document",
... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/FileSyncManager.js#L280-L392 | train | Check if any conflicts are present in the editor | [
30522,
3853,
2556,
8663,
29301,
2015,
1006,
2516,
1007,
1063,
13075,
2035,
8663,
29301,
2015,
1027,
10086,
8663,
29301,
2015,
1012,
9530,
11266,
1006,
3972,
12870,
8663,
29301,
2015,
1007,
1025,
3853,
2556,
8663,
29301,
1006,
9986,
2378,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | lib/common/utils.js | assign | function assign(obj /*from1, from2, from3, ...*/) {
var sources = Array.prototype.slice.call(arguments, 1);
sources.forEach(function (source) {
if (!source) { return; }
if (typeof source !== 'object') {
throw new TypeError(source + 'must be object');
}
Object.keys(source).forEach(function (... | javascript | function assign(obj /*from1, from2, from3, ...*/) {
var sources = Array.prototype.slice.call(arguments, 1);
sources.forEach(function (source) {
if (!source) { return; }
if (typeof source !== 'object') {
throw new TypeError(source + 'must be object');
}
Object.keys(source).forEach(function (... | [
"function",
"assign",
"(",
"obj",
"/*from1, from2, from3, ...*/",
")",
"{",
"var",
"sources",
"=",
"Array",
".",
"prototype",
".",
"slice",
".",
"call",
"(",
"arguments",
",",
"1",
")",
";",
"sources",
".",
"forEach",
"(",
"function",
"(",
"source",
")",
... | Merge objects | [
"Merge",
"objects"
] | ba6830ba13fb92953a91fb90318964ccd15b82c4 | https://github.com/markdown-it/markdown-it/blob/ba6830ba13fb92953a91fb90318964ccd15b82c4/lib/common/utils.js#L18-L34 | train | Assign all the specified objects to obj. | [
30522,
3853,
23911,
1006,
27885,
3501,
1013,
1008,
2013,
2487,
1010,
2013,
30524,
18921,
6776,
1006,
3853,
1006,
3120,
1007,
1063,
2065,
1006,
999,
3120,
1007,
1063,
2709,
1025,
1065,
2065,
1006,
2828,
11253,
3120,
999,
1027,
1027,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SeleniumHQ/selenium | javascript/selenium-core/scripts/htmlutils.js | dispatch | function dispatch(methodName, inDocument, xpath, contextNode, namespaceResolver) {
xpath = preprocess(xpath);
if (! contextNode) {
contextNode = inDocument;
}
var result = getEngineFor(inDocument)
.setIgnoreAttributesWithoutValue(ignoreAttributesWithoutValue)
... | javascript | function dispatch(methodName, inDocument, xpath, contextNode, namespaceResolver) {
xpath = preprocess(xpath);
if (! contextNode) {
contextNode = inDocument;
}
var result = getEngineFor(inDocument)
.setIgnoreAttributesWithoutValue(ignoreAttributesWithoutValue)
... | [
"function",
"dispatch",
"(",
"methodName",
",",
"inDocument",
",",
"xpath",
",",
"contextNode",
",",
"namespaceResolver",
")",
"{",
"xpath",
"=",
"preprocess",
"(",
"xpath",
")",
";",
"if",
"(",
"!",
"contextNode",
")",
"{",
"contextNode",
"=",
"inDocument",... | Dispatches an XPath evaluation method on the relevant engine for the
given document, and returns the result | [
"Dispatches",
"an",
"XPath",
"evaluation",
"method",
"on",
"the",
"relevant",
"engine",
"for",
"the",
"given",
"document",
"and",
"returns",
"the",
"result"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/scripts/htmlutils.js#L2001-L2013 | train | Dispatches a method to the engine for the given xpath. | [
30522,
3853,
18365,
1006,
4118,
18442,
1010,
11424,
24894,
4765,
1010,
26726,
8988,
1010,
6123,
3630,
3207,
1010,
3415,
15327,
6072,
4747,
6299,
1007,
1063,
26726,
8988,
1027,
17463,
3217,
9623,
2015,
1006,
26726,
8988,
1007,
1025,
2065,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
dcloudio/mui | examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js | function (req)
{
Strophe.debug("removing request");
var i;
for (i = this._requests.length - 1; i >= 0; i--) {
if (req == this._requests[i]) {
this._requests.splice(i, 1);
}
}
// IE6 fails on setting to null, so set to empty... | javascript | function (req)
{
Strophe.debug("removing request");
var i;
for (i = this._requests.length - 1; i >= 0; i--) {
if (req == this._requests[i]) {
this._requests.splice(i, 1);
}
}
// IE6 fails on setting to null, so set to empty... | [
"function",
"(",
"req",
")",
"{",
"Strophe",
".",
"debug",
"(",
"\"removing request\"",
")",
";",
"var",
"i",
";",
"for",
"(",
"i",
"=",
"this",
".",
"_requests",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"if",
"("... | PrivateFunction: _removeRequest
_Private_ function to remove a request from the queue.
Parameters:
(Strophe.Request) req - The request to remove. | [
"PrivateFunction",
":",
"_removeRequest",
"_Private_",
"function",
"to",
"remove",
"a",
"request",
"from",
"the",
"queue",
"."
] | ff74c90a1671a552f3604b1288bf38a4126312d0 | https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L4576-L4591 | train | Remove a request from the list of requests | [
30522,
3853,
1006,
2128,
4160,
1007,
1063,
2358,
18981,
5369,
1012,
2139,
8569,
2290,
1006,
1000,
9268,
5227,
1000,
1007,
1025,
13075,
1045,
1025,
2005,
1006,
1045,
1027,
2023,
1012,
1035,
11186,
1012,
3091,
1011,
1015,
1025,
1045,
1028,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/one-var.js | getCurrentScope | function getCurrentScope(statementType) {
let currentScope;
if (statementType === "var") {
currentScope = functionStack[functionStack.length - 1];
} else if (statementType === "let") {
currentScope = blockStack[blockStack.length - 1].let;
... | javascript | function getCurrentScope(statementType) {
let currentScope;
if (statementType === "var") {
currentScope = functionStack[functionStack.length - 1];
} else if (statementType === "let") {
currentScope = blockStack[blockStack.length - 1].let;
... | [
"function",
"getCurrentScope",
"(",
"statementType",
")",
"{",
"let",
"currentScope",
";",
"if",
"(",
"statementType",
"===",
"\"var\"",
")",
"{",
"currentScope",
"=",
"functionStack",
"[",
"functionStack",
".",
"length",
"-",
"1",
"]",
";",
"}",
"else",
"if... | Determines the current scope (function or block)
@param {string} statementType node.kind, one of: "var", "let", or "const"
@returns {Object} The scope associated with statementType | [
"Determines",
"the",
"current",
"scope",
"(",
"function",
"or",
"block",
")"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/one-var.js#L186-L197 | train | Get the current scope of the statement | [
30522,
3853,
2131,
10841,
14343,
7666,
16186,
1006,
4861,
13874,
1007,
1063,
2292,
14731,
16186,
1025,
2065,
1006,
4861,
13874,
1027,
1027,
1027,
1000,
13075,
1000,
1007,
1063,
14731,
16186,
1027,
4972,
2696,
3600,
1031,
4972,
2696,
3600,
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/language/JSONUtils.js | _getParentKeyName | function _getParentKeyName(ctx) {
var parentKeyName, braceParity = 1, hasColon;
// Move the context back to find the parent key.
while (TokenUtils.moveSkippingWhitespace(TokenUtils.movePrevToken, ctx)) {
if (ctx.token.type === null) {
if (ctx.token.string === "}") {
... | javascript | function _getParentKeyName(ctx) {
var parentKeyName, braceParity = 1, hasColon;
// Move the context back to find the parent key.
while (TokenUtils.moveSkippingWhitespace(TokenUtils.movePrevToken, ctx)) {
if (ctx.token.type === null) {
if (ctx.token.string === "}") {
... | [
"function",
"_getParentKeyName",
"(",
"ctx",
")",
"{",
"var",
"parentKeyName",
",",
"braceParity",
"=",
"1",
",",
"hasColon",
";",
"// Move the context back to find the parent key.",
"while",
"(",
"TokenUtils",
".",
"moveSkippingWhitespace",
"(",
"TokenUtils",
".",
"m... | @private
Returns the name of parent object
@param {!{editor:!CodeMirror, pos:!{ch:number, line:number}, token:Object}} ctx
@return {String} | [
"@private"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/JSONUtils.js#L95-L125 | train | Get the parent key name from the context | [
30522,
3853,
1035,
2131,
19362,
4765,
14839,
18442,
1006,
14931,
2595,
1007,
1063,
13075,
6687,
14839,
18442,
1010,
17180,
19362,
3012,
1027,
1015,
1010,
2038,
25778,
2239,
1025,
1013,
1013,
2693,
1996,
6123,
2067,
2000,
2424,
1996,
6687,
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... |
jgraph/mxgraph | javascript/mxClient.js | function(node, attr, value)
{
if (node.nodeType == mxConstants.NODETYPE_ELEMENT)
{
var tmp = node.getAttribute(attr);
if (tmp != null && tmp == value)
{
return node;
}
}
node = node.firstChild;
while (node != null)
{
var result = mxUtils.findNode(node, attr, value);
if (re... | javascript | function(node, attr, value)
{
if (node.nodeType == mxConstants.NODETYPE_ELEMENT)
{
var tmp = node.getAttribute(attr);
if (tmp != null && tmp == value)
{
return node;
}
}
node = node.firstChild;
while (node != null)
{
var result = mxUtils.findNode(node, attr, value);
if (re... | [
"function",
"(",
"node",
",",
"attr",
",",
"value",
")",
"{",
"if",
"(",
"node",
".",
"nodeType",
"==",
"mxConstants",
".",
"NODETYPE_ELEMENT",
")",
"{",
"var",
"tmp",
"=",
"node",
".",
"getAttribute",
"(",
"attr",
")",
";",
"if",
"(",
"tmp",
"!=",
... | Function: findNode
Returns the first node where attr equals value.
This implementation does not use XPath. | [
"Function",
":",
"findNode"
] | 33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44 | https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L2397-L2424 | train | Returns the nearest ancestor of node with the specified attribute | [
30522,
3853,
1006,
13045,
1010,
2012,
16344,
1010,
3643,
1007,
1063,
2065,
1006,
13045,
1012,
13045,
13874,
1027,
1027,
25630,
8663,
12693,
3215,
1012,
13045,
13874,
1035,
5783,
1007,
1063,
13075,
1056,
8737,
1027,
13045,
1012,
2131,
19321,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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 | mxCellEditor | function mxCellEditor(graph)
{
this.graph = graph;
// Stops editing after zoom changes
this.zoomHandler = mxUtils.bind(this, function()
{
if (this.graph.isEditing())
{
this.resize();
}
});
this.graph.view.addListener(mxEvent.SCALE, this.zoomHandler);
this.graph.view.addListener(mxEvent.SCALE_AND_TRA... | javascript | function mxCellEditor(graph)
{
this.graph = graph;
// Stops editing after zoom changes
this.zoomHandler = mxUtils.bind(this, function()
{
if (this.graph.isEditing())
{
this.resize();
}
});
this.graph.view.addListener(mxEvent.SCALE, this.zoomHandler);
this.graph.view.addListener(mxEvent.SCALE_AND_TRA... | [
"function",
"mxCellEditor",
"(",
"graph",
")",
"{",
"this",
".",
"graph",
"=",
"graph",
";",
"// Stops editing after zoom changes",
"this",
".",
"zoomHandler",
"=",
"mxUtils",
".",
"bind",
"(",
"this",
",",
"function",
"(",
")",
"{",
"if",
"(",
"this",
"."... | Copyright (c) 2006-2015, JGraph Ltd
Copyright (c) 2006-2015, Gaudenz Alder
Class: mxCellEditor
In-place editor for the graph. To control this editor, use
<mxGraph.invokesStopCellEditing>, <mxGraph.enterStopsCellEditing> and
<mxGraph.escapeEnabled>. If <mxGraph.enterStopsCellEditing> is true then
ctrl-enter or shift-... | [
"Copyright",
"(",
"c",
")",
"2006",
"-",
"2015",
"JGraph",
"Ltd",
"Copyright",
"(",
"c",
")",
"2006",
"-",
"2015",
"Gaudenz",
"Alder",
"Class",
":",
"mxCellEditor"
] | 33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44 | https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L46758-L46784 | train | This is the main entry point for the cell editor | [
30522,
3853,
25630,
29109,
3709,
15660,
1006,
10629,
1007,
1063,
2023,
1012,
10629,
1027,
10629,
1025,
1013,
1013,
6762,
9260,
2044,
24095,
3431,
2023,
1012,
24095,
11774,
3917,
1027,
25630,
21823,
4877,
1012,
14187,
1006,
2023,
1010,
3853,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ecomfe/zrender | src/core/BoundingRect.js | function (b) {
var a = this;
var sx = b.width / a.width;
var sy = b.height / a.height;
var m = matrix.create();
// 矩阵右乘
matrix.translate(m, m, [-a.x, -a.y]);
matrix.scale(m, m, [sx, sy]);
matrix.translate(m, m, [b.x, b.y]);
return m;
} | javascript | function (b) {
var a = this;
var sx = b.width / a.width;
var sy = b.height / a.height;
var m = matrix.create();
// 矩阵右乘
matrix.translate(m, m, [-a.x, -a.y]);
matrix.scale(m, m, [sx, sy]);
matrix.translate(m, m, [b.x, b.y]);
return m;
} | [
"function",
"(",
"b",
")",
"{",
"var",
"a",
"=",
"this",
";",
"var",
"sx",
"=",
"b",
".",
"width",
"/",
"a",
".",
"width",
";",
"var",
"sy",
"=",
"b",
".",
"height",
"/",
"a",
".",
"height",
";",
"var",
"m",
"=",
"matrix",
".",
"create",
"(... | Calculate matrix of transforming from self to target rect
@param {module:zrender/core/BoundingRect} b
@return {Array.<number>} | [
"Calculate",
"matrix",
"of",
"transforming",
"from",
"self",
"to",
"target",
"rect"
] | 30321b57cba3149c30eacb0c1e18276f0f001b9f | https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/core/BoundingRect.js#L107-L120 | train | returns a matrix of the same size as b | [
30522,
3853,
1006,
1038,
1007,
1063,
13075,
1037,
1027,
2023,
1025,
13075,
1055,
2595,
1027,
1038,
1012,
9381,
1013,
1037,
1012,
9381,
1025,
13075,
25353,
1027,
1038,
1012,
4578,
1013,
1037,
1012,
4578,
1025,
13075,
1049,
1027,
8185,
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... | |
GeekyAnts/vue-native-core | dist/vue.react.js | mergeAssets | function mergeAssets (parentVal, childVal) {
var res = Object.create(parentVal || null);
return childVal
? extend$1(res, childVal)
: res
} | javascript | function mergeAssets (parentVal, childVal) {
var res = Object.create(parentVal || null);
return childVal
? extend$1(res, childVal)
: res
} | [
"function",
"mergeAssets",
"(",
"parentVal",
",",
"childVal",
")",
"{",
"var",
"res",
"=",
"Object",
".",
"create",
"(",
"parentVal",
"||",
"null",
")",
";",
"return",
"childVal",
"?",
"extend$1",
"(",
"res",
",",
"childVal",
")",
":",
"res",
"}"
] | Assets
When a vm is present (instance creation), we need to do
a three-way merge between constructor options, instance
options and parent options. | [
"Assets"
] | a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e | https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/dist/vue.react.js#L1107-L1112 | train | Merge assets from parent to child | [
30522,
3853,
13590,
27241,
3215,
1006,
6687,
10175,
1010,
2775,
10175,
1007,
1063,
13075,
24501,
1027,
4874,
1012,
3443,
1006,
6687,
10175,
1064,
1064,
19701,
1007,
1025,
2709,
2775,
10175,
1029,
7949,
1002,
1015,
1006,
24501,
1010,
2775,
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.m/src/sap/m/Suggest.js | ontap | function ontap(oEvent) {
var item = oEvent.srcControl;
var value;
if (item instanceof SuggestionItem ) {
value = item.getSuggestionText();
picker.close();
window.setTimeout(function() {
oInput.setValue(value);
oInput.fireSearch({
query: value,
suggestionItem: item,
refre... | javascript | function ontap(oEvent) {
var item = oEvent.srcControl;
var value;
if (item instanceof SuggestionItem ) {
value = item.getSuggestionText();
picker.close();
window.setTimeout(function() {
oInput.setValue(value);
oInput.fireSearch({
query: value,
suggestionItem: item,
refre... | [
"function",
"ontap",
"(",
"oEvent",
")",
"{",
"var",
"item",
"=",
"oEvent",
".",
"srcControl",
";",
"var",
"value",
";",
"if",
"(",
"item",
"instanceof",
"SuggestionItem",
")",
"{",
"value",
"=",
"item",
".",
"getSuggestionText",
"(",
")",
";",
"picker",... | /* =========================================================== /* events processing /* =========================================================== Process tap over a list item in a picker | [
"/",
"*",
"===========================================================",
"/",
"*",
"events",
"processing",
"/",
"*",
"===========================================================",
"Process",
"tap",
"over",
"a",
"list",
"item",
"in",
"a",
"picker"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/Suggest.js#L48-L64 | train | The event handler for the search button | [
30522,
3853,
2006,
2696,
2361,
1006,
1051,
18697,
3372,
1007,
1063,
13075,
8875,
1027,
1051,
18697,
3372,
1012,
5034,
21408,
3372,
13153,
1025,
13075,
3643,
1025,
2065,
1006,
8875,
6013,
11253,
10293,
4221,
2213,
1007,
1063,
3643,
1027,
887... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/node/FindInFilesDomain.js | getNumMatches | function getNumMatches(fileList, queryExpr) {
var i,
matches = 0;
for (i = 0; i < fileList.length; i++) {
var temp = countNumMatches(getFileContentsForFile(fileList[i]), queryExpr);
if (temp) {
numFiles++;
matches += temp;
}
if (matches > MAX_TOTAL... | javascript | function getNumMatches(fileList, queryExpr) {
var i,
matches = 0;
for (i = 0; i < fileList.length; i++) {
var temp = countNumMatches(getFileContentsForFile(fileList[i]), queryExpr);
if (temp) {
numFiles++;
matches += temp;
}
if (matches > MAX_TOTAL... | [
"function",
"getNumMatches",
"(",
"fileList",
",",
"queryExpr",
")",
"{",
"var",
"i",
",",
"matches",
"=",
"0",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"fileList",
".",
"length",
";",
"i",
"++",
")",
"{",
"var",
"temp",
"=",
"countNumMatches... | Get the total number of matches from all the files in fileList
@param {array} fileList file path array
@param {Object} queryExpr
@return {Number} total number of matches | [
"Get",
"the",
"total",
"number",
"of",
"matches",
"from",
"all",
"the",
"files",
"in",
"fileList"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/node/FindInFilesDomain.js#L402-L417 | train | get num matches | [
30522,
3853,
2131,
19172,
18900,
8376,
1006,
5371,
9863,
1010,
23032,
10288,
18098,
1007,
1063,
13075,
1045,
1010,
3503,
1027,
1014,
1025,
2005,
1006,
1045,
1027,
1014,
1025,
1045,
1026,
5371,
9863,
1012,
3091,
1025,
1045,
1009,
1009,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular/material | src/core/util/util.js | scanChildren | function scanChildren(element) {
var found;
if (element) {
for (var i = 0, len = element.length; i < len; i++) {
var target = element[i];
if (!found) {
for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {
found = found ... | javascript | function scanChildren(element) {
var found;
if (element) {
for (var i = 0, len = element.length; i < len; i++) {
var target = element[i];
if (!found) {
for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {
found = found ... | [
"function",
"scanChildren",
"(",
"element",
")",
"{",
"var",
"found",
";",
"if",
"(",
"element",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"element",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"var",
"targ... | Scan children of specified node | [
"Scan",
"children",
"of",
"specified",
"node"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/util.js#L629-L642 | train | Scan children of an element | [
30522,
3853,
13594,
19339,
7389,
1006,
5783,
1007,
1063,
13075,
2179,
1025,
2065,
1006,
5783,
1007,
1063,
2005,
1006,
13075,
1045,
1027,
1014,
1010,
18798,
1027,
5783,
1012,
3091,
1025,
1045,
1026,
18798,
1025,
1045,
1009,
1009,
1007,
1063,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ecomfe/zrender | src/Layer.js | function (clearAll, clearColor) {
var dom = this.dom;
var ctx = this.ctx;
var width = dom.width;
var height = dom.height;
var clearColor = clearColor || this.clearColor;
var haveMotionBLur = this.motionBlur && !clearAll;
var lastFrameAlpha = this.lastFrameAlpha;
... | javascript | function (clearAll, clearColor) {
var dom = this.dom;
var ctx = this.ctx;
var width = dom.width;
var height = dom.height;
var clearColor = clearColor || this.clearColor;
var haveMotionBLur = this.motionBlur && !clearAll;
var lastFrameAlpha = this.lastFrameAlpha;
... | [
"function",
"(",
"clearAll",
",",
"clearColor",
")",
"{",
"var",
"dom",
"=",
"this",
".",
"dom",
";",
"var",
"ctx",
"=",
"this",
".",
"ctx",
";",
"var",
"width",
"=",
"dom",
".",
"width",
";",
"var",
"height",
"=",
"dom",
".",
"height",
";",
"var... | 清空该层画布
@param {boolean} [clearAll]=false Clear all with out motion blur
@param {Color} [clearColor] | [
"清空该层画布"
] | 30321b57cba3149c30eacb0c1e18276f0f001b9f | https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/Layer.js#L181-L238 | train | Clear the image | [
30522,
3853,
1006,
3154,
8095,
1010,
3154,
18717,
1007,
1063,
13075,
14383,
1027,
2023,
1012,
14383,
1025,
13075,
14931,
2595,
1027,
2023,
1012,
14931,
2595,
1025,
13075,
9381,
1027,
14383,
1012,
9381,
1025,
13075,
4578,
1027,
14383,
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/preferences/PreferencesManager.js | _includeProjectScope | function _includeProjectScope(filename) {
filename = filename || currentFilename;
if (!filename || !projectDirectory) {
return false;
}
return FileUtils.getRelativeFilename(projectDirectory, filename) !== undefined;
} | javascript | function _includeProjectScope(filename) {
filename = filename || currentFilename;
if (!filename || !projectDirectory) {
return false;
}
return FileUtils.getRelativeFilename(projectDirectory, filename) !== undefined;
} | [
"function",
"_includeProjectScope",
"(",
"filename",
")",
"{",
"filename",
"=",
"filename",
"||",
"currentFilename",
";",
"if",
"(",
"!",
"filename",
"||",
"!",
"projectDirectory",
")",
"{",
"return",
"false",
";",
"}",
"return",
"FileUtils",
".",
"getRelative... | @private
Determines whether the project Scope should be included based on whether
the currently edited file is within the project.
@param {string=} filename Full path to edited file
@return {boolean} true if the project Scope should be included. | [
"@private"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesManager.js#L58-L64 | train | Returns true if the current filename is a relative path to the project directory | [
30522,
3853,
1035,
2421,
21572,
20614,
26127,
1006,
5371,
18442,
1007,
1063,
5371,
18442,
1027,
5371,
18442,
1064,
1064,
2783,
8873,
20844,
4168,
1025,
2065,
1006,
999,
5371,
18442,
1064,
1064,
999,
2622,
4305,
2890,
16761,
2100,
1007,
1063... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Microsoft/vscode | build/lib/optimize.js | uglifyWithCopyrights | function uglifyWithCopyrights() {
const preserveComments = (f) => {
return (_node, comment) => {
const text = comment.value;
const type = comment.type;
if (/@minifier_do_not_preserve/.test(text)) {
return false;
}
const isOurCopyrig... | javascript | function uglifyWithCopyrights() {
const preserveComments = (f) => {
return (_node, comment) => {
const text = comment.value;
const type = comment.type;
if (/@minifier_do_not_preserve/.test(text)) {
return false;
}
const isOurCopyrig... | [
"function",
"uglifyWithCopyrights",
"(",
")",
"{",
"const",
"preserveComments",
"=",
"(",
"f",
")",
"=>",
"{",
"return",
"(",
"_node",
",",
"comment",
")",
"=>",
"{",
"const",
"text",
"=",
"comment",
".",
"value",
";",
"const",
"type",
"=",
"comment",
... | Wrap around uglify and allow the preserveComments function
to have a file "context" to include our copyright only once per file. | [
"Wrap",
"around",
"uglify",
"and",
"allow",
"the",
"preserveComments",
"function",
"to",
"have",
"a",
"file",
"context",
"to",
"include",
"our",
"copyright",
"only",
"once",
"per",
"file",
"."
] | 693a13cd32c5be798051edc0cb43e1e39fc456d9 | https://github.com/Microsoft/vscode/blob/693a13cd32c5be798051edc0cb43e1e39fc456d9/build/lib/optimize.js#L169-L207 | train | Uglify with copyright comments | [
30522,
3853,
1057,
25394,
12031,
24415,
3597,
7685,
15950,
2015,
1006,
1007,
1063,
9530,
3367,
7969,
9006,
8163,
1027,
1006,
1042,
1007,
1027,
1028,
1063,
2709,
1006,
1035,
13045,
1010,
7615,
1007,
1027,
1028,
1063,
9530,
3367,
3793,
1027,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/JSUtils/ScopeManager.js | getOffset | function getOffset(session, fileInfo, offset) {
var newOffset;
if (offset) {
newOffset = {line: offset.line, ch: offset.ch};
} else {
newOffset = session.getCursor();
}
if (fileInfo.type === MessageIds.TERN_FILE_INFO_TYPE_PART) {
newOffset.li... | javascript | function getOffset(session, fileInfo, offset) {
var newOffset;
if (offset) {
newOffset = {line: offset.line, ch: offset.ch};
} else {
newOffset = session.getCursor();
}
if (fileInfo.type === MessageIds.TERN_FILE_INFO_TYPE_PART) {
newOffset.li... | [
"function",
"getOffset",
"(",
"session",
",",
"fileInfo",
",",
"offset",
")",
"{",
"var",
"newOffset",
";",
"if",
"(",
"offset",
")",
"{",
"newOffset",
"=",
"{",
"line",
":",
"offset",
".",
"line",
",",
"ch",
":",
"offset",
".",
"ch",
"}",
";",
"}"... | Get the current offset. The offset is adjusted for "part" updates.
@param {!Session} session - the current session
@param {{type: string, name: string, offsetLines: number, text: string}} fileInfo
- type of update, name of file, and the text of the update.
For "full" updates, the whole text of the file is present. For... | [
"Get",
"the",
"current",
"offset",
".",
"The",
"offset",
"is",
"adjusted",
"for",
"part",
"updates",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/ScopeManager.js#L636-L650 | train | Get offset of file | [
30522,
3853,
2131,
27475,
3388,
1006,
5219,
1010,
5371,
2378,
14876,
1010,
16396,
1007,
1063,
13075,
2047,
27475,
3388,
1025,
2065,
1006,
16396,
1007,
1063,
2047,
27475,
3388,
1027,
1063,
2240,
1024,
16396,
1012,
2240,
1010,
10381,
1024,
16... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
tensorflow/tfjs-models | speech-commands/demo/index.js | createWordDivs | function createWordDivs(transferWords) {
// Clear collectButtonsDiv first.
while (collectButtonsDiv.firstChild) {
collectButtonsDiv.removeChild(collectButtonsDiv.firstChild);
}
datasetViz = new DatasetViz(transferRecognizer,
collectButtonsDiv,
MIN_... | javascript | function createWordDivs(transferWords) {
// Clear collectButtonsDiv first.
while (collectButtonsDiv.firstChild) {
collectButtonsDiv.removeChild(collectButtonsDiv.firstChild);
}
datasetViz = new DatasetViz(transferRecognizer,
collectButtonsDiv,
MIN_... | [
"function",
"createWordDivs",
"(",
"transferWords",
")",
"{",
"// Clear collectButtonsDiv first.",
"while",
"(",
"collectButtonsDiv",
".",
"firstChild",
")",
"{",
"collectButtonsDiv",
".",
"removeChild",
"(",
"collectButtonsDiv",
".",
"firstChild",
")",
";",
"}",
"dat... | Create div elements for transfer words.
@param {string[]} transferWords The array of transfer words.
@returns {Object} An object mapping word to th div element created for it. | [
"Create",
"div",
"elements",
"for",
"transfer",
"words",
"."
] | af194797c90cc5bcac1060d3cd41b0258a34c7dc | https://github.com/tensorflow/tfjs-models/blob/af194797c90cc5bcac1060d3cd41b0258a34c7dc/speech-commands/demo/index.js#L188-L303 | train | Creates a div for each word. | [
30522,
3853,
3443,
18351,
4305,
15088,
1006,
4651,
22104,
1007,
1063,
1013,
1013,
3154,
8145,
8569,
15474,
16150,
12848,
2034,
1012,
2096,
1006,
8145,
8569,
15474,
16150,
12848,
1012,
2034,
19339,
1007,
1063,
8145,
8569,
15474,
16150,
12848,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
wangfupeng1988/wangEditor | src/js/menus/link/index.js | function () {
if (!this._active) {
return
}
const editor = this.editor
const $selectionELem = editor.selection.getSelectionContainerElem()
if (!$selectionELem) {
return
}
const selectionText = editor.selection.getSelectionText()
edi... | javascript | function () {
if (!this._active) {
return
}
const editor = this.editor
const $selectionELem = editor.selection.getSelectionContainerElem()
if (!$selectionELem) {
return
}
const selectionText = editor.selection.getSelectionText()
edi... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_active",
")",
"{",
"return",
"}",
"const",
"editor",
"=",
"this",
".",
"editor",
"const",
"$selectionELem",
"=",
"editor",
".",
"selection",
".",
"getSelectionContainerElem",
"(",
")",
"if",
"(",
... | 删除当前链接 | [
"删除当前链接"
] | b77696f5e81c8ec13d9d341252d6b9fa8a22db18 | https://github.com/wangfupeng1988/wangEditor/blob/b77696f5e81c8ec13d9d341252d6b9fa8a22db18/src/js/menus/link/index.js#L121-L132 | train | Return the current language | [
30522,
3853,
1006,
1007,
1063,
2065,
1006,
999,
2023,
1012,
1035,
3161,
1007,
1063,
2709,
1065,
9530,
3367,
3559,
1027,
2023,
1012,
3559,
9530,
3367,
1002,
4989,
12260,
2213,
1027,
3559,
30524,
18209,
1006,
1007,
3559,
1012,
4642,
2094,
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 | lib/jsdoc/ui5/plugin.js | preprocessComment | function preprocessComment(e) {
var src = e.comment;
// add a default visibility
if ( !/@private|@public|@protected|@sap-restricted|@ui5-restricted/.test(src) ) {
src = unwrap(src);
src = src + "\n@private";
src = wrap(src);
// console.log("added default visibility to '" + src + "'");
}
if ( /@class/.te... | javascript | function preprocessComment(e) {
var src = e.comment;
// add a default visibility
if ( !/@private|@public|@protected|@sap-restricted|@ui5-restricted/.test(src) ) {
src = unwrap(src);
src = src + "\n@private";
src = wrap(src);
// console.log("added default visibility to '" + src + "'");
}
if ( /@class/.te... | [
"function",
"preprocessComment",
"(",
"e",
")",
"{",
"var",
"src",
"=",
"e",
".",
"comment",
";",
"// add a default visibility",
"if",
"(",
"!",
"/",
"@private|@public|@protected|@sap-restricted|@ui5-restricted",
"/",
".",
"test",
"(",
"src",
")",
")",
"{",
"src... | Pre-processes a JSDoc comment string to ensure some UI5 standards.
@param {event} e Event for the new comment
@returns {event} Returns the modified event | [
"Pre",
"-",
"processes",
"a",
"JSDoc",
"comment",
"string",
"to",
"ensure",
"some",
"UI5",
"standards",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/ui5/plugin.js#L1910-L1932 | train | Preprocess a comment | [
30522,
3853,
17463,
3217,
9623,
9363,
20058,
3372,
1006,
1041,
1007,
1063,
13075,
5034,
2278,
1027,
1041,
1012,
7615,
1025,
1013,
1013,
5587,
1037,
12398,
16476,
2065,
1006,
999,
1013,
1030,
2797,
1064,
1030,
2270,
1064,
1030,
5123,
1064,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GitbookIO/gitbook | lib/output/helper/fileToURL.js | fileToURL | function fileToURL(output, filePath) {
var options = output.getOptions();
var directoryIndex = options.get('directoryIndex');
filePath = fileToOutput(output, filePath);
if (directoryIndex && path.basename(filePath) == 'index.html') {
filePath = path.dirname(filePath) + '/';
}
return L... | javascript | function fileToURL(output, filePath) {
var options = output.getOptions();
var directoryIndex = options.get('directoryIndex');
filePath = fileToOutput(output, filePath);
if (directoryIndex && path.basename(filePath) == 'index.html') {
filePath = path.dirname(filePath) + '/';
}
return L... | [
"function",
"fileToURL",
"(",
"output",
",",
"filePath",
")",
"{",
"var",
"options",
"=",
"output",
".",
"getOptions",
"(",
")",
";",
"var",
"directoryIndex",
"=",
"options",
".",
"get",
"(",
"'directoryIndex'",
")",
";",
"filePath",
"=",
"fileToOutput",
"... | Convert a filePath (absolute) to an url (without hostname).
It returns an absolute path.
"README.md" -> "/"
"test/hello.md" -> "test/hello.html"
"test/README.md" -> "test/"
@param {Output} output
@param {String} filePath
@return {String} | [
"Convert",
"a",
"filePath",
"(",
"absolute",
")",
"to",
"an",
"url",
"(",
"without",
"hostname",
")",
".",
"It",
"returns",
"an",
"absolute",
"path",
"."
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/output/helper/fileToURL.js#L18-L29 | train | Get the URL of the file | [
30522,
3853,
5371,
21163,
2140,
1006,
6434,
1010,
5371,
15069,
1007,
1063,
13075,
7047,
1027,
6434,
1012,
2131,
7361,
9285,
1006,
1007,
1025,
13075,
14176,
22254,
10288,
1027,
7047,
1012,
2131,
1006,
1005,
14176,
22254,
10288,
1005,
1007,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/util/IndexWorker.js | getObjectValues | function getObjectValues(oObject) {
var aKeys = Object.keys(oObject),
aValues = [];
aKeys.forEach(function(sKey) {
aValues.push(oObject[sKey]);
});
return aValues;
} | javascript | function getObjectValues(oObject) {
var aKeys = Object.keys(oObject),
aValues = [];
aKeys.forEach(function(sKey) {
aValues.push(oObject[sKey]);
});
return aValues;
} | [
"function",
"getObjectValues",
"(",
"oObject",
")",
"{",
"var",
"aKeys",
"=",
"Object",
".",
"keys",
"(",
"oObject",
")",
",",
"aValues",
"=",
"[",
"]",
";",
"aKeys",
".",
"forEach",
"(",
"function",
"(",
"sKey",
")",
"{",
"aValues",
".",
"push",
"("... | Polyfill for Object.values
as original Object.values is N/A on IE
@param oObject
@returns {Array} | [
"Polyfill",
"for",
"Object",
".",
"values"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/util/IndexWorker.js#L467-L476 | train | Get the values of an object | [
30522,
3853,
2131,
16429,
20614,
10175,
15808,
1006,
1051,
16429,
20614,
1007,
1063,
13075,
17712,
3240,
2015,
1027,
4874,
1012,
6309,
1006,
1051,
16429,
20614,
1007,
1010,
10927,
7630,
2229,
1027,
1031,
1033,
1025,
17712,
3240,
2015,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js | function(aUI5Filter, oReferencedProperties) {
for ( var i = -1, oUI5Filter; (oUI5Filter = aUI5Filter[++i]) !== undefined;) {
if (oUI5Filter.aFilters != undefined) {
this.getPropertiesReferencedByUI5FilterArray(oUI5Filter.aFilters, oReferencedProperties);
} else {
if (oReferencedProperties[oUI5Filte... | javascript | function(aUI5Filter, oReferencedProperties) {
for ( var i = -1, oUI5Filter; (oUI5Filter = aUI5Filter[++i]) !== undefined;) {
if (oUI5Filter.aFilters != undefined) {
this.getPropertiesReferencedByUI5FilterArray(oUI5Filter.aFilters, oReferencedProperties);
} else {
if (oReferencedProperties[oUI5Filte... | [
"function",
"(",
"aUI5Filter",
",",
"oReferencedProperties",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"-",
"1",
",",
"oUI5Filter",
";",
"(",
"oUI5Filter",
"=",
"aUI5Filter",
"[",
"++",
"i",
"]",
")",
"!==",
"undefined",
";",
")",
"{",
"if",
"(",
"oUI5F... | /*
@private | [
"/",
"*"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3289-L3300 | train | Recursively finds all properties referenced by the given UI5 filter. | [
30522,
3853,
1006,
8740,
2072,
2629,
8873,
21928,
1010,
10848,
25523,
18927,
18981,
8743,
3111,
1007,
1063,
2005,
1006,
13075,
1045,
1027,
1011,
1015,
1010,
15068,
2072,
2629,
8873,
21928,
1025,
1006,
15068,
2072,
2629,
8873,
21928,
1027,
8... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
GitbookIO/gitbook | lib/utils/promise.js | serie | function serie(arr, iter, base) {
return reduce(arr, function(before, item, key) {
return Q(iter(item, key))
.then(function(r) {
before.push(r);
return before;
});
}, []);
} | javascript | function serie(arr, iter, base) {
return reduce(arr, function(before, item, key) {
return Q(iter(item, key))
.then(function(r) {
before.push(r);
return before;
});
}, []);
} | [
"function",
"serie",
"(",
"arr",
",",
"iter",
",",
"base",
")",
"{",
"return",
"reduce",
"(",
"arr",
",",
"function",
"(",
"before",
",",
"item",
",",
"key",
")",
"{",
"return",
"Q",
"(",
"iter",
"(",
"item",
",",
"key",
")",
")",
".",
"then",
... | Transform an array
@param {Array|List} arr
@param {Function(value, element, index)}
@return {Promise} | [
"Transform",
"an",
"array"
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/utils/promise.js#L47-L55 | train | returns a promise that resolves to an array of the result | [
30522,
3853,
8668,
1006,
12098,
2099,
1010,
2009,
2121,
1010,
2918,
1007,
1063,
2709,
5547,
1006,
12098,
2099,
1010,
3853,
1006,
2077,
1010,
8875,
1010,
3145,
1007,
1063,
2709,
1053,
1006,
2009,
2121,
1006,
8875,
1010,
3145,
1007,
1007,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js | function (oGroup) {
var sTitle = "{i18n>systemData}";
if (oGroup.key === "custom") {
sTitle = "{i18n>externalReferences}";
}
return new GroupHeaderListItem({
title: sTitle,
upperCase: false
});
} | javascript | function (oGroup) {
var sTitle = "{i18n>systemData}";
if (oGroup.key === "custom") {
sTitle = "{i18n>externalReferences}";
}
return new GroupHeaderListItem({
title: sTitle,
upperCase: false
});
} | [
"function",
"(",
"oGroup",
")",
"{",
"var",
"sTitle",
"=",
"\"{i18n>systemData}\"",
";",
"if",
"(",
"oGroup",
".",
"key",
"===",
"\"custom\"",
")",
"{",
"sTitle",
"=",
"\"{i18n>externalReferences}\"",
";",
"}",
"return",
"new",
"GroupHeaderListItem",
"(",
"{",... | Factory for creating list group header objects for the metadata list.
@param {Object} oGroup - group data passed from the lists model binding
@returns {sap.m.GroupHeaderListItem}
@public | [
"Factory",
"for",
"creating",
"list",
"group",
"header",
"objects",
"for",
"the",
"metadata",
"list",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js#L60-L71 | train | Creates a list of GroupHeaderItems for the given group. | [
30522,
3853,
1006,
13958,
22107,
1007,
1063,
13075,
2358,
4183,
2571,
1027,
1000,
1063,
1045,
15136,
2078,
1028,
2291,
2850,
2696,
1065,
1000,
1025,
2065,
1006,
13958,
22107,
1012,
3145,
1027,
1027,
1027,
1000,
7661,
1000,
1007,
1063,
2358,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SeleniumHQ/selenium | javascript/selenium-core/xpath/xpath.js | function(ctx) {
assert(this.args.length >= 1);
var c = this.args[0].evaluate(ctx).numberValue();
var ret = [];
for (var i = 0; i < c; ++i) {
ret.push(ctx.node);
}
return new NodeSetValue(ret);
} | javascript | function(ctx) {
assert(this.args.length >= 1);
var c = this.args[0].evaluate(ctx).numberValue();
var ret = [];
for (var i = 0; i < c; ++i) {
ret.push(ctx.node);
}
return new NodeSetValue(ret);
} | [
"function",
"(",
"ctx",
")",
"{",
"assert",
"(",
"this",
".",
"args",
".",
"length",
">=",
"1",
")",
";",
"var",
"c",
"=",
"this",
".",
"args",
"[",
"0",
"]",
".",
"evaluate",
"(",
"ctx",
")",
".",
"numberValue",
"(",
")",
";",
"var",
"ret",
... | ext-cardinal() evaluates its single argument as a number, and returns the current node that many times. It can be used in the select attribute to iterate over an integer range. | [
"ext",
"-",
"cardinal",
"()",
"evaluates",
"its",
"single",
"argument",
"as",
"a",
"number",
"and",
"returns",
"the",
"current",
"node",
"that",
"many",
"times",
".",
"It",
"can",
"be",
"used",
"in",
"the",
"select",
"attribute",
"to",
"iterate",
"over",
... | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/selenium-core/xpath/xpath.js#L1382-L1390 | train | Returns a node set with the specified number of nodes | [
30522,
3853,
1006,
14931,
2595,
1007,
1063,
20865,
1006,
2023,
1012,
12098,
5620,
1012,
3091,
1028,
1027,
1015,
1007,
1025,
13075,
1039,
1027,
2023,
1012,
12098,
5620,
1031,
1014,
1033,
1012,
16157,
1006,
14931,
2595,
1007,
1012,
2193,
1017... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/camera.js | function() {
var dir = game.player.dir;
var sky = game.map.skybox;
var ambient = game.map.light;
var width = sky.width * (this.height / sky.height) * 2;
var left = (dir / circle) * -width;
ctx.save();
ctx.drawImage(sky.image, left, 0, width, this.height);
if (left < width - this.width) ... | javascript | function() {
var dir = game.player.dir;
var sky = game.map.skybox;
var ambient = game.map.light;
var width = sky.width * (this.height / sky.height) * 2;
var left = (dir / circle) * -width;
ctx.save();
ctx.drawImage(sky.image, left, 0, width, this.height);
if (left < width - this.width) ... | [
"function",
"(",
")",
"{",
"var",
"dir",
"=",
"game",
".",
"player",
".",
"dir",
";",
"var",
"sky",
"=",
"game",
".",
"map",
".",
"skybox",
";",
"var",
"ambient",
"=",
"game",
".",
"map",
".",
"light",
";",
"var",
"width",
"=",
"sky",
".",
"wid... | Draw the skybox based on the player's direction. | [
"Draw",
"the",
"skybox",
"based",
"on",
"the",
"player",
"s",
"direction",
"."
] | 030db918dd8ce640afd57e172418472497e8f113 | https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/camera.js#L31-L49 | train | draw the skybox | [
30522,
3853,
1006,
1007,
1063,
13075,
16101,
1027,
2208,
1012,
2447,
1012,
16101,
1025,
13075,
3712,
1027,
2208,
1012,
4949,
1012,
3712,
8758,
1025,
13075,
17093,
1027,
2208,
1012,
4949,
1012,
2422,
1025,
13075,
9381,
1027,
3712,
1012,
9381... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/resize.js | extract | function extract (options) {
const suffix = this.options.width === -1 && this.options.height === -1 ? 'Pre' : 'Post';
['left', 'top', 'width', 'height'].forEach(function (name) {
const value = options[name];
if (is.integer(value) && value >= 0) {
this.options[name + (name === 'left' || name === 'top' ... | javascript | function extract (options) {
const suffix = this.options.width === -1 && this.options.height === -1 ? 'Pre' : 'Post';
['left', 'top', 'width', 'height'].forEach(function (name) {
const value = options[name];
if (is.integer(value) && value >= 0) {
this.options[name + (name === 'left' || name === 'top' ... | [
"function",
"extract",
"(",
"options",
")",
"{",
"const",
"suffix",
"=",
"this",
".",
"options",
".",
"width",
"===",
"-",
"1",
"&&",
"this",
".",
"options",
".",
"height",
"===",
"-",
"1",
"?",
"'Pre'",
":",
"'Post'",
";",
"[",
"'left'",
",",
"'to... | Extract a region of the image.
- Use `extract` before `resize` for pre-resize extraction.
- Use `extract` after `resize` for post-resize extraction.
- Use `extract` before and after for both.
@example
sharp(input)
.extract({ left: left, top: top, width: width, height: height })
.toFile(output, function(err) {
// Extr... | [
"Extract",
"a",
"region",
"of",
"the",
"image",
"."
] | 05d76eeadfe54713606a615185b2da047923406b | https://github.com/lovell/sharp/blob/05d76eeadfe54713606a615185b2da047923406b/lib/resize.js#L345-L360 | train | Extract image from the specified options | [
30522,
3853,
14817,
1006,
7047,
1007,
1063,
9530,
3367,
16809,
1027,
2023,
1012,
7047,
1012,
9381,
1027,
1027,
1027,
1011,
1015,
1004,
1004,
2023,
1012,
7047,
1012,
4578,
1027,
1027,
1027,
1011,
1015,
1029,
1005,
3653,
1005,
1024,
1005,
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... |
laurent22/joplin | Clipper/joplin-webclipper/content_scripts/JSDOMParser.js | function (str) {
var index = this.html.indexOf(str, this.currentChar) + str.length;
if (index === -1)
this.currentChar = this.html.length;
this.currentChar = index;
} | javascript | function (str) {
var index = this.html.indexOf(str, this.currentChar) + str.length;
if (index === -1)
this.currentChar = this.html.length;
this.currentChar = index;
} | [
"function",
"(",
"str",
")",
"{",
"var",
"index",
"=",
"this",
".",
"html",
".",
"indexOf",
"(",
"str",
",",
"this",
".",
"currentChar",
")",
"+",
"str",
".",
"length",
";",
"if",
"(",
"index",
"===",
"-",
"1",
")",
"this",
".",
"currentChar",
"=... | Searches the input until a string is found and discards all input up to
and including the matched string. | [
"Searches",
"the",
"input",
"until",
"a",
"string",
"is",
"found",
"and",
"discards",
"all",
"input",
"up",
"to",
"and",
"including",
"the",
"matched",
"string",
"."
] | beb428b246cecba4630a3ca57b472f43c0933a43 | https://github.com/laurent22/joplin/blob/beb428b246cecba4630a3ca57b472f43c0933a43/Clipper/joplin-webclipper/content_scripts/JSDOMParser.js#L1008-L1013 | train | Find the next index of str | [
30522,
3853,
1006,
2358,
2099,
1007,
1063,
13075,
5950,
1027,
2023,
1012,
16129,
1012,
5950,
11253,
1006,
2358,
2099,
1010,
2023,
1012,
2783,
7507,
2099,
1007,
1009,
2358,
2099,
1012,
3091,
1025,
2065,
1006,
5950,
1027,
1027,
1027,
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... | |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js | function(oThis, sProp, oValue, sChangeType) {
var bHasDomRef = !!oThis.getDomRef();
oThis.setProperty(sProp, oValue, bHasDomRef);
if (bHasDomRef) {
oThis.contentChanged(null, sChangeType);
}
return oThis;
} | javascript | function(oThis, sProp, oValue, sChangeType) {
var bHasDomRef = !!oThis.getDomRef();
oThis.setProperty(sProp, oValue, bHasDomRef);
if (bHasDomRef) {
oThis.contentChanged(null, sChangeType);
}
return oThis;
} | [
"function",
"(",
"oThis",
",",
"sProp",
",",
"oValue",
",",
"sChangeType",
")",
"{",
"var",
"bHasDomRef",
"=",
"!",
"!",
"oThis",
".",
"getDomRef",
"(",
")",
";",
"oThis",
".",
"setProperty",
"(",
"sProp",
",",
"oValue",
",",
"bHasDomRef",
")",
";",
... | Sets the value of the given property and triggers Dom change if
possible.
@private | [
"Sets",
"the",
"value",
"of",
"the",
"given",
"property",
"and",
"triggers",
"Dom",
"change",
"if",
"possible",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js#L590-L597 | train | Sets the value of a property on the DOM element | [
30522,
3853,
1006,
27178,
24158,
1010,
11867,
18981,
1010,
9242,
5657,
1010,
8040,
18003,
27405,
5051,
1007,
1063,
13075,
1038,
14949,
9527,
2890,
2546,
1027,
999,
999,
27178,
24158,
1012,
2131,
9527,
2890,
2546,
1006,
1007,
1025,
27178,
24... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/input-mask/jquery.inputmask.date.extensions.js | function (chrs, buffer, pos, strict, opts) {
var frontValue = buffer.join('').substr(0, 3);
if (frontValue.indexOf(opts.placeholder[0]) != -1) frontValue = "01" + opts.separator;
var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs)... | javascript | function (chrs, buffer, pos, strict, opts) {
var frontValue = buffer.join('').substr(0, 3);
if (frontValue.indexOf(opts.placeholder[0]) != -1) frontValue = "01" + opts.separator;
var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs)... | [
"function",
"(",
"chrs",
",",
"buffer",
",",
"pos",
",",
"strict",
",",
"opts",
")",
"{",
"var",
"frontValue",
"=",
"buffer",
".",
"join",
"(",
"''",
")",
".",
"substr",
"(",
"0",
",",
"3",
")",
";",
"if",
"(",
"frontValue",
".",
"indexOf",
"(",
... | val2 ~ day or month | [
"val2",
"~",
"day",
"or",
"month"
] | 19113c3cbc19a7afe0cfd3158d647064d2d30661 | https://github.com/ColorlibHQ/AdminLTE/blob/19113c3cbc19a7afe0cfd3158d647064d2d30661/plugins/input-mask/jquery.inputmask.date.extensions.js#L116-L130 | train | check if the character is valid | [
30522,
3853,
1006,
10381,
2869,
1010,
17698,
1010,
13433,
2015,
1010,
9384,
1010,
23569,
2015,
1007,
1063,
13075,
2392,
10175,
5657,
1027,
17698,
1012,
3693,
1006,
1005,
1005,
1007,
1012,
4942,
3367,
2099,
1006,
1014,
1010,
1017,
1007,
1025... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/qunit/utils/ControlIterator.js | function(aLibrariesToTest, aExcludedLibraries, bIncludeDistLayer, QUnit) {
var mLibraries = aLibrariesToTest ?
getRequestedLibraries(aLibrariesToTest)
:
getAllLibraries(aExcludedLibraries, bIncludeDistLayer);
QUnit.test("Should load at least one library and some controls", function(assert) {
assert.... | javascript | function(aLibrariesToTest, aExcludedLibraries, bIncludeDistLayer, QUnit) {
var mLibraries = aLibrariesToTest ?
getRequestedLibraries(aLibrariesToTest)
:
getAllLibraries(aExcludedLibraries, bIncludeDistLayer);
QUnit.test("Should load at least one library and some controls", function(assert) {
assert.... | [
"function",
"(",
"aLibrariesToTest",
",",
"aExcludedLibraries",
",",
"bIncludeDistLayer",
",",
"QUnit",
")",
"{",
"var",
"mLibraries",
"=",
"aLibrariesToTest",
"?",
"getRequestedLibraries",
"(",
"aLibrariesToTest",
")",
":",
"getAllLibraries",
"(",
"aExcludedLibraries",... | Returns a map of libraries - either exactly those requested in aLibrariesToTest, if defined, or all discoverable libraries
under the given conditions. | [
"Returns",
"a",
"map",
"of",
"libraries",
"-",
"either",
"exactly",
"those",
"requested",
"in",
"aLibrariesToTest",
"if",
"defined",
"or",
"all",
"discoverable",
"libraries",
"under",
"the",
"given",
"conditions",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/qunit/utils/ControlIterator.js#L321-L348 | train | Tests that all libraries are loaded and that there are at least 10 controls in a library | [
30522,
3853,
1006,
4862,
10024,
5134,
3406,
22199,
1010,
29347,
2595,
20464,
13936,
29521,
19848,
3111,
1010,
8026,
20464,
13936,
2923,
24314,
1010,
24209,
3490,
2102,
1007,
1063,
13075,
19875,
12322,
19848,
3111,
1027,
4862,
10024,
5134,
340... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
wangfupeng1988/wangEditor | src/js/editor/index.js | Editor | function Editor(toolbarSelector, textSelector) {
if (toolbarSelector == null) {
// 没有传入任何参数,报错
throw new Error('错误:初始化编辑器时候未传入任何参数,请查阅文档')
}
// id,用以区分单个页面不同的编辑器对象
this.id = 'wangEditor-' + editorId++
this.toolbarSelector = toolbarSelector
this.textSelector = textSelector
/... | javascript | function Editor(toolbarSelector, textSelector) {
if (toolbarSelector == null) {
// 没有传入任何参数,报错
throw new Error('错误:初始化编辑器时候未传入任何参数,请查阅文档')
}
// id,用以区分单个页面不同的编辑器对象
this.id = 'wangEditor-' + editorId++
this.toolbarSelector = toolbarSelector
this.textSelector = textSelector
/... | [
"function",
"Editor",
"(",
"toolbarSelector",
",",
"textSelector",
")",
"{",
"if",
"(",
"toolbarSelector",
"==",
"null",
")",
"{",
"// 没有传入任何参数,报错",
"throw",
"new",
"Error",
"(",
"'错误:初始化编辑器时候未传入任何参数,请查阅文档')",
"",
"}",
"// id,用以区分单个页面不同的编辑器对象",
"this",
".",
"id",
... | 构造函数 | [
"构造函数"
] | b77696f5e81c8ec13d9d341252d6b9fa8a22db18 | https://github.com/wangfupeng1988/wangEditor/blob/b77696f5e81c8ec13d9d341252d6b9fa8a22db18/src/js/editor/index.js#L19-L32 | train | Editor constructor. | [
30522,
3853,
3559,
1006,
6994,
8237,
11246,
22471,
2953,
1010,
6981,
12260,
16761,
1007,
1063,
2065,
1006,
6994,
8237,
11246,
22471,
2953,
1027,
1027,
19701,
1007,
1063,
1013,
1013,
100,
1873,
100,
100,
100,
100,
100,
100,
1989,
100,
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... |
LLK/scratch-blocks | blocks_vertical/motion.js | function() {
this.jsonInit({
"message0": "%1",
"args0": [
{
"type": "field_dropdown",
"name": "TOWARDS",
"options": [
[Blockly.Msg.MOTION_POINTTOWARDS_POINTER, '_mouse_'],
[Blockly.Msg.MOTION_POINTTOWARDS_RANDOM, '_random_']
]
... | javascript | function() {
this.jsonInit({
"message0": "%1",
"args0": [
{
"type": "field_dropdown",
"name": "TOWARDS",
"options": [
[Blockly.Msg.MOTION_POINTTOWARDS_POINTER, '_mouse_'],
[Blockly.Msg.MOTION_POINTTOWARDS_RANDOM, '_random_']
]
... | [
"function",
"(",
")",
"{",
"this",
".",
"jsonInit",
"(",
"{",
"\"message0\"",
":",
"\"%1\"",
",",
"\"args0\"",
":",
"[",
"{",
"\"type\"",
":",
"\"field_dropdown\"",
",",
"\"name\"",
":",
"\"TOWARDS\"",
",",
"\"options\"",
":",
"[",
"[",
"Blockly",
".",
"... | Point towards drop-down menu.
@this Blockly.Block | [
"Point",
"towards",
"drop",
"-",
"down",
"menu",
"."
] | 455b2a854435c0a67da1da92320ddc3ec3e2b799 | https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/blocks_vertical/motion.js#L128-L146 | train | Block for
. | [
30522,
3853,
1006,
1007,
1063,
2023,
1012,
1046,
3385,
5498,
2102,
1006,
1063,
1000,
4471,
2692,
1000,
1024,
1000,
1003,
1015,
1000,
1010,
1000,
12098,
5620,
2692,
1000,
1024,
1031,
1063,
1000,
2828,
1000,
1024,
1000,
2492,
1035,
4530,
76... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
websockets/ws | lib/buffer-util.js | toArrayBuffer | function toArrayBuffer(buf) {
if (buf.byteLength === buf.buffer.byteLength) {
return buf.buffer;
}
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
} | javascript | function toArrayBuffer(buf) {
if (buf.byteLength === buf.buffer.byteLength) {
return buf.buffer;
}
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
} | [
"function",
"toArrayBuffer",
"(",
"buf",
")",
"{",
"if",
"(",
"buf",
".",
"byteLength",
"===",
"buf",
".",
"buffer",
".",
"byteLength",
")",
"{",
"return",
"buf",
".",
"buffer",
";",
"}",
"return",
"buf",
".",
"buffer",
".",
"slice",
"(",
"buf",
".",... | Converts a buffer to an `ArrayBuffer`.
@param {Buffer} buf The buffer to convert
@return {ArrayBuffer} Converted buffer
@public | [
"Converts",
"a",
"buffer",
"to",
"an",
"ArrayBuffer",
"."
] | 995c527c87d0d4833d8093c18dcfa2e4a41d9582 | https://github.com/websockets/ws/blob/995c527c87d0d4833d8093c18dcfa2e4a41d9582/lib/buffer-util.js#L67-L73 | train | Converts a buffer to an array of bytes | [
30522,
3853,
2000,
2906,
9447,
8569,
12494,
1006,
20934,
2546,
1007,
1063,
2065,
1006,
20934,
2546,
1012,
24880,
7770,
13512,
2232,
1027,
1027,
1027,
20934,
2546,
1012,
17698,
1012,
24880,
7770,
13512,
2232,
1007,
1063,
2709,
20934,
2546,
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 | fuzzynum | function fuzzynum(s) {
var v = Number(s);
if(!isNaN(v)) return v;
var wt = 1;
var ss = s.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g, function() { wt *= 100; return "";});
if(!isNaN(v = Number(ss))) return v / wt;
ss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;});
if(!... | javascript | function fuzzynum(s) {
var v = Number(s);
if(!isNaN(v)) return v;
var wt = 1;
var ss = s.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g, function() { wt *= 100; return "";});
if(!isNaN(v = Number(ss))) return v / wt;
ss = ss.replace(/[(](.*)[)]/,function($$, $1) { wt = -wt; return $1;});
if(!... | [
"function",
"fuzzynum",
"(",
"s",
")",
"{",
"var",
"v",
"=",
"Number",
"(",
"s",
")",
";",
"if",
"(",
"!",
"isNaN",
"(",
"v",
")",
")",
"return",
"v",
";",
"var",
"wt",
"=",
"1",
";",
"var",
"ss",
"=",
"s",
".",
"replace",
"(",
"/",
"([\\d]... | /* TODO: stress test | [
"/",
"*",
"TODO",
":",
"stress",
"test"
] | 9a6d8a1d3d80c78dad5201fb389316f935279cdc | https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L2748-L2757 | train | Fuzzynum function | [
30522,
3853,
18001,
19172,
1006,
1055,
1007,
1063,
13075,
1058,
1027,
2193,
1006,
1055,
1007,
1025,
2065,
1006,
999,
3475,
2319,
1006,
1058,
1007,
1007,
2709,
1058,
1025,
13075,
1059,
2102,
1027,
1015,
1025,
13075,
7020,
1027,
1055,
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/project/WorkingSetView.js | useIconProviders | function useIconProviders(data, $element) {
_iconProviders.forEach(function (provider) {
var icon = provider(data);
if (icon) {
$element.prepend($(icon));
}
});
} | javascript | function useIconProviders(data, $element) {
_iconProviders.forEach(function (provider) {
var icon = provider(data);
if (icon) {
$element.prepend($(icon));
}
});
} | [
"function",
"useIconProviders",
"(",
"data",
",",
"$element",
")",
"{",
"_iconProviders",
".",
"forEach",
"(",
"function",
"(",
"provider",
")",
"{",
"var",
"icon",
"=",
"provider",
"(",
"data",
")",
";",
"if",
"(",
"icon",
")",
"{",
"$element",
".",
"... | /*
To be used by other modules/default-extensions which needs to borrow working set entry icons
@param {!object} data - contains file info {fullPath, name, isFile}
@param {!jQuery} $element - jquery fn wrap for the list item | [
"/",
"*",
"To",
"be",
"used",
"by",
"other",
"modules",
"/",
"default",
"-",
"extensions",
"which",
"needs",
"to",
"borrow",
"working",
"set",
"entry",
"icons"
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/WorkingSetView.js#L1480-L1487 | train | Use icon providers | [
30522,
3853,
2224,
28524,
21572,
17258,
2545,
1006,
2951,
1010,
1002,
5783,
1007,
1063,
1035,
12696,
21572,
17258,
2545,
1012,
18921,
6776,
1006,
3853,
1006,
10802,
1007,
1063,
13075,
12696,
1027,
10802,
1006,
2951,
1007,
1025,
2065,
1006,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fex-team/webuploader | dist/webuploader.withoutimage.js | function( name, callback, context ) {
var me = this;
if ( !callback ) {
return me;
}
eachEvent( name, callback, function( name, callback ) {
var once = function() {
me.off( name,... | javascript | function( name, callback, context ) {
var me = this;
if ( !callback ) {
return me;
}
eachEvent( name, callback, function( name, callback ) {
var once = function() {
me.off( name,... | [
"function",
"(",
"name",
",",
"callback",
",",
"context",
")",
"{",
"var",
"me",
"=",
"this",
";",
"if",
"(",
"!",
"callback",
")",
"{",
"return",
"me",
";",
"}",
"eachEvent",
"(",
"name",
",",
"callback",
",",
"function",
"(",
"name",
",",
"callba... | 绑定事件,且当handler执行完后,自动解除绑定。
@method once
@grammar once( name, callback[, context] ) => self
@param {String} name 事件名
@param {Function} callback 事件处理器
@param {Object} [context] 事件处理器的上下文。
@return {self} 返回自身,方便链式
@chainable | [
"绑定事件,且当handler执行完后,自动解除绑定。"
] | 7094e4476c5af3b06993d91dde2d223200b9feb7 | https://github.com/fex-team/webuploader/blob/7094e4476c5af3b06993d91dde2d223200b9feb7/dist/webuploader.withoutimage.js#L614-L632 | train | add event listener | [
30522,
3853,
1006,
2171,
1010,
2655,
5963,
1010,
6123,
1007,
1063,
13075,
2033,
1027,
2023,
1025,
2065,
1006,
999,
2655,
5963,
1007,
1063,
2709,
2033,
1025,
1065,
2169,
18697,
3372,
1006,
2171,
1010,
2655,
5963,
1010,
3853,
1006,
2171,
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... | |
SeleniumHQ/selenium | javascript/jsunit/app/xbDebug.js | xbDebugApplyFunction | function xbDebugApplyFunction(funcname, funcref, thisref, argumentsref)
{
var rv;
if (!funcref)
{
alert('xbDebugApplyFunction: funcref is null');
}
if (typeof(funcref.apply) != 'undefined')
return funcref.apply(thisref, argumentsref);
var applyexpr = 'thisref.xbDebug_orig_' + ... | javascript | function xbDebugApplyFunction(funcname, funcref, thisref, argumentsref)
{
var rv;
if (!funcref)
{
alert('xbDebugApplyFunction: funcref is null');
}
if (typeof(funcref.apply) != 'undefined')
return funcref.apply(thisref, argumentsref);
var applyexpr = 'thisref.xbDebug_orig_' + ... | [
"function",
"xbDebugApplyFunction",
"(",
"funcname",
",",
"funcref",
",",
"thisref",
",",
"argumentsref",
")",
"{",
"var",
"rv",
";",
"if",
"(",
"!",
"funcref",
")",
"{",
"alert",
"(",
"'xbDebugApplyFunction: funcref is null'",
")",
";",
"}",
"if",
"(",
"typ... | emulate functionref.apply for IE mac and IE win < 5.5 | [
"emulate",
"functionref",
".",
"apply",
"for",
"IE",
"mac",
"and",
"IE",
"win",
"<",
"5",
".",
"5"
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/jsunit/app/xbDebug.js#L118-L146 | train | This function is called by xbDebugApplyFunction to apply a function to a specific object | [
30522,
3853,
1060,
2497,
3207,
8569,
3654,
9397,
2135,
11263,
27989,
1006,
4569,
2278,
18442,
1010,
4569,
16748,
2546,
1010,
2023,
2890,
2546,
1010,
9918,
2890,
2546,
1007,
1063,
13075,
27634,
1025,
2065,
1006,
999,
4569,
16748,
2546,
1007,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
angular/material | src/components/gridList/grid-list.js | GridLayoutFactory | function GridLayoutFactory($mdUtil) {
var defaultAnimator = GridTileAnimator;
/**
* Set the reflow animator callback
*/
GridLayout.animateWith = function(customAnimator) {
defaultAnimator = !angular.isFunction(customAnimator) ? GridTileAnimator : customAnimator;
};
return GridLayout;
/**
* P... | javascript | function GridLayoutFactory($mdUtil) {
var defaultAnimator = GridTileAnimator;
/**
* Set the reflow animator callback
*/
GridLayout.animateWith = function(customAnimator) {
defaultAnimator = !angular.isFunction(customAnimator) ? GridTileAnimator : customAnimator;
};
return GridLayout;
/**
* P... | [
"function",
"GridLayoutFactory",
"(",
"$mdUtil",
")",
"{",
"var",
"defaultAnimator",
"=",
"GridTileAnimator",
";",
"/**\n * Set the reflow animator callback\n */",
"GridLayout",
".",
"animateWith",
"=",
"function",
"(",
"customAnimator",
")",
"{",
"defaultAnimator",
"... | /* @ngInject | [
"/",
"*"
] | 84ac558674e73958be84312444c48d9f823f6684 | https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/gridList/grid-list.js#L466-L660 | train | Creates a new GridLayout instance. | [
30522,
3853,
8370,
8485,
5833,
21450,
1006,
1002,
9108,
21823,
2140,
1007,
1063,
13075,
12398,
7088,
18900,
2953,
1027,
8370,
15286,
7088,
18900,
2953,
1025,
1013,
1008,
1008,
1008,
2275,
1996,
25416,
8261,
25132,
2655,
5963,
1008,
1013,
83... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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-unexpected-multiline.js | checkForBreakAfter | function checkForBreakAfter(node, messageId) {
const openParen = sourceCode.getTokenAfter(node, astUtils.isNotClosingParenToken);
const nodeExpressionEnd = sourceCode.getTokenBefore(openParen);
if (openParen.loc.start.line !== nodeExpressionEnd.loc.end.line) {
contex... | javascript | function checkForBreakAfter(node, messageId) {
const openParen = sourceCode.getTokenAfter(node, astUtils.isNotClosingParenToken);
const nodeExpressionEnd = sourceCode.getTokenBefore(openParen);
if (openParen.loc.start.line !== nodeExpressionEnd.loc.end.line) {
contex... | [
"function",
"checkForBreakAfter",
"(",
"node",
",",
"messageId",
")",
"{",
"const",
"openParen",
"=",
"sourceCode",
".",
"getTokenAfter",
"(",
"node",
",",
"astUtils",
".",
"isNotClosingParenToken",
")",
";",
"const",
"nodeExpressionEnd",
"=",
"sourceCode",
".",
... | Check to see if there is a newline between the node and the following open bracket
line's expression
@param {ASTNode} node The node to check.
@param {string} messageId The error messageId to use.
@returns {void}
@private | [
"Check",
"to",
"see",
"if",
"there",
"is",
"a",
"newline",
"between",
"the",
"node",
"and",
"the",
"following",
"open",
"bracket",
"line",
"s",
"expression"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-unexpected-multiline.js#L51-L58 | train | Check if a break is after a break | [
30522,
3853,
4638,
29278,
23890,
10354,
3334,
1006,
13045,
1010,
4471,
3593,
1007,
1063,
9530,
3367,
2330,
19362,
2368,
1027,
3120,
16044,
1012,
2131,
18715,
8189,
6199,
2121,
1006,
13045,
1010,
2004,
8525,
3775,
4877,
1012,
3475,
4140,
204... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jhipster/generator-jhipster | generators/utils.js | classify | function classify(string) {
string = string.replace(/[\W_](\w)/g, match => ` ${match[1].toUpperCase()}`).replace(/\s/g, '');
return string.charAt(0).toUpperCase() + string.slice(1);
} | javascript | function classify(string) {
string = string.replace(/[\W_](\w)/g, match => ` ${match[1].toUpperCase()}`).replace(/\s/g, '');
return string.charAt(0).toUpperCase() + string.slice(1);
} | [
"function",
"classify",
"(",
"string",
")",
"{",
"string",
"=",
"string",
".",
"replace",
"(",
"/",
"[\\W_](\\w)",
"/",
"g",
",",
"match",
"=>",
"`",
"${",
"match",
"[",
"1",
"]",
".",
"toUpperCase",
"(",
")",
"}",
"`",
")",
".",
"replace",
"(",
... | Convenient function to convert string into valid java class name
Note: _.classify uses _.titleize which lowercase the string,
so if the user chooses a proper ClassName it will not rename properly
@param string string to 'class'-ify
@returns {string} 'class'-ified string | [
"Convenient",
"function",
"to",
"convert",
"string",
"into",
"valid",
"java",
"class",
"name",
"Note",
":",
"_",
".",
"classify",
"uses",
"_",
".",
"titleize",
"which",
"lowercase",
"the",
"string",
"so",
"if",
"the",
"user",
"chooses",
"a",
"proper",
"Cla... | f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff | https://github.com/jhipster/generator-jhipster/blob/f76fa8de0818ce6bda6c7b1455942e2a9b0ae3ff/generators/utils.js#L140-L143 | train | Classify a string | [
30522,
3853,
26268,
1006,
5164,
1007,
1063,
5164,
1027,
5164,
1012,
5672,
1006,
1013,
1031,
1032,
1059,
1035,
1033,
1006,
1032,
1059,
1007,
1013,
1043,
1010,
2674,
1027,
1028,
1036,
1002,
1063,
2674,
1031,
1015,
1033,
1012,
2000,
29547,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
GeekyAnts/vue-native-core | packages/vue-native-scripts/src/scripts/compiler.js | parseTemplate | function parseTemplate(code) {
const obj = compiler.nativeCompiler(code);
return {
import: obj.importCode,
render: `const ${constants.TEMPLATE_RENDER} = ${obj.renderCode}`
};
} | javascript | function parseTemplate(code) {
const obj = compiler.nativeCompiler(code);
return {
import: obj.importCode,
render: `const ${constants.TEMPLATE_RENDER} = ${obj.renderCode}`
};
} | [
"function",
"parseTemplate",
"(",
"code",
")",
"{",
"const",
"obj",
"=",
"compiler",
".",
"nativeCompiler",
"(",
"code",
")",
";",
"return",
"{",
"import",
":",
"obj",
".",
"importCode",
",",
"render",
":",
"`",
"${",
"constants",
".",
"TEMPLATE_RENDER",
... | function remove(name) { fs.unlink(name.replace(FILTER, '.js'), function(err) { if (err) { throw err; } }); } | [
"function",
"remove",
"(",
"name",
")",
"{",
"fs",
".",
"unlink",
"(",
"name",
".",
"replace",
"(",
"FILTER",
".",
"js",
")",
"function",
"(",
"err",
")",
"{",
"if",
"(",
"err",
")",
"{",
"throw",
"err",
";",
"}",
"}",
")",
";",
"}"
] | a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e | https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/packages/vue-native-scripts/src/scripts/compiler.js#L254-L260 | train | Parse a template | [
30522,
3853,
11968,
13462,
6633,
15725,
1006,
3642,
1007,
1063,
9530,
3367,
27885,
3501,
1027,
21624,
1012,
3128,
9006,
22090,
2099,
1006,
3642,
1007,
1025,
2709,
1063,
12324,
1024,
27885,
3501,
1012,
12324,
16044,
1010,
17552,
1024,
1036,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/vuepress | packages/@vuepress/core/lib/node/build/index.js | compile | function compile (config) {
return new Promise((resolve, reject) => {
webpack(config, (err, stats) => {
if (err) {
return reject(err)
}
if (stats.hasErrors()) {
stats.toJson().errors.forEach(err => {
console.error(err)
})
reject(new Error(`Failed to comp... | javascript | function compile (config) {
return new Promise((resolve, reject) => {
webpack(config, (err, stats) => {
if (err) {
return reject(err)
}
if (stats.hasErrors()) {
stats.toJson().errors.forEach(err => {
console.error(err)
})
reject(new Error(`Failed to comp... | [
"function",
"compile",
"(",
"config",
")",
"{",
"return",
"new",
"Promise",
"(",
"(",
"resolve",
",",
"reject",
")",
"=>",
"{",
"webpack",
"(",
"config",
",",
"(",
"err",
",",
"stats",
")",
"=>",
"{",
"if",
"(",
"err",
")",
"{",
"return",
"reject",... | Compile a webpack application and return stats json.
@param {Object} config
@returns {Promise<Object>} | [
"Compile",
"a",
"webpack",
"application",
"and",
"return",
"stats",
"json",
"."
] | 15784acc0cf2e87de3c147895b2c3977b0195d78 | https://github.com/vuejs/vuepress/blob/15784acc0cf2e87de3c147895b2c3977b0195d78/packages/@vuepress/core/lib/node/build/index.js#L176-L197 | train | Compile the webpack module | [
30522,
3853,
4012,
22090,
1006,
9530,
8873,
2290,
1007,
1063,
2709,
2047,
4872,
1006,
1006,
10663,
1010,
15454,
1007,
1027,
1028,
1063,
4773,
23947,
1006,
9530,
8873,
2290,
1010,
1006,
9413,
2099,
1010,
26319,
1007,
1027,
1028,
1063,
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... |
firebase/firebaseui-web | javascript/widgets/handler/phonesigninfinish.js | function(error) {
if (error['name'] && error['name'] == 'cancel') {
// Close dialog.
component.dismissDialog();
return;
}
// Get error message.
var errorMessage =
firebaseui.auth.widget.handler.common.getErrorMessage(error);
// Some error... | javascript | function(error) {
if (error['name'] && error['name'] == 'cancel') {
// Close dialog.
component.dismissDialog();
return;
}
// Get error message.
var errorMessage =
firebaseui.auth.widget.handler.common.getErrorMessage(error);
// Some error... | [
"function",
"(",
"error",
")",
"{",
"if",
"(",
"error",
"[",
"'name'",
"]",
"&&",
"error",
"[",
"'name'",
"]",
"==",
"'cancel'",
")",
"{",
"// Close dialog.",
"component",
".",
"dismissDialog",
"(",
")",
";",
"return",
";",
"}",
"// Get error message.",
... | On code verification failure. | [
"On",
"code",
"verification",
"failure",
"."
] | c10aa51e38aeb38dc63baa22b48cd6690c2be087 | https://github.com/firebase/firebaseui-web/blob/c10aa51e38aeb38dc63baa22b48cd6690c2be087/javascript/widgets/handler/phonesigninfinish.js#L173-L217 | train | Handle phone sign in failure. | [
30522,
3853,
1006,
7561,
1007,
1063,
2065,
1006,
7561,
1031,
1005,
2171,
1005,
1033,
1004,
1004,
7561,
1031,
1005,
2171,
1005,
1033,
1027,
1027,
1005,
17542,
1005,
1007,
1063,
1013,
1013,
2485,
13764,
8649,
1012,
6922,
1012,
19776,
27184,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/build.js | findMsbuild | function findMsbuild () {
log.verbose('could not find "msbuild.exe" in PATH - finding location in registry')
var notfoundErr = 'Can\'t find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?'
var cmd = 'reg query "HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions" /s'
if (process.ar... | javascript | function findMsbuild () {
log.verbose('could not find "msbuild.exe" in PATH - finding location in registry')
var notfoundErr = 'Can\'t find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?'
var cmd = 'reg query "HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions" /s'
if (process.ar... | [
"function",
"findMsbuild",
"(",
")",
"{",
"log",
".",
"verbose",
"(",
"'could not find \"msbuild.exe\" in PATH - finding location in registry'",
")",
"var",
"notfoundErr",
"=",
"'Can\\'t find \"msbuild.exe\". Do you have Microsoft Visual Studio C++ 2008+ installed?'",
"var",
"cmd",
... | Search for the location of "msbuild.exe" file on Windows. | [
"Search",
"for",
"the",
"location",
"of",
"msbuild",
".",
"exe",
"file",
"on",
"Windows",
"."
] | 721eb691cf15556cc2700eda0558d5bad5f84232 | https://github.com/nodejs/node-gyp/blob/721eb691cf15556cc2700eda0558d5bad5f84232/lib/build.js#L126-L180 | train | find msbuild. exe | [
30522,
3853,
2424,
5244,
8569,
4014,
2094,
1006,
1007,
1063,
8833,
1012,
12034,
9232,
1006,
1005,
2071,
2025,
2424,
1000,
5796,
8569,
4014,
2094,
1012,
4654,
2063,
1000,
1999,
4130,
1011,
4531,
3295,
1999,
15584,
1005,
1007,
13075,
2025,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sass/node-sass | lib/extensions.js | getHumanEnvironment | function getHumanEnvironment(env) {
var binding = env.replace(/_binding\.node$/, ''),
parts = binding.split('-'),
platform = getHumanPlatform(parts[0]),
arch = getHumanArchitecture(parts[1]),
runtime = getHumanNodeVersion(parts[2]);
if (parts.length !== 3) {
return 'Unknown environment (' + bin... | javascript | function getHumanEnvironment(env) {
var binding = env.replace(/_binding\.node$/, ''),
parts = binding.split('-'),
platform = getHumanPlatform(parts[0]),
arch = getHumanArchitecture(parts[1]),
runtime = getHumanNodeVersion(parts[2]);
if (parts.length !== 3) {
return 'Unknown environment (' + bin... | [
"function",
"getHumanEnvironment",
"(",
"env",
")",
"{",
"var",
"binding",
"=",
"env",
".",
"replace",
"(",
"/",
"_binding\\.node$",
"/",
",",
"''",
")",
",",
"parts",
"=",
"binding",
".",
"split",
"(",
"'-'",
")",
",",
"platform",
"=",
"getHumanPlatform... | Get a human readable description of where node-sass is running to support
user error reporting when something goes wrong
@param {string} env - The name of the native bindings that is to be parsed
@return {string} A description of what os, architecture, and Node version
that is being run
@api public | [
"Get",
"a",
"human",
"readable",
"description",
"of",
"where",
"node",
"-",
"sass",
"is",
"running",
"to",
"support",
"user",
"error",
"reporting",
"when",
"something",
"goes",
"wrong"
] | 0c1a49eefa37544d16041c5fe5b2e3d9168004b7 | https://github.com/sass/node-sass/blob/0c1a49eefa37544d16041c5fe5b2e3d9168004b7/lib/extensions.js#L95-L121 | train | Get a human readable environment | [
30522,
3853,
2131,
28600,
7231,
2078,
21663,
2239,
3672,
1006,
4372,
2615,
1007,
1063,
13075,
8031,
1027,
4372,
2615,
1012,
5672,
1006,
1013,
1035,
8031,
1032,
1012,
13045,
1002,
1013,
1010,
1005,
1005,
1007,
1010,
3033,
1027,
8031,
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/project/FileSyncManager.js | syncOpenDocuments | function syncOpenDocuments(title) {
title = title || Strings.EXT_MODIFIED_TITLE;
// We can become "re-entrant" if the user leaves & then returns to Brackets before we're
// done -- easy if a prompt dialog is left open. Since the user may have left Brackets to
// revert some of the disk... | javascript | function syncOpenDocuments(title) {
title = title || Strings.EXT_MODIFIED_TITLE;
// We can become "re-entrant" if the user leaves & then returns to Brackets before we're
// done -- easy if a prompt dialog is left open. Since the user may have left Brackets to
// revert some of the disk... | [
"function",
"syncOpenDocuments",
"(",
"title",
")",
"{",
"title",
"=",
"title",
"||",
"Strings",
".",
"EXT_MODIFIED_TITLE",
";",
"// We can become \"re-entrant\" if the user leaves & then returns to Brackets before we're",
"// done -- easy if a prompt dialog is left open. Since the use... | Check to see whether any open files have been modified by an external app since the last time
Brackets synced up with the copy on disk (either by loading or saving the file). For clean
files, we silently upate the editor automatically. For files with unsaved changes, we prompt
the user.
@param {string} title Title to ... | [
"Check",
"to",
"see",
"whether",
"any",
"open",
"files",
"have",
"been",
"modified",
"by",
"an",
"external",
"app",
"since",
"the",
"last",
"time",
"Brackets",
"synced",
"up",
"with",
"the",
"copy",
"on",
"disk",
"(",
"either",
"by",
"loading",
"or",
"sa... | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/FileSyncManager.js#L404-L492 | train | Syncs all open files for modifications | [
30522,
3853,
26351,
26915,
3527,
24894,
11187,
1006,
2516,
1007,
1063,
2516,
1027,
2516,
1064,
1064,
7817,
1012,
4654,
2102,
1035,
6310,
1035,
2516,
1025,
1013,
1013,
2057,
2064,
2468,
1000,
2128,
1011,
4372,
6494,
3372,
1000,
2065,
1996,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ecomfe/zrender | src/tool/path.js | createPathProxyFromString | function createPathProxyFromString(data) {
if (!data) {
return new PathProxy();
}
// var data = data.replace(/-/g, ' -')
// .replace(/ /g, ' ')
// .replace(/ /g, ',')
// .replace(/,,/g, ',');
// var n;
// create pipes so that we can split the data
// for (n = 0... | javascript | function createPathProxyFromString(data) {
if (!data) {
return new PathProxy();
}
// var data = data.replace(/-/g, ' -')
// .replace(/ /g, ' ')
// .replace(/ /g, ',')
// .replace(/,,/g, ',');
// var n;
// create pipes so that we can split the data
// for (n = 0... | [
"function",
"createPathProxyFromString",
"(",
"data",
")",
"{",
"if",
"(",
"!",
"data",
")",
"{",
"return",
"new",
"PathProxy",
"(",
")",
";",
"}",
"// var data = data.replace(/-/g, ' -')",
"// .replace(/ /g, ' ')",
"// .replace(/ /g, ',')",
"// .replace(/,,/... | var valueSplitReg = /[\s,]+/; | [
"var",
"valueSplitReg",
"=",
"/",
"[",
"\\",
"s",
"]",
"+",
"/",
";"
] | 30321b57cba3149c30eacb0c1e18276f0f001b9f | https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/tool/path.js#L90-L356 | train | Create PathProxy from string | [
30522,
3853,
3443,
15069,
21572,
18037,
19699,
30524,
1043,
1010,
1005,
1005,
1007,
1013,
1013,
1012,
5672,
1006,
1013,
1013,
1043,
1010,
1005,
1010,
1005,
1007,
1013,
1013,
1012,
5672,
1006,
1013,
1010,
1010,
1013,
1043,
1010,
1005,
1010,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jaredpalmer/razzle | packages/razzle/scripts/build.js | compile | function compile(config, cb) {
let compiler;
try {
compiler = webpack(config);
} catch (e) {
printErrors('Failed to compile.', [e]);
process.exit(1);
}
compiler.run((err, stats) => {
cb(err, stats);
});
} | javascript | function compile(config, cb) {
let compiler;
try {
compiler = webpack(config);
} catch (e) {
printErrors('Failed to compile.', [e]);
process.exit(1);
}
compiler.run((err, stats) => {
cb(err, stats);
});
} | [
"function",
"compile",
"(",
"config",
",",
"cb",
")",
"{",
"let",
"compiler",
";",
"try",
"{",
"compiler",
"=",
"webpack",
"(",
"config",
")",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"printErrors",
"(",
"'Failed to compile.'",
",",
"[",
"e",
"]",
")",... | Wrap webpack compile in a try catch. | [
"Wrap",
"webpack",
"compile",
"in",
"a",
"try",
"catch",
"."
] | 6f12cb8a84a1ef1b8491c36958a8797f97407312 | https://github.com/jaredpalmer/razzle/blob/6f12cb8a84a1ef1b8491c36958a8797f97407312/packages/razzle/scripts/build.js#L177-L188 | train | Compile the webpack module. | [
30522,
3853,
4012,
22090,
1006,
9530,
8873,
2290,
1010,
17324,
1007,
1063,
2292,
21624,
1025,
3046,
1063,
21624,
1027,
4773,
23947,
1006,
9530,
8873,
2290,
1007,
1025,
1065,
4608,
1006,
1041,
1007,
1063,
15041,
29165,
2015,
1006,
1005,
3478... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eslint/eslint | lib/rules/no-extra-parens.js | isNewExpressionWithParens | function isNewExpressionWithParens(newExpression) {
const lastToken = sourceCode.getLastToken(newExpression);
const penultimateToken = sourceCode.getTokenBefore(lastToken);
return newExpression.arguments.length > 0 || astUtils.isOpeningParenToken(penultimateToken) && astUtils.isClos... | javascript | function isNewExpressionWithParens(newExpression) {
const lastToken = sourceCode.getLastToken(newExpression);
const penultimateToken = sourceCode.getTokenBefore(lastToken);
return newExpression.arguments.length > 0 || astUtils.isOpeningParenToken(penultimateToken) && astUtils.isClos... | [
"function",
"isNewExpressionWithParens",
"(",
"newExpression",
")",
"{",
"const",
"lastToken",
"=",
"sourceCode",
".",
"getLastToken",
"(",
"newExpression",
")",
";",
"const",
"penultimateToken",
"=",
"sourceCode",
".",
"getTokenBefore",
"(",
"lastToken",
")",
";",
... | Determines if a constructor function is newed-up with parens
@param {ASTNode} newExpression - The NewExpression node to be checked.
@returns {boolean} True if the constructor is called with parens.
@private | [
"Determines",
"if",
"a",
"constructor",
"function",
"is",
"newed",
"-",
"up",
"with",
"parens"
] | bc0819c94aad14f7fad3cbc2338ea15658b0f272 | https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-extra-parens.js#L190-L195 | train | Check if newExpression has parentheses | [
30522,
3853,
3475,
7974,
10288,
20110,
3258,
24415,
19362,
6132,
1006,
2047,
10288,
20110,
3258,
1007,
1063,
9530,
3367,
2197,
18715,
2368,
1027,
3120,
16044,
1012,
2131,
8523,
9284,
7520,
1006,
2047,
10288,
20110,
3258,
1007,
1025,
9530,
3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/base/Log.js | log | function log(iLevel, sMessage, sDetails, sComponent, fnSupportInfo) {
if (!fnSupportInfo && !sComponent && typeof sDetails === "function") {
fnSupportInfo = sDetails;
sDetails = "";
}
if (!fnSupportInfo && typeof sComponent === "function") {
fnSupportInfo = sComponent;
sComponent = "";
}
sCompone... | javascript | function log(iLevel, sMessage, sDetails, sComponent, fnSupportInfo) {
if (!fnSupportInfo && !sComponent && typeof sDetails === "function") {
fnSupportInfo = sDetails;
sDetails = "";
}
if (!fnSupportInfo && typeof sComponent === "function") {
fnSupportInfo = sComponent;
sComponent = "";
}
sCompone... | [
"function",
"log",
"(",
"iLevel",
",",
"sMessage",
",",
"sDetails",
",",
"sComponent",
",",
"fnSupportInfo",
")",
"{",
"if",
"(",
"!",
"fnSupportInfo",
"&&",
"!",
"sComponent",
"&&",
"typeof",
"sDetails",
"===",
"\"function\"",
")",
"{",
"fnSupportInfo",
"="... | Creates a new log entry depending on its level and component.
If the given level is higher than the max level for the given component
(or higher than the global level, if no component is given),
then no entry is created and <code>undefined</code> is returned.
If an <code>Error</code> is passed via <code>sDetails</cod... | [
"Creates",
"a",
"new",
"log",
"entry",
"depending",
"on",
"its",
"level",
"and",
"component",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/base/Log.js#L359-L443 | train | Logs to the console. | [
30522,
3853,
8833,
1006,
17869,
15985,
1010,
15488,
7971,
4270,
1010,
17371,
12928,
12146,
1010,
8040,
25377,
5643,
3372,
1010,
1042,
3619,
6279,
6442,
2378,
14876,
1007,
1063,
2065,
1006,
999,
1042,
3619,
6279,
6442,
2378,
14876,
1004,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/extensibility/ExtensionManager.js | removeUpdate | function removeUpdate(id) {
var installationResult = _idsToUpdate[id];
if (!installationResult) {
return;
}
if (installationResult.localPath && !installationResult.keepFile) {
FileSystem.getFileForPath(installationResult.localPath).unlink();
}
dele... | javascript | function removeUpdate(id) {
var installationResult = _idsToUpdate[id];
if (!installationResult) {
return;
}
if (installationResult.localPath && !installationResult.keepFile) {
FileSystem.getFileForPath(installationResult.localPath).unlink();
}
dele... | [
"function",
"removeUpdate",
"(",
"id",
")",
"{",
"var",
"installationResult",
"=",
"_idsToUpdate",
"[",
"id",
"]",
";",
"if",
"(",
"!",
"installationResult",
")",
"{",
"return",
";",
"}",
"if",
"(",
"installationResult",
".",
"localPath",
"&&",
"!",
"insta... | Removes the mark for an extension to be updated on restart. Also deletes the
downloaded package file.
@param {string} id The id of the extension for which the update is being removed | [
"Removes",
"the",
"mark",
"for",
"an",
"extension",
"to",
"be",
"updated",
"on",
"restart",
".",
"Also",
"deletes",
"the",
"downloaded",
"package",
"file",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/ExtensionManager.js#L605-L615 | train | Remove an update from the cache | [
30522,
3853,
6366,
6279,
13701,
1006,
8909,
1007,
1063,
13075,
8272,
6072,
11314,
1027,
1035,
8909,
16033,
6279,
13701,
1031,
8909,
1033,
1025,
2065,
1006,
999,
8272,
6072,
11314,
1007,
1063,
2709,
1025,
1065,
2065,
1006,
8272,
6072,
11314,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
aframevr/aframe | src/systems/camera.js | function (cameraEl) {
var cameraData;
var sceneEl = this.el.sceneEl;
this.numUserCamerasChecked++;
// Already found one.
if (this.initialCameraFound) { return; }
// Check if camera is appropriate for being the initial camera.
cameraData = cameraEl.getAttribute('camera');
if (!cameraDat... | javascript | function (cameraEl) {
var cameraData;
var sceneEl = this.el.sceneEl;
this.numUserCamerasChecked++;
// Already found one.
if (this.initialCameraFound) { return; }
// Check if camera is appropriate for being the initial camera.
cameraData = cameraEl.getAttribute('camera');
if (!cameraDat... | [
"function",
"(",
"cameraEl",
")",
"{",
"var",
"cameraData",
";",
"var",
"sceneEl",
"=",
"this",
".",
"el",
".",
"sceneEl",
";",
"this",
".",
"numUserCamerasChecked",
"++",
";",
"// Already found one.",
"if",
"(",
"this",
".",
"initialCameraFound",
")",
"{",
... | Check if a user-defined camera entity is appropriate to be initial camera.
(active + non-spectator).
Keep track of the number of cameras we checked and whether we found one. | [
"Check",
"if",
"a",
"user",
"-",
"defined",
"camera",
"entity",
"is",
"appropriate",
"to",
"be",
"initial",
"camera",
".",
"(",
"active",
"+",
"non",
"-",
"spectator",
")",
"."
] | 24acc78a7299a4cdfe3ef617f4d40ddf6275c992 | https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/systems/camera.js#L78-L99 | train | Find the camera element that is appropriate for the user. | [
30522,
3853,
1006,
4950,
2884,
1007,
1063,
13075,
4950,
2850,
2696,
1025,
13075,
3496,
2884,
1027,
2023,
1012,
3449,
1012,
3496,
2884,
1025,
2023,
1012,
16371,
7606,
2121,
28727,
24140,
5403,
18141,
1009,
1009,
1025,
1013,
1013,
2525,
2179,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/support/apps/contentbrowser/controller/LayerContentMaster.controller.js | function () {
var oRouter = UIComponent.getRouterFor(this);
if (!this.sNamespace || this.sNamespace === "/") {
oRouter.navTo("Layers");
} else {
var sSplittedNamespace = this.sNamespace.split("/");
sSplittedNamespace.splice(-2, 1);
var sTargetNamespace = sSplittedNamespace.join("/");
oRoute... | javascript | function () {
var oRouter = UIComponent.getRouterFor(this);
if (!this.sNamespace || this.sNamespace === "/") {
oRouter.navTo("Layers");
} else {
var sSplittedNamespace = this.sNamespace.split("/");
sSplittedNamespace.splice(-2, 1);
var sTargetNamespace = sSplittedNamespace.join("/");
oRoute... | [
"function",
"(",
")",
"{",
"var",
"oRouter",
"=",
"UIComponent",
".",
"getRouterFor",
"(",
"this",
")",
";",
"if",
"(",
"!",
"this",
".",
"sNamespace",
"||",
"this",
".",
"sNamespace",
"===",
"\"/\"",
")",
"{",
"oRouter",
".",
"navTo",
"(",
"\"Layers\"... | Handles the back navigation in the master list;
Calculates the parent namespace, then navigates to the target.
@public | [
"Handles",
"the",
"back",
"navigation",
"in",
"the",
"master",
"list",
";",
"Calculates",
"the",
"parent",
"namespace",
"then",
"navigates",
"to",
"the",
"target",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js#L153-L163 | train | Navigates to the Layer s content master | [
30522,
3853,
1006,
1007,
1063,
13075,
20298,
19901,
1027,
21318,
9006,
29513,
3372,
1012,
2131,
22494,
3334,
29278,
1006,
2023,
1007,
1025,
2065,
1006,
999,
2023,
1012,
1055,
18442,
23058,
1064,
1064,
2023,
1012,
1055,
18442,
23058,
1027,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/History.js | function(sValue) {
var aHistory = this._initHistory();
// ensure it is not contained twice -> remove
for (var i = 0; i < aHistory.length; i++) {
if (aHistory[i] === sValue) {
aHistory.splice(i,1);
break;
}
}
// and put it to the 'very top'
aHistory.unshift(sValue);
// but do not s... | javascript | function(sValue) {
var aHistory = this._initHistory();
// ensure it is not contained twice -> remove
for (var i = 0; i < aHistory.length; i++) {
if (aHistory[i] === sValue) {
aHistory.splice(i,1);
break;
}
}
// and put it to the 'very top'
aHistory.unshift(sValue);
// but do not s... | [
"function",
"(",
"sValue",
")",
"{",
"var",
"aHistory",
"=",
"this",
".",
"_initHistory",
"(",
")",
";",
"// ensure it is not contained twice -> remove",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"aHistory",
".",
"length",
";",
"i",
"++",
")",
"{"... | Adds the given value to the history.
@private | [
"Adds",
"the",
"given",
"value",
"to",
"the",
"history",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/History.js#L107-L124 | train | Adds the specified value to the history | [
30522,
3853,
1006,
17917,
2389,
5657,
1007,
1063,
13075,
6289,
20483,
2854,
1027,
2023,
1012,
1035,
1999,
8939,
20483,
2854,
1006,
1007,
1025,
1013,
1013,
5676,
2009,
2003,
2025,
4838,
3807,
1011,
1028,
6366,
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/model/analytics/odata4analytics.js | function(oUI5MultiFilter) {
var aUI5MultiFilter = [];
var sOptionString = "";
var sLogicalMultiOperator = oUI5MultiFilter.bAnd == true ? " and " : " or ";
for (var i = -1, oUI5Filter; (oUI5Filter = oUI5MultiFilter.aFilters[++i]) !== undefined;) {
if (oUI5Filter.aFilters != undefined) { // defer proces... | javascript | function(oUI5MultiFilter) {
var aUI5MultiFilter = [];
var sOptionString = "";
var sLogicalMultiOperator = oUI5MultiFilter.bAnd == true ? " and " : " or ";
for (var i = -1, oUI5Filter; (oUI5Filter = oUI5MultiFilter.aFilters[++i]) !== undefined;) {
if (oUI5Filter.aFilters != undefined) { // defer proces... | [
"function",
"(",
"oUI5MultiFilter",
")",
"{",
"var",
"aUI5MultiFilter",
"=",
"[",
"]",
";",
"var",
"sOptionString",
"=",
"\"\"",
";",
"var",
"sLogicalMultiOperator",
"=",
"oUI5MultiFilter",
".",
"bAnd",
"==",
"true",
"?",
"\" and \"",
":",
"\" or \"",
";",
"... | /*
@private | [
"/",
"*"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L3381-L3402 | train | Render the UI5 multi filter | [
30522,
3853,
1006,
15068,
2072,
2629,
12274,
7096,
10128,
4014,
3334,
1007,
1063,
13075,
8740,
2072,
2629,
12274,
7096,
10128,
4014,
3334,
1027,
1031,
1033,
1025,
13075,
2061,
16790,
3367,
4892,
1027,
1000,
1000,
1025,
13075,
22889,
20734,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/ODataContextBinding.js | adjustTarget | function adjustTarget(oMessage) {
if (oMessage.target) {
var aSegments = oMessage.target.split("/");
if (aSegments.shift() === sBindingParameter) {
oMessage.target = aSegments.join("/");
return;
}
}
delete oMessage.target;
} | javascript | function adjustTarget(oMessage) {
if (oMessage.target) {
var aSegments = oMessage.target.split("/");
if (aSegments.shift() === sBindingParameter) {
oMessage.target = aSegments.join("/");
return;
}
}
delete oMessage.target;
} | [
"function",
"adjustTarget",
"(",
"oMessage",
")",
"{",
"if",
"(",
"oMessage",
".",
"target",
")",
"{",
"var",
"aSegments",
"=",
"oMessage",
".",
"target",
".",
"split",
"(",
"\"/\"",
")",
";",
"if",
"(",
"aSegments",
".",
"shift",
"(",
")",
"===",
"s... | Adjusts the target: Makes it relative to the binding parameter; deletes targets pointing to other parameters because this is not supported | [
"Adjusts",
"the",
"target",
":",
"Makes",
"it",
"relative",
"to",
"the",
"binding",
"parameter",
";",
"deletes",
"targets",
"pointing",
"to",
"other",
"parameters",
"because",
"this",
"is",
"not",
"supported"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataContextBinding.js#L289-L299 | train | Adjusts the target of the message if the binding parameter is not present | [
30522,
3853,
14171,
7559,
18150,
1006,
18168,
7971,
4270,
1007,
1063,
2065,
1006,
18168,
7971,
4270,
1012,
4539,
1007,
1063,
13075,
2004,
13910,
8163,
1027,
18168,
7971,
4270,
1012,
4539,
1012,
3975,
1006,
1000,
1013,
1000,
1007,
1025,
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... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js | function (sUrl, bAnnotations, bPrefetch) {
var oPromise;
function convertXMLMetadata(oJSON) {
var Converter = sODataVersion === "4.0" || bAnnotations
? _V4MetadataConverter
: _V2MetadataConverter,
oData = oJSON.$XML;
delete oJSON.$XML; // be nice to the garbage collector
... | javascript | function (sUrl, bAnnotations, bPrefetch) {
var oPromise;
function convertXMLMetadata(oJSON) {
var Converter = sODataVersion === "4.0" || bAnnotations
? _V4MetadataConverter
: _V2MetadataConverter,
oData = oJSON.$XML;
delete oJSON.$XML; // be nice to the garbage collector
... | [
"function",
"(",
"sUrl",
",",
"bAnnotations",
",",
"bPrefetch",
")",
"{",
"var",
"oPromise",
";",
"function",
"convertXMLMetadata",
"(",
"oJSON",
")",
"{",
"var",
"Converter",
"=",
"sODataVersion",
"===",
"\"4.0\"",
"||",
"bAnnotations",
"?",
"_V4MetadataConvert... | Reads a metadata document from the given URL.
@param {string} sUrl
The URL of a metadata document, it must not contain a query string or a
fragment part
@param {boolean} [bAnnotations=false]
<code>true</code> if an additional annotation file is read, otherwise it is
expected to be a metadata document in the correct ODa... | [
"Reads",
"a",
"metadata",
"document",
"from",
"the",
"given",
"URL",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js#L56-L112 | train | Get metadata from the server | [
30522,
3853,
1006,
7505,
2140,
1010,
7221,
17048,
10708,
1010,
17531,
2890,
7959,
10649,
1007,
1063,
13075,
6728,
21716,
5562,
1025,
3853,
10463,
2595,
19968,
11368,
8447,
2696,
1006,
1051,
22578,
2239,
1007,
1063,
13075,
10463,
2121,
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 | lib/jsdoc/create-api-index.js | cleanTree | function cleanTree (oSymbol) {
delete oSymbol.treeName;
delete oSymbol.parent;
if (oSymbol.children) {
oSymbol.children.forEach(o => cleanTree(o));
}
} | javascript | function cleanTree (oSymbol) {
delete oSymbol.treeName;
delete oSymbol.parent;
if (oSymbol.children) {
oSymbol.children.forEach(o => cleanTree(o));
}
} | [
"function",
"cleanTree",
"(",
"oSymbol",
")",
"{",
"delete",
"oSymbol",
".",
"treeName",
";",
"delete",
"oSymbol",
".",
"parent",
";",
"if",
"(",
"oSymbol",
".",
"children",
")",
"{",
"oSymbol",
".",
"children",
".",
"forEach",
"(",
"o",
"=>",
"cleanTree... | Clean tree - keep file size down | [
"Clean",
"tree",
"-",
"keep",
"file",
"size",
"down"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/create-api-index.js#L329-L335 | train | clean up the tree | [
30522,
3853,
4550,
13334,
1006,
9808,
24335,
14956,
1007,
1063,
3972,
12870,
9808,
24335,
14956,
1012,
3392,
18442,
1025,
3972,
12870,
9808,
24335,
14956,
1012,
6687,
1025,
2065,
1006,
9808,
24335,
14956,
1012,
2336,
1007,
1063,
9808,
24335,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fex-team/webuploader | build/tasks/build.js | convert | function convert( name, _path, contents ) {
var rDefine = /(define\s*\(\s*('|").*?\2\s*,\s*\[)([\s\S]*?)\]/ig,
rDeps = /('|")(.*?)\1/g,
root = _path.substr( 0, _path.length - name.length - 3 ),
dir = path.dirname( _path ),
m, m2, deps, dep, _path2;
contents = contents.replace( r... | javascript | function convert( name, _path, contents ) {
var rDefine = /(define\s*\(\s*('|").*?\2\s*,\s*\[)([\s\S]*?)\]/ig,
rDeps = /('|")(.*?)\1/g,
root = _path.substr( 0, _path.length - name.length - 3 ),
dir = path.dirname( _path ),
m, m2, deps, dep, _path2;
contents = contents.replace( r... | [
"function",
"convert",
"(",
"name",
",",
"_path",
",",
"contents",
")",
"{",
"var",
"rDefine",
"=",
"/",
"(define\\s*\\(\\s*('|\").*?\\2\\s*,\\s*\\[)([\\s\\S]*?)\\]",
"/",
"ig",
",",
"rDeps",
"=",
"/",
"('|\")(.*?)\\1",
"/",
"g",
",",
"root",
"=",
"_path",
"."... | convert relative path to absolute path. | [
"convert",
"relative",
"path",
"to",
"absolute",
"path",
"."
] | 7094e4476c5af3b06993d91dde2d223200b9feb7 | https://github.com/fex-team/webuploader/blob/7094e4476c5af3b06993d91dde2d223200b9feb7/build/tasks/build.js#L12-L30 | train | Convert a file to a xsd | [
30522,
3853,
10463,
1006,
2171,
1010,
1035,
4130,
1010,
8417,
1007,
1063,
13075,
16428,
12879,
3170,
1027,
1013,
1006,
9375,
1032,
1055,
1008,
1032,
1006,
1032,
1055,
1008,
1006,
1005,
1064,
1000,
1007,
1012,
1008,
1029,
1032,
1016,
1032,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Batch.js | getBoundaryRegExp | function getBoundaryRegExp(sContentType) {
var sBatchBoundary = getHeaderParameterValue(sContentType, "boundary"),
iMultiPartTypeIndex = sContentType.trim().indexOf("multipart/mixed");
if (iMultiPartTypeIndex !== 0 || !sBatchBoundary) {
throw new Error('Invalid $batch response header "Content-Type": ' + sCon... | javascript | function getBoundaryRegExp(sContentType) {
var sBatchBoundary = getHeaderParameterValue(sContentType, "boundary"),
iMultiPartTypeIndex = sContentType.trim().indexOf("multipart/mixed");
if (iMultiPartTypeIndex !== 0 || !sBatchBoundary) {
throw new Error('Invalid $batch response header "Content-Type": ' + sCon... | [
"function",
"getBoundaryRegExp",
"(",
"sContentType",
")",
"{",
"var",
"sBatchBoundary",
"=",
"getHeaderParameterValue",
"(",
"sContentType",
",",
"\"boundary\"",
")",
",",
"iMultiPartTypeIndex",
"=",
"sContentType",
".",
"trim",
"(",
")",
".",
"indexOf",
"(",
"\"... | Create regular expression based on boundary parameter of the given "multipart/mixed"
Content-Type header value.
@param {string} sContentType
Value of the "multipart/mixed" Content-Type header value
@returns {object} Regular expression which will be used to parse the $batch request body
@throws {Error} If the specified ... | [
"Create",
"regular",
"expression",
"based",
"on",
"boundary",
"parameter",
"of",
"the",
"given",
"multipart",
"/",
"mixed",
"Content",
"-",
"Type",
"header",
"value",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Batch.js#L27-L38 | train | Returns a regular expression that matches the boundary of a batch response. | [
30522,
3853,
2131,
15494,
5649,
2890,
3351,
2595,
2361,
1006,
8040,
28040,
3372,
13874,
1007,
1063,
13075,
24829,
4017,
2818,
15494,
5649,
1027,
2131,
4974,
2121,
28689,
22828,
10175,
5657,
1006,
8040,
28040,
3372,
13874,
1010,
1000,
6192,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/JSUtils.js | _shouldGetFromCache | function _shouldGetFromCache(fileInfo) {
var result = new $.Deferred(),
isChanged = _changedDocumentTracker.isPathChanged(fileInfo.fullPath);
if (isChanged && fileInfo.JSUtils) {
// See if it's dirty and in the working set first
var doc = DocumentManager.getOpenDocum... | javascript | function _shouldGetFromCache(fileInfo) {
var result = new $.Deferred(),
isChanged = _changedDocumentTracker.isPathChanged(fileInfo.fullPath);
if (isChanged && fileInfo.JSUtils) {
// See if it's dirty and in the working set first
var doc = DocumentManager.getOpenDocum... | [
"function",
"_shouldGetFromCache",
"(",
"fileInfo",
")",
"{",
"var",
"result",
"=",
"new",
"$",
".",
"Deferred",
"(",
")",
",",
"isChanged",
"=",
"_changedDocumentTracker",
".",
"isPathChanged",
"(",
"fileInfo",
".",
"fullPath",
")",
";",
"if",
"(",
"isChang... | Determines if the document function cache is up to date.
@param {FileInfo} fileInfo
@return {$.Promise} A promise resolved with true with true when a function cache is available for the document. Resolves
with false when there is no cache or the cache is stale. | [
"Determines",
"if",
"the",
"document",
"function",
"cache",
"is",
"up",
"to",
"date",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/JSUtils.js#L302-L330 | train | Check if the file is in the cache | [
30522,
3853,
1035,
2323,
18150,
19699,
5358,
3540,
5403,
1006,
5371,
2378,
14876,
1007,
1063,
13075,
2765,
1027,
2047,
1002,
1012,
13366,
28849,
2094,
1006,
1007,
1010,
2003,
22305,
2098,
1027,
1035,
2904,
3527,
24894,
4765,
6494,
9102,
101... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js | function(oEntry) {
var oResponse;
var fnGrep = function(aContains, aContained) {
return aContains.filter(function(x) {
return aContained.indexOf(x) < 0;
})[0];
};
// navigate to draft nodes and activate nodes
for (var i = 0; i < this._oDraftMetadata.draftNodes.length; i++) {
for (var nav... | javascript | function(oEntry) {
var oResponse;
var fnGrep = function(aContains, aContained) {
return aContains.filter(function(x) {
return aContained.indexOf(x) < 0;
})[0];
};
// navigate to draft nodes and activate nodes
for (var i = 0; i < this._oDraftMetadata.draftNodes.length; i++) {
for (var nav... | [
"function",
"(",
"oEntry",
")",
"{",
"var",
"oResponse",
";",
"var",
"fnGrep",
"=",
"function",
"(",
"aContains",
",",
"aContained",
")",
"{",
"return",
"aContains",
".",
"filter",
"(",
"function",
"(",
"x",
")",
"{",
"return",
"aContained",
".",
"indexO... | Activates a draft document
@param {object} oEntry the draft document | [
"Activates",
"a",
"draft",
"document"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js#L343-L389 | train | This function is called when the draft entity is added to the list of nodes | [
30522,
3853,
1006,
1051,
4765,
2854,
1007,
1063,
13075,
10848,
13102,
5644,
2063,
1025,
13075,
1042,
3070,
2890,
2361,
1027,
3853,
1006,
9353,
12162,
28247,
1010,
30524,
2709,
9353,
12162,
18175,
2094,
1012,
5950,
11253,
1006,
1060,
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... | |
GitbookIO/gitbook | lib/plugins/listDepsForBook.js | listDepsForBook | function listDepsForBook(book) {
var config = book.getConfig();
var plugins = config.getPluginDependencies();
return listDependencies(plugins);
} | javascript | function listDepsForBook(book) {
var config = book.getConfig();
var plugins = config.getPluginDependencies();
return listDependencies(plugins);
} | [
"function",
"listDepsForBook",
"(",
"book",
")",
"{",
"var",
"config",
"=",
"book",
".",
"getConfig",
"(",
")",
";",
"var",
"plugins",
"=",
"config",
".",
"getPluginDependencies",
"(",
")",
";",
"return",
"listDependencies",
"(",
"plugins",
")",
";",
"}"
] | List all plugin requirements for a book.
It can be different from the final list of plugins,
since plugins can have their own dependencies
@param {Book}
@return {List<PluginDependency>} | [
"List",
"all",
"plugin",
"requirements",
"for",
"a",
"book",
".",
"It",
"can",
"be",
"different",
"from",
"the",
"final",
"list",
"of",
"plugins",
"since",
"plugins",
"can",
"have",
"their",
"own",
"dependencies"
] | 6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4 | https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/plugins/listDepsForBook.js#L11-L16 | train | List all dependencies for a book | [
30522,
3853,
2862,
3207,
4523,
29278,
8654,
1006,
2338,
1007,
1063,
13075,
9530,
8873,
2290,
1027,
2338,
1012,
2131,
8663,
8873,
2290,
1006,
1007,
1025,
13075,
13354,
7076,
1027,
9530,
8873,
2290,
1012,
2131,
24759,
15916,
22254,
13699,
104... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
adobe/brackets | src/preferences/PreferencesBase.js | function (data, id, context) {
var glob = this.getPreferenceLocation(data, id, context);
if (!glob) {
return;
}
return data[glob][id];
} | javascript | function (data, id, context) {
var glob = this.getPreferenceLocation(data, id, context);
if (!glob) {
return;
}
return data[glob][id];
} | [
"function",
"(",
"data",
",",
"id",
",",
"context",
")",
"{",
"var",
"glob",
"=",
"this",
".",
"getPreferenceLocation",
"(",
"data",
",",
"id",
",",
"context",
")",
";",
"if",
"(",
"!",
"glob",
")",
"{",
"return",
";",
"}",
"return",
"data",
"[",
... | Retrieve the current value based on the filename in the context
object, comparing globs relative to the prefFilePath that this
PathLayer was set up with.
@param {Object} data the preference data from the Scope
@param {string} id preference ID to look up
@param {Object} context Object with filename that will be compare... | [
"Retrieve",
"the",
"current",
"value",
"based",
"on",
"the",
"filename",
"in",
"the",
"context",
"object",
"comparing",
"globs",
"relative",
"to",
"the",
"prefFilePath",
"that",
"this",
"PathLayer",
"was",
"set",
"up",
"with",
"."
] | d5d00d43602c438266d32b8eda8f8a3ca937b524 | https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/preferences/PreferencesBase.js#L882-L890 | train | get the preference from the cache | [
30522,
3853,
1006,
2951,
1010,
8909,
1010,
6123,
1007,
1063,
13075,
1043,
4135,
2497,
1027,
2023,
1012,
2131,
28139,
25523,
4135,
10719,
1006,
2951,
1010,
8909,
1010,
6123,
1007,
1025,
2065,
1006,
999,
1043,
4135,
2497,
1007,
1063,
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... | |
postcss/autoprefixer | lib/hacks/grid-utils.js | warnTemplateSelectorNotFound | function warnTemplateSelectorNotFound (decl, result) {
let rule = decl.parent
let root = decl.root()
let duplicatesFound = false
// slice selector array. Remove the last part (for comparison)
let slicedSelectorArr = list
.space(rule.selector)
.filter(str => str !== '>')
.slice(0, -1)
// we nee... | javascript | function warnTemplateSelectorNotFound (decl, result) {
let rule = decl.parent
let root = decl.root()
let duplicatesFound = false
// slice selector array. Remove the last part (for comparison)
let slicedSelectorArr = list
.space(rule.selector)
.filter(str => str !== '>')
.slice(0, -1)
// we nee... | [
"function",
"warnTemplateSelectorNotFound",
"(",
"decl",
",",
"result",
")",
"{",
"let",
"rule",
"=",
"decl",
".",
"parent",
"let",
"root",
"=",
"decl",
".",
"root",
"(",
")",
"let",
"duplicatesFound",
"=",
"false",
"// slice selector array. Remove the last part (... | compare selectors with grid-area rule and grid-template rule
show warning if grid-template selector is not found
(this function used for grid-area rule)
@param {Declaration} decl
@param {Result} result
@return {void} | [
"compare",
"selectors",
"with",
"grid",
"-",
"area",
"rule",
"and",
"grid",
"-",
"template",
"rule",
"show",
"warning",
"if",
"grid",
"-",
"template",
"selector",
"is",
"not",
"found",
"(",
"this",
"function",
"used",
"for",
"grid",
"-",
"area",
"rule",
... | 24b28b6dbdc34a5e5800986e76f48cbaf9bbbc32 | https://github.com/postcss/autoprefixer/blob/24b28b6dbdc34a5e5800986e76f48cbaf9bbbc32/lib/hacks/grid-utils.js#L675-L739 | train | Warn user if no grid - template selector is found | [
30522,
3853,
11582,
18532,
15725,
11246,
22471,
26295,
24475,
28819,
1006,
11703,
2140,
1010,
2765,
1007,
1063,
2292,
3627,
1027,
11703,
2140,
1012,
6687,
2292,
7117,
1027,
11703,
2140,
1012,
7117,
1006,
1007,
2292,
24473,
22747,
28819,
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/core/date/Buddhist.js | toBuddhist | function toBuddhist(oGregorian) {
var iEraStartYear = UniversalDate.getEraStartDate(CalendarType.Buddhist, 0).year,
iYear = oGregorian.year - iEraStartYear + 1;
// Before 1941 new year started on 1st of April
if (oGregorian.year < 1941 && oGregorian.month < 3) {
iYear -= 1;
}
if (oGregorian.year === nul... | javascript | function toBuddhist(oGregorian) {
var iEraStartYear = UniversalDate.getEraStartDate(CalendarType.Buddhist, 0).year,
iYear = oGregorian.year - iEraStartYear + 1;
// Before 1941 new year started on 1st of April
if (oGregorian.year < 1941 && oGregorian.month < 3) {
iYear -= 1;
}
if (oGregorian.year === nul... | [
"function",
"toBuddhist",
"(",
"oGregorian",
")",
"{",
"var",
"iEraStartYear",
"=",
"UniversalDate",
".",
"getEraStartDate",
"(",
"CalendarType",
".",
"Buddhist",
",",
"0",
")",
".",
"year",
",",
"iYear",
"=",
"oGregorian",
".",
"year",
"-",
"iEraStartYear",
... | Find the matching Buddhist date for the given gregorian date
@param {object} oGregorian
@return {object} | [
"Find",
"the",
"matching",
"Buddhist",
"date",
"for",
"the",
"given",
"gregorian",
"date"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/date/Buddhist.js#L48-L63 | train | Converts a gregorian date to Buddhist. | [
30522,
3853,
2000,
8569,
14141,
24158,
2102,
1006,
13958,
2890,
20255,
2937,
1007,
1063,
13075,
29464,
8180,
7559,
3723,
14644,
1027,
5415,
13701,
1012,
2131,
24140,
7559,
2102,
13701,
1006,
8094,
13874,
1012,
7992,
1010,
1014,
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... |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js | function (aColumnsIds, bVisibilityValue) {
var aColumns = this.treeTable.getColumns();
aColumns.forEach(function(oColumn) {
oColumn.setVisible(!bVisibilityValue);
aColumnsIds.forEach(function(sRuleId) {
if (oColumn.sId.includes(sRuleId)) {
oColumn.setVisible(bVisibilityValue);
}
});
... | javascript | function (aColumnsIds, bVisibilityValue) {
var aColumns = this.treeTable.getColumns();
aColumns.forEach(function(oColumn) {
oColumn.setVisible(!bVisibilityValue);
aColumnsIds.forEach(function(sRuleId) {
if (oColumn.sId.includes(sRuleId)) {
oColumn.setVisible(bVisibilityValue);
}
});
... | [
"function",
"(",
"aColumnsIds",
",",
"bVisibilityValue",
")",
"{",
"var",
"aColumns",
"=",
"this",
".",
"treeTable",
".",
"getColumns",
"(",
")",
";",
"aColumns",
".",
"forEach",
"(",
"function",
"(",
"oColumn",
")",
"{",
"oColumn",
".",
"setVisible",
"(",... | Sets visibility to columns.
@param {Array} aColumnsIds Ids of columns
@param {boolean} bVisibilityValue | [
"Sets",
"visibility",
"to",
"columns",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L996-L1007 | train | Sets visibility of the columns | [
30522,
3853,
1006,
9353,
4747,
2819,
3619,
9821,
1010,
1038,
11365,
13464,
10175,
5657,
1007,
1063,
13075,
9353,
4747,
2819,
3619,
1027,
30524,
1006,
3853,
1006,
1051,
25778,
2819,
2078,
1007,
1063,
1051,
25778,
2819,
2078,
1012,
2275,
1136... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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/closure/goog/i18n/dateintervalformat.js | function(
dateTimePattern, fallbackPattern, dateTimeSymbols) {
/**
* Date time pattern used to format the dates.
* @private {string}
*/
this.dateTimePattern_ = dateTimePattern;
/**
* Date time formatter used to format the dates.
* @private {!DateTimeFormat}
*/
this.dateTimeFormatter_ =
... | javascript | function(
dateTimePattern, fallbackPattern, dateTimeSymbols) {
/**
* Date time pattern used to format the dates.
* @private {string}
*/
this.dateTimePattern_ = dateTimePattern;
/**
* Date time formatter used to format the dates.
* @private {!DateTimeFormat}
*/
this.dateTimeFormatter_ =
... | [
"function",
"(",
"dateTimePattern",
",",
"fallbackPattern",
",",
"dateTimeSymbols",
")",
"{",
"/**\n * Date time pattern used to format the dates.\n * @private {string}\n */",
"this",
".",
"dateTimePattern_",
"=",
"dateTimePattern",
";",
"/**\n * Date time formatter used to f... | Constructs a DateTimeFormatter_ object which implements the Formatter_
interface.
Internal object to construct and store a goog.i18n.DateTimeFormat for the
a datetime pattern and formats dates using the fallback interval pattern
(e.g. '{0} – {1}').
@param {string} dateTimePattern Datetime pattern used to format the d... | [
"Constructs",
"a",
"DateTimeFormatter_",
"object",
"which",
"implements",
"the",
"Formatter_",
"interface",
"."
] | 38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd | https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/closure/goog/i18n/dateintervalformat.js#L608-L628 | train | A date time interval pattern. | [
30522,
3853,
1006,
3058,
7292,
4502,
12079,
2078,
1010,
2991,
5963,
4502,
12079,
2078,
1010,
3058,
7292,
6508,
13344,
4877,
1007,
1063,
1013,
1008,
1008,
1008,
3058,
2051,
5418,
2109,
2000,
4289,
1996,
5246,
1012,
1008,
1030,
2797,
1063,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | function(oElement, mActions){
var oModel = oElement.getModel();
var mRevealData = mActions.reveal;
var mAddODataProperty = mActions.addODataProperty;
var mCustom = mActions.custom;
var oDefaultAggregation = oElement.getMetadata().getAggregation();
var sAggregationName = oDefaultAggregation ? oDefaultA... | javascript | function(oElement, mActions){
var oModel = oElement.getModel();
var mRevealData = mActions.reveal;
var mAddODataProperty = mActions.addODataProperty;
var mCustom = mActions.custom;
var oDefaultAggregation = oElement.getMetadata().getAggregation();
var sAggregationName = oDefaultAggregation ? oDefaultA... | [
"function",
"(",
"oElement",
",",
"mActions",
")",
"{",
"var",
"oModel",
"=",
"oElement",
".",
"getModel",
"(",
")",
";",
"var",
"mRevealData",
"=",
"mActions",
".",
"reveal",
";",
"var",
"mAddODataProperty",
"=",
"mActions",
".",
"addODataProperty",
";",
... | Filters available invisible elements whether they could be shown or not
@param {sap.ui.core.Control} oElement - Container Element where to start search for a invisible
@param {Object} mActions - Container with actions
@return {Promise} - returns a Promise which resolves with a list of hidden controls are available to... | [
"Filters",
"available",
"invisible",
"elements",
"whether",
"they",
"could",
"be",
"shown",
"or",
"not"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L432-L509 | train | Returns an array of elements that are invisible by the user. | [
30522,
3853,
1006,
1051,
12260,
3672,
1010,
6097,
9285,
1007,
1063,
13075,
18168,
10244,
2140,
1027,
1051,
12260,
3672,
1012,
2131,
5302,
9247,
1006,
1007,
1025,
13075,
2720,
18697,
19058,
6790,
1027,
6097,
9285,
1012,
7487,
1025,
13075,
55... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
aws/aws-sdk-js | lib/s3/managed_upload.js | function(callback) {
var self = this;
self.failed = false;
self.callback = callback || function(err) { if (err) throw err; };
var runFill = true;
if (self.sliceFn) {
self.fillQueue = self.fillBuffer;
} else if (AWS.util.isNode()) {
var Stream = AWS.util.stream.Stream;
if (self... | javascript | function(callback) {
var self = this;
self.failed = false;
self.callback = callback || function(err) { if (err) throw err; };
var runFill = true;
if (self.sliceFn) {
self.fillQueue = self.fillBuffer;
} else if (AWS.util.isNode()) {
var Stream = AWS.util.stream.Stream;
if (self... | [
"function",
"(",
"callback",
")",
"{",
"var",
"self",
"=",
"this",
";",
"self",
".",
"failed",
"=",
"false",
";",
"self",
".",
"callback",
"=",
"callback",
"||",
"function",
"(",
"err",
")",
"{",
"if",
"(",
"err",
")",
"throw",
"err",
";",
"}",
"... | Initiates the managed upload for the payload.
@callback callback function(err, data)
@param err [Error] an error or null if no error occurred.
@param data [map] The response data from the successful upload:
* `Location` (String) the URL of the uploaded object
* `ETag` (String) the ETag of the uploaded object
* `Bucket... | [
"Initiates",
"the",
"managed",
"upload",
"for",
"the",
"payload",
"."
] | c23e5f0edd150f8885267e5f7c8a564f8e6e8562 | https://github.com/aws/aws-sdk-js/blob/c23e5f0edd150f8885267e5f7c8a564f8e6e8562/lib/s3/managed_upload.js#L170-L200 | train | This method is called by the next iteration of the iteration. | [
30522,
3853,
1006,
2655,
5963,
1007,
1063,
13075,
2969,
1027,
2023,
1025,
2969,
1012,
3478,
1027,
6270,
1025,
2969,
1012,
2655,
5963,
1027,
2655,
5963,
1064,
1064,
3853,
1006,
9413,
2099,
1007,
1063,
2065,
1006,
9413,
2099,
1007,
5466,
94... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
thomaspark/bootswatch | docs/3/bower_components/html5shiv/dist/html5shiv-printshiv.js | shivPrint | function shivPrint(ownerDocument) {
var shivedSheet,
wrappers,
data = getExpandoData(ownerDocument),
namespaces = ownerDocument.namespaces,
ownerWindow = ownerDocument.parentWindow;
if (!supportsShivableSheets || ownerDocument.printShived) {
return ownerDocument;
}
... | javascript | function shivPrint(ownerDocument) {
var shivedSheet,
wrappers,
data = getExpandoData(ownerDocument),
namespaces = ownerDocument.namespaces,
ownerWindow = ownerDocument.parentWindow;
if (!supportsShivableSheets || ownerDocument.printShived) {
return ownerDocument;
}
... | [
"function",
"shivPrint",
"(",
"ownerDocument",
")",
"{",
"var",
"shivedSheet",
",",
"wrappers",
",",
"data",
"=",
"getExpandoData",
"(",
"ownerDocument",
")",
",",
"namespaces",
"=",
"ownerDocument",
".",
"namespaces",
",",
"ownerWindow",
"=",
"ownerDocument",
"... | /*--------------------------------------------------------------------------
Shivs the given document for print.
@memberOf html5
@param {Document} ownerDocument The document to shiv.
@returns {Document} The shived document. | [
"/",
"*",
"--------------------------------------------------------------------------",
"Shivs",
"the",
"given",
"document",
"for",
"print",
"."
] | a913e4992dad8f7bf38df2e1d3f4cc6bfe5f26dd | https://github.com/thomaspark/bootswatch/blob/a913e4992dad8f7bf38df2e1d3f4cc6bfe5f26dd/docs/3/bower_components/html5shiv/dist/html5shiv-printshiv.js#L432-L509 | train | Print the style sheets of the given ownerDocument. | [
30522,
3853,
11895,
2615,
16550,
1006,
3954,
3527,
24894,
4765,
1007,
1063,
13075,
11895,
7178,
4095,
15558,
1010,
10236,
7347,
1010,
2951,
1027,
2131,
10288,
9739,
3527,
2850,
2696,
1006,
3954,
3527,
24894,
4765,
1007,
1010,
3415,
15327,
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... |
aframevr/aframe | src/core/scene/a-scene.js | enterVRSuccess | function enterVRSuccess () {
self.addState('vr-mode');
self.emit('enter-vr', {target: self});
// Lock to landscape orientation on mobile.
if (self.isMobile && screen.orientation && screen.orientation.lock) {
screen.orientation.lock('landscape');
}
... | javascript | function enterVRSuccess () {
self.addState('vr-mode');
self.emit('enter-vr', {target: self});
// Lock to landscape orientation on mobile.
if (self.isMobile && screen.orientation && screen.orientation.lock) {
screen.orientation.lock('landscape');
}
... | [
"function",
"enterVRSuccess",
"(",
")",
"{",
"self",
".",
"addState",
"(",
"'vr-mode'",
")",
";",
"self",
".",
"emit",
"(",
"'enter-vr'",
",",
"{",
"target",
":",
"self",
"}",
")",
";",
"// Lock to landscape orientation on mobile.",
"if",
"(",
"self",
".",
... | Callback that happens on enter VR success or enter fullscreen (any API). | [
"Callback",
"that",
"happens",
"on",
"enter",
"VR",
"success",
"or",
"enter",
"fullscreen",
"(",
"any",
"API",
")",
"."
] | 24acc78a7299a4cdfe3ef617f4d40ddf6275c992 | https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/core/scene/a-scene.js#L311-L330 | train | Enter the VR mode | [
30522,
3853,
4607,
19716,
6342,
9468,
7971,
1006,
1007,
1063,
2969,
1012,
9909,
12259,
1006,
1005,
27830,
1011,
5549,
1005,
1007,
1025,
2969,
1012,
12495,
2102,
1006,
1005,
4607,
1011,
27830,
1005,
1010,
1063,
4539,
1024,
2969,
1065,
1007,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
SAP/openui5 | src/sap.ui.core/src/sap/base/i18n/ResourceBundle.js | nextFallbackLocale | function nextFallbackLocale(sLocale) {
// there is no fallback for the 'raw' locale or for null/undefined
if ( !sLocale ) {
return null;
}
// special (legacy) handling for zh_HK: try zh_TW (for Traditional Chinese) first before falling back to 'zh'
if ( sLocale === "zh_HK" ) {
return "zh_TW";
}
/... | javascript | function nextFallbackLocale(sLocale) {
// there is no fallback for the 'raw' locale or for null/undefined
if ( !sLocale ) {
return null;
}
// special (legacy) handling for zh_HK: try zh_TW (for Traditional Chinese) first before falling back to 'zh'
if ( sLocale === "zh_HK" ) {
return "zh_TW";
}
/... | [
"function",
"nextFallbackLocale",
"(",
"sLocale",
")",
"{",
"// there is no fallback for the 'raw' locale or for null/undefined",
"if",
"(",
"!",
"sLocale",
")",
"{",
"return",
"null",
";",
"}",
"// special (legacy) handling for zh_HK: try zh_TW (for Traditional Chinese) first befo... | Calculate the next fallback locale for the given locale.
Note: always keep this in sync with the fallback mechanism in Java, ABAP (MIME & BSP)
resource handler (Java: Peter M., MIME: Sebastian A., BSP: Silke A.)
@param {string} sLocale Locale string in Java format (underscores) or null
@returns {string|null} Next fall... | [
"Calculate",
"the",
"next",
"fallback",
"locale",
"for",
"the",
"given",
"locale",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/base/i18n/ResourceBundle.js#L129-L150 | train | Returns the next fallback locale for the given locale. | [
30522,
3853,
2279,
13976,
5963,
4135,
9289,
2063,
1006,
22889,
24755,
2571,
1007,
1063,
1013,
1013,
2045,
2003,
2053,
2991,
5963,
2005,
1996,
1005,
6315,
1005,
2334,
2063,
2030,
2005,
19701,
1013,
6151,
28344,
2065,
1006,
999,
22889,
24755,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-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.demokit/src/sap/ui/demokit/explored/view/base.controller.js | function (bSwitch) {
jQuery.sap.require("sap.ui.core.routing.HashChanger");
var HashChanger = sap.ui.require("sap/ui/core/routing/HashChanger");
var oHashChanger = new HashChanger();
var sHash = oHashChanger.getHash();
var oUri = window.location;
// TODO: remove this fix when microsoft fix this unde... | javascript | function (bSwitch) {
jQuery.sap.require("sap.ui.core.routing.HashChanger");
var HashChanger = sap.ui.require("sap/ui/core/routing/HashChanger");
var oHashChanger = new HashChanger();
var sHash = oHashChanger.getHash();
var oUri = window.location;
// TODO: remove this fix when microsoft fix this unde... | [
"function",
"(",
"bSwitch",
")",
"{",
"jQuery",
".",
"sap",
".",
"require",
"(",
"\"sap.ui.core.routing.HashChanger\"",
")",
";",
"var",
"HashChanger",
"=",
"sap",
".",
"ui",
".",
"require",
"(",
"\"sap/ui/core/routing/HashChanger\"",
")",
";",
"var",
"oHashChan... | trigger reload w/o URL-Parameter; | [
"trigger",
"reload",
"w",
"/",
"o",
"URL",
"-",
"Parameter",
";"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.demokit/src/sap/ui/demokit/explored/view/base.controller.js#L121-L144 | train | Sets the hash to the hash of the window | [
30522,
3853,
1006,
18667,
9148,
10649,
1007,
1063,
1046,
4226,
2854,
1012,
20066,
1012,
5478,
1006,
1000,
20066,
1012,
21318,
1012,
4563,
1012,
16972,
1012,
23325,
22305,
2121,
1000,
1007,
1025,
13075,
23325,
22305,
2121,
1027,
20066,
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... | |
aframevr/aframe | src/core/schema.js | parseProperty | function parseProperty (value, propDefinition) {
// Use default value if value is falsy.
if (value === undefined || value === null || value === '') {
value = propDefinition.default;
if (Array.isArray(value)) { value = value.slice(); }
}
// Invoke property type parser.
return propDefinition.parse(value... | javascript | function parseProperty (value, propDefinition) {
// Use default value if value is falsy.
if (value === undefined || value === null || value === '') {
value = propDefinition.default;
if (Array.isArray(value)) { value = value.slice(); }
}
// Invoke property type parser.
return propDefinition.parse(value... | [
"function",
"parseProperty",
"(",
"value",
",",
"propDefinition",
")",
"{",
"// Use default value if value is falsy.",
"if",
"(",
"value",
"===",
"undefined",
"||",
"value",
"===",
"null",
"||",
"value",
"===",
"''",
")",
"{",
"value",
"=",
"propDefinition",
"."... | Deserialize a single property. | [
"Deserialize",
"a",
"single",
"property",
"."
] | 24acc78a7299a4cdfe3ef617f4d40ddf6275c992 | https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/core/schema.js#L155-L163 | train | Parse property value | [
30522,
3853,
11968,
3366,
21572,
4842,
3723,
1006,
3643,
1010,
17678,
3207,
16294,
22753,
1007,
1063,
1013,
1013,
2224,
12398,
3643,
2065,
3643,
2003,
6904,
4877,
2100,
1012,
2065,
1006,
3643,
1027,
1027,
1027,
6151,
28344,
1064,
1064,
3643... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.