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
Used to store ancestor hierarchy in top level callback
function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) { if (callbackBookkeepingPool.length) { var instance = callbackBookkeepingPool.pop(); instance.topLevelType = topLevelType; instance.nativeEvent = nativeEvent; instance.targetInst = targetInst; return instance; } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) { baseVisitor = base; }\n var ancestors = []\n ;(function c(node, st, override) {\n var type = override || node.type;\n var isNew = node !== ancestors[ancestors.length - 1];\n if (isNew) { ancestors.push(node); ...
[ "0.63650066", "0.63650066", "0.63517284", "0.6194851", "0.60661834", "0.59946203", "0.59337914", "0.5927715", "0.5798319", "0.57487017", "0.5732234", "0.56577903", "0.5634935", "0.5633306", "0.56213325", "0.5599346", "0.5596999", "0.5585871", "0.5580441", "0.5567022", "0.5566...
0.0
-1
Implements an host component that warns when `selected` is set.
function validateProps(element, props) { { // This mirrors the codepath above, but runs for hydration too. // Warn about invalid children here so that client and hydration are consistent. // TODO: this seems like it could cause a DEV-only throw for hydration // if children contains a non-element objec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get _shouldUpdateSelection(){return this.selected!=null;}", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { ...
[ "0.58395463", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.57234395", "0.5659569", "0.55899197", "0.5578761", "0.5577065", "0.5564162", "0.5564162", "0.5548752", "0...
0.0
-1
Validation function for `value` and `defaultValue`.
function checkSelectPropTypes(props) { ReactControlledValuePropTypes.checkPropTypes('select', props); for (var i = 0; i < valuePropNames.length; i++) { var propName = valuePropNames[i]; if (props[propName] == null) { continue; } var isArray = Array.isArray(props[propName]); if (props.mult...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "'validateValue'(value) {}", "function checkValue(value, defaultValue) {\n return (value ? value : defaultValue)\n }", "function validateInput(\n value,\n { float, canBeNegative, canBeEmpty, defaultValue }\n) {\n if (`${value}`.length > 0) {\n const valueAsNumber = float ? parseFloat(value) : pa...
[ "0.7436162", "0.6856192", "0.65868", "0.6431272", "0.64279246", "0.64279246", "0.6416799", "0.6416799", "0.6416799", "0.6316331", "0.6230596", "0.6195563", "0.616348", "0.61238676", "0.6050824", "0.6044303", "0.6036909", "0.59743184", "0.59359854", "0.58691984", "0.58653325",...
0.0
-1
Implements a host component that allows optionally setting the props `value` and `defaultValue`. If `multiple` is false, the prop must be a stringable. If `multiple` is true, the prop must be an array of stringables. If `value` is not supplied (or null/undefined), user actions that change the selected option will trigg...
function getHostProps$2(element, props) { return _assign({}, props, { value: undefined }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectValueType(props,propName,componentName){if(props[propName]==null){return null;}if(props.multiple){if(!Array.isArray(props[propName])){return new Error(\"The `\"+propName+\"` prop supplied to <select> must be an array if \"+\"`multiple` is true.\");}}else {if(Array.isArray(props[propName])){return ne...
[ "0.609948", "0.6064312", "0.58252144", "0.58252144", "0.5736317", "0.5711623", "0.5706696", "0.5706696", "0.5706696", "0.5706696", "0.5706696", "0.5686644", "0.5681991", "0.5642339", "0.56335306", "0.56335306", "0.56335306", "0.56335306", "0.56335306", "0.56335306", "0.563353...
0.0
-1
Implements a host component that allows setting `value`, and `defaultValue`. This differs from the traditional DOM API because value is usually set as PCDATA children. If `value` is not supplied (or null/undefined), user actions that affect the value will trigger updates to the element. If `value` is supplied (and not ...
function getHostProps$3(element, props) { var node = element; !(props.dangerouslySetInnerHTML == null) ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0; // Always set children to the same thing. In IE9, the selection range will // get reset if `textContent` is mutated...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set value(val) {\n if (this.#el) this.#el.value = val;\n else this.#value = val;\n }", "setValue(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n /* TODO: Add validation */\n if(newValue !=thisWidget.value && thisWidget.isValid(newValue)){\n this...
[ "0.6420179", "0.5994213", "0.59778804", "0.59778804", "0.59778804", "0.59778804", "0.59778804", "0.59778804", "0.59778804", "0.595303", "0.59287095", "0.5901279", "0.58803374", "0.58803374", "0.58803374", "0.58803374", "0.58803374", "0.58803374", "0.58803374", "0.58232087", "...
0.0
-1
Assumes there is no parent namespace.
function getIntrinsicNamespace(type) { switch (type) { case 'svg': return SVG_NAMESPACE; case 'math': return MATH_NAMESPACE; default: return HTML_NAMESPACE$1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentObject(){\r\n var obj = parent;\r\n if (namespace !== \"\") {\r\n for (var i = 0, ii = namespace.split(\".\"); i < ii.length; i++) {\r\n obj = obj[ii[i]];\r\n }\r\n }\r\n return obj.easyXDM;\r\n}", "function namespaceHTMLInternal() {\n instructionState.lF...
[ "0.5928143", "0.57877576", "0.57877576", "0.57877576", "0.57877576", "0.57877576", "0.57877576", "0.5742799", "0.56879073", "0.56718105", "0.56614155", "0.5639237", "0.5580645", "0.5441353", "0.5440069", "0.5409363", "0.53972787", "0.5368248", "0.5357589", "0.53277874", "0.53...
0.0
-1
Hyphenates a camelcased CSS property name, for example: > hyphenateStyleName('backgroundColor') hyphenateStyleName('MozTransition') hyphenateStyleName('msTransition') < "mstransition" As Modernizr suggests ( an `ms` prefix is converted to `ms`.
function hyphenateStyleName(name) { return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePa...
[ "0.8186789", "0.8186789", "0.8186789", "0.8186789", "0.8186789", "0.8186789", "0.8186789", "0.8186789", "0.79489446" ]
0.7949753
82
Operations for dealing with CSS properties. This creates a string that is expected to be equivalent to the style attribute generated by serverside rendering. It bypasses warnings and security checks so it's not safe to use this value for anything other than comparison. It is only used in DEV for SSR validation.
function createDangerousStringForStyles(styles) { { var serialized = ''; var delimiter = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } var styleValue = styles[styleName]; if (styleValue != null) { var isCustomProperty = sty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get styles () {\n return css`${unsafeCSS(style)}`\n }", "get cssText() {\n var properties = [];\n for (var i = 0, length = this.length; i < length; ++i) {\n var name = this[i];\n var value = this.getPropertyValue(name);\n var priority = this.getPropertyPriority(name);\n if (p...
[ "0.67456913", "0.66124284", "0.6601223", "0.65231293", "0.65231293", "0.64359957", "0.640574", "0.6366605", "0.629795", "0.61984617", "0.6183011", "0.61693394", "0.61689234", "0.61689234", "0.6165965", "0.6114393", "0.60754764", "0.60754764", "0.60754764", "0.60754764", "0.60...
0.0
-1
Calculate the diff between the two objects.
function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { { validatePropertiesInDevelopment(tag, nextRawProps); } var updatePayload = null; var lastProps = void 0; var nextProps = void 0; switch (tag) { case 'input': lastProps = getHostProps(domElement, las...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function diff(v1, v2) {\n return {\n x: v1.x - v2.x,\n y: v1.y - v2.y\n };\n}", "function diff(a, b) {\n totalDifference += Math.abs(a - b);\n }", "getDifference(other) {\n return {\n xDiff: other.x - this.x,\n yDiff: other.y - this.y,\n };\n }", "functi...
[ "0.73584795", "0.70092916", "0.6960951", "0.6865758", "0.6865758", "0.6865758", "0.6865758", "0.6865758", "0.6865758", "0.66720665", "0.6600449", "0.65714246", "0.65645313", "0.6558132", "0.65098464", "0.6492369", "0.6446226", "0.6443762", "0.6413908", "0.6397446", "0.6332192...
0.0
-1
Renderers that don't support persistence can reexport everything from this module.
function shim() { invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug...
[ "0.62700546", "0.62700546", "0.62700546", "0.62700546", "0.6054596", "0.6054596", "0.6054596", "0.6018975", "0.6018975", "0.6018975", "0.6018975", "0.5889278", "0.58279085", "0.58276945", "0.5709044", "0.5709044", "0.5658175", "0.5428384", "0.5428384", "0.5420834", "0.5420834...
0.5583185
50
1 unit of expiration time represents 10ms.
function msToExpirationTime(ms) { // Always add an offset so that we don't clash with the magic number for NoWork. return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_O...
[ "0.69083685", "0.69083685", "0.69083685", "0.69083685", "0.68177795", "0.68177795", "0.68177795", "0.6728504", "0.66832036", "0.66832036", "0.66832036", "0.6663674", "0.66431606", "0.66385615", "0.65983444", "0.65983444", "0.65983444", "0.6567885", "0.65556103", "0.65173113", ...
0.0
-1
This is used to create an alternate fiber to do work on.
function createWorkInProgress(current, pendingProps, expirationTime) { var workInProgress = current.alternate; if (workInProgress === null) { // We use a double buffering pooling technique because we know that we'll // only ever need at most two versions of a tree. We pool the "other" unused // node tha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createFiber(func) {\n return this.createLaxFiber.apply(this, __arguments.withContext(this.LAX_EMPTY_CONTEXT, arguments));\n }", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double bu...
[ "0.6190356", "0.5820447", "0.5820447", "0.5820447", "0.5820447", "0.5820447", "0.5820447", "0.5820447", "0.5779212", "0.5731988", "0.5643045", "0.5643045", "0.5643045", "0.5643045", "0.5643045", "0.5643045", "0.5643045", "0.5643045", "0.5643045", "0.5643045", "0.5643045", "...
0.56118226
44
Used for stashing WIP properties to replay failed work in DEV.
function assignFiberPropertiesInDEV(target, source) { if (target === null) { // This Fiber's initial properties will always be overwritten. // We only use a Fiber to ensure the same hidden class so DEV isn't slow. target = createFiber(IndeterminateComponent, null, null, NoContext); } // This is inten...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if (enableProfilerTimer && unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n }", "function InternalBreakpointState() { }", "function InternalBreakpointState() {}", ...
[ "0.6011011", "0.54045147", "0.53980833", "0.53980833", "0.5266002", "0.5239496", "0.5219925", "0.51719093", "0.5114947", "0.50887054", "0.5083666", "0.5075196", "0.50734526", "0.5067331", "0.5053954", "0.50185883", "0.49673146", "0.4958323", "0.494461", "0.49131462", "0.49120...
0.47266462
72
TODO: This should be lifted into the renderer. The following attributes are only used by interaction tracing builds. They enable interactions to be associated with their async work, And expose interaction metadata to the React DevTools Profiler plugin. Note that these attributes are only defined when the enableSchedule...
function createFiberRoot(containerInfo, isConcurrent, hydrate) { // Cyclic construction. This cheats the type system right now because // stateNode is any. var uninitializedFiber = createHostRootFiber(isConcurrent); var root = void 0; if (enableSchedulerTracing) { root = { current: uninitializedFib...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFiberRoot(containerInfo,isConcurrent,hydrate){// Cyclic construction. This cheats the type system right now because\n// stateNode is any.\nvar uninitializedFiber=createHostRootFiber(isConcurrent);var root=void 0;if(enableSchedulerTracing){root={current:uninitializedFiber,containerInfo:containerInfo,...
[ "0.5916933", "0.5916933", "0.55570924", "0.521612", "0.521612", "0.5204892", "0.5204892", "0.5204892", "0.5204892", "0.5204892", "0.51804674", "0.5112295", "0.5112295", "0.5112295", "0.5112295", "0.5112295", "0.5112295", "0.49894264", "0.49894264", "0.49840018", "0.49840018",...
0.5151152
27
TODO: Offscreen updates should never suspend. However, a promise that suspended inside an offscreen subtree should be able to ping at the priority of the outer render.
function markPendingPriorityLevel(root, expirationTime) { // If there's a gap between completing a failed root and retrying it, // additional updates may be scheduled. Clear `didError`, in case the update // is sufficient to fix the error. root.didError = false; // Update the latest and earliest pending time...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "if (\n workInProgressSuspendedReason === SuspendedOnData &&\n workInProgressRoot === root\n ) {\n // Mark the root as ready to continue rendering.\n workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n }", "async _enq...
[ "0.628028", "0.5832987", "0.5647186", "0.56199056", "0.555473", "0.55382264", "0.5519685", "0.5408146", "0.53939927", "0.5387201", "0.5383105", "0.53370017", "0.53370017", "0.5302793", "0.5293255", "0.5247291", "0.5244524", "0.52430654", "0.52430654", "0.5229359", "0.5229359"...
0.0
-1
Invokes the mount lifecycles on a previously never rendered instance.
function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { { checkClassInstance(workInProgress, ctor, newProps); } var instance = workInProgress.stateNode; instance.props = newProps; instance.state = workInProgress.memoizedState; instance.refs = emptyRefsObject; var contextT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mount() {\n this.willMount();\n this.render();\n this.didMount();\n }", "componenetWillMount() { }", "function runMountCallback() {\n if (!hasMountCallbackRun && currentMountCallback) {\n hasMountCallbackRun = true;\n reflow(popper);\n currentMountCallback();\n...
[ "0.69563764", "0.676621", "0.6732734", "0.6719309", "0.649951", "0.6378189", "0.6375986", "0.6356537", "0.6339795", "0.6286211", "0.62473047", "0.6208389", "0.6208389", "0.6208389", "0.6208389", "0.6208389", "0.6208389", "0.61906123", "0.61906123", "0.6090201", "0.6086474", ...
0.0
-1
Invokes the update lifecycles and returns false if it shouldn't rerender.
function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) { var instance = workInProgress.stateNode; var oldProps = workInProgress.memoizedProps; instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "needsUpdate() {\n // Call subclass lifecycle method\n return (\n this.internalState.needsUpdate ||\n this.hasUniformTransition() ||\n this.shouldUpdateState(this._getUpdateParams())\n );\n // End lifecycle method\n }", "shouldComponentUpdate(next_props){\n if (!next_props.update){\...
[ "0.7417848", "0.73684907", "0.73239565", "0.7296705", "0.7289543", "0.7108138", "0.7067573", "0.70314443", "0.702017", "0.69990176", "0.69611555", "0.69611555", "0.69410723", "0.69229597", "0.68923277", "0.68425786", "0.6839337", "0.683208", "0.6773803", "0.67644703", "0.6764...
0.0
-1
This wrapper function exists because I expect to clone the code in each path to be able to optimize each path individually by branching early. This needs a compiler or we can do it manually. Helpers that don't need this branching live outside of this function.
function ChildReconciler(shouldTrackSideEffects) { function deleteChild(returnFiber, childToDelete) { if (!shouldTrackSideEffects) { // Noop. return; } // Deletions are added in reversed order so we add it to the front. // At this point, the return fiber's effect list is empty except for ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function o0(o1)\n{\n var o2 = -1;\n try {\nfor (var o259 = 0; o3 < o1.length; function (o502, name, o38, o781, o782, o837, o585, o838, o549) {\n try {\no839.o468();\n}catch(e){}\n // TODO we should allow people to just pass in a complete filename instead\n // of parent and name being tha...
[ "0.5566749", "0.5321921", "0.5182643", "0.518093", "0.5172283", "0.51552963", "0.5129355", "0.5107892", "0.5089678", "0.5080897", "0.49806628", "0.4944919", "0.49324825", "0.49042064", "0.48447847", "0.483075", "0.48167306", "0.48063734", "0.4797872", "0.47962672", "0.4789303...
0.0
-1
Warns if there is a duplicate or missing key
function warnOnInvalidKey(child, knownKeys) { { if (typeof child !== 'object' || child === null) { return knownKeys; } switch (child.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: warnForMissingKey(child); var key = child.key; if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkDuplicates(error) {\n if (error.name === \"MongoError\" && error.code === 11000) {\n // check if the error from Mongodb is duplication error\n // eslint-disable-next-line no-useless-escape\n const regex = /index\\:\\ (?:.*\\.)?\\$?(?:([_a-z0-9]*)(?:_\\d*)|([_a-z0-9]*))\\s*dup key/i;\n c...
[ "0.64586234", "0.63743407", "0.62774295", "0.61566454", "0.61478174", "0.61425227", "0.61372644", "0.61251426", "0.61251426", "0.61219513", "0.6114083", "0.6114083", "0.6114083", "0.61133426", "0.61059004", "0.6096614", "0.60936666", "0.6082668", "0.5989997", "0.59782195", "0...
0.58638847
68
This API will tag the children with the sideeffect of the reconciliation itself. They will be added to the sideeffect list as we pass through the children and the parent.
function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { // This function is not recursive. // If the top level item is an array, we treat it as a set of children, // not as a fragment. Nested arrays on the other hand will be treated as // fragment nodes. Recursion happe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) // Noop.\n return;\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's ...
[ "0.6969301", "0.6940885", "0.6940885", "0.6940885", "0.6940885", "0.6933988", "0.6933988", "0.6933988", "0.6933988", "0.6933988", "0.6933988", "0.69281214", "0.69281214", "0.69281214", "0.6927984", "0.6927984", "0.6927984", "0.69240123", "0.6921755", "0.6913916", "0.6900293",...
0.0
-1
This module is forked in different environments. By default, return `true` to log errors to the console. Forks can return `false` if this isn't desirable.
function showErrorDialog(capturedError) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static runningOnNode ()\n\t\t{ let ud = \"undefined\";\n\n\t\t\tif (typeof process === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process.versions )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process.versions.node )\n\t\t\t{ return false;\n\t\t\t}\n\t\...
[ "0.6475297", "0.59486264", "0.5839173", "0.5585765", "0.558075", "0.546818", "0.54383403", "0.54279375", "0.54081243", "0.54081243", "0.53965807", "0.53764623", "0.53750944", "0.53577983", "0.53577983", "0.53331476", "0.52272946", "0.51996243", "0.5183756", "0.5120743", "0.51...
0.0
-1
Capture errors so they don't interrupt unmounting.
function safelyCallComponentWillUnmount(current$$1, instance) { { invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance); if (hasCaughtError()) { var unmountError = clearCaughtError(); captureCommitPhaseError(current$$1, unmountError); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "simulateUnmount() {\n this.volumeUnmountListener(this.volumeInfo_.volumeId);\n }", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)errorOrDestroy(dest,er);}// Make sure our error handler is attached before userland ones.", "functi...
[ "0.63805383", "0.59244186", "0.58519024", "0.58519024", "0.58519024", "0.5847956", "0.5822762", "0.5822762", "0.5822762", "0.57689387", "0.5741674", "0.5741674", "0.5741674", "0.5741674", "0.5741674", "0.57310647", "0.57310647", "0.57310647", "0.5688468", "0.5688468", "0.5661...
0.0
-1
Useroriginating errors (lifecycles and refs) should not interrupt deletion, so don't let them throw. Hostoriginating errors should interrupt deletion, so it's okay
function commitUnmount(current$$1) { onCommitUnmount(current$$1); switch (current$$1.tag) { case FunctionComponent: case ForwardRef: case MemoComponent: case SimpleMemoComponent: { var updateQueue = current$$1.updateQueue; if (updateQueue !== null) { var lastEffect =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "detach() {\n throw new Error('Not Implemented');\n }", "detach() {\n throw new Error('Not Implemented');\n }", "function deleteErrHandler(error, result) {\n\tif (error) {\n\t\tlog(\"cannot delete data\")\n\t\tthrow error\n\t} else {\n\t\tlog(\"Delete Success\") \n\t}\n}", "componentWillUnmount() {\n ...
[ "0.60740894", "0.60740894", "0.59128195", "0.5904183", "0.5881394", "0.58266497", "0.5804042", "0.5789297", "0.5756162", "0.570649", "0.5681173", "0.5672151", "0.5633895", "0.5633895", "0.56317246", "0.56044316", "0.5545724", "0.5536082", "0.5536082", "0.5536082", "0.55185324...
0.0
-1
Creates a unique async expiration time.
function computeUniqueAsyncExpiration() { var currentTime = requestCurrentTime(); var result = computeAsyncExpiration(currentTime); if (result >= lastUniqueAsyncExpiration) { // Since we assume the current time monotonically increases, we only hit // this branch when computeUniqueAsyncExpiration is fired ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeUniqueAsyncExpiration() {\n var currentTime = requestCurrentTime();\n var result = computeAsyncExpiration(currentTime);\n if (result <= lastUniqueAsyncExpiration) {\n // Since we assume the current time monotonically increases, we only hit\n // this branch when computeUniqueAsyncExpiration...
[ "0.680362", "0.680362", "0.680362", "0.680362", "0.680362", "0.680362", "0.680362", "0.680362", "0.67899007", "0.677218", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6756696", "0.6756696", "0.675669...
0.67935026
29
For every call to renderRoot, one of onFatal, onComplete, onSuspend, and onYield is called upon exiting. We use these in lieu of returning a tuple. I've also chosen not to inline them into renderRoot because these will eventually be lifted into the renderer.
function onFatal(root) { root.finishedWork = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n ...
[ "0.50572556", "0.49914792", "0.49895117", "0.49076152", "0.49076152", "0.49076152", "0.49040875", "0.49036878", "0.4875493", "0.4875493", "0.4875493", "0.4816398", "0.4816398", "0.4816398", "0.4801513", "0.4801513", "0.4801513", "0.4801513", "0.4801513", "0.4801513", "0.48015...
0.48587564
41
requestWork is called by the scheduler whenever a root receives an update. It's up to the renderer to call renderRoot at some point in the future.
function requestWork(root, expirationTime) { addRootToSchedule(root, expirationTime); if (isRendering) { // Prevent reentrancy. Remaining work will be scheduled at the end of // the currently rendering batch. return; } if (isBatchingUpdates) { // Flush work at the end of the batch. if (isUn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're...
[ "0.7654429", "0.7654429", "0.76327115", "0.76327115", "0.76327115", "0.7145466", "0.7145466", "0.7145466", "0.7101676", "0.7082883", "0.7076143", "0.7076143", "0.7076143", "0.7076143", "0.7076143", "0.7076143", "0.7076143", "0.7076143", "0.7076143", "0.7076143", "0.7076143", ...
0.69831103
93
TODO: Batching should be implemented at the renderer level, not inside the reconciler.
function batchedUpdates$1(fn, a) { var previousIsBatchingUpdates = isBatchingUpdates; isBatchingUpdates = true; try { return fn(a); } finally { isBatchingUpdates = previousIsBatchingUpdates; if (!isBatchingUpdates && !isRendering) { performSyncWork(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateBatches() {\n if (this.dirty === this.cacheDirty) {\n return;\n }\n if (this.graphicsData.length === 0) {\n return;\n }\n if (this.dirty !== this.cacheDirty) {\n for (var i = 0; i < this.graphicsData.length; i++) {\n var data ...
[ "0.66131675", "0.6574288", "0.65535474", "0.65384126", "0.65384126", "0.6136533", "0.6087616", "0.6049396", "0.6025469", "0.5977921", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.588165", "0.5860314", ...
0.0
-1
TODO: Batching should be implemented at the renderer level, not inside the reconciler.
function unbatchedUpdates(fn, a) { if (isBatchingUpdates && !isUnbatchingUpdates) { isUnbatchingUpdates = true; try { return fn(a); } finally { isUnbatchingUpdates = false; } } return fn(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateBatches() {\n if (this.dirty === this.cacheDirty) {\n return;\n }\n if (this.graphicsData.length === 0) {\n return;\n }\n if (this.dirty !== this.cacheDirty) {\n for (var i = 0; i < this.graphicsData.length; i++) {\n var data ...
[ "0.66131675", "0.6574288", "0.65535474", "0.65384126", "0.65384126", "0.6136533", "0.6087616", "0.6049396", "0.6025469", "0.5977921", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.588165", "0.5860314", ...
0.0
-1
TODO: Batching should be implemented at the renderer level, not within the reconciler.
function flushSync(fn, a) { !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0; var previousIsBatchingUpdates = isBatchingUpdates; isBatchingUpdates = true; try { return syncUpdates(fn, a); } finally { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateBatches() {\n if (this.dirty === this.cacheDirty) {\n return;\n }\n if (this.graphicsData.length === 0) {\n return;\n }\n if (this.dirty !== this.cacheDirty) {\n for (var i = 0; i < this.graphicsData.length; i++) {\n var data ...
[ "0.6657303", "0.6613845", "0.6612785", "0.65445775", "0.65445775", "0.612318", "0.61036456", "0.60438234", "0.60351276", "0.5958418", "0.5915346", "0.5915346", "0.5915346", "0.5915346", "0.5915346", "0.5915346", "0.5915346", "0.5915346", "0.5915346", "0.58719826", "0.5863909"...
0.0
-1
This file intentionally does not have the Flow annotation. Don't add it. See `./inlinetyped.js` for an explanation.
function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; return { // This tag allow us to uniquely identify this as a React Portal $$typeof: REACT_POR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function notInlineUseCase() { console.log('Not an inline use case');}", "function anotherFunction() {\n /***/\n console.log(\"This function.\");\n}", "getHeader() {\n return `/**\n * IN2 Logic Tree File\n *\n * This file has been generated by an IN2 compiler.\n */\\n/*eslint-disable-line*/func...
[ "0.6112406", "0.55779207", "0.555551", "0.5547137", "0.54756045", "0.5435487", "0.5422383", "0.53985286", "0.5337975", "0.5307519", "0.52890974", "0.52747023", "0.5250376", "0.5239197", "0.52299", "0.52216244", "0.52015775", "0.5189838", "0.5189838", "0.5175093", "0.5165586",...
0.0
-1
AsyncMode should be deprecated
function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() inst...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setAsync(){\n this.async = true;\n }", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactI...
[ "0.71772456", "0.71477026", "0.71477026", "0.71477026", "0.707457", "0.6901749", "0.6824169", "0.6809441", "0.6809441", "0.6793582", "0.6785743", "0.67846984", "0.6757779", "0.6750946", "0.6745032", "0.6745032", "0.67303115", "0.67276573", "0.67276573", "0.67276573", "0.67276...
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.5821923", "0.5634359", "0.55542856", "0.5487989", "0.53973085", "0.538397", "0.5361659", "0.5325594", "0.5321544", "0.53157055", "0.53157055", "0.5292843", "0.5265816", "0.52162015", "0.51971173", "0.5190638", "0.5190441", "0.5154201", "0.5139761", "0.5133065", "0.51239264...
0.0
-1
Call this.constructor.gDSFP to support subclasses. Use the setState() updater to ensure state isn't stale in certain edge cases.
function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function componentWillMount(){// Call this.constructor.gDSFP to support sub-classes.\nvar state=this.constructor.getDerivedStateFromProps(this.props,this.state);if(state!==null&&state!==undefined){this.setState(state);}}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-...
[ "0.6140642", "0.5687122", "0.55800605", "0.55448085", "0.55448085", "0.55448085", "0.54360604", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495", "0.5373495"...
0.0
-1
Check whether some DOM node is our Component's node.
function isNodeFound(current, componentNode, ignoreClass) { if (current === componentNode) { return true; } // SVG <use/> elements do not technically reside in the rendered DOM, so // they do not have classList directly, but they offer a link to their // corresponding element, which can have classList. This...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "possiblyComponent(node) {\n var _a;\n return !!((_a = node.tag) === null || _a === void 0 ? void 0 : _a[0].match(/[A-Z]/));\n }", "function isNodeFound(current, componentNode, ignoreClass) {\n if (current === componentNode) {\n return true;\n } // SVG <use/> elements do not technicall...
[ "0.7323763", "0.7034254", "0.6984867", "0.6981802", "0.69597393", "0.69522387", "0.69413084", "0.69011825", "0.6876358", "0.6876358", "0.6876358", "0.6876358", "0.6876358", "0.68568224", "0.68488103", "0.68488103", "0.6841114", "0.6840817", "0.6786972", "0.6740172", "0.665935...
0.69945806
14
Try to find our node in a hierarchy of nodes, returning the document node as highest node if our node is not found in the path up.
function findHighest(current, componentNode, ignoreClass) { if (current === componentNode) { return true; } // If source=local then this event came from 'somewhere' // inside and should be ignored. We could handle this with // a layered approach, too, but that requires going back to // thinking in terms o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findTreeUp(node, cb) {\n if (!node) {\n return null;\n }\n\n let currentNode = node;\n while (currentNode && !cb(currentNode)) {\n currentNode = currentNode.parentNode;\n }\n\n const isMatchingNode = cb(currentNode);\n if (!isMatchingNode) {\n return null;\n }\n\n return currentNode;\n}"...
[ "0.63457906", "0.62541586", "0.6204854", "0.5981198", "0.5971256", "0.59067476", "0.588725", "0.5876946", "0.5860901", "0.58549756", "0.58547807", "0.5843045", "0.5803292", "0.5797312", "0.5725534", "0.572389", "0.572242", "0.5697381", "0.5697381", "0.5697381", "0.56955713", ...
0.0
-1
Check if the browser scrollbar was clicked
function clickedScrollbar(evt) { return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.clientY;\n }", "function clickedScrollbar(evt) {\n return document.documentElement.clientWidth <= evt.clientX || document.documentElement.clientHeight <= evt.client...
[ "0.7833577", "0.7768466", "0.77142614", "0.7620115", "0.7620115", "0.69745284", "0.6919431", "0.6919431", "0.6919431", "0.6919431", "0.6866918", "0.6589785", "0.65287864", "0.6527714", "0.6275232", "0.62586516", "0.62581915", "0.62207425", "0.61860746", "0.6136719", "0.613079...
0.78270227
11
Options for addEventHandler and removeEventHandler
function getEventHandlerOptions(instance, eventName) { var handlerOptions = null; var isTouchEvent = touchEvents.indexOf(eventName) !== -1; if (isTouchEvent && passiveEventSupport) { handlerOptions = { passive: !instance.props.preventDefault }; } return handlerOptions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEventHandler() {\n //this.buttonMode = true;\n //this.mouseChildren = false;\n p.tabObj[p._id].buttonMode = true;\n /* this.addEventListener(MouseEvent.MOUSE_UP, eventHandler, false, 0, true)\n this.addEventListener(MouseEvent.MOUSE_OVER, eventHandler, false, 0, true)\n ...
[ "0.6683469", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66358", "0.66258645", "0.65188587", "0.6517701", "0.6239...
0.6024266
45
This function generates the HOC function that you'll use in order to impart onOutsideClick listening to an arbitrary component. It gets called at the end of the bootstrapping code to yield an instance of the onClickOutsideHOC function defined inside setupHOC().
function onClickOutsideHOC(WrappedComponent, config) { var _class, _temp; var componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; return _temp = _class = /*#__PURE__*/ function (_Component) { _inheritsLoose(onClickOutside, _Component); function onClickOutside(props)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onClickOutsideHOC(WrappedComponent, config) {\n\t var _class, _temp;\n\t\n\t return _temp = _class =\n\t /*#__PURE__*/\n\t function (_Component) {\n\t _inheritsLoose(onClickOutside, _Component);\n\t\n\t function onClickOutside(props) {\n\t var _this;\n\t\n\t _this = _Component.call(thi...
[ "0.8294072", "0.82843995", "0.81355214", "0.81355214", "0.8114962", "0.8114962", "0.8114962", "0.8114962", "0.80014557", "0.80014557", "0.80014557", "0.7991968", "0.79889643", "0.7974776", "0.7963424", "0.79229033", "0.7833751", "0.7443441", "0.7203471", "0.7157435", "0.71150...
0.8050874
9
A wrapper that knows if it's "active" or not.
function NavLink(_ref) { var _ref$ariaCurrent = _ref["aria-current"], ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent, _ref$activeClassName = _ref.activeClassName, activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName, activeStyle = _ref.acti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "is_active() {\n\t\t\treturn this.active\n\t\t}", "function IsActive()\n{\n\treturn m_active;\n}", "get isActive () {\n\t\treturn this._active === true;\n\t}", "get active() { return this._isActive; }", "get active() {\n\t\tconst value = this.getAttribute('active');\n\t\tif (value !== null) {\n\t\t\treturn ...
[ "0.80158913", "0.77562207", "0.76838785", "0.7446844", "0.73586476", "0.7333014", "0.7284783", "0.7251734", "0.7251734", "0.7251734", "0.7168022", "0.7096914", "0.70916927", "0.70916927", "0.70916927", "0.70916927", "0.7084259", "0.70043105", "0.69529426", "0.6911108", "0.688...
0.0
-1
The public API for prompting the user before navigating away from a screen.
function Prompt(_ref) { var message = _ref.message, _ref$when = _ref.when, when = _ref$when === void 0 ? true : _ref$when; return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(context.Consumer, null, function (context$$1) { !context$$1 ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function navigateAway() {\n switch (document.body.id) {\n case 'options':\n chrome.runtime.sendMessage({\n 'name': 'OptionsSave',\n 'excludes': gTplData.options.globalExcludesStr.trim(),\n 'useCodeMirror': gTplData.options.useCodeMirror,\n }, logUnhandledError);\n break;\n ...
[ "0.63582224", "0.6336378", "0.6291143", "0.60359854", "0.6020931", "0.6016651", "0.59726274", "0.5955357", "0.5907807", "0.5901265", "0.59011984", "0.58868617", "0.586042", "0.58596414", "0.5846708", "0.5844033", "0.5826336", "0.5799647", "0.5799465", "0.5793241", "0.5777686"...
0.0
-1
Public API for generating a URL pathname from a path and parameters.
function generatePath(path, params) { if (path === void 0) { path = "/"; } if (params === void 0) { params = {}; } return path === "/" ? path : compilePath(path)(params, { pretty: true }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makePath(var_args){\n\t var result = join(slice(arguments), '/');\n\t // need to disconsider duplicate '/' after protocol (eg: 'http://')\n\t return result.replace(/([^:\\/]|^)\\/{2,}/g, '$1/');\n\t }", "function makePath(var_args){\n var result = join(slice(arguments), '/...
[ "0.72512805", "0.7178873", "0.7178873", "0.68712044", "0.68696356", "0.6721023", "0.6654717", "0.65425456", "0.644447", "0.6395405", "0.63352627", "0.63270307", "0.628425", "0.62621105", "0.62249243", "0.61872166", "0.6135351", "0.61011547", "0.609315", "0.6084816", "0.608481...
0.6648755
43
The public API for navigating programmatically with a component.
function Redirect(_ref) { var computedMatch = _ref.computedMatch, to = _ref.to, _ref$push = _ref.push, push = _ref$push === void 0 ? false : _ref$push; return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(context.Consumer, null, function (context$$1) { !context$$1 ? true ? Object...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "navigateToComponent(event) {\n let contractCode = event.currentTarget.dataset.item;\n // eslint-disable-next-line no-console\n console.log('contractcode:'+contractCode);\n this[NavigationMixin.Navigate]({\n type: 'standard__component',\n attributes: {\n ...
[ "0.61906135", "0.58890885", "0.5832343", "0.5768707", "0.56196696", "0.55640495", "0.55464345", "0.5516633", "0.547687", "0.54623574", "0.54590297", "0.5450194", "0.5434399", "0.54113895", "0.54036254", "0.5395067", "0.53890693", "0.53617954", "0.53516555", "0.53435045", "0.5...
0.0
-1
Public API for matching a URL pathname to a path.
function matchPath(pathname, options) { if (options === void 0) { options = {}; } if (typeof options === "string") options = { path: options }; var _options = options, path = _options.path, _options$exact = _options.exact, exact = _options$exact === void 0 ? false : _options$exact, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchPath(pathname,options){if(options===void 0){options={};}if(typeof options===\"string\")options={path:options};var _options=options,path=_options.path,_options$exact=_options.exact,exact=_options$exact===void 0?false:_options$exact,_options$strict=_options.strict,strict=_options$strict===void 0?false:...
[ "0.7498675", "0.6678324", "0.66614777", "0.66614777", "0.66614777", "0.66614777", "0.66614777", "0.66614777", "0.66614777", "0.66610277", "0.6649874", "0.6640097", "0.6640097", "0.6640097", "0.6640097", "0.6640097", "0.6640097", "0.6640097", "0.6640097", "0.6640097", "0.66400...
0.66393703
48
A public higherorder component to access the imperative API
function withRouter(Component) { var C = function C(props) { var wrappedComponentRef = props.wrappedComponentRef, remainingProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_10__["default"])(props, ["wrappedComponentRef"]); return react__WEBPACK_IMPORTED_M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FunctionalComponent() {}", "function higherOrder(a) {\n a(); \n}", "function purchaseItem(...fns) => fns.reduce(compose)\n\n{} // so I have to make sure that I have returned in here this property", "_isolatedComputeForWrapper(component) {\n const computations = ReactInterpreter.computations(...
[ "0.6070405", "0.57829124", "0.57713205", "0.56781846", "0.5601167", "0.53402764", "0.53382486", "0.52356786", "0.5168645", "0.5168645", "0.5168645", "0.5168645", "0.5148882", "0.5085232", "0.50566614", "0.50550544", "0.5034251", "0.50302976", "0.50270486", "0.5023248", "0.502...
0.0
-1
============================== Handle Input Change ==============================
function handleInputChange(inputValue, actionMeta, onInputChange) { if (onInputChange) { var newValue = onInputChange(inputValue, actionMeta); if (typeof newValue === 'string') return newValue; } return inputValue; } // ==============================
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MCH_InputChange(el_input) {\n console.log(\" ----- MCH_InputChange ----\")\n console.log(\" el_input\", el_input)\n mod_MCH_dict.has_changes = true;\n MCH_Hide_Inputboxes();\n }", "internalOnInput(event) {\n const me = this; // Keep the value synced with the input...
[ "0.7906882", "0.7789652", "0.772896", "0.76889163", "0.76626784", "0.7653833", "0.75936943", "0.75833017", "0.74324083", "0.7399811", "0.7396984", "0.7364131", "0.731277", "0.72548616", "0.7208312", "0.7207299", "0.7176947", "0.7139259", "0.71324915", "0.7127031", "0.7063114"...
0.65291756
88
Get bounding client object ============================== cannot get keys using array notation with DOMRect
function getBoundingClientObj(element) { var rect = element.getBoundingClientRect(); return { bottom: rect.bottom, height: rect.height, left: rect.left, right: rect.right, top: rect.top, width: rect.width }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBoundingClientObj(element) {\n\t var rect = element.getBoundingClientRect();\n\t return {\n\t bottom: rect.bottom,\n\t height: rect.height,\n\t left: rect.left,\n\t right: rect.right,\n\t top: rect.top,\n\t width: rect.width\n\t };\n\t}", "getRects() {\n if (!this.moving) { re...
[ "0.6845323", "0.64758277", "0.6429971", "0.63873583", "0.63240075", "0.6286467", "0.62292117", "0.6214511", "0.62021023", "0.6200008", "0.6194981", "0.61437255", "0.61067104", "0.6088698", "0.60862935", "0.6063183", "0.60539836", "0.6046679", "0.60333925", "0.6012902", "0.601...
0.6879288
8
Touch Capability Detector ==============================
function isTouchCapable() { try { document.createEvent('TouchEvent'); return true; } catch (e) { return false; } } // ==============================
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_touch()\n{\n var device = get_device();\n return device == 'touch';\n}", "function getDeviceCapability()\r\n{\r\n\txrxDeviceConfigGetDeviceCapabilities( \"http://127.0.0.1\", getDeviceCapabilities_success, getDeviceCapatilities_failure, null);\r\n}", "is_touch_device()\n {\n return 'ontou...
[ "0.6533246", "0.6345822", "0.6336738", "0.624294", "0.6204254", "0.61911017", "0.61902946", "0.61902946", "0.6138289", "0.61089724", "0.6072292", "0.60668015", "0.6023099", "0.5991032", "0.59905624", "0.5974773", "0.5956999", "0.59511185", "0.5943803", "0.5934376", "0.5901513...
0.5830495
40
Mobile Device Detector ==============================
function isMobileDevice() { try { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); } catch (e) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DetectIphone()\n{\n if (uagent.search(deviceIphone) > -1)\n return true;\n else\n return false;\n}", "function getDeviceInfo(){\n devicePlatform = device.platform;\n deviceVersion = device.version;\n deviceIsIOS = (devicePlatform == \"iOS\");\n deviceIsAndroid = (devicePlatform...
[ "0.6778156", "0.6682764", "0.66339517", "0.66256714", "0.66222715", "0.6602591", "0.6581967", "0.6573016", "0.6494187", "0.6484437", "0.64793867", "0.64718676", "0.6404896", "0.6357887", "0.6333775", "0.63238853", "0.6296992", "0.62936157", "0.62936157", "0.6269544", "0.62579...
0.0
-1
`maxTouchPoints` works on IE10/11 and Surface
function isTouchDevice() { return 'ontouchstart' in window || navigator.maxTouchPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTouchDevice() {\n\t return 'ontouchstart' in window || navigator.maxTouchPoints;\n\t}", "function is_touch_device() {\n return (('ontouchstart' in window)\n || (navigator.MaxTouchPoints > 0)\n || (navigator.msMaxTouchPoints > 0));\n //navigator.msMaxTouchPoints for...
[ "0.6478314", "0.6435636", "0.6365823", "0.6339173", "0.6255516", "0.6185476", "0.61351985", "0.61351985", "0.6124347", "0.6106854", "0.598904", "0.5857582", "0.5853873", "0.5820918", "0.57985175", "0.5749436", "0.56929165", "0.5690757", "0.568223", "0.5651182", "0.5651182", ...
0.6445848
9
Merge Utility Allows consumers to extend a base Select with additional styles
function mergeStyles(source) { var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // initialize with source styles var styles = _objectSpread({}, source); // massage in target styles Object.keys(target).forEach(function (key) { if (source[key]) { styles[key] = func...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSelectCSS() {\n\t// remove default style from select boxes and add bootstrap style\n\t$('select').addClass(\"form-control\").removeClass(\"dc-select-menu\");\n}", "function SelectWrapped(props) {\n const { classes, ...other } = props;\n \n return (\n <Select\n optionComponent={O...
[ "0.62096596", "0.61745757", "0.60735035", "0.60735035", "0.5907008", "0.5891311", "0.5820113", "0.57550806", "0.5706966", "0.56922585", "0.56879455", "0.56540805", "0.56274796", "0.5597545", "0.5569936", "0.55586076", "0.55469525", "0.55469525", "0.5535155", "0.5531483", "0.5...
0.0
-1
Misc. Instance Properties TODO Refs Lifecycle
function Select(_props) { var _this; _classCallCheck(this, Select); _this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, _props)); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { ariaLiveSelection: '', ariaLiveContext: '', foc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initialize() { this._saveInstanceProperties(); }", "initInstance() {\n this.instance = {};\n this.instance.epiHiperSchema = '';\n this.instance.diseaseModel = {};\n this.instance.sets = [];\n this.instance.variables = [];\n this.instance.initializations = [];\n this.instance.triggers = [];\n...
[ "0.68597007", "0.6677199", "0.65674335", "0.65131235", "0.6345987", "0.6282155", "0.6276832", "0.6276832", "0.62728804", "0.6229535", "0.61718285", "0.61657214", "0.61377954", "0.61376977", "0.60977614", "0.60977614", "0.60977614", "0.6082932", "0.60810155", "0.60781044", "0....
0.0
-1
Misc. Instance Properties TODO Refs Lifecycle
function Select(_props) { var _this; _classCallCheck(this, Select); _this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, _props)); _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", { ariaLiveSelection: '', ariaLiveContext: '', foc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initialize() { this._saveInstanceProperties(); }", "initInstance() {\n this.instance = {};\n this.instance.epiHiperSchema = '';\n this.instance.diseaseModel = {};\n this.instance.sets = [];\n this.instance.variables = [];\n this.instance.initializations = [];\n this.instance.triggers = [];\n...
[ "0.68597007", "0.6677199", "0.65674335", "0.65131235", "0.6345987", "0.6282155", "0.6276832", "0.6276832", "0.62728804", "0.6229535", "0.61718285", "0.61657214", "0.61377954", "0.61376977", "0.60977614", "0.60977614", "0.60977614", "0.6082932", "0.60810155", "0.60781044", "0....
0.0
-1
`maxTouchPoints` works on IE10/11 and Surface
function isTouchDevice() { return 'ontouchstart' in window || navigator.maxTouchPoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTouchDevice() {\n\t return 'ontouchstart' in window || navigator.maxTouchPoints;\n\t}", "function is_touch_device() {\n return (('ontouchstart' in window)\n || (navigator.MaxTouchPoints > 0)\n || (navigator.msMaxTouchPoints > 0));\n //navigator.msMaxTouchPoints for...
[ "0.6478314", "0.6435636", "0.6365823", "0.6339173", "0.6255516", "0.6185476", "0.61351985", "0.61351985", "0.6124347", "0.6106854", "0.598904", "0.5857582", "0.5853873", "0.5820918", "0.57985175", "0.5749436", "0.56929165", "0.5690757", "0.568223", "0.5651182", "0.5651182", ...
0.6445848
10
Get bounding client object ============================== cannot get keys using array notation with DOMRect
function getBoundingClientObj(element) { var rect = element.getBoundingClientRect(); return { bottom: rect.bottom, height: rect.height, left: rect.left, right: rect.right, top: rect.top, width: rect.width }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBoundingClientObj(element) {\n\t var rect = element.getBoundingClientRect();\n\t return {\n\t bottom: rect.bottom,\n\t height: rect.height,\n\t left: rect.left,\n\t right: rect.right,\n\t top: rect.top,\n\t width: rect.width\n\t };\n\t}", "getRects() {\n if (!this.moving) { re...
[ "0.6845323", "0.64758277", "0.6429971", "0.63873583", "0.63240075", "0.6286467", "0.62292117", "0.6214511", "0.62021023", "0.6200008", "0.6194981", "0.61437255", "0.61067104", "0.6088698", "0.60862935", "0.6063183", "0.60539836", "0.6046679", "0.60333925", "0.6012902", "0.601...
0.6879288
9
============================== String to Key (kebabify) ==============================
function toKey(str) { return str.replace(/\W/g, '-'); } // ==============================
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toKey(str) {\n return str.replace(/\\W/g, '-');\n}", "function toKey(str) {\n return str.replace(/\\W/g, '-');\n}", "function kebabToSnake(str){\n return str.replace('-', '_');\n}", "function kebabToSnake(str){\nreturn str.replace(/-/g, \"_\");\t\n}", "function kebabToSnake(str) {\n return...
[ "0.7747041", "0.7747041", "0.7525335", "0.74548924", "0.7393835", "0.73659784", "0.72692597", "0.71105665", "0.7100968", "0.7095664", "0.707992", "0.70666605", "0.70085317", "0.69869626", "0.6980057", "0.69713306", "0.6954817", "0.68742394", "0.6850593", "0.68482196", "0.6724...
0.7702876
2
Touch Capability Detector ==============================
function isTouchCapable() { try { document.createEvent('TouchEvent'); return true; } catch (e) { return false; } } // ==============================
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_touch()\n{\n var device = get_device();\n return device == 'touch';\n}", "function getDeviceCapability()\r\n{\r\n\txrxDeviceConfigGetDeviceCapabilities( \"http://127.0.0.1\", getDeviceCapabilities_success, getDeviceCapatilities_failure, null);\r\n}", "is_touch_device()\n {\n return 'ontou...
[ "0.6533246", "0.6345822", "0.6336738", "0.624294", "0.6204254", "0.61911017", "0.61902946", "0.61902946", "0.6138289", "0.61089724", "0.6072292", "0.60668015", "0.6023099", "0.5991032", "0.59905624", "0.5974773", "0.5956999", "0.59511185", "0.5943803", "0.5934376", "0.5901513...
0.5830495
41
Mobile Device Detector ==============================
function isMobileDevice() { try { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); } catch (e) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DetectIphone()\n{\n if (uagent.search(deviceIphone) > -1)\n return true;\n else\n return false;\n}", "function getDeviceInfo(){\n devicePlatform = device.platform;\n deviceVersion = device.version;\n deviceIsIOS = (devicePlatform == \"iOS\");\n deviceIsAndroid = (devicePlatform...
[ "0.6778156", "0.6682764", "0.66339517", "0.66256714", "0.66222715", "0.6602591", "0.6581967", "0.6573016", "0.6494187", "0.6484437", "0.64793867", "0.64718676", "0.6404896", "0.6357887", "0.6333775", "0.63238853", "0.6296992", "0.62936157", "0.62936157", "0.6269544", "0.62579...
0.0
-1
Base class helpers for the updating state of a component.
function Component(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || R...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() {\n BaseState.update.call(this);\n }", "_update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate = this.needsUpdate();\n // End lifecycle method\n debug(TRACE_UPDATE, this, stateNeedsUpdate);\n\n if (stateNeedsUpdate) {\n this._updateState();\n }\n }", "func...
[ "0.7218713", "0.6761777", "0.66752523", "0.6610764", "0.6539716", "0.6526742", "0.64895004", "0.6470675", "0.6459271", "0.6384914", "0.63548875", "0.63357073", "0.63051015", "0.6304836", "0.6271929", "0.62663907", "0.62171906", "0.6214453", "0.61940783", "0.6188585", "0.61577...
0.0
-1
Convenience component with default shallow equality check for sCU.
function PureComponent(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function useStrictEquality(b, a) {\n return a === b;\n }", "get shallowCopy() {\n return this.shallowCopy$();\n }", "function defaultEqualityCheck(a, b) {\n return !a && !b || a === b;\n }", "equals() {\n return false;\n }", "equals() {\n return false;\n }", ...
[ "0.6083551", "0.579784", "0.5669391", "0.56581414", "0.56581414", "0.5631642", "0.55893344", "0.55893344", "0.55851346", "0.5546245", "0.548746", "0.5484109", "0.5481716", "0.5481716", "0.54722977", "0.54722977", "0.54722977", "0.5451884", "0.5451884", "0.5441116", "0.5398943...
0.0
-1
an immutable object with a single mutable value
function createRef() { var refObject = { current: null }; { Object.seal(refObject); } return refObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function immutableObjectTest(){\n\nlet test= {'name': 'vishal', 'age':27};\n//Object.freeze(test);\nlet test2= test;\n\ntest.age = 26;\nconsole.log(test);\nconsole.log(test2);\nconsole.log(test === test2);\n\n\n\n\n}", "static set one(value) {}", "function makeImmutableObject(obj) {\n\t if (!globalConfig.us...
[ "0.6674448", "0.66609514", "0.6358345", "0.6347869", "0.6347869", "0.6263268", "0.6230736", "0.6136926", "0.61048114", "0.5915378", "0.5889688", "0.580687", "0.5776291", "0.5763881", "0.57248324", "0.56947106", "0.566211", "0.5636481", "0.56181127", "0.5606209", "0.5606209", ...
0.0
-1
Create and return a new ReactElement of the given type. See
function createElement(type, config, children) { var propName = void 0; // Reserved names are extracted var props = {}; var key = null; var ref = null; var self = null; var source = null; if (config != null) { if (hasValidRef(config)) { ref = config.ref; } if (hasValidKey(config)) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createElement(type,config,children){var propName;// Reserved names are extracted\nvar props={};var key=null;var ref=null;var self=null;var source=null;if(config!=null){if(hasValidRef(config)){ref=config.ref;{warnIfStringRefCannotBeAutoConverted(config);}}if(hasValidKey(config)){key=''+config.key;}self=con...
[ "0.68920434", "0.6835192", "0.6767826", "0.6757532", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.6745889", "0.65640503", "0.65581757", "0.6406998", "0.6406998", "0.6406998", "0.6406998", "0.6406998", "0.63805515",...
0.0
-1
Return a function that produces ReactElements of a given type. See
function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getElementConstructor(type) {\n return JSXElement;\n }", "wrap(type = this.type, props) {\n if (props) {\n if (typeof props === \"string\") props = { className: props };\n else props = this.normalizeProps(props);\n }\n this.elements = [ React.createElement(type, props, ...this.elements) ];...
[ "0.68827116", "0.66001076", "0.65026397", "0.65026397", "0.65026397", "0.65026397", "0.65026397", "0.65026397", "0.65026397", "0.65026397", "0.65026397", "0.626357", "0.61796564", "0.5946934", "0.5919722", "0.58814955", "0.5865335", "0.57798463", "0.5638848", "0.56333995", "0...
0.0
-1
Clone and return a new ReactElement using element as the starting point. See
function cloneElement(element, config, children) { !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0; var propName = void 0; // Original props are copied var props = _assign({}, element.props)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneElement(element,config,children){if(!!(element===null||element===undefined)){{throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+element+\".\");}}var propName;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extracted\...
[ "0.69132274", "0.68906343", "0.66943085", "0.66943085", "0.6692962", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6646507", "0.6633278", "0.661405", "0.661405", ...
0.0
-1
Flatten a children object (typically specified as `props.children`) and return an array with appropriately rekeyed children. See
function toArray(children) { var result = []; mapIntoWithKeyPrefixInternal(children, result, null, function (child) { return child; }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toArrayChildren(children) {\n var ret = [];\n React__default.Children.forEach(children, function (child) {\n ret.push(child);\n });\n return ret;\n }", "function toArray(children){var result=[];mapIntoWithKeyPrefixInternal(children,result,null,function(child){return child;}...
[ "0.775594", "0.7520282", "0.74348474", "0.7408082", "0.7408082", "0.7408082", "0.7408082", "0.7408082", "0.7408082", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74014795", "0.74...
0.0
-1
About 1.5x faster than the twoarg version of Arraysplice()
function spliceOne(list, index) { for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) { list[i] = list[k]; } list.pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fastSplice(arr, startIdx, removeCount) {\n let i, length = arr.length;\n if (startIdx >= length || removeCount === 0) {\n return;\n }\n removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);\n let len = length - removeCount;\n ...
[ "0.7447296", "0.7080551", "0.70651484", "0.7042791", "0.68553513", "0.675017", "0.6710377", "0.6685991", "0.66853136", "0.66848046", "0.66800433", "0.66643995", "0.6650299", "0.66323346", "0.6606576", "0.65875137", "0.65746146", "0.6563717", "0.6521057", "0.65076625", "0.6501...
0.0
-1
This implementation is based heavily on node's url.parse
function resolvePathname(to) { var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var toParts = to && to.split('/') || []; var fromParts = from && from.split('/') || []; var isToAbs = to && isAbsolute(to); var isFromAbs = from && isAbsolute(from); var mustEndAbs = isToAbs |...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseUrl(url) {\n\t const firstChar = url.charAt(0);\n\t if (firstChar === '~') {\n\t const secondChar = url.charAt(1);\n\t url = url.slice(secondChar === '/' ? 2 : 1);\n\t }\n\t return parseUriParts(url);\n\t}", "function parseURL(request, response){\n \tvar parseQuery = true...
[ "0.7181195", "0.7167522", "0.7077037", "0.7053249", "0.6941941", "0.68060994", "0.67124766", "0.6706559", "0.6643371", "0.66416126", "0.66208684", "0.660611", "0.6580568", "0.6572419", "0.6572419", "0.6572419", "0.6572419", "0.6572419", "0.657214", "0.655337", "0.6552223", ...
0.0
-1
the only way to update the UI is to create a new element, and pass it to ReactDOM.render().xxxxxxxxxxxxxxxxxxxxxxxxxxx
function tick() { const element = ( <div> <h1>Hello, world!</h1> <h2>It is {new Date().toLocaleTimeString()}.</h2> </div> ); ReactDOM.render(element, document.getElementById('root')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateView() {\n ReactDOM.render(<App />, document.getElementById(\"root\"));\n}", "function render(){\n ReactDOM.render(\n <MyComponents.App\n data={data}\n actions={actions}/>,\n $('#app-container').get(0)\n )\n}", "function render(){\n ReactDOM.render(\n <MyComponents....
[ "0.7117951", "0.7077666", "0.7077666", "0.70727277", "0.7012064", "0.69841564", "0.69306594", "0.6755659", "0.673256", "0.66129595", "0.6562196", "0.65442306", "0.65442306", "0.65258193", "0.65123457", "0.64952636", "0.64925134", "0.6464884", "0.64647317", "0.64483416", "0.64...
0.6045533
77
Component in JS xxxxxxxxxxxxxxxxxxxxxxxxxxx
function Welcome(props) { return <h1>Hello, {props.name}</h1>; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Component() { }", "cs (...args) {\n return MVC.ComponentJS(...args)\n }", "function SomeComponent() {}", "function FunctionalComponent() {}", "function PratoDoDiaComponent() {\n }", "static template() { return 'CanvasComponent'; }", "function component() {\n const element...
[ "0.7564889", "0.72953534", "0.7257861", "0.6544277", "0.6496682", "0.64826816", "0.6387971", "0.63587666", "0.634415", "0.6258618", "0.62533283", "0.6231429", "0.62255275", "0.6223539", "0.6212367", "0.6188179", "0.61827564", "0.6180713", "0.6159582", "0.61568755", "0.6149884...
0.0
-1
change code below this line
toggleVisibility() { this.setState(state => { if (state.visibility === true) { return { visibility: false }; } else { return { visibility: true }; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected internal function m252() {}", "private internal function m248() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient final protected internal function m174() {}", "transient private i...
[ "0.6872708", "0.67696863", "0.67329067", "0.6349779", "0.6254065", "0.6210946", "0.6193773", "0.596765", "0.5841656", "0.5784987", "0.5720455", "0.56885266", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.568...
0.0
-1
change code above this line
render() { if (this.state.visibility) { return ( <div> <button onClick={this.toggleVisibility}>Click Me</button> <h1>Now you see me!</h1> </div> ); } else { return ( <div> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected internal function m252() {}", "private internal function m248() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "transient final protected internal function m174() {}", "transient protected internal function m189() {}", "transient private i...
[ "0.7039907", "0.687765", "0.6688292", "0.64796937", "0.63544106", "0.63421875", "0.62678754", "0.6161556", "0.6010254", "0.5996386", "0.58989674", "0.5895343", "0.58253384", "0.57657784", "0.5697275", "0.5678014", "0.5674724", "0.5671406", "0.5662202", "0.56555575", "0.561729...
0.0
-1
change code below this line
reset() { this.setState({ count: 0 }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected internal function m252() {}", "private internal function m248() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient final protected internal function m174() {}", "transient private i...
[ "0.6872708", "0.67696863", "0.67329067", "0.6349779", "0.6254065", "0.6210946", "0.6193773", "0.596765", "0.5841656", "0.5784987", "0.5720455", "0.56885266", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.56879586", "0.568...
0.0
-1
change code above this line
render() { return ( <div> <button className='inc' onClick={this.increment}>Increment!</button> <button className='dec' onClick={this.decrement}>Decrement!</button> <button className='reset' onClick={this.reset}>Reset</button> <h1>Curren...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected internal function m252() {}", "private internal function m248() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "transient final protected internal function m174() {}", "transient protected internal function m189() {}", "transient private i...
[ "0.7039829", "0.68778706", "0.6688428", "0.64797705", "0.6354616", "0.6342241", "0.6268081", "0.6161689", "0.6010161", "0.5996276", "0.5898792", "0.5895467", "0.58250946", "0.5765799", "0.56972265", "0.56781054", "0.5674762", "0.56716365", "0.5662241", "0.56556726", "0.561727...
0.0
-1
For pages SSR'd at the edge, we bundle them with the ESM version of Next in order to benefit from the better treeshaking and thus, smaller bundle sizes. The absolute paths for _app, _error and _document, used in this loader, link to the regular CJS modules. They are generated in `createPagesMapping` where we don't have...
function swapDistFolderWithEsmDistFolder(path) { return path.replace("next/dist/pages", "next/dist/esm/pages"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onJsRequest(req, res) {\n const [reqPath, query] = req.url.split('?');\n const filePath = reqPath == '/' ? '/index.html' : reqPath;\n console.log('onJsRequest: ', req.url, reqPath, query || '',\n req.headers['cache-control']);\n\n let file = fs.readFileSync(PUBLIC_PATH + filePath);\n const stat ...
[ "0.5505979", "0.544669", "0.54180366", "0.5372431", "0.53174776", "0.53015065", "0.528883", "0.528883", "0.5257916", "0.5247252", "0.52201986", "0.5123943", "0.5090205", "0.50849813", "0.50783575", "0.50767475", "0.50714624", "0.50714624", "0.5068401", "0.5028158", "0.5027398...
0.5297542
6
This function calls when user selects an option from select box OnChange event
function changeL2TPServerMode(selId){ var selValue = comboSelectedValueGet (selId); if (!selValue) return; switch (parseInt (selValue, 10)){ case 1: /* Enable IPv4 */ fieldStateChangeWr ('tf1_ipv6Addr tf1_ipv6Length', 'tf1_rangeIpAddressIPv6Block_div', 'tf1_routingMode tf1_startIpAddr tf1_end...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleOptionChange(selection) {\n setFieldValue(props.name, selection)\n props.onValueChange && props.onValueChange()\n }", "function changeSelectValue(e) {\n optionValue = e.target.value;\n buildList(optionValue);\n }", "function optionChanged(selectedPatientID) {\n console.log(selec...
[ "0.73094076", "0.7235694", "0.7214101", "0.71934634", "0.71249676", "0.7082741", "0.7077537", "0.70019263", "0.6991526", "0.6984637", "0.69707686", "0.6936471", "0.69190776", "0.68730325", "0.68699044", "0.68645465", "0.685229", "0.6848836", "0.6834883", "0.6823427", "0.67904...
0.0
-1
This function calls when user selects Authentication Database to show behavior of Authentication support OnChange event
function changeAuthSupported () { var selAuthTypeObj = document.getElementById ('tf1_authType'); if (selAuthTypeObj && !selAuthTypeObj.disabled) { if (selAuthTypeObj.value == "3" || selAuthTypeObj.value == "4") { // grey out PAP and CHAP protocols for AD and NT Domain Auth fieldS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChangeLogin() {}", "function authStateChanged(){\n swapAccountModes();\n}", "function onchecked() {\n if (vm.attestation.acceptTerms) {\n vm.openAuthenticateModal();\n } else {\n vm.isAuthenticated = false;\n }\n }", "functio...
[ "0.68984634", "0.6685853", "0.6565198", "0.65022933", "0.64121157", "0.6265141", "0.6261687", "0.61159366", "0.6096446", "0.60926414", "0.6079164", "0.60424054", "0.59890664", "0.5971496", "0.59638625", "0.59489006", "0.593098", "0.58963406", "0.5879113", "0.58630157", "0.585...
0.6491825
4
function for validate form when user clicks on submit button OnSubmit event
function l2tpServerValidate (frmId){ var txtFieldIdArr = new Array (); txtFieldIdArr[0] = "tf1_startIpAddr, "+LANG_LOCALE['12127']; txtFieldIdArr[1] = "tf1_endIpAddr, "+LANG_LOCALE['12007']; txtFieldIdArr[2] = "tf1_authSecKeyValue, "+LANG_LOCALE['12111']; txtFieldIdArr[3] = "tf1_timeOut, "+LANG_LOCALE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateOnSubmit(e) {\n // validate the entire form\n return this.runValidation(false);\n }", "function validateForm() {\n return true;\n}", "function validateForm()\n{\n return true;\n}", "function validateForm()\n{\n return true;\n}", "function validateAndSubmit() {\r\n v...
[ "0.80553746", "0.76551753", "0.75783026", "0.75783026", "0.7496376", "0.7459136", "0.74200165", "0.73986524", "0.73873913", "0.73819953", "0.7345196", "0.7293313", "0.7281161", "0.7278653", "0.7266714", "0.7219717", "0.7215134", "0.7210585", "0.72010475", "0.71766084", "0.715...
0.0
-1
For cancel button action
function l2tpServerOnReset(frmId) { resetImgOnOff(frmId); onloadCall(l2tpServerOnload, {imageId:'', disableIndividual:'', disableGrp:'', enableIndividual:'', enableGrp:'', hideClass:'hide', showClass:'configRow', breakDivs:'', breakClass:'break', imagesInfo:{disableImages:'', enableImages:'', disableClass:'', enable...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cancel(e) { }", "cancelAction(){}", "function handleCancelButton() {\n\t\tconsole.log(\"Now cancelling action..\");\n\t\tCounterStart = 0; \t// reset counter\t\t\t\t\n\t\tcloseCancelPopup();\n\t\trevertChanges(command);\n\t\tconsole.log(\"Reverting changes..\");\t\n\t}", "function cancel() {\r\n c...
[ "0.81192523", "0.8102284", "0.8091399", "0.78631765", "0.7842657", "0.77605194", "0.7699358", "0.7651585", "0.7620248", "0.7600971", "0.75973386", "0.7563133", "0.7528407", "0.7492146", "0.7485644", "0.7480049", "0.7467675", "0.7463718", "0.74168605", "0.74168605", "0.7416860...
0.0
-1
callback function that receives our data
function gotPageOfFrames(records, fetchNextPage) { console.log("gotPageOfFrames()"); // add the records from this page to our array frames.push(...records); // request more pages fetchNextPage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callback(){}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function getData()\n\t\t{\n\t\t\tvar newData = { hello : \"world! it's \" + new Date().toLocaleTimeString() }; // Just putting some sample data in f...
[ "0.71112174", "0.6957153", "0.6957153", "0.6957153", "0.6957153", "0.6957153", "0.6888081", "0.68846154", "0.6871637", "0.685752", "0.6854115", "0.6807742", "0.68019456", "0.67784035", "0.6771114", "0.6711854", "0.66988623", "0.6675793", "0.6637835", "0.66289556", "0.66289556...
0.0
-1
call back function that is called when all pages are loaded
function gotAllFrames(err) { console.log("gotAllFrames()"); // report an error, you'd want to do something better than this in production if (err) { console.log("error loading data"); console.error(err); return; } // call functions to log and show the books consoleLogFrames(); showFrames...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pagesOnload(){\n var start_hash=location.hash;\n if(!start_hash){ /* the url has no hash . run the callback function of the first page */\n var callback = $(\".fullPage\").eq(0).attr(\"inView\");\n strTofunc(callback);\n\t\t return false;\n }\n /* if the url has hash ,...
[ "0.76434666", "0.76312804", "0.75160885", "0.7490547", "0.73542464", "0.73433566", "0.7292368", "0.7264435", "0.7230802", "0.7228508", "0.7228508", "0.7207136", "0.72034395", "0.7148551", "0.7137039", "0.7131693", "0.711169", "0.71010697", "0.7083596", "0.704666", "0.703654",...
0.0
-1
just loop through the books and console.log them
function consoleLogFrames() { console.log("consoleLogFrames()"); frames.forEach(frame => { console.log("frame:", frame); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bookCheck() {\n for (var i = 0; i < books.length; i += 1) {\n //the i + 1 because list starts at 0. don't want to have book #0.\n console.log('Book # ' + (i+1));\n console.log('Title: ' + books[i].title);\n //didn't concatenate the i\n console.log('Author: ' + books[i...
[ "0.8029466", "0.75100285", "0.74635255", "0.72180015", "0.7178128", "0.7175754", "0.71157384", "0.7070813", "0.7057754", "0.70008415", "0.69900715", "0.69690883", "0.69067", "0.6829908", "0.67861897", "0.67839193", "0.6762566", "0.6750798", "0.6741862", "0.67410725", "0.67084...
0.0
-1
look through our airtable data, create elements
function showFrames() { console.log("showFrames()"); frames.forEach(frame => { //var frameDimension = document.createElement("p"); //frameDimension.innerText = frame.fields.dimension; //document.body.append(frameDimension); //var frameImage = document.createElement("img");...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildPage(input){\n document.getElementById(\"ufo-table\").getElementsByTagName('tbody')[0].innerHTML = \"\";\n input.forEach((element,index)=>{\n\n // Peruse the dataset to filter all elements with id=\"ufo-table\":\n let table = document.getElementById(\"ufo-table\").getElementsByTag...
[ "0.6400682", "0.63625497", "0.62804043", "0.6266953", "0.62610304", "0.6255992", "0.6255758", "0.6255062", "0.6205331", "0.6189282", "0.617014", "0.6140276", "0.61328804", "0.6109524", "0.610648", "0.60692155", "0.6055106", "0.60545397", "0.6052896", "0.602773", "0.6025116", ...
0.0
-1
Initialize the linkify state machine. Called automatically the first time linkify is called on a string, but may be called manually as well.
function init() { // Initialize scanner state machine and plugins INIT.scanner = init$2(INIT.customSchemes); for (let i = 0; i < INIT.tokenQueue.length; i++) { INIT.tokenQueue[i][1]({ scanner: INIT.scanner }); } // Initialize parser state machine and plugins INIT.parser = init$1(INIT.scanner....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _initialize() {\n\t\t\t_start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked\n\t\t\treturn false; // Avoid the browser following the link\n\t\t}", "function _initialize() {\n\t\t\t_start(this,jQueryMatchedObj); // This, in this context, refer to obje...
[ "0.542745", "0.542745", "0.5384562", "0.53661937", "0.52484614", "0.52484614", "0.52484614", "0.52484614", "0.52484614", "0.52484614", "0.5208926", "0.5175434", "0.51580197", "0.51486576", "0.5083127", "0.50416845", "0.5016876", "0.49993104", "0.49993104", "0.49844807", "0.49...
0.5054133
15
FUNCTIONS timer to set interval of decrement function
function timerRun() { if (!isRunning) { // if not running... currentTime = setInterval(decrement, 1000); // run decrement every 1 second isRunning = true; // ... and change status } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timer() {\n intervalId = setInterval(decrement, 1000);\n }", "function runTimer() {\n intervalId = setInterval(decrement, 1000);\n }", "function runTime(){\n intervalId = setTimeout(decrement, 1000 * 60);\n }", "function runTimer() {\n clearInterval(intervalId)...
[ "0.85878617", "0.8213342", "0.8066804", "0.8023583", "0.80212295", "0.79613966", "0.79553413", "0.7946849", "0.794561", "0.7938924", "0.79311424", "0.7816899", "0.77836657", "0.77650017", "0.7764577", "0.77616423", "0.7755366", "0.7727896", "0.77075315", "0.76356333", "0.7629...
0.67289615
95
decrement function to reduce time while user is guessing answer
function decrement() { timeRemaining.text("Time Remaining: " + timerSeconds); // to HTML timerSeconds--; // reduce timerSeconds by 1 each interval // when time runs out... if (timerSeconds === 0) { clearInterval(currentTime); // reset interval lossCount++; // add...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decrement () {\n time--;\n $(\"#timeRemainingEl\").html(\"Time remaining: \" + time);\n\n if (time === 0) {\n clickOptionOn = false;\n guessResult = 2;\n correctAnsFunc();\n countMissedGuess++;\n transitionFunc();\n }\n }", "function wrongAnswer() {\n secondsLeft -...
[ "0.72373945", "0.69310397", "0.6883514", "0.68436456", "0.67440903", "0.672197", "0.67101306", "0.6682011", "0.66636235", "0.66636235", "0.664833", "0.6634127", "0.66160667", "0.66160667", "0.6610797", "0.66081107", "0.66081107", "0.66018385", "0.65850115", "0.65797096", "0.6...
0.6338557
36
to select a question from the array
function pickQuestion() { pick = questionsArray[Math.floor(Math.random() * questionsArray.length)]; // var random question questionSection.text(pick.question); // to HTML for (var i = 0; i < pick.choices.length; i++) { var answerClicked = $("<div>"); answerClicked.addClas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseQuestion() {\n \n randomQuestion = questionsArray[questionsArrayIndex]; \n\n return randomQuestion;\n}", "function choose() {\n selections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\n pref.push(questions[questionCounter].choices[$('input[name=\"answer\"]:c...
[ "0.69086874", "0.67672074", "0.6741119", "0.6717526", "0.6717526", "0.6695962", "0.6528753", "0.65250045", "0.6516162", "0.64861596", "0.6474475", "0.64646715", "0.6459689", "0.6440187", "0.6440187", "0.6440187", "0.6440187", "0.6440187", "0.6440187", "0.6440187", "0.6440187"...
0.0
-1
This function creates the table for the detail page.
function getTableInfo(objs) { let table = document.getElementById("detailtbl"); table.innerHTML = ""; //generates the table. let row = table.insertRow(table.rows.length); let cell1 = row.insertCell(0); let cell2 = row.insertCell(1); cell1.innerHTML =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function class_buildTableDetail()\r\n\t{\r\n\t\tvar\t\tcell;\r\n\t\tvar\t\tdivElem;\r\n\t\tvar\t\thasViewChanged;\r\n\t\tvar\t\tj;\r\n\t\tvar\t\tnumRows;\r\n\t\tvar\t\trow;\r\n\t\tvar\t\ttbl;\r\n\t\tvar\t\ttblBody;\r\n\t\tvar\t\tthisRow;\r\n\r\n\t\tvar\t\tcellCount = 0;\r\n\t\tvar\t\tclassName = \"\";\r\n\t\tvar\t...
[ "0.67482543", "0.65312934", "0.651607", "0.6429876", "0.63373655", "0.6328158", "0.63145894", "0.6297799", "0.62858826", "0.62547386", "0.62314844", "0.61810184", "0.61749864", "0.6162284", "0.61584824", "0.6148295", "0.61480814", "0.61471623", "0.6146749", "0.6132655", "0.61...
0.5923833
73
Close the database. Usually before deleting it for complete reset.
closeDB() { this.db.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n if (this._db) {\n this._db.close();\n this._db = null;\n }\n }", "'close'() {\n for (let _ in this.statements) { const stmt = this.statements[_]; stmt['free'](); }\n this.handleError(sqlite3_close_v2(this.db));\n unlink(`/${this.filename}`);\n ...
[ "0.8156583", "0.79765904", "0.78909916", "0.7890871", "0.784012", "0.7820813", "0.7757575", "0.77138996", "0.74836713", "0.73988533", "0.7322529", "0.7322529", "0.72462755", "0.7138954", "0.70041656", "0.69980705", "0.69785255", "0.6898593", "0.68897015", "0.6852996", "0.6846...
0.80294824
1
console.log(newWinnerSplit) //[ 'jon', 'is', 'the', 'winner.' ] console.log(newWinnerKebob) //jonisthewinner.
function isJonAlive(){ //reusable function to check if Jon is alive, functions to run until called if(jonSnowHealth > 0){ console.log('Jon is alive') } else { console.log('RIP Jon Snow') } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splittingWords(wordToSplit){\n\tconsole.log(wordToSplit);\n\tvar splitWord = wordToSplit.split(\"\");\n\tconsole.log(splitWord);\n\tfor (var i=0; i < splitWord.length; i++){\n\t\tsplitWord[i] = (\"_\"); //can't figure out how to get rid of the commas when this prints to the page!! argh!!!!\n\t}\n\tconsole...
[ "0.62697476", "0.62389016", "0.62261075", "0.6208697", "0.62023985", "0.6165037", "0.6159502", "0.6143141", "0.6112917", "0.6086377", "0.6085028", "0.6034417", "0.6008743", "0.60013646", "0.595782", "0.592481", "0.59193194", "0.59159863", "0.588347", "0.58288676", "0.58245295...
0.0
-1
isJonAlive() //functions to run until called(this line calls function)
function surpriseAttack(attack) { //reusable function to change jons health jonSnowHealth -= attack console.log(`Jon's health is now ${jonSnowHealth}`) isJonAlive() //calls the reusable function isJonAlive() each time surpriseAttack() is called }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isJonAlive(){ //reusable function to check if Jon is alive, functions to run until called\n if(jonSnowHealth > 0){\n console.log('Jon is alive')\n } else {\n console.log('RIP Jon Snow')\n }\n}", "function alive()\n{\n\tconsole.log(\"Loop\");\n\tswitch(state)\n\t{\n\t\tcase 0...
[ "0.7994399", "0.6828563", "0.66074896", "0.65169334", "0.63766515", "0.62521464", "0.61350733", "0.6113419", "0.60840225", "0.60426486", "0.5949772", "0.59380126", "0.5919475", "0.5919475", "0.5919475", "0.5901288", "0.58804905", "0.587519", "0.587519", "0.58435714", "0.57892...
0.0
-1
Delete or Edit item
function deleteOrEdit(e){ const button = e.target; const li = button.parentNode; const ul = li.parentNode; if(button.textContent === 'Delete') { ul.removeChild(li); } else if(button.textContent === 'Edit') { const span1 = li.firstElementChild; const span2=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteItem() {\n const index = this.items.findIndex((e) => e.id === this.editItemID);\n this.items.splice(index, 1);\n this.editItemID = null;\n }", "function editItem(e) {\n const element = e.currentTarget.parentElement.parentElement; // Mismo Target que DELETE\n editElement = e.currentTarget.parent...
[ "0.7498779", "0.7286344", "0.71752214", "0.71590537", "0.71100867", "0.70325667", "0.70056885", "0.69551617", "0.69334096", "0.6867194", "0.68412316", "0.68400663", "0.6831281", "0.6812397", "0.6775317", "0.67546946", "0.6750358", "0.6727045", "0.6672225", "0.6662241", "0.665...
0.6446879
38
simulates a database operation with terrible coding style
function fetchData(key) { return new Promise((accept, reject) => { setTimeout(() => { switch(key) { case 'good stuff': return accept('Here\'s the good stuff!'); case 'bad stuff': return reject(new Error('whoopsie!')); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_doOp(dbName, methodName, ...args) {\n const {memDb, actualDb, loadedPromise} = this._dbs[dbName];\n let db;\n let method;\n if (methodName === 'get') {\n db = memDb;\n method = memDb.get;\n } else if (methodName === 'put') {\n db = actualDb;\n method = actualDb.put;\n // pu...
[ "0.65170604", "0.6390302", "0.6322277", "0.6220434", "0.6220434", "0.6200777", "0.6167369", "0.6126992", "0.6121735", "0.60527897", "0.6014954", "0.5952741", "0.5887911", "0.5845973", "0.58369577", "0.5820198", "0.5789744", "0.57729185", "0.57698184", "0.5767233", "0.5754065"...
0.0
-1
EsprimaFB represents JSX strings as tokens called "JSXText", but AcornJSX uses regular tt.string without any distinction between this and regular JS strings. As such, we intercept an attempt to read a JSX string and set a flag on extra so that when tokens are converted, the next token will be switched to JSXText via on...
jsx_readString(quote) { // eslint-disable-line camelcase const result = super.jsx_readString(quote); if (this.type === tokTypes.string) { this[STATE].jsxAttrValueToken = true; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cpp11StringHook(stream, state) {\n stream.backUp(1);\n // Raw strings.\n if (stream.match(/(R|u8R|uR|UR|LR)/)) {\n var match = stream.match(/\"([^\\s\\\\()]{0,16})\\(/);\n if (!match) {\n return false;\n }\n state.cpp11RawStri...
[ "0.63286924", "0.5892136", "0.5840547", "0.57787204", "0.5696968", "0.5681604", "0.56780607", "0.5570992", "0.5553598", "0.5550097", "0.5550097", "0.55343956", "0.55183995", "0.5479791", "0.54280454", "0.5418589", "0.53734547", "0.53226113", "0.53143674", "0.5296176", "0.5278...
0.52827567
20
Create a new authentication service.
constructor (app, configKey = 'authentication', options = {}) { if (!app || typeof app.use !== 'function') { throw new Error('An application instance has to be passed to the authentication service'); } this.app = app; this.strategies = {}; this.configKey = configKey; this.options = Object...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async _create() {\n\t\tconst serviceName = Config.str(\"serviceName\");\n\n\t\t// Create the service if it does not exist - otherwise, throw an error\n\t\tlet service = await ECSManager.describeService(serviceName);\n\t\tif (service && service.status !== \"INACTIVE\") {\n\t\t\tthrow new Error(\"Service alre...
[ "0.6072241", "0.606813", "0.5904839", "0.5904839", "0.5785076", "0.57576096", "0.5733736", "0.5726672", "0.5700859", "0.56636685", "0.5643676", "0.56215316", "0.5617202", "0.5596361", "0.5593076", "0.5537664", "0.5537664", "0.5537664", "0.5530823", "0.5526532", "0.5525713", ...
0.5026459
62
Return the current configuration from the application
get configuration () { // Always returns a copy of the authentication configuration return Object.assign({}, defaultOptions, this.app.get(this.configKey)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getApplicationConfiguration() {\n return configuration;\n }", "function getConfig() {\n return config;\n }", "get config() {\n return this.use().config;\n }", "get configuration() {\n // Always returns a copy of the authentication configuration\n return Obje...
[ "0.82301533", "0.7684608", "0.76150465", "0.7608739", "0.7503554", "0.7448684", "0.7448684", "0.74283844", "0.7414766", "0.74141985", "0.7398327", "0.73460716", "0.73123896", "0.7225643", "0.71419483", "0.7116073", "0.70939195", "0.7080244", "0.70785064", "0.7069002", "0.7066...
0.74542505
5
A list of all registered strategy names
get strategyNames () { return Object.keys(this.strategies); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get strategyNames() {\n return Object.keys(this.strategies);\n }", "getStrategies (...names) {\n // Returns all strategies for a list of names (including undefined)\n return names.map(name => this.strategies[name])\n .filter(current => !!current);\n }", "getStrategies(...names) {\n ...
[ "0.8572502", "0.7430715", "0.7205871", "0.64177424", "0.5890338", "0.56432676", "0.5592835", "0.54991174", "0.54941875", "0.54579896", "0.5455823", "0.54508036", "0.5395866", "0.53909427", "0.53645295", "0.535879", "0.5297331", "0.52944946", "0.5282591", "0.5282572", "0.52575...
0.8399943
1
Register a new authentication strategy under a given name.
register (name, strategy) { // Call the functions a strategy can implement if (typeof strategy.setName === 'function') { strategy.setName(name); } if (typeof strategy.setApplication === 'function') { strategy.setApplication(this.app); } if (typeof strategy.setAuthentication === 'fu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "register(name, strategy) {\n // Call the functions a strategy can implement\n if (typeof strategy.setName === 'function') {\n strategy.setName(name);\n }\n if (typeof strategy.setApplication === 'function') {\n strategy.setApplication(this.app);\n }\n ...
[ "0.8080122", "0.7010093", "0.6235593", "0.57097703", "0.52662593", "0.5139004", "0.5105554", "0.50589234", "0.5057859", "0.5040054", "0.5040054", "0.5040054", "0.5029494", "0.5005959", "0.49377272", "0.4935949", "0.48791003", "0.48633435", "0.48500365", "0.48417827", "0.48340...
0.80991757
0
Get the registered authentication strategies for a list of names. The return value may contain `undefined` if the strategy does not exist.
getStrategies (...names) { // Returns all strategies for a list of names (including undefined) return names.map(name => this.strategies[name]) .filter(current => !!current); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getStrategies(...names) {\n return names.map(name => this.strategies[name])\n .filter(current => !!current);\n }", "get strategyNames() {\n return Object.keys(this.strategies);\n }", "get strategyNames () {\n return Object.keys(this.strategies);\n }", "async parse (req, res...
[ "0.70150954", "0.6244064", "0.62251556", "0.58063906", "0.5307772", "0.53037333", "0.5285093", "0.5203224", "0.5141783", "0.512729", "0.49399316", "0.475746", "0.4756728", "0.47456318", "0.46702248", "0.46435004", "0.4637505", "0.44891834", "0.444938", "0.43179128", "0.431093...
0.752224
0
Create a new access token with payload and options.
async createAccessToken (payload, optsOverride, secretOverride) { const { secret, jwtOptions } = this.configuration; // Use configuration by default but allow overriding the secret const jwtSecret = secretOverride || secret; // Default jwt options merged with additional options const options = merge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createAccessToken(payload, optsOverride, secretOverride) {\n return __awaiter(this, void 0, void 0, function* () {\n const { secret, jwtOptions } = this.configuration;\n // Use configuration by default but allow overriding the secret\n const jwtSecret = secretOverride || sec...
[ "0.71722716", "0.65364087", "0.63442874", "0.6273195", "0.6243875", "0.62290245", "0.62192726", "0.6213576", "0.6213576", "0.6213576", "0.6209619", "0.62087774", "0.61872", "0.6170283", "0.61624885", "0.600586", "0.599194", "0.58978754", "0.58972967", "0.5866913", "0.58595985...
0.725555
0
Verifies an access token.
async verifyAccessToken (accessToken, optsOverride, secretOverride) { const { secret, jwtOptions } = this.configuration; const jwtSecret = secretOverride || secret; const options = merge({}, jwtOptions, optsOverride); const { algorithm } = options; // Normalize the `algorithm` setting into the algo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __validateAccessToken (token) {\n let id = token.userId;\n let expires = token.expires;\n let issued = token.issued;\n let type = token.type;\n if (!id || !expires || !issued || !type) {\n return false;\n }\n if ((new Date()).getTime() > issued + expires) {\n return false;\n }\n return true...
[ "0.69645596", "0.6761788", "0.64703643", "0.64034164", "0.6398024", "0.6395476", "0.6377107", "0.6289397", "0.6248817", "0.620485", "0.61062676", "0.60841143", "0.6063324", "0.60310555", "0.6006287", "0.6002387", "0.59978926", "0.5989522", "0.5985649", "0.5908104", "0.5904778...
0.65639174
2
Authenticate a given authentication request against a list of strategies.
async authenticate (authentication, params, ...allowed) { const { strategy } = authentication || {}; const [ authStrategy ] = this.getStrategies(strategy); debug('Running authenticate for strategy', strategy, allowed); if (!authentication || !authStrategy || !allowed.includes(strategy)) { // If ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "authenticate(authentication, params, ...allowed) {\n return __awaiter(this, void 0, void 0, function* () {\n const { strategy } = authentication || {};\n const [authStrategy] = this.getStrategies(strategy);\n const strategyAllowed = allowed.includes(strategy);\n d...
[ "0.6145386", "0.54604095", "0.51399237", "0.5054592", "0.49704114", "0.4838752", "0.4816298", "0.47498694", "0.47485566", "0.47446832", "0.46898776", "0.46869773", "0.4674161", "0.46494237", "0.46494237", "0.4635957", "0.4635957", "0.4596821", "0.4593494", "0.45871952", "0.45...
0.62313855
0