Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Cross product of 2dimension vector.
function crossProduct2d(x1, y1, x2, y2) { return x1 * y2 - x2 * y1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cross(vector) {\n return this.x * vector.y - this.y * vector.x;\n }", "function vectorCross(a, b) {\n\treturn a[1] * b[0] - a[0] * b[1];\n}", "function crossProduct(v1, v2) {\n\tv1 = normalize(v1);\n\tv2 = normalize(v2);\n\t//since there is no third value for our cross product\n\t//the first two valu...
[ "0.8105056", "0.7969165", "0.7792815", "0.7764431", "0.7728677", "0.7721227", "0.7489951", "0.7410925", "0.7403788", "0.73464704", "0.73050904", "0.7237468", "0.71610963", "0.7078378", "0.6941377", "0.692329", "0.6843428", "0.6795426", "0.6772333", "0.669017", "0.669017", "...
0.6476975
27
globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.option...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}", "extend(config, ctx) {\n // if (process.server && process.browser) {\n if (...
[ "0.5848589", "0.5729015", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "...
0.0
-1
let currentDir = "auto";
function hasDocument() { return typeof document !== "undefined"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cwd () {\n return cwd;\n }", "function exampleDir(str) {\n return str;\n}", "cwd () {\n return process.cwd();\n }", "function Dir() {\r\n}", "getCurrentDirectory(fileName, insertedPath) {\r\n var currentDir = path.parse(fileName).dir || '/';\r\n var workspacePath = vs.workspa...
[ "0.6831368", "0.67260396", "0.67150533", "0.6701903", "0.65333325", "0.64703685", "0.64260054", "0.6382812", "0.63281953", "0.62673515", "0.62585634", "0.6241655", "0.6218426", "0.61647767", "0.61473507", "0.6116313", "0.6057289", "0.6008112", "0.598121", "0.5951867", "0.5949...
0.0
-1
Adapted from convertsourcemap (MIT)
function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractSourceMap(fs, logger, file) {\n var inline = convert_source_map_1.commentRegex.test(file.text);\n var external = convert_source_map_1.mapFileCommentRegex.exec(file.text);\n if (inline) {\n var inlineSourceMap = convert_source_map_1.fromSource(file.text);\n ...
[ "0.6965976", "0.6937916", "0.67651826", "0.6441334", "0.63273764", "0.6297531", "0.6254359", "0.6210628", "0.61928856", "0.61809653", "0.6173767", "0.61589617", "0.61589617", "0.61589617", "0.6155463", "0.6095343", "0.6039304", "0.5988538", "0.5979952", "0.5978704", "0.597840...
0.0
-1
globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.option...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}", "extend(config, ctx) {\n // if (process.server && process.browser) {\n if (...
[ "0.58472276", "0.5728634", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396",...
0.0
-1
CONCATENATED MODULE: ./node_modules/vuestyleloader/lib/listToStyles.js Translates the list format produced by cssloader into something easier to manipulate.
function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: medi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id...
[ "0.6931754" ]
0.0
-1
Compact an item in the layout.
function compactItem(compareWith /*: Layout*/ , l /*: LayoutItem*/ , verticalCompact /*: boolean*/ ) /*: LayoutItem*/ { if (verticalCompact) { // Move the element up as far as it can go without colliding. while (l.y > 0 && !getFirstCollision(compareWith, l)) { l.y--; } } // Move it down, and keep ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compactItem(compareWith\n/*: Layout*/\n, l\n/*: LayoutItem*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n, fullLayout\n/*: Layout*/\n)\n/*: LayoutItem*/\n{\n var compactV = compactType === \"vertical\";\n var compactH = compactType === \"horizontal\";\n\n if (compactV) {\n // Bottom 'y'...
[ "0.65435094", "0.6205933", "0.6028729", "0.58313006", "0.563084", "0.543494", "0.5427491", "0.53059065", "0.52136564", "0.5196293", "0.5195224", "0.5178401", "0.5178401", "0.5178401", "0.50718397", "0.4988913", "0.4960946", "0.49316293", "0.49251086", "0.4842231", "0.48367047...
0.6573985
1
Test for the element that's "above" all other qualifiers
function indexOfDeepestElement(elements) { let deepestNodeParents = []; let deepestNodeIndex; for (let i = 0; i < elements.length; i++) { const currentNode = elements[i]; const deepestNode = elements[deepestNodeIndex]; // node may appear in elements array multiple times if (!currentNode || i === dee...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function above(a, curr){\n\tvar minH = a.self.minHeight/2; //makes function less sensitive\n\tif( (a.top + a.h - minH ) <= curr.top){\n\t\tif(curr.top <= (a.top + a.h + minH ) ){\n\t\t\treturn true;\n\t\t}\n\t} \n\treturn false;\n}", "aboveView(element) {\n const br = this.getBoundingClientRect(element);\n ...
[ "0.63345236", "0.60817", "0.60250175", "0.5881726", "0.5856268", "0.5846907", "0.5846907", "0.5841965", "0.5841965", "0.5841965", "0.5841965", "0.5841965", "0.5829468", "0.58091694", "0.5791276", "0.5791276", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", ...
0.0
-1
Don't call any other listeners (even on the current target)
stopPropagation() { this.propagationStopped = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitNone(handler, isFn, self) {\n if (isFn) handler.call(self);else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n\n for (var i = 0; i < len; ++i) listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n han...
[ "0.6393755", "0.63129365", "0.63129365", "0.63129365", "0.6291394", "0.6291394", "0.6291394", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.62762684", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.6186...
0.0
-1
Don't call listeners on the remaining targets
stopImmediatePropagation() { this.immediatePropagationStopped = this.propagationStopped = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "disableAll()\n {\n let targets = doc...
[ "0.6190093", "0.6190093", "0.6190093", "0.6154329", "0.60922897", "0.6044791", "0.5960415", "0.5938747", "0.59332216", "0.5925244", "0.58966786", "0.5896583", "0.58711004", "0.58709276", "0.58499765", "0.5828798", "0.5828798", "0.5828798", "0.5821923", "0.5820081", "0.5820081...
0.0
-1
Don't call listeners on the remaining targets
stopImmediatePropagation() { this.immediatePropagationStopped = this.propagationStopped = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "disableAll()\n {\n let targets = doc...
[ "0.6191328", "0.6191328", "0.6191328", "0.6153781", "0.60927093", "0.60443074", "0.5960602", "0.59406245", "0.59342444", "0.5926158", "0.5896547", "0.58947796", "0.58716375", "0.5871608", "0.5848864", "0.5830736", "0.5830736", "0.5830736", "0.5820654", "0.58190036", "0.581900...
0.0
-1
Don't call any other listeners (even on the current target)
stopPropagation() { this.propagationStopped = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitNone(handler, isFn, self) {\n if (isFn) handler.call(self);else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n\n for (var i = 0; i < len; ++i) listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n han...
[ "0.6393755", "0.63129365", "0.63129365", "0.63129365", "0.6291394", "0.6291394", "0.6291394", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.62762684", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.6186...
0.0
-1
Remove this interactable from the list of interactables and remove it's action capabilities and event listeners
unset() { if (is.string(this.target)) { // remove delegated events for (const type in this._scopeEvents.delegatedEvents) { const delegated = this._scopeEvents.delegatedEvents[type]; for (let i = delegated.length - 1; i >= 0; i--) { const { selector, con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeInteractables(type) {\n console.log(\"remove interactables\");\n switch (type) {\n case \"visible\":\n if (currentInteractables.length != null) {\n console.log(`CURRENT INTERACTABLES: ${currentInteractables}`);\n currentInteractables.forEach((object) => {\n canvas.re...
[ "0.7001901", "0.6090667", "0.6058484", "0.5875442", "0.58519256", "0.5830807", "0.5759036", "0.5724558", "0.5636188", "0.56281585", "0.562698", "0.56256896", "0.56230146", "0.56032354", "0.559707", "0.559707", "0.5593645", "0.55921054", "0.55734605", "0.55620927", "0.55593055...
0.537152
46
listener is added to a selector interactable
function delegateListener(event, optionalArg) { const options = getOptions(optionalArg); const fakeEvent = new events_FakeEvent(event); const delegates = delegatedEvents[event.type]; const [eventTarget] = getEventTargets(event); let element = eventTarget; // climb up document tree looking for select...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addEventListeners() {\n\n if (this._isNative) {\n this.selectEl.addEventListener('change', this._onInputBound);\n }\n else {\n this.el.addEventListener('change', this._onInputBound, true);\n }\n }", "function evtListener() {\n debug(\"evtListener\");\n cards().forEach(functi...
[ "0.5952788", "0.59171784", "0.5897984", "0.5820845", "0.58073854", "0.5802608", "0.579302", "0.5788796", "0.57814574", "0.575411", "0.57522446", "0.5751956", "0.575139", "0.5744832", "0.5704703", "0.56829983", "0.5673291", "0.5646245", "0.56339574", "0.5618962", "0.5603665", ...
0.0
-1
current interactable being interacted with the target element of the interactable action that's ready to be fired on next move event keep track of added pointers pointerdown/mousedown/touchstart event previous action event
get pointerMoveTolerance() { return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CALCULATE_TOUCH_MOVE_OR_MOUSE_MOVE() {\r\n \r\n \r\n \r\n for (var x=0;x<BUTTONS.length;x++){\r\n if ( GLOBAL_CLICK.x > BUTTONS[x].POSITION.x && GLOBAL_CLICK.x <BUTTONS[x].POSITION.x + BUTTONS[x].DIMENSIONS.W() && GLOBAL_CLICK.y > BUTTONS[x].POSITION.y && GLOBAL_CLICK.y < BUTTONS[x].POSITION.y + BU...
[ "0.5791472", "0.57093066", "0.568867", "0.5663701", "0.56410915", "0.56410915", "0.56216997", "0.5593309", "0.55707467", "0.55111164", "0.54097223", "0.5368448", "0.535868", "0.53511286", "0.53463584", "0.53431356", "0.5328726", "0.5306402", "0.5305406", "0.52978545", "0.5291...
0.0
-1
End interact move events and stop autoscroll unless simulation is running
pointerUp(pointer, event, eventTarget, curEventTarget) { let pointerIndex = this.getPointerIndex(pointer); if (pointerIndex === -1) { pointerIndex = this.updatePointer(pointer, event, eventTarget, false); } const type = /cancel$/i.test(event.type) ? 'cancel' : 'up'; this._scopeFire(`interac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableInteraction() {\n moving = true;\n setTimeout(function () {\n moving = false;\n }, 500);\n }", "function end(event) {\n\t\t\t_moving = false;\n\t\t}", "function move(e) {\n if (!cancel) {\n var coords = getCoords(e);\n ...
[ "0.6462806", "0.643455", "0.6312569", "0.6301088", "0.6256901", "0.62047046", "0.61674607", "0.6155931", "0.60806483", "0.6072541", "0.60485476", "0.6006821", "0.59595", "0.59070104", "0.5893689", "0.5879238", "0.58686316", "0.58670074", "0.5828615", "0.5811299", "0.58063793"...
0.0
-1
try to resume simulation with a new pointer
simulationResume({ pointerType, eventType, eventTarget, scope }) { if (!/down|start/i.test(eventType)) { return null; } for (const interaction of scope.interactions.list) { let element = eventTarget; if (interaction.simulation && interaction.simulation.allowResume && in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resume() {\n paused = false;\n timeout = setTimeout(executeNext, stepDelay);\n }", "function newGeneration(){\n firstTime = 1;\n newGen === true ? step() : null\n}", "resume() {\r\n if(this._endScript) {\r\n this._resetStates();\r\n } else {\r\n ...
[ "0.66943306", "0.61422473", "0.61142546", "0.6099164", "0.6023769", "0.5997409", "0.5993845", "0.589602", "0.58885205", "0.5863108", "0.5861327", "0.58201593", "0.5777836", "0.5777836", "0.5761508", "0.5757017", "0.5727721", "0.5694979", "0.5691681", "0.5677588", "0.56734776"...
0.5355798
43
if it's a mouse or pen interaction
mouseOrPen({ pointerId, pointerType, eventType, scope }) { if (pointerType !== 'mouse' && pointerType !== 'pen') { return null; } let firstNonActive; for (const interaction of scope.interactions.list) { if (interaction.pointerType === pointerType) { // if it's a d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mouseOn() {\n if (mouseX > this.x && mouseX < this.x + this.w\n && mouseY > this.y && mouseY < this.y + this.h) {\n this.stroke = 2;\n this.mouseover = true;\n }\n else {\n this.stroke = 1;\n this.mouseover = false;\n }\n }", "mouseOn() {\n if (mouseX > this.x && mouseX <...
[ "0.6727132", "0.6714015", "0.66242015", "0.6460124", "0.64475673", "0.6410219", "0.6410219", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.6369918", "0.6338624", "0.6338624", "0.6338624", "0.6338624", "0.632...
0.6834145
1
get interaction that has this pointer
hasPointer({ pointerId, scope }) { for (const interaction of scope.interactions.list) { if (hasPointerId(interaction, pointerId)) { return interaction; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get interaction () {\n\t\treturn this._interaction;\n\t}", "function getInteraction() {\n if (interaction == null) {\n interaction = new Interaction();\n }\n return interaction;\n}", "getMediaInteraction(){ return this.media_interaction; }", "isInteractionRequired() {\n return isInteractio...
[ "0.78138894", "0.7106153", "0.60903966", "0.6050588", "0.56917924", "0.56639695", "0.5594364", "0.55575544", "0.5549056", "0.5547932", "0.55209243", "0.5514455", "0.5512436", "0.5496909", "0.5454336", "0.54530656", "0.5444438", "0.5444438", "0.5438656", "0.5437565", "0.543617...
0.53691983
27
get first idle interaction with a matching pointerType
idle({ pointerType, scope }) { for (const interaction of scope.interactions.list) { // if there's already a pointer held down if (interaction.pointers.length === 1) { const target = interaction.interactable; // don't add this pointer if there is a target interactable and it // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mouseOrPen({\n pointerId,\n pointerType,\n eventType,\n scope\n }) {\n if (pointerType !== 'mouse' && pointerType !== 'pen') {\n return null;\n }\n\n let firstNonActive;\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType) {\n ...
[ "0.67520434", "0.67520434", "0.5989933", "0.5989933", "0.5301036", "0.5301036", "0.5068599", "0.5056619", "0.50430375", "0.4985964", "0.4950116", "0.4919418", "0.49161735", "0.49059975", "0.4843693", "0.4842414", "0.4842414", "0.4842414", "0.4832512", "0.48218998", "0.4821899...
0.78445756
1
main window main document main window all documents being listened to
constructor() { this.id = `__interact_scope_${Math.floor(Math.random() * 100)}`; this.isInitialized = false; this.listenerMaps = []; this.browser = utils_browser; this.defaults = clone(defaultOptions_defaults); this.Eventable = Eventable_Eventable; this.actions = { map: {}, phase...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listenWindow() {\n this.initDefaultUI();\n this.initFastClick();\n this.setMoblie();\n }", "function main(){\r\t//Make certain that user interaction (display of dialogs, etc.) is turned on.\r\tapp.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;\r\tif (app.documents.lengt...
[ "0.65709203", "0.6451293", "0.6370044", "0.6208044", "0.61439836", "0.6126203", "0.6086894", "0.6031861", "0.5991655", "0.59863883", "0.59543633", "0.5925826", "0.59093785", "0.5905834", "0.59046125", "0.5903986", "0.58924305", "0.5880814", "0.58703136", "0.586705", "0.585874...
0.0
-1
If so, return the validated action. Otherwise, return null
function validateAction(action, interactable, element, eventTarget, scope) { if (interactable.testIgnoreAllow(interactable.options[action.name], element, eventTarget) && interactable.options[action.name].enabled && withinInteractionLimit(interactable, element, action, scope)) { return action; } return null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFormAction(element) {\n return element.getAttribute(\"action\");\n }", "getFormAction(element) {\n return element.getAttribute(\"action\");\n }", "get actionInput() {\n return this._action;\n }", "function validateAction (action, interactable) {\n if (!isObject(action)...
[ "0.61434495", "0.61434495", "0.6012537", "0.5983699", "0.5983699", "0.5983699", "0.5983699", "0.5983699", "0.5976837", "0.59609896", "0.5928764", "0.5928764", "0.5928764", "0.59064025", "0.5904692", "0.5902481", "0.58524704", "0.5833749", "0.5827592", "0.579775", "0.57764775"...
0.61463904
3
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function normalizeSymbolSize(symbolSize) { if (!zrUtil.isArray(symbolSize)) { symbolSize = [+symbolSize, +symbolSize]; } return symbolSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio pla...
[ "0.53504926", "0.4896905", "0.48514667", "0.48116106", "0.4775166", "0.4743932", "0.47342455", "0.47035336", "0.4694186", "0.4694186", "0.46744877", "0.46453032", "0.46394095", "0.4629355", "0.46211302", "0.45832416", "0.45812932", "0.45752546", "0.45698234", "0.45625272", "0...
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function _default(ecModel, api, payload) { ecModel.eachSeriesByType('sankey', function (seriesModel) { var nodeWidth = seriesModel.get('nodeWidth'); var nodeGap = seriesModel.get('nodeGap'); var layoutInfo = getViewRect(seriesModel, api); seriesModel.layoutInfo = layoutInfo; var width = layoutInfo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio pla...
[ "0.5349978", "0.48933455", "0.48501366", "0.48083982", "0.4772584", "0.474481", "0.47349635", "0.47027457", "0.46929818", "0.46929818", "0.4673667", "0.4644517", "0.46389893", "0.46253318", "0.4618249", "0.4582536", "0.45813942", "0.45742747", "0.45687214", "0.45623618", "0.4...
0.0
-1
Can not use instanceof, consider different scope by cross domain or es module import in ec extensions. Mount a method "isInstance()" to Clz.
function enableClassCheck(Clz) { var classAttr = ['__\0is_clz', classBase++, Math.random().toFixed(3)].join('_'); Clz.prototype[classAttr] = true; Clz.isInstance = function (obj) { return !!(obj && obj[classAttr]); }; } // superCall should have class info, which can not be fetch from 'this'.
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function instanceOf (obj, Clss) {\n return Clss[Symbol.hasInstance](obj);\n}", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Addon.__pulumiType;\n }", "static isInstance(obj) {\n if (obj ===...
[ "0.74138486", "0.7238343", "0.72239125", "0.7198562", "0.71668994", "0.71356755", "0.7110122", "0.7055961", "0.7044018", "0.7044018", "0.7030113", "0.69928986", "0.69928986", "0.69928986", "0.6991868", "0.697667", "0.6962421", "0.69558203", "0.69399625", "0.69149274", "0.6913...
0.0
-1
Consider this case: class A has method f, class B inherits class A, overrides method f, f call superApply('f'), class C inherits class B, do not overrides method f, then when method of class C is called, dead loop occured.
function superCall(context, methodName) { var args = zrUtil.slice(arguments, 2); return this.superClass.prototype[methodName].apply(context, args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __applyUp(self, func, args)\r\n{\r\n func.apply(self, args);\r\n if (self.__parent) {\r\n __applyUp(self.__parent, func, args);\r\n }\r\n}", "function b(){f.call(this)}", "function __applyDown(self, func, args)\r\n{\r\n func.apply(self, args);\r\n if (self.__children) {\r\n ...
[ "0.6127392", "0.55900556", "0.5322796", "0.5230175", "0.51986575", "0.51986575", "0.51831776", "0.51765615", "0.5160114", "0.5113265", "0.50895274", "0.5056441", "0.5030719", "0.5021578", "0.5021578", "0.5021578", "0.49843234", "0.4957536", "0.49430692", "0.49242058", "0.4910...
0.0
-1
Truncates given string to the maximum characters count
function truncate(str, max) { if (max === void 0) { max = 0; } if (typeof str !== 'string' || max === 0) { return str; } return str.length <= max ? str : str.substr(0, max) + "..."; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n }", "function truncate(str, max = 0) {\n\t if (typeof str !== 'string' || max === 0) {\n\t return str;\n\t }\n\t return str.length...
[ "0.8294033", "0.82458264", "0.8231845", "0.81994814", "0.816453", "0.8122893", "0.805614", "0.7893945", "0.7810414", "0.7756278", "0.7730918", "0.7671303", "0.7650801", "0.7638327", "0.7623884", "0.7602149", "0.7572789", "0.7561847", "0.75533897", "0.7552987", "0.75457025", ...
0.81988335
5
This is basically just `trim_line` from
function snipLine(line, colno) { var newLine = line; var ll = newLine.length; if (ll <= 150) { return newLine; } if (colno > ll) { // eslint-disable-next-line no-param-reassign colno = ll; } var start = Math.max(colno - 60, 0); if (start < 5) { start = 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trim_lines(lines) {\r\n if (lines == null) return lines;\r\n\r\n var result = '';\r\n temp = lines.split('\\n');\r\n for (var i = 0; i < temp.length; i++) {\r\n line = temp[i].replace(/\\s+/g,' ').trim();\r\n if (line.length > 0) {\r\n result += (i == temp.length - 1) ...
[ "0.709873", "0.68174124", "0.67371136", "0.6703741", "0.6702536", "0.6654126", "0.65636367", "0.65636367", "0.65636367", "0.654661", "0.654661", "0.64966524", "0.6436412", "0.63677233", "0.6356577", "0.63520586", "0.63273376", "0.62499326", "0.624892", "0.62246186", "0.621985...
0.0
-1
Join values in array
function safeJoin(input, delimiter) { if (!Array.isArray(input)) { return ''; } var output = []; // eslint-disable-next-line @typescript-eslint/prefer-for-of for (var i = 0; i < input.length; i++) { var value = input[i]; try { output.push(String(value)); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joined(array) {\n return array.join();\n}", "function join(arr) {\n let res = \"\";\n for (let i = 0; i < arr.length; i++)\n res += arr[i];\n return res;\n}", "function join(arr) {\n let res = \"\";\n for (let i = 0; i < arr.length; i++)\n res += arr[i];\n return res;\...
[ "0.78730714", "0.76609993", "0.76609993", "0.7616198", "0.75838137", "0.7539979", "0.72907186", "0.707199", "0.7059498", "0.70557815", "0.70099896", "0.6967532", "0.6947322", "0.69445705", "0.69359845", "0.69340944", "0.68965673", "0.68501645", "0.68387747", "0.68108803", "0....
0.0
-1
Checks if the value matches a regex or includes the string
function isMatchingPattern(value, pattern) { if (!Object(_is__WEBPACK_IMPORTED_MODULE_0__[/* isString */ "k"])(value)) { return false; } if (Object(_is__WEBPACK_IMPORTED_MODULE_0__[/* isRegExp */ "j"])(pattern)) { return pattern.test(value); } if (typeof pattern === 'string') { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkRegex() {\n var text = input.val();\n return text.match(settings.regex);\n }", "isRegexMatch(value, expression) {\n return new RegExp(expression).test(String(value));\n }", "function checkString(match, value) {\n if (value == null || value == undefined) return false; /...
[ "0.7127808", "0.702946", "0.6942304", "0.69261616", "0.692482", "0.67734176", "0.66326505", "0.65738076", "0.65241677", "0.6458053", "0.6398477", "0.6366949", "0.63587177", "0.6348114", "0.633678", "0.6283419", "0.6271974", "0.62557083", "0.62529397", "0.62499887", "0.624271"...
0.61266506
27
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function _default(ecModel) { var legendModels = ecModel.findComponents({ mainType: 'legend' }); if (!legendModels || !legendModels.length) { return; } ecModel.eachSeriesByType('graph', function (graphSeries) { var categoriesData = graphSeries.getCategoriesData(); var graph = graphSeries.getG...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onChildAppStart () {\n\n }", "get Android() {}", "onMessageStart() { }", "_playbackCompatibility() {\n // Detect audio playback capabilities.\n\n // Detect HTML5 Audio playback.\n // http://caniuse.com/#feat=audio\n this.canUseAudio = Boolean(new Audio());\n console.log('Native HTML5 Audio pl...
[ "0.47163445", "0.46584114", "0.45273763", "0.45036152", "0.448429", "0.44346538", "0.43841133", "0.4362977", "0.4333602", "0.43013042", "0.42535996", "0.42417178", "0.42218232", "0.42189214", "0.41818306", "0.41804415", "0.4179575", "0.41772082", "0.41758674", "0.41746357", "...
0.0
-1
performance in scenarios of large amount text.
function renderPlainText(hostEl, ctx, text, style, rect, prevEl) { 'use strict'; var needDrawBg = needDrawBackground(style); var prevStyle; var checkCache = false; var cachedByMe = ctx.__attrCachedBy === ContextCachedBy.PLAIN_TEXT; // Only take and check cache for `Text` el, but not RectText. if (prevEl !...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "analyze(text) {\n this.text = this.purify(text);\n this.index = 0;\n this.list = [];\n this.buffer = \"\";\n\n while (this.index < this.text.length) {\n this.state.transference(this.index, true);\n }\n return this.list;\n }", "_drawSourceText(text) {\n let context = this.getCont...
[ "0.6015067", "0.5988325", "0.5911306", "0.5894167", "0.58776987", "0.57967967", "0.57963806", "0.5777366", "0.5755295", "0.5726947", "0.5698994", "0.5686076", "0.5652949", "0.5641966", "0.5626645", "0.56076276", "0.55978674", "0.5589345", "0.5588015", "0.55834883", "0.5572972...
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function _default(option) { createParallelIfNeeded(option); mergeAxisOptionFromParallel(option); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio pla...
[ "0.5349978", "0.48933455", "0.48501366", "0.48083982", "0.4772584", "0.474481", "0.47349635", "0.47027457", "0.46929818", "0.46929818", "0.4673667", "0.4644517", "0.46389893", "0.46253318", "0.4618249", "0.4582536", "0.45813942", "0.45742747", "0.45687214", "0.45623618", "0.4...
0.0
-1
Create a parallel coordinate if not exists.
function createParallelIfNeeded(option) { if (option.parallel) { return; } var hasParallelSeries = false; zrUtil.each(option.series, function (seriesOpt) { if (seriesOpt && seriesOpt.type === 'parallel') { hasParallelSeries = true; } }); if (hasParallelSeries) { option.parallel = [{}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createNewCoordinate() {\n var randCoordArr = generateXY();\n coordinates = new CurrentPicturePosition(randCoordArr[0], randCoordArr[1]);\n}", "function makePnt( x, y ) {\n return { x: x, y: y }\n}", "function spawnLocation(xPos, yPos) {\n \n return { x: xPos, y: yPos };\n\n}", "function c...
[ "0.5736917", "0.5534941", "0.5400069", "0.53862494", "0.53512824", "0.52708775", "0.52664405", "0.5262102", "0.5262102", "0.5262102", "0.5262102", "0.5262102", "0.5262102", "0.5234713", "0.5223697", "0.5219703", "0.52052766", "0.5165972", "0.5103115", "0.50738263", "0.5071271...
0.5276588
10
Merge aixs definition from parallel option (if exists) to axis option.
function mergeAxisOptionFromParallel(option) { var axes = modelUtil.normalizeToArray(option.parallelAxis); zrUtil.each(axes, function (axisOption) { if (!zrUtil.isObject(axisOption)) { return; } var parallelIndex = axisOption.parallelIndex || 0; var parallelOption = modelUtil.normalizeToArray...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeAxisOptionFromParallel(option){var axes=modelUtil.normalizeToArray(option.parallelAxis);zrUtil.each(axes,function(axisOption){if(!zrUtil.isObject(axisOption)){return;}var parallelIndex=axisOption.parallelIndex || 0;var parallelOption=modelUtil.normalizeToArray(option.parallel)[parallelIndex];if(paral...
[ "0.68219596", "0.6635864", "0.6557229", "0.62749445", "0.6230679", "0.5393373", "0.5191035", "0.5138835", "0.507884", "0.507884", "0.507884", "0.47775602", "0.463865", "0.46238345", "0.46118924", "0.4597867", "0.45692158", "0.454332", "0.4505092", "0.4505092", "0.4477107", ...
0.6199687
10
although it might be not accurate.
function getScales(xyMinMaxCurr, xyMinMaxOrigin) { var sizeCurr = getSize(xyMinMaxCurr); var sizeOrigin = getSize(xyMinMaxOrigin); var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]]; isNaN(scales[0]) && (scales[0] = 1); isNaN(scales[1]) && (scales[1] = 1); return scales; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function returnsNonSmi(){ return 0.25; }", "get newLength() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2) {\n let ins = this.sections[i + 1];\n result += ins < 0 ? this.sections[i] : ins;\n }\n re...
[ "0.5847494", "0.56731975", "0.5660068", "0.5635036", "0.5554136", "0.5524072", "0.5523217", "0.54790395", "0.54574656", "0.5439404", "0.54353255", "0.5425063", "0.5412884", "0.5406545", "0.5394503", "0.5394145", "0.538786", "0.5378768", "0.53626317", "0.5361607", "0.53512156"...
0.0
-1
Given a child DOM element, returns a queryselector statement describing that and its ancestors e.g. [HTMLElement] => body > div > inputfoo.btn[name=baz]
function htmlTreeAsString(elem) { // try/catch both: // - accessing event.target (see getsentry/raven-js#838, #768) // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly // - can throw an exception in some circumstances. try { var currentElem = elem; va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateSelector(el){\n var selector = \"\";\n var tree = $(el).parentsUntil(document);\n\n // generate full selector by traversing DOM from bottom-up\n for (var i = -1; i < tree.length; i++){\n var e = i < 0 ? el : tree[i];\n\n var eCSS = querifyElement(e);\n var query = eCSS.query + (select...
[ "0.62965804", "0.6130739", "0.6130739", "0.6102466", "0.60880804", "0.60284203", "0.6009682", "0.5954808", "0.58971274", "0.5895123", "0.5879965", "0.58273274", "0.58237016", "0.58237016", "0.5816811", "0.5816811", "0.5816811", "0.5794734", "0.5789776", "0.57840765", "0.57826...
0.0
-1
Returns a simple, queryselector representation of a DOM element e.g. [HTMLElement] => inputfoo.btn[name=baz]
function _htmlElementAsString(el) { var elem = el; var out = []; var className; var classes; var key; var attr; var i; if (!elem || !elem.tagName) { return ''; } out.push(elem.tagName.toLowerCase()); if (elem.id) { out.push("#" + elem.id); } // eslint-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function q (el) {\n if (typeof el === 'string') return document.querySelector(el)\n else if (typeof el === 'object' && el[0]) return el[0]\n else return el\n}", "function _(elm) { return document.querySelector(elm); }", "function querySelector(element) {\n return document.querySelector(element);\n}", "fu...
[ "0.7290738", "0.72729284", "0.70942974", "0.6918658", "0.68634987", "0.6855619", "0.6824114", "0.68001807", "0.67541987", "0.67434585", "0.6739643", "0.6735193", "0.6725986", "0.6725986", "0.6714609", "0.66955113", "0.6694225", "0.66918546", "0.66918546", "0.66904104", "0.669...
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return zrUtil.map([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio pla...
[ "0.53504926", "0.4896905", "0.48514667", "0.48116106", "0.4775166", "0.4743932", "0.47342455", "0.47035336", "0.4694186", "0.4694186", "0.46744877", "0.46453032", "0.46394095", "0.4629355", "0.46211302", "0.45832416", "0.45812932", "0.45752546", "0.45698234", "0.45625272", "0...
0.0
-1
If a block is tsv format
function isTSVFormat(block) { // Simple method to find out if a block is tsv format var firstLine = block.slice(0, block.indexOf('\n')); if (firstLine.indexOf(ITEM_SPLITER) >= 0) { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTSVFormat(block) {\n\t // Simple method to find out if a block is tsv format\n\t var firstLine = block.slice(0, block.indexOf('\\n'));\n\t\n\t if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n\t return true;\n\t }\n\t }", "function isTSVFormat(block){ // Simple method to find...
[ "0.8859122", "0.8845361", "0.88139796", "0.88139796", "0.87741005", "0.60407025", "0.5190595", "0.5138938", "0.50869346", "0.50047666", "0.4966861", "0.4956511", "0.49283457", "0.4926797", "0.49011958", "0.49008223", "0.48291752", "0.4825572", "0.48156893", "0.48068026", "0.4...
0.8741611
11
globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.option...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}", "extend(config, ctx) {\n // if (process.server && process.browser) {\n if (...
[ "0.58472276", "0.5728634", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396",...
0.0
-1
Safely get global scope object
function getGlobalObject() { return (Object(_node__WEBPACK_IMPORTED_MODULE_0__[/* isNodeEnv */ "b"])() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : fallbackGlobalObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGlobalObject() {\r\n return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : fallbackGlobalObject;\r\n}", "function getGlobalObject() {\r\n return (isNodeEnv()\r\n ? global\r\n : typeof window !== 'undefined'\r\n ? win...
[ "0.7222374", "0.72033703", "0.72008914", "0.71630025", "0.71455836", "0.7140292", "0.69974977", "0.6996896", "0.69739324", "0.69653744", "0.6890241", "0.6863302", "0.68451947", "0.68451947", "0.6792176", "0.67782426", "0.66768926", "0.66768926", "0.66768926", "0.66750854", "0...
0.6972616
9
Parses string form of URL into an object // borrowed from // intentionally using regex and not href parsing trick because React Native and other // environments where DOM might not be available
function parseUrl(url) { if (!url) { return {}; } var match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); if (!match) { return {}; } // coerce to undefined values to empty string so we don't get 'undefined' var query = match[6] || ''; var fr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseURL(str) {\n let fullObject;\n if (typeof FastBoot === 'undefined') {\n const element = document.createElement('a');\n element.href = str;\n fullObject = element;\n } else {\n fullObject = FastBoot.require('url').parse(str);\n }\...
[ "0.8121613", "0.7074693", "0.70151013", "0.6993006", "0.69894713", "0.69573736", "0.69354415", "0.69031566", "0.69030756", "0.68946064", "0.6887863", "0.68662775", "0.68588316", "0.68518674", "0.68518674", "0.6842979", "0.6840864", "0.68403757", "0.6840171", "0.68379337", "0....
0.68405855
18
Extracts either message or type+value from an event that can be used for userfacing logs
function getEventDescription(event) { if (event.message) { return event.message; } if (event.exception && event.exception.values && event.exception.values[0]) { var exception = event.exception.values[0]; if (exception.type && exception.value) { return exception.type + ": ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processMessage(event)\n{\n var message;\n try {\n message = JSON.parse(event.data);\n } catch (e) {}\n\n if(!message.type)\n return;\n switch (message.type)\n {\n case \"command\":\n processCommand(message);\n break;\n case \"event\":\n ...
[ "0.6338606", "0.61995715", "0.6155481", "0.61328715", "0.61122143", "0.6079839", "0.60407096", "0.60049266", "0.60024065", "0.59383005", "0.58615464", "0.584968", "0.58174753", "0.57072175", "0.56880337", "0.5682649", "0.56795937", "0.5673357", "0.5671763", "0.5671763", "0.56...
0.6037439
9
Adds exception values, type and value to an synthetic Exception.
function addExceptionTypeValue(event, value, type) { event.exception = event.exception || {}; event.exception.values = event.exception.values || []; event.exception.values[0] = event.exception.values[0] || {}; event.exception.values[0].value = event.exception.values[0].value || value || ''; event.ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\...
[ "0.6374556", "0.6370023", "0.63465154", "0.6233923", "0.5657113", "0.55716014", "0.5510732", "0.53008604", "0.5291609", "0.5210917", "0.51411", "0.5055595", "0.4997821", "0.49858013", "0.4962252", "0.49564525", "0.4939388", "0.4893575", "0.48620638", "0.4827497", "0.48214483"...
0.6380193
2
Adds exception mechanism to a given event.
function addExceptionMechanism(event, mechanism) { if (mechanism === void 0) { mechanism = {}; } // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better? try { // @ts-ignore Type 'Mechanism | {}' is not assignable to type 'Mechanism | undefined' // eslint-disable-next-l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addExceptionMechanism(event, mechanism) {\n if (mechanism === void 0) { mechanism = {}; }\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception.values[0].mechanism =...
[ "0.72324514", "0.6960397", "0.6916953", "0.68539137", "0.68011314", "0.62969136", "0.6210959", "0.618817", "0.61599517", "0.6111626", "0.5759549", "0.5727169", "0.5694992", "0.5694992", "0.5694992", "0.568407", "0.5660355", "0.56268835", "0.55241895", "0.54722035", "0.5294434...
0.7067206
1
A safe form of location.href
function getLocationHref() { try { return document.location.href; } catch (oO) { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocationHref() {\n try {\n return WINDOW$6.document.location.href;\n } catch (oO) {\n return '';\n }\n }", "function getLocationHref() {\n\t try {\n\t return WINDOW$5.document.location.href;\n\t } catch (oO) {\n\t return '';\n\t }\n\t}", "function getLocationHref() {\n ...
[ "0.72748166", "0.7157395", "0.7090928", "0.6976126", "0.68934065", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.66816205", ...
0.7062153
4
Parses input into a SemVer interface
function parseSemver(input) { var match = input.match(SEMVER_REGEXP) || []; var major = parseInt(match[1], 10); var minor = parseInt(match[2], 10); var patch = parseInt(match[3], 10); return { buildmetadata: match[5], major: isNaN(major) ? undefined : major, minor: isNaN(mino...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor...
[ "0.6841483", "0.56566375", "0.5566653", "0.5526026", "0.5456903", "0.5456903", "0.5456903", "0.54483175", "0.5422888", "0.5369831", "0.5358722", "0.5331201", "0.53209823", "0.5316571", "0.5296304", "0.5292541", "0.52777135", "0.5256466", "0.52392256", "0.52392256", "0.5239225...
0.68041956
3
60 seconds Extracts RetryAfter value from the request header or returns default value
function parseRetryAfterHeader(now, header) { if (!header) { return defaultRetryAfter; } var headerDelay = parseInt("" + header, 10); if (!isNaN(headerDelay)) { return headerDelay * 1000; } var headerDate = Date.parse("" + header); if (!isNaN(headerDate)) { return hea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseRetryAfterHeader(header, now = Date.now()) {\n\t const headerDelay = parseInt(`${header}`, 10);\n\t if (!isNaN(headerDelay)) {\n\t return headerDelay * 1000;\n\t }\n\n\t const headerDate = Date.parse(`${header}`);\n\t if (!isNaN(headerDate)) {\n\t return headerDate - now;\n\t }\n\n\t ret...
[ "0.73163617", "0.72875464", "0.7255115", "0.72020245", "0.71176016", "0.6877851", "0.6871882", "0.6871882", "0.6702772", "0.6702772", "0.6555678", "0.6312755", "0.6312755", "0.615139", "0.57901984", "0.57498324", "0.57498324", "0.57498324", "0.55866075", "0.55866075", "0.5443...
0.72742456
4
This function adds context (pre/post/line) lines to the provided frame
function addContextToFrame(lines, frame, linesOfContext) { if (linesOfContext === void 0) { linesOfContext = 5; } var lineno = frame.lineno || 0; var maxLines = lines.length; var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0); frame.pre_context = lines .slice(Math.max(0, sourceLine...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addContextToFrame(lines, frame, linesOfContext = 5) {\n const lineno = frame.lineno || 0;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) ...
[ "0.82374823", "0.8233265", "0.82141066", "0.6985989", "0.5921603", "0.5921603", "0.5636513", "0.5630872", "0.5587357", "0.5587357", "0.5587357", "0.5587357", "0.5530777", "0.55008274", "0.545962", "0.5453713", "0.5444654", "0.5444654", "0.5444654", "0.5444654", "0.5444654", ...
0.8136935
3
Strip the query string and fragment off of a given URL or path (if present)
function stripUrlQueryAndFragment(urlPath) { // eslint-disable-next-line no-useless-escape return urlPath.split(/[\?#]/, 1)[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripUrlQueryAndFragment(urlPath) {\n\t // eslint-disable-next-line no-useless-escape\n\t return urlPath.split(/[\\?#]/, 1)[0];\n\t}", "function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n }", "function stripUrl...
[ "0.8455415", "0.8417088", "0.8340946", "0.72635466", "0.71312344", "0.69702166", "0.68006474", "0.68006474", "0.68006474", "0.68006474", "0.68006474", "0.6800232", "0.6800232", "0.6800232", "0.67821944", "0.67208296", "0.6709695", "0.6693062", "0.66851175", "0.6646686", "0.65...
0.8335868
4
Originally detect dimCount by data[0]. Should we optimize it to only by sysDims and dimensions and encode. So only necessary dims will be initialized. But (1) custom series should be considered. where other dims may be visited. (2) sometimes user need to calcualte bubble size or use visualMap on other dimensions beside...
function getDimCount(source, sysDims, dimsDef, optDimCount) { // Note that the result dimCount should not small than columns count // of data, otherwise `dataDimNameMap` checking will be incorrect. var dimCount = Math.max(source.dimensionsDetectCount || 1, sysDims.length, dimsDef.length, optDimCount || 0); each...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCustomDims() {\n var dims = [];\n \n // client id\n \n var tracker = ga.getByName('t0');\n \n dims.push( {slot: 11, value: tracker.get('clientId')} );\n \n if (typeof dataLayer.user === 'object') {\n \n var loggedIn = 'not logged in';\n ...
[ "0.65010047", "0.6482728", "0.63587344", "0.62782633", "0.6267692", "0.61935574", "0.60171443", "0.58644235", "0.5714209", "0.5711893", "0.55884963", "0.55850387", "0.54324347", "0.5410598", "0.53910816", "0.5356613", "0.53496027", "0.53309214", "0.5321984", "0.529007", "0.52...
0.61193025
9
add animation to the view
function createGridClipShape(rect, seriesModel, cb) { var rectEl = new graphic.Rect({ shape: { x: rect.x - 10, y: rect.y - 10, width: 0, height: rect.height + 20 } }); graphic.initProps(rectEl, { shape: { width: rect.width + 20, height: rect.height + 20 } }, s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Animation (){\n var animation = anime.timeline();\n \n animation.add({\n targets:'.animation',\n height:['100%',0],\n easing:'easeInOutCirc',\n delay:1200\n });\n \n \n }", "funct...
[ "0.7027817", "0.7003131", "0.68253934", "0.67612547", "0.6724844", "0.6715914", "0.664169", "0.6575103", "0.65643024", "0.6521263", "0.6494047", "0.64796937", "0.64167416", "0.6376061", "0.6361697", "0.6333964", "0.6329555", "0.63251495", "0.63118625", "0.6286675", "0.6267459...
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function _default(option) { var timelineOpt = option && option.timeline; if (!zrUtil.isArray(timelineOpt)) { timelineOpt = timelineOpt ? [timelineOpt] : []; } zrUtil.each(timelineOpt, function (opt) { if (!opt) { return; } compatibleEC2(opt); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio pla...
[ "0.53492224", "0.48935446", "0.48514137", "0.48082927", "0.47720826", "0.4744996", "0.47347993", "0.47019523", "0.46926585", "0.46926585", "0.46730793", "0.46452278", "0.46379203", "0.46256977", "0.4618543", "0.45818752", "0.45806864", "0.45742333", "0.4568166", "0.45616665", ...
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function _default(option) { var polarOptArr = option.polar; if (polarOptArr) { if (!zrUtil.isArray(polarOptArr)) { polarOptArr = [polarOptArr]; } var polarNotRadar = []; zrUtil.each(polarOptArr, function (polarOpt, idx) { if (polarOpt.indicator) { if (polarOpt.type && !polarOpt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RadarChart(id_sm, data, name, url, options) {\n var cfg = {\n w: 600,\t\t\t\t//Width of the circle\n h: 600,\t\t\t\t//Height of the circle\n margin: {top: 20, right: 20, bottom: 20, left: 20}, //The margins of the SVG\n levels: 3,\t\t\t\t//How many levels or inner circles sh...
[ "0.67635065", "0.6491068", "0.6484326", "0.63109314", "0.6296422", "0.6146683", "0.6115306", "0.60754436", "0.59910053", "0.59729016", "0.59246576", "0.59206533", "0.58787036", "0.5819908", "0.5781996", "0.5695503", "0.5685129", "0.56794894", "0.565698", "0.56429756", "0.5634...
0.0
-1
Do not update cache until api called.
function updateCache(dataIndexInside) { dataIndexInside == null && (dataIndexInside = currDataIndexInside); if (currDirty) { currItemModel = data.getItemModel(dataIndexInside); currLabelNormalModel = currItemModel.getModel(LABEL_NORMAL); currLabelEmphasisModel = currItemModel.getModel(LABEL_E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async updateCache() {\n this._cache = await this.model.query();\n }", "function updateCache() {\n if (currentCache > caches.length) {\n currentCache = 0;\n }\n currentCache++;\n showCache();\n}", "emptyCache() {\n this.cache = {};\n }", "emptyCache() {\n this.cache = {};\n }", "ge...
[ "0.7163637", "0.702836", "0.6947235", "0.6947235", "0.6869056", "0.68560874", "0.6764157", "0.6759199", "0.67481846", "0.6736378", "0.67232144", "0.6719998", "0.67077357", "0.6699206", "0.6687188", "0.66650504", "0.6604259", "0.6598937", "0.65983945", "0.6566894", "0.65402424...
0.0
-1
textFill, textStroke, textStrokeWidth. We have to do this trick.
function applyExtraBefore(extra, model) { var dummyModel = new Model({}, model); zrUtil.each(CACHED_LABEL_STYLE_PROPERTIES, function (stylePropName, modelPropName) { if (extra.hasOwnProperty(stylePropName)) { dummyModel.option[modelPropName] = extra[stylePropName]; } }); return dummyModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textStyle(text) {\n text.attr(\"aria-hidden\", d.aH).attr(\"dir\", rtl ? \"rtl\" : \"ltr\").attr(\"fill\", d.fC).attr(\"stroke\", d.fStroke).attr(\"stroke-width\", d.fSW).attr(\"text-anchor\", d.tA).attr(\"font-family\", d.fF).style(\"font-family\", d.fF).attr(\"font-size\", \"\".concat(d.fS, \...
[ "0.73749673", "0.727321", "0.7220982", "0.7189339", "0.7148709", "0.71306485", "0.7088056", "0.6901516", "0.68652356", "0.68598384", "0.6843889", "0.6818007", "0.6803056", "0.6785004", "0.67705524", "0.67448467", "0.6724612", "0.6709601", "0.66966206", "0.66880953", "0.667554...
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function generateNodeKey(id) { return '_EC_' + id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getId(obj) {\n return obj.id;\n}", "function createObjectId(id) {\n\t\treturn 'object_' + id;\n\t}", "getID() {}", "static id(arg) {\nreturn arg;\n}", "id() {\n return this.constructor.name;\n }", "get _idPrefix() { return \"Transform\" }", "function _function(obj) {\n return exports.P...
[ "0.6176846", "0.6016615", "0.59826607", "0.596679", "0.5914373", "0.5858058", "0.5828314", "0.58131456", "0.57972085", "0.57884496", "0.5764588", "0.57548237", "0.56828815", "0.56828815", "0.5680611", "0.5668598", "0.5661318", "0.5648847", "0.56421435", "0.5626241", "0.562343...
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function _default(seriesType) { return { seriesType: seriesType, plan: createRenderPlanner(), reset: function (seriesModel) { var data = seriesModel.getData(); var coordSys = seriesModel.coordinateSystem; var pipelineContext = seriesModel.pipelineContext; var isLargeRender = pipeli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function n$1(){return new Float32Array(4)}", "function r(){const r=new Float32Array(4);return r[3]=1,r}", "constructor()\n {\n this.m = new Float32Array(16);\n\n this.m[0] = this.m[5] = this.m[10] = this.m[15] = 1;\n }", "setFloat32Buffers() {\n let tempArr = []\n for(let i = 0; i <...
[ "0.7301634", "0.7210457", "0.69891053", "0.6970289", "0.6806028", "0.6755337", "0.67421573", "0.6691147", "0.6642018", "0.6596119", "0.65654045", "0.6548043", "0.65388924", "0.6511904", "0.6498788", "0.64865685", "0.64797604", "0.6425649", "0.640718", "0.6349704", "0.6349409"...
0.0
-1
var valueSplitReg = /[\s,]+/;
function createPathProxyFromString(data) { if (!data) { return new PathProxy(); } // var data = data.replace(/-/g, ' -') // .replace(/ /g, ' ') // .replace(/ /g, ',') // .replace(/,,/g, ','); // var n; // create pipes so that we can split the data // for (n = 0; n < cc.length; n++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function split( val )\n\t{\n\t\treturn val.split( /,\\s*/ );\n\t}", "function commaSplit(val) {\n return val.split(/,\\s*/);\n}", "function split(value) {\n return typeof value === 'string' ? value.split(/ *, */g) : undefined;\n}", "function splitVal(string, separator) {\n\t var val, i, l;\n\t ...
[ "0.7849616", "0.7697576", "0.6921383", "0.68012774", "0.6656858", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.65116346", "0.6413131", "0.6411457", ...
0.0
-1
Merge multiple paths TODO Apply transform TODO stroke dash TODO Optimize double memory cost problem
function mergePath(pathEls, opts) { var pathList = []; var len = pathEls.length; for (var i = 0; i < len; i++) { var pathEl = pathEls[i]; if (!pathEl.path) { pathEl.createPathProxy(); } if (pathEl.__dirtyPath) { pathEl.buildPath(pathEl.path, pathEl.shape, true); } pathList....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dedupePathParts(path) {\n let startPathIdxs = [];\n let curPathIdx = -1;\n let startPartPos = 0;\n let intersections = [];\n let pathParts = [];\n for (let i = 1; i < path.length; i++) {\n let lastKey = path[i - 1].x + \"__\" + path[i - 1].y;\n let ke...
[ "0.6273108", "0.59052885", "0.58947754", "0.5766077", "0.574933", "0.5727824", "0.5727817", "0.5704255", "0.5704255", "0.5682538", "0.5682538", "0.5682538", "0.5682538", "0.56654656", "0.5660568", "0.5651678", "0.5628781", "0.56250507", "0.56250507", "0.5593339", "0.55876833"...
0.61321384
8
Retruns the global event processors.
function getGlobalEventProcessors() { /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ var global = Object(misc["e" /* getGlobalObject */])(); global.__SENTRY__ = global.__SENTRY__ || {}; global.__SENTRY__.globalEventProcessors = global.__SENTRY__.glob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGlobalEventProcessors() {\n\t return getGlobalSingleton('globalEventProcessors', () => []);\n\t}", "function getGlobalEventProcessors() {\n return utils.getGlobalSingleton('globalEventProcessors', () => []);\n}", "function getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventPr...
[ "0.8494986", "0.8441576", "0.8419894", "0.8315455", "0.81234026", "0.7935585", "0.7902069", "0.6231468", "0.6218892", "0.6087853", "0.6087853", "0.6087853", "0.6087853", "0.6087767", "0.60697734", "0.60263985", "0.594165", "0.59127104", "0.5666589", "0.5600421", "0.5533949", ...
0.80795264
5
Add a EventProcessor to be kept globally.
function addGlobalEventProcessor(callback) { getGlobalEventProcessors().push(callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n }", "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}", "function addGlobalEventProcessor(callback) {\n\t getGlobalEventProcessors().push(callback);\n\t}", "function a...
[ "0.7936899", "0.7878661", "0.78346163", "0.7829425", "0.5965462", "0.59309137", "0.5707509", "0.5608199", "0.5497957", "0.54723257", "0.544641", "0.5426993", "0.5412833", "0.54049814", "0.53995687", "0.5344003", "0.5283757", "0.52602077", "0.524846", "0.519032", "0.5148142", ...
0.78643775
5
Returns the global shim registry.
function getMainCarrier() { var carrier = Object(misc["e" /* getGlobalObject */])(); carrier.__SENTRY__ = carrier.__SENTRY__ || { extensions: {}, hub: undefined, }; return carrier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGlobalRegistry() {\n return global.__SENTRY__;\n}", "async setRegistry() {\n const cacheKey = ''\n if (this._registries[cacheKey]) {\n return this._registries[cacheKey]\n }\n\n let registry\n if (await shouldUseTaobao(this.bin)) {\n registry...
[ "0.755306", "0.6765899", "0.640535", "0.6235392", "0.6233184", "0.6180067", "0.6119691", "0.6078562", "0.5983584", "0.58899087", "0.58899087", "0.58603895", "0.58354175", "0.5773825", "0.5744", "0.5703548", "0.5663477", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0...
0.5168644
90
Replaces the current main hub with the passed one on the global object
function makeMain(hub) { var registry = getMainCarrier(); var oldHub = getHubFromCarrier(registry); setHubOnCarrier(registry, hub); return oldHub; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMain(hub) {\r\n var registry = getMainCarrier();\r\n var oldHub = getHubFromCarrier(registry);\r\n setHubOnCarrier(registry, hub);\r\n return oldHub;\r\n}", "function makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCar...
[ "0.71589226", "0.70410913", "0.7030244", "0.6932362", "0.65008783", "0.6373567", "0.63675654", "0.6346796", "0.63138765", "0.6277299", "0.6224287", "0.6185386", "0.61494035", "0.6002557", "0.57899106", "0.5740317", "0.5700796", "0.56344616", "0.55131125", "0.5504904", "0.5411...
0.7091031
4
Returns the default hub instance. If a hub is already registered in the global carrier but this module contains a more recent version, it replaces the registered version. Otherwise, the currently registered hub will be returned.
function hub_getCurrentHub() { // Get main carrier (global for every environment) var registry = getMainCarrier(); // If there's no hub, or its an old API, assign a new one if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) { setHubOnCarrier(registry, new hub...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(reg...
[ "0.813337", "0.80405915", "0.7990091", "0.7972129", "0.7968875", "0.79396135", "0.7857112", "0.6571274", "0.6486028", "0.6367278", "0.636274", "0.6359101", "0.6246236", "0.5939922", "0.58937955", "0.5676761", "0.558653", "0.5585142", "0.5585142", "0.5585142", "0.5585142", "...
0.79383117
6
Returns the active domain, if one exists
function getActiveDomain() { var sentry = getMainCarrier().__SENTRY__; return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getActiveDomain() {\n utils_1.logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n var sentry = getMainCarrier().__SENTRY__;\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}", "function getDoma...
[ "0.781052", "0.6472479", "0.6423256", "0.6216244", "0.62022746", "0.60298795", "0.5951261", "0.5944124", "0.5944124", "0.5944124", "0.59373915", "0.591535", "0.59065324", "0.58955085", "0.58955085", "0.58635014", "0.58484954", "0.57850885", "0.5783557", "0.5746694", "0.571448...
0.80169576
0
Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
function getHubFromActiveDomain(registry) { try { var activeDomain = getActiveDomain(); // If there's no active domain, just return global hub if (!activeDomain) { return getHubFromCarrier(registry); } // If there's no hub on current domain, or it's an old API, as...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHubFromActiveDomain(registry) {\n try {\n var property = 'domain';\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (!sentry || !sentry.extensions || !sentry.extensions[property]) {\n ...
[ "0.74008214", "0.7359838", "0.7298577", "0.7237678", "0.7214202", "0.6919984", "0.68929535", "0.6377765", "0.6257768", "0.6241848", "0.6218201", "0.61899614", "0.61769974", "0.5403008", "0.51618654", "0.5125241", "0.4954452", "0.4938715", "0.4929035", "0.49208465", "0.4885339...
0.7202113
5
This will tell whether a carrier has a hub on it or not
function hasHubOnCarrier(carrier) { return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasHubOnCarrier(carrier) {\n\t return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n\t}", "function hasHubOnCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n else {\n return false;\n }\n}", "function hasH...
[ "0.8268867", "0.82522964", "0.8229626", "0.81986004", "0.8194719", "0.8111537", "0.61041105", "0.60690176", "0.60306686", "0.5975903", "0.5975903", "0.59094", "0.58931303", "0.5885595", "0.58729684", "0.5858422", "0.5856852", "0.58539426", "0.58526766", "0.58326304", "0.58133...
0.8128427
6
setPrototypeOf polyfill using __proto__
function setProtoOf(obj, proto) { // @ts-ignore __proto__ does not exist on obj obj.__proto__ = proto; return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setPrototypeOf (target, proto) {\n Object.setPrototypeOf(target, proto)\n }", "function protoAugment(target,src){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target, src) {\n target.__proto__ = src\n}", "function protoAugment(target, src) {\n...
[ "0.8489821", "0.67634416", "0.6557988", "0.6540139", "0.65239906", "0.65239906", "0.6516097", "0.6516097", "0.6516097", "0.6516097", "0.65149295", "0.65149295", "0.65149295", "0.65149295", "0.65149295", "0.65149295", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509...
0.0
-1
setPrototypeOf polyfill using mixin
function mixinProperties(obj, proto) { for (var prop in proto) { // eslint-disable-next-line no-prototype-builtins if (!obj.hasOwnProperty(prop)) { // @ts-ignore typescript complains about indexing so we remove obj[prop] = proto[prop]; } } return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setPrototypeOf (target, proto) {\n Object.setPrototypeOf(target, proto)\n }", "static mixinEs5(superclass, extra) {\n let proto = extra.prototype;\n\n let props = Object.getOwnPropertyNames(proto);\n for(let i = 0; i < props.length; i++) {\n let key = props[i];\n le...
[ "0.7480632", "0.60050184", "0.593067", "0.593067", "0.5929975", "0.5866176", "0.57591146", "0.57198894", "0.57176834", "0.57176834", "0.5714905", "0.57093805", "0.5675581", "0.5675581", "0.56480455", "0.5617525", "0.5595397", "0.5575881", "0.5573729", "0.55423886", "0.5542388...
0.0
-1
Creates a new Dsn component
function Dsn(from) { if (typeof from === 'string') { this._fromString(from); } else { this._fromComponents(from); } this._validate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Dsn(from) {\n if (typeof from === 'string') {\n this.fromString(from);\n }\n else {\n this.fromComponents(from);\n }\n this.validate();\n }", "function Dsn(from) {\r\n if (typeof from === 'string') {\r\n this._fromString(from)...
[ "0.6758191", "0.6643711", "0.643302", "0.63854474", "0.629212", "0.6085284", "0.60542715", "0.6041203", "0.59722", "0.5910879", "0.5284657", "0.5239071", "0.5231323", "0.5231323", "0.52269995", "0.5089904", "0.4980365", "0.4978365", "0.49351105", "0.49004158", "0.47064644", ...
0.66448975
4
Gets integration to install
function getIntegrationsToSetup(options) { var defaultIntegrations = (options.defaultIntegrations && Object(tslib_es6["e" /* __spread */])(options.defaultIntegrations)) || []; var userIntegrations = options.integrations; var integrations = []; if (Array.isArray(userIntegrations)) { var userInteg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n if (Array.isArray(userIntegrations)) {\n...
[ "0.58456784", "0.577011", "0.5744434", "0.56826746", "0.56745726", "0.56258136", "0.5584304", "0.5555171", "0.5551602", "0.5527821", "0.5527821", "0.5527821", "0.5527821", "0.5462406", "0.5461859", "0.5407472", "0.5372545", "0.537067", "0.53462315", "0.53372186", "0.5322694",...
0.5784636
1
Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default integrations are added unless they were already provided before.
function setupIntegrations(options) { var integrations = {}; getIntegrationsToSetup(options).forEach(function (integration) { integrations[integration.name] = integration; setupIntegration(integration); }); return integrations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIntegrationsToSetup(options) {\r\n var defaultIntegrations = options.defaultIntegrations && Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(options.defaultIntegrations) || [];\r\n var userIntegrations = options.integrations;\r\n var integrations = [];\r\n if (Array.isArray(userInte...
[ "0.65488416", "0.6424719", "0.64099234", "0.63836944", "0.63200176", "0.6270846", "0.62562954", "0.59606075", "0.59166867", "0.59155667", "0.58585286", "0.5792332", "0.571574", "0.56650954", "0.559362", "0.5535905", "0.543521", "0.5353165", "0.51303846", "0.50496966", "0.5035...
0.5750167
13
Initializes this client instance.
function BaseClient(backendClass, options) { /** Array of used integrations. */ this._integrations = {}; /** Number of call being processed */ this._processing = 0; this._backend = new backendClass(options); this._options = options; if (options.dsn) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n if (this.initialized) {\n throw Error('Client has already been initialized.');\n }\n this.api = this.setUpApi(this.token, this.apiOptions);\n this.selfAssignHandlerFunctions();\n this.initialized = true;\n }", "function initialize() {\n configureClientsGrid();\n ...
[ "0.7728512", "0.72298175", "0.72298175", "0.7159167", "0.7102546", "0.69305867", "0.68409735", "0.67760646", "0.67720985", "0.674226", "0.6667395", "0.6666901", "0.6666901", "0.66615283", "0.66316485", "0.66124", "0.6612362", "0.6598454", "0.658352", "0.65832764", "0.65738475...
0.0
-1
Creates a new backend instance.
function BaseBackend(options) { this._options = options; if (!this._options.dsn) { logger.warn('No DSN provided, backend will not do anything.'); } this._transport = this._setupTransport(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inMemoryBackendServiceFactory(injector, dbService, options) {\n var backend = new InMemoryBackendService(injector, dbService, options);\n return backend;\n}", "function _createInstance(instance) {\n return Object.assign({\n id: app.id('i'),\n name: 'New',\n...
[ "0.5948592", "0.5888448", "0.5738683", "0.5719487", "0.5687194", "0.5664829", "0.5615115", "0.55130094", "0.54893446", "0.5475631", "0.5469122", "0.54378015", "0.5437504", "0.5422579", "0.5422579", "0.54196054", "0.54155123", "0.5395348", "0.5395348", "0.53461933", "0.5314405...
0.5222477
29
isNativeFetch checks if the given function is a native implementation of fetch()
function isNativeFetch(func) { return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n }", "function isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}", "function isNativeFetch(func) {\...
[ "0.867265", "0.8631987", "0.8612553", "0.6030184", "0.5826882", "0.5728299", "0.56666386", "0.56459254", "0.55390865", "0.5495411", "0.5495411", "0.5432554", "0.5370357", "0.5356145", "0.52731", "0.524098", "0.524098", "0.52383417", "0.52346426", "0.51461214", "0.51111764", ...
0.8614689
4
Remove N number of frames from the stack
function popFrames(stacktrace, popSize) { try { return Object(tslib_es6["a" /* __assign */])(Object(tslib_es6["a" /* __assign */])({}, stacktrace), { stack: stacktrace.stack.slice(popSize) }); } catch (e) { return stacktrace; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove(n) {\n if (!this.slots) return;\n if (n instanceof Frame) {\n let slots = this.slots;\n let i = 0;\n let l = slots.length;\n while (i < l && slots[i] != n) i += 2;\n if (i != l) {\n let j = i;\n while (i < l) {\n if (slots[i] == n) {\n i += 2;...
[ "0.6408339", "0.6365177", "0.6308712", "0.6286131", "0.6283798", "0.6283798", "0.6283798", "0.62659955", "0.62512827", "0.62246364", "0.60567504", "0.5993962", "0.5993962", "0.58804226", "0.5800008", "0.57910925", "0.5774843", "0.5774843", "0.57720023", "0.5749112", "0.574911...
0.60560906
11
There are cases where stacktrace.message is an Event object In this specific case we try to extract stacktrace.message.error.message
function extractMessage(ex) { var message = ex && ex.message; if (!message) { return 'No error message'; } if (message.error && typeof message.error.message === 'string') { return message.error.message; } return message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractMessage(sourceError) {\n const { error, body, message } = sourceError;\n let errMessage = null;\n if (error) {\n // prefer HttpErrorResponse.error to its message property\n errMessage = typeof error === 'string' ? error : error.message;\n }\n else if (message) {\n ...
[ "0.69864905", "0.65222126", "0.6521486", "0.63998526", "0.636805", "0.6330979", "0.63055736", "0.6297217", "0.6241387", "0.6206682", "0.61103", "0.61103", "0.61103", "0.6095469", "0.6094333", "0.6010287", "0.59615755", "0.5940371", "0.5939014", "0.5909884", "0.5909884", "0....
0.63108253
7
This function creates an exception from an TraceKitStackTrace
function exceptionFromStacktrace(stacktrace) { var frames = prepareFramesForEvent(stacktrace.stack); var exception = { type: stacktrace.name, value: stacktrace.message, }; if (frames && frames.length) { exception.stacktrace = { frames: frames }; } if (exception.type === u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n // tslint:...
[ "0.72436225", "0.72335196", "0.5927451", "0.57460064", "0.57269514", "0.5515385", "0.5425535", "0.5324512", "0.5314851", "0.5221093", "0.5173651", "0.5173651", "0.5173651", "0.5173651", "0.51490754", "0.5124791", "0.51237977", "0.5101845", "0.50725347", "0.50684905", "0.50351...
0.72524875
0
Builds and Event from a Message
function eventFromMessage(options, message, level, hint) { if (level === void 0) { level = Severity.Info; } var syntheticException = (hint && hint.syntheticException) || undefined; var event = eventFromString(message, syntheticException, { attachStacktrace: options.attachStacktrace, }); even...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createEvent(eventName, value, address) {\n var msg = new builder.Message().address(address);\n msg.data.type = 'event';\n msg.data.name = eventName;\n msg.data.value = value;\n\n console.log('function check', msg);\n return msg;\n}", "function MessageEvent(target_, data_, origin_) {\n ...
[ "0.6628312", "0.66122985", "0.64686126", "0.63631576", "0.635627", "0.62052286", "0.62041575", "0.612522", "0.5981569", "0.5952853", "0.59058005", "0.5882767", "0.5881956", "0.5866299", "0.5860368", "0.5814861", "0.58020043", "0.57038087", "0.5702504", "0.57019526", "0.567556...
0.5470415
58
Creates a SentryRequest from an event.
function eventToSentryRequest(event, api) { // since JS has no Object.prototype.pop() var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = Object(tslib_es6["d" /* __rest */])(_a, ["__sentry_samplingMethod", "__sentry_sampleRate"]); event.ta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eventToSentryRequest(event, api) {\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n...
[ "0.7694293", "0.75287384", "0.72529215", "0.62983173", "0.55627215", "0.54582804", "0.54518145", "0.54089904", "0.5289575", "0.5289575", "0.5101973", "0.5093179", "0.5090165", "0.5089448", "0.50581914", "0.5022951", "0.4989387", "0.4986277", "0.4977421", "0.49507356", "0.4938...
0.75170493
2
Create a new instance of API
function API(dsn) { this.dsn = dsn; this._dsnObject = new dsn_Dsn(dsn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInstance() {\n return axios.create(getInstanceOptions());\n }", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "constructor(api) {\n this.api = api;\n }", "constructor (api) {\n let self = this\n\n ...
[ "0.724392", "0.7010439", "0.7010439", "0.7010439", "0.687676", "0.6817843", "0.67550576", "0.6705468", "0.67049843", "0.6595939", "0.65819085", "0.65819085", "0.6538902", "0.6532248", "0.64544296", "0.6402999", "0.6384868", "0.6349989", "0.6345771", "0.63152045", "0.63140696"...
0.0
-1
Captures an exception event and sends it to Sentry.
function captureException(exception, captureContext) { var syntheticException; try { throw new Error('Sentry syntheticException'); } catch (exception) { syntheticException = exception; } return callOnHub('captureException', exception, { captureContext: captureContext, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function captureException(exception) {\r\n var syntheticException;\r\n try {\r\n throw new Error('Sentry syntheticException');\r\n } catch (exception) {\r\n syntheticException = exception;\r\n }\r\n return callOnHub('captureException', exception, {\r\n originalException: excepti...
[ "0.6757238", "0.6754137", "0.6754137", "0.6212283", "0.61623216", "0.61272734", "0.59746504", "0.5740891", "0.5721274", "0.56346023", "0.5613217", "0.54491013", "0.5407224", "0.53112984", "0.5293176", "0.52926975", "0.5279179", "0.52343935", "0.52094734", "0.51829946", "0.516...
0.65417737
4
Captures a message event and sends it to Sentry.
function captureMessage(message, captureContext) { var syntheticException; try { throw new Error(message); } catch (exception) { syntheticException = exception; } // This is necessary to provide explicit scopes upgrade, without changing the original // arity of the `captureMe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleMessage(message_event) {\n appendToEventLog('nexe sez: ' + message_event.data);\n}", "dispatchMessageEvent(){\n const detail = this.getMessage();\n const event = new CustomEvent('message', {detail});\n this.dispatchEvent(event);\n }", "_eventHandler(message) {\n // ...
[ "0.6476069", "0.6183527", "0.5994304", "0.5896113", "0.579589", "0.57329035", "0.5710347", "0.57103395", "0.5652154", "0.56413186", "0.5607286", "0.5599919", "0.5571477", "0.5565884", "0.5564804", "0.5563031", "0.55622643", "0.5559248", "0.5558566", "0.55480725", "0.5543915",...
0.0
-1
Captures a manually created event and sends it to Sentry.
function captureEvent(event) { return callOnHub('captureEvent', event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onEventCreated(newEventRecord) {}", "triggerEvent(event) {\n\t\treturn _makeRequest('/events', {method: 'POST', body: {event}})\n\t\t\t.then(responseData => {\n\t\t\t\tif(responseData.success){\n\t\t\t\t\tconsole.log('Event Sent', event);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error...
[ "0.6208244", "0.61771953", "0.6031723", "0.60251844", "0.5701248", "0.56615484", "0.56306124", "0.56184113", "0.5598724", "0.5593427", "0.55571496", "0.5550946", "0.55365014", "0.55334854", "0.5509732", "0.5496576", "0.54932994", "0.5485117", "0.5418578", "0.54155225", "0.540...
0.52906096
35
Callback to set context information onto the scope.
function configureScope(callback) { callOnHub('configureScope', callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setContext() {\n\n $context = $( Config.get( 'context' ) );\n\n }", "setContext(context) {\n this.context = context;\n }", "function setScope() {\n\t if (this.opts && this.opts.noScope) return;\n\n\t var target = this.context || this.parentPath;\n\t this.scope = this.getScope(ta...
[ "0.6870521", "0.6496326", "0.64944124", "0.64944124", "0.64558554", "0.64025575", "0.62711966", "0.61644095", "0.61644095", "0.6125142", "0.61220825", "0.61220825", "0.61220825", "0.61220825", "0.61220825", "0.61220825", "0.61220825", "0.60853523", "0.59609556", "0.59436244", ...
0.0
-1
Records a new breadcrumb which will be attached to future events. Breadcrumbs will be added to subsequent events to provide more context on user's actions prior to an error or crash.
function addBreadcrumb(breadcrumb) { callOnHub('addBreadcrumb', breadcrumb); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addBreadcrumbEvent(replay, breadcrumb) {\n if (breadcrumb.category === 'sentry.transaction') {\n return;\n }\n\n if (breadcrumb.category === 'ui.click') {\n replay.triggerUserActivity();\n } else {\n replay.checkAndHandleExpiredSession();\n }\n\n replay.addUpdate(() => {\n...
[ "0.7691086", "0.7598787", "0.70052516", "0.6752495", "0.6734956", "0.673213", "0.654936", "0.6504476", "0.63038087", "0.62710744", "0.6237653", "0.61714536", "0.61586857", "0.6125806", "0.6090838", "0.6077805", "0.60623956", "0.6052799", "0.6051221", "0.60472465", "0.601508",...
0.6987254
6
Sets context data with the given name.
function setContext(name, context) { callOnHub('setContext', name, context); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setContextName(aName) {\n this.contextGUID = aName;\n }", "function setContext(name, context) {\n\t getCurrentHub().setContext(name, context);\n\t}", "function setContext(name, context) {\n getCurrentHub().setContext(name, context);\n }", "setName(context, name) {\n context.commit(\"setName\", ...
[ "0.70002234", "0.68625253", "0.6823114", "0.6653229", "0.6515378", "0.5957811", "0.5943855", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.5909839", "0.5848561", "0.5803892", "0.57447314", "0.5...
0.6757102
5
Set an object that will be merged sent as extra data with the event.
function setExtras(extras) { callOnHub('setExtras', extras); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "trackCustomEvent(context, eventName, keyValuePair) {\n let message = context.message;\n let address = message.address || {};\n let conversation = address.conversation || {};\n let user = address.user || {};\n let item = {\n timestamp: message.timestamp,\n ch...
[ "0.58679676", "0.5795962", "0.57156765", "0.56377435", "0.5609997", "0.55735916", "0.55735916", "0.55735916", "0.54696727", "0.5462039", "0.5430377", "0.5400556", "0.5391335", "0.53900546", "0.5334794", "0.53205204", "0.5252584", "0.52073807", "0.5183364", "0.51824147", "0.51...
0.520283
20
Set an object that will be merged sent as tags data with the event.
function setTags(tags) { callOnHub('setTags', tags); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set tag(value) {}", "set tag(value) {}", "set tag(value) {}", "set tag(value) {}", "_setAll(attr, value) {\n this._forEach(event => {\n event[attr] = value;\n });\n }", "function setTag(key, value) {\n callOnHub('setTag', key, value);\n}", "function setTag(key, value) {\n...
[ "0.5794419", "0.5794419", "0.5794419", "0.5794419", "0.5780464", "0.5742356", "0.5742356", "0.5742356", "0.5720562", "0.57045376", "0.56896764", "0.56470567", "0.56467664", "0.56253386", "0.5620837", "0.5614256", "0.5609965", "0.5579121", "0.5576711", "0.5479952", "0.5420882"...
0.5236603
26
Set key:value that will be sent as extra data with the event.
function setExtra(key, extra) { callOnHub('setExtra', key, extra); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setExtra(key, extra) {\n\t getCurrentHub().setExtra(key, extra);\n\t}", "function setExtra(key, extra) {\n hub.getCurrentHub().setExtra(key, extra);\n}", "_setAll(attr, value) {\n this._forEach(event => {\n event[attr] = value;\n });\n }", "addData(key, value) {\n ...
[ "0.6758972", "0.6590196", "0.6290849", "0.6105442", "0.6020751", "0.6020751", "0.6020751", "0.60145736", "0.5919148", "0.5892519", "0.58784556", "0.5853578", "0.5824539", "0.5804394", "0.579675", "0.57560325", "0.5722774", "0.57019013", "0.56052977", "0.55995727", "0.55995727...
0.6732072
3
Set key:value that will be sent as tags data with the event. Can also be used to unset a tag, by passing `undefined`.
function setTag(key, value) { callOnHub('setTag', key, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTag(key, value) {\n\t getCurrentHub().setTag(key, value);\n\t}", "function setTag(key, value) {\n hub.getCurrentHub().setTag(key, value);\n}", "set tag(value) {}", "set tag(value) {}", "set tag(value) {}", "set tag(value) {}", "setAttribute(key, value) {\n this.handleAttributeChang...
[ "0.7388252", "0.7276539", "0.69813716", "0.69813716", "0.69813716", "0.69813716", "0.6094972", "0.5852529", "0.58091134", "0.5667114", "0.5666816", "0.55955905", "0.5497818", "0.54907686", "0.5485501", "0.5475914", "0.54723275", "0.54723275", "0.5461666", "0.5406284", "0.5396...
0.7494077
2
Updates user context information for future events.
function setUser(user) { callOnHub('setUser', user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateContext(context) {\n this.context = context\n }", "componentDidUpdate() {\n console.log('got context');\n if (typeof this.context.user !== 'undefined' && this.context.user !== null && !this.state.gotContext) {\n console.log('got context');\n this.setState({\n gotContext: tr...
[ "0.6369064", "0.59410673", "0.5883571", "0.5823498", "0.58158994", "0.5797714", "0.5773172", "0.5585451", "0.5561918", "0.55434614", "0.5541032", "0.5539337", "0.5529001", "0.5509531", "0.55050945", "0.5501049", "0.54961145", "0.5471879", "0.5470844", "0.5469577", "0.5469577"...
0.0
-1
Creates a new scope with and executes the given operation within. The scope is automatically removed once the operation finishes or throws. This is essentially a convenience function for: pushScope(); callback(); popScope();
function withScope(callback) { callOnHub('withScope', callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function withScope(callback) {\r\n callOnHub('withScope', callback);\r\n}", "function withScope(callback) {\n\t getCurrentHub().withScope(callback);\n\t}", "function withScope(callback) {\n getCurrentHub().withScope(callback);\n }", "function withScope(callback) {\n hub.getCurrentHub().withScope(cal...
[ "0.55512184", "0.55467296", "0.5428396", "0.53062046", "0.52923465", "0.52188104", "0.520685", "0.5150295", "0.49946928", "0.49946928", "0.49750724", "0.49675876", "0.49675876", "0.49675876", "0.49675876", "0.4943023", "0.48917052", "0.48783162", "0.4853314", "0.48382655", "0...
0.5571814
3
Calls a function on the latest client. Use this with caution, it's meant as in "internal" helper so we don't need to expose every possible function in the shim. It is not guaranteed that the client actually implements the function.
function _callOnClient(method) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } callOnHub.apply(void 0, Object(tslib_es6["e" /* __spread */])(['_invokeClient', method], args)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, tslib_1.__spread(['invokeClient', method], args));\n}", "function _callOnClient(method) {\r\n var args = [];\r\n for (var _i =...
[ "0.6239003", "0.6218275", "0.6150677", "0.6061531", "0.6041756", "0.549602", "0.53594613", "0.5320927", "0.52879894", "0.51359195", "0.51179075", "0.50855476", "0.50855476", "0.5081607", "0.5081607", "0.50780964", "0.50689805", "0.5064234", "0.50615853", "0.49998537", "0.4942...
0.6369153
0
Instruments the given function and sends an event to Sentry every time the function throws an exception.
function wrap(fn, options, before) { if (options === void 0) { options = {}; } if (typeof fn !== 'function') { return fn; } try { // We don't wanna wrap it twice if (fn.__sentry__) { return fn; } // If this has already been wrapped in the past, return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function catcher () { return fn }", "function t(fn) { fn().catch(()=>{}); }", "function registerErrorInstrumentation() {\n utils_1.addInstrumentationHandler({\n callback: errorCallback,\n type: 'error',\n });\n utils_1.addInstrumentationHandler({\n callback: errorCallback,\n ...
[ "0.59350646", "0.57681316", "0.55631185", "0.554062", "0.5518073", "0.55165154", "0.550899", "0.5461436", "0.5387365", "0.5387365", "0.5387365", "0.5244417", "0.52369356", "0.52211416", "0.51921606", "0.5165513", "0.5158118", "0.5158118", "0.51268613", "0.5113226", "0.5107809...
0.50680155
24
Injects the Report Dialog script
function injectReportDialog(options) { if (options === void 0) { options = {}; } if (!options.eventId) { logger.error("Missing eventId option in showReportDialog call"); return; } if (!options.dsn) { logger.error("Missing dsn option in showReportDialog call"); return; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openAppSpecificReportDialog() {\n var dialogHeight = 870;\n var dialogWidth = 1150;\n var frameSource = PageNavUserInfo.webAppContextPath + PageNavUserInfo.homeTabHtmlFragment.replace('.html', '-rpt.html');\n\n var dialogElement = $('#reportingDialog');\n dialogElement.attr('title','Graphic...
[ "0.6951744", "0.67207104", "0.6643555", "0.6617118", "0.65269184", "0.6522248", "0.64529985", "0.6307707", "0.6228531", "0.61412483", "0.60982347", "0.6086603", "0.59964097", "0.593034", "0.58954036", "0.5849465", "0.58185464", "0.57974195", "0.5766553", "0.5758476", "0.57139...
0.7575301
0
Add handler that will be called when given type of instrumentation triggers. Use at your own risk, this might break without changelog notice, only used internally.
function addInstrumentationHandler(handler) { if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') { return; } handlers[handler.type] = handlers[handler.type] || []; handlers[handler.type].push(handler.callback); instrument(handler.type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(callback);\n instrument(type);\n }", "function addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(callback);\n instrument(...
[ "0.78104407", "0.77739877", "0.76422834", "0.69640326", "0.6535237", "0.64611316", "0.60909736", "0.5883711", "0.57714427", "0.5737557", "0.57342017", "0.5613012", "0.5592782", "0.55570316", "0.5514413", "0.5514413", "0.54595834", "0.54228336", "0.53521204", "0.533264", "0.52...
0.69751596
4
Extract `url` from fetch call arguments
function getFetchUrl(fetchArgs) { if (fetchArgs === void 0) { fetchArgs = []; } if (typeof fetchArgs[0] === 'string') { return fetchArgs[0]; } if ('Request' in instrument_global && Object(is["g" /* isInstanceOf */])(fetchArgs[0], Request)) { return fetchArgs[0].url; } return Stri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFetchUrl(fetchArgs = []) {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in WINDOW$4 && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n }", "function getFetchUrl(fetchArgs) {\n i...
[ "0.7501921", "0.7440336", "0.74331087", "0.74233717", "0.741205", "0.631503", "0.6011854", "0.57178736", "0.5716529", "0.5646943", "0.56425995", "0.56322116", "0.5570821", "0.5529866", "0.5529866", "0.5523805", "0.5459142", "0.5454905", "0.54027534", "0.53973454", "0.5392161"...
0.74539983
1