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
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/prefs.js
openPreferencesDialog
function openPreferencesDialog(controller, callback, launcher) { if(!controller) throw new Error("No controller given for Preferences Dialog"); if(typeof callback != "function") throw new Error("No callback given for Preferences Dialog"); if (mozmill.isWindows) { // Preference dialog is modal on wind...
javascript
function openPreferencesDialog(controller, callback, launcher) { if(!controller) throw new Error("No controller given for Preferences Dialog"); if(typeof callback != "function") throw new Error("No callback given for Preferences Dialog"); if (mozmill.isWindows) { // Preference dialog is modal on wind...
[ "function", "openPreferencesDialog", "(", "controller", ",", "callback", ",", "launcher", ")", "{", "if", "(", "!", "controller", ")", "throw", "new", "Error", "(", "\"No controller given for Preferences Dialog\"", ")", ";", "if", "(", "typeof", "callback", "!=", ...
Open the preferences dialog and call the given handler @param {MozMillController} controller MozMillController which is the opener of the preferences dialog @param {function} callback The callback handler to use to interact with the preference dialog @param {function} launcher (Optional) A callback handler to launch t...
[ "Open", "the", "preferences", "dialog", "and", "call", "the", "given", "handler" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/prefs.js#L341-L375
train
Open the preferences dialog
[ 30522, 3853, 2330, 28139, 25523, 16150, 4818, 8649, 1006, 11486, 1010, 2655, 5963, 1010, 22742, 1007, 1063, 2065, 1006, 999, 11486, 1007, 5466, 2047, 7561, 1006, 1000, 2053, 11486, 2445, 2005, 18394, 13764, 8649, 1000, 1007, 1025, 2065, 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...
cytoscape/cytoscape.js
dist/cytoscape.esm.js
consumeWhitespace
function consumeWhitespace(remaining) { var match = remaining.match(/^\s+/); if (match) { var consumed = match[0]; remaining = remaining.substring(consumed.length); } return remaining; }
javascript
function consumeWhitespace(remaining) { var match = remaining.match(/^\s+/); if (match) { var consumed = match[0]; remaining = remaining.substring(consumed.length); } return remaining; }
[ "function", "consumeWhitespace", "(", "remaining", ")", "{", "var", "match", "=", "remaining", ".", "match", "(", "/", "^\\s+", "/", ")", ";", "if", "(", "match", ")", "{", "var", "consumed", "=", "match", "[", "0", "]", ";", "remaining", "=", "remai...
Consume all the leading whitespace @param {string} remaining The text to consume @returns The text with the leading whitespace removed
[ "Consume", "all", "the", "leading", "whitespace" ]
ad2051b65e2243cfd953d8b24a8bf95bfa8559e5
https://github.com/cytoscape/cytoscape.js/blob/ad2051b65e2243cfd953d8b24a8bf95bfa8559e5/dist/cytoscape.esm.js#L7135-L7144
train
Consumes whitespace from remaining string
[ 30522, 3853, 16678, 2860, 16584, 2229, 15327, 1006, 3588, 1007, 1063, 13075, 2674, 1027, 3588, 1012, 2674, 1006, 1013, 1034, 1032, 1055, 1009, 1013, 1007, 1025, 2065, 1006, 2674, 1007, 1063, 13075, 10202, 1027, 2674, 1031, 1014, 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...
babel/babel
packages/babel-helpers/src/index.js
getHelperMetadata
function getHelperMetadata(file) { const globals = new Set(); const localBindingNames = new Set(); // Maps imported identifier -> helper name const dependencies = new Map(); let exportName; let exportPath; const exportBindingAssignments = []; const importPaths = []; const importBindingsReferences = [...
javascript
function getHelperMetadata(file) { const globals = new Set(); const localBindingNames = new Set(); // Maps imported identifier -> helper name const dependencies = new Map(); let exportName; let exportPath; const exportBindingAssignments = []; const importPaths = []; const importBindingsReferences = [...
[ "function", "getHelperMetadata", "(", "file", ")", "{", "const", "globals", "=", "new", "Set", "(", ")", ";", "const", "localBindingNames", "=", "new", "Set", "(", ")", ";", "// Maps imported identifier -> helper name", "const", "dependencies", "=", "new", "Map"...
Given a file AST for a given helper, get a bunch of metadata about it so that Babel can quickly render the helper is whatever context it is needed in.
[ "Given", "a", "file", "AST", "for", "a", "given", "helper", "get", "a", "bunch", "of", "metadata", "about", "it", "so", "that", "Babel", "can", "quickly", "render", "the", "helper", "is", "whatever", "context", "it", "is", "needed", "in", "." ]
1969e6b6aa7d90be3fbb3aca98ea96849656a55a
https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-helpers/src/index.js#L20-L132
train
Get the metadata for the helper
[ 30522, 3853, 2131, 16001, 4842, 11368, 8447, 2696, 1006, 5371, 1007, 1063, 9530, 3367, 3795, 2015, 1027, 2047, 2275, 1006, 1007, 1025, 9530, 3367, 2334, 8428, 4667, 18442, 2015, 1027, 2047, 2275, 1006, 1007, 1025, 1013, 1013, 7341, 10964, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/less.js
function () { var c = input.charAt(i); if (c === '>' || c === '+' || c === '~' || c === '|' || c === '^') { i++; if (input.charAt(i) === '^') { c = '^^'; i++; } ...
javascript
function () { var c = input.charAt(i); if (c === '>' || c === '+' || c === '~' || c === '|' || c === '^') { i++; if (input.charAt(i) === '^') { c = '^^'; i++; } ...
[ "function", "(", ")", "{", "var", "c", "=", "input", ".", "charAt", "(", "i", ")", ";", "if", "(", "c", "===", "'>'", "||", "c", "===", "'+'", "||", "c", "===", "'~'", "||", "c", "===", "'|'", "||", "c", "===", "'^'", ")", "{", "i", "++", ...
Combinators combine elements together, in a Selector. Because our parser isn't white-space sensitive, special care has to be taken, when parsing the descendant combinator, ` `, as it's an empty space. We have to check the previous character in the input, to see if it's a ` ` character. More info on how we deal with th...
[ "Combinators", "combine", "elements", "together", "in", "a", "Selector", ".", "Because", "our", "parser", "isn", "t", "white", "-", "space", "sensitive", "special", "care", "has", "to", "be", "taken", "when", "parsing", "the", "descendant", "combinator", "as",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/less.js#L1385-L1401
train
returns a combinator
[ 30522, 3853, 1006, 1007, 1063, 13075, 1039, 1027, 7953, 1012, 25869, 4017, 1006, 1045, 1007, 1025, 2065, 1006, 1039, 1027, 1027, 1027, 1005, 1028, 1005, 1064, 1064, 1039, 1027, 1027, 1027, 1005, 1009, 1005, 1064, 1064, 1039, 1027, 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...
eslint/eslint
lib/rules/vars-on-top.js
isVariableDeclaration
function isVariableDeclaration(node) { return ( node.type === "VariableDeclaration" || ( node.type === "ExportNamedDeclaration" && node.declaration && node.declaration.type === "VariableDeclaration" )...
javascript
function isVariableDeclaration(node) { return ( node.type === "VariableDeclaration" || ( node.type === "ExportNamedDeclaration" && node.declaration && node.declaration.type === "VariableDeclaration" )...
[ "function", "isVariableDeclaration", "(", "node", ")", "{", "return", "(", "node", ".", "type", "===", "\"VariableDeclaration\"", "||", "(", "node", ".", "type", "===", "\"ExportNamedDeclaration\"", "&&", "node", ".", "declaration", "&&", "node", ".", "declarati...
Checks whether a given node is a variable declaration or not. @param {ASTNode} node - any node @returns {boolean} `true` if the node is a variable declaration.
[ "Checks", "whether", "a", "given", "node", "is", "a", "variable", "declaration", "or", "not", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/vars-on-top.js#L60-L69
train
Check if a node is a variable declaration
[ 30522, 3853, 2003, 10755, 19210, 3207, 20464, 25879, 3258, 1006, 13045, 1007, 1063, 2709, 1006, 13045, 1012, 2828, 1027, 1027, 1027, 1000, 8023, 3207, 20464, 25879, 3258, 1000, 1064, 1064, 1006, 13045, 1012, 2828, 1027, 1027, 1027, 1000, 91...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
openlayers/openlayers
examples/measure.js
function(line) { const length = getLength(line); let output; if (length > 100) { output = (Math.round(length / 1000 * 100) / 100) + ' ' + 'km'; } else { output = (Math.round(length * 100) / 100) + ' ' + 'm'; } return output; }
javascript
function(line) { const length = getLength(line); let output; if (length > 100) { output = (Math.round(length / 1000 * 100) / 100) + ' ' + 'km'; } else { output = (Math.round(length * 100) / 100) + ' ' + 'm'; } return output; }
[ "function", "(", "line", ")", "{", "const", "length", "=", "getLength", "(", "line", ")", ";", "let", "output", ";", "if", "(", "length", ">", "100", ")", "{", "output", "=", "(", "Math", ".", "round", "(", "length", "/", "1000", "*", "100", ")",...
global so we can remove it later Format length output. @param {LineString} line The line. @return {string} The formatted length.
[ "global", "so", "we", "can", "remove", "it", "later", "Format", "length", "output", "." ]
f366eaea522388fb575b11010e69d309164baca7
https://github.com/openlayers/openlayers/blob/f366eaea522388fb575b11010e69d309164baca7/examples/measure.js#L140-L151
train
get the term length of a term
[ 30522, 3853, 1006, 2240, 1007, 1063, 9530, 3367, 3091, 1027, 2131, 7770, 13512, 2232, 1006, 2240, 1007, 1025, 2292, 6434, 1025, 2065, 1006, 3091, 1028, 2531, 1007, 1063, 6434, 1027, 1006, 8785, 1012, 2461, 1006, 3091, 1013, 6694, 1008, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
viewToBuffer
function viewToBuffer(view) { const buf = Buffer.from(view.buffer); if (view.byteLength !== view.buffer.byteLength) { return buf.slice(view.byteOffset, view.byteOffset + view.byteLength); } return buf; }
javascript
function viewToBuffer(view) { const buf = Buffer.from(view.buffer); if (view.byteLength !== view.buffer.byteLength) { return buf.slice(view.byteOffset, view.byteOffset + view.byteLength); } return buf; }
[ "function", "viewToBuffer", "(", "view", ")", "{", "const", "buf", "=", "Buffer", ".", "from", "(", "view", ".", "buffer", ")", ";", "if", "(", "view", ".", "byteLength", "!==", "view", ".", "buffer", ".", "byteLength", ")", "{", "return", "buf", "."...
Converts an `ArrayBuffer` view into a buffer. @param {(DataView|TypedArray)} view The view to convert @return {Buffer} Converted view @private
[ "Converts", "an", "ArrayBuffer", "view", "into", "a", "buffer", "." ]
995c527c87d0d4833d8093c18dcfa2e4a41d9582
https://github.com/websockets/ws/blob/995c527c87d0d4833d8093c18dcfa2e4a41d9582/lib/buffer-util.js#L109-L117
train
Convert a view to a buffer
[ 30522, 3853, 3193, 3406, 8569, 12494, 1006, 3193, 1007, 1063, 9530, 3367, 20934, 2546, 1027, 17698, 1012, 2013, 1006, 3193, 1012, 17698, 1007, 1025, 2065, 1006, 3193, 1012, 24880, 7770, 13512, 2232, 999, 1027, 1027, 3193, 1012, 17698, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js
includeSchema
function includeSchema(mReferencedScope) { var oElement, sKey; if (!(sSchema in mReferencedScope)) { fnLog(WARNING, sUrl, " does not contain ", sSchema); return; } fnLog(DEBUG, "Including ", sSchema, " from ", sUrl); for (sKey in mReferencedScope) { // $EntityContainer can be ignored; $...
javascript
function includeSchema(mReferencedScope) { var oElement, sKey; if (!(sSchema in mReferencedScope)) { fnLog(WARNING, sUrl, " does not contain ", sSchema); return; } fnLog(DEBUG, "Including ", sSchema, " from ", sUrl); for (sKey in mReferencedScope) { // $EntityContainer can be ignored; $...
[ "function", "includeSchema", "(", "mReferencedScope", ")", "{", "var", "oElement", ",", "sKey", ";", "if", "(", "!", "(", "sSchema", "in", "mReferencedScope", ")", ")", "{", "fnLog", "(", "WARNING", ",", "sUrl", ",", "\" does not contain \"", ",", "sSchema",...
Include the schema (and all of its children) with namespace <code>sSchema</code> from the given referenced scope. @param {object} mReferencedScope The $metadata "JSON"
[ "Include", "the", "schema", "(", "and", "all", "of", "its", "children", ")", "with", "namespace", "<code", ">", "sSchema<", "/", "code", ">", "from", "the", "given", "referenced", "scope", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataMetaModel.js#L159-L177
train
Include the given schema from the scope
[ 30522, 3853, 2950, 5403, 2863, 1006, 2720, 27235, 24413, 5104, 16186, 1007, 1063, 13075, 1051, 12260, 3672, 1010, 15315, 3240, 1025, 2065, 1006, 999, 1006, 7020, 5403, 2863, 1999, 2720, 27235, 24413, 5104, 16186, 1007, 1007, 1063, 1042, 205...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js
trimAndCheckForDuplicates
function trimAndCheckForDuplicates(aSelect, sPath) { var sCurrentProperty, bError = false, i, n; // replace all white-spaces before and after the value for (i = 0, n = aSelect.length; i < n; i++) { aSelect[i] = aSelect[i].trim(); } // check for duplicate entries and remove from list for (i = aS...
javascript
function trimAndCheckForDuplicates(aSelect, sPath) { var sCurrentProperty, bError = false, i, n; // replace all white-spaces before and after the value for (i = 0, n = aSelect.length; i < n; i++) { aSelect[i] = aSelect[i].trim(); } // check for duplicate entries and remove from list for (i = aS...
[ "function", "trimAndCheckForDuplicates", "(", "aSelect", ",", "sPath", ")", "{", "var", "sCurrentProperty", ",", "bError", "=", "false", ",", "i", ",", "n", ";", "// replace all white-spaces before and after the value", "for", "(", "i", "=", "0", ",", "n", "=", ...
Iterate over the given array, trim each value and check whether there are duplicate entries in the array. If there are duplicate entries a warning is logged and the duplicate is removed from the array. @param {string[]} aSelect An array of strings @param {string} sPath The binding path @returns {boolean} <code>true</c...
[ "Iterate", "over", "the", "given", "array", "trim", "each", "value", "and", "check", "whether", "there", "are", "duplicate", "entries", "in", "the", "array", ".", "If", "there", "are", "duplicate", "entries", "a", "warning", "is", "logged", "and", "the", "...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js#L188-L211
train
trim the given array of values
[ 30522, 3853, 12241, 5685, 5403, 3600, 3877, 6279, 19341, 4570, 1006, 2004, 12260, 6593, 1010, 14690, 2232, 1007, 1063, 13075, 8040, 29264, 21572, 4842, 3723, 1010, 2022, 18933, 2099, 1027, 6270, 1010, 1045, 1010, 1050, 1025, 1013, 1013, 567...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/sensing.js
function() { this.jsonInit({ "message0": "%1", "args0": [ { "type": "field_dropdown", "name": "KEY_OPTION", "options": [ [Blockly.Msg.EVENT_WHENKEYPRESSED_SPACE, 'space'], [Blockly.Msg.EVENT_WHENKEYPRESSED_UP, 'up arrow'], [Blockl...
javascript
function() { this.jsonInit({ "message0": "%1", "args0": [ { "type": "field_dropdown", "name": "KEY_OPTION", "options": [ [Blockly.Msg.EVENT_WHENKEYPRESSED_SPACE, 'space'], [Blockly.Msg.EVENT_WHENKEYPRESSED_UP, 'up arrow'], [Blockl...
[ "function", "(", ")", "{", "this", ".", "jsonInit", "(", "{", "\"message0\"", ":", "\"%1\"", ",", "\"args0\"", ":", "[", "{", "\"type\"", ":", "\"field_dropdown\"", ",", "\"name\"", ":", "\"KEY_OPTION\"", ",", "\"options\"", ":", "[", "[", "Blockly", ".", ...
Options for Keys @this Blockly.Block
[ "Options", "for", "Keys" ]
455b2a854435c0a67da1da92320ddc3ec3e2b799
https://github.com/LLK/scratch-blocks/blob/455b2a854435c0a67da1da92320ddc3ec3e2b799/blocks_vertical/sensing.js#L220-L275
train
Construct the keydropdown
[ 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...
angular/material
src/components/progressCircular/js/progressCircularDirective.js
getDashLength
function getDashLength(diameter, strokeWidth, value, limit) { return (diameter - strokeWidth) * $window.Math.PI * ((3 * (limit || 100) / 100) - (value/100)); }
javascript
function getDashLength(diameter, strokeWidth, value, limit) { return (diameter - strokeWidth) * $window.Math.PI * ((3 * (limit || 100) / 100) - (value/100)); }
[ "function", "getDashLength", "(", "diameter", ",", "strokeWidth", ",", "value", ",", "limit", ")", "{", "return", "(", "diameter", "-", "strokeWidth", ")", "*", "$window", ".", "Math", ".", "PI", "*", "(", "(", "3", "*", "(", "limit", "||", "100", ")...
Return stroke length for progress circle @param {number} diameter Diameter of the container. @param {number} strokeWidth Stroke width to be used when drawing circle @param {number} value Percentage of circle (between 0 and 100) @param {number} limit Max percentage for circle @returns {number} Stroke length for progre...
[ "Return", "stroke", "length", "for", "progress", "circle" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/progressCircular/js/progressCircularDirective.js#L337-L339
train
Calculate the length of a dash
[ 30522, 3853, 2131, 8883, 7317, 13159, 2705, 1006, 6705, 1010, 6909, 9148, 11927, 2232, 1010, 3643, 1010, 5787, 1007, 1063, 2709, 1006, 6705, 1011, 6909, 9148, 11927, 2232, 1007, 1008, 1002, 3332, 1012, 8785, 1012, 14255, 1008, 1006, 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...
MoePlayer/DPlayer
demo/modernizr.js
domToCSS
function domToCSS(name) { return name.replace(/([A-Z])/g, function(str, m1) { return '-' + m1.toLowerCase(); }).replace(/^ms-/, '-ms-'); }
javascript
function domToCSS(name) { return name.replace(/([A-Z])/g, function(str, m1) { return '-' + m1.toLowerCase(); }).replace(/^ms-/, '-ms-'); }
[ "function", "domToCSS", "(", "name", ")", "{", "return", "name", ".", "replace", "(", "/", "([A-Z])", "/", "g", ",", "function", "(", "str", ",", "m1", ")", "{", "return", "'-'", "+", "m1", ".", "toLowerCase", "(", ")", ";", "}", ")", ".", "repla...
domToCSS takes a camelCase string and converts it to kebab-case e.g. boxSizing -> box-sizing @access private @function domToCSS @param {string} name - String name of camelCase prop we want to convert @returns {string} The kebab-case version of the supplied name
[ "domToCSS", "takes", "a", "camelCase", "string", "and", "converts", "it", "to", "kebab", "-", "case", "e", ".", "g", ".", "boxSizing", "-", ">", "box", "-", "sizing" ]
f5c53f082634a6e5af56cfc72978ad7bad49b989
https://github.com/MoePlayer/DPlayer/blob/f5c53f082634a6e5af56cfc72978ad7bad49b989/demo/modernizr.js#L798-L802
train
Converts a dom element name to a CSS element name
[ 30522, 3853, 14383, 3406, 6169, 2015, 1006, 2171, 1007, 1063, 2709, 2171, 1012, 5672, 1006, 1013, 1006, 1031, 1037, 1011, 1062, 1033, 1007, 1013, 1043, 1010, 3853, 1006, 2358, 2099, 1010, 23290, 1007, 1063, 2709, 1005, 1011, 1005, 1009, 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/Readability.js
function(e, tag) { var isEmbed = ["object", "embed", "iframe"].indexOf(tag) !== -1; this._removeNodes(e.getElementsByTagName(tag), function(element) { // Allow youtube and vimeo videos through as people usually want to see those. if (isEmbed) { var attributeValues = [].map.call(element.attr...
javascript
function(e, tag) { var isEmbed = ["object", "embed", "iframe"].indexOf(tag) !== -1; this._removeNodes(e.getElementsByTagName(tag), function(element) { // Allow youtube and vimeo videos through as people usually want to see those. if (isEmbed) { var attributeValues = [].map.call(element.attr...
[ "function", "(", "e", ",", "tag", ")", "{", "var", "isEmbed", "=", "[", "\"object\"", ",", "\"embed\"", ",", "\"iframe\"", "]", ".", "indexOf", "(", "tag", ")", "!==", "-", "1", ";", "this", ".", "_removeNodes", "(", "e", ".", "getElementsByTagName", ...
Clean a node of all elements of type "tag". (Unless it's a youtube/vimeo video. People love movies.) @param Element @param string tag to clean @return void
[ "Clean", "a", "node", "of", "all", "elements", "of", "type", "tag", ".", "(", "Unless", "it", "s", "a", "youtube", "/", "vimeo", "video", ".", "People", "love", "movies", ".", ")" ]
beb428b246cecba4630a3ca57b472f43c0933a43
https://github.com/laurent22/joplin/blob/beb428b246cecba4630a3ca57b472f43c0933a43/Clipper/joplin-webclipper/content_scripts/Readability.js#L1453-L1474
train
Remove all elements with the same tag
[ 30522, 3853, 1006, 1041, 1010, 6415, 1007, 1063, 13075, 2003, 6633, 8270, 1027, 1031, 1000, 4874, 1000, 1010, 1000, 7861, 8270, 1000, 1010, 1000, 2065, 6444, 2063, 1000, 1033, 1012, 5950, 11253, 1006, 6415, 1007, 999, 1027, 1027, 1011, 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...
angular/material
gulp/util.js
deployMaterialMocks
function deployMaterialMocks() { return gulp.src(config.mockFiles) .pipe(gulp.dest(config.outputDir)); }
javascript
function deployMaterialMocks() { return gulp.src(config.mockFiles) .pipe(gulp.dest(config.outputDir)); }
[ "function", "deployMaterialMocks", "(", ")", "{", "return", "gulp", ".", "src", "(", "config", ".", "mockFiles", ")", ".", "pipe", "(", "gulp", ".", "dest", "(", "config", ".", "outputDir", ")", ")", ";", "}" ]
Deploy the `angular-material-mocks.js` file to the `dist` directory
[ "Deploy", "the", "angular", "-", "material", "-", "mocks", ".", "js", "file", "to", "the", "dist", "directory" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/gulp/util.js#L72-L75
train
Deploy the material mock files to the output directory
[ 30522, 3853, 21296, 8585, 14482, 5302, 10603, 1006, 1007, 1063, 2709, 26546, 1012, 5034, 2278, 1006, 9530, 8873, 2290, 1012, 12934, 8873, 4244, 1007, 1012, 8667, 1006, 26546, 1012, 4078, 2102, 1006, 9530, 8873, 2290, 1012, 6434, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_waitForCategory
function addonsManager_waitForCategory(aSpec) { var spec = aSpec || { }; var category = spec.category; var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); // TODO: restore after 1.5.1 has lan...
javascript
function addonsManager_waitForCategory(aSpec) { var spec = aSpec || { }; var category = spec.category; var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout; if (!category) throw new Error(arguments.callee.name + ": Category not specified."); // TODO: restore after 1.5.1 has lan...
[ "function", "addonsManager_waitForCategory", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "category", "=", "spec", ".", "category", ";", "var", "timeout", "=", "(", "spec", ".", "timeout", "==", "undefined", ")", "?", ...
Wait until the specified category has been selected @param {object} aSpec Object with parameters for customization Elements: category - Category element to wait for timeout - Duration to wait for the target state [optional - default: 5s]
[ "Wait", "until", "the", "specified", "category", "has", "been", "selected" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L748-L765
train
Wait until the specified category has been set
[ 30522, 3853, 5587, 5644, 24805, 4590, 1035, 3524, 29278, 16280, 20255, 2100, 1006, 2004, 5051, 2278, 1007, 1063, 13075, 28699, 1027, 2004, 5051, 2278, 1064, 1064, 1063, 1065, 1025, 13075, 4696, 1027, 28699, 1012, 4696, 1025, 13075, 2051, 58...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/chips/chips.spec.js
updateInputCursor
function updateInputCursor() { if (isValidInput) { var inputLength = input[0].value.length; try { input[0].selectionStart = input[0].selectionEnd = inputLength; } catch (e) { // Chrome does not allow setting a selection for number in...
javascript
function updateInputCursor() { if (isValidInput) { var inputLength = input[0].value.length; try { input[0].selectionStart = input[0].selectionEnd = inputLength; } catch (e) { // Chrome does not allow setting a selection for number in...
[ "function", "updateInputCursor", "(", ")", "{", "if", "(", "isValidInput", ")", "{", "var", "inputLength", "=", "input", "[", "0", "]", ".", "value", ".", "length", ";", "try", "{", "input", "[", "0", "]", ".", "selectionStart", "=", "input", "[", "0...
Updates the cursor position of the input. This is necessary to test the cursor position.
[ "Updates", "the", "cursor", "position", "of", "the", "input", ".", "This", "is", "necessary", "to", "test", "the", "cursor", "position", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/chips/chips.spec.js#L814-L829
train
Updates the cursor of the input element.
[ 30522, 3853, 10651, 2378, 18780, 10841, 25301, 2099, 1006, 1007, 1063, 2065, 1006, 2003, 10175, 28173, 16275, 4904, 1007, 1063, 13075, 7953, 7770, 13512, 2232, 1027, 7953, 1031, 1014, 1033, 1012, 3643, 1012, 3091, 1025, 3046, 1063, 7953, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js
statement
function statement(toks, i, n, handler) { if (i < n) { var tok = toks[i]; if (tok.charAt(0) === '@') { return atrule(toks, i, n, handler, true); } else { return ruleset(toks, i, n, handler); } } else { return i; } }
javascript
function statement(toks, i, n, handler) { if (i < n) { var tok = toks[i]; if (tok.charAt(0) === '@') { return atrule(toks, i, n, handler, true); } else { return ruleset(toks, i, n, handler); } } else { return i; } }
[ "function", "statement", "(", "toks", ",", "i", ",", "n", ",", "handler", ")", "{", "if", "(", "i", "<", "n", ")", "{", "var", "tok", "=", "toks", "[", "i", "]", ";", "if", "(", "tok", ".", "charAt", "(", "0", ")", "===", "'@'", ")", "{", ...
statement : ruleset | at-rule;
[ "statement", ":", "ruleset", "|", "at", "-", "rule", ";" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js#L1763-L1774
train
statement function
[ 30522, 3853, 4861, 1006, 2000, 5705, 1010, 1045, 1010, 1050, 1010, 28213, 1007, 1063, 2065, 1006, 1045, 1026, 1050, 1007, 1063, 13075, 2000, 2243, 1027, 2000, 5705, 1031, 1045, 1033, 1025, 2065, 1006, 2000, 2243, 1012, 25869, 4017, 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...
ecomfe/zrender
src/Storage.js
function (cb, context) { for (var i = 0; i < this._roots.length; i++) { this._roots[i].traverse(cb, context); } }
javascript
function (cb, context) { for (var i = 0; i < this._roots.length; i++) { this._roots[i].traverse(cb, context); } }
[ "function", "(", "cb", ",", "context", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "this", ".", "_roots", ".", "length", ";", "i", "++", ")", "{", "this", ".", "_roots", "[", "i", "]", ".", "traverse", "(", "cb", ",", "context"...
@param {Function} cb
[ "@param", "{", "Function", "}", "cb" ]
30321b57cba3149c30eacb0c1e18276f0f001b9f
https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/Storage.js#L45-L49
train
Traverse the tree
[ 30522, 3853, 1006, 17324, 1010, 6123, 1007, 1063, 2005, 1006, 13075, 1045, 1027, 1014, 1025, 1045, 1026, 2023, 1012, 1035, 6147, 1012, 3091, 1025, 1045, 1009, 1009, 1007, 1063, 2023, 1012, 1035, 6147, 1031, 1045, 1033, 1012, 20811, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/utils.js
checkSearchField
function checkSearchField(controller, searchField, searchTerm, submitButton, timeout) { controller.waitThenClick(searchField, timeout); controller.type(searchField, searchTerm); if (submitButton != undefined...
javascript
function checkSearchField(controller, searchField, searchTerm, submitButton, timeout) { controller.waitThenClick(searchField, timeout); controller.type(searchField, searchTerm); if (submitButton != undefined...
[ "function", "checkSearchField", "(", "controller", ",", "searchField", ",", "searchTerm", ",", "submitButton", ",", "timeout", ")", "{", "controller", ".", "waitThenClick", "(", "searchField", ",", "timeout", ")", ";", "controller", ".", "type", "(", "searchFiel...
Run tests against a given search form @param {MozMillController} controller MozMillController of the window to operate on @param {ElemBase} searchField The HTML input form element to test @param {string} searchTerm The search term for the test @param {ElemBase} submitButton (Optional) The forms submit button @param {n...
[ "Run", "tests", "against", "a", "given", "search", "form" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/utils.js#L232-L241
train
Checks if a search field is valid and if so checks if it is valid
[ 30522, 3853, 14148, 14644, 22693, 1006, 11486, 1010, 3945, 3790, 1010, 3945, 3334, 2213, 1010, 12040, 8569, 15474, 1010, 2051, 5833, 1007, 1063, 11486, 1012, 3524, 10760, 12273, 25230, 1006, 3945, 3790, 1010, 2051, 5833, 1007, 1025, 11486, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
airbnb/enzyme
packages/enzyme/src/ShallowWrapper.js
updatePrimaryRootContext
function updatePrimaryRootContext(wrappingComponent) { const adapter = getAdapter(wrappingComponent[OPTIONS]); const primaryWrapper = wrappingComponent[PRIMARY_WRAPPER]; const primaryRenderer = primaryWrapper[RENDERER]; const primaryNode = primaryRenderer.getNode(); const { legacyContext, providerValu...
javascript
function updatePrimaryRootContext(wrappingComponent) { const adapter = getAdapter(wrappingComponent[OPTIONS]); const primaryWrapper = wrappingComponent[PRIMARY_WRAPPER]; const primaryRenderer = primaryWrapper[RENDERER]; const primaryNode = primaryRenderer.getNode(); const { legacyContext, providerValu...
[ "function", "updatePrimaryRootContext", "(", "wrappingComponent", ")", "{", "const", "adapter", "=", "getAdapter", "(", "wrappingComponent", "[", "OPTIONS", "]", ")", ";", "const", "primaryWrapper", "=", "wrappingComponent", "[", "PRIMARY_WRAPPER", "]", ";", "const"...
Updates the context of the primary wrapper when the `wrappingComponent` re-renders.
[ "Updates", "the", "context", "of", "the", "primary", "wrapper", "when", "the", "wrappingComponent", "re", "-", "renders", "." ]
cd430eae95eba151f17e970ee77c18f09476de0e
https://github.com/airbnb/enzyme/blob/cd430eae95eba151f17e970ee77c18f09476de0e/packages/enzyme/src/ShallowWrapper.js#L1724-L1754
train
Updates the context of the primary root wrapper.
[ 30522, 3853, 10651, 18098, 9581, 2854, 3217, 4140, 8663, 18209, 1006, 12252, 9006, 29513, 3372, 1007, 1063, 9530, 3367, 15581, 2121, 1027, 2131, 8447, 13876, 2121, 1006, 12252, 9006, 29513, 3372, 1031, 7047, 1033, 1007, 1025, 9530, 3367, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/PlanningCalendar.js
function (oEvent) { var fnHandleAppsOverlay = function () { var $CalendarRowAppsOverlay = jQuery(".sapUiCalendarRowAppsOverlay"); setTimeout(function () { $CalendarRowAppsOverlay.addClass("sapUiCalendarRowAppsOverlayDragging"); }, 0); jQuery(document).one("dragend", function () { $...
javascript
function (oEvent) { var fnHandleAppsOverlay = function () { var $CalendarRowAppsOverlay = jQuery(".sapUiCalendarRowAppsOverlay"); setTimeout(function () { $CalendarRowAppsOverlay.addClass("sapUiCalendarRowAppsOverlayDragging"); }, 0); jQuery(document).one("dragend", function () { $...
[ "function", "(", "oEvent", ")", "{", "var", "fnHandleAppsOverlay", "=", "function", "(", ")", "{", "var", "$CalendarRowAppsOverlay", "=", "jQuery", "(", "\".sapUiCalendarRowAppsOverlay\"", ")", ";", "setTimeout", "(", "function", "(", ")", "{", "$CalendarRowAppsOv...
Fired when the user starts dragging an appointment.
[ "Fired", "when", "the", "user", "starts", "dragging", "an", "appointment", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/PlanningCalendar.js#L3034-L3052
train
Handles the dragend event on the apps overlay
[ 30522, 3853, 1006, 1051, 18697, 3372, 1007, 1063, 13075, 1042, 25311, 5685, 19738, 28281, 7840, 8485, 1027, 3853, 1006, 1007, 1063, 13075, 1002, 8094, 10524, 29098, 23230, 2121, 8485, 1027, 1046, 4226, 2854, 1006, 1000, 1012, 20066, 10179, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
grpc/grpc-node
packages/grpc-native-core/src/server.js
handleError
function handleError(call, error) { var statusMetadata = new Metadata(); var status = { code: constants.status.UNKNOWN, details: 'Unknown Error' }; if (error.hasOwnProperty('message')) { status.details = error.message; } if (error.hasOwnProperty('code') && Number.isInteger(error.code)) { sta...
javascript
function handleError(call, error) { var statusMetadata = new Metadata(); var status = { code: constants.status.UNKNOWN, details: 'Unknown Error' }; if (error.hasOwnProperty('message')) { status.details = error.message; } if (error.hasOwnProperty('code') && Number.isInteger(error.code)) { sta...
[ "function", "handleError", "(", "call", ",", "error", ")", "{", "var", "statusMetadata", "=", "new", "Metadata", "(", ")", ";", "var", "status", "=", "{", "code", ":", "constants", ".", "status", ".", "UNKNOWN", ",", "details", ":", "'Unknown Error'", "}...
Handle an error on a call by sending it as a status @private @param {grpc.internal~Call} call The call to send the error on @param {(Object|Error)} error The error object
[ "Handle", "an", "error", "on", "a", "call", "by", "sending", "it", "as", "a", "status" ]
b36b285f4cdb334bbd48f74c12c13bec69961488
https://github.com/grpc/grpc-node/blob/b36b285f4cdb334bbd48f74c12c13bec69961488/packages/grpc-native-core/src/server.js#L44-L70
train
Handle an error from the server
[ 30522, 3853, 5047, 2121, 29165, 1006, 2655, 1010, 7561, 1007, 1063, 13075, 3570, 11368, 8447, 2696, 1027, 2047, 27425, 1006, 1007, 1025, 13075, 3570, 1027, 1063, 3642, 1024, 5377, 2015, 1012, 3570, 1012, 4242, 1010, 4751, 1024, 1005, 4242, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/library.js
function(rm, sBgColor, sBgImgUrl, sCustomBGClass) { rm.addClass(sCustomBGClass || "sapUiGlobalBackgroundColor"); if (sBgColor && !DataType.getType("sap.ui.core.CSSColor").isValid(sBgColor)) { Log.warning(sBgColor + " is not a valid sap.ui.core.CSSColor type"); sBgColor = ""; } if (sBgColor || sBgIm...
javascript
function(rm, sBgColor, sBgImgUrl, sCustomBGClass) { rm.addClass(sCustomBGClass || "sapUiGlobalBackgroundColor"); if (sBgColor && !DataType.getType("sap.ui.core.CSSColor").isValid(sBgColor)) { Log.warning(sBgColor + " is not a valid sap.ui.core.CSSColor type"); sBgColor = ""; } if (sBgColor || sBgIm...
[ "function", "(", "rm", ",", "sBgColor", ",", "sBgImgUrl", ",", "sCustomBGClass", ")", "{", "rm", ".", "addClass", "(", "sCustomBGClass", "||", "\"sapUiGlobalBackgroundColor\"", ")", ";", "if", "(", "sBgColor", "&&", "!", "DataType", ".", "getType", "(", "\"s...
Adds CSS classes and styles to the given RenderManager, depending on the given configuration for background color and background image. To be called by control renderers supporting the global themable background image within their root tag, before they call writeClasses() and writeStyles(). @param {sap.ui.core.RenderM...
[ "Adds", "CSS", "classes", "and", "styles", "to", "the", "given", "RenderManager", "depending", "on", "the", "given", "configuration", "for", "background", "color", "and", "background", "image", ".", "To", "be", "called", "by", "control", "renderers", "supporting...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/library.js#L4181-L4195
train
Adds background background
[ 30522, 3853, 1006, 28549, 1010, 24829, 18195, 12898, 2099, 1010, 24829, 5856, 24798, 3126, 2140, 1010, 8040, 19966, 5358, 2497, 18195, 27102, 1007, 1063, 28549, 1012, 5587, 26266, 1006, 8040, 19966, 5358, 2497, 18195, 27102, 1064, 1064, 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...
jgraph/mxgraph
javascript/mxClient.js
mxConnectionHandler
function mxConnectionHandler(graph, factoryMethod) { mxEventSource.call(this); if (graph != null) { this.graph = graph; this.factoryMethod = factoryMethod; this.init(); // Handles escape keystrokes this.escapeHandler = mxUtils.bind(this, function(sender, evt) { this.reset(); }); this.graph...
javascript
function mxConnectionHandler(graph, factoryMethod) { mxEventSource.call(this); if (graph != null) { this.graph = graph; this.factoryMethod = factoryMethod; this.init(); // Handles escape keystrokes this.escapeHandler = mxUtils.bind(this, function(sender, evt) { this.reset(); }); this.graph...
[ "function", "mxConnectionHandler", "(", "graph", ",", "factoryMethod", ")", "{", "mxEventSource", ".", "call", "(", "this", ")", ";", "if", "(", "graph", "!=", "null", ")", "{", "this", ".", "graph", "=", "graph", ";", "this", ".", "factoryMethod", "=", ...
Copyright (c) 2006-2016, JGraph Ltd Copyright (c) 2006-2016, Gaudenz Alder Class: mxConnectionHandler Graph event handler that creates new connections. Uses <mxTerminalMarker> for finding and highlighting the source and target vertices and <factoryMethod> to create the edge instance. This handler is built-into <mxGr...
[ "Copyright", "(", "c", ")", "2006", "-", "2016", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2016", "Gaudenz", "Alder", "Class", ":", "mxConnectionHandler" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L72168-L72186
train
This is the base class for all connection events
[ 30522, 3853, 25630, 8663, 2638, 7542, 11774, 3917, 1006, 10629, 1010, 4713, 11368, 6806, 2094, 1007, 1063, 25630, 18697, 7666, 8162, 3401, 1012, 2655, 1006, 2023, 1007, 1025, 2065, 1006, 10629, 999, 1027, 19701, 1007, 1063, 2023, 1012, 1062...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
processQueue
function processQueue() { var queue = nextTick.queue; var digest = nextTick.digest; nextTick.queue = []; nextTick.timeout = null; nextTick.digest = false; queue.forEach(function(queueItem) { var skip = queueItem.scope && queueItem.scope.$$destroyed; ...
javascript
function processQueue() { var queue = nextTick.queue; var digest = nextTick.digest; nextTick.queue = []; nextTick.timeout = null; nextTick.digest = false; queue.forEach(function(queueItem) { var skip = queueItem.scope && queueItem.scope.$$destroyed; ...
[ "function", "processQueue", "(", ")", "{", "var", "queue", "=", "nextTick", ".", "queue", ";", "var", "digest", "=", "nextTick", ".", "digest", ";", "nextTick", ".", "queue", "=", "[", "]", ";", "nextTick", ".", "timeout", "=", "null", ";", "nextTick",...
Grab a copy of the current queue Clear the queue for future use Process the existing queue Trigger digest if necessary
[ "Grab", "a", "copy", "of", "the", "current", "queue", "Clear", "the", "queue", "for", "future", "use", "Process", "the", "existing", "queue", "Trigger", "digest", "if", "necessary" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/util/util.js#L695-L711
train
Process the queue
[ 30522, 3853, 2832, 4226, 5657, 1006, 1007, 1063, 13075, 24240, 1027, 2279, 26348, 1012, 24240, 1025, 13075, 17886, 1027, 2279, 26348, 1012, 17886, 1025, 2279, 26348, 1012, 24240, 1027, 1031, 1033, 1025, 2279, 26348, 1012, 2051, 5833, 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...
jgraph/mxgraph
javascript/examples/grapheditor/www/js/Graph.js
createHint
function createHint() { var hint = document.createElement('div'); hint.className = 'geHint'; hint.style.whiteSpace = 'nowrap'; hint.style.position = 'absolute'; return hint; }
javascript
function createHint() { var hint = document.createElement('div'); hint.className = 'geHint'; hint.style.whiteSpace = 'nowrap'; hint.style.position = 'absolute'; return hint; }
[ "function", "createHint", "(", ")", "{", "var", "hint", "=", "document", ".", "createElement", "(", "'div'", ")", ";", "hint", ".", "className", "=", "'geHint'", ";", "hint", ".", "style", ".", "whiteSpace", "=", "'nowrap'", ";", "hint", ".", "style", ...
Hints on handlers
[ "Hints", "on", "handlers" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/examples/grapheditor/www/js/Graph.js#L7566-L7574
train
Creates a hint element
[ 30522, 3853, 3443, 10606, 2102, 1006, 1007, 1063, 13075, 9374, 1027, 6254, 1012, 3443, 12260, 3672, 1006, 1005, 4487, 2615, 1005, 1007, 1025, 9374, 1012, 2465, 18442, 1027, 1005, 16216, 10606, 2102, 1005, 1025, 9374, 1012, 2806, 1012, 12461...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getAddonButton
function addonsManager_getAddonButton(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var button = spec.button; if (!button) throw new Error(arguments.callee.name + ": Button not specified."); return this.getAddonChildElement({addon: addon, type: button + "Button"}); }
javascript
function addonsManager_getAddonButton(aSpec) { var spec = aSpec || { }; var addon = spec.addon; var button = spec.button; if (!button) throw new Error(arguments.callee.name + ": Button not specified."); return this.getAddonChildElement({addon: addon, type: button + "Button"}); }
[ "function", "addonsManager_getAddonButton", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "addon", "=", "spec", ".", "addon", ";", "var", "button", "=", "spec", ".", "button", ";", "if", "(", "!", "button", ")", "th...
Returns the element of the specified add-ons button @param {object} aSpec Information on which add-on to operate on Elements: addon - Add-on element button - Button (disable, enable, preferences, remove) @returns Add-on button @type {ElemBase}
[ "Returns", "the", "element", "of", "the", "specified", "add", "-", "ons", "button" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L460-L469
train
Get the button element for the specified add - ons
[ 30522, 3853, 5587, 5644, 24805, 4590, 1035, 2131, 4215, 5280, 8569, 15474, 1006, 2004, 5051, 2278, 1007, 1063, 13075, 28699, 1027, 2004, 5051, 2278, 1064, 1064, 1063, 1065, 1025, 13075, 5587, 2239, 1027, 28699, 1012, 5587, 2239, 1025, 13075...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/one-var.js
splitDeclarations
function splitDeclarations(declaration) { return fixer => declaration.declarations.map(declarator => { const tokenAfterDeclarator = sourceCode.getTokenAfter(declarator); if (tokenAfterDeclarator === null) { return null; } ...
javascript
function splitDeclarations(declaration) { return fixer => declaration.declarations.map(declarator => { const tokenAfterDeclarator = sourceCode.getTokenAfter(declarator); if (tokenAfterDeclarator === null) { return null; } ...
[ "function", "splitDeclarations", "(", "declaration", ")", "{", "return", "fixer", "=>", "declaration", ".", "declarations", ".", "map", "(", "declarator", "=>", "{", "const", "tokenAfterDeclarator", "=", "sourceCode", ".", "getTokenAfter", "(", "declarator", ")", ...
Fixer to split a VariableDeclaration into individual declarations @param {VariableDeclaration} declaration The `VariableDeclaration` to split @returns {Function} The fixer function
[ "Fixer", "to", "split", "a", "VariableDeclaration", "into", "individual", "declarations" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/one-var.js#L293-L340
train
Split declarations into two
[ 30522, 3853, 3975, 3207, 20464, 25879, 8496, 1006, 8170, 1007, 1063, 2709, 8081, 2121, 1027, 1028, 8170, 1012, 8170, 2015, 1012, 4949, 1006, 11703, 8017, 8844, 1027, 1028, 1063, 9530, 3367, 19204, 10354, 3334, 3207, 20464, 25879, 2953, 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.documentation/src/sap/ui/documentation/sdk/controller/util/SearchUtil.js
search
function search(sQuery) { return new Promise(function(resolve, reject) { init().then(function() { oWorker.addEventListener('message', function(oEvent) { var oData = oEvent.data; resolve(oData && oData[WORKER.RESPONSE_FIELDS.SEARCH_RESULT]); }, false); oWorker.postMessage({ "cm...
javascript
function search(sQuery) { return new Promise(function(resolve, reject) { init().then(function() { oWorker.addEventListener('message', function(oEvent) { var oData = oEvent.data; resolve(oData && oData[WORKER.RESPONSE_FIELDS.SEARCH_RESULT]); }, false); oWorker.postMessage({ "cm...
[ "function", "search", "(", "sQuery", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "init", "(", ")", ".", "then", "(", "function", "(", ")", "{", "oWorker", ".", "addEventListener", "(", "'message'", ",...
Initiates search and return a promise with the search result @param sQuery the search string @returns {Promise<any>}
[ "Initiates", "search", "and", "return", "a", "promise", "with", "the", "search", "result" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/util/SearchUtil.js#L59-L75
train
Search for a query in the cluster
[ 30522, 3853, 3945, 1006, 5490, 13094, 2100, 1007, 1063, 2709, 2047, 4872, 1006, 3853, 1006, 10663, 1010, 15454, 1007, 1063, 1999, 4183, 1006, 1007, 1012, 2059, 1006, 3853, 1006, 1007, 1063, 27593, 2953, 5484, 1012, 5587, 18697, 3372, 9863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
getCompatibilityInfoForVersion
function getCompatibilityInfoForVersion(extVersion, apiVersion) { var requiredVersion = (extVersion.brackets || (extVersion.engines && extVersion.engines.brackets)), result = {}; result.isCompatible = !requiredVersion || semver.satisfies(apiVersion, requiredVersion); if (result.isCom...
javascript
function getCompatibilityInfoForVersion(extVersion, apiVersion) { var requiredVersion = (extVersion.brackets || (extVersion.engines && extVersion.engines.brackets)), result = {}; result.isCompatible = !requiredVersion || semver.satisfies(apiVersion, requiredVersion); if (result.isCom...
[ "function", "getCompatibilityInfoForVersion", "(", "extVersion", ",", "apiVersion", ")", "{", "var", "requiredVersion", "=", "(", "extVersion", ".", "brackets", "||", "(", "extVersion", ".", "engines", "&&", "extVersion", ".", "engines", ".", "brackets", ")", ")...
Determines if the given versions[] entry is compatible with the given Brackets API version, and if not specifies why. @param {Object} extVersion @param {string} apiVersion @return {{isCompatible: boolean, requiresNewer: ?boolean, compatibleVersion: ?string}}
[ "Determines", "if", "the", "given", "versions", "[]", "entry", "is", "compatible", "with", "the", "given", "Brackets", "API", "version", "and", "if", "not", "specifies", "why", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensibility/ExtensionManager.js#L311-L336
train
Get compatibility info for a version
[ 30522, 3853, 2131, 9006, 24952, 8553, 2378, 14876, 29278, 27774, 1006, 4654, 9189, 2545, 3258, 1010, 17928, 27774, 1007, 1063, 13075, 3223, 27774, 1027, 1006, 4654, 9189, 2545, 3258, 1012, 19719, 1064, 1064, 1006, 4654, 9189, 2545, 3258, 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...
angular/material
src/components/datepicker/js/dateUtil.js
createDateAtMidnight
function createDateAtMidnight(opt_value) { var date; if (angular.isUndefined(opt_value)) { date = new Date(); } else { date = new Date(opt_value); } setDateTimeToMidnight(date); return date; }
javascript
function createDateAtMidnight(opt_value) { var date; if (angular.isUndefined(opt_value)) { date = new Date(); } else { date = new Date(opt_value); } setDateTimeToMidnight(date); return date; }
[ "function", "createDateAtMidnight", "(", "opt_value", ")", "{", "var", "date", ";", "if", "(", "angular", ".", "isUndefined", "(", "opt_value", ")", ")", "{", "date", "=", "new", "Date", "(", ")", ";", "}", "else", "{", "date", "=", "new", "Date", "(...
Creates a date with the time set to midnight. Drop-in replacement for two forms of the Date constructor: 1. No argument for Date representing now. 2. Single-argument value representing number of seconds since Unix Epoch or a Date object. @param {number|Date=} opt_value @return {Date} New date with time set to midnight.
[ "Creates", "a", "date", "with", "the", "time", "set", "to", "midnight", ".", "Drop", "-", "in", "replacement", "for", "two", "forms", "of", "the", "Date", "constructor", ":", "1", ".", "No", "argument", "for", "Date", "representing", "now", ".", "2", "...
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/datepicker/js/dateUtil.js#L217-L226
train
Creates a date at midnight
[ 30522, 3853, 2580, 3686, 4017, 4328, 2094, 15864, 1006, 23569, 1035, 3643, 1007, 1063, 13075, 3058, 1025, 2065, 1006, 16108, 1012, 2003, 8630, 28344, 1006, 23569, 1035, 3643, 1007, 1007, 1063, 3058, 1027, 2047, 3058, 1006, 1007, 1025, 1065,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
uber/deck.gl
website/src/static/workers/util.js
decodePolyline
function decodePolyline(str, precision) { let index = 0, lat = 0, lng = 0, coordinates = [], shift = 0, result = 0, byte = null, latitude_change, longitude_change, factor = Math.pow(10, precision || 5); // Coordinates have variable length when encoded, so just keep // trac...
javascript
function decodePolyline(str, precision) { let index = 0, lat = 0, lng = 0, coordinates = [], shift = 0, result = 0, byte = null, latitude_change, longitude_change, factor = Math.pow(10, precision || 5); // Coordinates have variable length when encoded, so just keep // trac...
[ "function", "decodePolyline", "(", "str", ",", "precision", ")", "{", "let", "index", "=", "0", ",", "lat", "=", "0", ",", "lng", "=", "0", ",", "coordinates", "=", "[", "]", ",", "shift", "=", "0", ",", "result", "=", "0", ",", "byte", "=", "n...
https://github.com/mapbox/polyline Decodes to a [longitude, latitude] coordinates array. This is adapted from the implementation in Project-OSRM. @param {String} str @param {Number} precision @returns {Array} @see https://github.com/Project-OSRM/osrm-frontend/blob/master/WebContent/routing/OSRM.RoutingGeometry.js
[ "https", ":", "//", "github", ".", "com", "/", "mapbox", "/", "polyline" ]
a2010448b7f268bbd03617b812334c68a6b9e5b2
https://github.com/uber/deck.gl/blob/a2010448b7f268bbd03617b812334c68a6b9e5b2/website/src/static/workers/util.js#L33-L80
train
Decode a polyline from a string
[ 30522, 3853, 21933, 3207, 18155, 8516, 3170, 1006, 2358, 2099, 1010, 11718, 1007, 1063, 2292, 5950, 1027, 1014, 1010, 2474, 2102, 1027, 1014, 1010, 1048, 3070, 1027, 1014, 1010, 12093, 1027, 1031, 1033, 1010, 5670, 1027, 1014, 1010, 2765, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/services/registry/componentRegistry.js
function(handle) { if (!isValidID(handle)) return null; var i, j, instance; for (i = 0, j = instances.length; i < j; i++) { instance = instances[i]; if (instance.$$mdHandle === handle) { return instance; } } return null; }
javascript
function(handle) { if (!isValidID(handle)) return null; var i, j, instance; for (i = 0, j = instances.length; i < j; i++) { instance = instances[i]; if (instance.$$mdHandle === handle) { return instance; } } return null; }
[ "function", "(", "handle", ")", "{", "if", "(", "!", "isValidID", "(", "handle", ")", ")", "return", "null", ";", "var", "i", ",", "j", ",", "instance", ";", "for", "(", "i", "=", "0", ",", "j", "=", "instances", ".", "length", ";", "i", "<", ...
Get a registered instance. @param handle the String handle to look up for a registered instance.
[ "Get", "a", "registered", "instance", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/registry/componentRegistry.js#L43-L54
train
Returns the instance of the given handle
[ 30522, 3853, 1006, 5047, 1007, 1063, 2065, 1006, 999, 2003, 10175, 28173, 2094, 1006, 5047, 1007, 1007, 2709, 19701, 1025, 13075, 1045, 1010, 1046, 1010, 6013, 1025, 2005, 1006, 1045, 1027, 1014, 1010, 1046, 1027, 12107, 1012, 3091, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
vuejs/vue-devtools
src/backend/index.js
findQualifiedChildren
function findQualifiedChildren (instance) { return isQualified(instance) ? capture(instance) : findQualifiedChildrenFromList(instance.$children).concat( instance._vnode && instance._vnode.children // Find functional components in recursively in non-functional vnodes. ? flatten(instance._...
javascript
function findQualifiedChildren (instance) { return isQualified(instance) ? capture(instance) : findQualifiedChildrenFromList(instance.$children).concat( instance._vnode && instance._vnode.children // Find functional components in recursively in non-functional vnodes. ? flatten(instance._...
[ "function", "findQualifiedChildren", "(", "instance", ")", "{", "return", "isQualified", "(", "instance", ")", "?", "capture", "(", "instance", ")", ":", "findQualifiedChildrenFromList", "(", "instance", ".", "$children", ")", ".", "concat", "(", "instance", "."...
Find qualified children from a single instance. If the instance itself is qualified, just return itself. This is ok because [].concat works in both cases. @param {Vue|Vnode} instance @return {Vue|Array}
[ "Find", "qualified", "children", "from", "a", "single", "instance", ".", "If", "the", "instance", "itself", "is", "qualified", "just", "return", "itself", ".", "This", "is", "ok", "because", "[]", ".", "concat", "works", "in", "both", "cases", "." ]
4de4b86388453cd07f0c1bf967d43a4dd4b011c9
https://github.com/vuejs/vue-devtools/blob/4de4b86388453cd07f0c1bf967d43a4dd4b011c9/src/backend/index.js#L320-L331
train
Find all qualified children of a component
[ 30522, 3853, 2424, 26426, 7810, 19339, 7389, 1006, 6013, 1007, 1063, 2709, 2003, 26426, 7810, 1006, 6013, 1007, 1029, 5425, 1006, 6013, 1007, 1024, 2424, 26426, 7810, 19339, 7389, 19699, 5358, 9863, 1006, 6013, 1012, 1002, 2336, 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...
eslint/eslint
lib/util/npm-utils.js
findPackageJson
function findPackageJson(startDir) { let dir = path.resolve(startDir || process.cwd()); do { const pkgFile = path.join(dir, "package.json"); if (!fs.existsSync(pkgFile) || !fs.statSync(pkgFile).isFile()) { dir = path.join(dir, ".."); continue; } return p...
javascript
function findPackageJson(startDir) { let dir = path.resolve(startDir || process.cwd()); do { const pkgFile = path.join(dir, "package.json"); if (!fs.existsSync(pkgFile) || !fs.statSync(pkgFile).isFile()) { dir = path.join(dir, ".."); continue; } return p...
[ "function", "findPackageJson", "(", "startDir", ")", "{", "let", "dir", "=", "path", ".", "resolve", "(", "startDir", "||", "process", ".", "cwd", "(", ")", ")", ";", "do", "{", "const", "pkgFile", "=", "path", ".", "join", "(", "dir", ",", "\"packag...
------------------------------------------------------------------------------ Helpers ------------------------------------------------------------------------------ Find the closest package.json file, starting at process.cwd (by default), and working up to root. @param {string} [startDir=process.cwd()] Starting di...
[ "------------------------------------------------------------------------------", "Helpers", "------------------------------------------------------------------------------", "Find", "the", "closest", "package", ".", "json", "file", "starting", "at", "process", ".", "cwd", "(", "by",...
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/npm-utils.js#L28-L41
train
Find the package. json file in the specified directory
[ 30522, 3853, 2424, 23947, 4270, 22578, 2239, 1006, 2707, 4305, 2099, 1007, 1063, 2292, 16101, 1027, 4130, 1012, 10663, 1006, 2707, 4305, 2099, 1064, 1064, 2832, 1012, 19296, 2094, 1006, 1007, 1007, 1025, 2079, 1063, 9530, 3367, 1052, 2243, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/calendar/Calendar.js
function () { var range = this._model.get('range'); var rg = range; if (zrUtil.isArray(rg) && rg.length === 1) { rg = rg[0]; } if (/^\d{4}$/.test(rg)) { range = [rg + '-01-01', rg + '-12-31']; } if (/^\d{4}[\/|-]\d{1,2}$/.test(rg)) { ...
javascript
function () { var range = this._model.get('range'); var rg = range; if (zrUtil.isArray(rg) && rg.length === 1) { rg = rg[0]; } if (/^\d{4}$/.test(rg)) { range = [rg + '-01-01', rg + '-12-31']; } if (/^\d{4}[\/|-]\d{1,2}$/.test(rg)) { ...
[ "function", "(", ")", "{", "var", "range", "=", "this", ".", "_model", ".", "get", "(", "'range'", ")", ";", "var", "rg", "=", "range", ";", "if", "(", "zrUtil", ".", "isArray", "(", "rg", ")", "&&", "rg", ".", "length", "===", "1", ")", "{", ...
initRange @private @return {Array} [start, end]
[ "initRange" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/coord/calendar/Calendar.js#L319-L353
train
Get the range of the log
[ 30522, 3853, 1006, 1007, 1063, 13075, 2846, 1027, 2023, 1012, 1035, 2944, 1012, 2131, 1006, 1005, 2846, 1005, 1007, 1025, 13075, 1054, 2290, 1027, 2846, 1025, 2065, 1006, 1062, 22134, 4014, 1012, 18061, 11335, 2100, 1006, 1054, 2290, 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...
ReactTraining/react-router
packages/react-router/modules/Prompt.js
Prompt
function Prompt({ message, when = true }) { return ( <RouterContext.Consumer> {context => { invariant(context, "You should not use <Prompt> outside a <Router>"); if (!when || context.staticContext) return null; const method = context.history.block; return ( <Life...
javascript
function Prompt({ message, when = true }) { return ( <RouterContext.Consumer> {context => { invariant(context, "You should not use <Prompt> outside a <Router>"); if (!when || context.staticContext) return null; const method = context.history.block; return ( <Life...
[ "function", "Prompt", "(", "{", "message", ",", "when", "=", "true", "}", ")", "{", "return", "(", "<", "RouterContext", ".", "Consumer", ">", "\n ", "{", "context", "=>", "{", "invariant", "(", "context", ",", "\"You should not use <Prompt> outside a <Ro...
The public API for prompting the user before navigating away from a screen.
[ "The", "public", "API", "for", "prompting", "the", "user", "before", "navigating", "away", "from", "a", "screen", "." ]
82ce94c3b4e74f71018d104df6dc999801fa9ab2
https://github.com/ReactTraining/react-router/blob/82ce94c3b4e74f71018d104df6dc999801fa9ab2/packages/react-router/modules/Prompt.js#L11-L41
train
Prompt a user to enter a new message
[ 30522, 3853, 25732, 1006, 1063, 4471, 1010, 2043, 1027, 2995, 1065, 1007, 1063, 2709, 1006, 1026, 2799, 29566, 10111, 18413, 1012, 7325, 1028, 1063, 6123, 1027, 1028, 1063, 23915, 1006, 6123, 1010, 1000, 2017, 2323, 2025, 2224, 1026, 25732,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
muaz-khan/RTCMultiConnection
dev/getUserMedia.js
setStreamType
function setStreamType(constraints, stream) { if (constraints.mandatory && constraints.mandatory.chromeMediaSource) { stream.isScreen = true; } else if (constraints.mozMediaSource || constraints.mediaSource) { stream.isScreen = true; } else if (constraints.video) { stream.isVideo = t...
javascript
function setStreamType(constraints, stream) { if (constraints.mandatory && constraints.mandatory.chromeMediaSource) { stream.isScreen = true; } else if (constraints.mozMediaSource || constraints.mediaSource) { stream.isScreen = true; } else if (constraints.video) { stream.isVideo = t...
[ "function", "setStreamType", "(", "constraints", ",", "stream", ")", "{", "if", "(", "constraints", ".", "mandatory", "&&", "constraints", ".", "mandatory", ".", "chromeMediaSource", ")", "{", "stream", ".", "isScreen", "=", "true", ";", "}", "else", "if", ...
getUserMediaHandler.js
[ "getUserMediaHandler", ".", "js" ]
2032ce949bde30b43a3d2666e0f1e5afbf337f3d
https://github.com/muaz-khan/RTCMultiConnection/blob/2032ce949bde30b43a3d2666e0f1e5afbf337f3d/dev/getUserMedia.js#L3-L13
train
Sets the type of the given stream based on the constraints
[ 30522, 3853, 4520, 25379, 13874, 1006, 14679, 1010, 5460, 1007, 1063, 2065, 1006, 14679, 1012, 10915, 1004, 1004, 14679, 1012, 10915, 1012, 18546, 16969, 6499, 3126, 3401, 1007, 1063, 5460, 1012, 26354, 24410, 1027, 2995, 1025, 1065, 2842, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
expressjs/express
lib/utils.js
createETagGenerator
function createETagGenerator (options) { return function generateETag (body, encoding) { var buf = !Buffer.isBuffer(body) ? Buffer.from(body, encoding) : body return etag(buf, options) } }
javascript
function createETagGenerator (options) { return function generateETag (body, encoding) { var buf = !Buffer.isBuffer(body) ? Buffer.from(body, encoding) : body return etag(buf, options) } }
[ "function", "createETagGenerator", "(", "options", ")", "{", "return", "function", "generateETag", "(", "body", ",", "encoding", ")", "{", "var", "buf", "=", "!", "Buffer", ".", "isBuffer", "(", "body", ")", "?", "Buffer", ".", "from", "(", "body", ",", ...
Create an ETag generator function, generating ETags with the given options. @param {object} options @return {function} @private
[ "Create", "an", "ETag", "generator", "function", "generating", "ETags", "with", "the", "given", "options", "." ]
dc538f6e810bd462c98ee7e6aae24c64d4b1da93
https://github.com/expressjs/express/blob/dc538f6e810bd462c98ee7e6aae24c64d4b1da93/lib/utils.js#L274-L282
train
Creates a function that returns an ETag generator that will generate the ETag for the given body.
[ 30522, 3853, 3443, 12928, 13871, 24454, 8844, 1006, 7047, 1007, 1063, 2709, 3853, 9699, 12928, 2290, 1006, 2303, 1010, 17181, 1007, 1063, 13075, 20934, 2546, 1027, 999, 17698, 1012, 2003, 8569, 12494, 1006, 2303, 1007, 1029, 17698, 1012, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js
function () { var aAllMeasureNames, oCondition, sOrderByOptionString = null, aSortConditions = this._oSortExpression ? this._oSortExpression._aSortCondition : [], i, n = aSortConditions.length; if (n) { aAllMeasureNames = this._oQueryResult.getAllMeasureNames(); for (i = 0;...
javascript
function () { var aAllMeasureNames, oCondition, sOrderByOptionString = null, aSortConditions = this._oSortExpression ? this._oSortExpression._aSortCondition : [], i, n = aSortConditions.length; if (n) { aAllMeasureNames = this._oQueryResult.getAllMeasureNames(); for (i = 0;...
[ "function", "(", ")", "{", "var", "aAllMeasureNames", ",", "oCondition", ",", "sOrderByOptionString", "=", "null", ",", "aSortConditions", "=", "this", ".", "_oSortExpression", "?", "this", ".", "_oSortExpression", ".", "_aSortCondition", ":", "[", "]", ",", "...
Get the value for the OData system query option $orderby corresponding to the sort expression. @returns {string} The $orderby value for the sort expression or <code>null</code>
[ "Get", "the", "value", "for", "the", "OData", "system", "query", "option", "$orderby", "corresponding", "to", "the", "sort", "expression", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/odata4analytics.js#L4647-L4674
train
Returns the order by option string for the order by clause
[ 30522, 3853, 1006, 1007, 1063, 13075, 9779, 3363, 4168, 3022, 5397, 18442, 2015, 1010, 1051, 8663, 20562, 1010, 2061, 26764, 3762, 7361, 9285, 18886, 3070, 1027, 19701, 1010, 2004, 11589, 8663, 20562, 2015, 1027, 2023, 1012, 1035, 9808, 115...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/_Cache.js
setCount
function setCount(mChangeListeners, sPath, aCollection, vCount) { // Note: @odata.count is of type Edm.Int64, represented as a string in OData responses; // $count should be a number and the loss of precision is acceptable if (typeof vCount === "string") { vCount = parseInt(vCount); } // Note: this relies ...
javascript
function setCount(mChangeListeners, sPath, aCollection, vCount) { // Note: @odata.count is of type Edm.Int64, represented as a string in OData responses; // $count should be a number and the loss of precision is acceptable if (typeof vCount === "string") { vCount = parseInt(vCount); } // Note: this relies ...
[ "function", "setCount", "(", "mChangeListeners", ",", "sPath", ",", "aCollection", ",", "vCount", ")", "{", "// Note: @odata.count is of type Edm.Int64, represented as a string in OData responses;", "// $count should be a number and the loss of precision is acceptable", "if", "(", "t...
Sets the collection's $count: a number representing the sum of the element count on server-side and the number of transient elements created on the client. It may be <code>undefined</code>, but not <code>Infinity</code>. @param {object} mChangeListeners A map of change listeners by path @param {string} sPath The path ...
[ "Sets", "the", "collection", "s", "$count", ":", "a", "number", "representing", "the", "sum", "of", "the", "element", "count", "on", "server", "-", "side", "and", "the", "number", "of", "transient", "elements", "created", "on", "the", "client", ".", "It", ...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/lib/_Cache.js#L62-L70
train
Sets the count of the items in the given collection.
[ 30522, 3853, 2275, 3597, 16671, 1006, 11338, 18003, 29282, 6528, 2545, 1010, 14690, 2232, 1010, 9353, 14511, 18491, 1010, 18315, 21723, 1007, 1063, 1013, 1013, 3602, 1024, 1030, 1051, 2850, 2696, 1012, 4175, 2003, 1997, 2828, 3968, 2213, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.dt/src/sap/ui/dt/ElementOverlay.js
function(oChild1, oChild2) { var oGeometry1 = DOMUtil.getGeometry(oChild1); var oGeometry2 = DOMUtil.getGeometry(oChild2); var oPosition1 = oGeometry1 && oGeometry1.position; var oPosition2 = oGeometry2 && oGeometry2.position; if (oPosition1 && oPosition2) { var iBottom1 = oPosition1.top + oGeometry...
javascript
function(oChild1, oChild2) { var oGeometry1 = DOMUtil.getGeometry(oChild1); var oGeometry2 = DOMUtil.getGeometry(oChild2); var oPosition1 = oGeometry1 && oGeometry1.position; var oPosition2 = oGeometry2 && oGeometry2.position; if (oPosition1 && oPosition2) { var iBottom1 = oPosition1.top + oGeometry...
[ "function", "(", "oChild1", ",", "oChild2", ")", "{", "var", "oGeometry1", "=", "DOMUtil", ".", "getGeometry", "(", "oChild1", ")", ";", "var", "oGeometry2", "=", "DOMUtil", ".", "getGeometry", "(", "oChild2", ")", ";", "var", "oPosition1", "=", "oGeometry...
compares two DOM Nodes and returns 1, if first child should be bellow in dom order
[ "compares", "two", "DOM", "Nodes", "and", "returns", "1", "if", "first", "child", "should", "be", "bellow", "in", "dom", "order" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ElementOverlay.js#L388-L453
train
Returns - 1 if the two nodes are equal or 1 if the two nodes are equal or 0 if the two nodes are equal
[ 30522, 3853, 1006, 28166, 4014, 2094, 2487, 1010, 28166, 4014, 2094, 2475, 1007, 1063, 13075, 13958, 8780, 24327, 2487, 1027, 14383, 21823, 2140, 1012, 2131, 3351, 8462, 11129, 1006, 28166, 4014, 2094, 2487, 1007, 1025, 13075, 13958, 8780, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
pixijs/pixi.js
packages/prepare/src/BasePrepare.js
drawText
function drawText(helper, item) { if (item instanceof Text) { // updating text will return early if it is not dirty item.updateText(true); return true; } return false; }
javascript
function drawText(helper, item) { if (item instanceof Text) { // updating text will return early if it is not dirty item.updateText(true); return true; } return false; }
[ "function", "drawText", "(", "helper", ",", "item", ")", "{", "if", "(", "item", "instanceof", "Text", ")", "{", "// updating text will return early if it is not dirty", "item", ".", "updateText", "(", "true", ")", ";", "return", "true", ";", "}", "return", "f...
Built-in hook to draw PIXI.Text to its texture. @private @param {PIXI.Renderer|PIXI.CanvasPrepare} helper - Not used by this upload handler @param {PIXI.DisplayObject} item - Item to check @return {boolean} If item was uploaded.
[ "Built", "-", "in", "hook", "to", "draw", "PIXI", ".", "Text", "to", "its", "texture", "." ]
99ae03b7565ae7ca5a6de633b0a277f7128fa4d0
https://github.com/pixijs/pixi.js/blob/99ae03b7565ae7ca5a6de633b0a277f7128fa4d0/packages/prepare/src/BasePrepare.js#L405-L416
train
draw text from a node
[ 30522, 3853, 4009, 18209, 1006, 2393, 2121, 1010, 8875, 1007, 1063, 2065, 1006, 8875, 6013, 11253, 3793, 1007, 1063, 1013, 1013, 2039, 16616, 3793, 2097, 2709, 2220, 2065, 2009, 2003, 2025, 6530, 8875, 1012, 10651, 18209, 1006, 2995, 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...
NetEase/pomelo
lib/util/appUtil.js
function(app, args) { app.set(Constants.RESERVED.ENV, args.env || process.env.NODE_ENV || Constants.RESERVED.ENV_DEV, true); }
javascript
function(app, args) { app.set(Constants.RESERVED.ENV, args.env || process.env.NODE_ENV || Constants.RESERVED.ENV_DEV, true); }
[ "function", "(", "app", ",", "args", ")", "{", "app", ".", "set", "(", "Constants", ".", "RESERVED", ".", "ENV", ",", "args", ".", "env", "||", "process", ".", "env", ".", "NODE_ENV", "||", "Constants", ".", "RESERVED", ".", "ENV_DEV", ",", "true", ...
Setup enviroment.
[ "Setup", "enviroment", "." ]
defcf019631ed399cc4dad932d3b028a04a039a4
https://github.com/NetEase/pomelo/blob/defcf019631ed399cc4dad932d3b028a04a039a4/lib/util/appUtil.js#L193-L195
train
Set the environment variable
[ 30522, 3853, 1006, 10439, 1010, 12098, 5620, 1007, 1063, 10439, 1012, 2275, 1006, 5377, 2015, 1012, 9235, 1012, 4372, 2615, 1010, 12098, 5620, 1012, 4372, 2615, 1064, 1064, 2832, 1012, 4372, 2615, 1012, 13045, 1035, 4372, 2615, 1064, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js
logUnsupportedPropertyInSelect
function logUnsupportedPropertyInSelect(sPath, sSelectedProperty, oDimensionOrMeasure) { var sDimensionOrMeasure = oDimensionOrMeasure instanceof sap.ui.model.analytics.odata4analytics.Dimension ? "dimension" : "measure"; if (oDimensionOrMeasure.getName() === sSelectedProperty) { oLogger.warning("Ignor...
javascript
function logUnsupportedPropertyInSelect(sPath, sSelectedProperty, oDimensionOrMeasure) { var sDimensionOrMeasure = oDimensionOrMeasure instanceof sap.ui.model.analytics.odata4analytics.Dimension ? "dimension" : "measure"; if (oDimensionOrMeasure.getName() === sSelectedProperty) { oLogger.warning("Ignor...
[ "function", "logUnsupportedPropertyInSelect", "(", "sPath", ",", "sSelectedProperty", ",", "oDimensionOrMeasure", ")", "{", "var", "sDimensionOrMeasure", "=", "oDimensionOrMeasure", "instanceof", "sap", ".", "ui", ".", "model", ".", "analytics", ".", "odata4analytics", ...
Logs a warning that the given select property is not supported. Either it is a dimension or a measure or it is associated with a dimension or a measure which is not part of the analytical info. @param {string} sPath The binding path @param {string} sSelectedProperty The name of the selected property @param {sap.ui.mod...
[ "Logs", "a", "warning", "that", "the", "given", "select", "property", "is", "not", "supported", ".", "Either", "it", "is", "a", "dimension", "or", "a", "measure", "or", "it", "is", "associated", "with", "a", "dimension", "or", "a", "measure", "which", "i...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js#L157-L177
train
Logs an unsupported property in the select binding
[ 30522, 3853, 8833, 4609, 6342, 9397, 15613, 21572, 4842, 3723, 7076, 12260, 6593, 1006, 14690, 2232, 1010, 7020, 12260, 10985, 21572, 4842, 3723, 1010, 21045, 3549, 10992, 2953, 4168, 3022, 5397, 1007, 1063, 13075, 17371, 14428, 3619, 3258, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Dogfalo/materialize
extras/noUiSlider/nouislider.js
getClosestHandle
function getClosestHandle ( proposal ) { var closest = 100; var handleNumber = false; scope_Handles.forEach(function(handle, index){ // Disabled handles are ignored if ( handle.hasAttribute('disabled') ) { return; ...
javascript
function getClosestHandle ( proposal ) { var closest = 100; var handleNumber = false; scope_Handles.forEach(function(handle, index){ // Disabled handles are ignored if ( handle.hasAttribute('disabled') ) { return; ...
[ "function", "getClosestHandle", "(", "proposal", ")", "{", "var", "closest", "=", "100", ";", "var", "handleNumber", "=", "false", ";", "scope_Handles", ".", "forEach", "(", "function", "(", "handle", ",", "index", ")", "{", "// Disabled handles are ignored", ...
Find handle closest to a certain percentage on the slider
[ "Find", "handle", "closest", "to", "a", "certain", "percentage", "on", "the", "slider" ]
1122efadad8f1433d404696f7613e3cc13fb83a4
https://github.com/Dogfalo/materialize/blob/1122efadad8f1433d404696f7613e3cc13fb83a4/extras/noUiSlider/nouislider.js#L1367-L1388
train
Get closest handle to proposal
[ 30522, 3853, 2131, 20464, 27465, 21604, 10362, 1006, 6378, 1007, 1063, 13075, 7541, 1027, 2531, 1025, 13075, 5047, 19172, 5677, 1027, 6270, 1025, 9531, 1035, 16024, 1012, 18921, 6776, 1006, 3853, 1006, 5047, 1010, 5950, 1007, 1063, 1013, 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...
angular/angular
tools/gulp-tasks/cldr/extract.js
getDateTimeTranslations
function getDateTimeTranslations(localeData) { const dayNames = localeData.main(`dates/calendars/gregorian/days`); const monthNames = localeData.main(`dates/calendars/gregorian/months`); const erasNames = localeData.main(`dates/calendars/gregorian/eras`); const dayPeriods = getDayPeriodsAmPm(localeData); con...
javascript
function getDateTimeTranslations(localeData) { const dayNames = localeData.main(`dates/calendars/gregorian/days`); const monthNames = localeData.main(`dates/calendars/gregorian/months`); const erasNames = localeData.main(`dates/calendars/gregorian/eras`); const dayPeriods = getDayPeriodsAmPm(localeData); con...
[ "function", "getDateTimeTranslations", "(", "localeData", ")", "{", "const", "dayNames", "=", "localeData", ".", "main", "(", "`", "`", ")", ";", "const", "monthNames", "=", "localeData", ".", "main", "(", "`", "`", ")", ";", "const", "erasNames", "=", "...
Returns date-related translations for a locale @returns [ dayPeriodsFormat, dayPeriodsStandalone, daysFormat, dayStandalone, monthsFormat, monthsStandalone, eras ] each value: [ narrow, abbreviated, wide, short? ]
[ "Returns", "date", "-", "related", "translations", "for", "a", "locale" ]
c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c
https://github.com/angular/angular/blob/c016e2c4ecf7529f08fae4ca0f5c8b0170c6b51c/tools/gulp-tasks/cldr/extract.js#L284-L342
train
Get the translations for the given locale
[ 30522, 3853, 2131, 13701, 7292, 6494, 3619, 13490, 2015, 1006, 2334, 30524, 1006, 1036, 5246, 1013, 8094, 2015, 1013, 25847, 1013, 2706, 1036, 1007, 1025, 9530, 3367, 28500, 18442, 2015, 1027, 2334, 11960, 2696, 1012, 2364, 1006, 1036, 5246...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
airyland/vux
src/components/video/zy.media.js
function() { var t = this; // Native events if (zyMedia.features.nativeFullscreenPrefix != '-') { // Chrome doesn't alays fire this in an iframe var func = function(e) { if (t.isFullScreen) { if (!isInFullScreenMode()) { t.exitFullScreen() } } }; document.addEventListener(zyMe...
javascript
function() { var t = this; // Native events if (zyMedia.features.nativeFullscreenPrefix != '-') { // Chrome doesn't alays fire this in an iframe var func = function(e) { if (t.isFullScreen) { if (!isInFullScreenMode()) { t.exitFullScreen() } } }; document.addEventListener(zyMe...
[ "function", "(", ")", "{", "var", "t", "=", "this", ";", "// Native events", "if", "(", "zyMedia", ".", "features", ".", "nativeFullscreenPrefix", "!=", "'-'", ")", "{", "// Chrome doesn't alays fire this in an iframe", "var", "func", "=", "function", "(", "e", ...
Fullscreen button
[ "Fullscreen", "button" ]
484fc3c18bdca99b0c08efbb678c0ee0f5ceedd6
https://github.com/airyland/vux/blob/484fc3c18bdca99b0c08efbb678c0ee0f5ceedd6/src/components/video/zy.media.js#L708-L735
train
Add fullscreen event
[ 30522, 3853, 1006, 1007, 1063, 13075, 1056, 1027, 2023, 1025, 1013, 1013, 3128, 2824, 2065, 1006, 1062, 25219, 9032, 1012, 2838, 1012, 3128, 3993, 4877, 24410, 28139, 8873, 2595, 999, 1027, 1005, 1011, 1005, 1007, 1063, 1013, 1013, 18546, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/api/deprecate.js
deprecateRenamedMethod
function deprecateRenamedMethod(book, key, instance, oldName, newName, msg) { msg = msg || ('"' + oldName + '" is deprecated, use "' + newName + '()" instead'); var fn = objectPath.get(instance, newName); instance[oldName] = deprecateMethod(book, key, fn, msg); }
javascript
function deprecateRenamedMethod(book, key, instance, oldName, newName, msg) { msg = msg || ('"' + oldName + '" is deprecated, use "' + newName + '()" instead'); var fn = objectPath.get(instance, newName); instance[oldName] = deprecateMethod(book, key, fn, msg); }
[ "function", "deprecateRenamedMethod", "(", "book", ",", "key", ",", "instance", ",", "oldName", ",", "newName", ",", "msg", ")", "{", "msg", "=", "msg", "||", "(", "'\"'", "+", "oldName", "+", "'\" is deprecated, use \"'", "+", "newName", "+", "'()\" instead...
Deprecate a method in favor of another one @param {Book} book @param {String} key @param {Object} instance @param {String} oldName @param {String} newName
[ "Deprecate", "a", "method", "in", "favor", "of", "another", "one" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/api/deprecate.js#L109-L114
train
Deprecate a method in a node.
[ 30522, 3853, 30524, 2003, 2139, 28139, 12921, 1010, 2224, 1000, 1005, 1009, 2047, 18442, 1009, 1005, 1006, 1007, 1000, 2612, 1005, 1007, 1025, 13075, 1042, 2078, 1027, 4874, 15069, 1012, 2131, 1006, 6013, 1010, 2047, 18442, 1007, 1025, 6013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/sidenav/sidenav.js
SidenavDirective
function SidenavDirective($mdMedia, $mdUtil, $mdConstant, $mdTheming, $mdInteraction, $animate, $compile, $parse, $log, $q, $document, $window, $$rAF) { return { restrict: 'E', scope: { isOpen: '=?mdIsOpen' }, controller: '$mdSidenavController', compile: function(el...
javascript
function SidenavDirective($mdMedia, $mdUtil, $mdConstant, $mdTheming, $mdInteraction, $animate, $compile, $parse, $log, $q, $document, $window, $$rAF) { return { restrict: 'E', scope: { isOpen: '=?mdIsOpen' }, controller: '$mdSidenavController', compile: function(el...
[ "function", "SidenavDirective", "(", "$mdMedia", ",", "$mdUtil", ",", "$mdConstant", ",", "$mdTheming", ",", "$mdInteraction", ",", "$animate", ",", "$compile", ",", "$parse", ",", "$log", ",", "$q", ",", "$document", ",", "$window", ",", "$$rAF", ")", "{", ...
@ngdoc directive @name mdSidenav @module material.components.sidenav @restrict E @description A Sidenav component that can be opened and closed programmatically. By default, upon opening it will slide out on top of the main content area. For keyboard and screen reader accessibility, focus is sent to the sidenav wrap...
[ "@ngdoc", "directive", "@name", "mdSidenav", "@module", "material", ".", "components", ".", "sidenav", "@restrict", "E" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/sidenav/sidenav.js#L258-L522
train
The Sidenav directive
[ 30522, 3853, 2217, 2532, 16872, 7442, 15277, 1006, 1002, 9108, 16969, 1010, 1002, 9108, 21823, 2140, 1010, 1002, 9108, 8663, 12693, 2102, 1010, 1002, 9108, 10760, 6562, 1010, 1002, 9108, 18447, 6906, 7542, 1010, 1002, 2019, 21499, 1010, 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...
jgraph/mxgraph
javascript/mxClient.js
mxForm
function mxForm(className) { this.table = document.createElement('table'); this.table.className = className; this.body = document.createElement('tbody'); this.table.appendChild(this.body); }
javascript
function mxForm(className) { this.table = document.createElement('table'); this.table.className = className; this.body = document.createElement('tbody'); this.table.appendChild(this.body); }
[ "function", "mxForm", "(", "className", ")", "{", "this", ".", "table", "=", "document", ".", "createElement", "(", "'table'", ")", ";", "this", ".", "table", ".", "className", "=", "className", ";", "this", ".", "body", "=", "document", ".", "createElem...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxForm A simple class for creating HTML forms. Constructor: mxForm Creates a HTML table using the specified classname.
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxForm" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L12614-L12621
train
This is the main function of the mxForm class. It is the main function of the mxForm class. It is the main function of the mxForm class. It is the main function of the mxForm class. It is the main function of the mxForm class. It is the main function of the mxForm class.
[ 30522, 3853, 25630, 14192, 1006, 2465, 18442, 1007, 1063, 2023, 1012, 2795, 1027, 30524, 1027, 6254, 1012, 3443, 12260, 3672, 1006, 1005, 26419, 7716, 2100, 1005, 1007, 1025, 2023, 1012, 2795, 1012, 10439, 10497, 19339, 1006, 2023, 1012, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/radioButton/radio-button.js
changeSelectedButton
function changeSelectedButton(parent, increment) { // Coerce all child radio buttons into an array, then wrap then in an iterator var buttons = $mdUtil.iterator(parent[0].querySelectorAll('md-radio-button'), true); if (buttons.count()) { var validate = function (button) { // If disabled, then...
javascript
function changeSelectedButton(parent, increment) { // Coerce all child radio buttons into an array, then wrap then in an iterator var buttons = $mdUtil.iterator(parent[0].querySelectorAll('md-radio-button'), true); if (buttons.count()) { var validate = function (button) { // If disabled, then...
[ "function", "changeSelectedButton", "(", "parent", ",", "increment", ")", "{", "// Coerce all child radio buttons into an array, then wrap then in an iterator", "var", "buttons", "=", "$mdUtil", ".", "iterator", "(", "parent", "[", "0", "]", ".", "querySelectorAll", "(", ...
Change the radio group's selected button by a given increment. If no button is selected, select the first button.
[ "Change", "the", "radio", "group", "s", "selected", "button", "by", "a", "given", "increment", ".", "If", "no", "button", "is", "selected", "select", "the", "first", "button", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/radioButton/radio-button.js#L188-L204
train
Change the selected button
[ 30522, 3853, 3431, 12260, 10985, 8569, 15474, 1006, 6687, 1010, 4297, 28578, 4765, 1007, 1063, 1013, 1013, 24873, 19170, 2035, 2775, 2557, 11287, 2046, 2019, 9140, 1010, 2059, 10236, 2059, 1999, 2019, 2009, 6906, 4263, 13075, 11287, 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...
SheetJS/js-xlsx
xlsx.js
parse_FilePassHeader
function parse_FilePassHeader(blob, length, oo) { var o = oo || {}; o.Info = blob.read_shift(2); blob.l -= 2; if(o.Info === 1) o.Data = parse_RC4Header(blob, length); else o.Data = parse_RC4CryptoHeader(blob, length); return o; }
javascript
function parse_FilePassHeader(blob, length, oo) { var o = oo || {}; o.Info = blob.read_shift(2); blob.l -= 2; if(o.Info === 1) o.Data = parse_RC4Header(blob, length); else o.Data = parse_RC4CryptoHeader(blob, length); return o; }
[ "function", "parse_FilePassHeader", "(", "blob", ",", "length", ",", "oo", ")", "{", "var", "o", "=", "oo", "||", "{", "}", ";", "o", ".", "Info", "=", "blob", ".", "read_shift", "(", "2", ")", ";", "blob", ".", "l", "-=", "2", ";", "if", "(", ...
/* 2.4.117
[ "/", "*", "2", ".", "4", ".", "117" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L8415-L8420
train
Parse the file pass header
[ 30522, 3853, 11968, 3366, 1035, 5371, 15194, 4974, 2121, 1006, 1038, 4135, 2497, 1010, 3091, 1010, 1051, 2080, 1007, 1063, 13075, 1051, 1027, 1051, 2080, 1064, 1064, 1063, 1065, 1025, 1051, 1012, 18558, 1027, 1038, 4135, 2497, 1012, 3191, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/dom-utils.js
DOMWalker_prepareTargetWindows
function DOMWalker_prepareTargetWindows(ids) { var doc = this._controller.window.document; // Go through all the provided ids for (var i = 0; i < ids.length; i++) { var node = this._getNode(ids[i]); // Go further only, if the needed element exists if (node) { var idSet = ids[i]; ...
javascript
function DOMWalker_prepareTargetWindows(ids) { var doc = this._controller.window.document; // Go through all the provided ids for (var i = 0; i < ids.length; i++) { var node = this._getNode(ids[i]); // Go further only, if the needed element exists if (node) { var idSet = ids[i]; ...
[ "function", "DOMWalker_prepareTargetWindows", "(", "ids", ")", "{", "var", "doc", "=", "this", ".", "_controller", ".", "window", ".", "document", ";", "// Go through all the provided ids", "for", "(", "var", "i", "=", "0", ";", "i", "<", "ids", ".", "length...
Main entry point to open new elements like windows, tabpanels, prefpanes, dialogs @param {array of objects} ids Contains informations on the elements to open while Object-elements: getBy - attribute-name of the attribute containing the identification information for the opener-element subContent - array of...
[ "Main", "entry", "point", "to", "open", "new", "elements", "like", "windows", "tabpanels", "prefpanes", "dialogs" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/dom-utils.js#L251-L306
train
Prepare target windows
[ 30522, 3853, 14383, 26965, 1035, 7374, 7559, 18150, 11101, 15568, 1006, 8909, 2015, 1007, 1063, 13075, 9986, 1027, 2023, 1012, 1035, 11486, 1012, 3332, 1012, 6254, 1025, 1013, 1013, 2175, 2083, 2035, 1996, 3024, 8909, 2015, 2005, 1006, 1307...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/datepicker/js/calendar.js
CalendarCtrl
function CalendarCtrl($element, $scope, $$mdDateUtil, $mdUtil, $mdConstant, $mdTheming, $$rAF, $attrs, $mdDateLocale) { $mdTheming($element); /** @final {!angular.JQLite} */ this.$element = $element; /** @final {!angular.Scope} */ this.$scope = $scope; /** @final */ this.dateUtil = $...
javascript
function CalendarCtrl($element, $scope, $$mdDateUtil, $mdUtil, $mdConstant, $mdTheming, $$rAF, $attrs, $mdDateLocale) { $mdTheming($element); /** @final {!angular.JQLite} */ this.$element = $element; /** @final {!angular.Scope} */ this.$scope = $scope; /** @final */ this.dateUtil = $...
[ "function", "CalendarCtrl", "(", "$element", ",", "$scope", ",", "$$mdDateUtil", ",", "$mdUtil", ",", "$mdConstant", ",", "$mdTheming", ",", "$$rAF", ",", "$attrs", ",", "$mdDateLocale", ")", "{", "$mdTheming", "(", "$element", ")", ";", "/** @final {!angular.JQ...
Controller for the mdCalendar component. @ngInject @constructor
[ "Controller", "for", "the", "mdCalendar", "component", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/datepicker/js/calendar.js#L107-L237
train
A controller for the calendar.
[ 30522, 3853, 8094, 6593, 12190, 1006, 1002, 5783, 1010, 1002, 9531, 1010, 1002, 1002, 9108, 13701, 21823, 2140, 1010, 1002, 9108, 21823, 2140, 1010, 1002, 9108, 8663, 12693, 2102, 1010, 1002, 9108, 10760, 6562, 1010, 1002, 1002, 7148, 1010,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/JSUtils/ScopeManager.js
handleGetGuesses
function handleGetGuesses(response) { var path = response.file, type = response.type, offset = response.offset, $deferredHints = getPendingRequest(path, offset, type); if ($deferredHints) { $deferredHints.resolveWith(null, [response.properties]); ...
javascript
function handleGetGuesses(response) { var path = response.file, type = response.type, offset = response.offset, $deferredHints = getPendingRequest(path, offset, type); if ($deferredHints) { $deferredHints.resolveWith(null, [response.properties]); ...
[ "function", "handleGetGuesses", "(", "response", ")", "{", "var", "path", "=", "response", ".", "file", ",", "type", "=", "response", ".", "type", ",", "offset", "=", "response", ".", "offset", ",", "$deferredHints", "=", "getPendingRequest", "(", "path", ...
Handle the response from the tern node domain when it responds to the get guesses message. @param {{file: string, type: string, offset: {line: number, ch: number}, properties: Array.<string>}} response - the response from node domain contains the guesses for a property lookup.
[ "Handle", "the", "response", "from", "the", "tern", "node", "domain", "when", "it", "responds", "to", "the", "get", "guesses", "message", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/JSUtils/ScopeManager.js#L723-L732
train
Handle the get guesses request
[ 30522, 3853, 5047, 18150, 22967, 8583, 1006, 3433, 1007, 1063, 13075, 4130, 1027, 3433, 1012, 5371, 1010, 2828, 1027, 3433, 1012, 2828, 1010, 16396, 1027, 3433, 1012, 16396, 1010, 1002, 13366, 28849, 19114, 7666, 1027, 2131, 11837, 4667, 28...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/utils/StringMatch.js
stringMatch
function stringMatch(str, query, options, special) { var result; options = options || {}; // No query? Short circuit the normal work done and just // return a single range that covers the whole string. if (!query) { result = new SearchResult(str); result...
javascript
function stringMatch(str, query, options, special) { var result; options = options || {}; // No query? Short circuit the normal work done and just // return a single range that covers the whole string. if (!query) { result = new SearchResult(str); result...
[ "function", "stringMatch", "(", "str", ",", "query", ",", "options", ",", "special", ")", "{", "var", "result", ";", "options", "=", "options", "||", "{", "}", ";", "// No query? Short circuit the normal work done and just", "// return a single range that covers the who...
/* Match str against the query using the QuickOpen algorithm provided by the functions above. The general idea is to prefer matches of "special" characters and, optionally, matches that occur in the "last segment" (generally, the filename). stringMatch will try to provide the best match and produces a "matchGoodness" s...
[ "/", "*", "Match", "str", "against", "the", "query", "using", "the", "QuickOpen", "algorithm", "provided", "by", "the", "functions", "above", ".", "The", "general", "idea", "is", "to", "prefer", "matches", "of", "special", "characters", "and", "optionally", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/StringMatch.js#L766-L833
train
Match a string against a query
[ 30522, 3853, 5164, 18900, 2818, 1006, 2358, 2099, 1010, 23032, 1010, 7047, 1010, 2569, 1007, 1063, 13075, 2765, 1025, 7047, 1027, 7047, 1064, 1064, 1063, 1065, 1025, 1013, 1013, 2053, 23032, 1029, 2460, 4984, 1996, 3671, 2147, 2589, 1998, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
firebase/firebase-js-sdk
packages/auth/src/autheventmanager.js
function() { if (!self.initialized_) { self.initialized_ = true; // Listen to Auth events on iframe. self.oauthSignInHandler_.addAuthEventListener(self.authEventHandler_); } }
javascript
function() { if (!self.initialized_) { self.initialized_ = true; // Listen to Auth events on iframe. self.oauthSignInHandler_.addAuthEventListener(self.authEventHandler_); } }
[ "function", "(", ")", "{", "if", "(", "!", "self", ".", "initialized_", ")", "{", "self", ".", "initialized_", "=", "true", ";", "// Listen to Auth events on iframe.", "self", ".", "oauthSignInHandler_", ".", "addAuthEventListener", "(", "self", ".", "authEventH...
On initialization, add Auth event listener if not already added.
[ "On", "initialization", "add", "Auth", "event", "listener", "if", "not", "already", "added", "." ]
491598a499813dacc23724de5e237ec220cc560e
https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/src/autheventmanager.js#L501-L507
train
Initialize the auth handler
[ 30522, 3853, 1006, 1007, 1063, 2065, 1006, 999, 2969, 1012, 3988, 3550, 1035, 1007, 1063, 2969, 1012, 3988, 3550, 1035, 1027, 2995, 1025, 1013, 1013, 4952, 2000, 8740, 2705, 2824, 2006, 2065, 6444, 2063, 1012, 2969, 1012, 1051, 4887, 2683...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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 (elem) { // build plaintext auth iq var iq = $iq({type: "set", id: "_auth_2"}) .c('query', {xmlns: Strophe.NS.AUTH}) .c('username', {}).t(Strophe.getNodeFromJid(this.jid)) .up() .c('password').t(this.pass); if (!Strophe.getRe...
javascript
function (elem) { // build plaintext auth iq var iq = $iq({type: "set", id: "_auth_2"}) .c('query', {xmlns: Strophe.NS.AUTH}) .c('username', {}).t(Strophe.getNodeFromJid(this.jid)) .up() .c('password').t(this.pass); if (!Strophe.getRe...
[ "function", "(", "elem", ")", "{", "// build plaintext auth iq\r", "var", "iq", "=", "$iq", "(", "{", "type", ":", "\"set\"", ",", "id", ":", "\"_auth_2\"", "}", ")", ".", "c", "(", "'query'", ",", "{", "xmlns", ":", "Strophe", ".", "NS", ".", "AUTH"...
PrivateFunction: _auth1_cb _Private_ handler for legacy authentication. This handler is called in response to the initial <iq type='get'/> for legacy authentication. It builds an authentication <iq/> and sends it, creating a handler (calling back to _auth2_cb()) to handle the result Parameters: (XMLElement) elem - T...
[ "PrivateFunction", ":", "_auth1_cb", "_Private_", "handler", "for", "legacy", "authentication", "." ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/login/libs/easymob-webim-sdk/strophe-custom-2.0.0.js#L3100-L3123
train
auth 2
[ 30522, 3853, 1006, 3449, 6633, 1007, 1063, 1013, 1013, 3857, 5810, 18209, 8740, 2705, 26264, 13075, 26264, 1027, 1002, 26264, 1006, 1063, 2828, 1024, 1000, 2275, 1000, 1010, 8909, 1024, 1000, 1035, 8740, 2705, 1035, 1016, 1000, 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...
eslint/eslint
lib/code-path-analysis/code-path-state.js
removeConnection
function removeConnection(prevSegments, nextSegments) { for (let i = 0; i < prevSegments.length; ++i) { const prevSegment = prevSegments[i]; const nextSegment = nextSegments[i]; remove(prevSegment.nextSegments, nextSegment); remove(prevSegment.allNextSegments, nextSegment); ...
javascript
function removeConnection(prevSegments, nextSegments) { for (let i = 0; i < prevSegments.length; ++i) { const prevSegment = prevSegments[i]; const nextSegment = nextSegments[i]; remove(prevSegment.nextSegments, nextSegment); remove(prevSegment.allNextSegments, nextSegment); ...
[ "function", "removeConnection", "(", "prevSegments", ",", "nextSegments", ")", "{", "for", "(", "let", "i", "=", "0", ";", "i", "<", "prevSegments", ".", "length", ";", "++", "i", ")", "{", "const", "prevSegment", "=", "prevSegments", "[", "i", "]", ";...
Disconnect given segments. This is used in a process for switch statements. If there is the "default" chunk before other cases, the order is different between node's and running's. @param {CodePathSegment[]} prevSegments - Forward segments to disconnect. @param {CodePathSegment[]} nextSegments - Backward segments to ...
[ "Disconnect", "given", "segments", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/code-path-analysis/code-path-state.js#L151-L161
train
Remove connection from the network
[ 30522, 3853, 6366, 8663, 2638, 7542, 1006, 3653, 15088, 13910, 8163, 1010, 2279, 3366, 21693, 11187, 1007, 1063, 2005, 1006, 2292, 1045, 1027, 1014, 1025, 1045, 1026, 3653, 15088, 13910, 8163, 1012, 3091, 1025, 1009, 1009, 1045, 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...
shipshapecode/shepherd
src/js/utils/modal.js
_createMaskConsumer
function _createMaskConsumer() { const element = document.createElementNS(svgNS, 'rect'); _setAttributes(element, { height: '100%', width: '100%', x: '0', y: '0' }); element.setAttribute('mask', `url(#${elementIds.modalOverlayMask})`); return element; }
javascript
function _createMaskConsumer() { const element = document.createElementNS(svgNS, 'rect'); _setAttributes(element, { height: '100%', width: '100%', x: '0', y: '0' }); element.setAttribute('mask', `url(#${elementIds.modalOverlayMask})`); return element; }
[ "function", "_createMaskConsumer", "(", ")", "{", "const", "element", "=", "document", ".", "createElementNS", "(", "svgNS", ",", "'rect'", ")", ";", "_setAttributes", "(", "element", ",", "{", "height", ":", "'100%'", ",", "width", ":", "'100%'", ",", "x"...
<rect x="0" y="0" width="100%" height="100%" mask="url(#shepherdModalMask)"/>
[ "<rect", "x", "=", "0", "y", "=", "0", "width", "=", "100%", "height", "=", "100%", "mask", "=", "url", "(", "#shepherdModalMask", ")", "/", ">" ]
0cb1c63fb07b58796358f6d33da5f6405e2b05f4
https://github.com/shipshapecode/shepherd/blob/0cb1c63fb07b58796358f6d33da5f6405e2b05f4/src/js/utils/modal.js#L78-L90
train
Creates an element that can be used to display the modal overlay
[ 30522, 3853, 1035, 3443, 9335, 2243, 8663, 23545, 2099, 1006, 1007, 1063, 9530, 3367, 5783, 1027, 6254, 1012, 3443, 12260, 3672, 3619, 1006, 17917, 16206, 2015, 1010, 1005, 28667, 2102, 1005, 1007, 1025, 1035, 2275, 19321, 3089, 8569, 4570,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/autocomplete/js/autocompleteController.js
gatherSnapWrap
function gatherSnapWrap() { var element; var value; for (element = $element; element.length; element = element.parent()) { value = element.attr('md-autocomplete-snap'); if (angular.isDefined(value)) break; } if (element.length) { return { snap: element[0], wrap: (v...
javascript
function gatherSnapWrap() { var element; var value; for (element = $element; element.length; element = element.parent()) { value = element.attr('md-autocomplete-snap'); if (angular.isDefined(value)) break; } if (element.length) { return { snap: element[0], wrap: (v...
[ "function", "gatherSnapWrap", "(", ")", "{", "var", "element", ";", "var", "value", ";", "for", "(", "element", "=", "$element", ";", "element", ".", "length", ";", "element", "=", "element", ".", "parent", "(", ")", ")", "{", "value", "=", "element", ...
Gathers the snap and wrap elements
[ "Gathers", "the", "snap", "and", "wrap", "elements" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/js/autocompleteController.js#L306-L326
train
gather snap wrap
[ 30522, 3853, 29438, 2532, 28400, 2527, 2361, 1006, 1007, 1063, 13075, 5783, 1025, 13075, 3643, 1025, 2005, 1006, 5783, 1027, 1002, 5783, 1025, 5783, 1012, 3091, 1025, 5783, 1027, 5783, 1012, 6687, 1006, 1007, 1007, 1063, 3643, 1027, 5783, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/Filter.js
function() { // covert the values array into an array of filter objects var aFilters = []; for (var i = 0, l = this.aValues && this.aValues.length || 0; i < l; i++) { aFilters.push(new Filter({ path: this.sPath, operator: this.aValues[i].operator, value1: this.aValues[i].value1, value2...
javascript
function() { // covert the values array into an array of filter objects var aFilters = []; for (var i = 0, l = this.aValues && this.aValues.length || 0; i < l; i++) { aFilters.push(new Filter({ path: this.sPath, operator: this.aValues[i].operator, value1: this.aValues[i].value1, value2...
[ "function", "(", ")", "{", "// covert the values array into an array of filter objects", "var", "aFilters", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ",", "l", "=", "this", ".", "aValues", "&&", "this", ".", "aValues", ".", "length", "||", "0",...
Converts the <code>sap.ui.model.odata.Filter</code> into a <code>sap.ui.model.Filter</code>. @return {sap.ui.model.Filter} a <code>sap.ui.model.Filter</code> object @public
[ "Converts", "the", "<code", ">", "sap", ".", "ui", ".", "model", ".", "odata", ".", "Filter<", "/", "code", ">", "into", "a", "<code", ">", "sap", ".", "ui", ".", "model", ".", "Filter<", "/", "code", ">", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/Filter.js#L47-L72
train
Returns a filter object based on the values array
[ 30522, 3853, 1006, 1007, 1063, 1013, 1013, 19813, 1996, 5300, 9140, 2046, 2019, 9140, 1997, 11307, 5200, 13075, 28697, 21928, 2015, 1027, 1031, 1033, 1025, 2005, 1006, 13075, 1045, 1027, 1014, 1010, 1048, 1027, 2023, 1012, 10927, 7630, 2229...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-useless-escape.js
parseRegExp
function parseRegExp(regExpText) { const charList = []; regExpText.split("").reduce((state, char, index) => { if (!state.escapeNextChar) { if (char === "\\") { return Object.assign(state, { escapeNextChar: true }); } if (char === "[" && !state.inCharC...
javascript
function parseRegExp(regExpText) { const charList = []; regExpText.split("").reduce((state, char, index) => { if (!state.escapeNextChar) { if (char === "\\") { return Object.assign(state, { escapeNextChar: true }); } if (char === "[" && !state.inCharC...
[ "function", "parseRegExp", "(", "regExpText", ")", "{", "const", "charList", "=", "[", "]", ";", "regExpText", ".", "split", "(", "\"\"", ")", ".", "reduce", "(", "(", "state", ",", "char", ",", "index", ")", "=>", "{", "if", "(", "!", "state", "."...
Parses a regular expression into a list of characters with character class info. @param {string} regExpText The raw text used to create the regular expression @returns {Object[]} A list of characters, each with info on escaping and whether they're in a character class. @example parseRegExp('a\\b[cd-]') returns: [ {te...
[ "Parses", "a", "regular", "expression", "into", "a", "list", "of", "characters", "with", "character", "class", "info", ".", "@param", "{", "string", "}", "regExpText", "The", "raw", "text", "used", "to", "create", "the", "regular", "expression", "@returns", ...
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-useless-escape.js#L48-L78
train
Parses a regular expression into an array of tokens
[ 30522, 3853, 11968, 8043, 24746, 2595, 2361, 1006, 19723, 10288, 13876, 10288, 2102, 1007, 1063, 9530, 3367, 25869, 9863, 1027, 1031, 1033, 1025, 19723, 10288, 13876, 10288, 2102, 1012, 3975, 1006, 1000, 1000, 1007, 1012, 5547, 1006, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.table/src/sap/ui/table/TableUtils.js
function(oTable, vRowIndicator, bSelect, fnDoSelect) { if (!oTable || !oTable.getBinding("rows") || oTable.getSelectionMode() === SelectionMode.None || vRowIndicator == null) { return false; } function setSelectionState(iAbsoluteRowIndex) { if (!oTable._isRowSelectable(iAbsoluteRowIndex))...
javascript
function(oTable, vRowIndicator, bSelect, fnDoSelect) { if (!oTable || !oTable.getBinding("rows") || oTable.getSelectionMode() === SelectionMode.None || vRowIndicator == null) { return false; } function setSelectionState(iAbsoluteRowIndex) { if (!oTable._isRowSelectable(iAbsoluteRowIndex))...
[ "function", "(", "oTable", ",", "vRowIndicator", ",", "bSelect", ",", "fnDoSelect", ")", "{", "if", "(", "!", "oTable", "||", "!", "oTable", ".", "getBinding", "(", "\"rows\"", ")", "||", "oTable", ".", "getSelectionMode", "(", ")", "===", "SelectionMode",...
Toggles the selection state of the row which contains the given cell DOM element. @param {sap.ui.table.Table} oTable Instance of the table. @param {jQuery | HTMLElement | int} vRowIndicator The data cell in the row, or the data row index of the row, where the selection state should be toggled. @param {boolean} [bSelec...
[ "Toggles", "the", "selection", "state", "of", "the", "row", "which", "contains", "the", "given", "cell", "DOM", "element", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableUtils.js#L457-L522
train
Sets the selection state of a row.
[ 30522, 3853, 1006, 27178, 3085, 1010, 27830, 5004, 22254, 5555, 4263, 1010, 18667, 12260, 6593, 1010, 1042, 15482, 11246, 22471, 1007, 1063, 2065, 1006, 999, 27178, 3085, 1064, 1064, 999, 27178, 3085, 1012, 2131, 8428, 4667, 1006, 1000, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.ux3/src/sap/ui/ux3/ToolPopup.js
function (oThis) { if (!oThis.getOpener()) { var sId = ""; if (oThis.oPopup) { if (oThis.oPopup._oPosition.of instanceof sap.ui.core.Element) { sId = oThis.oPopup._oPosition.of.getId(); } ...
javascript
function (oThis) { if (!oThis.getOpener()) { var sId = ""; if (oThis.oPopup) { if (oThis.oPopup._oPosition.of instanceof sap.ui.core.Element) { sId = oThis.oPopup._oPosition.of.getId(); } ...
[ "function", "(", "oThis", ")", "{", "if", "(", "!", "oThis", ".", "getOpener", "(", ")", ")", "{", "var", "sId", "=", "\"\"", ";", "if", "(", "oThis", ".", "oPopup", ")", "{", "if", "(", "oThis", ".", "oPopup", ".", "_oPosition", ".", "of", "in...
Checks if an opener was set. If not, this functions tries to get the opener from the Popup. @private
[ "Checks", "if", "an", "opener", "was", "set", ".", "If", "not", "this", "functions", "tries", "to", "get", "the", "opener", "from", "the", "Popup", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/ToolPopup.js#L729-L750
train
Sets the opener association
[ 30522, 3853, 1006, 27178, 24158, 1007, 1063, 2065, 1006, 999, 27178, 24158, 1012, 2131, 26915, 2121, 1006, 1007, 1007, 1063, 13075, 15765, 1027, 1000, 1000, 1025, 2065, 1006, 27178, 24158, 1012, 6728, 7361, 6279, 1007, 1063, 2065, 1006, 271...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js
function (sRule, bAsync) { var sCheckFunction = this.model.getProperty(sRule + "/check"); if (!sCheckFunction) { return; } // Check if a function is found var oMatch = sCheckFunction.match(/function[^(]*\(([^)]*)\)/); if (!oMatch) { return; } // Get the parameters of the function fou...
javascript
function (sRule, bAsync) { var sCheckFunction = this.model.getProperty(sRule + "/check"); if (!sCheckFunction) { return; } // Check if a function is found var oMatch = sCheckFunction.match(/function[^(]*\(([^)]*)\)/); if (!oMatch) { return; } // Get the parameters of the function fou...
[ "function", "(", "sRule", ",", "bAsync", ")", "{", "var", "sCheckFunction", "=", "this", ".", "model", ".", "getProperty", "(", "sRule", "+", "\"/check\"", ")", ";", "if", "(", "!", "sCheckFunction", ")", "{", "return", ";", "}", "// Check if a function is...
Add fnResolve to the check function when async is set to true otherwise removes it. @private @param {string} sRule the model path to edit or new rule @param {bAsync} bAsync the async property of the rule
[ "Add", "fnResolve", "to", "the", "check", "function", "when", "async", "is", "set", "to", "true", "otherwise", "removes", "it", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/controllers/Analysis.controller.js#L123-L155
train
Checks if a rule has a function that is not found in the model.
[ 30522, 3853, 1006, 5034, 9307, 1010, 19021, 6038, 2278, 1007, 1063, 13075, 8040, 5369, 3600, 11263, 27989, 1027, 2023, 1012, 2944, 1012, 2131, 21572, 4842, 3723, 1006, 5034, 9307, 1009, 1000, 1013, 4638, 1000, 1007, 1025, 2065, 1006, 999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aframevr/aframe
src/components/look-controls.js
function (enabled) { var sceneEl = this.el.sceneEl; function enableGrabCursor () { sceneEl.canvas.classList.add('a-grab-cursor'); } function disableGrabCursor () { sceneEl.canvas.classList.remove('a-grab-cursor'); } if (!sceneEl.canvas) { if (enabled) { sceneEl.addEventListener('render-t...
javascript
function (enabled) { var sceneEl = this.el.sceneEl; function enableGrabCursor () { sceneEl.canvas.classList.add('a-grab-cursor'); } function disableGrabCursor () { sceneEl.canvas.classList.remove('a-grab-cursor'); } if (!sceneEl.canvas) { if (enabled) { sceneEl.addEventListener('render-t...
[ "function", "(", "enabled", ")", "{", "var", "sceneEl", "=", "this", ".", "el", ".", "sceneEl", ";", "function", "enableGrabCursor", "(", ")", "{", "sceneEl", ".", "canvas", ".", "classList", ".", "add", "(", "'a-grab-cursor'", ")", ";", "}", "function",...
Toggle the feature of showing/hiding the grab cursor.
[ "Toggle", "the", "feature", "of", "showing", "/", "hiding", "the", "grab", "cursor", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/look-controls.js#L384-L404
train
Enable or disable grabbing cursor
[ 30522, 3853, 1006, 9124, 1007, 1063, 13075, 3496, 2884, 1027, 2023, 1012, 3449, 1012, 3496, 2884, 1025, 3853, 9585, 17643, 9818, 9236, 2953, 1006, 1007, 1063, 3496, 2884, 1012, 10683, 1012, 2465, 9863, 1012, 5587, 1006, 1005, 1037, 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...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/dom-utils.js
DOMWalker_processNode
function DOMWalker_processNode(activeNode, idSet) { var doc = this._controller.window.document; var nodeToProcess = this._getNode(idSet); // Opens a new window/dialog through a menulist and runs DOMWalker.walk() // for it. // If the wanted window/dialog is already selected, just run this function ...
javascript
function DOMWalker_processNode(activeNode, idSet) { var doc = this._controller.window.document; var nodeToProcess = this._getNode(idSet); // Opens a new window/dialog through a menulist and runs DOMWalker.walk() // for it. // If the wanted window/dialog is already selected, just run this function ...
[ "function", "DOMWalker_processNode", "(", "activeNode", ",", "idSet", ")", "{", "var", "doc", "=", "this", ".", "_controller", ".", "window", ".", "document", ";", "var", "nodeToProcess", "=", "this", ".", "_getNode", "(", "idSet", ")", ";", "// Opens a new ...
Opens new windows/dialog and starts the DOMWalker.walk() in case of dialogs in existing windows. @param {Node} activeNode Node that holds the information which way to open the new window/dialog @param {object} idSet ID set for the element to open
[ "Opens", "new", "windows", "/", "dialog", "and", "starts", "the", "DOMWalker", ".", "walk", "()", "in", "case", "of", "dialogs", "in", "existing", "windows", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/dom-utils.js#L318-L402
train
Process a node
[ 30522, 3853, 14383, 26965, 1035, 2832, 3630, 3207, 1006, 3161, 3630, 3207, 1010, 8909, 13462, 1007, 1063, 13075, 9986, 1027, 2023, 1012, 1035, 11486, 1012, 3332, 1012, 6254, 1025, 13075, 13045, 14399, 3217, 9623, 2015, 1027, 2023, 1012, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/services/meta/meta.js
setMeta
function setMeta(name, content) { mapExistingElement(name); if (!metaElements[name]) { var newMeta = angular.element('<meta name="' + name + '" content="' + content + '"/>'); head.append(newMeta); metaElements[name] = newMeta; } else { metaElements[name].attr('co...
javascript
function setMeta(name, content) { mapExistingElement(name); if (!metaElements[name]) { var newMeta = angular.element('<meta name="' + name + '" content="' + content + '"/>'); head.append(newMeta); metaElements[name] = newMeta; } else { metaElements[name].attr('co...
[ "function", "setMeta", "(", "name", ",", "content", ")", "{", "mapExistingElement", "(", "name", ")", ";", "if", "(", "!", "metaElements", "[", "name", "]", ")", "{", "var", "newMeta", "=", "angular", ".", "element", "(", "'<meta name=\"'", "+", "name", ...
@ngdoc method @name $$mdMeta#setMeta @description Creates meta element with the 'name' and 'content' attributes, if the meta tag is already created than we replace the 'content' value @param {string} name meta tag 'name' attribute value @param {string} content meta tag 'content' attribute value @returns {function} re...
[ "@ngdoc", "method", "@name", "$$mdMeta#setMeta" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/meta/meta.js#L73-L90
train
Sets the meta element
[ 30522, 3853, 2275, 11368, 2050, 1006, 2171, 1010, 4180, 1007, 1063, 4949, 10288, 2923, 23496, 16930, 4765, 1006, 2171, 1007, 1025, 2065, 1006, 999, 18804, 12260, 8163, 1031, 2171, 1033, 1007, 1063, 13075, 2047, 11368, 2050, 1027, 16108, 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...
grpc/grpc
examples/node/dynamic_codegen/route_guide/route_guide_server.js
getDistance
function getDistance(start, end) { function toRadians(num) { return num * Math.PI / 180; } var R = 6371000; // earth radius in metres var lat1 = toRadians(start.latitude / COORD_FACTOR); var lat2 = toRadians(end.latitude / COORD_FACTOR); var lon1 = toRadians(start.longitude / COORD_FACTOR); var lon2 ...
javascript
function getDistance(start, end) { function toRadians(num) { return num * Math.PI / 180; } var R = 6371000; // earth radius in metres var lat1 = toRadians(start.latitude / COORD_FACTOR); var lat2 = toRadians(end.latitude / COORD_FACTOR); var lon1 = toRadians(start.longitude / COORD_FACTOR); var lon2 ...
[ "function", "getDistance", "(", "start", ",", "end", ")", "{", "function", "toRadians", "(", "num", ")", "{", "return", "num", "*", "Math", ".", "PI", "/", "180", ";", "}", "var", "R", "=", "6371000", ";", "// earth radius in metres", "var", "lat1", "=...
Calculate the distance between two points using the "haversine" formula. The formula is based on http://mathforum.org/library/drmath/view/51879.html. @param start The starting point @param end The end point @return The distance between the points in meters
[ "Calculate", "the", "distance", "between", "two", "points", "using", "the", "haversine", "formula", ".", "The", "formula", "is", "based", "on", "http", ":", "//", "mathforum", ".", "org", "/", "library", "/", "drmath", "/", "view", "/", "51879", ".", "ht...
cc75d93818410e2b0edd0fa3009a6def9ac403ca
https://github.com/grpc/grpc/blob/cc75d93818410e2b0edd0fa3009a6def9ac403ca/examples/node/dynamic_codegen/route_guide/route_guide_server.js#L120-L137
train
Get distance between two points
[ 30522, 3853, 2131, 10521, 26897, 1006, 2707, 1010, 2203, 1007, 1063, 3853, 17153, 25205, 3619, 1006, 16371, 2213, 1007, 1063, 2709, 16371, 2213, 1008, 8785, 1012, 14255, 1013, 8380, 1025, 1065, 13075, 1054, 1027, 6191, 2581, 18613, 2692, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SheetJS/js-xlsx
xlsx.js
parse_PtgSheet
function parse_PtgSheet(blob, length, opts) { blob.l += 5; blob.l += 2; blob.l += (opts.biff == 2 ? 1 : 4); return ["PTGSHEET"]; }
javascript
function parse_PtgSheet(blob, length, opts) { blob.l += 5; blob.l += 2; blob.l += (opts.biff == 2 ? 1 : 4); return ["PTGSHEET"]; }
[ "function", "parse_PtgSheet", "(", "blob", ",", "length", ",", "opts", ")", "{", "blob", ".", "l", "+=", "5", ";", "blob", ".", "l", "+=", "2", ";", "blob", ".", "l", "+=", "(", "opts", ".", "biff", "==", "2", "?", "1", ":", "4", ")", ";", ...
/* [XLS] old spec
[ "/", "*", "[", "XLS", "]", "old", "spec" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L10695-L10700
train
Parse a PTGSHEET
[ 30522, 3853, 11968, 3366, 1035, 13866, 5620, 21030, 2102, 1006, 1038, 4135, 2497, 1010, 3091, 1010, 23569, 2015, 1007, 1063, 1038, 4135, 2497, 1012, 1048, 1009, 1027, 1019, 1025, 1038, 4135, 2497, 1012, 1048, 1009, 1027, 1016, 1025, 1038, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/InlineTimingFunctionEditor/TimingFunctionUtils.js
_validateStepsParams
function _validateStepsParams(match) { var count = _convertToNumber(match[1]); if (!count.isNumber || count.value < 1 || Math.floor(count.value) !== count.value) { return false; } if (match[2] && match[2] !== "start" && match[2] !== "end") { return false; ...
javascript
function _validateStepsParams(match) { var count = _convertToNumber(match[1]); if (!count.isNumber || count.value < 1 || Math.floor(count.value) !== count.value) { return false; } if (match[2] && match[2] !== "start" && match[2] !== "end") { return false; ...
[ "function", "_validateStepsParams", "(", "match", ")", "{", "var", "count", "=", "_convertToNumber", "(", "match", "[", "1", "]", ")", ";", "if", "(", "!", "count", ".", "isNumber", "||", "count", ".", "value", "<", "1", "||", "Math", ".", "floor", "...
Validate steps function parameters that are not already validated by regex: @param {RegExp.match} match RegExp Match object with steps function parameters in array position 1 (and optionally 2). @return {boolean} true if all parameters are valid, otherwise, false
[ "Validate", "steps", "function", "parameters", "that", "are", "not", "already", "validated", "by", "regex", ":" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/InlineTimingFunctionEditor/TimingFunctionUtils.js#L232-L244
train
Validate step params
[ 30522, 3853, 1035, 9398, 8520, 2618, 4523, 28689, 5244, 1006, 2674, 1007, 1063, 13075, 4175, 1027, 1035, 10463, 2669, 29440, 1006, 2674, 1031, 1015, 1033, 1007, 1025, 2065, 1006, 999, 4175, 1012, 3475, 29440, 1064, 1064, 4175, 1012, 3643, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/core/services/theming/theming.js
function() { return angular.extend({ }, themeConfig, { defaultTheme : defaultTheme, alwaysWatchTheme : alwaysWatchTheme, registeredStyles : [].concat(themeConfig.registeredStyles) }); }
javascript
function() { return angular.extend({ }, themeConfig, { defaultTheme : defaultTheme, alwaysWatchTheme : alwaysWatchTheme, registeredStyles : [].concat(themeConfig.registeredStyles) }); }
[ "function", "(", ")", "{", "return", "angular", ".", "extend", "(", "{", "}", ",", "themeConfig", ",", "{", "defaultTheme", ":", "defaultTheme", ",", "alwaysWatchTheme", ":", "alwaysWatchTheme", ",", "registeredStyles", ":", "[", "]", ".", "concat", "(", "...
return a read-only clone of the current theme configuration
[ "return", "a", "read", "-", "only", "clone", "of", "the", "current", "theme", "configuration" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/theming/theming.js#L297-L303
train
Returns the configuration for the current theme
[ 30522, 3853, 1006, 1007, 1063, 2709, 16108, 1012, 7949, 1006, 1063, 1065, 1010, 4323, 8663, 8873, 2290, 1010, 1063, 12398, 10760, 4168, 1024, 12398, 10760, 4168, 1010, 30524, 10760, 4168, 1010, 5068, 21756, 4244, 1024, 1031, 1033, 1012, 953...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/remote/LiveDevProtocolRemote.js
function (msg) { console.log("Runtime.evaluate"); var result = eval(msg.params.expression); MessageBroker.respond(msg, { result: JSON.stringify(result) // TODO: in original protocol this is an object handle }); }
javascript
function (msg) { console.log("Runtime.evaluate"); var result = eval(msg.params.expression); MessageBroker.respond(msg, { result: JSON.stringify(result) // TODO: in original protocol this is an object handle }); }
[ "function", "(", "msg", ")", "{", "console", ".", "log", "(", "\"Runtime.evaluate\"", ")", ";", "var", "result", "=", "eval", "(", "msg", ".", "params", ".", "expression", ")", ";", "MessageBroker", ".", "respond", "(", "msg", ",", "{", "result", ":", ...
Evaluate an expresion and return its result.
[ "Evaluate", "an", "expresion", "and", "return", "its", "result", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/MultiBrowserImpl/protocol/remote/LiveDevProtocolRemote.js#L141-L147
train
evaluate the expression
[ 30522, 3853, 1006, 5796, 2290, 1007, 1063, 10122, 1012, 8833, 1006, 1000, 2448, 7292, 1012, 16157, 1000, 1007, 1025, 13075, 2765, 1027, 9345, 2140, 1006, 5796, 2290, 1012, 11498, 5244, 1012, 3670, 1007, 1025, 4471, 12618, 5484, 1012, 6869, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/AnnotationParser.js
function(sName, mAnnotations, mTarget) { // Everything in here must be on Term level, so we overwrite the target with the data from the source if (Array.isArray(mAnnotations[sName])) { // This is a collection - make sure it stays one mTarget[sName] = mAnnotations[sName].slice(0); } else { // Make sure t...
javascript
function(sName, mAnnotations, mTarget) { // Everything in here must be on Term level, so we overwrite the target with the data from the source if (Array.isArray(mAnnotations[sName])) { // This is a collection - make sure it stays one mTarget[sName] = mAnnotations[sName].slice(0); } else { // Make sure t...
[ "function", "(", "sName", ",", "mAnnotations", ",", "mTarget", ")", "{", "// Everything in here must be on Term level, so we overwrite the target with the data from the source", "if", "(", "Array", ".", "isArray", "(", "mAnnotations", "[", "sName", "]", ")", ")", "{", "...
/* @static @private
[ "/", "*" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/AnnotationParser.js#L140-L154
train
This function is called by the annotation processor to create a new map of the target object
[ 30522, 3853, 1006, 1055, 18442, 1010, 10856, 17287, 9285, 1010, 11047, 2906, 18150, 1007, 1063, 1013, 1013, 2673, 1999, 2182, 2442, 2022, 2006, 2744, 2504, 1010, 2061, 2057, 2058, 26373, 1996, 4539, 2007, 1996, 2951, 2013, 1996, 3120, 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...
angular/material
src/core/services/theming/theming.js
checkPaletteValid
function checkPaletteValid(name, map) { var missingColors = VALID_HUE_VALUES.filter(function(field) { return !map[field]; }); if (missingColors.length) { throw new Error("Missing colors %1 in palette %2!" .replace('%1', missingColors.join(', ')) .repla...
javascript
function checkPaletteValid(name, map) { var missingColors = VALID_HUE_VALUES.filter(function(field) { return !map[field]; }); if (missingColors.length) { throw new Error("Missing colors %1 in palette %2!" .replace('%1', missingColors.join(', ')) .repla...
[ "function", "checkPaletteValid", "(", "name", ",", "map", ")", "{", "var", "missingColors", "=", "VALID_HUE_VALUES", ".", "filter", "(", "function", "(", "field", ")", "{", "return", "!", "map", "[", "field", "]", ";", "}", ")", ";", "if", "(", "missin...
Make sure that palette has all required hues
[ "Make", "sure", "that", "palette", "has", "all", "required", "hues" ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/core/services/theming/theming.js#L441-L452
train
Check if the palette is valid
[ 30522, 3853, 4638, 12952, 7585, 10175, 3593, 1006, 2171, 1010, 4949, 1007, 1063, 13075, 4394, 18717, 2015, 1027, 9398, 1035, 20639, 1035, 5300, 1012, 11307, 1006, 3853, 1006, 2492, 1007, 1063, 2709, 999, 4949, 1031, 2492, 1033, 1025, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/util/source-code-fixer.js
compareMessagesByFixRange
function compareMessagesByFixRange(a, b) { return a.fix.range[0] - b.fix.range[0] || a.fix.range[1] - b.fix.range[1]; }
javascript
function compareMessagesByFixRange(a, b) { return a.fix.range[0] - b.fix.range[0] || a.fix.range[1] - b.fix.range[1]; }
[ "function", "compareMessagesByFixRange", "(", "a", ",", "b", ")", "{", "return", "a", ".", "fix", ".", "range", "[", "0", "]", "-", "b", ".", "fix", ".", "range", "[", "0", "]", "||", "a", ".", "fix", ".", "range", "[", "1", "]", "-", "b", "....
Compares items in a messages array by range. @param {Message} a The first message. @param {Message} b The second message. @returns {int} -1 if a comes before b, 1 if a comes after b, 0 if equal. @private
[ "Compares", "items", "in", "a", "messages", "array", "by", "range", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/source-code-fixer.js#L26-L28
train
Compare messages by fix range
[ 30522, 3853, 12826, 7834, 3736, 8449, 3762, 8873, 2595, 24388, 2063, 1006, 1037, 1010, 1038, 1007, 1063, 2709, 1037, 1012, 8081, 1012, 2846, 1031, 1014, 1033, 1011, 1038, 1012, 8081, 1012, 2846, 1031, 1014, 1033, 1064, 1064, 1037, 1012, 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...
adobe/brackets
src/document/DocumentManager.js
createUntitledDocument
function createUntitledDocument(counter, fileExt) { var filename = Strings.UNTITLED + "-" + counter + fileExt, fullPath = _untitledDocumentPath + "/" + filename, now = new Date(), file = new InMemoryFile(fullPath, FileSystem); FileSystem.addEntryForPathIfRequired(fil...
javascript
function createUntitledDocument(counter, fileExt) { var filename = Strings.UNTITLED + "-" + counter + fileExt, fullPath = _untitledDocumentPath + "/" + filename, now = new Date(), file = new InMemoryFile(fullPath, FileSystem); FileSystem.addEntryForPathIfRequired(fil...
[ "function", "createUntitledDocument", "(", "counter", ",", "fileExt", ")", "{", "var", "filename", "=", "Strings", ".", "UNTITLED", "+", "\"-\"", "+", "counter", "+", "fileExt", ",", "fullPath", "=", "_untitledDocumentPath", "+", "\"/\"", "+", "filename", ",",...
Creates an untitled document. The associated File has a fullPath that looks like /some-random-string/Untitled-counter.fileExt. @param {number} counter - used in the name of the new Document's File @param {string} fileExt - file extension of the new Document's File, including "." @return {Document} - a new untitled Doc...
[ "Creates", "an", "untitled", "document", ".", "The", "associated", "File", "has", "a", "fullPath", "that", "looks", "like", "/", "some", "-", "random", "-", "string", "/", "Untitled", "-", "counter", ".", "fileExt", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/document/DocumentManager.js#L448-L457
train
Create a new unntitled document
[ 30522, 3853, 3443, 16671, 4183, 3709, 3527, 24894, 4765, 1006, 4675, 1010, 5371, 10288, 2102, 1007, 1063, 13075, 5371, 18442, 1027, 7817, 1012, 24819, 1009, 1000, 1011, 1000, 1009, 4675, 1009, 5371, 10288, 2102, 1010, 2440, 15069, 1027, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/editor/EditorCommandHandlers.js
duplicateText
function duplicateText(editor) { editor = editor || EditorManager.getFocusedEditor(); if (!editor) { return; } var selections = editor.getSelections(), delimiter = "", edits = [], rangeSels = [], cursorSels = [], do...
javascript
function duplicateText(editor) { editor = editor || EditorManager.getFocusedEditor(); if (!editor) { return; } var selections = editor.getSelections(), delimiter = "", edits = [], rangeSels = [], cursorSels = [], do...
[ "function", "duplicateText", "(", "editor", ")", "{", "editor", "=", "editor", "||", "EditorManager", ".", "getFocusedEditor", "(", ")", ";", "if", "(", "!", "editor", ")", "{", "return", ";", "}", "var", "selections", "=", "editor", ".", "getSelections", ...
Duplicates the selected text, or current line if no selection. The cursor/selection is left on the second copy.
[ "Duplicates", "the", "selected", "text", "or", "current", "line", "if", "no", "selection", ".", "The", "cursor", "/", "selection", "is", "left", "on", "the", "second", "copy", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/editor/EditorCommandHandlers.js#L737-L775
train
Duplicate text from the editor
[ 30522, 3853, 24473, 18209, 1006, 3559, 1007, 1063, 3559, 1027, 3559, 1064, 1064, 3559, 24805, 4590, 1012, 2131, 14876, 7874, 19082, 15660, 1006, 1007, 1025, 2065, 1006, 999, 3559, 1007, 1063, 2709, 1025, 1065, 13075, 16310, 1027, 3559, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js
getAny
function getAny(oWithControl, oBindingInfo, mSettings, oScope, bAsync) { var bValueAsPromise = false; /* * Prepares the given binding info or part of it; makes it "one time" and binds its * formatter function (if opted in) to an interface object. * * @param {object} oInfo * a binding info or a par...
javascript
function getAny(oWithControl, oBindingInfo, mSettings, oScope, bAsync) { var bValueAsPromise = false; /* * Prepares the given binding info or part of it; makes it "one time" and binds its * formatter function (if opted in) to an interface object. * * @param {object} oInfo * a binding info or a par...
[ "function", "getAny", "(", "oWithControl", ",", "oBindingInfo", ",", "mSettings", ",", "oScope", ",", "bAsync", ")", "{", "var", "bValueAsPromise", "=", "false", ";", "/*\n\t\t * Prepares the given binding info or part of it; makes it \"one time\" and binds its\n\t\t * formatte...
Gets the value of the control's "any" property via the given binding info. @param {sap.ui.core.util._with} oWithControl the "with" control @param {object} oBindingInfo the binding info @param {object} mSettings map/JSON-object with initial property values, etc. @param {object} oScope map of currently known aliases @pa...
[ "Gets", "the", "value", "of", "the", "control", "s", "any", "property", "via", "the", "given", "binding", "info", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L346-L408
train
Returns the first binding that is not a part of it.
[ 30522, 3853, 2131, 19092, 1006, 27593, 8939, 8663, 13181, 2140, 1010, 27885, 22254, 2075, 2378, 14876, 1010, 5796, 18319, 3070, 2015, 1010, 9808, 16186, 1010, 19021, 6038, 2278, 1007, 1063, 13075, 1038, 10175, 5657, 3022, 21572, 28732, 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...
swimlane/ngx-datatable
release/utils/math.js
adjustColumnWidths
function adjustColumnWidths(allColumns, expectedWidth) { var columnsWidth = column_1.columnsTotalWidth(allColumns); var totalFlexGrow = getTotalFlexGrow(allColumns); var colsByGroup = column_1.columnsByPin(allColumns); if (columnsWidth !== expectedWidth) { scaleColumns(colsByGroup, expectedWidth...
javascript
function adjustColumnWidths(allColumns, expectedWidth) { var columnsWidth = column_1.columnsTotalWidth(allColumns); var totalFlexGrow = getTotalFlexGrow(allColumns); var colsByGroup = column_1.columnsByPin(allColumns); if (columnsWidth !== expectedWidth) { scaleColumns(colsByGroup, expectedWidth...
[ "function", "adjustColumnWidths", "(", "allColumns", ",", "expectedWidth", ")", "{", "var", "columnsWidth", "=", "column_1", ".", "columnsTotalWidth", "(", "allColumns", ")", ";", "var", "totalFlexGrow", "=", "getTotalFlexGrow", "(", "allColumns", ")", ";", "var",...
Adjusts the column widths. Inspired by: https://github.com/facebook/fixed-data-table/blob/master/src/FixedDataTableWidthHelper.js
[ "Adjusts", "the", "column", "widths", ".", "Inspired", "by", ":", "https", ":", "//", "github", ".", "com", "/", "facebook", "/", "fixed", "-", "data", "-", "table", "/", "blob", "/", "master", "/", "src", "/", "FixedDataTableWidthHelper", ".", "js" ]
d7df15a070282a169524dba51d9572008b74804c
https://github.com/swimlane/ngx-datatable/blob/d7df15a070282a169524dba51d9572008b74804c/release/utils/math.js#L20-L27
train
Adjusts the widths of all columns to match the expected width
[ 30522, 3853, 14171, 25778, 2819, 2078, 9148, 11927, 7898, 1006, 2035, 25778, 2819, 3619, 1010, 3517, 9148, 11927, 2232, 1007, 1063, 13075, 7753, 9148, 11927, 2232, 1027, 5930, 1035, 1015, 1012, 7753, 3406, 9080, 9148, 11927, 2232, 1006, 203...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/data/Source.js
Source
function Source(fields) { /** * @type {boolean} */ this.fromDataset = fields.fromDataset; /** * Not null/undefined. * @type {Array|Object} */ this.data = fields.data || ( fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : [] ); /** * See also "det...
javascript
function Source(fields) { /** * @type {boolean} */ this.fromDataset = fields.fromDataset; /** * Not null/undefined. * @type {Array|Object} */ this.data = fields.data || ( fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : [] ); /** * See also "det...
[ "function", "Source", "(", "fields", ")", "{", "/**\n * @type {boolean}\n */", "this", ".", "fromDataset", "=", "fields", ".", "fromDataset", ";", "/**\n * Not null/undefined.\n * @type {Array|Object}\n */", "this", ".", "data", "=", "fields", ".", "da...
[sourceFormat] + "original": This format is only used in series.data, where itemStyle can be specified in data item. + "arrayRows": [ ['product', 'score', 'amount'], ['Matcha Latte', 89.3, 95.8], ['Milk Tea', 92.1, 89.4], ['Cheese Cocoa', 94.4, 91.2], ['Walnut Brownie', 85.4, 76.9] ] + "objectRows": [ {product: 'Mat...
[ "[", "sourceFormat", "]" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/data/Source.js#L78-L132
train
A source object.
[ 30522, 3853, 3120, 1006, 4249, 1007, 1063, 1013, 1008, 1008, 1008, 1030, 2828, 1063, 22017, 20898, 1065, 1008, 1013, 2023, 1012, 2013, 2850, 18260, 2102, 1027, 4249, 1012, 2013, 2850, 18260, 2102, 1025, 1013, 1008, 1008, 1008, 2025, 19701, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/App.controller.js
function() { var data = {}; if (this._oFeedbackDialog.contextCheckBox.getSelected()) { data = { "texts": { "t1": this._oFeedbackDialog.textInput.getValue() }, "ratings":{ "r1": {"value" : this._oFeedbackDialog.ratingStatus.value} }, "context": {"page": this._get...
javascript
function() { var data = {}; if (this._oFeedbackDialog.contextCheckBox.getSelected()) { data = { "texts": { "t1": this._oFeedbackDialog.textInput.getValue() }, "ratings":{ "r1": {"value" : this._oFeedbackDialog.ratingStatus.value} }, "context": {"page": this._get...
[ "function", "(", ")", "{", "var", "data", "=", "{", "}", ";", "if", "(", "this", ".", "_oFeedbackDialog", ".", "contextCheckBox", ".", "getSelected", "(", ")", ")", "{", "data", "=", "{", "\"texts\"", ":", "{", "\"t1\"", ":", "this", ".", "_oFeedback...
Event handler for the send feedback button
[ "Event", "handler", "for", "the", "send", "feedback", "button" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/App.controller.js#L513-L564
train
Send the feedback
[ 30522, 3853, 1006, 1007, 1063, 13075, 2951, 1027, 1063, 1065, 1025, 2065, 1006, 2023, 1012, 1035, 1997, 13089, 5963, 27184, 8649, 1012, 6123, 5403, 3600, 8758, 1012, 4152, 12260, 10985, 1006, 1007, 1007, 1063, 2951, 1027, 1063, 1000, 6981, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
getsentry/sentry-javascript
packages/raven-js/Gruntfile.js
function(a) { var fn = function(n, src, got, all) { if (n === 0) { all.push(got); return; } for (var j = 0; j < src.length; j++) { fn(n - 1, src.slice(j + 1), got.concat([src[j]]), all); } }; var excluded = excludedPlugins.map(function(plugin) { return...
javascript
function(a) { var fn = function(n, src, got, all) { if (n === 0) { all.push(got); return; } for (var j = 0; j < src.length; j++) { fn(n - 1, src.slice(j + 1), got.concat([src[j]]), all); } }; var excluded = excludedPlugins.map(function(plugin) { return...
[ "function", "(", "a", ")", "{", "var", "fn", "=", "function", "(", "n", ",", "src", ",", "got", ",", "all", ")", "{", "if", "(", "n", "===", "0", ")", "{", "all", ".", "push", "(", "got", ")", ";", "return", ";", "}", "for", "(", "var", "...
Taken from http://dzone.com/snippets/calculate-all-combinations
[ "Taken", "from", "http", ":", "//", "dzone", ".", "com", "/", "snippets", "/", "calculate", "-", "all", "-", "combinations" ]
a872223343fecf7364473b78bede937f1eb57bd0
https://github.com/getsentry/sentry-javascript/blob/a872223343fecf7364473b78bede937f1eb57bd0/packages/raven-js/Gruntfile.js#L39-L67
train
Build the xsd
[ 30522, 3853, 1006, 1037, 1007, 1063, 13075, 1042, 2078, 1027, 3853, 1006, 1050, 1010, 5034, 2278, 1010, 2288, 1010, 2035, 1007, 1063, 2065, 1006, 1050, 1027, 1027, 1027, 1014, 1007, 1063, 2035, 1012, 5245, 1006, 2288, 1007, 1025, 2709, 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...
mescroll/mescroll
mescroll-uni/dist/mescroll-uni.js
function() { me.downHight = 0; me.isDownScrolling = false; me.optDown.endDownScroll && me.optDown.endDownScroll(me); }
javascript
function() { me.downHight = 0; me.isDownScrolling = false; me.optDown.endDownScroll && me.optDown.endDownScroll(me); }
[ "function", "(", ")", "{", "me", ".", "downHight", "=", "0", ";", "me", ".", "isDownScrolling", "=", "false", ";", "me", ".", "optDown", ".", "endDownScroll", "&&", "me", ".", "optDown", ".", "endDownScroll", "(", "me", ")", ";", "}" ]
结束下拉刷新的方法
[ "结束下拉刷新的方法" ]
43d3dcf3062da0fe95995ddcb5e93f5725792c98
https://github.com/mescroll/mescroll/blob/43d3dcf3062da0fe95995ddcb5e93f5725792c98/mescroll-uni/dist/mescroll-uni.js#L264-L268
train
end down scroll
[ 30522, 3853, 1006, 1007, 1063, 2033, 1012, 2091, 4048, 13900, 1027, 1014, 1025, 2033, 1012, 2003, 7698, 11020, 28402, 2075, 1027, 6270, 1025, 2033, 1012, 23569, 7698, 1012, 2203, 7698, 11020, 28402, 1004, 1004, 2033, 1012, 23569, 7698, 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...
babel/babel
packages/babel-helper-module-transforms/src/index.js
buildESModuleHeader
function buildESModuleHeader( metadata: ModuleMetadata, enumerable: boolean = false, ) { return (enumerable ? template.statement` EXPORTS.__esModule = true; ` : template.statement` Object.defineProperty(EXPORTS, "__esModule", { value: true, }); `)({ EXPORTS: m...
javascript
function buildESModuleHeader( metadata: ModuleMetadata, enumerable: boolean = false, ) { return (enumerable ? template.statement` EXPORTS.__esModule = true; ` : template.statement` Object.defineProperty(EXPORTS, "__esModule", { value: true, }); `)({ EXPORTS: m...
[ "function", "buildESModuleHeader", "(", "metadata", ":", "ModuleMetadata", ",", "enumerable", ":", "boolean", "=", "false", ",", ")", "{", "return", "(", "enumerable", "?", "template", ".", "statement", "`", "`", ":", "template", ".", "statement", "`", "`", ...
Build an "__esModule" header statement setting the property on a given object.
[ "Build", "an", "__esModule", "header", "statement", "setting", "the", "property", "on", "a", "given", "object", "." ]
1969e6b6aa7d90be3fbb3aca98ea96849656a55a
https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-helper-module-transforms/src/index.js#L213-L226
train
Build the header for the module
[ 30522, 3853, 3857, 2229, 5302, 8566, 2571, 4974, 2121, 1006, 27425, 1024, 11336, 11368, 8447, 2696, 1010, 4372, 17897, 16670, 1024, 22017, 20898, 1027, 6270, 1010, 1007, 1063, 2709, 1006, 4372, 17897, 16670, 1029, 23561, 1012, 4861, 1036, 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/util/MockServer.js
function(data, select, currentPath) { var result = {}; // traversed path to get to data: currentPath = currentPath || ''; if (typeof data !== 'object') { return data; } if (typeof data.slice === 'function') { return data.map(function(el, index) { return fnMultiS...
javascript
function(data, select, currentPath) { var result = {}; // traversed path to get to data: currentPath = currentPath || ''; if (typeof data !== 'object') { return data; } if (typeof data.slice === 'function') { return data.map(function(el, index) { return fnMultiS...
[ "function", "(", "data", ",", "select", ",", "currentPath", ")", "{", "var", "result", "=", "{", "}", ";", "// traversed path to get to data:", "currentPath", "=", "currentPath", "||", "''", ";", "if", "(", "typeof", "data", "!==", "'object'", ")", "{", "r...
Add Support for multiple select return 1...n
[ "Add", "Support", "for", "multiple", "select", "return", "1", "...", "n" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/MockServer.js#L976-L1010
train
Recursively select the given data object.
[ 30522, 3853, 1006, 2951, 1010, 7276, 1010, 2783, 15069, 1007, 1063, 13075, 2765, 1027, 1063, 1065, 1025, 1013, 1013, 27797, 4130, 2000, 2131, 2000, 2951, 1024, 2783, 15069, 1027, 2783, 15069, 1064, 1064, 1005, 1005, 1025, 2065, 1006, 2828, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
electron/electron
lib/renderer/api/remote.js
setObjectMembers
function setObjectMembers (ref, object, metaId, members) { if (!Array.isArray(members)) return for (const member of members) { if (object.hasOwnProperty(member.name)) continue const descriptor = { enumerable: member.enumerable } if (member.type === 'method') { const remoteMemberFunction = functi...
javascript
function setObjectMembers (ref, object, metaId, members) { if (!Array.isArray(members)) return for (const member of members) { if (object.hasOwnProperty(member.name)) continue const descriptor = { enumerable: member.enumerable } if (member.type === 'method') { const remoteMemberFunction = functi...
[ "function", "setObjectMembers", "(", "ref", ",", "object", ",", "metaId", ",", "members", ")", "{", "if", "(", "!", "Array", ".", "isArray", "(", "members", ")", ")", "return", "for", "(", "const", "member", "of", "members", ")", "{", "if", "(", "obj...
Populate object's members from descriptors. The |ref| will be kept referenced by |members|. This matches |getObjectMemebers| in rpc-server.
[ "Populate", "object", "s", "members", "from", "descriptors", ".", "The", "|ref|", "will", "be", "kept", "referenced", "by", "|members|", ".", "This", "matches", "|getObjectMemebers|", "in", "rpc", "-", "server", "." ]
6e29611788277729647acf465f10db1ea6f15788
https://github.com/electron/electron/blob/6e29611788277729647acf465f10db1ea6f15788/lib/renderer/api/remote.js#L110-L161
train
Set the members of an object
[ 30522, 3853, 2275, 16429, 20614, 4168, 21784, 2015, 1006, 25416, 1010, 4874, 1010, 18804, 3593, 1010, 2372, 1007, 1063, 2065, 1006, 999, 9140, 1012, 18061, 11335, 2100, 1006, 2372, 1007, 1007, 2709, 2005, 1006, 9530, 3367, 2266, 1997, 2372,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/api/encodeGlobal.js
function(fileName, content) { return Promise() .then(function() { var filePath = PathUtils.resolveInRoot(outputFolder, fileName); return fs.exists(filePath); }); }
javascript
function(fileName, content) { return Promise() .then(function() { var filePath = PathUtils.resolveInRoot(outputFolder, fileName); return fs.exists(filePath); }); }
[ "function", "(", "fileName", ",", "content", ")", "{", "return", "Promise", "(", ")", ".", "then", "(", "function", "(", ")", "{", "var", "filePath", "=", "PathUtils", ".", "resolveInRoot", "(", "outputFolder", ",", "fileName", ")", ";", "return", "fs", ...
Check that a file exists. @param {String} fileName @return {Promise}
[ "Check", "that", "a", "file", "exists", "." ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/api/encodeGlobal.js#L180-L187
train
Check if file exists in output folder
[ 30522, 3853, 1006, 5371, 18442, 1010, 4180, 1007, 1063, 2709, 4872, 1006, 1007, 1012, 2059, 1006, 3853, 1006, 1007, 1063, 13075, 5371, 15069, 1027, 4130, 21823, 4877, 1012, 10663, 2378, 3217, 4140, 1006, 6434, 10371, 2121, 1010, 5371, 18442...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dequelabs/axe-core
lib/commons/aria/roles.js
function(roles, ariaAttributes) { var getScore = function(role) { var allowedAriaAttributes = aria.allowedAttr(role); return allowedAriaAttributes.reduce(function(score, attribute) { return score + (ariaAttributes.indexOf(attribute) > -1 ? 1 : 0); }, 0); }; var scored = roles.map(function(role) { ...
javascript
function(roles, ariaAttributes) { var getScore = function(role) { var allowedAriaAttributes = aria.allowedAttr(role); return allowedAriaAttributes.reduce(function(score, attribute) { return score + (ariaAttributes.indexOf(attribute) > -1 ? 1 : 0); }, 0); }; var scored = roles.map(function(role) { ...
[ "function", "(", "roles", ",", "ariaAttributes", ")", "{", "var", "getScore", "=", "function", "(", "role", ")", "{", "var", "allowedAriaAttributes", "=", "aria", ".", "allowedAttr", "(", "role", ")", ";", "return", "allowedAriaAttributes", ".", "reduce", "(...
/* Score a set of roles and aria-attributes by its optimal score E.g. [{score: 2, name: button}, {score: 1, name: main}]
[ "/", "*", "Score", "a", "set", "of", "roles", "and", "aria", "-", "attributes", "by", "its", "optimal", "score", "E", ".", "g", ".", "[", "{", "score", ":", "2", "name", ":", "button", "}", "{", "score", ":", "1", "name", ":", "main", "}", "]" ...
727323c07980e2291575f545444d389fb942906f
https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/commons/aria/roles.js#L155-L174
train
Returns an array of roles sorted by score
[ 30522, 3853, 1006, 4395, 1010, 9342, 19321, 3089, 8569, 4570, 1007, 1063, 13075, 4152, 17345, 1027, 3853, 1006, 2535, 1007, 1063, 13075, 3039, 10980, 19321, 3089, 8569, 4570, 1027, 9342, 1012, 3039, 19321, 2099, 1006, 2535, 1007, 1025, 2709...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/space-unary-ops.js
isFirstBangInBangBangExpression
function isFirstBangInBangBangExpression(node) { return node && node.type === "UnaryExpression" && node.argument.operator === "!" && node.argument && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; }
javascript
function isFirstBangInBangBangExpression(node) { return node && node.type === "UnaryExpression" && node.argument.operator === "!" && node.argument && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; }
[ "function", "isFirstBangInBangBangExpression", "(", "node", ")", "{", "return", "node", "&&", "node", ".", "type", "===", "\"UnaryExpression\"", "&&", "node", ".", "argument", ".", "operator", "===", "\"!\"", "&&", "node", ".", "argument", "&&", "node", ".", ...
-------------------------------------------------------------------------- Helpers -------------------------------------------------------------------------- Check if the node is the first "!" in a "!!" convert to Boolean expression @param {ASTnode} node AST node @returns {boolean} Whether or not the node is first "!"...
[ "--------------------------------------------------------------------------", "Helpers", "--------------------------------------------------------------------------", "Check", "if", "the", "node", "is", "the", "first", "!", "in", "a", "!!", "convert", "to", "Boolean", "expression" ...
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/space-unary-ops.js#L76-L79
train
Check if the node is a first bang in a bang expression
[ 30522, 3853, 2003, 8873, 12096, 25153, 2378, 25153, 25153, 10288, 20110, 3258, 1006, 13045, 1007, 1063, 2709, 13045, 1004, 1004, 13045, 1012, 2828, 1027, 1027, 1027, 1000, 14477, 2854, 10288, 20110, 3258, 1000, 1004, 1004, 13045, 1012, 6685, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
grpc/grpc-node
packages/grpc-native-core/src/server.js
setUpWritable
function setUpWritable(stream, serialize) { stream.finished = false; stream.status = { code : constants.status.OK, details : 'OK', metadata : new Metadata() }; stream.serialize = common.wrapIgnoreNull(serialize); function sendStatus() { var batch = {}; if (!stream.call.metadataSent) { ...
javascript
function setUpWritable(stream, serialize) { stream.finished = false; stream.status = { code : constants.status.OK, details : 'OK', metadata : new Metadata() }; stream.serialize = common.wrapIgnoreNull(serialize); function sendStatus() { var batch = {}; if (!stream.call.metadataSent) { ...
[ "function", "setUpWritable", "(", "stream", ",", "serialize", ")", "{", "stream", ".", "finished", "=", "false", ";", "stream", ".", "status", "=", "{", "code", ":", "constants", ".", "status", ".", "OK", ",", "details", ":", "'OK'", ",", "metadata", "...
Initialize a writable stream. This is used for both the writable and duplex stream constructors. @private @param {Writable} stream The stream to set up @param {function(*):Buffer=} Serialization function for responses
[ "Initialize", "a", "writable", "stream", ".", "This", "is", "used", "for", "both", "the", "writable", "and", "duplex", "stream", "constructors", "." ]
b36b285f4cdb334bbd48f74c12c13bec69961488
https://github.com/grpc/grpc-node/blob/b36b285f4cdb334bbd48f74c12c13bec69961488/packages/grpc-native-core/src/server.js#L120-L190
train
Set up writable stream
[ 30522, 3853, 16437, 13088, 6590, 3468, 1006, 5460, 1010, 7642, 4697, 1007, 1063, 5460, 1012, 2736, 1027, 6270, 1025, 5460, 1012, 3570, 1027, 1063, 3642, 1024, 5377, 2015, 1012, 3570, 1012, 7929, 1010, 4751, 1024, 1005, 7929, 1005, 1010, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/blanket.js
parseArrayInitialiser
function parseArrayInitialiser() { var elements = [], startToken; startToken = lookahead; expect('['); while (!match(']')) { if (match(',')) { lex(); elements.push(null); } else { elements.push(parseAssignmentExpre...
javascript
function parseArrayInitialiser() { var elements = [], startToken; startToken = lookahead; expect('['); while (!match(']')) { if (match(',')) { lex(); elements.push(null); } else { elements.push(parseAssignmentExpre...
[ "function", "parseArrayInitialiser", "(", ")", "{", "var", "elements", "=", "[", "]", ",", "startToken", ";", "startToken", "=", "lookahead", ";", "expect", "(", "'['", ")", ";", "while", "(", "!", "match", "(", "']'", ")", ")", "{", "if", "(", "matc...
11.1.4 Array Initialiser
[ "11", ".", "1", ".", "4", "Array", "Initialiser" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/blanket.js#L1979-L2001
train
ECMA - 262 12. 2 Array Initialiser
[ 30522, 3853, 11968, 17310, 11335, 25811, 29050, 6856, 2121, 1006, 1007, 1063, 13075, 3787, 1027, 1031, 1033, 1010, 2707, 18715, 2368, 1025, 2707, 18715, 2368, 1027, 2298, 4430, 13775, 1025, 5987, 1006, 1005, 1031, 1005, 1007, 1025, 2096, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js
function(mEntitySets) { var that = this; var oMockdata = this._oMockdata; var aDraftRoot = oMockdata[this._oDraftMetadata.draftRootName]; var fnGrep = function(aContains, aContained) { return aContains.filter(function(x) { return aContained.indexOf(x) < 0; })[0]; }; if (aDraftRoot.length ...
javascript
function(mEntitySets) { var that = this; var oMockdata = this._oMockdata; var aDraftRoot = oMockdata[this._oDraftMetadata.draftRootName]; var fnGrep = function(aContains, aContained) { return aContains.filter(function(x) { return aContained.indexOf(x) < 0; })[0]; }; if (aDraftRoot.length ...
[ "function", "(", "mEntitySets", ")", "{", "var", "that", "=", "this", ";", "var", "oMockdata", "=", "this", ".", "_oMockdata", ";", "var", "aDraftRoot", "=", "oMockdata", "[", "this", ".", "_oDraftMetadata", ".", "draftRootName", "]", ";", "var", "fnGrep",...
Handles draft mock data generation @param {object} mEntitySets
[ "Handles", "draft", "mock", "data", "generation" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js#L208-L337
train
Sets the drafts and active documents to the given entity sets.
[ 30522, 3853, 1006, 2273, 3775, 3723, 13462, 2015, 1007, 1063, 13075, 2008, 1027, 2023, 1025, 13075, 18168, 7432, 2850, 2696, 1027, 2023, 1012, 1035, 18168, 7432, 2850, 2696, 1025, 13075, 4748, 27528, 13181, 4140, 1027, 18168, 7432, 2850, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/linter.js
findEslintEnv
function findEslintEnv(text) { let match, retv; eslintEnvPattern.lastIndex = 0; while ((match = eslintEnvPattern.exec(text))) { retv = Object.assign(retv || {}, commentParser.parseListConfig(match[1])); } return retv; }
javascript
function findEslintEnv(text) { let match, retv; eslintEnvPattern.lastIndex = 0; while ((match = eslintEnvPattern.exec(text))) { retv = Object.assign(retv || {}, commentParser.parseListConfig(match[1])); } return retv; }
[ "function", "findEslintEnv", "(", "text", ")", "{", "let", "match", ",", "retv", ";", "eslintEnvPattern", ".", "lastIndex", "=", "0", ";", "while", "(", "(", "match", "=", "eslintEnvPattern", ".", "exec", "(", "text", ")", ")", ")", "{", "retv", "=", ...
Checks whether or not there is a comment which has "eslint-env *" in a given text. @param {string} text - A source code text to check. @returns {Object|null} A result of parseListConfig() with "eslint-env *" comment.
[ "Checks", "whether", "or", "not", "there", "is", "a", "comment", "which", "has", "eslint", "-", "env", "*", "in", "a", "given", "text", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/linter.js#L321-L331
train
Find the eslint environment variable in the given text
[ 30522, 3853, 2424, 2229, 4115, 6528, 2615, 1006, 3793, 1007, 1063, 2292, 2674, 1010, 2128, 9189, 1025, 9686, 4115, 6528, 2615, 4502, 12079, 2078, 1012, 2197, 22254, 10288, 1027, 1014, 1025, 2096, 1006, 1006, 2674, 1027, 9686, 4115, 6528, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
NervJS/taro-ui
src/components/input-number/index.js
addNum
function addNum (num1, num2) { let sq1, sq2 try { sq1 = _toString(num1).split('.')[1].length } catch (e) { sq1 = 0 } try { sq2 = _toString(num2).split('.')[1].length } catch (e) { sq2 = 0 } const m = Math.pow(10, Math.max(sq1, sq2)) return (Math.round(num1 * m) + Math.round(num2 * m)) ...
javascript
function addNum (num1, num2) { let sq1, sq2 try { sq1 = _toString(num1).split('.')[1].length } catch (e) { sq1 = 0 } try { sq2 = _toString(num2).split('.')[1].length } catch (e) { sq2 = 0 } const m = Math.pow(10, Math.max(sq1, sq2)) return (Math.round(num1 * m) + Math.round(num2 * m)) ...
[ "function", "addNum", "(", "num1", ",", "num2", ")", "{", "let", "sq1", ",", "sq2", "try", "{", "sq1", "=", "_toString", "(", "num1", ")", ".", "split", "(", "'.'", ")", "[", "1", "]", ".", "length", "}", "catch", "(", "e", ")", "{", "sq1", "...
实现两数相加并保留小数点后最短尾数
[ "实现两数相加并保留小数点后最短尾数" ]
9a761032b3663abf82dd4514ac29deec2eb13d2a
https://github.com/NervJS/taro-ui/blob/9a761032b3663abf82dd4514ac29deec2eb13d2a/src/components/input-number/index.js#L11-L25
train
Add two numbers
[ 30522, 3853, 5587, 19172, 1006, 16371, 2213, 2487, 1010, 16371, 2213, 2475, 1007, 1063, 2292, 5490, 2487, 1010, 5490, 2475, 3046, 1063, 5490, 2487, 1027, 1035, 2000, 3367, 4892, 1006, 16371, 2213, 2487, 1007, 1012, 3975, 1006, 1005, 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/dom/jquery/getSelectedText.js
function() { var oDomRef = this.get(0); try { if (typeof oDomRef.selectionStart === "number") { return oDomRef.value.substring(oDomRef.selectionStart, oDomRef.selectionEnd); } } catch (e) { // note: some browsers fail to read the "selectionStart" and "selectionEnd" properties from HTMLInputElement, ...
javascript
function() { var oDomRef = this.get(0); try { if (typeof oDomRef.selectionStart === "number") { return oDomRef.value.substring(oDomRef.selectionStart, oDomRef.selectionEnd); } } catch (e) { // note: some browsers fail to read the "selectionStart" and "selectionEnd" properties from HTMLInputElement, ...
[ "function", "(", ")", "{", "var", "oDomRef", "=", "this", ".", "get", "(", "0", ")", ";", "try", "{", "if", "(", "typeof", "oDomRef", ".", "selectionStart", "===", "\"number\"", ")", "{", "return", "oDomRef", ".", "value", ".", "substring", "(", "oDo...
This module provides the {@link jQuery#getSelectedText} API. @namespace @name module:sap/ui/dom/jquery/getSelectedText @public @since 1.58 Retrieve the selected text in the first element of the collection. <b>Note</b>: This feature is only supported for input element’s type of text, search, url, tel and password. ...
[ "This", "module", "provides", "the", "{", "@link", "jQuery#getSelectedText", "}", "API", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/dom/jquery/getSelectedText.js#L29-L41
train
Returns the selection string from the DOM
[ 30522, 3853, 1006, 1007, 1063, 13075, 1051, 9527, 2890, 2546, 1027, 2023, 1012, 2131, 1006, 1014, 1007, 1025, 3046, 1063, 2065, 1006, 2828, 11253, 1051, 9527, 2890, 2546, 1012, 16310, 7559, 2102, 1027, 1027, 1027, 1000, 2193, 1000, 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...
goldfire/howler.js
dist/howler.js
function(node) { var self = this; var isIOS = Howler._navigator && Howler._navigator.vendor.indexOf('Apple') >= 0; if (Howler._scratchBuffer && node.bufferSource) { node.bufferSource.onended = null; node.bufferSource.disconnect(0); if (isIOS) { try { node.bufferSourc...
javascript
function(node) { var self = this; var isIOS = Howler._navigator && Howler._navigator.vendor.indexOf('Apple') >= 0; if (Howler._scratchBuffer && node.bufferSource) { node.bufferSource.onended = null; node.bufferSource.disconnect(0); if (isIOS) { try { node.bufferSourc...
[ "function", "(", "node", ")", "{", "var", "self", "=", "this", ";", "var", "isIOS", "=", "Howler", ".", "_navigator", "&&", "Howler", ".", "_navigator", ".", "vendor", ".", "indexOf", "(", "'Apple'", ")", ">=", "0", ";", "if", "(", "Howler", ".", "...
Prevent memory leaks by cleaning up the buffer source after playback. @param {Object} node Sound's audio node containing the buffer source. @return {Howl}
[ "Prevent", "memory", "leaks", "by", "cleaning", "up", "the", "buffer", "source", "after", "playback", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L2120-L2134
train
This function is called by the bufferSource constructor when the buffer is ready
[ 30522, 3853, 1006, 13045, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 13075, 2003, 10735, 1027, 22912, 2121, 1012, 1035, 20532, 1004, 1004, 22912, 2121, 1012, 1035, 20532, 1012, 21431, 1012, 5950, 11253, 1006, 1005, 6207, 1005, 1007, 1028, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/semi-style.js
isLastChild
function isLastChild(node) { const t = node.parent.type; if (t === "IfStatement" && node.parent.consequent === node && node.parent.alternate) { // before `else` keyword. return true; } if (t === "DoWhileStatement") { // before `while` keyword. return true; } const nodeList = get...
javascript
function isLastChild(node) { const t = node.parent.type; if (t === "IfStatement" && node.parent.consequent === node && node.parent.alternate) { // before `else` keyword. return true; } if (t === "DoWhileStatement") { // before `while` keyword. return true; } const nodeList = get...
[ "function", "isLastChild", "(", "node", ")", "{", "const", "t", "=", "node", ".", "parent", ".", "type", ";", "if", "(", "t", "===", "\"IfStatement\"", "&&", "node", ".", "parent", ".", "consequent", "===", "node", "&&", "node", ".", "parent", ".", "...
Check whether a given node is the last statement in the parent block. @param {Node} node A node to check. @returns {boolean} `true` if the node is the last statement in the parent block.
[ "Check", "whether", "a", "given", "node", "is", "the", "last", "statement", "in", "the", "parent", "block", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/semi-style.js#L52-L64
train
Returns true if node is the last child of the last statement in the list of children
[ 30522, 3853, 25340, 3367, 19339, 1006, 13045, 1007, 1063, 9530, 3367, 1056, 1027, 13045, 1012, 6687, 1012, 2828, 1025, 2065, 1006, 1056, 1027, 1027, 1027, 1000, 2065, 9153, 18532, 4765, 1000, 1004, 1004, 13045, 1012, 6687, 1012, 9530, 3366,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...