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
This function can only be called with a workinprogress fiber and only during begin or complete phase. Do not call it under any other circumstances.
function getStackAddendumByWorkInProgressFiber(workInProgress) { var info = ''; var node = workInProgress; do { info += describeFiber(node); // Otherwise this return pointer might point to the wrong tree: node = node.return; } while (node); return info; }
{ "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 }", "function g...
[ "0.6055588", "0.60392493", "0.5994331", "0.5994331", "0.5994331", "0.5880027", "0.5802061", "0.5707473", "0.56547225", "0.56361365", "0.5588393", "0.5560857", "0.5516873", "0.55146945", "0.551263", "0.5482989", "0.5476365", "0.5440091", "0.5440091", "0.5440091", "0.5440091", ...
0.53892773
75
Get the value for a property on a node. Only used in DEV for SSR validation. The "expected" argument is used as a hint of what the expected value is. Some properties have multiple equivalent values.
function getValueForProperty(node, name, expected, propertyInfo) { { if (propertyInfo.mustUseProperty) { var propertyName = propertyInfo.propertyName; return node[propertyName]; } else { var attributeName = propertyInfo.attributeName; var stringValue = null; if (propertyInfo.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if...
[ "0.8159204", "0.8159204", "0.8144193", "0.80684555", "0.80684555", "0.80646384", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", "0.806019", ...
0.0
-1
Get the value for a attribute on a node. Only used in DEV for SSR validation. The third argument is used as a hint of what the expected value is. Some attributes have multiple equivalent values.
function getValueForAttribute(node, name, expected) { { if (!isAttributeNameSafe(name)) { return; } if (!node.hasAttribute(name)) { return expected === undefined ? undefined : null; } var value = node.getAttribute(name); if (value === '' + expected) { return expected; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!i...
[ "0.74267244", "0.74267244", "0.74267244", "0.74267244", "0.74267244", "0.74267244", "0.74267244", "0.74267244", "0.74267244", "0.74267244", "0.73298305", "0.73298305", "0.7326827", "0.73233503", "0.73233503", "0.73233503", "0.73233503", "0.73233503", "0.73233503", "0.73233503",...
0.0
-1
Implements an host component that allows setting these optional props: `checked`, `value`, `defaultChecked`, and `defaultValue`. If `checked` or `value` are not supplied (or null/undefined), user actions that affect the checked state or value will trigger updates to the element. If they are supplied (and not null/undef...
function getHostProps(element, props) { var node = element; var checked = props.checked; var hostProps = _assign({}, props, { defaultChecked: undefined, defaultValue: undefined, value: undefined, checked: checked != null ? checked : node._wrapperState.initialChecked }); return hostProps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(props) {\n super(props);\n this.value = props.value;\n this.id = RadioButton.idGenerator(this.value);\n this.groupName = props.groupName;\n this.optional = {};\n if (typeof props.onChangeCallback === 'function') {\n this.optional.onChangeCallback =\n...
[ "0.6890268", "0.67855096", "0.67855096", "0.67855096", "0.67855096", "0.67855096", "0.67855096", "0.67855096", "0.67855096", "0.67855096", "0.6388342", "0.62572324", "0.62100875", "0.6130889", "0.6130585", "0.6130585", "0.6130585", "0.6130585", "0.6130585", "0.6130585", "0.61...
0.0
-1
In Chrome, assigning defaultValue to certain input types triggers input validation. For number inputs, the display value loses trailing decimal points. For email inputs, Chrome raises "The specified value is not a valid email address". Here we check to see if the defaultValue has actually changed, avoiding these proble...
function setDefaultValue(node, type, value) { if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== 'number' || node.ownerDocument.activeElement !== node) { if (value == null) { node.defaultValue = '' + node._wrapperState.initialValue; } else if (node.defaultValue !== ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shouldSetInputTextToDefaultValue (props) {\n let result = (this.previousDefaultValue != props.defaultValue) || (this.previousChangeIndicator != props.changeIndicator)\n return result\n }", "function checkValue(value, defaultValue) {\n return (value ? value : defaultValue)\n }", "function setDe...
[ "0.70027524", "0.66452426", "0.6549024", "0.6549024", "0.65101707", "0.65101707", "0.6501496", "0.6501496", "0.6501496", "0.6501496", "0.6501496", "0.63815045", "0.63815045", "0.63815045", "0.63815045", "0.63815045", "0.63815045", "0.63815045", "0.63815045", "0.63815045", "0....
0.0
-1
SECTION: handle `change` event
function shouldUseChangeEvent(elem) { var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "onchange() {}", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}...
[ "0.78536415", "0.77069587", "0.7598006", "0.75212336", "0.7510656", "0.7503609", "0.7448818", "0.7420897", "0.74019486", "0.73864216", "0.73662615", "0.73555803", "0.7351097", "0.7349635", "0.73438704", "0.7339734", "0.733801", "0.73354226", "0.73326415", "0.73283374", "0.732...
0.0
-1
(For IE <=9) Starts tracking propertychange events on the passedin element and override the value property so that we can distinguish user events from value changes in JS.
function startWatchingForValueChange(target, targetInst) { activeElement = target; activeElementInst = targetInst; activeElement.attachEvent('onpropertychange', handlePropertyChange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('on...
[ "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.74984235", "0.7280834", "0.7193587", "0.7193587", "0.704501", "0.70323575", "0.7023257", "0.69341207", "0.69341207", "0...
0.0
-1
(For IE <=9) Removes the event listeners from the currentlytracked element, if any exists.
function stopWatchingForValueChange() { if (!activeElement) { return; } activeElement.detachEvent('onpropertychange', handlePropertyChange); activeElement = null; activeElementInst = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "function removeListeners(useCapturing) {\r\r\n // get all div in list\r\r\...
[ "0.7511157", "0.7134657", "0.7104534", "0.70863074", "0.70863074", "0.70760804", "0.70558333", "0.70454526", "0.7040501", "0.70146626", "0.70063", "0.69850737", "0.69768685", "0.6942995", "0.69234794", "0.6918382", "0.6914762", "0.6900439", "0.68650395", "0.68642944", "0.6862...
0.0
-1
(For IE <=9) Handles a propertychange event, sending a `change` event if the value of the active element has changed.
function handlePropertyChange(nativeEvent) { if (nativeEvent.propertyName !== 'value') { return; } if (getInstIfValueChanged(activeElementInst)) { manualDispatchChangeEvent(nativeEvent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('on...
[ "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.71692085", "0.69451064", "0.6840506", "0.68319553", "0.6743934", "0.66957945", "0.66957945", "0.66957945", "0.66957945", ...
0.0
-1
For IE8 and IE9.
function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.in...
[ "0.71892583", "0.7018611", "0.6990977", "0.6990977", "0.67857254", "0.6689359", "0.65084034", "0.64540815", "0.64540815", "0.6431494", "0.6362608", "0.63479495", "0.62849253", "0.6247649", "0.6229919", "0.6197086", "0.61709774", "0.6158672", "0.61451566", "0.61313784", "0.611...
0.0
-1
SECTION: handle `click` event
function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. var nodeName = elem.nodeName; return nodeName && nodeName.toLowerCase() === 'input' && (elem.type ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick( event ){ }", "handleClick() {}", "function handleClick(){\n console.log(\"clicked\");\n}", "function handleClick(event)\n{\n}", "click() { }", "function clickHandler(){\n console.log('I am clicked');\n}", "function clickHandler(event) {\n\tindexChangeSections(event);\n\ttabChangeSect...
[ "0.8124236", "0.78792703", "0.7531666", "0.7501165", "0.7473819", "0.7401734", "0.739119", "0.7379254", "0.7379254", "0.73300016", "0.7328879", "0.7245047", "0.7238538", "0.7212335", "0.71150935", "0.7083005", "0.7062222", "0.7056662", "0.7017632", "0.70069724", "0.69829756",...
0.0
-1
IE8 does not implement getModifierState so we simply map it to the only modifier keys exposed by the event itself, does not support Lockkeys. Currently, all major browsers except Chrome seems to support Lockkeys.
function modifierStateGetter(keyArg) { var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; if (nativeEvent.getModifierState) { return nativeEvent.getModifierState(keyArg); } var keyProp = modifierKeyToProp[keyArg]; return keyProp ? !!nativeEvent[keyProp] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syn...
[ "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7308765", "0.7273113", "0.72153", "0.7185745", "0.7185745", "0.7106114", "0.70852816", "0...
0.0
-1
`ReactInstanceMap` maintains a mapping from a public facing stateful instance (key) and the internal representation (value). This allows public methods to accept the user facing instance as an argument and map them back to internal methods. Note that this module is currently shared and assumed to be stateless. If this ...
function get(key) { return key._reactInternalFiber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapWrapper(key)\n{\n\tthis.key = key;\n}", "function Map() {\n this.container = new Object();\n}", "function Map() {\r\n this.keys = [];\r\n this.values = [];\r\n}", "function Map() {\n\tthis.keys = [];\n\tthis.values = [];\n\n\t// add a key / value pair to map\n\tthis.add = function(key, v...
[ "0.5623249", "0.54417914", "0.5437446", "0.5428657", "0.5292151", "0.52272433", "0.5220775", "0.5151025", "0.5148145", "0.51442593", "0.5122616", "0.51154083", "0.51114726", "0.5110734", "0.50548315", "0.5044667", "0.50236446", "0.50236446", "0.49966064", "0.49966064", "0.499...
0.0
-1
Find the deepest React component completely containing the root of the passedin instance (for use when entire React trees are nested within each other). If React trees are not nested, returns null.
function findRootContainerNode(inst) { // TODO: It may be a good idea to cache this to prevent unnecessary DOM // traversal, but caching is difficult to do correctly without using a // mutation observer to listen for all DOM changes. while (inst.return) { inst = inst.return; } if (inst.tag !== HostRoot)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n ...
[ "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6874498", "0.6796067", "0.6796067", "0.6796067", "0.6796067", "0.6796067", "0.6796067", "0.6796067", "...
0.0
-1
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.6365681", "0.6365681", "0.6350171", "0.6195417", "0.60652924", "0.59938246", "0.59328604", "0.59285367", "0.5797761", "0.574521", "0.57323587", "0.56560516", "0.5634453", "0.56326807", "0.5620803", "0.55987376", "0.55953383", "0.5583639", "0.55776316", "0.5566399", "0.5566...
0.0
-1
Implements an host component that warns when `selected` is set.
function validateProps(element, props) { // TODO (yungsters): Remove support for `selected` in <option>. { if (props.selected != null && !didWarnSelectedSetOnOption) { warning(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); didWarnSelect...
{ "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.5835138", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.5717058", "0.56534386", "0.55851144", "0.5576835", "0.5574898", "0.55625105", "0.55625105", "0.5542894", "0.55244917"...
0.5188785
85
Validation function for `value` and `defaultValue`.
function checkSelectPropTypes(props) { ReactControlledValuePropTypes.checkPropTypes('select', props, getCurrentFiberStackAddendum$3); for (var i = 0; i < valuePropNames.length; i++) { var propName = valuePropNames[i]; if (props[propName] == null) { continue; } var isArray = Array.isArray(prop...
{ "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.60982233", "0.6063126", "0.58237755", "0.58237755", "0.57349205", "0.5712575", "0.57051134", "0.57051134", "0.57051134", "0.57051134", "0.57051134", "0.56849426", "0.5681489", "0.5642498", "0.56320775", "0.56320775", "0.56320775", "0.56320775", "0.56320775", "0.56320775", ...
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.6419651", "0.59932727", "0.5976699", "0.5976699", "0.5976699", "0.5976699", "0.5976699", "0.5976699", "0.5976699", "0.5953133", "0.59285825", "0.5902208", "0.5879116", "0.5879116", "0.5879116", "0.5879116", "0.5879116", "0.5879116", "0.5879116", "0.5823836", "0.5766562", ...
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.59294087", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.5788852", "0.57438385", "0.56890935", "0.5673484", "0.56610936", "0.5640146", "0.5580239", "0.544239", "0.5442175", "0.5410278", "0.5397606", "0.53690296", "0.53592485", "0.5327534", "0.532705",...
0.0
-1
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.6744591", "0.66127884", "0.66016066", "0.65233845", "0.65233845", "0.6436199", "0.64057034", "0.63650787", "0.6297055", "0.6197627", "0.6181622", "0.6170583", "0.61681503", "0.61681503", "0.6164184", "0.61129713", "0.6074594", "0.6074594", "0.6074594", "0.6074594", "0.6074...
0.0
-1
Calculate the diff between the two objects.
function diffProperties$1(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, l...
{ "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.7357562", "0.7009791", "0.6960505", "0.68648994", "0.68648994", "0.68648994", "0.68648994", "0.68648994", "0.68648994", "0.66712385", "0.6599254", "0.65697217", "0.65627253", "0.65573925", "0.65102893", "0.64931816", "0.6444567", "0.6444105", "0.64130205", "0.6396601", "0....
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.62685335", "0.62685335", "0.62685335", "0.62685335", "0.60529494", "0.60529494", "0.60529494", "0.60171443", "0.60171443", "0.60171443", "0.60171443", "0.5887977", "0.5829999", "0.5825935", "0.57073486", "0.57073486", "0.5660173", "0.54269683", "0.54269683", "0.54199094", ...
0.5582005
56
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 (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET; }
{ "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.6494671
78
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.5604123
53
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.6012318", "0.5403361", "0.5396721", "0.5396721", "0.5262843", "0.52391803", "0.5218998", "0.5172469", "0.5112942", "0.50888544", "0.5083547", "0.5077279", "0.50727296", "0.5068563", "0.50527227", "0.50212246", "0.4968902", "0.4958831", "0.4943624", "0.49150303", "0.4910145...
0.0
-1
TODO: This should be lifted into the renderer.
function createFiberRoot(containerInfo, isAsync, hydrate) { // Cyclic construction. This cheats the type system right now because // stateNode is any. var uninitializedFiber = createHostRootFiber(isAsync); var root = { current: uninitializedFiber, containerInfo: containerInfo, pendingChildren: null,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static rendered () {}", "static rendered () {}", "render() {\n // Subclasses should override\n }", "render() {\n\n\t}", "render() {\n\n\t}", "function render() {\n\n\t\t\t}", "_render() {}", "_firstRendered() { }", "function TextRenderer(){}// no need for block level renderers", "function ren...
[ "0.70456946", "0.70456946", "0.69009185", "0.6737335", "0.6737335", "0.6670562", "0.66189414", "0.6587394", "0.6581374", "0.6540784", "0.6519645", "0.64747703", "0.6472744", "0.6472744", "0.6472744", "0.6429283", "0.64223343", "0.6365858", "0.6365858", "0.6341282", "0.6320911...
0.0
-1
Invokes the mount lifecycles on a previously never rendered instance.
function mountClassInstance(workInProgress, renderExpirationTime) { var ctor = workInProgress.type; { checkClassInstance(workInProgress); } var instance = workInProgress.stateNode; var props = workInProgress.pendingProps; var unmaskedContext = getUnmaskedContext(workInProgress); instance.props = pr...
{ "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, renderExpirationTime) { var ctor = workInProgress.type; var instance = workInProgress.stateNode; var oldProps = workInProgress.memoizedProps; var newProps = workInProgress.pendingProps; instance.props = oldProps; var oldContext = instance.context; va...
{ "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.55662465", "0.5321176", "0.5182529", "0.5181482", "0.51724356", "0.5154244", "0.5129703", "0.51081574", "0.5090919", "0.5080184", "0.49809292", "0.49445218", "0.49326673", "0.49042782", "0.484472", "0.48310763", "0.48164058", "0.4806649", "0.4796564", "0.47963667", "0.4788...
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.6458614", "0.6372852", "0.62755775", "0.61564714", "0.6147988", "0.61425847", "0.61374426", "0.6125191", "0.6125191", "0.61222005", "0.61141974", "0.61141974", "0.61141974", "0.611335", "0.61059684", "0.6096539", "0.6091483", "0.6082614", "0.59902287", "0.5978289", "0.5978...
0.0
-1
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.6968536", "0.6940015", "0.6940015", "0.6940015", "0.6940015", "0.6933136", "0.6933136", "0.6933136", "0.6933136", "0.6933136", "0.6933136", "0.6927283", "0.6927283", "0.6927283", "0.692717", "0.692717", "0.692717", "0.6923086", "0.6921206", "0.6913083", "0.6899645", "0.6...
0.0
-1
TODO: Remove this and use reconcileChildrenAtExpirationTime directly.
function reconcileChildren(current, workInProgress, nextChildren) { reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, workInProgress.expirationTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reconcileChildren(current,workInProgress,nextChildren){reconcileChildrenAtExpirationTime(current,workInProgress,nextChildren,workInProgress.expirationTime);}", "function reconcileChildren(current,workInProgress,nextChildren){reconcileChildrenAtExpirationTime(current,workInProgress,nextChildren,workInPro...
[ "0.82389414", "0.82389414", "0.82389414", "0.82389414", "0.82389414", "0.7821474", "0.77387625", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751", "0.7716751...
0.7480407
59
TODO: Delete memoizeProps/State and move to reconcile/bailout instead
function memoizeProps(workInProgress, nextProps) { workInProgress.memoizedProps = nextProps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function memoizeProps(workInProgress, nextProps) {\n\t workInProgress.memoizedProps = nextProps;\n\t }", "function memoizeProps(workInProgress, nextProps) {\n workInProgress.memoizedProps = nextProps;\n }", "function memoizeProps(workInProgress, nextProps) {\n workInProgress.memoizedProps = ...
[ "0.6762883", "0.6754626", "0.67469776", "0.67469776", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", "0.6716131", ...
0.6669606
66
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.6476858", "0.5951904", "0.5840481", "0.55877614", "0.55820787", "0.5468524", "0.5439477", "0.5429089", "0.5409245", "0.5409245", "0.5398143", "0.53773975", "0.5376483", "0.5358958", "0.5358958", "0.5335065", "0.52276266", "0.52006626", "0.5185505", "0.5121165", "0.5117097"...
0.0
-1
Capture errors so they don't interrupt unmounting.
function safelyCallComponentWillUnmount(current, instance) { { invokeGuardedCallback$3(null, callComponentWillUnmountWithTimer, null, current, instance); if (hasCaughtError$1()) { var unmountError = clearCaughtError$1(); captureCommitPhaseError(current, 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.6385105", "0.5921357", "0.5853079", "0.5853079", "0.5853079", "0.58470565", "0.58197415", "0.58197415", "0.58197415", "0.57672554", "0.5742686", "0.5742686", "0.5742686", "0.5742686", "0.5742686", "0.57321393", "0.57321393", "0.57321393", "0.5689659", "0.5689659", "0.56572...
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) { if (typeof onCommitUnmount === 'function') { onCommitUnmount(current); } switch (current.tag) { case ClassComponent: { safelyDetachRef(current); var instance = current.stateNode; if (typeof instance.componentWillUnmount === 'function') { ...
{ "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.6073508", "0.6073508", "0.59134835", "0.5904139", "0.5881432", "0.5826239", "0.5804769", "0.578999", "0.5755662", "0.5708174", "0.5680008", "0.56713545", "0.5633036", "0.5633036", "0.5631826", "0.56044114", "0.5545005", "0.55360377", "0.55360377", "0.55360377", "0.55177367...
0.0
-1
Creates a unique async expiration time.
function computeUniqueAsyncExpiration() { var currentTime = recalculateCurrentTime(); var result = computeAsyncExpiration(currentTime); if (result <= lastUniqueAsyncExpiration) { // Since we assume the current time monotonically increases, we only hit // this branch when computeUniqueAsyncExpiration is fi...
{ "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.68019056", "0.68019056", "0.68019056", "0.68019056", "0.68019056", "0.68019056", "0.68019056", "0.68019056", "0.67918587", "0.67918587", "0.67918587", "0.67918587", "0.67918587", "0.67918587", "0.67918587", "0.67918587", "0.67918587", "0.67918587", "0.67918587", "0.67918587"...
0.67636746
41
TODO: Rename this to scheduleTimeout or something
function suspendRoot(root, thenable, timeoutMs, suspendedTime) { // Schedule the timeout. if (timeoutMs >= 0 && nextLatestTimeoutMs < timeoutMs) { nextLatestTimeoutMs = timeoutMs; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "schedule(delay = this.timeout) {\r\n this.cancel();\r\n this.timeoutToken = setTimeout(this.timeoutHandler, delay);\r\n }", "function setupTimeoutTimer() {\n updateTimeoutInfo(undefined);\n }", "onTimeout() {}", "async setTimeout() {\n const TimeoutRequestsWindowTime = 5*60*1000;\n ...
[ "0.71883744", "0.69048095", "0.67240846", "0.6426878", "0.64236104", "0.6382963", "0.62626487", "0.62611955", "0.6229805", "0.6225475", "0.6200153", "0.6200153", "0.6172682", "0.6155372", "0.61088985", "0.6096295", "0.60934234", "0.6087903", "0.6087903", "0.6076975", "0.60657...
0.0
-1
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 (isU...
{ "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.76551515", "0.76551515", "0.76334465", "0.76334465", "0.76334465", "0.71456784", "0.71456784", "0.71456784", "0.71019405", "0.7083186", "0.7076524", "0.7076524", "0.7076524", "0.7076524", "0.7076524", "0.7076524", "0.7076524", "0.7076524", "0.7076524", "0.7076524", "0.7076...
0.7051454
32
When working on async work, the reconciler asks the renderer if it should yield execution. For DOM, we implement this with requestIdleCallback.
function shouldYield() { if (deadline === null) { return false; } if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) { // Disregard deadline.didTimeout. Only expired work should be flushed // during a timeout. This path is only hit for non-expired work. return false; } deadlineDidExpir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onIdle (callback) {\n\t\tif (Object.keys (this.taskMap).length <= 0) {\n\t\t\tsetImmediate (callback);\n\t\t\treturn;\n\t\t}\n\t\tthis.statusEventEmitter.once (IdleEvent, callback);\n\t}", "function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Rem...
[ "0.55909777", "0.558309", "0.558309", "0.5554942", "0.5554942", "0.5554942", "0.55450976", "0.5500691", "0.5457481", "0.545722", "0.54455143", "0.54455143", "0.54388463", "0.5431872", "0.54171467", "0.540121", "0.53965545", "0.53921384", "0.53773165", "0.5372673", "0.537124",...
0.0
-1
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.6612359", "0.65732634", "0.6552813", "0.6538101", "0.6538101", "0.6135624", "0.6086937", "0.6049374", "0.60242605", "0.5976686", "0.59277886", "0.59277886", "0.59277886", "0.59277886", "0.59277886", "0.59277886", "0.59277886", "0.59277886", "0.59277886", "0.5880311", "0.58...
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.66132087", "0.657445", "0.65534955", "0.65382004", "0.65382004", "0.6135669", "0.6086718", "0.60504633", "0.60258555", "0.5976142", "0.5927382", "0.5927382", "0.5927382", "0.5927382", "0.5927382", "0.5927382", "0.5927382", "0.5927382", "0.5927382", "0.58799106", "0.5858339...
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
Copyright 2015, Yahoo Inc. Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
function addLocaleData() { var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var locales = Array.isArray(data) ? data : [data]; locales.forEach(function (localeData) { if (localeData && localeData.locale) { intl_messageformat__WEBPACK_IMPORTED_MODULE_1___default.a.__ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "protected internal function m252() {}", "transient final protected i...
[ "0.6377186", "0.6271533", "0.5864289", "0.58490723", "0.5847677", "0.57779276", "0.5614154", "0.5590317", "0.5485001", "0.5454564", "0.545351", "0.5427332", "0.5384727", "0.5354061", "0.5352202", "0.53506595", "0.5301245", "0.5301245", "0.5301245", "0.5301245", "0.5301245", ...
0.0
-1
Copyright 2015, Yahoo Inc. Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. Inspired by reactredux's `connect()` HOC factory function implementation:
function getDisplayName(Component$$1) { return Component$$1.displayName || Component$$1.name || 'Component'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapS...
[ "0.8082577", "0.80761415", "0.8074473", "0.8074473", "0.8074473", "0.8074473", "0.8074473", "0.8074473", "0.8074473", "0.8060908", "0.8060908", "0.8060908", "0.8060908", "0.8060908", "0.8060908", "0.8060908", "0.8048516", "0.8037224", "0.8035343", "0.8035343", "0.8035343", ...
0.0
-1
Copyright 2015, Yahoo Inc. Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
function defineMessages(messageDescriptors) { // This simply returns what's passed-in because it's meant to be a hook for // babel-plugin-react-intl. return messageDescriptors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "protected internal function m252() {}", "transient final protected i...
[ "0.6376084", "0.62706244", "0.58636177", "0.58482903", "0.5847544", "0.5777374", "0.56141454", "0.5589258", "0.5484195", "0.5455097", "0.5452246", "0.54265475", "0.53839713", "0.5354016", "0.53509074", "0.53497547", "0.53007287", "0.53007287", "0.53007287", "0.53007287", "0.5...
0.0
-1
Copyright 2015, Yahoo Inc. Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. This is a "hack" until a proper `intlpluralformat` package is created.
function resolveLocale(locales) { // IntlMessageFormat#_resolveLocale() does not depend on `this`. return intl_messageformat__WEBPACK_IMPORTED_MODULE_1___default.a.prototype._resolveLocale(locales); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatPlural(num,str){return num+\" \"+str+(num===1?'':'s');}/**\r\n * Copyright 2017 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * ...
[ "0.77356875", "0.7058907", "0.7030382", "0.7019028", "0.7019028", "0.7019028", "0.6985141", "0.6985141", "0.6985141", "0.6966321", "0.6966321", "0.6966321", "0.6966321", "0.6966321", "0.6966321", "0.6961492", "0.69475496", "0.68934774", "0.68300265", "0.682934", "0.67429066",...
0.0
-1
AsyncMode should be deprecated
function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to ...
{ "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
connect is a facade over connectAdvanced. It turns its args into a compatible selectorFactory, which has the signature: (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps connect passes its args to connectAdvanced as options, which will in turn pass them to selectorFactory each time a Connect component ...
function match(arg, factories, name) { for (var i = factories.length - 1; i >= 0; i--) { var result = factories[i](arg); if (result) return result; } return function (dispatch, options) { throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createConnect() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$connectHOC = _ref.connectHOC,\n connectHOC = _ref$connectHOC === undefined ? connectAdvanced : _ref$connectHOC,\n _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,\n mapS...
[ "0.75024915", "0.7500725", "0.7420009", "0.7420009", "0.7417194", "0.7414589", "0.7373876", "0.7373876", "0.7373876", "0.7373876", "0.7373876", "0.7373876", "0.7373876", "0.73716056", "0.73716056", "0.73716056", "0.73716056", "0.73290783", "0.73290783", "0.73290783", "0.73290...
0.0
-1
different options opens up some testing and extensibility scenarios
function createConnect(_temp) { var _ref = _temp === void 0 ? {} : _temp, _ref$connectHOC = _ref.connectHOC, connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__["default"] : _ref$connectHOC, _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testOptions ( options ) {\n\n\t\t// To prove a fix for #537, freeze options here.\n\t\t// If the object is modified, an error will be thrown.\n\t\t// Object.freeze(options);\n\n\t\tvar parsed = {\n\t\t\tmargin: 0,\n\t\t\tlimit: 0,\n\t\t\tpadding: 0,\n\t\t\tanimate: true,\n\t\t\tanimationDuration: 300,\n\t...
[ "0.6038046", "0.6032396", "0.6032396", "0.6000212", "0.59554785", "0.59554785", "0.59554785", "0.59451085", "0.5915849", "0.59067327", "0.5874142", "0.5874142", "0.5858558", "0.5855062", "0.5855062", "0.5834565", "0.5834565", "0.5827782", "0.5820266", "0.5819525", "0.58025575...
0.0
-1
If pure is true, the selector returned by selectorFactory will memoize its results, allowing connectAdvanced's shouldComponentUpdate to return false if final props have not changed. If false, the selector will always return a new object and shouldComponentUpdate will always return true.
function finalPropsSelectorFactory(dispatch, _ref2) { var initMapStateToProps = _ref2.initMapStateToProps, initMapDispatchToProps = _ref2.initMapDispatchToProps, initMergeProps = _ref2.initMergeProps, options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finalPropsSelectorFactory(dispatch, _ref2) {\n\t var initMapStateToProps = _ref2.initMapStateToProps,\n\t initMapDispatchToProps = _ref2.initMapDispatchToProps,\n\t initMergeProps = _ref2.initMergeProps,\n\t options = _objectWithoutProperties(_ref2, ['initMapStateToProps', 'initMapDispatch...
[ "0.5797119", "0.5797119", "0.5783517", "0.5783517", "0.5783517", "0.5783129", "0.5783129", "0.5783129", "0.5783129", "0.5768795", "0.5768795", "0.5765673", "0.57628924", "0.57622963", "0.57622963", "0.57622963", "0.57622963", "0.57622963", "0.57622963", "0.57622963", "0.57622...
0.56663
89
to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine whether mapToProps needs to be invoked when props have changed. A length of one signals that mapToProps does not depend on props from the parent component. A length of zero is assumed to mean mapToProps is getting args via a...
function getDependsOnOwnProps(mapToProps) { return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapToProps() {\n return {};\n}", "function mapToProps() {\n return {};\n}", "function wrapMapToPropsFunc(mapToProps,methodName){return function initProxySelector(dispatch,_ref){var displayName=_ref.displayName;var proxy=function mapToPropsProxy(stateOrDispatch,ownProps){return proxy.dependsOnOwn...
[ "0.64887166", "0.64887166", "0.62169665", "0.6062001", "0.590732", "0.58162886", "0.58031344", "0.5798494", "0.5766989", "0.5766989", "0.5766989", "0.5766989", "0.5766989", "0.5761552", "0.5761552", "0.5761552", "0.5761552", "0.5745488", "0.57390016", "0.57330906", "0.5733090...
0.0
-1
this function wraps mapToProps in a proxy function which does several things: Detects whether the mapToProps function being called depends on props, which is used by selectorFactory to decide if it should reinvoke on props changes. On first call, handles mapToProps if returns another function, and treats that new funct...
function wrapMapToPropsFunc(mapToProps, methodName) { return function initProxySelector(dispatch, _ref) { var displayName = _ref.displayName; var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, _ref) {\n var displayName = _ref.displayName;\n\n var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy....
[ "0.7835368", "0.7835368", "0.7835368", "0.7835368", "0.7835368", "0.78094435", "0.77915895", "0.77791655", "0.77717596", "0.77691317", "0.7764148", "0.7764148", "0.7764148", "0.7764148", "0.7764148", "0.7764148", "0.7764148", "0.7735827", "0.7735266", "0.7729478", "0.7728332"...
0.76695675
68
Base class helpers for the updating state of a component.
function Component(props, context, updater) { this.props = props; this.context = context; this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; }
{ "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.72174495", "0.6760336", "0.6674498", "0.6611827", "0.6539205", "0.65264326", "0.6489361", "0.6470911", "0.64590335", "0.63847995", "0.63539994", "0.6335737", "0.63053733", "0.6304823", "0.6271708", "0.6266727", "0.62187904", "0.6214442", "0.61935455", "0.6188449", "0.61573...
0.0
-1
Base class helpers for the updating state of a component.
function PureComponent(props, context, updater) { // Duplicated from Component. this.props = props; this.context = context; this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; }
{ "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.7217204", "0.67610246", "0.66769236", "0.66106635", "0.6540022", "0.65259355", "0.6489663", "0.64705694", "0.645821", "0.63847154", "0.6354757", "0.63347685", "0.63053316", "0.6304944", "0.62717897", "0.6266675", "0.621649", "0.6214279", "0.6194085", "0.6189877", "0.615812...
0.0
-1
Create and return a new ReactElement of the given type. See
function createElement(type, config, children) { var propName; // 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)) { ke...
{ "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.637205
44
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.6882577", "0.6599971", "0.65013385", "0.65013385", "0.65013385", "0.65013385", "0.65013385", "0.65013385", "0.65013385", "0.65013385", "0.65013385", "0.6265683", "0.6180459", "0.594761", "0.5920264", "0.5884003", "0.5865715", "0.5779805", "0.5639892", "0.5633744", "0.56215...
0.0
-1
Clone and return a new ReactElement using element as the starting point. See
function cloneElement(element, config, children) { var propName; // Original props are copied var props = _assign({}, element.props); // Reserved names are extracted var key = element.key; var ref = element.ref; // Self is preserved since the owner is preserved. var self = element._self; // Source i...
{ "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.6915557", "0.6893059", "0.66959214", "0.66959214", "0.66947424", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.66482466", "0.6635265", "0.66155624", ...
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, emptyFunction.thatReturnsArgument); 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
This is a dummy function to check if the function name has been altered by minification. If the function has been minified and NODE_ENV !== 'production', warn the user.
function isCrushed() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uglify(name) {\n console.log(\"Hello \" + name);\n}", "function keepNonMinified(file) {\n\tvar keep = true;\n\tif(file.path.match('.js$')) {\n\t\tvar minPath = file.path.replace('.js', '.min.js');\n\t\tkeep = !exists(minPath);\n\t}\n\treturn keep;\n}", "function markFuncFreeze(fun, opt_name) {\n /...
[ "0.602566", "0.5777989", "0.57169867", "0.56800693", "0.56800693", "0.5636262", "0.5636262", "0.56205446", "0.55760926", "0.55489725", "0.552758", "0.5519853", "0.5519853", "0.5519853", "0.5519853", "0.5519853", "0.5508173", "0.5493446", "0.5486299", "0.54790825", "0.54787135...
0.0
-1
Returns a canvas with the resized image
resize (image, newWidth, newHeight) { // Resize in a 2 step process, matching width first, then height, in order // to preserve nearest-neighbor sampling. const stretchWidthCanvas = this._makeCanvas(); stretchWidthCanvas.width = newWidth; stretchWidthCanvas.height = image.height;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _getScaledCanvas(image,maxDimension){const thumbCanvas=document.createElement('canvas');if(image.width>maxDimension||image.height>maxDimension){if(image.width>image.height){thumbCanvas.width=maxDimension;thumbCanvas.height=maxDimension*image.height/image.width}else{thumbCanvas.width=maxDimension*image.width...
[ "0.730445", "0.7299781", "0.7059216", "0.6924135", "0.68889546", "0.68780965", "0.67863494", "0.6751586", "0.6665853", "0.6658321", "0.6645548", "0.6626456", "0.65524596", "0.65464574", "0.65426457", "0.652669", "0.65259796", "0.65104705", "0.6489413", "0.6486319", "0.6485485...
0.6710879
8
TODO consolidate with scratchvm/src/util/base64util.js From
convertDataURIToBinary (dataURI) { const BASE64_MARKER = ';base64,'; const base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length; const base64 = dataURI.substring(base64Index); const raw = window.atob(base64); const rawLength = raw.length; const array = new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Magic(r){if(!/^[a-z0-9+/]+={0,2}$/i.test(r)||r.length%4!=0)throw Error(\"Not base64 string\");for(var t,e,n,o,i,a,f=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",h=[],d=0;d<r.length;d+=4)t=(a=f.indexOf(r.charAt(d))<<18|f.indexOf(r.charAt(d+1))<<12|(o=f.indexOf(r.charAt(d+2)))<<6|(i...
[ "0.72834396", "0.7264216", "0.7222409", "0.71991026", "0.71887475", "0.7186382", "0.7169624", "0.7166873", "0.71188885", "0.7114991", "0.7108907", "0.7108907", "0.7096829", "0.7084061", "0.7073534", "0.70716816", "0.70711565", "0.705599", "0.7034924", "0.7029243", "0.7004515"...
0.0
-1
Mapping of attribute names to required namespaces:
static attributeNamespace () { return { 'href': SvgElement.xlink, 'xlink': SvgElement.xmlns, // Only the xmlns attribute needs the trailing slash. See #984 'xmlns': `${SvgElement.xmlns}/`, // IE needs the xmlns namespace when setting 'xmlns:xlink'. See...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAttributeNameLiterals(name) {\n var _a = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__read\"])(splitNsName(name), 2), attributeNamespace = _a[0], attributeName = _a[1];\n var nameLiteral = literal(attributeName);\n if (attributeNamespace) {\n return [\n literal(0 /* Namespac...
[ "0.5795568", "0.56367296", "0.5584496", "0.55693793", "0.55393827", "0.55342424", "0.5508028", "0.5508028", "0.5508028", "0.54698807", "0.5396297", "0.5396297", "0.5396297", "0.5396297", "0.5396297", "0.5396297", "0.5396297", "0.5396297", "0.5396297", "0.5396297", "0.5396297"...
0.6586446
0
Transforms an SVG's text elements for Scratch 2.0 quirks. These quirks include: 1. `x` and `y` properties are removed/ignored. 2. Alignment is set to `textbeforeedge`. 3. Linebreaks are converted to explicit elements. 4. Any required fonts are injected.
_transformText () { // Collect all text elements into a list. const textElements = []; const collectText = domElement => { if (domElement.localName === 'text') { textElements.push(domElement); } for (let i = 0; i < domElement.childNodes.length;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeText() {\n let outputText = \n ['g', getText().map(textData => ['g', {'attrs': {'transform': 'translate(-0.5 -0.5)'}},\n ['switch',\n ['foreignObject', {'attrs': {'style': 'overflow: visible; text-align: left;', 'pointer-events': 'none', 'width': '100%', 'height': '100%', 'req...
[ "0.65613633", "0.6255379", "0.6177869", "0.6120506", "0.6082242", "0.60769737", "0.6054335", "0.60504067", "0.5913869", "0.58896947", "0.5856599", "0.5788221", "0.5758591", "0.5705453", "0.57027066", "0.56555647", "0.56520665", "0.5604754", "0.55543876", "0.553504", "0.552698...
0.8477336
0
Fix SVGs to comply with SVG spec. Scratch 2 defaults to x2 = 0 when x2 is missing, but SVG defaults to x2 = 1 when missing.
_transformGradients () { const linearGradientElements = this._collectElements('linearGradient'); // For each gradient element, supply x2 if necessary. for (const gradientElement of linearGradientElements) { if (!gradientElement.getAttribute('x2')) { gradientElement.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fix_IE_SVGs() {\n var SVGs = $j('.pays__svg, .ships__svg, .socials__svg');\n if (SVGs.length) {\n SVGs.each(function (i, el) {\n\n var svg_class = $j(el).attr('class').replace(/light|dark|onecolor|pays__svg|\\s/g, '');\n var svgHTML = $j(el).parent().html();\n var regex =...
[ "0.63539404", "0.5781691", "0.5473102", "0.52418256", "0.52354056", "0.5203125", "0.5192704", "0.51734763", "0.5166024", "0.5154241", "0.51197046", "0.51162255", "0.51156425", "0.50855356", "0.5053058", "0.503601", "0.50203943", "0.49964273", "0.49774435", "0.49629587", "0.49...
0.5075095
14
Fix SVGs to match appearance in Scratch 2, which used nearest neighbor scaling for bitmaps within SVGs.
_transformImages () { const imageElements = this._collectElements('image'); // For each image element, set image rendering to pixelated const pixelatedImages = 'image-rendering: optimizespeed; image-rendering: pixelated;'; for (const elt of imageElements) { if (elt.getAttrib...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fix_IE_SVGs() {\n var SVGs = $j('.pays__svg, .ships__svg, .socials__svg');\n if (SVGs.length) {\n SVGs.each(function (i, el) {\n\n var svg_class = $j(el).attr('class').replace(/light|dark|onecolor|pays__svg|\\s/g, '');\n var svgHTML = $j(el).parent().html();\n var regex =...
[ "0.7343137", "0.6557281", "0.59905255", "0.5923819", "0.59049356", "0.5851998", "0.5829526", "0.5818749", "0.5698383", "0.5598313", "0.5586575", "0.5584239", "0.5566456", "0.55572927", "0.55514234", "0.55480266", "0.54547167", "0.5421039", "0.5384684", "0.5378771", "0.5374003...
0.0
-1
Find all instances of a URLreferenced `stroke` in the svg. In 2.0, all gradient strokes have a round `strokelinejoin` and `strokelinecap`... for some reason.
_setGradientStrokeRoundedness () { const elements = this._collectElements(); for (const elt of elements) { if (!elt.style) continue; const stroke = elt.style.stroke || elt.getAttribute('stroke'); if (stroke && stroke.match(/^url\(#.*\)$/)) { elt.style...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSVGinfo() {\n console.log(this);\n S = document.getElementById(\"DYOSVG\").contentDocument;\n var STYLESVG = []\n , NUMCOLS = [];\n var i;\n\n for (var j = 0; j < S.styleSheets.length; j++) {\n var rules = S.styleSheets[j].rules || S.styleSheets[j].cssRules;\n // This ...
[ "0.5622581", "0.5492178", "0.54490256", "0.5263722", "0.5213205", "0.50928223", "0.50467056", "0.50287175", "0.49485436", "0.49410874", "0.49347863", "0.4934419", "0.49174204", "0.4898862", "0.48703974", "0.4863733", "0.48160085", "0.48147413", "0.4801173", "0.4800635", "0.47...
0.5831229
0
Transform the measurements of the SVG. In Scratch 2.0, SVGs are drawn without respect to the width, height, and viewBox attribute on the tag. The exporter does output these properties but they appear to be incorrect often. To address the incorrect measurements, we append the DOM to the document, and then use SVG's nati...
_transformMeasurements () { // Append the SVG dom to the document. // This allows us to use `getBBox` on the page, // which returns the full bounding-box of all drawn SVG // elements, similar to how Scratch 2.0 did measurement. const svgSpot = document.createElement('span'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static svgViewport(svg, xOffset,yOffset,width, height, scale) {\n\t\tsvg.setAttributeNS('', 'width', '' + width);\n\t\tsvg.setAttributeNS('', 'height', '' + height);\n\t\tsvg.setAttributeNS('', 'viewBox', ''+xOffset + ' ' + yOffset + ' ' + Math.round(width / scale) + ' ' +\n\t\t\tMath.round(height / scale));\n\t}"...
[ "0.6146703", "0.5983174", "0.5976927", "0.5976927", "0.5976927", "0.59703046", "0.5969637", "0.5929096", "0.5929096", "0.5924449", "0.58707035", "0.5866641", "0.5779386", "0.57606715", "0.57393914", "0.5731254", "0.56820667", "0.5635515", "0.5629723", "0.56217253", "0.5568057...
0.7769499
0
Funzioni funzione per generare numeri casuali del pc
function getRandomIntInclusive(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateNumCommande() {\n var random = Math.floor(100000000 + Math.random() * 900000000);\n num_commande = 'NH'+random\n }", "computerGeneratedCardinal(cgc){\n var size = cgc & 0xf;\n var n = [];\n var mask = 0xf;\n for(var i = 0; i < size;...
[ "0.7073922", "0.66159457", "0.6524541", "0.63536006", "0.6284837", "0.62524986", "0.617205", "0.6072526", "0.6048668", "0.60283214", "0.5999136", "0.59688324", "0.5968473", "0.5930131", "0.5907478", "0.5897416", "0.58957505", "0.5884402", "0.5882333", "0.5860285", "0.5847414"...
0.0
-1
funzione per controllare numeri in un array non siano uguali
function isInArray(array, element) { var i = 0; var risultato = false; while (i < array.length && risultato == false) { if (array[i] == element) { risultato = true; } i++; } return risultato; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pintarGuiones(num) {\r\n for (var i = 0; i < num; i++) {\r\n oculta[i] = \"_\";\r\n }\r\n hueco.innerHTML = oculta.join(\"\");//join() une todos los elementos de un array formando una cadena y separándolos con aquel argumento que definamos\r\n}", "function controllo(numeri, tentativi){\n // confr...
[ "0.62814313", "0.6171037", "0.61228573", "0.60402066", "0.5967102", "0.5962719", "0.5943229", "0.5891723", "0.588859", "0.58730066", "0.5859933", "0.58490133", "0.58436453", "0.5812462", "0.5812462", "0.57998055", "0.5770013", "0.575403", "0.57352555", "0.572582", "0.57223", ...
0.0
-1
BOOL WINAPI GetFileVersionInfoA( _In_ LPCSTR lptstrFilename , DWORD dwHandle , _In_ DWORD dwLen , _Out_ LPVOID lpData);
function ffi_cleanDeclare( arg_declareText ) { var declareText = ''; declareText = arg_declareText.trim( ); declareText = declareText.replaceAll( '\t' , ' ' ); declareText = declareText.replaceAll( '\r' , ' ' ); declareText = declareText.replaceAll( '\n' , ' ' ); var tempArray1 = dec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFileVersion(fileGuid, fileObj, versionObj, tempFile) {\n var versionGuid = jive.util.guid();\n if (fileObj.versionsList) {\n fileObj.versionsList.push(versionGuid);\n } else {\n fileObj.versionsList = [versionGuid];\n } // end if\n\n var firstStep = q.fcall(function () {...
[ "0.57358634", "0.5707284", "0.54441744", "0.52108884", "0.52050745", "0.5178513", "0.5131007", "0.5131007", "0.5131007", "0.5131007", "0.51267004", "0.5121452", "0.51155245", "0.5104126", "0.50850695", "0.50834566", "0.50733244", "0.50603515", "0.50603515", "0.50603515", "0.5...
0.49402386
42
quoteData is a var! so it has to be above a function call arguments: 1: array of stocks (with one or more elements), 2: index for the specific stock in an array
async function quoteJSON(arrayOfSymbols, el) { try { const quoteData = await iex.quote(arrayOfSymbols[el]); let myPromise = new Promise((resolve, reject) => { Stock.countDocuments( { //toUpperCase to make it work with API stock: arrayOfSymbols[el]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stockData(arr) {\n\n }", "stockData(arr) {\n\n }", "function stock_data(cur_exch, stockData){\n\t//console.log(stockData);\n\tswitch(cur_exch){\n\t\tcase 'NASDAQ':\n\t\t\tvar price = stockData.exchange_stock_data[0].csi_price;\n\t\t\tvar priceChng = stockData.exchange_stock_data[0].graph_data.price_chang...
[ "0.7175157", "0.7175157", "0.617733", "0.59703493", "0.5948382", "0.5912099", "0.5840953", "0.57789314", "0.5774364", "0.5748066", "0.569414", "0.5686457", "0.5562492", "0.55262727", "0.55225444", "0.55185986", "0.5483161", "0.54612327", "0.5459563", "0.54484165", "0.54304963...
0.58387923
7
test files names TODO: move to helpers
function createDir(name) { if(!fs.existsSync(name)){ fs.mkdirSync(name, 0766, function(err){ if(err){ console.log(err); response.send("ERROR! Can't make the directory! \n"); // echo the result back } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testAllFilesInDir() {\n\tfs.readdirSync(__dirname).forEach(file => {\n\t\tif (file.startsWith('test_')) {\n\t\t\ttestFile(__dirname + '/' + file);\n\t\t}\n\t});\n\t\n}", "function testFilePath(funcName) {\n return path.join(testFolder, `${funcName.replace(/.*\\//g, '')}.js`);\n }", "async functi...
[ "0.70677406", "0.6604679", "0.6561319", "0.6462425", "0.64556164", "0.63436115", "0.63418853", "0.6135902", "0.6132796", "0.611852", "0.60906315", "0.6029782", "0.6009458", "0.59877163", "0.58669317", "0.5829814", "0.57553154", "0.5750345", "0.5735164", "0.57347244", "0.56926...
0.0
-1
TODO: move to helpers
function copyFiles(dirname) { var srcDir = dirName + "template/"; createDir(dirName); if (dirname != undefined) { srcDir += dirname + "/"; } for (var i in files) { fs.createReadStream(srcDir + files[i]).pipe(fs.createWriteStream(dirName + files[i])); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "obtain(){}", "transient protected internal function m189() {}", "static final p...
[ "0.61280596", "0.6068674", "0.59467775", "0.5602644", "0.54522926", "0.5332756", "0.5307657", "0.5300574", "0.52752507", "0.5253474", "0.5174232", "0.50839937", "0.5033187", "0.49935612", "0.49870005", "0.49870005", "0.4986851", "0.49490127", "0.49319753", "0.48793572", "0.48...
0.0
-1
Returns a function, that, as long as it continues to be invoked, will not be triggered. The function will be called after it stops being called for N milliseconds. If `immediate` is passed, trigger the function on the leading edge, instead of the trailing.
function debounce(func, wait, immediate) { var timeout; return function () { var context = this, args = arguments; clearTimeout(timeout); timeout = setTimeout(function () { timeout = null; if (!immediate) func.apply(context, args); }, wait); if (im...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var args = arguments,\n callNow = immediate && !timeout,\n later = function () {\n timeout = null;\n if (!immediate) {\n ...
[ "0.6004564", "0.60006154", "0.5987088", "0.59632564", "0.5929661", "0.5929661", "0.5926392", "0.5920413", "0.59126645", "0.59119254", "0.59006953", "0.5889793", "0.58886176", "0.5887382", "0.5880147", "0.5877762", "0.58760935", "0.58760935", "0.58760935", "0.58760935", "0.587...
0.58370227
49
MAYBE CHANGE WAV TO MP3 ?????????????????? / DESCRIPTION: Every noise have four parameters > the name of noise (some of them was created for this program) > the sign of noise (some of them was created for this program too) > audio is JavaScript element with path in "wav" folder > folder is important to match noise to f...
function Noise(name, sign, audio, folder) { this.name = name; this.sign = sign; this.audio = audio; this.folder = folder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function speakVO(){\n var audio = new Audio('../../asset/VOfiles/PerspectivesVO_minigameoverview.wav');\n audio.volume = 1;\n audio.play()\n}", "_defineAudioFileExtention() {\n const a = document.createElement('audio');\n // http://diveintohtml5.info/everything.html\n if (!!(a.canPlayType && a....
[ "0.64845544", "0.6463555", "0.6451415", "0.6451415", "0.6384706", "0.63448817", "0.6343348", "0.63323855", "0.6296042", "0.6279886", "0.62513405", "0.6211291", "0.62066984", "0.6174558", "0.61734456", "0.6113219", "0.6107086", "0.60817814", "0.60721153", "0.6060187", "0.60424...
0.5753851
65
On start click, the queryURL will be constructed using user inputs
function createButtons (){ $("#btnHolder").empty(); // Looping through the GIF topics for (var i=0; i<topics.length; i++) { // Using jQuery to create a button for string in the "topics" array var $gifBtn = $('<button>'); // Adding class "topic" to each button $gifBtn.attr("class", "topic bt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function querystring () {\n setFormFields();\n setBookmarkURL();\n form.bookmark.on(\"click focus mouseenter\", setBookmarkURL);\n}", "function buildQueryURL() {\n // if(queryParams != '') {\n // queryURL is the url we'll use to query the API\n var queryParams = $(\"#countryInput\").val()...
[ "0.69895315", "0.6640543", "0.628289", "0.6261672", "0.6214995", "0.61122507", "0.6052079", "0.60448146", "0.60017306", "0.5939718", "0.5928961", "0.5922557", "0.5898466", "0.5891717", "0.5843399", "0.58273613", "0.5827122", "0.5814679", "0.5804956", "0.5804338", "0.57958734"...
0.0
-1
check if the input currency is in the list of supported conversion currencies of coingecko
function checkCurrency(currencyInput) { let currenciesListQuery = 'https://api.coingecko.com/api/v3/simple/supported_vs_currencies' let response = UrlFetchApp.fetch(currenciesListQuery, {'muteHttpExceptions': true}); var listJsonText = response.getContentText(); var listJsonData = JSON.parse(listJsonText); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateTargetCurrency() {\n let existRates = Object.keys(fx.rates);\n if (!existRates.includes(this.state.targetCurrency.code))\n {\n alert(\"Error: No rate conversion from \" + this.state.baseCurrency.name + \" to \" + this.state.targetCurrency.name);\n this.invalidOutp...
[ "0.68969053", "0.66220856", "0.64626473", "0.6120484", "0.6033369", "0.59233576", "0.58354944", "0.5768413", "0.5758993", "0.57397044", "0.5703347", "0.56970227", "0.56761676", "0.56708217", "0.5619387", "0.5611052", "0.55966955", "0.55900717", "0.5577107", "0.55591494", "0.5...
0.7973825
0
fim da fase ou do jogo
function end() { currentLevel++; resetLevel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FimJogo(){\n\t\tswitch(_vitoria){\n\t\t\tcase 1:AnunciarVitoria(1);p1.Vencer();break;\n\t\t\tcase 2:AnunciarVitoria(2);p2.Vencer();break;\n\t\t\tcase 4:AnunciarVitoria(3);p3.Vencer();break;\n\t\t\tcase 8:AnunciarVitoria(4);p4.Vencer();break;\n\t\t\tcase 0:AnunciarVitoria(0);AnimacaoEmpate();break;\n\t\t\t...
[ "0.72560877", "0.6245774", "0.6052659", "0.60166633", "0.6015394", "0.601499", "0.6010298", "0.5994349", "0.5991144", "0.59789306", "0.59313095", "0.5922741", "0.58754325", "0.58391565", "0.583208", "0.58243096", "0.5817615", "0.58089954", "0.5807574", "0.58044463", "0.578899...
0.0
-1
define a linha de caminho
function makePath() { var obj = new Graphics(); obj.lineStyle(2, 0xffffff, 1); obj.moveTo(0, 0); obj.lineTo(pathProp.pathLenght, 0); obj.pivot.set(pathProp.pathLenght / 2, 0); obj.x = app.renderer.view.width / 2; obj.y = pathProp.pathY; return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(linha, coluna) {\n\t\tthis.linha = linha;\n\t\tthis.coluna = coluna;\n\t}", "function dibujarLinea(color,x_inicial,y_inicial,x_final,y_final) \n{\n lienzo.beginPath(); // Comienza el dibujo\n lienzo.strokeStyle = color; // Escoger el color de la línea\n lienzo.lineWidth = 3;\n lienzo.move...
[ "0.6756363", "0.6375945", "0.63174564", "0.6279122", "0.62335193", "0.62103325", "0.61787087", "0.61718106", "0.6166916", "0.61245835", "0.609672", "0.60933787", "0.6079934", "0.60714245", "0.60543925", "0.60514224", "0.6044597", "0.6027566", "0.6004941", "0.59919554", "0.598...
0.0
-1
carrega imagens para sprites
function loadSprites() { Loader.add("assets/imgs/resize1.png") .add("assets/imgs/resize2.png") .add("assets/imgs/colorize.png") .add("assets/imgs/rotate.png") .add("assets/imgs/select.png") .add("assets/imgs/win.png") .add("assets/imgs/logo.png") .add("assets/imgs/logo2.png") .add("ass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_media()\n{\n bg_sprite = new Image();\n bg_sprite.src = \"images/Background-stadt_lang.png\";\n box_sprite = new Image();\n box_sprite.src = \"images/Stift.png\";\n main_sprite = new Image();\n main_sprite.src = \"images/IMG_2210_Mini.png\";\n}", "function loadSprites(src, col, li...
[ "0.7027458", "0.69117796", "0.6746696", "0.67363185", "0.6679601", "0.6647176", "0.6626122", "0.6617081", "0.6604311", "0.66041195", "0.6576859", "0.6541838", "0.65409887", "0.65406305", "0.6536314", "0.6535161", "0.6534833", "0.65319234", "0.6528226", "0.6519146", "0.6519146...
0.70714915
0
define modificadores e suas acoes
function setModifier(count, index) { var obj, modifierName, modifFunc; var objLayerModifs = levels[currentLevel].modifiers[index]; modifierName = objLayerModifs.type; if (modifierName == 'resize') { modifierName = objLayerModifs.type + objLayerModifs[Object.keys(objLayerModifs)[1]].toString(); } obj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _AtualizaModificadoresAtributos() {\n // busca a raca e seus modificadores.\n var modificadores_raca = tabelas_raca[gPersonagem.raca].atributos;\n\n // Busca cada elemento das estatisticas e atualiza modificadores.\n var atributos = [\n 'forca', 'destreza', 'constituicao', 'inteligencia', 'sabedo...
[ "0.704987", "0.5998706", "0.5998121", "0.5960021", "0.592312", "0.5921964", "0.5918479", "0.58636755", "0.58547455", "0.58445764", "0.58269095", "0.57685685", "0.57685685", "0.5760118", "0.57242745", "0.5700396", "0.5696993", "0.56848466", "0.56080997", "0.55472326", "0.55103...
0.0
-1
define modificadores quando select
function setModifierSelect(obj, index) { var modifierName, modifFunc; if (index == 2) { modifierName = "resize2"; } else { if (index == 3) { index = 2 }; var objLayerModifs = levels[currentLevel].modifiers[0].options[index]; modifierName = objLayerModifs.type; if (modifierName == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static updatePedidoSelector(data) {\n let select = document.getElementById(\"editPedidoSelect\");\n select.innerHTML = \"\";\n\n for (let i=0; i<data.length; i++) {\n var option = document.createElement(\"option\");\n option.text = data[i].id;\n option.setAttri...
[ "0.6615989", "0.65549976", "0.6467718", "0.63361585", "0.6289542", "0.6273071", "0.62236184", "0.6218206", "0.6213371", "0.61819494", "0.6133448", "0.6122947", "0.60858995", "0.60212034", "0.59877527", "0.5957456", "0.5947831", "0.59323454", "0.5899461", "0.5893932", "0.58913...
0.0
-1
posiciona e insere objetos na cena
function setLevel() { //titulo fase var title = makeText(levels[currentLevel].name, 100, 42, 8, '#ffffff'); var instructions; //instruções if (currentLevel < 4) { instructions = makeText('Click on the glowing block.', 160, 12, 0, '#cccccc'); } else { instructions = makeText('Choose the modifiers ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createObject() {\n var className= $.trim($className.val());\n var dbName = $.trim($dbName.val());\n if (className == null || className.length == 0 || dbName == null || dbName.length == 0) {\n alert(\"ERROR:\\nPlease list a Class Name and a Database Name\");\n return;\n }\...
[ "0.64564085", "0.6231468", "0.6154808", "0.608627", "0.60333014", "0.60310274", "0.6017594", "0.5909227", "0.5908473", "0.58905196", "0.58895254", "0.58637756", "0.5857292", "0.5798194", "0.5791184", "0.5790135", "0.5777695", "0.5770919", "0.57665014", "0.57452464", "0.572662...
0.0
-1
define proxima acao para playerBlock
function setAction(obj) { if (actionCounter < activeModifiers.length) { moveToTarget(obj, activeModifiers[actionCounter]); actionCounter++; } else { moveToTarget(obj, finalBlock); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "placeBlock () {\r\n this.mouseFocus.updateFocus(this.player.getCamera(), this.currentMeshes)\r\n const newBlockPosition = this.mouseFocus.getNewBlockPosition()\r\n if (newBlockPosition) this.world.placeBlock(newBlockPosition)\r\n }", "baseAmount() {return player.b.points}", "moveBlock(block) {\n b...
[ "0.5976193", "0.5772059", "0.57373434", "0.5723324", "0.57182014", "0.57182014", "0.57182014", "0.5702633", "0.56834054", "0.5664615", "0.56060624", "0.55687445", "0.5568133", "0.5565248", "0.55588347", "0.55528903", "0.5533111", "0.55274737", "0.55190367", "0.55132353", "0.5...
0.0
-1
erro no fim de fase
function missIt() { scnCurrent.addChild(makeText('Sorry, try again.', 230, 20, 6, '#ffffff')); setTimeout(function () { resetLevel(); }, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deuErro() {\n toastr.error(\"Algo deu errado. Tente novamente.\");\n }", "function msgFalhaBaixarArquivo() {\n $scope.showErrorMessage(\"Falha ao fazer o download do arquivo.\");\n }", "function fallo() {\n return error(\"Reportar fallo\");\n}", "function muestraError(...
[ "0.6610646", "0.6477291", "0.6456701", "0.63715607", "0.6218629", "0.61420417", "0.61097324", "0.6090615", "0.6009743", "0.60054827", "0.5989904", "0.5982631", "0.5981689", "0.5963369", "0.5941398", "0.59408283", "0.59156936", "0.5877774", "0.5867463", "0.58555335", "0.582787...
0.0
-1
sets up the User status variable, to be modifed
function initPage() { initGlobalVars(); initDOM(); initEvents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUserStatus(status) {\n\t// Set our status in the list of online users.\n\tcurrentStatus = status;\n\tif (presname != undefined && status != undefined){\n\t\tmyUserRef.set({ name: presname, status: status });\n\t}\n}", "function setUserStatus(status) {\n // Set our status in the list of online user...
[ "0.77516264", "0.755074", "0.755074", "0.7432176", "0.7359027", "0.70023096", "0.687852", "0.6848534", "0.6811365", "0.6798794", "0.6717461", "0.6713198", "0.6696282", "0.66479814", "0.6638442", "0.6635674", "0.65940326", "0.6557834", "0.65013224", "0.6398614", "0.63791573", ...
0.0
-1
Users A class to contain all of the User functions
function Users(me) { this.me = me; this.usrs = []; if( arguments[1] !== undefined ) this.update( arguments[1] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Users(){}", "function Users(){\n\tthis.getUsers = function (dataReturn) {\n\t\t$.ajax({\n\t\t\turl: '../app/data/jira_users.json',\n\t\t\tasync: false,\n\t\t\tdataType: 'json',\n\t\t\tsuccess: function(data) {\n\t\t\t\tdataReturn(data);\n\t\t\t}\n\t\t});\n\t};\n\n\tthis.SingleUser = function (name) {\n\...
[ "0.82999784", "0.76735806", "0.75863653", "0.75705236", "0.74598026", "0.7101091", "0.70785403", "0.69095415", "0.6866957", "0.68276083", "0.6788385", "0.67682266", "0.6748654", "0.67473686", "0.6713285", "0.6693575", "0.66838336", "0.66701144", "0.6660392", "0.6647916", "0.6...
0.686517
9
Messages for managing all of the messages back and fourth
function Messages() { this.msgs = []; if( arguments[0] !== undefined ) this.update( arguments[0] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function manageMessages(messages){\n\n //if the index size is the array length=>i=0\n i=(messages.length==i)? 0 : i ;\n\n if (displayMsg(messages[i]) && checkScreenId(messages[i])) {\n loadMsgWithTemplate(messages[i]);\n timeoutForMsg(messages[i]);\n\n }\n\n else\n {\n i++;\n...
[ "0.66767377", "0.6567661", "0.637201", "0.636367", "0.63248026", "0.62660426", "0.6193576", "0.61810446", "0.61440426", "0.6110198", "0.6057745", "0.6033688", "0.6025593", "0.60229605", "0.5995312", "0.59772885", "0.5956373", "0.5948146", "0.5934874", "0.5929487", "0.592162",...
0.625683
6
PART 1: SHOW A FORTUNE
function replaceFortuneText(fortune) { $('#fortune-text').html(fortune); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showFiltersTop2(odsLenght) {\n\tfor (var i=6; i<parseInt(odsLenght);i++) {\n\t\tvar li = \"liOds\"+(i);\n\t\tdocument.getElementById(li).style.display = 'block';\n\t\tdocument.getElementById('f_vermas2').style.display = 'none';\n\t}\n}", "function festivalKantonFilter (){\n\tconsole.log('Festivals nach ...
[ "0.53187877", "0.50238127", "0.5004045", "0.4990911", "0.49881625", "0.49788353", "0.49711356", "0.49222085", "0.49209243", "0.49201047", "0.491127", "0.49109748", "0.49098074", "0.4892162", "0.48725975", "0.4861589", "0.48596632", "0.4853307", "0.48345205", "0.47638106", "0....
0.0
-1
PART 2: SHOW WEATHER
function replaceWeatherText(weather) { var weather = weather['forecast']; $('#weather-info').html(weather); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getStatistics () {\n return instance.get(base.dev + '/statistics')\n }", "function getTrendingShows() {\n\trequestTVInfo('shows/trending', function (error, response, body) {\n\t\tif (error) {\n\t\t\tconsole.log(error);\n\t\t} else {\n\t\t\tconsole.log(body);\n\t\t}\n\t});\n}", "function get_words_stats()\n...
[ "0.5508682", "0.5434847", "0.5310192", "0.5304697", "0.5241614", "0.52358854", "0.52358204", "0.5216267", "0.521505", "0.519483", "0.518183", "0.51650345", "0.51389056", "0.5123484", "0.51218957", "0.51045763", "0.5100942", "0.5090627", "0.50874025", "0.50765973", "0.5073933"...
0.0
-1
PART 3: ORDER MELONS
function replaceOrderText(order) { var message = order.msg; var code = order.code; $('#order-status').html(message); if (code === 'ERROR') { $('#order-status').addClass('order-error'); } else { $('#order-status').removeClass('order-error'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set order(value) {}", "set order(value) {}", "order (prm) {\n try {\n\t return this.confmng(\"order\", prm);\n\t} catch (e) {\n console.error(e.stack);\n throw e;\n }\n }", "get order() {}", "get order() {}", "function NextOrder() {\r\n\treturn 1;\r\n}", "funct...
[ "0.65615153", "0.65615153", "0.64031714", "0.638573", "0.638573", "0.6113449", "0.6093271", "0.604664", "0.5976432", "0.59377104", "0.59377104", "0.59377104", "0.59377104", "0.59377104", "0.59377104", "0.59377104", "0.59377104", "0.59377104", "0.59377104", "0.59377104", "0.59...
0.0
-1
simulation base de donnees avec localStorage et json
function ajoutInfo() { var nom=$( "#nom option:selected" ).val(); //var fimage=$( "#image option:selected" ).val(); var cap=$("#cap option:selected").val(); var acc=$('input[name="acc"]:first').val(); var env=$('input[name="env"]:first').val(); var date=$('input[name="date"]:first').val(); lireBdJson(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getJsonData() {\n //Store JSON Object into Local Storage.\n for (var n in json) {\n var id = Math.floor(Math.random()*10000001);\n localStorage.setItem(id, JSON.stringify(json[n]));\n }\n }", "function getLocalStorge() {\n\n // khi lấy localStorage lên để...
[ "0.7207925", "0.71680045", "0.6874499", "0.6860906", "0.6848477", "0.6830731", "0.676789", "0.6731498", "0.6714319", "0.66845566", "0.66327554", "0.66317266", "0.66292167", "0.6597347", "0.6591715", "0.65909016", "0.65810466", "0.65793264", "0.6562722", "0.6550085", "0.654817...
0.0
-1
Remaps the source `.map` file for the given `sourceFile`. This keeps source maps intact over a series of transpilations!
function remapSourceMap(sourceFile) { return __awaiter(this, void 0, void 0, function* () { log_1.debug(`re-mapping sources for ${sourceFile}`); const opts = { inline: false, includeContent: true, }; // Once sorcery loads the chain of sourcemaps, the new sourc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applySourceMap(sourceMap) {\n /*jshint validthis:true */\n try {\n if (typeof sourceMap === 'string' || sourceMap instanceof String) {\n sourceMap = JSON.parse(sourceMap);\n }\n var generator = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(sourceMap));\n generator.applySourceMa...
[ "0.6327593", "0.62686896", "0.6081818", "0.6040088", "0.5927114", "0.57838446", "0.5767014", "0.5766346", "0.568154", "0.5546148", "0.5538732", "0.5538732", "0.5515136", "0.540978", "0.5397459", "0.52674454", "0.5256631", "0.525338", "0.52303994", "0.5214421", "0.52133304", ...
0.8245835
0
Relocates pathes of the `sources` file array in `.js.map` files. Simply said, because `sourcesContent` are inlined in the source maps, it's possible to pass an arbitrary file name and path in the `sources` property. By setting the value to a common prefix,
function relocateSourceMapSources({ artefacts, entryPoint }) { return __awaiter(this, void 0, void 0, function* () { yield json_1.modifyJsonFiles(`${artefacts.stageDir}/+(bundles|esm2015|esm5)/**/*.js.map`, (sourceMap) => { sourceMap.sources = sourceMap.sources .map((path) => { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setSourceContent(aSourceFile, aSourceContent) {\n let source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesConte...
[ "0.6674757", "0.6560075", "0.6501174", "0.6379424", "0.62797403", "0.6207948", "0.6202458", "0.5929406", "0.5842189", "0.5768242", "0.5759253", "0.5736241", "0.5676568", "0.5665704", "0.5663854", "0.5630267", "0.5578024", "0.55744135", "0.5562687", "0.55013067", "0.5491451", ...
0.68686146
0
function make responsieve to window size
function resizeCanvas() { // clear original chart in case window size update var svg = d3.select("#scatter").select("svg") if (!svg.empty()){svg.remove();}; svgHeight = window.innerHeight * 0.65; svgWidth = window.innerWidth * 0.8; margin = { left: 100, top: 100, right...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function windowsize(){\n$(window).height(); // New height // New width \n$(\"#frame\").css(\"max-width\",$(window).width());\n$(\"#frame\").css(\"height\",$(window).height()-60);\n}", "function windowSize() {\n mediaQuery();\n}", "function adjustWindow() {\n // get window size\n winW = $(window).width()...
[ "0.7492434", "0.7475859", "0.7420053", "0.7299762", "0.72667366", "0.7260732", "0.72408444", "0.72099745", "0.71932274", "0.71712446", "0.7166111", "0.7114978", "0.710452", "0.70848167", "0.70781964", "0.7058912", "0.70425755", "0.7017493", "0.7007628", "0.7006276", "0.699306...
0.0
-1
MAIN FUNCTION to make plot
function makeScatter(data, chartGroup){ // defalt chosenX,Y value var chosenX = "poverty"; var chosenY = "healthcare" var xScale = make_xScale(data, chosenX, chartWidth); var yScale = make_yScale(data, chosenY, chartHeight); var BottomAxis = d3.axisBottom(xScale) var LeftAxis = d3.axisLef...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function plot() {\n \n }", "function plot() {\n\n}", "function initPlot() {\n var Us = calculateUs();\n if (deltaHapproach==\"briggs\"){\n var hprime = calculateSTdownwash();\n }\n else{\n var hprime = h;\n }\n //var deltaH = calculateDeltaH(Us);\n //var H = h + deltaH;\n...
[ "0.7723056", "0.75435096", "0.6862599", "0.67845917", "0.6578987", "0.65763", "0.65581876", "0.65131295", "0.64887834", "0.6453281", "0.6447796", "0.64342815", "0.639532", "0.63708407", "0.6368841", "0.6360163", "0.6344205", "0.6300614", "0.62913066", "0.6286553", "0.6281404"...
0.0
-1
function to update xScale
function make_xScale(data, chosenX, chartWidth){ var xScale = d3.scaleLinear() .domain([d3.min(data, d => d[chosenX]) * 0.9, d3.max(data, d => d[chosenX]) * 1.05]) .range([0, +chartWidth]); return xScale; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateXScale(xData,curXAxis){\n var xLineraScale = d3.scaleLinear()\n .domain([d3.min(xData, d=> d[curXAxis]),d3.max(xData, d=> d[curXAxis])])\n .range([0,chartWidth]);\n return xLineraScale; \n\n}", "function updateXscale(data, chosen_x_axis) {\n var x_scale = d3.scaleLinear...
[ "0.7997964", "0.77594423", "0.76257735", "0.7555104", "0.74504614", "0.73994774", "0.73316544", "0.73260087", "0.73124844", "0.7307168", "0.72852063", "0.72852063", "0.7250201", "0.7250201", "0.7221877", "0.7207311", "0.7073969", "0.70364356", "0.7019429", "0.6982343", "0.697...
0.0
-1
function to update yScale
function make_yScale(data, chosenY, chartHeight){ var yScale = d3.scaleLinear() .domain([d3.min(data, d => d[chosenY]) * 0.75, d3.max(data, d => d[chosenY]) * 1.05]) .range([chartHeight, 0]); return yScale; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateYScale(yData,curYaxis){\n var yLinearScale = d3.scaleLinear()\n .domain([d3.min(yData, d=> d[curYaxis]),d3.max(yData, d=> d[curYaxis])])\n .range([chartHeight,0]);\n\n // var yLinearScale = d3.scaleLinear()\n // .domain([d3.min(yData, d=> d[curYaxis]),d3.max(yData, d=> d[c...
[ "0.8070325", "0.78316516", "0.77692944", "0.7733586", "0.7517054", "0.74816465", "0.7463892", "0.7449283", "0.74182", "0.7336386", "0.73130727", "0.73106486", "0.72685754", "0.72308606", "0.7229374", "0.721915", "0.7195053", "0.713515", "0.71286905", "0.7122265", "0.7108821",...
0.6973258
31