repo
stringclasses
195 values
path
stringlengths
4
99
func_name
stringlengths
0
41
original_string
stringlengths
72
56.1k
language
stringclasses
1 value
code
stringlengths
72
56.1k
code_tokens
listlengths
25
8.12k
docstring
stringlengths
2
12.5k
docstring_tokens
listlengths
1
449
sha
stringclasses
197 values
url
stringlengths
88
186
partition
stringclasses
1 value
summary
stringlengths
8
338
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
SAP/openui5
src/sap.ui.core/src/sap/ui/core/LocaleData.js
function () { var mData = this._getDeep(this.mData, arguments); var mCustomData = this._getDeep(this.mCustomData, arguments); return jQuery.extend({}, mData, mCustomData); }
javascript
function () { var mData = this._getDeep(this.mData, arguments); var mCustomData = this._getDeep(this.mCustomData, arguments); return jQuery.extend({}, mData, mCustomData); }
[ "function", "(", ")", "{", "var", "mData", "=", "this", ".", "_getDeep", "(", "this", ".", "mData", ",", "arguments", ")", ";", "var", "mCustomData", "=", "this", ".", "_getDeep", "(", "this", ".", "mCustomData", ",", "arguments", ")", ";", "return", ...
Retrieves merged object from <code>mData</code> extended with <code>mCustomData</code>. This function merges the content of <code>mData</code> and <code>mCustomData</code> instead of returning one or the other like <code>_get()</code> does. Note: Properties defined in <code>mCustomData</code> overwrite the ones from <...
[ "Retrieves", "merged", "object", "from", "<code", ">", "mData<", "/", "code", ">", "extended", "with", "<code", ">", "mCustomData<", "/", "code", ">", ".", "This", "function", "merges", "the", "content", "of", "<code", ">", "mData<", "/", "code", ">", "a...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/LocaleData.js#L3348-L3353
train
Returns a deep copy of the data and custom data
[ 30522, 3853, 1006, 1007, 1063, 13075, 9108, 6790, 1027, 2023, 1012, 1035, 2131, 26095, 2361, 1006, 2023, 1012, 9108, 6790, 1010, 9918, 1007, 1025, 13075, 11338, 19966, 5358, 2850, 2696, 1027, 2023, 1012, 1035, 2131, 26095, 2361, 1006, 2023,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dimsemenov/PhotoSwipe
src/js/tap.js
function(origEvent, releasePoint, pointerType) { var e = document.createEvent( 'CustomEvent' ), eDetail = { origEvent:origEvent, target:origEvent.target, releasePoint: releasePoint, pointerType:pointerType || 'touch' }; e.initCustomEvent( 'pswpTap', true, true, eDetail ); origEvent.tar...
javascript
function(origEvent, releasePoint, pointerType) { var e = document.createEvent( 'CustomEvent' ), eDetail = { origEvent:origEvent, target:origEvent.target, releasePoint: releasePoint, pointerType:pointerType || 'touch' }; e.initCustomEvent( 'pswpTap', true, true, eDetail ); origEvent.tar...
[ "function", "(", "origEvent", ",", "releasePoint", ",", "pointerType", ")", "{", "var", "e", "=", "document", ".", "createEvent", "(", "'CustomEvent'", ")", ",", "eDetail", "=", "{", "origEvent", ":", "origEvent", ",", "target", ":", "origEvent", ".", "tar...
tap.js: Displatches tap and double-tap events.
[ "tap", ".", "js", ":" ]
80607e12542a1a54ecefa837649e862b35dffd25
https://github.com/dimsemenov/PhotoSwipe/blob/80607e12542a1a54ecefa837649e862b35dffd25/src/js/tap.js#L10-L21
train
This function is called by the touchend event handler when the touchend event is triggered.
[ 30522, 3853, 1006, 2030, 25538, 15338, 1010, 2713, 8400, 1010, 20884, 13874, 1007, 1063, 13075, 1041, 1027, 6254, 1012, 3443, 18697, 3372, 1006, 1005, 7661, 18697, 3372, 1005, 1007, 1010, 3968, 12928, 4014, 1027, 1063, 2030, 25538, 15338, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/blanket.js
parseSourceElement
function parseSourceElement() { if (lookahead.type === Token.Keyword) { switch (lookahead.value) { case 'const': case 'let': return parseConstLetDeclaration(lookahead.value); case 'function': return parseFunctionDeclaration(); ...
javascript
function parseSourceElement() { if (lookahead.type === Token.Keyword) { switch (lookahead.value) { case 'const': case 'let': return parseConstLetDeclaration(lookahead.value); case 'function': return parseFunctionDeclaration(); ...
[ "function", "parseSourceElement", "(", ")", "{", "if", "(", "lookahead", ".", "type", "===", "Token", ".", "Keyword", ")", "{", "switch", "(", "lookahead", ".", "value", ")", "{", "case", "'const'", ":", "case", "'let'", ":", "return", "parseConstLetDeclar...
14 Program
[ "14", "Program" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/blanket.js#L3479-L3495
train
ECMA - 262 13. 2. 1 Source Element
[ 30522, 3853, 11968, 8583, 8162, 3401, 12260, 3672, 1006, 1007, 1063, 2065, 1006, 2298, 4430, 13775, 1012, 2828, 1027, 1027, 1027, 19204, 1012, 3145, 18351, 1007, 1063, 6942, 1006, 2298, 4430, 13775, 1012, 3643, 1007, 1063, 2553, 1005, 9530,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/chart/tree/layoutHelper.js
nextLeft
function nextLeft(node) { var children = node.children; return children.length && node.isExpand ? children[0] : node.hierNode.thread; }
javascript
function nextLeft(node) { var children = node.children; return children.length && node.isExpand ? children[0] : node.hierNode.thread; }
[ "function", "nextLeft", "(", "node", ")", "{", "var", "children", "=", "node", ".", "children", ";", "return", "children", ".", "length", "&&", "node", ".", "isExpand", "?", "children", "[", "0", "]", ":", "node", ".", "hierNode", ".", "thread", ";", ...
This function is used to traverse the left contour of a subtree (or a subforest). It returns the leftmost child of node or the thread of node. The function returns null if and only if node is on the highest depth of its subtree. @param {module:echarts/data/Tree~TreeNode} node @return {module:echarts/data/Tree~TreeNod...
[ "This", "function", "is", "used", "to", "traverse", "the", "left", "contour", "of", "a", "subtree", "(", "or", "a", "subforest", ")", ".", "It", "returns", "the", "leftmost", "child", "of", "node", "or", "the", "thread", "of", "node", ".", "The", "func...
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/chart/tree/layoutHelper.js#L283-L286
train
Returns the next node in the tree
[ 30522, 3853, 2279, 2571, 6199, 1006, 13045, 1007, 1063, 13075, 2336, 1027, 13045, 1012, 2336, 1025, 2709, 2336, 1012, 3091, 1004, 1004, 13045, 1012, 2003, 10288, 9739, 2094, 1029, 2336, 1031, 1014, 1033, 1024, 13045, 1012, 7632, 11795, 1024...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/XMLCompositeMetadata.js
function (sClassName, oClassInfo) { this.InvalidationMode = { Render: true, None: false }; if (!oClassInfo.hasOwnProperty("renderer")) { oClassInfo.renderer = "sap.ui.core.XMLCompositeRenderer"; } if (!oClassInfo.hasOwnProperty("alias")) { oClassInfo.alias = "this"; } ElementMetadata.app...
javascript
function (sClassName, oClassInfo) { this.InvalidationMode = { Render: true, None: false }; if (!oClassInfo.hasOwnProperty("renderer")) { oClassInfo.renderer = "sap.ui.core.XMLCompositeRenderer"; } if (!oClassInfo.hasOwnProperty("alias")) { oClassInfo.alias = "this"; } ElementMetadata.app...
[ "function", "(", "sClassName", ",", "oClassInfo", ")", "{", "this", ".", "InvalidationMode", "=", "{", "Render", ":", "true", ",", "None", ":", "false", "}", ";", "if", "(", "!", "oClassInfo", ".", "hasOwnProperty", "(", "\"renderer\"", ")", ")", "{", ...
/* Creates a new metadata object that describes a subclass of XMLComposite. @param {string} sClassName fully qualified name of the described class @param {object} oClassInfo static info to construct the metadata from @author SAP SE @version ${version} @since 1.50.0 @alias sap.ui.core.XMLCompositeMetadata @extends sa...
[ "/", "*" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLCompositeMetadata.js#L38-L94
train
Creates a new instance of the XMLComposite class.
[ 30522, 3853, 1006, 8040, 27102, 18442, 1010, 1051, 26266, 2378, 14876, 1007, 1063, 2023, 1012, 19528, 3370, 5302, 3207, 1027, 1063, 17552, 1024, 2995, 1010, 3904, 1024, 6270, 1065, 1025, 2065, 1006, 999, 30524, 1063, 1051, 26266, 2378, 1487...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
catapult-project/catapult
tracing/third_party/oboe/src/instanceApi.js
addForgettableCallback
function addForgettableCallback(event, callback, listenerId) { // listenerId is optional and if not given, the original // callback will be used listenerId = listenerId || callback; var safeCallback = protectedCallback(callback); event.on( function() { var discard = false; oboeApi.f...
javascript
function addForgettableCallback(event, callback, listenerId) { // listenerId is optional and if not given, the original // callback will be used listenerId = listenerId || callback; var safeCallback = protectedCallback(callback); event.on( function() { var discard = false; oboeApi.f...
[ "function", "addForgettableCallback", "(", "event", ",", "callback", ",", "listenerId", ")", "{", "// listenerId is optional and if not given, the original", "// callback will be used", "listenerId", "=", "listenerId", "||", "callback", ";", "var", "safeCallback", "=", "pro...
Add a callback where, if .forget() is called during the callback's execution, the callback will be de-registered
[ "Add", "a", "callback", "where", "if", ".", "forget", "()", "is", "called", "during", "the", "callback", "s", "execution", "the", "callback", "will", "be", "de", "-", "registered" ]
992929ffccac68827869a497f01ee4d653ed4f25
https://github.com/catapult-project/catapult/blob/992929ffccac68827869a497f01ee4d653ed4f25/tracing/third_party/oboe/src/instanceApi.js#L94-L120
train
Adds a callback to the forgettable event
[ 30522, 3853, 5587, 29278, 18150, 10880, 9289, 20850, 8684, 1006, 2724, 1010, 2655, 5963, 1010, 19373, 3593, 1007, 1063, 1013, 1013, 19373, 3593, 2003, 11887, 1998, 2065, 2025, 2445, 1010, 1996, 2434, 1013, 1013, 2655, 5963, 2097, 2022, 2109...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
goldfire/howler.js
examples/sprite/sprite.js
function(options) { var self = this; self.sounds = []; // Setup the options to define this sprite display. self._width = options.width; self._left = options.left; self._spriteMap = options.spriteMap; self._sprite = options.sprite; self.setupListeners(); // Create our audio sprite definition. self...
javascript
function(options) { var self = this; self.sounds = []; // Setup the options to define this sprite display. self._width = options.width; self._left = options.left; self._spriteMap = options.spriteMap; self._sprite = options.sprite; self.setupListeners(); // Create our audio sprite definition. self...
[ "function", "(", "options", ")", "{", "var", "self", "=", "this", ";", "self", ".", "sounds", "=", "[", "]", ";", "// Setup the options to define this sprite display.", "self", ".", "_width", "=", "options", ".", "width", ";", "self", ".", "_left", "=", "o...
Sprite class containing the state of our sprites to play and their progress. @param {Object} options Settings to pass into and setup the sound and visuals.
[ "Sprite", "class", "containing", "the", "state", "of", "our", "sprites", "to", "play", "and", "their", "progress", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/sprite/sprite.js#L21-L47
train
Initialize the howl object
[ 30522, 3853, 1006, 7047, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 2969, 1012, 4165, 1027, 1031, 1033, 1025, 1013, 1013, 16437, 1996, 7047, 2000, 9375, 2023, 11867, 17625, 4653, 1012, 2969, 1012, 1035, 9381, 1027, 7047, 1012, 9381, 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...
dequelabs/axe-core
lib/core/utils/merge-results.js
spliceNodes
function spliceNodes(target, to) { 'use strict'; var firstFromFrame = to[0].node, sorterResult, t; for (var i = 0, l = target.length; i < l; i++) { t = target[i].node; sorterResult = axe.utils.nodeSorter( { actualNode: t.element }, { actualNode: firstFromFrame.element } ); if ( sorterResult > 0...
javascript
function spliceNodes(target, to) { 'use strict'; var firstFromFrame = to[0].node, sorterResult, t; for (var i = 0, l = target.length; i < l; i++) { t = target[i].node; sorterResult = axe.utils.nodeSorter( { actualNode: t.element }, { actualNode: firstFromFrame.element } ); if ( sorterResult > 0...
[ "function", "spliceNodes", "(", "target", ",", "to", ")", "{", "'use strict'", ";", "var", "firstFromFrame", "=", "to", "[", "0", "]", ".", "node", ",", "sorterResult", ",", "t", ";", "for", "(", "var", "i", "=", "0", ",", "l", "=", "target", ".", ...
Adds `to` to `from` and then re-sorts by DOM order @private @param {Array} target `nodes` array on a `RuleResult` @param {Array} to `nodes` array on a `RuleResult` @return {Array} The merged and sorted result
[ "Adds", "to", "to", "from", "and", "then", "re", "-", "sorts", "by", "DOM", "order" ]
727323c07980e2291575f545444d389fb942906f
https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/core/utils/merge-results.js#L38-L60
train
Splice nodes from target to to
[ 30522, 3853, 11867, 13231, 3630, 6155, 1006, 4539, 1010, 2000, 1007, 1063, 1005, 2224, 9384, 1005, 1025, 13075, 2034, 19699, 5358, 15643, 1027, 2000, 1031, 1014, 1033, 1012, 13045, 1010, 4066, 28849, 23722, 2102, 1010, 1056, 1025, 2005, 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...
aframevr/aframe
src/extras/primitives/primitives.js
extend
function extend (base, extension) { if (isUndefined(base)) { return copy(extension); } if (isUndefined(extension)) { return copy(base); } if (isPureObject(base) && isPureObject(extension)) { return utils.extendDeep(bas...
javascript
function extend (base, extension) { if (isUndefined(base)) { return copy(extension); } if (isUndefined(extension)) { return copy(base); } if (isPureObject(base) && isPureObject(extension)) { return utils.extendDeep(bas...
[ "function", "extend", "(", "base", ",", "extension", ")", "{", "if", "(", "isUndefined", "(", "base", ")", ")", "{", "return", "copy", "(", "extension", ")", ";", "}", "if", "(", "isUndefined", "(", "extension", ")", ")", "{", "return", "copy", "(", ...
For the base to be extensible, both objects must be pure JavaScript objects. The function assumes that base is undefined, or null or a pure object.
[ "For", "the", "base", "to", "be", "extensible", "both", "objects", "must", "be", "pure", "JavaScript", "objects", ".", "The", "function", "assumes", "that", "base", "is", "undefined", "or", "null", "or", "a", "pure", "object", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/extras/primitives/primitives.js#L108-L119
train
Extend base with extension
[ 30522, 3853, 7949, 1006, 2918, 1010, 5331, 1007, 1063, 2065, 1006, 2003, 8630, 28344, 1006, 2918, 1007, 1007, 1063, 2709, 6100, 1006, 5331, 1007, 1025, 1065, 2065, 1006, 2003, 8630, 28344, 1006, 5331, 1007, 1007, 1063, 2709, 6100, 1006, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
google/code-prettify
js-modules/run_prettify.js
loadStylesheetsFallingBack
function loadStylesheetsFallingBack(stylesheets) { var n = stylesheets.length; function load(i) { if (i === n) { return; } var link = doc.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; if (i + 1 < n) { // http://pieisgood.org/test/script-link-events...
javascript
function loadStylesheetsFallingBack(stylesheets) { var n = stylesheets.length; function load(i) { if (i === n) { return; } var link = doc.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; if (i + 1 < n) { // http://pieisgood.org/test/script-link-events...
[ "function", "loadStylesheetsFallingBack", "(", "stylesheets", ")", "{", "var", "n", "=", "stylesheets", ".", "length", ";", "function", "load", "(", "i", ")", "{", "if", "(", "i", "===", "n", ")", "{", "return", ";", "}", "var", "link", "=", "doc", "...
Given a list of URLs to stylesheets, loads the first that loads without triggering an error event.
[ "Given", "a", "list", "of", "URLs", "to", "stylesheets", "loads", "the", "first", "that", "loads", "without", "triggering", "an", "error", "event", "." ]
e14ed1c3c40f78fca2a11af4cb0fa251f6f997fc
https://github.com/google/code-prettify/blob/e14ed1c3c40f78fca2a11af4cb0fa251f6f997fc/js-modules/run_prettify.js#L122-L140
train
Load stylesheets back to head
[ 30522, 3853, 15665, 27983, 4095, 15558, 22747, 8095, 2075, 5963, 1006, 6782, 21030, 3215, 1007, 1063, 13075, 1050, 1027, 6782, 21030, 3215, 1012, 3091, 1025, 3853, 7170, 1006, 1045, 1007, 1063, 2065, 1006, 1045, 1027, 1027, 1027, 1050, 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...
moleculerjs/moleculer
src/middlewares/metrics.js
metricStart
function metricStart(ctx) { ctx.startTime = Date.now(); ctx.startHrTime = process.hrtime(); ctx.duration = 0; if (ctx.metrics) { const payload = generateMetricPayload(ctx); ctx.broker.emit("metrics.trace.span.start", payload); } }
javascript
function metricStart(ctx) { ctx.startTime = Date.now(); ctx.startHrTime = process.hrtime(); ctx.duration = 0; if (ctx.metrics) { const payload = generateMetricPayload(ctx); ctx.broker.emit("metrics.trace.span.start", payload); } }
[ "function", "metricStart", "(", "ctx", ")", "{", "ctx", ".", "startTime", "=", "Date", ".", "now", "(", ")", ";", "ctx", ".", "startHrTime", "=", "process", ".", "hrtime", "(", ")", ";", "ctx", ".", "duration", "=", "0", ";", "if", "(", "ctx", "....
Start metrics & send metric event. @param {Context} ctx @private
[ "Start", "metrics", "&", "send", "metric", "event", "." ]
f95aadc2d61b0d0e3c643a43c3ed28bca6425cde
https://github.com/moleculerjs/moleculer/blob/f95aadc2d61b0d0e3c643a43c3ed28bca6425cde/src/middlewares/metrics.js#L40-L49
train
Start metric
[ 30522, 3853, 12046, 14117, 2102, 1006, 14931, 2595, 1007, 1063, 14931, 2595, 1012, 2707, 7292, 1027, 3058, 1012, 2085, 1006, 1007, 1025, 14931, 2595, 1012, 2707, 8093, 7292, 1027, 2832, 1012, 17850, 7292, 1006, 1007, 1025, 14931, 2595, 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...
SheetJS/js-xlsx
xlsx.js
parse_NameCmt
function parse_NameCmt(blob, length, opts) { if(opts.biff < 8) { blob.l += length; return; } var cchName = blob.read_shift(2); var cchComment = blob.read_shift(2); var name = parse_XLUnicodeStringNoCch(blob, cchName, opts); var comment = parse_XLUnicodeStringNoCch(blob, cchComment, opts); return [name, comment]; ...
javascript
function parse_NameCmt(blob, length, opts) { if(opts.biff < 8) { blob.l += length; return; } var cchName = blob.read_shift(2); var cchComment = blob.read_shift(2); var name = parse_XLUnicodeStringNoCch(blob, cchName, opts); var comment = parse_XLUnicodeStringNoCch(blob, cchComment, opts); return [name, comment]; ...
[ "function", "parse_NameCmt", "(", "blob", ",", "length", ",", "opts", ")", "{", "if", "(", "opts", ".", "biff", "<", "8", ")", "{", "blob", ".", "l", "+=", "length", ";", "return", ";", "}", "var", "cchName", "=", "blob", ".", "read_shift", "(", ...
/* [MS-XLS] 2.4.176 TODO: check older biff
[ "/", "*", "[", "MS", "-", "XLS", "]", "2", ".", "4", ".", "176", "TODO", ":", "check", "older", "biff" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/xlsx.js#L6275-L6282
train
Parse a name and comment
[ 30522, 3853, 11968, 3366, 1035, 2171, 27487, 2102, 1006, 1038, 4135, 2497, 1010, 3091, 1010, 23569, 2015, 1007, 1063, 2065, 1006, 23569, 2015, 1012, 12170, 4246, 1026, 1022, 1007, 1063, 1038, 4135, 2497, 1012, 1048, 1009, 1027, 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...
google/material-design-lite
src/mdlComponentHandler.js
downgradeNodesInternal
function downgradeNodesInternal(nodes) { /** * Auxiliary function to downgrade a single node. * @param {!Node} node the node to be downgraded */ var downgradeNode = function(node) { createdComponents_.filter(function(item) { return item.element_ === node; }).forEach(deconstru...
javascript
function downgradeNodesInternal(nodes) { /** * Auxiliary function to downgrade a single node. * @param {!Node} node the node to be downgraded */ var downgradeNode = function(node) { createdComponents_.filter(function(item) { return item.element_ === node; }).forEach(deconstru...
[ "function", "downgradeNodesInternal", "(", "nodes", ")", "{", "/**\n * Auxiliary function to downgrade a single node.\n * @param {!Node} node the node to be downgraded\n */", "var", "downgradeNode", "=", "function", "(", "node", ")", "{", "createdComponents_", ".", "fi...
Downgrade either a given node, an array of nodes, or a NodeList. @param {!Node|!Array<!Node>|!NodeList} nodes
[ "Downgrade", "either", "a", "given", "node", "an", "array", "of", "nodes", "or", "a", "NodeList", "." ]
60f441a22ed98ed2c03f6179adf460d888bf459f
https://github.com/google/material-design-lite/blob/60f441a22ed98ed2c03f6179adf460d888bf459f/src/mdlComponentHandler.js#L390-L409
train
downgrade nodes from the MDL to the top of the MDL
[ 30522, 3853, 2091, 24170, 3630, 6155, 18447, 11795, 2389, 1006, 14164, 1007, 1063, 1013, 1008, 1008, 1008, 9830, 3853, 2000, 2091, 30524, 3853, 1006, 8875, 1007, 1063, 2709, 8875, 1012, 5783, 1035, 1027, 1027, 1027, 13045, 1025, 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...
adobe/brackets
src/extensions/default/NavigationAndHistory/main.js
_purgeAllExceptWorkingSet
function _purgeAllExceptWorkingSet() { _mrofList = _createMROFList(); $mrofList.empty(); _createMROFDisplayList(true); $currentContext = null; PreferencesManager.setViewState(OPEN_FILES_VIEW_STATE, _mrofList, _getPrefsContext(), true); }
javascript
function _purgeAllExceptWorkingSet() { _mrofList = _createMROFList(); $mrofList.empty(); _createMROFDisplayList(true); $currentContext = null; PreferencesManager.setViewState(OPEN_FILES_VIEW_STATE, _mrofList, _getPrefsContext(), true); }
[ "function", "_purgeAllExceptWorkingSet", "(", ")", "{", "_mrofList", "=", "_createMROFList", "(", ")", ";", "$mrofList", ".", "empty", "(", ")", ";", "_createMROFDisplayList", "(", "true", ")", ";", "$currentContext", "=", "null", ";", "PreferencesManager", ".",...
Clears the MROF list in memory and pop over but retains the working set entries @private
[ "Clears", "the", "MROF", "list", "in", "memory", "and", "pop", "over", "but", "retains", "the", "working", "set", "entries" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/NavigationAndHistory/main.js#L389-L395
train
purge all files except working set
[ 30522, 3853, 1035, 24694, 24164, 2595, 3401, 13876, 21398, 13462, 1006, 1007, 1063, 1035, 2720, 11253, 9863, 1027, 1035, 3443, 2213, 3217, 10258, 2923, 1006, 1007, 1025, 1002, 2720, 11253, 9863, 1012, 4064, 1006, 1007, 1025, 1035, 3443, 221...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/column-helper.js
translateTemplates
function translateTemplates(templates) { var result = []; for (var _i = 0, templates_1 = templates; _i < templates_1.length; _i++) { var temp = templates_1[_i]; var col = {}; var props = Object.getOwnPropertyNames(temp); for (var _a = 0, props_1 = props; _a < props_1.length; _a++...
javascript
function translateTemplates(templates) { var result = []; for (var _i = 0, templates_1 = templates; _i < templates_1.length; _i++) { var temp = templates_1[_i]; var col = {}; var props = Object.getOwnPropertyNames(temp); for (var _a = 0, props_1 = props; _a < props_1.length; _a++...
[ "function", "translateTemplates", "(", "templates", ")", "{", "var", "result", "=", "[", "]", ";", "for", "(", "var", "_i", "=", "0", ",", "templates_1", "=", "templates", ";", "_i", "<", "templates_1", ".", "length", ";", "_i", "++", ")", "{", "var"...
Translates templates definitions to objects
[ "Translates", "templates", "definitions", "to", "objects" ]
d7df15a070282a169524dba51d9572008b74804c
https://github.com/swimlane/ngx-datatable/blob/d7df15a070282a169524dba51d9572008b74804c/release/utils/column-helper.js#L76-L101
train
Translate a list of templates
[ 30522, 3853, 17637, 18532, 15725, 2015, 1006, 23561, 2015, 1007, 1063, 13075, 2765, 1027, 1031, 1033, 1025, 2005, 1006, 13075, 1035, 1045, 1027, 1014, 1010, 23561, 2015, 1035, 1015, 1027, 23561, 2015, 1025, 1035, 1045, 1026, 23561, 2015, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/utils/NodeConnection.js
doConnect
function doConnect() { attemptCount++; attemptTimestamp = new Date(); attemptSingleConnect().then( registerHandlersAndDomains, // succeded function () { // failed this attempt, possibly try again if (attemptCount < CONNECTION_ATTEMP...
javascript
function doConnect() { attemptCount++; attemptTimestamp = new Date(); attemptSingleConnect().then( registerHandlersAndDomains, // succeded function () { // failed this attempt, possibly try again if (attemptCount < CONNECTION_ATTEMP...
[ "function", "doConnect", "(", ")", "{", "attemptCount", "++", ";", "attemptTimestamp", "=", "new", "Date", "(", ")", ";", "attemptSingleConnect", "(", ")", ".", "then", "(", "registerHandlersAndDomains", ",", "// succeded", "function", "(", ")", "{", "// faile...
Repeatedly tries to connect until we succeed or until we've failed CONNECTION_ATTEMPT times. After each attempt, waits at least RETRY_DELAY before trying again.
[ "Repeatedly", "tries", "to", "connect", "until", "we", "succeed", "or", "until", "we", "ve", "failed", "CONNECTION_ATTEMPT", "times", ".", "After", "each", "attempt", "waits", "at", "least", "RETRY_DELAY", "before", "trying", "again", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/NodeConnection.js#L300-L319
train
doConnect - tries to connect to the server
[ 30522, 3853, 9986, 18256, 6593, 1006, 1007, 1063, 3535, 3597, 16671, 1009, 1009, 1025, 3535, 7292, 9153, 8737, 1027, 2047, 3058, 1006, 1007, 1025, 4740, 2075, 2571, 8663, 2638, 6593, 1006, 1007, 1012, 2059, 1006, 4236, 11774, 12910, 5685, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aframevr/aframe
src/systems/camera.js
function (newCameraEl) { var newCamera; var previousCamera = this.spectatorCameraEl; var sceneEl = this.sceneEl; var spectatorCameraEl; // Same camera. newCamera = newCameraEl.getObject3D('camera'); if (!newCamera || newCameraEl === this.spectatorCameraEl) { return; } // Disable curren...
javascript
function (newCameraEl) { var newCamera; var previousCamera = this.spectatorCameraEl; var sceneEl = this.sceneEl; var spectatorCameraEl; // Same camera. newCamera = newCameraEl.getObject3D('camera'); if (!newCamera || newCameraEl === this.spectatorCameraEl) { return; } // Disable curren...
[ "function", "(", "newCameraEl", ")", "{", "var", "newCamera", ";", "var", "previousCamera", "=", "this", ".", "spectatorCameraEl", ";", "var", "sceneEl", "=", "this", ".", "sceneEl", ";", "var", "spectatorCameraEl", ";", "// Same camera.", "newCamera", "=", "n...
Set spectator camera to render the scene on a 2D display. @param {Element} newCameraEl - Entity with camera component.
[ "Set", "spectator", "camera", "to", "render", "the", "scene", "on", "a", "2D", "display", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/systems/camera.js#L193-L217
train
Sets spectator camera element
[ 30522, 3853, 1006, 2047, 28727, 6906, 2884, 1007, 1063, 13075, 2047, 28727, 6906, 1025, 13075, 3025, 28727, 6906, 1027, 2023, 1012, 21027, 28727, 6906, 2884, 1025, 13075, 3496, 2884, 1027, 2023, 1012, 3496, 2884, 1025, 13075, 21027, 28727, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
ecomfe/zrender
src/graphic/Style.js
function (otherStyle, overwrite) { if (otherStyle) { for (var name in otherStyle) { if (otherStyle.hasOwnProperty(name) && (overwrite === true || ( overwrite === false ? !this.hasO...
javascript
function (otherStyle, overwrite) { if (otherStyle) { for (var name in otherStyle) { if (otherStyle.hasOwnProperty(name) && (overwrite === true || ( overwrite === false ? !this.hasO...
[ "function", "(", "otherStyle", ",", "overwrite", ")", "{", "if", "(", "otherStyle", ")", "{", "for", "(", "var", "name", "in", "otherStyle", ")", "{", "if", "(", "otherStyle", ".", "hasOwnProperty", "(", "name", ")", "&&", "(", "overwrite", "===", "tru...
Extend from other style @param {zrender/graphic/Style} otherStyle @param {boolean} overwrite true: overwrirte any way. false: overwrite only when !target.hasOwnProperty others: overwrite when property is not null/undefined.
[ "Extend", "from", "other", "style" ]
30321b57cba3149c30eacb0c1e18276f0f001b9f
https://github.com/ecomfe/zrender/blob/30321b57cba3149c30eacb0c1e18276f0f001b9f/src/graphic/Style.js#L424-L440
train
Set the content of this object with the same name as the other one
[ 30522, 3853, 1006, 2500, 27983, 1010, 2058, 26373, 1007, 1063, 2065, 1006, 2500, 27983, 1007, 1063, 2005, 1006, 13075, 2171, 1999, 2500, 27983, 1007, 1063, 2065, 1006, 2500, 27983, 1012, 2038, 12384, 21572, 4842, 3723, 1006, 2171, 1007, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/project/WorkingSetSort.js
_addListeners
function _addListeners() { if (_automaticSort && _currentSort && _currentSort.getEvents()) { MainViewManager .on(_currentSort.getEvents(), function () { _currentSort.sort(); }) .on("_workingSetDisableAutoSort.sort", function () { ...
javascript
function _addListeners() { if (_automaticSort && _currentSort && _currentSort.getEvents()) { MainViewManager .on(_currentSort.getEvents(), function () { _currentSort.sort(); }) .on("_workingSetDisableAutoSort.sort", function () { ...
[ "function", "_addListeners", "(", ")", "{", "if", "(", "_automaticSort", "&&", "_currentSort", "&&", "_currentSort", ".", "getEvents", "(", ")", ")", "{", "MainViewManager", ".", "on", "(", "_currentSort", ".", "getEvents", "(", ")", ",", "function", "(", ...
Adds the current sort MainViewManager listeners. @private
[ "Adds", "the", "current", "sort", "MainViewManager", "listeners", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/WorkingSetSort.js#L170-L180
train
Add listeners to the main view manager
[ 30522, 3853, 1035, 5587, 9863, 24454, 2015, 1006, 1007, 1063, 2065, 1006, 1035, 6882, 21748, 2102, 1004, 1004, 1035, 14731, 11589, 1004, 1004, 1035, 14731, 11589, 1012, 2131, 18697, 7666, 1006, 1007, 1007, 1063, 2364, 8584, 24805, 4590, 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...
eslint/eslint
lib/rules/no-implicit-coercion.js
isMultiplyByOne
function isMultiplyByOne(node) { return node.operator === "*" && ( node.left.type === "Literal" && node.left.value === 1 || node.right.type === "Literal" && node.right.value === 1 ); }
javascript
function isMultiplyByOne(node) { return node.operator === "*" && ( node.left.type === "Literal" && node.left.value === 1 || node.right.type === "Literal" && node.right.value === 1 ); }
[ "function", "isMultiplyByOne", "(", "node", ")", "{", "return", "node", ".", "operator", "===", "\"*\"", "&&", "(", "node", ".", "left", ".", "type", "===", "\"Literal\"", "&&", "node", ".", "left", ".", "value", "===", "1", "||", "node", ".", "right",...
Checks whether or not a node is a multiplying by one. @param {BinaryExpression} node - A BinaryExpression node to check. @returns {boolean} Whether or not the node is a multiplying by one.
[ "Checks", "whether", "or", "not", "a", "node", "is", "a", "multiplying", "by", "one", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-implicit-coercion.js#L64-L69
train
Checks whether a node is a multiplication by one
[ 30522, 3853, 2003, 12274, 7096, 11514, 2135, 3762, 5643, 1006, 13045, 1007, 1063, 2709, 13045, 1012, 6872, 1027, 1027, 1027, 1000, 1008, 1000, 1004, 1004, 1006, 13045, 1012, 2187, 1012, 2828, 1027, 1027, 1027, 1000, 18204, 1000, 1004, 1004,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
keplergl/kepler.gl
scripts/documentation.js
_cleanUpTOCChildren
function _cleanUpTOCChildren(node) { if (!Array.isArray(node.children)) { return node; } if (_isExampleOrParameterLink(node)) { return null; } const filteredChildren = node.children.reduce((accu, nd) => { accu.push(_cleanUpTOCChildren(nd)); return accu; }, []).filter(n => n); if (!filt...
javascript
function _cleanUpTOCChildren(node) { if (!Array.isArray(node.children)) { return node; } if (_isExampleOrParameterLink(node)) { return null; } const filteredChildren = node.children.reduce((accu, nd) => { accu.push(_cleanUpTOCChildren(nd)); return accu; }, []).filter(n => n); if (!filt...
[ "function", "_cleanUpTOCChildren", "(", "node", ")", "{", "if", "(", "!", "Array", ".", "isArray", "(", "node", ".", "children", ")", ")", "{", "return", "node", ";", "}", "if", "(", "_isExampleOrParameterLink", "(", "node", ")", ")", "{", "return", "n...
Remove example and parameter link from TOC
[ "Remove", "example", "and", "parameter", "link", "from", "TOC" ]
779238435707cc54335c2d00001e4b9334b314aa
https://github.com/keplergl/kepler.gl/blob/779238435707cc54335c2d00001e4b9334b314aa/scripts/documentation.js#L204-L227
train
clean up children of TOC
[ 30522, 3853, 1035, 27686, 3406, 25955, 6392, 7389, 1006, 13045, 1007, 1063, 2065, 1006, 999, 9140, 1012, 18061, 11335, 2100, 1006, 13045, 1012, 2336, 1007, 1007, 1063, 2709, 13045, 1025, 1065, 2065, 1006, 1035, 2003, 10288, 16613, 2571, 295...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/mvc/Controller.js
loadExtensionProvider
function loadExtensionProvider(oController, bAsync) { var sProviderName = Controller._sExtensionProvider.replace(/\./g, "/"), oProvider = mExtensionProvider[sProviderName]; if (bAsync) { return new Promise(function(resolve, reject) { if (sProviderName) { if (oProvider){ resolve(oProvider...
javascript
function loadExtensionProvider(oController, bAsync) { var sProviderName = Controller._sExtensionProvider.replace(/\./g, "/"), oProvider = mExtensionProvider[sProviderName]; if (bAsync) { return new Promise(function(resolve, reject) { if (sProviderName) { if (oProvider){ resolve(oProvider...
[ "function", "loadExtensionProvider", "(", "oController", ",", "bAsync", ")", "{", "var", "sProviderName", "=", "Controller", ".", "_sExtensionProvider", ".", "replace", "(", "/", "\\.", "/", "g", ",", "\"/\"", ")", ",", "oProvider", "=", "mExtensionProvider", ...
/* load extension provider @param {sap.ui.core.mvc.Controller} oController The controller instance @param {boolean} bAsync Load async or not @return {ExtensionProvider|Promise|undefined} ExtensionProvider <code>Promise</code> in case of asynchronous loading or the <code>ExtensionProvider</code> in case of synchronous ...
[ "/", "*", "load", "extension", "provider" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/mvc/Controller.js#L303-L332
train
Loads the extension provider
[ 30522, 3853, 7170, 10288, 29048, 21572, 17258, 2121, 1006, 1051, 8663, 13181, 10820, 1010, 19021, 6038, 2278, 1007, 1063, 13075, 11867, 12298, 18688, 18442, 1027, 11486, 1012, 1035, 3348, 29048, 21572, 17258, 2121, 1012, 5672, 1006, 1013, 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...
chartjs/Chart.js
src/core/core.tooltip.js
function() { var me = this; var callbacks = me._options.callbacks; var beforeFooter = callbacks.beforeFooter.apply(me, arguments); var footer = callbacks.footer.apply(me, arguments); var afterFooter = callbacks.afterFooter.apply(me, arguments); var lines = []; lines = pushOrConcat(lines, splitNewlines(b...
javascript
function() { var me = this; var callbacks = me._options.callbacks; var beforeFooter = callbacks.beforeFooter.apply(me, arguments); var footer = callbacks.footer.apply(me, arguments); var afterFooter = callbacks.afterFooter.apply(me, arguments); var lines = []; lines = pushOrConcat(lines, splitNewlines(b...
[ "function", "(", ")", "{", "var", "me", "=", "this", ";", "var", "callbacks", "=", "me", ".", "_options", ".", "callbacks", ";", "var", "beforeFooter", "=", "callbacks", ".", "beforeFooter", ".", "apply", "(", "me", ",", "arguments", ")", ";", "var", ...
Get the footer and beforeFooter and afterFooter lines Args are: (tooltipItem, data)
[ "Get", "the", "footer", "and", "beforeFooter", "and", "afterFooter", "lines", "Args", "are", ":", "(", "tooltipItem", "data", ")" ]
f093c36574d290330ed623e60fbd070421c730d5
https://github.com/chartjs/Chart.js/blob/f093c36574d290330ed623e60fbd070421c730d5/src/core/core.tooltip.js#L552-L566
train
Returns an array of lines that are split by newlines
[ 30522, 3853, 1006, 1007, 1063, 13075, 2033, 1027, 2023, 1025, 13075, 2655, 12221, 1027, 2033, 1012, 1035, 7047, 1012, 2655, 12221, 1025, 13075, 2077, 13064, 2121, 1027, 2655, 12221, 1012, 2077, 13064, 2121, 1012, 6611, 1006, 2033, 1010, 991...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
material-components/material-components-web
scripts/cherry-pick-commits.js
getBaseTag
async function getBaseTag(mode) { const tags = await simpleGit.tags(); // Filter old independent-versioned tags and pre-releases. // If cherry-picking for a minor release, ignore patch releases to work from the latest major or minor release. const filteredTags = tags.all.filter((tag) => /^v/.test(tag) && !/-/.t...
javascript
async function getBaseTag(mode) { const tags = await simpleGit.tags(); // Filter old independent-versioned tags and pre-releases. // If cherry-picking for a minor release, ignore patch releases to work from the latest major or minor release. const filteredTags = tags.all.filter((tag) => /^v/.test(tag) && !/-/.t...
[ "async", "function", "getBaseTag", "(", "mode", ")", "{", "const", "tags", "=", "await", "simpleGit", ".", "tags", "(", ")", ";", "// Filter old independent-versioned tags and pre-releases.", "// If cherry-picking for a minor release, ignore patch releases to work from the latest...
Resolves to the appropriate git tag to serve as the base for a minor or patch release. The base for minor releases is the latest minor release (*.0). The base for patch releases is the latest patch release.
[ "Resolves", "to", "the", "appropriate", "git", "tag", "to", "serve", "as", "the", "base", "for", "a", "minor", "or", "patch", "release", ".", "The", "base", "for", "minor", "releases", "is", "the", "latest", "minor", "release", "(", "*", ".", "0", ")",...
9f8b9ae5103ff86de4f6a5cb02e700d6eb851e5f
https://github.com/material-components/material-components-web/blob/9f8b9ae5103ff86de4f6a5cb02e700d6eb851e5f/scripts/cherry-pick-commits.js#L60-L68
train
Get the base tag from the git repo
[ 30522, 2004, 6038, 2278, 3853, 2131, 15058, 15900, 1006, 5549, 1007, 1063, 9530, 3367, 22073, 1027, 26751, 3722, 23806, 1012, 22073, 1006, 1007, 1025, 1013, 1013, 11307, 2214, 2981, 1011, 2544, 2098, 22073, 1998, 3653, 1011, 7085, 1012, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/CustomizingConfiguration.js
function(sViewName, sExtensionPointName, vObject) { // FIXME: currently ONE extension wins, but they should be somehow merged - but how to define the order? var oResultConfig; // TODO: checking order of components? findConfig(CONFIG_VIEW_EXTENSIONS, vObject, function(oConfig) { oResultConfig = oConfig[...
javascript
function(sViewName, sExtensionPointName, vObject) { // FIXME: currently ONE extension wins, but they should be somehow merged - but how to define the order? var oResultConfig; // TODO: checking order of components? findConfig(CONFIG_VIEW_EXTENSIONS, vObject, function(oConfig) { oResultConfig = oConfig[...
[ "function", "(", "sViewName", ",", "sExtensionPointName", ",", "vObject", ")", "{", "// FIXME: currently ONE extension wins, but they should be somehow merged - but how to define the order?", "var", "oResultConfig", ";", "// TODO: checking order of components?", "findConfig", "(", "C...
returns the configuration of the given extension point or undefined @private
[ "returns", "the", "configuration", "of", "the", "given", "extension", "point", "or", "undefined" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/CustomizingConfiguration.js#L170-L178
train
Returns the configuration for the given extension point.
[ 30522, 3853, 1006, 17917, 2666, 7962, 14074, 1010, 3348, 29048, 8400, 18442, 1010, 29536, 2497, 20614, 1007, 1063, 1013, 1013, 8081, 4168, 1024, 2747, 2028, 5331, 5222, 1010, 2021, 2027, 2323, 2022, 5064, 5314, 1011, 2021, 2129, 2000, 9375,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
demos/chrome/popup.js
recurse_bookmarks
function recurse_bookmarks(data, tree, path) { if(tree.url) data.push({Name: tree.title, Location: tree.url, Path:path}); var T = path ? (path + "::" + tree.title) : tree.title; (tree.children||[]).forEach(function(C) { recurse_bookmarks(data, C, T); }); }
javascript
function recurse_bookmarks(data, tree, path) { if(tree.url) data.push({Name: tree.title, Location: tree.url, Path:path}); var T = path ? (path + "::" + tree.title) : tree.title; (tree.children||[]).forEach(function(C) { recurse_bookmarks(data, C, T); }); }
[ "function", "recurse_bookmarks", "(", "data", ",", "tree", ",", "path", ")", "{", "if", "(", "tree", ".", "url", ")", "data", ".", "push", "(", "{", "Name", ":", "tree", ".", "title", ",", "Location", ":", "tree", ".", "url", ",", "Path", ":", "p...
/* recursively walk the bookmark tree
[ "/", "*", "recursively", "walk", "the", "bookmark", "tree" ]
9a6d8a1d3d80c78dad5201fb389316f935279cdc
https://github.com/SheetJS/js-xlsx/blob/9a6d8a1d3d80c78dad5201fb389316f935279cdc/demos/chrome/popup.js#L11-L15
train
Recursively builds a tree of bookmarks
[ 30522, 3853, 28667, 28393, 1035, 2338, 27373, 1006, 2951, 1010, 3392, 1010, 4130, 1007, 1063, 2065, 1006, 3392, 1012, 24471, 2140, 1007, 2951, 1012, 5245, 1006, 1063, 2171, 1024, 3392, 1012, 2516, 1010, 3295, 1024, 3392, 1012, 24471, 2140, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
resolveGlobals
function resolveGlobals(providedGlobals, enabledEnvironments) { return Object.assign( {}, ...enabledEnvironments.filter(env => env.globals).map(env => env.globals), providedGlobals ); }
javascript
function resolveGlobals(providedGlobals, enabledEnvironments) { return Object.assign( {}, ...enabledEnvironments.filter(env => env.globals).map(env => env.globals), providedGlobals ); }
[ "function", "resolveGlobals", "(", "providedGlobals", ",", "enabledEnvironments", ")", "{", "return", "Object", ".", "assign", "(", "{", "}", ",", "...", "enabledEnvironments", ".", "filter", "(", "env", "=>", "env", ".", "globals", ")", ".", "map", "(", "...
Combines the provided globals object with the globals from environments @param {Object} providedGlobals The 'globals' key in a config @param {Environments[]} enabledEnvironments The environments enabled in configuration and with inline comments @returns {Object} The resolved globals object
[ "Combines", "the", "provided", "globals", "object", "with", "the", "globals", "from", "environments" ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/linter.js#L383-L389
train
Resolve the globals from the provided globals array
[ 30522, 30524, 8163, 1012, 11307, 1006, 4372, 2615, 1027, 1028, 4372, 2615, 1012, 3795, 2015, 1007, 1012, 4949, 1006, 4372, 2615, 1027, 1028, 4372, 2615, 1012, 3795, 2015, 1007, 1010, 3024, 23296, 16429, 9777, 1007, 1025, 1065, 102, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/strict.js
getUseStrictDirectives
function getUseStrictDirectives(statements) { const directives = []; for (let i = 0; i < statements.length; i++) { const statement = statements[i]; if ( statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && statement.expressi...
javascript
function getUseStrictDirectives(statements) { const directives = []; for (let i = 0; i < statements.length; i++) { const statement = statements[i]; if ( statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && statement.expressi...
[ "function", "getUseStrictDirectives", "(", "statements", ")", "{", "const", "directives", "=", "[", "]", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "statements", ".", "length", ";", "i", "++", ")", "{", "const", "statement", "=", "statements...
------------------------------------------------------------------------------ Helpers ------------------------------------------------------------------------------ Gets all of the Use Strict Directives in the Directive Prologue of a group of statements. @param {ASTNode[]} statements Statements in the program or func...
[ "------------------------------------------------------------------------------", "Helpers", "------------------------------------------------------------------------------", "Gets", "all", "of", "the", "Use", "Strict", "Directives", "in", "the", "Directive", "Prologue", "of", "a", "...
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/strict.js#L24-L42
train
Get use strict directives
[ 30522, 3853, 2131, 25581, 12412, 2102, 4305, 2890, 15277, 2015, 1006, 8635, 1007, 1063, 9530, 3367, 16449, 2015, 1027, 1031, 1033, 1025, 2005, 1006, 2292, 1045, 1027, 1014, 1025, 1045, 1026, 8635, 1012, 3091, 1025, 1045, 1009, 1009, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
babel/babel
packages/babel-plugin-proposal-decorators/src/transformer-legacy.js
applyObjectDecorators
function applyObjectDecorators(path, state) { if (!hasMethodDecorators(path.node.properties)) return; return applyTargetDecorators(path, state, path.node.properties); }
javascript
function applyObjectDecorators(path, state) { if (!hasMethodDecorators(path.node.properties)) return; return applyTargetDecorators(path, state, path.node.properties); }
[ "function", "applyObjectDecorators", "(", "path", ",", "state", ")", "{", "if", "(", "!", "hasMethodDecorators", "(", "path", ".", "node", ".", "properties", ")", ")", "return", ";", "return", "applyTargetDecorators", "(", "path", ",", "state", ",", "path", ...
Given an object expression with property decorators, create a new expression with the proper decorated behavior.
[ "Given", "an", "object", "expression", "with", "property", "decorators", "create", "a", "new", "expression", "with", "the", "proper", "decorated", "behavior", "." ]
1969e6b6aa7d90be3fbb3aca98ea96849656a55a
https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-plugin-proposal-decorators/src/transformer-legacy.js#L105-L109
train
Apply object decorators to the path
[ 30522, 3853, 6611, 16429, 20614, 3207, 27108, 18926, 1006, 4130, 1010, 2110, 1007, 1063, 2065, 1006, 999, 2038, 11368, 6806, 14141, 8586, 6525, 6591, 1006, 4130, 1012, 13045, 1012, 5144, 1007, 1007, 2709, 1025, 2709, 6611, 7559, 18150, 3207...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/search/FileFilters.js
_getCondensedForm
function _getCondensedForm(filter) { if (!_.isArray(filter)) { return ""; } // Format filter in condensed form if (filter.length > 2) { return filter.slice(0, 2).join(", ") + " " + StringUtils.format(Strings.FILE_FILTER_CLIPPED_SUFFIX, filter.l...
javascript
function _getCondensedForm(filter) { if (!_.isArray(filter)) { return ""; } // Format filter in condensed form if (filter.length > 2) { return filter.slice(0, 2).join(", ") + " " + StringUtils.format(Strings.FILE_FILTER_CLIPPED_SUFFIX, filter.l...
[ "function", "_getCondensedForm", "(", "filter", ")", "{", "if", "(", "!", "_", ".", "isArray", "(", "filter", ")", ")", "{", "return", "\"\"", ";", "}", "// Format filter in condensed form", "if", "(", "filter", ".", "length", ">", "2", ")", "{", "return...
Get the condensed form of the filter set by joining the first two in the set with a comma separator and appending a short message with the number of filters being clipped. @param {Array.<string>} filter @return {string} Condensed form of filter set if `filter` is a valid array. Otherwise, return an empty string.
[ "Get", "the", "condensed", "form", "of", "the", "filter", "set", "by", "joining", "the", "first", "two", "in", "the", "set", "with", "a", "comma", "separator", "and", "appending", "a", "short", "message", "with", "the", "number", "of", "filters", "being", ...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/search/FileFilters.js#L74-L85
train
Returns condensed form of the filter
[ 30522, 3853, 1035, 2131, 8663, 4181, 6924, 14192, 1006, 11307, 1007, 1063, 2065, 1006, 999, 1035, 1012, 18061, 11335, 2100, 1006, 11307, 1007, 1007, 1063, 2709, 1000, 1000, 1025, 1065, 1013, 1013, 4289, 11307, 1999, 25011, 2433, 2065, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/command/KeyBindingManager.js
_sortByPlatform
function _sortByPlatform(a, b) { var a1 = (a.platform) ? 1 : 0, b1 = (b.platform) ? 1 : 0; return b1 - a1; }
javascript
function _sortByPlatform(a, b) { var a1 = (a.platform) ? 1 : 0, b1 = (b.platform) ? 1 : 0; return b1 - a1; }
[ "function", "_sortByPlatform", "(", "a", ",", "b", ")", "{", "var", "a1", "=", "(", "a", ".", "platform", ")", "?", "1", ":", "0", ",", "b1", "=", "(", "b", ".", "platform", ")", "?", "1", ":", "0", ";", "return", "b1", "-", "a1", ";", "}" ...
@private Sort objects by platform property. Objects with a platform property come before objects without a platform property.
[ "@private" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/command/KeyBindingManager.js#L828-L832
train
Sort the array by platform
[ 30522, 3853, 1035, 4066, 3762, 24759, 4017, 14192, 1006, 1037, 1010, 1038, 1007, 1063, 13075, 17350, 1027, 1006, 1037, 1012, 4132, 1007, 1029, 1015, 1024, 1014, 1010, 29491, 1027, 1006, 1038, 1012, 4132, 1007, 1029, 1015, 1024, 1014, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/AnnotationParser.js
function(oMetadata) { var oMetadataSchema = {}, oPropertyTypes = {}, oPropertyExtensions = {}, bPropertyExtensions = false, sNamespace, aEntityTypes, aComplexTypes, oEntityType = {}, oProperties = {}, oExtensions = {}, bExtensions = false, oProperty, oComplexTypeProp, sPropertyName, sType,...
javascript
function(oMetadata) { var oMetadataSchema = {}, oPropertyTypes = {}, oPropertyExtensions = {}, bPropertyExtensions = false, sNamespace, aEntityTypes, aComplexTypes, oEntityType = {}, oProperties = {}, oExtensions = {}, bExtensions = false, oProperty, oComplexTypeProp, sPropertyName, sType,...
[ "function", "(", "oMetadata", ")", "{", "var", "oMetadataSchema", "=", "{", "}", ",", "oPropertyTypes", "=", "{", "}", ",", "oPropertyExtensions", "=", "{", "}", ",", "bPropertyExtensions", "=", "false", ",", "sNamespace", ",", "aEntityTypes", ",", "aComplex...
/* @static @private
[ "/", "*" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/AnnotationParser.js#L628-L724
train
Returns the property types of the given metadata
[ 30522, 3853, 1006, 18168, 12928, 2850, 2696, 1007, 1063, 13075, 18168, 12928, 2850, 10230, 5403, 2863, 1027, 1063, 1065, 1010, 6728, 18981, 15010, 13874, 2015, 1027, 1063, 1065, 1010, 6728, 18981, 15010, 10288, 29048, 2015, 1027, 1063, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/util/reflection/BaseTreeModifier.js
function (vControl, oAppComponent, mAdditionalSelectorInformation) { var sControlId = vControl; if (typeof sControlId !== "string") { sControlId = (vControl) ? this.getId(vControl) : undefined; } else if (!oAppComponent) { throw new Error("App Component instance needed to get a selector from string ID"...
javascript
function (vControl, oAppComponent, mAdditionalSelectorInformation) { var sControlId = vControl; if (typeof sControlId !== "string") { sControlId = (vControl) ? this.getId(vControl) : undefined; } else if (!oAppComponent) { throw new Error("App Component instance needed to get a selector from string ID"...
[ "function", "(", "vControl", ",", "oAppComponent", ",", "mAdditionalSelectorInformation", ")", "{", "var", "sControlId", "=", "vControl", ";", "if", "(", "typeof", "sControlId", "!==", "\"string\"", ")", "{", "sControlId", "=", "(", "vControl", ")", "?", "this...
Function for determining the selector that is used later to apply a change for a given control. The function distinguishes between local IDs generated starting with 1.40 and the global IDs generated in previous versions. @param {sap.ui.base.ManagedObject|Element|string} vControl - Control or ID string for which the se...
[ "Function", "for", "determining", "the", "selector", "that", "is", "used", "later", "to", "apply", "a", "change", "for", "a", "given", "control", ".", "The", "function", "distinguishes", "between", "local", "IDs", "generated", "starting", "with", "1", ".", "...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/reflection/BaseTreeModifier.js#L114-L147
train
Returns a selector object for the given control.
[ 30522, 3853, 1006, 18315, 12162, 13153, 1010, 1051, 29098, 9006, 29513, 3372, 1010, 5506, 27064, 11246, 22471, 28741, 14192, 3370, 1007, 1063, 13075, 8040, 12162, 13153, 3593, 1027, 18315, 12162, 13153, 1025, 2065, 1006, 2828, 11253, 8040, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/jszip.js
function() { var i, file; for (i = 0; i < this.files.length; i++) { file = this.files[i]; this.reader.setIndex(file.localHeaderOffset); this.checkSignature(sig.LOCAL_FILE_HEADER); file.readLocalPart(this.reader); file.handleUTF8(); } ...
javascript
function() { var i, file; for (i = 0; i < this.files.length; i++) { file = this.files[i]; this.reader.setIndex(file.localHeaderOffset); this.checkSignature(sig.LOCAL_FILE_HEADER); file.readLocalPart(this.reader); file.handleUTF8(); } ...
[ "function", "(", ")", "{", "var", "i", ",", "file", ";", "for", "(", "i", "=", "0", ";", "i", "<", "this", ".", "files", ".", "length", ";", "i", "++", ")", "{", "file", "=", "this", ".", "files", "[", "i", "]", ";", "this", ".", "reader", ...
Read the local files, based on the offset read in the central part.
[ "Read", "the", "local", "files", "based", "on", "the", "offset", "read", "in", "the", "central", "part", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jszip.js#L1781-L1790
train
read the local part of the file
[ 30522, 3853, 1006, 1007, 1063, 13075, 1045, 1010, 5371, 1025, 2005, 1006, 1045, 1027, 1014, 1025, 1045, 1026, 2023, 1012, 6764, 1012, 3091, 1025, 1045, 1009, 1009, 1007, 1063, 5371, 1027, 2023, 1012, 6764, 1031, 1045, 1033, 1025, 2023, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/view/MainViewManager.js
_destroyEditorIfNotNeeded
function _destroyEditorIfNotNeeded(document) { if (!(document instanceof DocumentManager.Document)) { throw new Error("_destroyEditorIfUnneeded() should be passed a Document"); } if (document._masterEditor) { // findPaneForDocument tries to locate the pane in which the do...
javascript
function _destroyEditorIfNotNeeded(document) { if (!(document instanceof DocumentManager.Document)) { throw new Error("_destroyEditorIfUnneeded() should be passed a Document"); } if (document._masterEditor) { // findPaneForDocument tries to locate the pane in which the do...
[ "function", "_destroyEditorIfNotNeeded", "(", "document", ")", "{", "if", "(", "!", "(", "document", "instanceof", "DocumentManager", ".", "Document", ")", ")", "{", "throw", "new", "Error", "(", "\"_destroyEditorIfUnneeded() should be passed a Document\"", ")", ";", ...
Destroys an editor object if a document is no longer referenced @param {!Document} doc - document to destroy
[ "Destroys", "an", "editor", "object", "if", "a", "document", "is", "no", "longer", "referenced" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/view/MainViewManager.js#L1422-L1441
train
Destroys the editor if it s not needed
[ 30522, 3853, 1035, 3908, 15660, 10128, 17048, 24045, 5732, 1006, 6254, 1007, 1063, 2065, 1006, 999, 1006, 6254, 6013, 11253, 6254, 24805, 4590, 1012, 6254, 1007, 1007, 1063, 5466, 2047, 7561, 1006, 1000, 1035, 3908, 15660, 10128, 4609, 2404...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
function(prop) { var length = prefixes.length; var cssrule = window.CSSRule; var rule; if (typeof cssrule === 'undefined') { return undefined; } if (!prop) { return false; } // remove literal @ from beginning of provided property prop = prop.replace(/^@/, ''); // ...
javascript
function(prop) { var length = prefixes.length; var cssrule = window.CSSRule; var rule; if (typeof cssrule === 'undefined') { return undefined; } if (!prop) { return false; } // remove literal @ from beginning of provided property prop = prop.replace(/^@/, ''); // ...
[ "function", "(", "prop", ")", "{", "var", "length", "=", "prefixes", ".", "length", ";", "var", "cssrule", "=", "window", ".", "CSSRule", ";", "var", "rule", ";", "if", "(", "typeof", "cssrule", "===", "'undefined'", ")", "{", "return", "undefined", ";...
atRule returns a given CSS property at-rule (eg @keyframes), possibly in some prefixed form, or false, in the case of an unsupported rule @memberof Modernizr @name Modernizr.atRule @optionName Modernizr.atRule() @optionProp atRule @access public @function atRule @param {string} prop - String name of the @-rule to test...
[ "atRule", "returns", "a", "given", "CSS", "property", "at", "-", "rule", "(", "eg", "@keyframes", ")", "possibly", "in", "some", "prefixed", "form", "or", "false", "in", "the", "case", "of", "an", "unsupported", "rule" ]
f5c53f082634a6e5af56cfc72978ad7bad49b989
https://github.com/MoePlayer/DPlayer/blob/f5c53f082634a6e5af56cfc72978ad7bad49b989/demo/modernizr.js#L623-L657
train
Returns the name of the property
[ 30522, 3853, 1006, 17678, 1007, 1063, 13075, 3091, 1027, 17576, 2229, 1012, 3091, 1025, 13075, 20116, 21338, 9307, 1027, 3332, 1012, 20116, 21338, 9307, 1025, 13075, 3627, 1025, 2065, 1006, 2828, 11253, 20116, 21338, 9307, 1027, 1027, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.commons/src/sap/ui/commons/MenuBar.js
function(oThis, oEvent) { var jRef = get$Item(oThis, oEvent); if (jRef) { var sItemIdx = jRef.attr("itemidx"); if (sItemIdx) { if (sItemIdx == "ovrflw") { return "ovrflw"; } else { var iIdx = parseInt(sItemIdx); var oMenuItem = oThis.getItems()[iIdx]; return oMenuItem; } } ...
javascript
function(oThis, oEvent) { var jRef = get$Item(oThis, oEvent); if (jRef) { var sItemIdx = jRef.attr("itemidx"); if (sItemIdx) { if (sItemIdx == "ovrflw") { return "ovrflw"; } else { var iIdx = parseInt(sItemIdx); var oMenuItem = oThis.getItems()[iIdx]; return oMenuItem; } } ...
[ "function", "(", "oThis", ",", "oEvent", ")", "{", "var", "jRef", "=", "get$Item", "(", "oThis", ",", "oEvent", ")", ";", "if", "(", "jRef", ")", "{", "var", "sItemIdx", "=", "jRef", ".", "attr", "(", "\"itemidx\"", ")", ";", "if", "(", "sItemIdx",...
Returns the item which was the target of the event (if exists) or "ovrflow" for the overflow
[ "Returns", "the", "item", "which", "was", "the", "target", "of", "the", "event", "(", "if", "exists", ")", "or", "ovrflow", "for", "the", "overflow" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/MenuBar.js#L427-L442
train
Returns the item for the given event
[ 30522, 3853, 1006, 27178, 24158, 1010, 1051, 18697, 3372, 1007, 1063, 13075, 3781, 12879, 1027, 2131, 1002, 8875, 1006, 27178, 24158, 1010, 1051, 18697, 3372, 1007, 1025, 2065, 1006, 3781, 12879, 1007, 1063, 13075, 2609, 4328, 2094, 2595, 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...
swimlane/ngx-datatable
release/utils/tree.js
groupRowsByParents
function groupRowsByParents(rows, from, to) { if (from && to) { var nodeById = {}; var l = rows.length; var node = null; nodeById[0] = new TreeNode(); // that's the root node var uniqIDs = rows.reduce(function (arr, item) { var toValue = to(item); if (...
javascript
function groupRowsByParents(rows, from, to) { if (from && to) { var nodeById = {}; var l = rows.length; var node = null; nodeById[0] = new TreeNode(); // that's the root node var uniqIDs = rows.reduce(function (arr, item) { var toValue = to(item); if (...
[ "function", "groupRowsByParents", "(", "rows", ",", "from", ",", "to", ")", "{", "if", "(", "from", "&&", "to", ")", "{", "var", "nodeById", "=", "{", "}", ";", "var", "l", "=", "rows", ".", "length", ";", "var", "node", "=", "null", ";", "nodeBy...
This functions rearrange items by their parents Also sets the level value to each of the items Note: Expecting each item has a property called parentId Note: This algorithm will fail if a list has two or more items with same ID NOTE: This algorithm will fail if there is a deadlock of relationship For example, Input ...
[ "This", "functions", "rearrange", "items", "by", "their", "parents", "Also", "sets", "the", "level", "value", "to", "each", "of", "the", "items" ]
d7df15a070282a169524dba51d9572008b74804c
https://github.com/swimlane/ngx-datatable/blob/d7df15a070282a169524dba51d9572008b74804c/release/utils/tree.js#L44-L80
train
group rows by parents
[ 30522, 3853, 2177, 10524, 14478, 19362, 11187, 1006, 10281, 1010, 2013, 1010, 2000, 1007, 1063, 2065, 1006, 2013, 1004, 1004, 2000, 1007, 1063, 13075, 13045, 3762, 3593, 1027, 1063, 1065, 1025, 13075, 1048, 1027, 10281, 1012, 3091, 1025, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SeleniumHQ/selenium
third_party/js/mozmill/shared-modules/addons.js
addonsManager_getCategoryById
function addonsManager_getCategoryById(aSpec) { var spec = aSpec || { }; var id = spec.id; if (!id) throw new Error(arguments.callee.name + ": Category ID not specified."); return this.getCategories({ attribute: "id", value: "category-" + id })[0]; }
javascript
function addonsManager_getCategoryById(aSpec) { var spec = aSpec || { }; var id = spec.id; if (!id) throw new Error(arguments.callee.name + ": Category ID not specified."); return this.getCategories({ attribute: "id", value: "category-" + id })[0]; }
[ "function", "addonsManager_getCategoryById", "(", "aSpec", ")", "{", "var", "spec", "=", "aSpec", "||", "{", "}", ";", "var", "id", "=", "spec", ".", "id", ";", "if", "(", "!", "id", ")", "throw", "new", "Error", "(", "arguments", ".", "callee", ".",...
Get the category element for the specified id @param {object} aSpec Information for getting a category Elements: id - Category id (search, discover, languages, searchengines, extensions, themes, plugins, availableUpdates, recentUpdates) @returns Category @type {ElemBase}
[ "Get", "the", "category", "element", "for", "the", "specified", "id" ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/third_party/js/mozmill/shared-modules/addons.js#L656-L667
train
Returns the category with the specified ID
[ 30522, 3853, 5587, 5644, 24805, 4590, 1035, 2131, 16280, 20255, 2100, 3762, 3593, 1006, 2004, 5051, 2278, 1007, 1063, 13075, 28699, 1027, 2004, 5051, 2278, 1064, 1064, 1063, 1065, 1025, 13075, 8909, 1027, 28699, 1012, 8909, 1025, 2065, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
apache/incubator-echarts
src/data/Tree.js
function (node) { var parent = node.parentNode; while (parent) { if (parent === this) { return true; } parent = parent.parentNode; } return false; }
javascript
function (node) { var parent = node.parentNode; while (parent) { if (parent === this) { return true; } parent = parent.parentNode; } return false; }
[ "function", "(", "node", ")", "{", "var", "parent", "=", "node", ".", "parentNode", ";", "while", "(", "parent", ")", "{", "if", "(", "parent", "===", "this", ")", "{", "return", "true", ";", "}", "parent", "=", "parent", ".", "parentNode", ";", "}...
if this is an ancestor of another node @public @param {TreeNode} node another node @return {boolean} if is ancestor
[ "if", "this", "is", "an", "ancestor", "of", "another", "node" ]
4d0ea095dc3929cb6de40c45748826e7999c7aa8
https://github.com/apache/incubator-echarts/blob/4d0ea095dc3929cb6de40c45748826e7999c7aa8/src/data/Tree.js#L314-L323
train
returns true if the node is a parent of this
[ 30522, 3853, 1006, 13045, 1007, 1063, 13075, 6687, 1027, 13045, 1012, 6687, 3630, 3207, 1025, 2096, 1006, 6687, 1007, 1063, 2065, 1006, 6687, 1027, 1027, 1027, 2023, 1007, 1063, 2709, 2995, 1025, 1065, 6687, 1027, 6687, 1012, 6687, 3630, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
nhn/tui.editor
src/js/extensions/chart/chart.js
parseDSV2ChartData
function parseDSV2ChartData(code, delimiter) { // trim all heading/trailing blank lines code = trimKeepingTabs(code); csv.COLUMN_SEPARATOR = delimiter || detectDelimiter(code); let dsv = csv.parse(code); // trim all values in 2D array dsv = dsv.map(arr => arr.map(val => val.trim())); // test a first ro...
javascript
function parseDSV2ChartData(code, delimiter) { // trim all heading/trailing blank lines code = trimKeepingTabs(code); csv.COLUMN_SEPARATOR = delimiter || detectDelimiter(code); let dsv = csv.parse(code); // trim all values in 2D array dsv = dsv.map(arr => arr.map(val => val.trim())); // test a first ro...
[ "function", "parseDSV2ChartData", "(", "code", ",", "delimiter", ")", "{", "// trim all heading/trailing blank lines", "code", "=", "trimKeepingTabs", "(", "code", ")", ";", "csv", ".", "COLUMN_SEPARATOR", "=", "delimiter", "||", "detectDelimiter", "(", "code", ")",...
parse csv, tsv to chart data @param {string} code - data code @param {string|RegExp} delimiter - delimiter @returns {Object} - tui.chart data @see https://nhn.github.io/tui.chart/latest/tui.chart.html @ignore
[ "parse", "csv", "tsv", "to", "chart", "data" ]
e75ab08c2a7ab07d1143e318f7cde135c5e3002e
https://github.com/nhn/tui.editor/blob/e75ab08c2a7ab07d1143e318f7cde135c5e3002e/src/js/extensions/chart/chart.js#L177-L216
train
Parse DSV2 chart data
[ 30522, 3853, 11968, 6924, 2015, 2615, 2475, 7507, 5339, 2850, 2696, 1006, 3642, 1010, 3972, 27605, 3334, 1007, 1063, 1013, 1013, 12241, 2035, 5825, 1013, 12542, 30524, 1007, 1025, 2292, 16233, 2615, 1027, 20116, 2615, 1012, 11968, 3366, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.layout/src/sap/ui/layout/library.js
function(DataType, library) { "use strict"; /** * SAPUI5 library with layout controls. * * @namespace * @name sap.ui.layout * @author SAP SE * @version ${version} * @public */ // delegate further initialization of this library to the Core sap.ui.getCore().initLibrary({ name : "sap.ui.layout", ...
javascript
function(DataType, library) { "use strict"; /** * SAPUI5 library with layout controls. * * @namespace * @name sap.ui.layout * @author SAP SE * @version ${version} * @public */ // delegate further initialization of this library to the Core sap.ui.getCore().initLibrary({ name : "sap.ui.layout", ...
[ "function", "(", "DataType", ",", "library", ")", "{", "\"use strict\"", ";", "/**\n\t * SAPUI5 library with layout controls.\n\t *\n\t * @namespace\n\t * @name sap.ui.layout\n\t * @author SAP SE\n\t * @version ${version}\n\t * @public\n\t */", "// delegate further initialization of this library...
library dependency
[ "library", "dependency" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.layout/src/sap/ui/layout/library.js#L11-L945
train
The sap. ui. layout library provides a control that can be used to control the layout.
[ 30522, 3853, 1006, 2951, 13874, 1010, 3075, 1007, 1063, 1000, 2224, 9384, 1000, 1025, 1013, 1008, 1008, 1008, 20066, 10179, 2629, 3075, 2007, 9621, 7711, 1012, 1008, 1008, 1030, 3415, 15327, 1008, 1030, 2171, 20066, 1012, 21318, 1012, 9621,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GitbookIO/gitbook
lib/parse/parsePage.js
parsePage
function parsePage(book, page) { var fs = book.getContentFS(); var file = page.getFile(); return fs.readAsString(file.getPath()) .then(function(content) { return parsePageFromString(page, content); }); }
javascript
function parsePage(book, page) { var fs = book.getContentFS(); var file = page.getFile(); return fs.readAsString(file.getPath()) .then(function(content) { return parsePageFromString(page, content); }); }
[ "function", "parsePage", "(", "book", ",", "page", ")", "{", "var", "fs", "=", "book", ".", "getContentFS", "(", ")", ";", "var", "file", "=", "page", ".", "getFile", "(", ")", ";", "return", "fs", ".", "readAsString", "(", "file", ".", "getPath", ...
Parse a page, read its content and parse the YAMl header @param {Book} book @param {Page} page @return {Promise<Page>}
[ "Parse", "a", "page", "read", "its", "content", "and", "parse", "the", "YAMl", "header" ]
6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4
https://github.com/GitbookIO/gitbook/blob/6c6ef7f4af32a2977e44dd23d3feb6ebf28970f4/lib/parse/parsePage.js#L10-L18
train
Parse a page
[ 30522, 3853, 11968, 3366, 13704, 1006, 2338, 1010, 3931, 1007, 1063, 13075, 1042, 2015, 1027, 2338, 1012, 2131, 8663, 6528, 24475, 2015, 1006, 1007, 1025, 13075, 5371, 1027, 3931, 1012, 2131, 8873, 2571, 1006, 1007, 1025, 2709, 1042, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/CodeFolding/foldhelpers/foldgutter.js
onUnFold
function onUnFold(cm, from, to) { var state = cm.state.foldGutter; var vp = cm.getViewport(); delete cm._lineFolds[from.line]; updateFoldInfo(cm, from.line, to.line || vp.to); }
javascript
function onUnFold(cm, from, to) { var state = cm.state.foldGutter; var vp = cm.getViewport(); delete cm._lineFolds[from.line]; updateFoldInfo(cm, from.line, to.line || vp.to); }
[ "function", "onUnFold", "(", "cm", ",", "from", ",", "to", ")", "{", "var", "state", "=", "cm", ".", "state", ".", "foldGutter", ";", "var", "vp", "=", "cm", ".", "getViewport", "(", ")", ";", "delete", "cm", ".", "_lineFolds", "[", "from", ".", ...
Triggered when a folded code segment is unfolded. @param {!CodeMirror} cm the CodeMirror instance for the active editor @param {!{line:number, ch:number}} from the ch and line position that designates the start of the region @param {!{line:number, ch:number}} to the ch and line position that designates the end of the ...
[ "Triggered", "when", "a", "folded", "code", "segment", "is", "unfolded", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/CodeFolding/foldhelpers/foldgutter.js#L354-L359
train
Unfolds the line from to to.
[ 30522, 3853, 2006, 4609, 10371, 1006, 4642, 1010, 2013, 1010, 2000, 1007, 1063, 13075, 2110, 1027, 4642, 1012, 2110, 1012, 10671, 27920, 3334, 1025, 13075, 21210, 1027, 4642, 1012, 2131, 8584, 6442, 1006, 1007, 1025, 3972, 12870, 4642, 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...
airbnb/enzyme
packages/enzyme/src/selectors.js
matchGeneralSibling
function matchGeneralSibling(nodes, predicate, root) { return uniqueReduce((matches, node) => { const parent = findParentNode(root, node); if (!parent) { return matches; } const parentChildren = childrenOfNode(parent); const nodeIndex = parentChildren.indexOf(node); const youngerSiblings...
javascript
function matchGeneralSibling(nodes, predicate, root) { return uniqueReduce((matches, node) => { const parent = findParentNode(root, node); if (!parent) { return matches; } const parentChildren = childrenOfNode(parent); const nodeIndex = parentChildren.indexOf(node); const youngerSiblings...
[ "function", "matchGeneralSibling", "(", "nodes", ",", "predicate", ",", "root", ")", "{", "return", "uniqueReduce", "(", "(", "matches", ",", "node", ")", "=>", "{", "const", "parent", "=", "findParentNode", "(", "root", ",", "node", ")", ";", "if", "(",...
Matches only nodes which are general siblings (any sibling *after*) against a predicate, returning those that match. @param {Array<Node>} nodes @param {Function} predicate @param {Node} root
[ "Matches", "only", "nodes", "which", "are", "general", "siblings", "(", "any", "sibling", "*", "after", "*", ")", "against", "a", "predicate", "returning", "those", "that", "match", "." ]
cd430eae95eba151f17e970ee77c18f09476de0e
https://github.com/airbnb/enzyme/blob/cd430eae95eba151f17e970ee77c18f09476de0e/packages/enzyme/src/selectors.js#L329-L340
train
Match a node with a predicate function on all siblings of the node
[ 30522, 3853, 2674, 6914, 21673, 5332, 9709, 1006, 14164, 1010, 3653, 16467, 1010, 7117, 1007, 1063, 2709, 4310, 5596, 18796, 1006, 1006, 3503, 1010, 13045, 1007, 1027, 1028, 1063, 9530, 3367, 6687, 1027, 2424, 19362, 4765, 3630, 3207, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fex-team/webuploader
src/runtime/html5/image.js
detectSubsampling
function detectSubsampling( img ) { var iw = img.naturalWidth, ih = img.naturalHeight, canvas, ctx; // subsampling may happen overmegapixel image if ( iw * ih > 1024 * 1024 ) { canvas = document.createElement('c...
javascript
function detectSubsampling( img ) { var iw = img.naturalWidth, ih = img.naturalHeight, canvas, ctx; // subsampling may happen overmegapixel image if ( iw * ih > 1024 * 1024 ) { canvas = document.createElement('c...
[ "function", "detectSubsampling", "(", "img", ")", "{", "var", "iw", "=", "img", ".", "naturalWidth", ",", "ih", "=", "img", ".", "naturalHeight", ",", "canvas", ",", "ctx", ";", "// subsampling may happen overmegapixel image", "if", "(", "iw", "*", "ih", ">"...
Detect subsampling in loaded image. In iOS, larger images than 2M pixels may be subsampled in rendering.
[ "Detect", "subsampling", "in", "loaded", "image", ".", "In", "iOS", "larger", "images", "than", "2M", "pixels", "may", "be", "subsampled", "in", "rendering", "." ]
7094e4476c5af3b06993d91dde2d223200b9feb7
https://github.com/fex-team/webuploader/blob/7094e4476c5af3b06993d91dde2d223200b9feb7/src/runtime/html5/image.js#L366-L386
train
detect if image is subsampled
[ 30522, 3853, 11487, 6342, 5910, 16613, 2989, 1006, 10047, 2290, 1007, 1063, 13075, 1045, 2860, 1027, 10047, 2290, 1012, 3019, 9148, 11927, 2232, 1010, 1045, 2232, 1027, 10047, 2290, 1012, 3019, 26036, 13900, 1010, 10683, 1010, 14931, 2595, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
scanPunctuator
function scanPunctuator() { var start = index, code = source.charCodeAt(index), code2, ch1 = source[index], ch2, ch3, ch4; switch (code) { // Check for most common single-character punctuators. case 0x2E: // . dot...
javascript
function scanPunctuator() { var start = index, code = source.charCodeAt(index), code2, ch1 = source[index], ch2, ch3, ch4; switch (code) { // Check for most common single-character punctuators. case 0x2E: // . dot...
[ "function", "scanPunctuator", "(", ")", "{", "var", "start", "=", "index", ",", "code", "=", "source", ".", "charCodeAt", "(", "index", ")", ",", "code2", ",", "ch1", "=", "source", "[", "index", "]", ",", "ch2", ",", "ch3", ",", "ch4", ";", "switc...
7.7 Punctuators
[ "7", ".", "7", "Punctuators" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/blanket.js#L639-L787
train
Scan for a single - character punctuator.
[ 30522, 3853, 13594, 14289, 12273, 26302, 4263, 1006, 1007, 1063, 13075, 2707, 1027, 5950, 1010, 3642, 1027, 3120, 1012, 25869, 16044, 4017, 1006, 5950, 1007, 1010, 3642, 2475, 1010, 10381, 2487, 1027, 3120, 1031, 5950, 1033, 1010, 10381, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/protractor
lib/clientsidescripts.js
function(callback) { if (window.angular) { var hooks = getNg1Hooks(rootSelector); if (!hooks){ callback(); // not an angular1 app } else{ if (hooks.$$testability) { hooks.$$testability.whenStable(callback); } else if (hooks.$injector) { ...
javascript
function(callback) { if (window.angular) { var hooks = getNg1Hooks(rootSelector); if (!hooks){ callback(); // not an angular1 app } else{ if (hooks.$$testability) { hooks.$$testability.whenStable(callback); } else if (hooks.$injector) { ...
[ "function", "(", "callback", ")", "{", "if", "(", "window", ".", "angular", ")", "{", "var", "hooks", "=", "getNg1Hooks", "(", "rootSelector", ")", ";", "if", "(", "!", "hooks", ")", "{", "callback", "(", ")", ";", "// not an angular1 app", "}", "else"...
Wait for angular1 testability first and run waitForAngular2 as a callback
[ "Wait", "for", "angular1", "testability", "first", "and", "run", "waitForAngular2", "as", "a", "callback" ]
4f74a4ec753c97adfe955fe468a39286a0a55837
https://github.com/angular/protractor/blob/4f74a4ec753c97adfe955fe468a39286a0a55837/lib/clientsidescripts.js#L143-L168
train
get the injector
[ 30522, 3853, 1006, 2655, 5963, 1007, 1063, 2065, 1006, 3332, 1012, 16108, 1007, 1063, 13075, 18008, 1027, 2131, 3070, 2487, 6806, 6559, 2015, 1006, 6147, 12260, 16761, 1007, 1025, 2065, 1006, 999, 18008, 1007, 1063, 2655, 5963, 1006, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/qunit/QUnitUtils.js
fakeEvent
function fakeEvent(sEventName, oTarget, oParams) { var oEvent = jQuery.Event({type : sEventName}); if ( oTarget != null ) { oEvent.target = oTarget; } if (oParams) { for (var x in oParams) { // propagate property to event oEvent[x] = oParams[x]; if ( x === 'originalEvent' ) { // if 'o...
javascript
function fakeEvent(sEventName, oTarget, oParams) { var oEvent = jQuery.Event({type : sEventName}); if ( oTarget != null ) { oEvent.target = oTarget; } if (oParams) { for (var x in oParams) { // propagate property to event oEvent[x] = oParams[x]; if ( x === 'originalEvent' ) { // if 'o...
[ "function", "fakeEvent", "(", "sEventName", ",", "oTarget", ",", "oParams", ")", "{", "var", "oEvent", "=", "jQuery", ".", "Event", "(", "{", "type", ":", "sEventName", "}", ")", ";", "if", "(", "oTarget", "!=", "null", ")", "{", "oEvent", ".", "targ...
/* Creates a fake event of type jQuery.Event, according to current UI5 practices; it will always contain a pseudo browser event (property <code>originalEvent</code>). Please note that the <code>originalEvent</code> could be created as a native browser event (class <code>Event</code>) as some existing test cases specif...
[ "/", "*", "Creates", "a", "fake", "event", "of", "type", "jQuery", ".", "Event", "according", "to", "current", "UI5", "practices", ";", "it", "will", "always", "contain", "a", "pseudo", "browser", "event", "(", "property", "<code", ">", "originalEvent<", "...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/qunit/QUnitUtils.js#L259-L283
train
fakeEvent - creates a fake event
[ 30522, 3853, 8275, 18697, 3372, 1006, 2698, 2102, 18442, 1010, 27178, 2906, 18150, 1010, 6728, 5400, 5244, 1007, 1063, 13075, 1051, 18697, 3372, 1027, 1046, 4226, 2854, 1012, 2724, 1006, 1063, 2828, 1024, 2698, 2102, 18442, 1065, 1007, 1025...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
babel/babel
packages/babel-standalone/src/transformScriptTags.js
loadScripts
function loadScripts(transformFn, scripts) { const result = []; const count = scripts.length; function check() { let script, i; for (i = 0; i < count; i++) { script = result[i]; if (script.loaded && !script.executed) { script.executed = true; run(transformFn, script); ...
javascript
function loadScripts(transformFn, scripts) { const result = []; const count = scripts.length; function check() { let script, i; for (i = 0; i < count; i++) { script = result[i]; if (script.loaded && !script.executed) { script.executed = true; run(transformFn, script); ...
[ "function", "loadScripts", "(", "transformFn", ",", "scripts", ")", "{", "const", "result", "=", "[", "]", ";", "const", "count", "=", "scripts", ".", "length", ";", "function", "check", "(", ")", "{", "let", "script", ",", "i", ";", "for", "(", "i",...
Loop over provided script tags and get the content, via innerHTML if an inline script, or by using XHR. Transforms are applied if needed. The scripts are executed in the order they are found on the page.
[ "Loop", "over", "provided", "script", "tags", "and", "get", "the", "content", "via", "innerHTML", "if", "an", "inline", "script", "or", "by", "using", "XHR", ".", "Transforms", "are", "applied", "if", "needed", ".", "The", "scripts", "are", "executed", "in...
1969e6b6aa7d90be3fbb3aca98ea96849656a55a
https://github.com/babel/babel/blob/1969e6b6aa7d90be3fbb3aca98ea96849656a55a/packages/babel-standalone/src/transformScriptTags.js#L110-L170
train
Load scripts from a list of scripts
[ 30522, 3853, 15665, 23235, 2015, 1006, 10938, 2546, 2078, 1010, 14546, 1007, 1063, 9530, 3367, 2765, 1027, 1031, 1033, 1025, 9530, 3367, 4175, 1027, 14546, 1012, 3091, 1025, 3853, 4638, 1006, 1007, 1063, 2292, 5896, 1010, 1045, 1025, 2005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Microsoft/vscode
build/lib/watch/index.js
handleDeletions
function handleDeletions() { return es.mapSync(f => { if (/\.ts$/.test(f.relative) && !f.contents) { f.contents = Buffer.from(''); f.stat = { mtime: new Date() }; } return f; }); }
javascript
function handleDeletions() { return es.mapSync(f => { if (/\.ts$/.test(f.relative) && !f.contents) { f.contents = Buffer.from(''); f.stat = { mtime: new Date() }; } return f; }); }
[ "function", "handleDeletions", "(", ")", "{", "return", "es", ".", "mapSync", "(", "f", "=>", "{", "if", "(", "/", "\\.ts$", "/", ".", "test", "(", "f", ".", "relative", ")", "&&", "!", "f", ".", "contents", ")", "{", "f", ".", "contents", "=", ...
Ugly hack for gulp-tsb
[ "Ugly", "hack", "for", "gulp", "-", "tsb" ]
693a13cd32c5be798051edc0cb43e1e39fc456d9
https://github.com/Microsoft/vscode/blob/693a13cd32c5be798051edc0cb43e1e39fc456d9/build/lib/watch/index.js#L9-L18
train
Handle deletion of files
[ 30522, 3853, 8971, 12260, 9285, 1006, 1007, 1063, 2709, 9686, 1012, 7341, 6038, 2278, 1006, 1042, 1027, 1028, 1063, 2065, 1006, 1013, 1032, 1012, 24529, 1002, 1013, 1012, 3231, 1006, 1042, 1012, 5816, 1007, 1004, 1004, 999, 1042, 1012, 84...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/LiveDevMultiBrowser.js
init
function init(config) { exports.config = config; MainViewManager .on("currentFileChange", _onFileChange); DocumentManager .on("documentSaved", _onDocumentSaved) .on("dirtyFlagChange", _onDirtyFlagChange); ProjectManager .on("beforeProjectCl...
javascript
function init(config) { exports.config = config; MainViewManager .on("currentFileChange", _onFileChange); DocumentManager .on("documentSaved", _onDocumentSaved) .on("dirtyFlagChange", _onDirtyFlagChange); ProjectManager .on("beforeProjectCl...
[ "function", "init", "(", "config", ")", "{", "exports", ".", "config", "=", "config", ";", "MainViewManager", ".", "on", "(", "\"currentFileChange\"", ",", "_onFileChange", ")", ";", "DocumentManager", ".", "on", "(", "\"documentSaved\"", ",", "_onDocumentSaved"...
Initialize the LiveDevelopment module.
[ "Initialize", "the", "LiveDevelopment", "module", "." ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/LiveDevelopment/LiveDevMultiBrowser.js#L818-L836
train
Initialize the application
[ 30522, 3853, 1999, 4183, 1006, 9530, 8873, 2290, 1007, 1063, 14338, 1012, 9530, 8873, 2290, 1027, 9530, 8873, 2290, 1025, 2364, 8584, 24805, 4590, 1012, 2006, 1006, 1000, 2783, 8873, 2571, 22305, 2063, 1000, 1010, 1035, 2006, 8873, 2571, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
mxArrowConnector
function mxArrowConnector(points, fill, stroke, strokewidth, arrowWidth, spacing, endSize) { mxShape.call(this); this.points = points; this.fill = fill; this.stroke = stroke; this.strokewidth = (strokewidth != null) ? strokewidth : 1; this.arrowWidth = (arrowWidth != null) ? arrowWidth : mxConstants.ARROW_WIDTH; ...
javascript
function mxArrowConnector(points, fill, stroke, strokewidth, arrowWidth, spacing, endSize) { mxShape.call(this); this.points = points; this.fill = fill; this.stroke = stroke; this.strokewidth = (strokewidth != null) ? strokewidth : 1; this.arrowWidth = (arrowWidth != null) ? arrowWidth : mxConstants.ARROW_WIDTH; ...
[ "function", "mxArrowConnector", "(", "points", ",", "fill", ",", "stroke", ",", "strokewidth", ",", "arrowWidth", ",", "spacing", ",", "endSize", ")", "{", "mxShape", ".", "call", "(", "this", ")", ";", "this", ".", "points", "=", "points", ";", "this", ...
Copyright (c) 2006-2015, JGraph Ltd Copyright (c) 2006-2015, Gaudenz Alder Class: mxArrowConnector Extends <mxShape> to implement an new rounded arrow shape with support for waypoints and double arrows. (The shape is used to represent edges, not vertices.) This shape is registered under <mxConstants.SHAPE_ARROW_CONN...
[ "Copyright", "(", "c", ")", "2006", "-", "2015", "JGraph", "Ltd", "Copyright", "(", "c", ")", "2006", "-", "2015", "Gaudenz", "Alder", "Class", ":", "mxArrowConnector" ]
33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44
https://github.com/jgraph/mxgraph/blob/33911ed7e055c17b74d0367f5f1f6c9ee4b4fd44/javascript/mxClient.js#L25585-L25596
train
A wrapper around mxShape to create an arrow connector
[ 30522, 3853, 25630, 2906, 10524, 8663, 2638, 16761, 1006, 2685, 1010, 6039, 1010, 6909, 1010, 6909, 9148, 11927, 2232, 1010, 8612, 9148, 11927, 2232, 1010, 12403, 6129, 1010, 4515, 4697, 1007, 1063, 25630, 7377, 5051, 1012, 2655, 1006, 2023...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
animate
function animate() { return function animateImpl(properties, params) { var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like var cy = this._private.cy || this; if (!cy.styleEnabled()) { r...
javascript
function animate() { return function animateImpl(properties, params) { var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like var cy = this._private.cy || this; if (!cy.styleEnabled()) { r...
[ "function", "animate", "(", ")", "{", "return", "function", "animateImpl", "(", "properties", ",", "params", ")", "{", "var", "self", "=", "this", ";", "var", "selfIsArrayLike", "=", "self", ".", "length", "!==", "undefined", ";", "var", "all", "=", "sel...
animate
[ "animate" ]
ad2051b65e2243cfd953d8b24a8bf95bfa8559e5
https://github.com/cytoscape/cytoscape.js/blob/ad2051b65e2243cfd953d8b24a8bf95bfa8559e5/dist/cytoscape.esm.js#L5899-L5927
train
Animate the elements in the array
[ 30522, 3853, 2019, 21499, 1006, 1007, 1063, 2709, 3853, 2019, 21499, 5714, 24759, 1006, 5144, 1010, 11498, 5244, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 13075, 2969, 14268, 11335, 8516, 17339, 1027, 2969, 1012, 3091, 999, 1027, 1027, 615...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
goldfire/howler.js
examples/3d/js/controls.js
function(pressed, event) { var state = this.codes[event.keyCode]; if (!state) { return; } this.states[state] = pressed; event.preventDefault && event.preventDefault(); event.stopPropagation && event.stopPropagation(); }
javascript
function(pressed, event) { var state = this.codes[event.keyCode]; if (!state) { return; } this.states[state] = pressed; event.preventDefault && event.preventDefault(); event.stopPropagation && event.stopPropagation(); }
[ "function", "(", "pressed", ",", "event", ")", "{", "var", "state", "=", "this", ".", "codes", "[", "event", ".", "keyCode", "]", ";", "if", "(", "!", "state", ")", "{", "return", ";", "}", "this", ".", "states", "[", "state", "]", "=", "pressed"...
Handle all keydown and keyup events and update our internal controls state. @param {Boolean} pressed Whether or not the key is being pressed. @param {Object} event DOM event data including the key being pressed.
[ "Handle", "all", "keydown", "and", "keyup", "events", "and", "update", "our", "internal", "controls", "state", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/examples/3d/js/controls.js#L39-L49
train
Handle keydown events
[ 30522, 3853, 1006, 4508, 1010, 2724, 1007, 1063, 13075, 2110, 1027, 2023, 1012, 9537, 1031, 2724, 1012, 3145, 16044, 1033, 1025, 2065, 1006, 999, 2110, 1007, 1063, 2709, 1025, 1065, 2023, 1012, 2163, 1031, 2110, 1033, 1027, 4508, 1025, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/consistent-return.js
checkLastSegment
function checkLastSegment(node) { let loc, name; /* * Skip if it expected no return value or unreachable. * When unreachable, all paths are returned or thrown. */ if (!funcInfo.hasReturnValue || funcInfo.codePath.currentSegments...
javascript
function checkLastSegment(node) { let loc, name; /* * Skip if it expected no return value or unreachable. * When unreachable, all paths are returned or thrown. */ if (!funcInfo.hasReturnValue || funcInfo.codePath.currentSegments...
[ "function", "checkLastSegment", "(", "node", ")", "{", "let", "loc", ",", "name", ";", "/*\n * Skip if it expected no return value or unreachable.\n * When unreachable, all paths are returned or thrown.\n */", "if", "(", "!", "funcInfo", ".", "ha...
Checks whether of not the implicit returning is consistent if the last code path segment is reachable. @param {ASTNode} node - A program/function node to check. @returns {void}
[ "Checks", "whether", "of", "not", "the", "implicit", "returning", "is", "consistent", "if", "the", "last", "code", "path", "segment", "is", "reachable", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/consistent-return.js#L95-L144
train
Check last segment of a function call.
[ 30522, 3853, 4638, 8523, 3215, 13910, 3672, 1006, 13045, 1007, 1063, 2292, 8840, 2278, 1010, 2171, 1025, 1013, 1008, 1008, 13558, 2065, 2009, 3517, 2053, 2709, 3643, 2030, 4895, 16416, 7507, 3468, 1012, 1008, 2043, 4895, 16416, 7507, 3468, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Freeboard/freeboard
js/freeboard.thirdparty.js
function(event) { var onSelect, dateStr, sel, inst = $.datepicker._getInst(event.target), handled = true, isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); inst._keyEvent = true; if ($.datepicker._datepickerShowing) { switch (event.keyCode) { case 9: $.datepicker._hideDatepicker(); handled = fal...
javascript
function(event) { var onSelect, dateStr, sel, inst = $.datepicker._getInst(event.target), handled = true, isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); inst._keyEvent = true; if ($.datepicker._datepickerShowing) { switch (event.keyCode) { case 9: $.datepicker._hideDatepicker(); handled = fal...
[ "function", "(", "event", ")", "{", "var", "onSelect", ",", "dateStr", ",", "sel", ",", "inst", "=", "$", ".", "datepicker", ".", "_getInst", "(", "event", ".", "target", ")", ",", "handled", "=", "true", ",", "isRTL", "=", "inst", ".", "dpDiv", "....
/* Handle keystrokes.
[ "/", "*", "Handle", "keystrokes", "." ]
38789f6e8bd3d04f7d3b2c3427e509d00f2610fc
https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/js/freeboard.thirdparty.js#L8161-L8256
train
handle keydown and backspace keypress events
[ 30522, 3853, 1006, 2724, 1007, 1063, 13075, 2006, 11246, 22471, 1010, 5246, 16344, 1010, 7367, 2140, 1010, 16021, 2102, 1027, 1002, 1012, 3058, 24330, 5484, 1012, 1035, 2131, 7076, 2102, 1006, 2724, 1012, 4539, 1007, 1010, 8971, 1027, 2995,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/AutoUpdate/node/AutoUpdateDomain.js
performCleanup
function performCleanup(requester, filesToCache, notifyBack) { var currentRequester = requester || ""; function filterFilesAndNotify(files, filesToCacheArr, notifyBackToBrackets) { files.forEach(function (file) { var fileExt = path.extname(path.basename(file)); ...
javascript
function performCleanup(requester, filesToCache, notifyBack) { var currentRequester = requester || ""; function filterFilesAndNotify(files, filesToCacheArr, notifyBackToBrackets) { files.forEach(function (file) { var fileExt = path.extname(path.basename(file)); ...
[ "function", "performCleanup", "(", "requester", ",", "filesToCache", ",", "notifyBack", ")", "{", "var", "currentRequester", "=", "requester", "||", "\"\"", ";", "function", "filterFilesAndNotify", "(", "files", ",", "filesToCacheArr", ",", "notifyBackToBrackets", "...
Performs clean up for the contents in Update Directory in AppData @param {Array} filesToCache - array of file types to cache @param {boolean} notifyBack - true if Brackets needs to be notified post cleanup, false otherwise
[ "Performs", "clean", "up", "for", "the", "contents", "in", "Update", "Directory", "in", "AppData" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/AutoUpdate/node/AutoUpdateDomain.js#L332-L382
train
This function is called by the cleanup process to clean up the update directory
[ 30522, 3853, 4685, 14321, 24076, 2361, 1006, 5227, 2121, 1010, 6764, 3406, 3540, 5403, 1010, 2025, 8757, 5963, 1007, 1063, 13075, 2783, 2890, 15500, 2121, 1027, 5227, 2121, 1064, 1064, 1000, 1000, 1025, 3853, 11307, 8873, 4244, 5685, 17048,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/CloseOthers/main.js
contextMenuOpenHandler
function contextMenuOpenHandler() { var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE); if (file) { var targetIndex = MainViewManager.findInWorkingSet(MainViewManager.ACTIVE_PANE, file.fullPath), workingSetListSize = MainViewManager.getWorkingSet...
javascript
function contextMenuOpenHandler() { var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE); if (file) { var targetIndex = MainViewManager.findInWorkingSet(MainViewManager.ACTIVE_PANE, file.fullPath), workingSetListSize = MainViewManager.getWorkingSet...
[ "function", "contextMenuOpenHandler", "(", ")", "{", "var", "file", "=", "MainViewManager", ".", "getCurrentlyViewedFile", "(", "MainViewManager", ".", "ACTIVE_PANE", ")", ";", "if", "(", "file", ")", "{", "var", "targetIndex", "=", "MainViewManager", ".", "find...
Enable/Disable the menu items depending on which document is selected in the working set
[ "Enable", "/", "Disable", "the", "menu", "items", "depending", "on", "which", "document", "is", "selected", "in", "the", "working", "set" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/CloseOthers/main.js#L79-L104
train
Open the context menu
[ 30522, 3853, 6123, 3549, 19098, 11837, 11774, 3917, 1006, 1007, 1063, 13075, 5371, 1027, 2364, 8584, 24805, 4590, 1012, 2131, 10841, 14343, 20630, 8584, 2098, 8873, 2571, 1006, 2364, 8584, 24805, 4590, 1012, 3161, 1035, 6090, 2063, 1007, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js
function (aSchemas, oMetaModel) { /** * Process all types in the given array. * @param {object[]} [aTypes] A list of complex types or entity types. */ function processTypes(aTypes) { (aTypes || []).forEach(function (oType) { (oType.property || []).forEach(function (oProperty) { var sAnn...
javascript
function (aSchemas, oMetaModel) { /** * Process all types in the given array. * @param {object[]} [aTypes] A list of complex types or entity types. */ function processTypes(aTypes) { (aTypes || []).forEach(function (oType) { (oType.property || []).forEach(function (oProperty) { var sAnn...
[ "function", "(", "aSchemas", ",", "oMetaModel", ")", "{", "/**\n\t\t\t * Process all types in the given array.\n\t\t\t * @param {object[]} [aTypes] A list of complex types or entity types.\n\t\t\t */", "function", "processTypes", "(", "aTypes", ")", "{", "(", "aTypes", "||", "[", ...
Adds unit annotations to properties that have a <code>sap:unit</code> OData V2 annotation. Iterates over the given schemas and searches in their complex and entity types for properties with a <code>sap:unit</code> OData V2 annotation. Creates a corresponding OData V4 annotation <code>Org.OData.Measures.V1.Unit</code> ...
[ "Adds", "unit", "annotations", "to", "properties", "that", "have", "a", "<code", ">", "sap", ":", "unit<", "/", "code", ">", "OData", "V2", "annotation", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L387-L447
train
Process all types in the given array.
[ 30522, 3853, 1006, 2004, 5403, 9335, 1010, 18168, 12928, 5302, 9247, 1007, 1063, 1013, 1008, 1008, 1008, 2832, 2035, 4127, 1999, 1996, 2445, 9140, 1012, 1008, 1030, 11498, 2213, 1063, 4874, 1031, 1033, 1065, 1031, 2012, 18863, 2015, 1033, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
pouchdb/pouchdb
bin/build-pouchdb.js
buildForBrowser
function buildForBrowser() { return doBrowserify('pouchdb', 'lib/index-browser.js', { standalone: 'PouchDB' }).then(function (code) { code = comments.pouchdb + code; return all([ writeFile(addPath('pouchdb', 'dist/pouchdb.js'), code), doUglify('pouchdb', code, comments.pouchdb, 'dist/pouchdb...
javascript
function buildForBrowser() { return doBrowserify('pouchdb', 'lib/index-browser.js', { standalone: 'PouchDB' }).then(function (code) { code = comments.pouchdb + code; return all([ writeFile(addPath('pouchdb', 'dist/pouchdb.js'), code), doUglify('pouchdb', code, comments.pouchdb, 'dist/pouchdb...
[ "function", "buildForBrowser", "(", ")", "{", "return", "doBrowserify", "(", "'pouchdb'", ",", "'lib/index-browser.js'", ",", "{", "standalone", ":", "'PouchDB'", "}", ")", ".", "then", "(", "function", "(", "code", ")", "{", "code", "=", "comments", ".", ...
build for the browser (dist)
[ "build", "for", "the", "browser", "(", "dist", ")" ]
858660e9b37959d96eebf667ea9b8b1273f0d62c
https://github.com/pouchdb/pouchdb/blob/858660e9b37959d96eebf667ea9b8b1273f0d62c/bin/build-pouchdb.js#L114-L124
train
Build the pouchdb. js file for browser
[ 30522, 3853, 3857, 29278, 12618, 9333, 2121, 1006, 1007, 1063, 2709, 2079, 12618, 9333, 11124, 12031, 1006, 1005, 21445, 18939, 1005, 1010, 1005, 5622, 2497, 1013, 5950, 1011, 16602, 1012, 1046, 2015, 1005, 1010, 1063, 26609, 1024, 1005, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/RequestRecorder.js
function(locationUrl, options) { try { // Try to start play-mode this.play(locationUrl, options); } catch (e) { // If play-mode could not be started, try to record instead. var oUri = new URI(locationUrl); var sExtension = oUri.suffix(); // Check if the provided URL is a har file, maybe th...
javascript
function(locationUrl, options) { try { // Try to start play-mode this.play(locationUrl, options); } catch (e) { // If play-mode could not be started, try to record instead. var oUri = new URI(locationUrl); var sExtension = oUri.suffix(); // Check if the provided URL is a har file, maybe th...
[ "function", "(", "locationUrl", ",", "options", ")", "{", "try", "{", "// Try to start play-mode", "this", ".", "play", "(", "locationUrl", ",", "options", ")", ";", "}", "catch", "(", "e", ")", "{", "// If play-mode could not be started, try to record instead.", ...
Start with existing locationUrl or inline entries results in a playback. If the file does not exist, XMLHttpRequests are not faked and the recording starts. @param {string|Array} locationUrl Specifies from which location the file is loaded. If it is not found, the recording is started. The provided filename is the nam...
[ "Start", "with", "existing", "locationUrl", "or", "inline", "entries", "results", "in", "a", "playback", ".", "If", "the", "file", "does", "not", "exist", "XMLHttpRequests", "are", "not", "faked", "and", "the", "recording", "starts", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/RequestRecorder.js#L543-L557
train
Play the specified file
[ 30522, 3853, 1006, 3295, 3126, 2140, 1010, 7047, 1007, 1063, 3046, 1063, 1013, 1013, 3046, 2000, 2707, 2377, 1011, 5549, 2023, 1012, 2377, 1006, 3295, 3126, 2140, 1010, 7047, 1007, 1025, 1065, 4608, 1006, 1041, 1007, 1063, 1013, 1013, 206...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
postmanlabs/newman
lib/reporters/cli/cli-utils.js
function () { var tty, width, height; try { tty = require('tty'); } catch (e) { tty = null; } if (tty && tty.isatty(1) && tty.isatty(2)) { if (process.stdout.getWindowSize) { width = process.stdout.getWindowSize(1)[0]; ...
javascript
function () { var tty, width, height; try { tty = require('tty'); } catch (e) { tty = null; } if (tty && tty.isatty(1) && tty.isatty(2)) { if (process.stdout.getWindowSize) { width = process.stdout.getWindowSize(1)[0]; ...
[ "function", "(", ")", "{", "var", "tty", ",", "width", ",", "height", ";", "try", "{", "tty", "=", "require", "(", "'tty'", ")", ";", "}", "catch", "(", "e", ")", "{", "tty", "=", "null", ";", "}", "if", "(", "tty", "&&", "tty", ".", "isatty"...
A CLI utility helper method to compute and scae the size of the CLI table to be displayed. @returns {Object} - A set of properties: width, height, and TTY existance.
[ "A", "CLI", "utility", "helper", "method", "to", "compute", "and", "scae", "the", "size", "of", "the", "CLI", "table", "to", "be", "displayed", "." ]
c05a5a1e82aa3c2021e94ba09e627ba4718af69e
https://github.com/postmanlabs/newman/blob/c05a5a1e82aa3c2021e94ba09e627ba4718af69e/lib/reporters/cli/cli-utils.js#L155-L183
train
Returns an object containing information about the current term size
[ 30522, 3853, 1006, 1007, 1063, 13075, 23746, 2100, 1010, 9381, 1010, 4578, 1025, 3046, 1063, 23746, 2100, 1027, 5478, 1006, 1005, 23746, 2100, 1005, 1007, 1025, 1065, 4608, 1006, 1041, 1007, 1063, 23746, 2100, 1027, 19701, 1025, 1065, 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...
SeleniumHQ/selenium
javascript/node/optparse.js
formatHelpMsg
function formatHelpMsg(usage, options) { var prog = path.basename( process.argv[0]) + ' ' + path.basename(process.argv[1]); var help = [ usage.replace(/\$0\b/g, prog), '', 'Options:', formatOption('help', 'Show this message and exit') ]; Object.keys(options).sort().forEach(function(key) {...
javascript
function formatHelpMsg(usage, options) { var prog = path.basename( process.argv[0]) + ' ' + path.basename(process.argv[1]); var help = [ usage.replace(/\$0\b/g, prog), '', 'Options:', formatOption('help', 'Show this message and exit') ]; Object.keys(options).sort().forEach(function(key) {...
[ "function", "formatHelpMsg", "(", "usage", ",", "options", ")", "{", "var", "prog", "=", "path", ".", "basename", "(", "process", ".", "argv", "[", "0", "]", ")", "+", "' '", "+", "path", ".", "basename", "(", "process", ".", "argv", "[", "1", "]",...
Formats a help message for the given parser. @param {string} usage The usage string. All occurences of "$0" will be replaced with the name of the current program. @param {!Object.<!Option>} options The options to format. @return {string} The formatted help message.
[ "Formats", "a", "help", "message", "for", "the", "given", "parser", "." ]
38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd
https://github.com/SeleniumHQ/selenium/blob/38d5e4440b2c866a78a1ccb2a18d9795a1bdeafd/javascript/node/optparse.js#L123-L140
train
Format help message
[ 30522, 3853, 4289, 16001, 9737, 28745, 1006, 8192, 1010, 7047, 1007, 1063, 13075, 4013, 2290, 1027, 4130, 1012, 2918, 18442, 1006, 2832, 1012, 12098, 2290, 2615, 1031, 1014, 1033, 1007, 1009, 1005, 1005, 1009, 4130, 1012, 2918, 18442, 1006,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
TryGhost/Ghost
core/server/api/v0.1/notifications.js
handlePermissions
function handlePermissions(options) { return canThis(options.context).destroy.notification().then(() => { return options; }, () => { return Promise.reject(new common.errors.NoPermissionError({ message: common.i18n.t('errors.api.notifications.no...
javascript
function handlePermissions(options) { return canThis(options.context).destroy.notification().then(() => { return options; }, () => { return Promise.reject(new common.errors.NoPermissionError({ message: common.i18n.t('errors.api.notifications.no...
[ "function", "handlePermissions", "(", "options", ")", "{", "return", "canThis", "(", "options", ".", "context", ")", ".", "destroy", ".", "notification", "(", ")", ".", "then", "(", "(", ")", "=>", "{", "return", "options", ";", "}", ",", "(", ")", "...
### Handle Permissions We need to be an authorised user to perform this action @param {Object} options @returns {Object} options
[ "###", "Handle", "Permissions", "We", "need", "to", "be", "an", "authorised", "user", "to", "perform", "this", "action" ]
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/api/v0.1/notifications.js#L229-L237
train
Check if the user has the right permissions to destroy the notification
[ 30522, 3853, 5047, 4842, 25481, 2015, 1006, 7047, 1007, 1063, 2709, 2064, 15222, 2015, 1006, 7047, 1012, 6123, 1007, 1012, 6033, 1012, 26828, 1006, 1007, 1012, 2059, 1006, 1006, 1007, 1027, 1028, 1063, 2709, 7047, 1025, 1065, 1010, 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...
mui-org/material-ui
docs/src/pages/components/grid-list/TitlebarGridList.js
TitlebarGridList
function TitlebarGridList() { const classes = useStyles(); return ( <div className={classes.root}> <GridList cellHeight={180} className={classes.gridList}> <GridListTile key="Subheader" cols={2} style={{ height: 'auto' }}> <ListSubheader component="div">December</ListSubheader> ...
javascript
function TitlebarGridList() { const classes = useStyles(); return ( <div className={classes.root}> <GridList cellHeight={180} className={classes.gridList}> <GridListTile key="Subheader" cols={2} style={{ height: 'auto' }}> <ListSubheader component="div">December</ListSubheader> ...
[ "function", "TitlebarGridList", "(", ")", "{", "const", "classes", "=", "useStyles", "(", ")", ";", "return", "(", "<", "div", "className", "=", "{", "classes", ".", "root", "}", ">", "\n ", "<", "GridList", "cellHeight", "=", "{", "180", "}", "cl...
The example data is structured as follows: import image from 'path/to/image.jpg'; [etc...] const tileData = [ { img: image, title: 'Image', author: 'author', }, { [etc...] }, ];
[ "The", "example", "data", "is", "structured", "as", "follows", ":" ]
1555e52367835946382fbf2a8f681de71318915d
https://github.com/mui-org/material-ui/blob/1555e52367835946382fbf2a8f681de71318915d/docs/src/pages/components/grid-list/TitlebarGridList.js#L45-L71
train
A titlebar grid list
[ 30522, 3853, 2516, 8237, 16523, 3593, 9863, 1006, 1007, 1063, 9530, 3367, 4280, 1027, 3594, 27983, 2015, 1006, 1007, 1025, 2709, 1006, 1026, 4487, 2615, 2465, 18442, 1027, 1063, 4280, 1012, 7117, 1065, 1028, 1026, 8370, 9863, 3526, 26036, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.unified/src/sap/ui/unified/calendar/CalendarDate.js
createUTCDate
function createUTCDate(oDate) { var oUTCDate = new Date(Date.UTC(0, 0, 1)); oUTCDate.setUTCFullYear(oDate.getFullYear(), oDate.getMonth(), oDate.getDate()); return oUTCDate; }
javascript
function createUTCDate(oDate) { var oUTCDate = new Date(Date.UTC(0, 0, 1)); oUTCDate.setUTCFullYear(oDate.getFullYear(), oDate.getMonth(), oDate.getDate()); return oUTCDate; }
[ "function", "createUTCDate", "(", "oDate", ")", "{", "var", "oUTCDate", "=", "new", "Date", "(", "Date", ".", "UTC", "(", "0", ",", "0", ",", "1", ")", ")", ";", "oUTCDate", ".", "setUTCFullYear", "(", "oDate", ".", "getFullYear", "(", ")", ",", "o...
Creates a JavaScript UTC Date corresponding to the given JavaScript Date. @param {Date} oDate JavaScript date object. Time related information is cut. @returns {Date} JavaScript date created from the date object, but this time considered as UTC date information.
[ "Creates", "a", "JavaScript", "UTC", "Date", "corresponding", "to", "the", "given", "JavaScript", "Date", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.unified/src/sap/ui/unified/calendar/CalendarDate.js#L341-L347
train
Creates a new Date instance with the correct UTC date
[ 30522, 3853, 3443, 4904, 19797, 3686, 1006, 1051, 13701, 1007, 1063, 13075, 2041, 19797, 3686, 1027, 2047, 3058, 1006, 3058, 1012, 11396, 1006, 1014, 1010, 1014, 1010, 1015, 1007, 1007, 1025, 2041, 19797, 3686, 1012, 2275, 4904, 2278, 7699,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/project/WorkingSetView.js
_suppressScrollShadowsOnAllViews
function _suppressScrollShadowsOnAllViews(disable) { _.forEach(_views, function (view) { if (disable) { ViewUtils.removeScrollerShadow(view.$openFilesContainer[0], null); } else if (view.$openFilesContainer[0].scrollHeight > view.$openFilesContainer[0].clientHeight) { ...
javascript
function _suppressScrollShadowsOnAllViews(disable) { _.forEach(_views, function (view) { if (disable) { ViewUtils.removeScrollerShadow(view.$openFilesContainer[0], null); } else if (view.$openFilesContainer[0].scrollHeight > view.$openFilesContainer[0].clientHeight) { ...
[ "function", "_suppressScrollShadowsOnAllViews", "(", "disable", ")", "{", "_", ".", "forEach", "(", "_views", ",", "function", "(", "view", ")", "{", "if", "(", "disable", ")", "{", "ViewUtils", ".", "removeScrollerShadow", "(", "view", ".", "$openFilesContain...
turns off the scroll shadow on view containers so they don't interfere with dragging @private @param {Boolean} disable - true to disable, false to enable
[ "turns", "off", "the", "scroll", "shadow", "on", "view", "containers", "so", "they", "don", "t", "interfere", "with", "dragging" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/project/WorkingSetView.js#L188-L196
train
suppress scroll shadows on all views
[ 30522, 3853, 1035, 16081, 11020, 28402, 7377, 3527, 9333, 16026, 2140, 8584, 2015, 1006, 4487, 19150, 1007, 1063, 1035, 1012, 18921, 6776, 1006, 1035, 5328, 1010, 3853, 1006, 3193, 1007, 1063, 2065, 1006, 4487, 19150, 1007, 1063, 3193, 2182...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/mvc/View.js
initPreprocessorQueues
function initPreprocessorQueues(oView, mSettings) { var oViewClass = oView.getMetadata().getClass(); function resolvePreprocessors(oPreprocessor) { oPreprocessor.preprocessor = initPreprocessor(oPreprocessor, mSettings.async); } // shallow copy to avoid issues when manipulating the internal object structur...
javascript
function initPreprocessorQueues(oView, mSettings) { var oViewClass = oView.getMetadata().getClass(); function resolvePreprocessors(oPreprocessor) { oPreprocessor.preprocessor = initPreprocessor(oPreprocessor, mSettings.async); } // shallow copy to avoid issues when manipulating the internal object structur...
[ "function", "initPreprocessorQueues", "(", "oView", ",", "mSettings", ")", "{", "var", "oViewClass", "=", "oView", ".", "getMetadata", "(", ")", ".", "getClass", "(", ")", ";", "function", "resolvePreprocessors", "(", "oPreprocessor", ")", "{", "oPreprocessor", ...
init internal registry and convert single declarations to array, for compatibility @param {sap.ui.core.mvc.View} oView This view instance @param {object} mSettings Settings for the view @private
[ "init", "internal", "registry", "and", "convert", "single", "declarations", "to", "array", "for", "compatibility" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/mvc/View.js#L308-L329
train
Initializes the preprocessors for the given view
[ 30522, 3853, 1999, 4183, 28139, 21572, 9623, 21748, 4226, 15808, 1006, 1051, 8584, 1010, 5796, 18319, 3070, 2015, 1007, 1063, 13075, 1051, 8584, 26266, 1027, 1051, 8584, 1012, 2131, 11368, 8447, 2696, 1006, 1007, 1012, 2131, 26266, 1006, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/hello-mui/js/mui.js
function(p1, p2, props) { if(!props) { props = ['x', 'y']; } var x = p2[props[0]] - p1[props[0]]; var y = p2[props[1]] - p1[props[1]]; return sqrt((x * x) + (y * y)); }
javascript
function(p1, p2, props) { if(!props) { props = ['x', 'y']; } var x = p2[props[0]] - p1[props[0]]; var y = p2[props[1]] - p1[props[1]]; return sqrt((x * x) + (y * y)); }
[ "function", "(", "p1", ",", "p2", ",", "props", ")", "{", "if", "(", "!", "props", ")", "{", "props", "=", "[", "'x'", ",", "'y'", "]", ";", "}", "var", "x", "=", "p2", "[", "props", "[", "0", "]", "]", "-", "p1", "[", "props", "[", "0", ...
distance @param {type} p1 @param {type} p2 @returns {Number}
[ "distance" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/hello-mui/js/mui.js#L1181-L1188
train
Returns the distance between two points
[ 30522, 3853, 1006, 1052, 2487, 1010, 1052, 2475, 1010, 24387, 1007, 1063, 2065, 1006, 999, 24387, 1007, 1063, 24387, 1027, 1031, 1005, 1060, 1005, 1010, 1005, 1061, 1005, 1033, 1025, 1065, 13075, 1060, 1027, 1052, 2475, 1031, 24387, 1031, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/tooltip/tooltip.js
register
function register(type, handler, useCapture) { var handlers = listeners[type] = listeners[type] || []; if (!handlers.length) { useCapture ? window.addEventListener(type, globalEventHandler, true) : ngWindow.on(type, globalEventHandler); } if (handlers.indexOf(handler) === -1) { h...
javascript
function register(type, handler, useCapture) { var handlers = listeners[type] = listeners[type] || []; if (!handlers.length) { useCapture ? window.addEventListener(type, globalEventHandler, true) : ngWindow.on(type, globalEventHandler); } if (handlers.indexOf(handler) === -1) { h...
[ "function", "register", "(", "type", ",", "handler", ",", "useCapture", ")", "{", "var", "handlers", "=", "listeners", "[", "type", "]", "=", "listeners", "[", "type", "]", "||", "[", "]", ";", "if", "(", "!", "handlers", ".", "length", ")", "{", "...
Registers a new handler with the service. @param {string} type Type of event to be registered. @param {!Function} handler Event handler. @param {boolean} useCapture Whether to use event capturing.
[ "Registers", "a", "new", "handler", "with", "the", "service", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/tooltip/tooltip.js#L451-L462
train
Register a listener for a specific event type
[ 30522, 3853, 4236, 1006, 2828, 1010, 28213, 1010, 2224, 17695, 11244, 1007, 1063, 13075, 28213, 2015, 1027, 13810, 1031, 2828, 1033, 1027, 13810, 1031, 2828, 1033, 1064, 1064, 1031, 1033, 1025, 2065, 1006, 999, 28213, 2015, 1012, 3091, 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...
Freeboard/freeboard
js/freeboard.thirdparty.js
function( startMenu ) { if ( !startMenu ) { startMenu = this.active ? this.active.parent() : this.element; } startMenu .find( ".ui-menu" ) .hide() .attr( "aria-hidden", "true" ) .attr( "aria-expanded", "false" ) .end() .find( "a.ui-state-active" ) .removeClass( "ui-state-active" ); }
javascript
function( startMenu ) { if ( !startMenu ) { startMenu = this.active ? this.active.parent() : this.element; } startMenu .find( ".ui-menu" ) .hide() .attr( "aria-hidden", "true" ) .attr( "aria-expanded", "false" ) .end() .find( "a.ui-state-active" ) .removeClass( "ui-state-active" ); }
[ "function", "(", "startMenu", ")", "{", "if", "(", "!", "startMenu", ")", "{", "startMenu", "=", "this", ".", "active", "?", "this", ".", "active", ".", "parent", "(", ")", ":", "this", ".", "element", ";", "}", "startMenu", ".", "find", "(", "\".u...
With no arguments, closes the currently active menu - if nothing is active it closes all menus. If passed an argument, it will search for menus BELOW
[ "With", "no", "arguments", "closes", "the", "currently", "active", "menu", "-", "if", "nothing", "is", "active", "it", "closes", "all", "menus", ".", "If", "passed", "an", "argument", "it", "will", "search", "for", "menus", "BELOW" ]
38789f6e8bd3d04f7d3b2c3427e509d00f2610fc
https://github.com/Freeboard/freeboard/blob/38789f6e8bd3d04f7d3b2c3427e509d00f2610fc/js/freeboard.thirdparty.js#L11899-L11912
train
Hide the menu
[ 30522, 3853, 30524, 3549, 2226, 1007, 1063, 2707, 3549, 2226, 1027, 2023, 1012, 3161, 1029, 2023, 1012, 3161, 1012, 6687, 1006, 1007, 1024, 2023, 1012, 5783, 1025, 1065, 2707, 3549, 2226, 1012, 2424, 1006, 1000, 1012, 21318, 1011, 12183, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
parseConstLetDeclaration
function parseConstLetDeclaration(kind) { var declarations, startToken; startToken = lookahead; expectKeyword(kind); declarations = parseVariableDeclarationList(kind); consumeSemicolon(); return delegate.markEnd(delegate.createVariableDeclaration(declarations, kind),...
javascript
function parseConstLetDeclaration(kind) { var declarations, startToken; startToken = lookahead; expectKeyword(kind); declarations = parseVariableDeclarationList(kind); consumeSemicolon(); return delegate.markEnd(delegate.createVariableDeclaration(declarations, kind),...
[ "function", "parseConstLetDeclaration", "(", "kind", ")", "{", "var", "declarations", ",", "startToken", ";", "startToken", "=", "lookahead", ";", "expectKeyword", "(", "kind", ")", ";", "declarations", "=", "parseVariableDeclarationList", "(", "kind", ")", ";", ...
kind may be `const` or `let` Both are experimental and not in the specification yet. see http://wiki.ecmascript.org/doku.php?id=harmony:const and http://wiki.ecmascript.org/doku.php?id=harmony:let
[ "kind", "may", "be", "const", "or", "let", "Both", "are", "experimental", "and", "not", "in", "the", "specification", "yet", ".", "see", "http", ":", "//", "wiki", ".", "ecmascript", ".", "org", "/", "doku", ".", "php?id", "=", "harmony", ":", "const",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/blanket.js#L2708-L2720
train
ECMA - 262 12. 2 ConstLetDeclaration
[ 30522, 3853, 11968, 3366, 8663, 22516, 2102, 3207, 20464, 25879, 3258, 1006, 2785, 1007, 1063, 13075, 8170, 2015, 1010, 2707, 18715, 2368, 1025, 2707, 18715, 2368, 1027, 2298, 4430, 13775, 1025, 5987, 14839, 18351, 1006, 2785, 1007, 1025, 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...
SAP/openui5
src/sap.ui.core/src/sap/ui/model/odata/AnnotationParser.js
function() { var xPath = {}; var mParserData = AnnotationParser._parserData; if (Device.browser.msie) {// old IE xPath = { setNameSpace : function(outNode) { outNode.setProperty("SelectionNamespaces", 'xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns:d="http://docs.oasis-open.org/od...
javascript
function() { var xPath = {}; var mParserData = AnnotationParser._parserData; if (Device.browser.msie) {// old IE xPath = { setNameSpace : function(outNode) { outNode.setProperty("SelectionNamespaces", 'xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns:d="http://docs.oasis-open.org/od...
[ "function", "(", ")", "{", "var", "xPath", "=", "{", "}", ";", "var", "mParserData", "=", "AnnotationParser", ".", "_parserData", ";", "if", "(", "Device", ".", "browser", ".", "msie", ")", "{", "// old IE", "xPath", "=", "{", "setNameSpace", ":", "fun...
/* @static @private
[ "/", "*" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/AnnotationParser.js#L1210-L1293
train
Returns the XML nodes that are selected by XPath.
[ 30522, 3853, 1006, 1007, 1063, 13075, 26726, 8988, 1027, 1063, 1065, 1025, 13075, 6131, 11650, 2121, 2850, 2696, 1027, 5754, 17287, 3508, 19362, 8043, 1012, 1035, 11968, 8043, 2850, 2696, 1025, 2065, 1006, 5080, 1012, 16602, 1012, 5796, 266...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js
stopHandler
function stopHandler( event ) { $this.unbind( touchMoveEvent, moveHandler ) .unbind( touchStopEvent, stopHandler ); if ( start && stop ) { $.event.special.swipe.handleSwipe( start, stop ); } start = stop = undefined; }
javascript
function stopHandler( event ) { $this.unbind( touchMoveEvent, moveHandler ) .unbind( touchStopEvent, stopHandler ); if ( start && stop ) { $.event.special.swipe.handleSwipe( start, stop ); } start = stop = undefined; }
[ "function", "stopHandler", "(", "event", ")", "{", "$this", ".", "unbind", "(", "touchMoveEvent", ",", "moveHandler", ")", ".", "unbind", "(", "touchStopEvent", ",", "stopHandler", ")", ";", "if", "(", "start", "&&", "stop", ")", "{", "$", ".", "event", ...
SAP MODIFICATION Because touchcancel is used together with touchend, jQuery.fn.bind is used to replace jQuery.fn.one due to the fact that jQuery.fn.one doesn't work for multiple events.
[ "SAP", "MODIFICATION", "Because", "touchcancel", "is", "used", "together", "with", "touchend", "jQuery", ".", "fn", ".", "bind", "is", "used", "to", "replace", "jQuery", ".", "fn", ".", "one", "due", "to", "the", "fact", "that", "jQuery", ".", "fn", ".",...
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L2096-L2104
train
stop event handler
[ 30522, 3853, 2644, 11774, 3917, 1006, 2724, 1007, 1063, 1002, 2023, 1012, 4895, 8428, 2094, 1006, 3543, 5302, 3726, 18697, 3372, 1010, 2693, 11774, 3917, 1007, 1012, 4895, 8428, 2094, 1006, 3543, 16033, 5051, 15338, 1010, 2644, 11774, 3917,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/routing/Target.js
function(oData, fnFunction, oListener) { var bHasListener = this.hasListeners("titleChanged"), sTitle = this._oTitleProvider && this._oTitleProvider.getTitle(); this.attachEvent(this.M_EVENTS.TITLE_CHANGED, oData, fnFunction, oListener); // in case the title is changed before the first event listener ...
javascript
function(oData, fnFunction, oListener) { var bHasListener = this.hasListeners("titleChanged"), sTitle = this._oTitleProvider && this._oTitleProvider.getTitle(); this.attachEvent(this.M_EVENTS.TITLE_CHANGED, oData, fnFunction, oListener); // in case the title is changed before the first event listener ...
[ "function", "(", "oData", ",", "fnFunction", ",", "oListener", ")", "{", "var", "bHasListener", "=", "this", ".", "hasListeners", "(", "\"titleChanged\"", ")", ",", "sTitle", "=", "this", ".", "_oTitleProvider", "&&", "this", ".", "_oTitleProvider", ".", "ge...
Will be fired when the title of this Target has been changed. @name sap.ui.core.routing.Target#titleChanged @event @param {object} oEvent @param {sap.ui.base.EventProvider} oEvent.getSource @param {object} oEvent.getParameters @param {string} oEvent.getParameters.title The name of this target @param {string} oEvent.ge...
[ "Will", "be", "fired", "when", "the", "title", "of", "this", "Target", "has", "been", "changed", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/Target.js#L209-L222
train
attach titleChanged event to the control
[ 30522, 3853, 1006, 1051, 2850, 2696, 1010, 1042, 2078, 11263, 27989, 1010, 19330, 27870, 3678, 1007, 1063, 13075, 1038, 14949, 9863, 24454, 1027, 2023, 1012, 30524, 4183, 2571, 21572, 17258, 2121, 1012, 2131, 3775, 9286, 1006, 1007, 1025, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
electron/electron
lib/browser/guest-window-manager.js
function (embedder, url, referrer, frameName, options, postData) { let guest = frameToGuest.get(frameName) if (frameName && (guest != null)) { guest.loadURL(url) return guest.webContents.id } // Remember the embedder window's id. if (options.webPreferences == null) { options.webPreferences = {} ...
javascript
function (embedder, url, referrer, frameName, options, postData) { let guest = frameToGuest.get(frameName) if (frameName && (guest != null)) { guest.loadURL(url) return guest.webContents.id } // Remember the embedder window's id. if (options.webPreferences == null) { options.webPreferences = {} ...
[ "function", "(", "embedder", ",", "url", ",", "referrer", ",", "frameName", ",", "options", ",", "postData", ")", "{", "let", "guest", "=", "frameToGuest", ".", "get", "(", "frameName", ")", "if", "(", "frameName", "&&", "(", "guest", "!=", "null", ")"...
Create a new guest created by |embedder| with |options|.
[ "Create", "a", "new", "guest", "created", "by", "|embedder|", "with", "|options|", "." ]
6e29611788277729647acf465f10db1ea6f15788
https://github.com/electron/electron/blob/6e29611788277729647acf465f10db1ea6f15788/lib/browser/guest-window-manager.js#L109-L146
train
Creates a new window from the embedder window.
[ 30522, 3853, 1006, 7861, 8270, 4063, 1010, 24471, 2140, 1010, 6523, 14544, 1010, 4853, 18442, 1010, 7047, 1010, 2695, 2850, 2696, 1007, 1063, 2292, 4113, 30524, 999, 1027, 19701, 1007, 1007, 1063, 4113, 1012, 7170, 3126, 2140, 1006, 24471, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.commons/src/sap/ui/commons/RoadMapRenderer.js
function(rm, oRoadMap, oStep){ var fCreateIcon = function(rm, oRoadMap, sId, sIcon, sAdditonalClass){ rm.write("<div"); rm.writeAttribute("id", sId + "-ico"); rm.addClass("sapUiRoadMapStepIco"); if (sAdditonalClass) { rm.addClass(sAdditonalClass); } rm.writeClasses(); rm.write("></div>"); }...
javascript
function(rm, oRoadMap, oStep){ var fCreateIcon = function(rm, oRoadMap, sId, sIcon, sAdditonalClass){ rm.write("<div"); rm.writeAttribute("id", sId + "-ico"); rm.addClass("sapUiRoadMapStepIco"); if (sAdditonalClass) { rm.addClass(sAdditonalClass); } rm.writeClasses(); rm.write("></div>"); }...
[ "function", "(", "rm", ",", "oRoadMap", ",", "oStep", ")", "{", "var", "fCreateIcon", "=", "function", "(", "rm", ",", "oRoadMap", ",", "sId", ",", "sIcon", ",", "sAdditonalClass", ")", "{", "rm", ".", "write", "(", "\"<div\"", ")", ";", "rm", ".", ...
Writes the step HTML of the expandable step and its children into the rendermanger
[ "Writes", "the", "step", "HTML", "of", "the", "expandable", "step", "and", "its", "children", "into", "the", "rendermanger" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/RoadMapRenderer.js#L718-L755
train
Renders the given step
[ 30522, 3853, 1006, 28549, 1010, 20298, 4215, 2863, 2361, 1010, 9808, 2618, 2361, 1007, 1063, 13075, 4429, 29313, 28524, 1027, 3853, 1006, 28549, 1010, 20298, 4215, 2863, 2361, 1010, 15765, 1010, 14387, 2239, 1010, 6517, 23194, 16026, 26266, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
GeekyAnts/vue-native-core
packages/weex-vue-framework/factory.js
updateAttrs
function updateAttrs (oldVnode, vnode) { if (!oldVnode.data.attrs && !vnode.data.attrs) { return } var key, cur, old; var elm = vnode.elm; var oldAttrs = oldVnode.data.attrs || {}; var attrs = vnode.data.attrs || {}; // clone observed objects, as the user probably wants to mutate it if (attrs.__ob__...
javascript
function updateAttrs (oldVnode, vnode) { if (!oldVnode.data.attrs && !vnode.data.attrs) { return } var key, cur, old; var elm = vnode.elm; var oldAttrs = oldVnode.data.attrs || {}; var attrs = vnode.data.attrs || {}; // clone observed objects, as the user probably wants to mutate it if (attrs.__ob__...
[ "function", "updateAttrs", "(", "oldVnode", ",", "vnode", ")", "{", "if", "(", "!", "oldVnode", ".", "data", ".", "attrs", "&&", "!", "vnode", ".", "data", ".", "attrs", ")", "{", "return", "}", "var", "key", ",", "cur", ",", "old", ";", "var", "...
/*
[ "/", "*" ]
a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e
https://github.com/GeekyAnts/vue-native-core/blob/a7b4c9e35fe3f01d7576086f41e5e9ec6975b72e/packages/weex-vue-framework/factory.js#L4997-L5022
train
update attrs of a node
[ 30522, 3853, 10651, 19321, 2869, 1006, 2214, 16022, 10244, 1010, 1058, 3630, 3207, 1007, 1063, 2065, 1006, 999, 2214, 16022, 10244, 1012, 2951, 1012, 2012, 16344, 2015, 1004, 1004, 999, 1058, 3630, 3207, 1012, 2951, 1012, 2012, 16344, 2015,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
eslint/eslint
lib/rules/no-this-before-super.js
setInvalid
function setInvalid(node) { const segments = funcInfo.codePath.currentSegments; for (let i = 0; i < segments.length; ++i) { const segment = segments[i]; if (segment.reachable) { segInfoMap[segment.id].invalidNodes.push(node); ...
javascript
function setInvalid(node) { const segments = funcInfo.codePath.currentSegments; for (let i = 0; i < segments.length; ++i) { const segment = segments[i]; if (segment.reachable) { segInfoMap[segment.id].invalidNodes.push(node); ...
[ "function", "setInvalid", "(", "node", ")", "{", "const", "segments", "=", "funcInfo", ".", "codePath", ".", "currentSegments", ";", "for", "(", "let", "i", "=", "0", ";", "i", "<", "segments", ".", "length", ";", "++", "i", ")", "{", "const", "segme...
Sets a given node as invalid. @param {ASTNode} node - A node to set as invalid. This is one of a ThisExpression and a Super. @returns {void}
[ "Sets", "a", "given", "node", "as", "invalid", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/rules/no-this-before-super.js#L106-L116
train
set invalid node
[ 30522, 3853, 2275, 2378, 10175, 3593, 1006, 13045, 1007, 1063, 9530, 3367, 9214, 1027, 4569, 15459, 14876, 1012, 3642, 15069, 1012, 14731, 13910, 8163, 1025, 2005, 1006, 2292, 1045, 1027, 1014, 1025, 1045, 1026, 9214, 1012, 3091, 1025, 1009...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
caolan/async
lib/some.js
some
function some(coll, iteratee, callback) { return createTester(Boolean, res => res)(eachOf, coll, iteratee, callback) }
javascript
function some(coll, iteratee, callback) { return createTester(Boolean, res => res)(eachOf, coll, iteratee, callback) }
[ "function", "some", "(", "coll", ",", "iteratee", ",", "callback", ")", "{", "return", "createTester", "(", "Boolean", ",", "res", "=>", "res", ")", "(", "eachOf", ",", "coll", ",", "iteratee", ",", "callback", ")", "}" ]
Returns `true` if at least one element in the `coll` satisfies an async test. If any iteratee call returns `true`, the main `callback` is immediately called. @name some @static @memberOf module:Collections @method @alias any @category Collection @param {Array|Iterable|AsyncIterable|Object} coll - A collection to itera...
[ "Returns", "true", "if", "at", "least", "one", "element", "in", "the", "coll", "satisfies", "an", "async", "test", ".", "If", "any", "iteratee", "call", "returns", "true", "the", "main", "callback", "is", "immediately", "called", "." ]
4330d536c106592139fa82062494c9dba0da1fdb
https://github.com/caolan/async/blob/4330d536c106592139fa82062494c9dba0da1fdb/lib/some.js#L36-L38
train
Returns true if coll contains any elements of iteratee.
[ 30522, 3853, 2070, 1006, 8902, 2140, 1010, 2009, 22139, 2063, 1010, 2655, 5963, 1007, 1063, 2709, 3443, 22199, 2121, 1006, 22017, 20898, 1010, 24501, 1027, 1028, 24501, 1007, 1006, 2169, 11253, 1010, 8902, 2140, 1010, 2009, 22139, 2063, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/base/ManagedObjectObserver.js
normalizeConfiguration
function normalizeConfiguration(oObject, oConfiguration) { var oMetadata = oObject.getMetadata(), aProperties = Object.keys(oMetadata.getAllProperties()), aAggregations = Object.keys(oMetadata.getAllAggregations()), aAssociations = Object.keys(oMetadata.getAllAssociations()), aBindings = uniqueSort(aPrope...
javascript
function normalizeConfiguration(oObject, oConfiguration) { var oMetadata = oObject.getMetadata(), aProperties = Object.keys(oMetadata.getAllProperties()), aAggregations = Object.keys(oMetadata.getAllAggregations()), aAssociations = Object.keys(oMetadata.getAllAssociations()), aBindings = uniqueSort(aPrope...
[ "function", "normalizeConfiguration", "(", "oObject", ",", "oConfiguration", ")", "{", "var", "oMetadata", "=", "oObject", ".", "getMetadata", "(", ")", ",", "aProperties", "=", "Object", ".", "keys", "(", "oMetadata", ".", "getAllProperties", "(", ")", ")", ...
in case the configuration for a specific type is set to true translate this to the complete array in order not to get in trouble when deregistering properties
[ "in", "case", "the", "configuration", "for", "a", "specific", "type", "is", "set", "to", "true", "translate", "this", "to", "the", "complete", "array", "in", "order", "not", "to", "get", "in", "trouble", "when", "deregistering", "properties" ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/ManagedObjectObserver.js#L692-L708
train
Normalizes the given configuration object.
[ 30522, 3853, 3671, 4697, 8663, 8873, 27390, 3370, 1006, 1051, 16429, 20614, 1010, 1051, 8663, 8873, 27390, 3370, 1007, 1063, 13075, 18168, 12928, 2850, 2696, 1027, 1051, 16429, 20614, 1012, 2131, 11368, 8447, 2696, 1006, 1007, 1010, 19804, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dequelabs/axe-core
lib/core/utils/respondable.js
publish
function publish(source, data, keepalive) { var topic = data.topic; var subscriber = subscribers[topic]; if (subscriber) { var responder = createResponder(source, null, data.uuid); subscriber(data.message, keepalive, responder); } }
javascript
function publish(source, data, keepalive) { var topic = data.topic; var subscriber = subscribers[topic]; if (subscriber) { var responder = createResponder(source, null, data.uuid); subscriber(data.message, keepalive, responder); } }
[ "function", "publish", "(", "source", ",", "data", ",", "keepalive", ")", "{", "var", "topic", "=", "data", ".", "topic", ";", "var", "subscriber", "=", "subscribers", "[", "topic", "]", ";", "if", "(", "subscriber", ")", "{", "var", "responder", "=", ...
Publishes the "respondable" message to the appropriate subscriber @private @param {Window} source The window from which the message originated @param {Object} data The data sent with the message @param {Boolean} keepalive Whether to allow multiple responses - default is false
[ "Publishes", "the", "respondable", "message", "to", "the", "appropriate", "subscriber" ]
727323c07980e2291575f545444d389fb942906f
https://github.com/dequelabs/axe-core/blob/727323c07980e2291575f545444d389fb942906f/lib/core/utils/respondable.js#L151-L159
train
Publishes a message to a topic
[ 30522, 3853, 10172, 1006, 3120, 1010, 2951, 1010, 2562, 11475, 3726, 1007, 1063, 13075, 8476, 1027, 2951, 1012, 8476, 1025, 13075, 4942, 29234, 2099, 1027, 17073, 1031, 8476, 1033, 1025, 2065, 1006, 4942, 29234, 2099, 1007, 1063, 13075, 686...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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
check
function check(packages, opt) { let deps = []; const pkgJson = (opt) ? findPackageJson(opt.startDir) : findPackageJson(); let fileJson; if (!pkgJson) { throw new Error("Could not find a package.json file. Run 'npm init' to create one."); } try { fileJson = JSON.parse(fs.readFil...
javascript
function check(packages, opt) { let deps = []; const pkgJson = (opt) ? findPackageJson(opt.startDir) : findPackageJson(); let fileJson; if (!pkgJson) { throw new Error("Could not find a package.json file. Run 'npm init' to create one."); } try { fileJson = JSON.parse(fs.readFil...
[ "function", "check", "(", "packages", ",", "opt", ")", "{", "let", "deps", "=", "[", "]", ";", "const", "pkgJson", "=", "(", "opt", ")", "?", "findPackageJson", "(", "opt", ".", "startDir", ")", ":", "findPackageJson", "(", ")", ";", "let", "fileJson...
Check whether node modules are include in a project's package.json. @param {string[]} packages Array of node module names @param {Object} opt Options Object @param {boolean} opt.dependencies Set to true to check for direct dependencies @param {boolean} opt.devDependencies Set to t...
[ "Check", "whether", "node", "modules", "are", "include", "in", "a", "project", "s", "package", ".", "json", "." ]
bc0819c94aad14f7fad3cbc2338ea15658b0f272
https://github.com/eslint/eslint/blob/bc0819c94aad14f7fad3cbc2338ea15658b0f272/lib/util/npm-utils.js#L100-L132
train
Check if a list of packages is valid
[ 30522, 3853, 4638, 1006, 14555, 1010, 23569, 1007, 1063, 2292, 2139, 4523, 1027, 1031, 1033, 1025, 9530, 3367, 1052, 2243, 2290, 22578, 2239, 1027, 1006, 23569, 1007, 1029, 2424, 23947, 4270, 22578, 2239, 1006, 23569, 1012, 2707, 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...
statsd/statsd
stats.js
flushMetrics
function flushMetrics() { var time_stamp = Math.round(new Date().getTime() / 1000); if (old_timestamp > 0) { gauges[timestamp_lag_namespace] = (time_stamp - old_timestamp - (Number(conf.flushInterval)/1000)); } old_timestamp = time_stamp; var metrics_hash = { counters: counters, gauges: gauges, ...
javascript
function flushMetrics() { var time_stamp = Math.round(new Date().getTime() / 1000); if (old_timestamp > 0) { gauges[timestamp_lag_namespace] = (time_stamp - old_timestamp - (Number(conf.flushInterval)/1000)); } old_timestamp = time_stamp; var metrics_hash = { counters: counters, gauges: gauges, ...
[ "function", "flushMetrics", "(", ")", "{", "var", "time_stamp", "=", "Math", ".", "round", "(", "new", "Date", "(", ")", ".", "getTime", "(", ")", "/", "1000", ")", ";", "if", "(", "old_timestamp", ">", "0", ")", "{", "gauges", "[", "timestamp_lag_na...
Flush metrics to each backend.
[ "Flush", "metrics", "to", "each", "backend", "." ]
ef8e4d76d76c3a0cf771e3724cf79ea22f3c50d9
https://github.com/statsd/statsd/blob/ef8e4d76d76c3a0cf771e3724cf79ea22f3c50d9/stats.js#L72-L159
train
Flush metrics to the backend
[ 30522, 3853, 13862, 12589, 2015, 1006, 1007, 1063, 13075, 2051, 1035, 11359, 1027, 8785, 1012, 2461, 1006, 2047, 3058, 1006, 1007, 1012, 2131, 7292, 1006, 1007, 1013, 6694, 1007, 1025, 2065, 1006, 2214, 1035, 2335, 15464, 2361, 1028, 1014, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
vuejs/vue-devtools
src/devtools/index.js
initApp
function initApp (shell) { shell.connect(bridge => { window.bridge = bridge if (Vue.prototype.hasOwnProperty('$shared')) { destroySharedData() } else { Object.defineProperty(Vue.prototype, '$shared', { get: () => SharedData }) } initSharedData({ bridge, Vue,...
javascript
function initApp (shell) { shell.connect(bridge => { window.bridge = bridge if (Vue.prototype.hasOwnProperty('$shared')) { destroySharedData() } else { Object.defineProperty(Vue.prototype, '$shared', { get: () => SharedData }) } initSharedData({ bridge, Vue,...
[ "function", "initApp", "(", "shell", ")", "{", "shell", ".", "connect", "(", "bridge", "=>", "{", "window", ".", "bridge", "=", "bridge", "if", "(", "Vue", ".", "prototype", ".", "hasOwnProperty", "(", "'$shared'", ")", ")", "{", "destroySharedData", "("...
Connect then init the app. We need to reconnect on every reload, because a new backend will be injected. @param {Object} shell
[ "Connect", "then", "init", "the", "app", ".", "We", "need", "to", "reconnect", "on", "every", "reload", "because", "a", "new", "backend", "will", "be", "injected", "." ]
4de4b86388453cd07f0c1bf967d43a4dd4b011c9
https://github.com/vuejs/vue-devtools/blob/4de4b86388453cd07f0c1bf967d43a4dd4b011c9/src/devtools/index.js#L87-L237
train
Initialize the app
[ 30522, 3853, 1999, 6590, 9397, 1006, 5806, 1007, 1063, 5806, 1012, 7532, 1006, 2958, 1027, 1028, 1063, 3332, 1012, 2958, 1027, 2958, 2065, 1006, 24728, 2063, 1012, 8773, 1012, 2038, 12384, 21572, 4842, 3723, 1006, 1005, 1002, 4207, 1005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
angular/material
src/components/autocomplete/js/autocompleteParentScopeDirective.js
connectScopes
function connectScopes() { var scopeDigesting = false; var newScopeDigesting = false; scope.$watch(function() { if (newScopeDigesting || scopeDigesting) { return; } scopeDigesting = true; scope.$$postDigest(function() { if (!newSc...
javascript
function connectScopes() { var scopeDigesting = false; var newScopeDigesting = false; scope.$watch(function() { if (newScopeDigesting || scopeDigesting) { return; } scopeDigesting = true; scope.$$postDigest(function() { if (!newSc...
[ "function", "connectScopes", "(", ")", "{", "var", "scopeDigesting", "=", "false", ";", "var", "newScopeDigesting", "=", "false", ";", "scope", ".", "$watch", "(", "function", "(", ")", "{", "if", "(", "newScopeDigesting", "||", "scopeDigesting", ")", "{", ...
Creates watchers on scope and newScope that ensure that for any $digest of scope, newScope is also $digested.
[ "Creates", "watchers", "on", "scope", "and", "newScope", "that", "ensure", "that", "for", "any", "$digest", "of", "scope", "newScope", "is", "also", "$digested", "." ]
84ac558674e73958be84312444c48d9f823f6684
https://github.com/angular/material/blob/84ac558674e73958be84312444c48d9f823f6684/src/components/autocomplete/js/autocompleteParentScopeDirective.js#L50-L72
train
Connect scopes to the new scope
[ 30522, 3853, 8539, 16186, 2015, 1006, 1007, 1063, 13075, 9531, 4305, 8449, 3436, 1027, 6270, 1025, 13075, 2739, 16186, 4305, 8449, 3436, 1027, 6270, 1025, 9531, 1012, 1002, 3422, 1006, 3853, 1006, 1007, 1063, 2065, 1006, 2739, 16186, 4305, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
SAP/openui5
src/sap.ui.core/src/sap/ui/core/Configuration.js
function(sAnimationMode) { checkEnum(Configuration.AnimationMode, sAnimationMode, "animationMode"); // Set the animation to on or off depending on the animation mode to ensure backward compatibility. this.animation = (sAnimationMode !== Configuration.AnimationMode.minimal && sAnimationMode !== Configuration.A...
javascript
function(sAnimationMode) { checkEnum(Configuration.AnimationMode, sAnimationMode, "animationMode"); // Set the animation to on or off depending on the animation mode to ensure backward compatibility. this.animation = (sAnimationMode !== Configuration.AnimationMode.minimal && sAnimationMode !== Configuration.A...
[ "function", "(", "sAnimationMode", ")", "{", "checkEnum", "(", "Configuration", ".", "AnimationMode", ",", "sAnimationMode", ",", "\"animationMode\"", ")", ";", "// Set the animation to on or off depending on the animation mode to ensure backward compatibility.", "this", ".", "...
Sets the current animation mode. Expects an animation mode as string and validates it. If a wrong animation mode was set, an error is thrown. If the mode is valid it is set, then the attributes <code>data-sap-ui-animation</code> and <code>data-sap-ui-animation-mode</code> of the HTML document root element are also upd...
[ "Sets", "the", "current", "animation", "mode", "." ]
8a832fca01cb1cdf8df589788e0c5723e2a33c70
https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Configuration.js#L1016-L1027
train
Sets the animation mode of the control.
[ 30522, 3853, 1006, 2624, 9581, 3508, 5302, 3207, 1007, 1063, 4638, 2368, 2819, 1006, 9563, 1012, 7284, 5302, 3207, 1010, 2624, 9581, 3508, 5302, 3207, 1010, 1000, 7284, 5302, 3207, 1000, 1007, 1025, 1013, 1013, 2275, 1996, 7284, 2000, 200...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
aframevr/aframe
src/components/text.js
function () { var data = this.data; var el = this.el; var fontSrc; var geometry = this.geometry; var self = this; if (!data.font) { warn('No font specified. Using the default font.'); } // Make invisible during font swap. this.mesh.visible = false; // Look up font URL to use, and ...
javascript
function () { var data = this.data; var el = this.el; var fontSrc; var geometry = this.geometry; var self = this; if (!data.font) { warn('No font specified. Using the default font.'); } // Make invisible during font swap. this.mesh.visible = false; // Look up font URL to use, and ...
[ "function", "(", ")", "{", "var", "data", "=", "this", ".", "data", ";", "var", "el", "=", "this", ".", "el", ";", "var", "fontSrc", ";", "var", "geometry", "=", "this", ".", "geometry", ";", "var", "self", "=", "this", ";", "if", "(", "!", "da...
Load font for geometry, load font image for material, and apply.
[ "Load", "font", "for", "geometry", "load", "font", "image", "for", "material", "and", "apply", "." ]
24acc78a7299a4cdfe3ef617f4d40ddf6275c992
https://github.com/aframevr/aframe/blob/24acc78a7299a4cdfe3ef617f4d40ddf6275c992/src/components/text.js#L194-L249
train
Update the geometry and layout
[ 30522, 3853, 1006, 1007, 1063, 13075, 2951, 1027, 2023, 1012, 2951, 1025, 13075, 3449, 1027, 2023, 1012, 30524, 15489, 9675, 1012, 2478, 1996, 12398, 15489, 1012, 1005, 1007, 1025, 1065, 1013, 1013, 2191, 8841, 2076, 15489, 19948, 1012, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/utils/ExtensionLoader.js
loadExtension
function loadExtension(name, config, entryPoint) { var promise = new $.Deferred(); // Try to load the package.json to figure out if we are loading a theme. ExtensionUtils.loadMetadata(config.baseUrl).always(promise.resolve); return promise .then(function (metadata) { ...
javascript
function loadExtension(name, config, entryPoint) { var promise = new $.Deferred(); // Try to load the package.json to figure out if we are loading a theme. ExtensionUtils.loadMetadata(config.baseUrl).always(promise.resolve); return promise .then(function (metadata) { ...
[ "function", "loadExtension", "(", "name", ",", "config", ",", "entryPoint", ")", "{", "var", "promise", "=", "new", "$", ".", "Deferred", "(", ")", ";", "// Try to load the package.json to figure out if we are loading a theme.", "ExtensionUtils", ".", "loadMetadata", ...
Loads the extension that lives at baseUrl into its own Require.js context @param {!string} name, used to identify the extension @param {!{baseUrl: string}} config object with baseUrl property containing absolute path of extension @param {!string} entryPoint, name of the main js file to load @return {!$.Promise} A prom...
[ "Loads", "the", "extension", "that", "lives", "at", "baseUrl", "into", "its", "own", "Require", ".", "js", "context" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/utils/ExtensionLoader.js#L248-L276
train
Load an extension module
[ 30522, 3853, 7170, 10288, 29048, 1006, 2171, 1010, 9530, 8873, 2290, 1010, 4443, 8400, 1007, 1063, 13075, 4872, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1025, 1013, 1013, 3046, 2000, 7170, 1996, 7427, 1012, 1046, 3385, 2000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
firebase/firebase-js-sdk
packages/auth/demo/public/script.js
onSignInWithCustomToken
function onSignInWithCustomToken(event) { // The token can be directly specified on the html element. var token = $('#user-custom-token').val(); auth.signInWithCustomToken(token) .then(onAuthUserCredentialSuccess, onAuthError); }
javascript
function onSignInWithCustomToken(event) { // The token can be directly specified on the html element. var token = $('#user-custom-token').val(); auth.signInWithCustomToken(token) .then(onAuthUserCredentialSuccess, onAuthError); }
[ "function", "onSignInWithCustomToken", "(", "event", ")", "{", "// The token can be directly specified on the html element.", "var", "token", "=", "$", "(", "'#user-custom-token'", ")", ".", "val", "(", ")", ";", "auth", ".", "signInWithCustomToken", "(", "token", ")"...
Signs in with a custom token. @param {DOMEvent} event HTML DOM event returned by the listener.
[ "Signs", "in", "with", "a", "custom", "token", "." ]
491598a499813dacc23724de5e237ec220cc560e
https://github.com/firebase/firebase-js-sdk/blob/491598a499813dacc23724de5e237ec220cc560e/packages/auth/demo/public/script.js#L373-L379
train
Signs in with a custom token
[ 30522, 3853, 2006, 5332, 29076, 2078, 24415, 7874, 20389, 18715, 2368, 1006, 2724, 1007, 1063, 1013, 1013, 1996, 19204, 2064, 2022, 3495, 9675, 2006, 1996, 16129, 5783, 1012, 13075, 19204, 1027, 1002, 1006, 1005, 1001, 5310, 1011, 7661, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/extensions/default/NavigationAndHistory/NavigationProvider.js
_validateFrame
function _validateFrame(entry) { var deferred = new $.Deferred(), fileEntry = FileSystem.getFileForPath(entry.filePath); if (entry.inMem) { var indexInWS = MainViewManager.findInWorkingSet(entry.paneId, entry.filePath); // Remove entry if InMemoryFile is not found in...
javascript
function _validateFrame(entry) { var deferred = new $.Deferred(), fileEntry = FileSystem.getFileForPath(entry.filePath); if (entry.inMem) { var indexInWS = MainViewManager.findInWorkingSet(entry.paneId, entry.filePath); // Remove entry if InMemoryFile is not found in...
[ "function", "_validateFrame", "(", "entry", ")", "{", "var", "deferred", "=", "new", "$", ".", "Deferred", "(", ")", ",", "fileEntry", "=", "FileSystem", ".", "getFileForPath", "(", "entry", ".", "filePath", ")", ";", "if", "(", "entry", ".", "inMem", ...
Function to check existence of a file entry, validity of markers @private
[ "Function", "to", "check", "existence", "of", "a", "file", "entry", "validity", "of", "markers" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/extensions/default/NavigationAndHistory/NavigationProvider.js#L98-L128
train
Validate a frame
[ 30522, 3853, 1035, 9398, 3686, 15643, 1006, 4443, 1007, 1063, 13075, 13366, 28849, 2094, 1027, 2047, 1002, 1012, 13366, 28849, 2094, 1006, 1007, 1010, 5371, 4765, 2854, 1027, 6764, 27268, 6633, 1012, 2131, 8873, 2571, 29278, 15069, 1006, 44...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
goldfire/howler.js
dist/howler.js
function() { var self = this; var parent = self._parent; // Round up the duration to account for the lower precision in HTML5 Audio. parent._duration = Math.ceil(self._node.duration * 10) / 10; // Setup a sprite if none is defined. if (Object.keys(parent._sprite).length === 0) { ...
javascript
function() { var self = this; var parent = self._parent; // Round up the duration to account for the lower precision in HTML5 Audio. parent._duration = Math.ceil(self._node.duration * 10) / 10; // Setup a sprite if none is defined. if (Object.keys(parent._sprite).length === 0) { ...
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "var", "parent", "=", "self", ".", "_parent", ";", "// Round up the duration to account for the lower precision in HTML5 Audio.", "parent", ".", "_duration", "=", "Math", ".", "ceil", "(", "self", ".", ...
HTML5 Audio canplaythrough listener callback.
[ "HTML5", "Audio", "canplaythrough", "listener", "callback", "." ]
030db918dd8ce640afd57e172418472497e8f113
https://github.com/goldfire/howler.js/blob/030db918dd8ce640afd57e172418472497e8f113/dist/howler.js#L2270-L2290
train
Load the audio.
[ 30522, 3853, 1006, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 13075, 6687, 1027, 2969, 1012, 1035, 6687, 1025, 1013, 1013, 2461, 2039, 1996, 9367, 2000, 4070, 2005, 1996, 2896, 11718, 1999, 16129, 2629, 5746, 1012, 6687, 1012, 1035, 9367, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -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/plugins/react-native.js
urlencode
function urlencode(obj) { var pairs = []; for (var key in obj) { if ({}.hasOwnProperty.call(obj, key)) pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])); } return pairs.join('&'); }
javascript
function urlencode(obj) { var pairs = []; for (var key in obj) { if ({}.hasOwnProperty.call(obj, key)) pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])); } return pairs.join('&'); }
[ "function", "urlencode", "(", "obj", ")", "{", "var", "pairs", "=", "[", "]", ";", "for", "(", "var", "key", "in", "obj", ")", "{", "if", "(", "{", "}", ".", "hasOwnProperty", ".", "call", "(", "obj", ",", "key", ")", ")", "pairs", ".", "push",...
Extract key/value pairs from an object and encode them for use in a query string
[ "Extract", "key", "/", "value", "pairs", "from", "an", "object", "and", "encode", "them", "for", "use", "in", "a", "query", "string" ]
a872223343fecf7364473b78bede937f1eb57bd0
https://github.com/getsentry/sentry-javascript/blob/a872223343fecf7364473b78bede937f1eb57bd0/packages/raven-js/plugins/react-native.js#L45-L52
train
Encode an object to a string
[ 30522, 3853, 24471, 7770, 16044, 30524, 1006, 3145, 1007, 1009, 1005, 1027, 1005, 1009, 4372, 16044, 9496, 9006, 29513, 3372, 1006, 27885, 3501, 1031, 3145, 1033, 1007, 1007, 1025, 1065, 2709, 7689, 1012, 3693, 1006, 1005, 1004, 1005, 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...
adobe/brackets
src/languageTools/LanguageClient/ProtocolAdapter.js
initialize
function initialize(connection, params) { var rootPath = params.rootPath, workspaceFolders = params.rootPaths; if(!rootPath && workspaceFolders && Array.isArray(workspaceFolders)) { rootPath = workspaceFolders[0]; } if (!workspaceFolders) { workspaceFolders = [rootPath]; } ...
javascript
function initialize(connection, params) { var rootPath = params.rootPath, workspaceFolders = params.rootPaths; if(!rootPath && workspaceFolders && Array.isArray(workspaceFolders)) { rootPath = workspaceFolders[0]; } if (!workspaceFolders) { workspaceFolders = [rootPath]; } ...
[ "function", "initialize", "(", "connection", ",", "params", ")", "{", "var", "rootPath", "=", "params", ".", "rootPath", ",", "workspaceFolders", "=", "params", ".", "rootPaths", ";", "if", "(", "!", "rootPath", "&&", "workspaceFolders", "&&", "Array", ".", ...
Server commands
[ "Server", "commands" ]
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/languageTools/LanguageClient/ProtocolAdapter.js#L283-L308
train
Initialize the application
[ 30522, 3853, 3988, 4697, 1006, 4434, 1010, 11498, 5244, 1007, 1063, 13075, 7117, 15069, 1027, 11498, 5244, 1012, 7117, 15069, 1010, 2573, 15327, 10371, 2545, 1027, 11498, 5244, 1012, 7117, 15069, 2015, 1025, 2065, 1006, 999, 7117, 15069, 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...
nodejs/node-gyp
lib/configure.js
findPython
function findPython() { const SKIP=0, FAIL=1 const toCheck = [ { before: () => { if (!this.configPython) { this.addLog( 'Python is not set from command line or npm configuration') return SKIP } this.addLog('checking Python explici...
javascript
function findPython() { const SKIP=0, FAIL=1 const toCheck = [ { before: () => { if (!this.configPython) { this.addLog( 'Python is not set from command line or npm configuration') return SKIP } this.addLog('checking Python explici...
[ "function", "findPython", "(", ")", "{", "const", "SKIP", "=", "0", ",", "FAIL", "=", "1", "const", "toCheck", "=", "[", "{", "before", ":", "(", ")", "=>", "{", "if", "(", "!", "this", ".", "configPython", ")", "{", "this", ".", "addLog", "(", ...
Find Python by trying a sequence of possibilities. Ignore errors, keep trying until Python is found.
[ "Find", "Python", "by", "trying", "a", "sequence", "of", "possibilities", ".", "Ignore", "errors", "keep", "trying", "until", "Python", "is", "found", "." ]
721eb691cf15556cc2700eda0558d5bad5f84232
https://github.com/nodejs/node-gyp/blob/721eb691cf15556cc2700eda0558d5bad5f84232/lib/configure.js#L398-L484
train
Find Python in the current directory
[ 30522, 3853, 2424, 7685, 2705, 2239, 1006, 1007, 1063, 9530, 3367, 13558, 1027, 1014, 1010, 8246, 1027, 1015, 9530, 3367, 2000, 5403, 3600, 1027, 1031, 1063, 2077, 1024, 1006, 1007, 1027, 1028, 1063, 2065, 1006, 999, 2023, 1012, 9530, 887...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adobe/brackets
src/language/HTMLDOMDiff.js
function (beforeID, isBeingDeleted) { newEdits.forEach(function (edit) { // elementDeletes don't need any positioning information if (edit.type !== "elementDelete") { edit.beforeID = beforeID; } }); edits.push.apply(...
javascript
function (beforeID, isBeingDeleted) { newEdits.forEach(function (edit) { // elementDeletes don't need any positioning information if (edit.type !== "elementDelete") { edit.beforeID = beforeID; } }); edits.push.apply(...
[ "function", "(", "beforeID", ",", "isBeingDeleted", ")", "{", "newEdits", ".", "forEach", "(", "function", "(", "edit", ")", "{", "// elementDeletes don't need any positioning information", "if", "(", "edit", ".", "type", "!==", "\"elementDelete\"", ")", "{", "edi...
We initially put new edit objects into the `newEdits` array so that we can fix them up with proper positioning information. This function is responsible for doing that fixup. The `beforeID` that appears in many edits tells the browser to make the change before the element with the given ID. In other words, an elementI...
[ "We", "initially", "put", "new", "edit", "objects", "into", "the", "newEdits", "array", "so", "that", "we", "can", "fix", "them", "up", "with", "proper", "positioning", "information", ".", "This", "function", "is", "responsible", "for", "doing", "that", "fix...
d5d00d43602c438266d32b8eda8f8a3ca937b524
https://github.com/adobe/brackets/blob/d5d00d43602c438266d32b8eda8f8a3ca937b524/src/language/HTMLDOMDiff.js#L131-L149
train
This function is called when the node is being deleted
[ 30522, 3853, 1006, 2077, 3593, 1010, 2003, 19205, 3070, 9247, 12870, 2094, 1007, 1063, 2047, 2098, 12762, 1012, 18921, 6776, 1006, 3853, 1006, 10086, 1007, 1063, 1013, 1013, 5783, 9247, 12870, 2015, 2123, 1005, 1056, 2342, 2151, 19120, 2592...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dcloudio/mui
examples/hello-mui/js/mui.imageViewer.js
function() { var self = this; self.viewer = $.dom("<div class='mui-imageviewer'><div class='mui-imageviewer-mask'></div><div class='mui-imageviewer-header'><i class='mui-icon mui-icon-closeempty mui-imageviewer-close'></i><span class='mui-imageviewer-state'></span></div><i class='mui-icon mui-icon-arrowleft mui-...
javascript
function() { var self = this; self.viewer = $.dom("<div class='mui-imageviewer'><div class='mui-imageviewer-mask'></div><div class='mui-imageviewer-header'><i class='mui-icon mui-icon-closeempty mui-imageviewer-close'></i><span class='mui-imageviewer-state'></span></div><i class='mui-icon mui-icon-arrowleft mui-...
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "self", ".", "viewer", "=", "$", ".", "dom", "(", "\"<div class='mui-imageviewer'><div class='mui-imageviewer-mask'></div><div class='mui-imageviewer-header'><i class='mui-icon mui-icon-closeempty mui-imageviewer-close'></...
创建图片预览组件的整体 UI
[ "创建图片预览组件的整体", "UI" ]
ff74c90a1671a552f3604b1288bf38a4126312d0
https://github.com/dcloudio/mui/blob/ff74c90a1671a552f3604b1288bf38a4126312d0/examples/hello-mui/js/mui.imageViewer.js#L52-L63
train
Creates the image viewer element
[ 30522, 3853, 1006, 1007, 1063, 13075, 2969, 1027, 2023, 1025, 2969, 1012, 13972, 1027, 1002, 1012, 14383, 1006, 1000, 1026, 4487, 2615, 2465, 30524, 1011, 3746, 8584, 2121, 1011, 7308, 1005, 1028, 1026, 1013, 4487, 2615, 1028, 1026, 4487, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
TryGhost/Ghost
core/server/web/shared/middlewares/api/cors.js
handleCORS
function handleCORS(req, cb) { const origin = req.get('origin'); const trustedDomains = req.client && req.client.trustedDomains; // Request must have an Origin header if (!origin) { return cb(null, DISABLE_CORS); } // Origin matches a client_trusted_domain if (some(trustedDomains, ...
javascript
function handleCORS(req, cb) { const origin = req.get('origin'); const trustedDomains = req.client && req.client.trustedDomains; // Request must have an Origin header if (!origin) { return cb(null, DISABLE_CORS); } // Origin matches a client_trusted_domain if (some(trustedDomains, ...
[ "function", "handleCORS", "(", "req", ",", "cb", ")", "{", "const", "origin", "=", "req", ".", "get", "(", "'origin'", ")", ";", "const", "trustedDomains", "=", "req", ".", "client", "&&", "req", ".", "client", ".", "trustedDomains", ";", "// Request mus...
Checks the origin and enables/disables CORS headers in the response. @param {Object} req express request object. @param {Function} cb callback that configures CORS. @return {null}
[ "Checks", "the", "origin", "and", "enables", "/", "disables", "CORS", "headers", "in", "the", "response", "." ]
bb7bb55cf3e60af99ebbc56099928827b58461bc
https://github.com/TryGhost/Ghost/blob/bb7bb55cf3e60af99ebbc56099928827b58461bc/core/server/web/shared/middlewares/api/cors.js#L67-L87
train
Handle CORS requests
[ 30522, 3853, 5047, 27108, 2015, 1006, 2128, 4160, 1010, 17324, 1007, 1063, 9530, 3367, 4761, 1027, 2128, 4160, 1012, 2131, 1006, 1005, 4761, 1005, 1007, 1025, 9530, 3367, 9480, 9527, 28247, 1027, 2128, 4160, 1012, 7396, 1004, 1004, 2128, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
graphql/graphql-js
src/validation/rules/FieldsOnCorrectType.js
getSuggestedTypeNames
function getSuggestedTypeNames( schema: GraphQLSchema, type: GraphQLOutputType, fieldName: string, ): Array<string> { if (isAbstractType(type)) { const suggestedObjectTypes = []; const interfaceUsageCount = Object.create(null); for (const possibleType of schema.getPossibleTypes(type)) { if (!p...
javascript
function getSuggestedTypeNames( schema: GraphQLSchema, type: GraphQLOutputType, fieldName: string, ): Array<string> { if (isAbstractType(type)) { const suggestedObjectTypes = []; const interfaceUsageCount = Object.create(null); for (const possibleType of schema.getPossibleTypes(type)) { if (!p...
[ "function", "getSuggestedTypeNames", "(", "schema", ":", "GraphQLSchema", ",", "type", ":", "GraphQLOutputType", ",", "fieldName", ":", "string", ",", ")", ":", "Array", "<", "string", ">", "{", "if", "(", "isAbstractType", "(", "type", ")", ")", "{", "con...
Go through all of the implementations of type, as well as the interfaces that they implement. If any of those types include the provided field, suggest them, sorted by how often the type is referenced, starting with Interfaces.
[ "Go", "through", "all", "of", "the", "implementations", "of", "type", "as", "well", "as", "the", "interfaces", "that", "they", "implement", ".", "If", "any", "of", "those", "types", "include", "the", "provided", "field", "suggest", "them", "sorted", "by", ...
b65ff6db8893c1c68f0f236c4b2d663e6c55f5ef
https://github.com/graphql/graphql-js/blob/b65ff6db8893c1c68f0f236c4b2d663e6c55f5ef/src/validation/rules/FieldsOnCorrectType.js#L91-L126
train
Get the names of all types that are not declared in the given field.
[ 30522, 3853, 4152, 15916, 8449, 3064, 13874, 18442, 2015, 1006, 8040, 28433, 1024, 10629, 4160, 4877, 5403, 2863, 1010, 2828, 1024, 10629, 4160, 23743, 25856, 4904, 13874, 1010, 2492, 18442, 1024, 5164, 1010, 1007, 1024, 9140, 1026, 5164, 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...