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 |
|---|---|---|---|---|---|---|
Get Current Value of attributes | function getProgress() {
return document.getElementById("progressbar").getAttribute("aria-valuenow");
return document.getElementById("progressbar").getAttribute("style","width:");
return document.getElementById("progressbar").innerHTML;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getAttr() {\r\n return this.attributes\r\n }",
"static get observedAttributes() {\n return ['value'];\n }",
"readAttributes() {\n this._previousValueState.state = this.getAttribute('value-state')\n ? this.getAttribute('value-state')\n : 'None';\n\n // save the original attribute f... | [
"0.7315704",
"0.72826964",
"0.677964",
"0.67343146",
"0.6732252",
"0.67137057",
"0.67110616",
"0.67110616",
"0.6691765",
"0.6613929",
"0.6575565",
"0.64938223",
"0.6481105",
"0.64710313",
"0.64650023",
"0.6455856",
"0.6431732",
"0.6393101",
"0.6373208",
"0.6360265",
"0.635985... | 0.0 | -1 |
Set value of attributes | function setProgress(value) {
document.getElementById("progressbar").setAttribute("aria-valuenow",value);
document.getElementById("progressbar").setAttribute("style","width: " +value+ "%");
document.getElementById("progressbar").innerHTML = (value+ "%");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set attributes(value) {\n return this.$attributes = value;\n }",
"setAttributes(myAttributes){\n \tif (myAttributes instanceof Attribute){\n \t\tvar keys = myAttributes.getKeys();\n \t\tfor(let i in keys){\n \t\t\tthis.setAttribute(keys[i], myAttributes.getAttribute(keys[i]);\n \t\t}\n \t}else if... | [
"0.7393896",
"0.7372068",
"0.7353428",
"0.7353428",
"0.73294294",
"0.73038214",
"0.72554475",
"0.7224709",
"0.7089676",
"0.7021429",
"0.69919723",
"0.6935125",
"0.68791914",
"0.6870406",
"0.6850064",
"0.68128455",
"0.67740774",
"0.67688197",
"0.6763753",
"0.6738889",
"0.67388... | 0.0 | -1 |
Auto complete value to max in this case max is 100 with Interval of 100. | function autoProgress() {
var elem = document.getElementById("progressbar");
var width = 0;
var id = setInterval(frame, 100);
function frame(){
if(width == 100){
clearInterval(id);
}else{
width++;
elem.style.width = width + '%';
elem.innerHTML = width * 1 + '%';
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"set max(max) {\n this._max = !isNumber(max) || max <= 0 ? 100 : max;\n }",
"set _max(value) {\n Helper.UpdateInputAttribute(this, \"max\", value);\n }",
"set max(value) {\n Helper.UpdateInputAttribute(this, 'max', value);\n }",
"function getMaximum () {\n if ((document.getElementById('entM... | [
"0.7480409",
"0.7174174",
"0.71028346",
"0.7095999",
"0.6936987",
"0.6797335",
"0.6754082",
"0.66732305",
"0.66732305",
"0.66732305",
"0.66732305",
"0.66732305",
"0.66732305",
"0.6604408",
"0.65543056",
"0.65214616",
"0.6519194",
"0.6509064",
"0.64966697",
"0.6478105",
"0.647... | 0.0 | -1 |
The function whose prototype chain sequence wrappers inherit from. | function baseLodash(){// No operation performed.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"get prototype() {}",
"function FunctionWithPrototypeTest() {}",
"function n(e,t){e.prototype.__proto__=t&&t.prototype,e.__proto__=t}",
"function inheritFrom(subfn,superfn) {\n\tvar r = function () {}\n\tr.prototype = superfn.prototype;\n\tsubfn.prototype = new r();\n}",
"function m(a){var b=function(){};re... | [
"0.63448894",
"0.62097377",
"0.5887767",
"0.58376676",
"0.5755025",
"0.5730794",
"0.5730794",
"0.5718774",
"0.5718774",
"0.5718774",
"0.5718774",
"0.5718774",
"0.5716435",
"0.5716435",
"0.5680218",
"0.5680218",
"0.5680218",
"0.5680218",
"0.5680218",
"0.5680218",
"0.5680218",
... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear(){this.__data__=[];this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",... | 0.7236393 | 19 |
Removes all keyvalue entries from the map. | function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7590112",
"0.70694387",
"0.6735414",
"0.6652174",
"0.6530006",
"0.6267597",
"0.62582785",
"0.62582785",
"0.62582785",
"0.617115",
"0.617115",
"0.617115",
"0.6166302",
"0.61519635",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614778",
"0.614... | 0.5723219 | 61 |
Removes all keyvalue entries from the stack. | function stackClear(){this.__data__=new ListCache();this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear () {\n this._dict = {}\n this._stack = [this._dict]\n }",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear() {\n\t this.__... | [
"0.63588345",
"0.6331268",
"0.6331268",
"0.6331268",
"0.627537",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6229357",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"0.6218875",
"... | 0.0 | -1 |
This method returns `undefined`. | function noop(){// No operation performed.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function returnUndefined() {}",
"value() { return undefined; }",
"function _undefined() {\n return exports.PREFIX.undefined;\n}",
"function f () {\n return undefined;\n }",
"_get(key) { return undefined; }",
"get None() {}",
"get None() {}",
"get None() {}",
"get None() {}",
"_get_value() ... | [
"0.7349204",
"0.67813563",
"0.6498075",
"0.6468386",
"0.6265139",
"0.6195519",
"0.6195519",
"0.6195519",
"0.6195519",
"0.5957684",
"0.5942946",
"0.5942946",
"0.59360754",
"0.5919196",
"0.5828133",
"0.5788914",
"0.57824624",
"0.5770755",
"0.5736466",
"0.5725097",
"0.57073194",... | 0.0 | -1 |
by calls to these methods by a Babel plugin. In PROD (or in packages without access to React internals), they are left as they are instead. | function warn(format){{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}printWarning('warn',format,args);}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function resetIfUsingPreact() {\n if (window.preact !== undefined) {\n jsxLoader.compiler.pragma = 'React.createElement';\n jsxLoader.compiler.pragmaFrag = 'React.Fragment';\n }\n }",
"react() {\n return;\n }",
"function globalizeReact() {\n ... | [
"0.6231517",
"0.5987249",
"0.5949213",
"0.57122",
"0.57122",
"0.5705207",
"0.56892043",
"0.56892043",
"0.55873036",
"0.5555952",
"0.5543145",
"0.5543145",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0... | 0.0 | -1 |
Base class helpers for the updating state of a component. | function Component(props,context,updater){this.props=props;this.context=context;// If a component has string refs, we will assign a different object later.
this.refs=emptyObject;// We initialize the default updater but the real one gets injected by the
// renderer.
this.updater=updater||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 |
Convenience component with default shallow equality check for sCU. | function PureComponent(props,context,updater){this.props=props;this.context=context;// If a component has string refs, we will assign a different object later.
this.refs=emptyObject;this.updater=updater||ReactNoopUpdateQueue;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function useStrictEquality(b, a) {\n return a === b;\n }",
"get shallowCopy() {\n return this.shallowCopy$();\n }",
"function defaultEqualityCheck(a, b) {\n return !a && !b || a === b;\n }",
"equals() {\n return false;\n }",
"equals() {\n return false;\n }",
... | [
"0.60841435",
"0.5796601",
"0.5670416",
"0.56586224",
"0.56586224",
"0.56335825",
"0.5590515",
"0.5590515",
"0.55875814",
"0.5548068",
"0.54892737",
"0.5487291",
"0.5483514",
"0.5483514",
"0.54746234",
"0.54746234",
"0.54746234",
"0.5454448",
"0.5454448",
"0.54398715",
"0.539... | 0.0 | -1 |
an immutable object with a single mutable value | function createRef(){var refObject={current:null};{Object.seal(refObject);}return refObject;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function immutableObjectTest(){\n\nlet test= {'name': 'vishal', 'age':27};\n//Object.freeze(test);\nlet test2= test;\n\ntest.age = 26;\nconsole.log(test);\nconsole.log(test2);\nconsole.log(test === test2);\n\n\n\n\n}",
"static set one(value) {}",
"function makeImmutableObject(obj) {\n\t if (!globalConfig.us... | [
"0.6674448",
"0.66609514",
"0.6358345",
"0.6347869",
"0.6347869",
"0.6263268",
"0.6230736",
"0.6136926",
"0.61048114",
"0.5915378",
"0.5889688",
"0.580687",
"0.5776291",
"0.5763881",
"0.57248324",
"0.56947106",
"0.566211",
"0.5636481",
"0.56181127",
"0.5606209",
"0.5606209",
... | 0.0 | -1 |
Create and return a new ReactElement of the given type. See | function createElement(type,config,children){var propName;// 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;{warnIfStringRefCannotBeAutoConverted(config);}}if(hasValidKey(config)){key=''+config.key;}self=config.__... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createElement(type,config,children){var propName=void 0;// 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;}if(hasValidKey(config)){key=''+config.key;}self=config.__self===undefined?null:config.__sel... | [
"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",
... | 0.68920434 | 0 |
Clone and return a new ReactElement using element as the starting point. See | 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
var props=_assign({},element.props);// Reserved names are extracted
var key=el... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cloneElement(element,config,children){!!(element===null||element===undefined)?invariant(false,'React.cloneElement(...): The argument must be a React element, but you passed %s.',element):void 0;var propName=void 0;// Original props are copied\nvar props=_assign({},element.props);// Reserved names are extr... | [
"0.68906343",
"0.66943085",
"0.66943085",
"0.6692962",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6646507",
"0.6633278",
"0.661405",
"0.661405",
"0.661405",
"... | 0.69132274 | 0 |
Flatten a children object (typically specified as `props.children`) and return an array with appropriately rekeyed children. See | function toArray(children){return mapChildren(children,function(child){return child;})||[];} | {
"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.7753311",
"0.7517859",
"0.7405196",
"0.7405196",
"0.7405196",
"0.7405196",
"0.7405196",
"0.7405196",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"0.73985",
"... | 0.7432709 | 2 |
Experimental Create Event Handle API. | function isValidElementType(type){if(typeof type==='string'||typeof type==='function'){return true;}// Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
if(type===exports.Fragment||type===exports.Profiler||type===REACT_DEBUG_TRACING_MODE_TYPE||type===exports.StrictMode||type===exports.Sus... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createEventHandler() {\n return {\n handleEvent: function handleEvent(event) {\n switch (event.type) {\n\n case 'encrypted':\n if (event.initData) {\n var initData = ArrayBuffer.isView(event.initData) ? e... | [
"0.6675035",
"0.6479107",
"0.64392054",
"0.6429872",
"0.6142637",
"0.6102399",
"0.59711486",
"0.59674567",
"0.5964464",
"0.5946079",
"0.59298646",
"0.59168935",
"0.5894774",
"0.5892875",
"0.5872369",
"0.5844633",
"0.58258116",
"0.5786885",
"0.57783765",
"0.573211",
"0.5716495... | 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 use '+'ReactIs.isConcurrentMod... | {
"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.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.67276573",
"0.672... | 0.707457 | 4 |
Fuse.js v6.4.6 Lightweight fuzzysearch ( Copyright (c) 2021 Kiro Risk ( All Rights Reserved. Apache Software License 2.0 | function isArray(value){return !Array.isArray?getTag(value)==='[object Array]':Array.isArray(value);}// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Search(case_sentences_for_indexing) {\n\n //Configuring options for Fuse library\n var fuse_options = {\n shouldSort: true,\n includeScore: false,\n threshold: 0.6,\n location: 0,\n distance: 100,\n maxPatternLength: 200,\n minMatchCharLength: 1,\n keys: [\n \"title\"\n ]... | [
"0.7111104",
"0.7028673",
"0.6932236",
"0.6343106",
"0.6279555",
"0.62743896",
"0.62261534",
"0.61784285",
"0.6148284",
"0.6139647",
"0.60413206",
"0.6003875",
"0.59473157",
"0.588265",
"0.58691305",
"0.58348745",
"0.58090854",
"0.5808489",
"0.57574004",
"0.5756608",
"0.57468... | 0.0 | -1 |
Fieldlength norm: the shorter the field, the higher the weight. Set to 3 decimals to reduce index size. | function norm(mantissa=3){const cache=new Map();const m=Math.pow(10,mantissa);return {get(value){const numTokens=value.match(SPACE).length;if(cache.has(numTokens)){return cache.get(numTokens);}const norm=1/Math.sqrt(numTokens);// In place of `toFixed(mantissa)`, for faster computation
const n=parseFloat(Math.round(norm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"normalize()\r\n {\r\n var len = this.mag();\r\n if (len !== 0) \r\n this.mult(1 / len);\r\n\r\n return this;\r\n }",
"static setNormalizeV3(xyz) {\nvar len;\n//--------------\nlen = this.lengthV3(xyz);\nif (1e-5 <= len) {\nreturn this.setInverseScaleV3(xyz, len);\n} else {\n... | [
"0.5737642",
"0.5704147",
"0.56574667",
"0.5433025",
"0.5389228",
"0.5388174",
"0.5370179",
"0.5344227",
"0.5285347",
"0.5268295",
"0.5242519",
"0.52415156",
"0.5190834",
"0.50982887",
"0.505091",
"0.5042904",
"0.50176996",
"0.5002481",
"0.49810243",
"0.49715373",
"0.49558353... | 0.5525789 | 3 |
Adds a doc to the end of the index | add(doc){const idx=this.size();if(isString(doc)){this._addString(doc,idx);}else {this._addObject(doc,idx);}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"add(doc) {\n const idx = this.size()\n\n if (isString(doc)) {\n this._addString(doc, idx)\n } else {\n this._addObject(doc, idx)\n }\n }",
"addDocument (doc) {\n if (this._isOptimized) {\n throw new Error('Cannot add a document to an already-optimized index.');\n }\n\n if (ty... | [
"0.69740826",
"0.6592267",
"0.65395325",
"0.637757",
"0.6045703",
"0.59954685",
"0.58496463",
"0.58385247",
"0.5745251",
"0.56949633",
"0.5565368",
"0.5544018",
"0.5492362",
"0.5484123",
"0.54721063",
"0.5462008",
"0.5460607",
"0.54494643",
"0.5439872",
"0.5392522",
"0.534081... | 0.7230582 | 0 |
Removes the doc at the specified index of the index | removeAt(idx){this.records.splice(idx,1);// Change ref index of every subsquent doc
for(let i=idx,len=this.size();i<len;i+=1){this.records[i].i-=1;}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"removeAt(idx) {\n this.records.splice(idx, 1)\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1\n }\n }",
"deleteAt(index) {}",
"remove(idx) { \n\n }",
"removeAt(idx) {\n\n }",
"remove(index){\n this.... | [
"0.7543374",
"0.7021943",
"0.67737806",
"0.66889304",
"0.6623647",
"0.65367955",
"0.6502412",
"0.64897454",
"0.6451316",
"0.64288545",
"0.6364492",
"0.6363058",
"0.63563263",
"0.63563263",
"0.63545173",
"0.63478565",
"0.63455224",
"0.63081074",
"0.62757295",
"0.62371767",
"0.... | 0.6567226 | 5 |
Return a 2D array representation of the query, for simpler parsing. Example: "^core go$ | rb$ | py$ xy$" => [["^core", "go$"], ["rb$"], ["py$", "xy$"]] | function parseQuery(pattern,options={}){return pattern.split(OR_TOKEN).map(item=>{let query=item.trim().split(SPACE_RE).filter(item=>item&&!!item.trim());let results=[];for(let i=0,len=query.length;i<len;i+=1){const queryItem=query[i];// 1. Handle multiple query match (i.e, once that are quoted, like `"hello world"`)
l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildArray(formula) {\n // replace true and false with 0 and 1 for parsing\n formula = formula.replace(/false/g, \"0\").replace(/true/g, \"1\");\n // remove spaces and convert to array\n return formula.replace(/\\s/g, '').split('');\n}",
"function split(query) {\n words = query.match(/\"([^\"... | [
"0.6246973",
"0.5986145",
"0.5838154",
"0.5799794",
"0.5768537",
"0.5716359",
"0.5710942",
"0.5570982",
"0.5500174",
"0.54699564",
"0.54127645",
"0.5399325",
"0.5390253",
"0.53763956",
"0.53761923",
"0.5363575",
"0.53631985",
"0.5362661",
"0.5349367",
"0.53287226",
"0.5326596... | 0.51239157 | 33 |
When `auto` is `true`, the parse function will infer and initialize and add the appropriate `Searcher` instance | function parse(query,options,{auto=true}={}){const next=query=>{let keys=Object.keys(query);const isQueryPath=isPath(query);if(!isQueryPath&&keys.length>1&&!isExpression(query)){return next(convertToExplicit(query));}if(isLeaf(query)){const key=isQueryPath?query[KeyType.PATH]:keys[0];const pattern=isQueryPath?query[Key... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"auto( params ) { \n\n // Extract any feature data.\n this.$set(this, 'sort', params.sort || this.sort || defaults.sort);\n this.$set(this, 'filter', $.extend(true, {}, this.filter, params.filter || defaults.filter));\n this.$set(this, 'paging', $.extend(true, {}, this.paging, params.pag... | [
"0.52827394",
"0.52186435",
"0.47342736",
"0.47016174",
"0.46753716",
"0.4663182",
"0.46393877",
"0.4621972",
"0.45772058",
"0.4572989",
"0.4549086",
"0.4536212",
"0.4518305",
"0.44799227",
"0.4456457",
"0.44356704",
"0.44144872",
"0.44088268",
"0.4389497",
"0.43890962",
"0.4... | 0.61310345 | 0 |
and applies them to the HTMLElements such as popper and arrow | function applyStyles(_ref){var state=_ref.state;Object.keys(state.elements).forEach(function(name){var style=state.styles[name]||{};var attributes=state.attributes[name]||{};var element=state.elements[name];// arrow is optional + virtual elements
if(!isHTMLElement(element)||!getNodeName(element)){return;}// Flow doesn'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }",
"function g(e){if(Q.popperInstance?(y()||Q.popperInstance.sc... | [
"0.7524573",
"0.6590567",
"0.636286",
"0.6360291",
"0.619212",
"0.6143126",
"0.6093509",
"0.6093509",
"0.60842144",
"0.6079199",
"0.6050638",
"0.6050638",
"0.6050638",
"0.6050638",
"0.6050638",
"0.6050638",
"0.60370487",
"0.5937358",
"0.58192044",
"0.58074296",
"0.5796685",
... | 0.0 | -1 |
means it doesn't take into account transforms. | function getLayoutRect(element){var clientRect=getBoundingClientRect(element);// Use the clientRect sizes if it's not been transformed.
// Fixes https://github.com/popperjs/popper-core/issues/1223
var width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.widt... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"getTransform(){return this.__transform}",
"function Transform() {}",
"function Transform() {}",
"function Transform() {}",
"function Transform() {}",
"function Transform() {}",
"static transform() {}",
"updateLocalTransform()\n {\n // empty\n }",
"get transform() {}",
"get transform(... | [
"0.6677838",
"0.6588195",
"0.6588195",
"0.6588195",
"0.6588195",
"0.6588195",
"0.65466",
"0.63946176",
"0.61519814",
"0.61519814",
"0.61519814",
"0.61519814",
"0.61512464",
"0.60736084",
"0.5992981",
"0.5992981",
"0.5987012",
"0.5987012",
"0.5964276",
"0.5938574",
"0.5910615"... | 0.0 | -1 |
return the containing block | function getContainingBlock(element){var isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox')!==-1;var isIE=navigator.userAgent.indexOf('Trident')!==-1;if(isIE&&isHTMLElement(element)){// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
var elementCss=getComputedStyle(e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getContainingBlock(element) {\n var currentNode = Object(_getParentNode_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(element);\n\n while (Object(_instanceOf_js__WEBPACK_IMPORTED_MODULE_3__[\"isHTMLElement\"])(currentNode) && ['html', 'body'].indexOf(Object(_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\... | [
"0.6577409",
"0.6577409",
"0.6577409",
"0.6571231",
"0.65461355",
"0.65461355",
"0.65461355",
"0.6516638",
"0.6516638",
"0.65010834",
"0.64936745",
"0.64802283",
"0.6474632",
"0.64665604",
"0.64612967",
"0.6339487",
"0.633014",
"0.63266474",
"0.62810093",
"0.627958",
"0.62795... | 0.6270516 | 25 |
such as table ancestors and cross browser bugs. | function getOffsetParent(element){var window=getWindow(element);var offsetParent=getTrueOffsetParent(element);while(offsetParent&&isTableElement(offsetParent)&&getComputedStyle(offsetParent).position==='static'){offsetParent=getTrueOffsetParent(offsetParent);}if(offsetParent&&(getNodeName(offsetParent)==='html'||getNod... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function k(e,t){return c(e,\"table\")&&c(11!==t.nodeType?t:t.firstChild,\"tr\")&&me(\">tbody\",e)[0]||e}",
"function gtGrdObj(tdObj) { try { var ele = tdObj.parentNode.parentNode.parentNode; if (ele.tagName.toLowerCase() == \"tbody\") le = ele.parentNode; return ele; } catch (e) { return null; } }",
"function ... | [
"0.6445565",
"0.6040161",
"0.58393914",
"0.5824688",
"0.5816572",
"0.5804739",
"0.58030534",
"0.572371",
"0.56821644",
"0.5664005",
"0.55925024",
"0.55506366",
"0.5527616",
"0.5502319",
"0.5501955",
"0.5496449",
"0.54459476",
"0.5415138",
"0.53849775",
"0.53701067",
"0.536003... | 0.5542538 | 12 |
Round the offsets to the nearest suitable subpixel based on the DPR. Zooming can change the DPR, but it seems to report a value that will cleanly divide the values into the appropriate subpixels. | function roundOffsetsByDPR(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return {x:round(round(x*dpr)/dpr)||0,y:round(round(y*dpr)/dpr)||0};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n }",
"function roundOffsetsByDPR(_ref) {\n... | [
"0.75932765",
"0.75747055",
"0.7506673",
"0.7486163",
"0.74772507",
"0.74772507",
"0.74772507",
"0.74772507",
"0.74772507",
"0.7454967",
"0.7454967",
"0.7408192",
"0.73674977",
"0.73082155",
"0.73082155",
"0.73082155",
"0.7266812",
"0.7249476",
"0.7249476",
"0.7249476",
"0.72... | 0.766062 | 1 |
of the `` and `` rect bounds if horizontally scrollable | function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"bounds() {\n const _bounds = new HRect(this.rect);\n _bounds.offsetTo(0, 0);\n return _bounds;\n }",
"function W(){var t=l.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||l[e]:t.height||l[e]}",
"function BoundingBoxRect() { }",
"_calculateBounds() {\n ... | [
"0.6850526",
"0.66271067",
"0.66202945",
"0.6515266",
"0.6497182",
"0.6487071",
"0.64457697",
"0.64024943",
"0.6396382",
"0.6355395",
"0.6345145",
"0.63372374",
"0.6321982",
"0.6319057",
"0.62603396",
"0.62603396",
"0.62572896",
"0.62285376",
"0.6216895",
"0.62146056",
"0.620... | 0.0 | -1 |
given a DOM element, return the list of all scroll parents, up the list of ancesors until we get to the top window object. This list is what we attach scroll listeners to, because if any of these parent elements scroll, we'll need to recalculate the reference element's position. | function listScrollParents(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow(scrollParent);var target=isBody?[win].concat(win.vis... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listScrollParents$1(element,list){var _element$ownerDocumen;if(list===void 0){list=[];}var scrollParent=getScrollParent$1(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow$1(scrollParent);var target=isBody?[win].con... | [
"0.72062486",
"0.7164777",
"0.7157121",
"0.7063339",
"0.7063339",
"0.6961722",
"0.6961722",
"0.6961722",
"0.69084173",
"0.6873973",
"0.6873973",
"0.6873973",
"0.6873973",
"0.6841395",
"0.6841395",
"0.6841395",
"0.68379384",
"0.68379384",
"0.68379384",
"0.68379384",
"0.6837938... | 0.7336192 | 1 |
clipping (or hiding) overflowing elements with a position different from `initial` | function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element));var canEscapeClipping=['absolute','fixed'].indexOf(getComputedStyle(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function resetHiddenItemSize() {\n TweenLite.to(_element, 0, {scale: 1});\n }",
"revertPosition() {\n const context = this.context,\n original = context.originalPosition; // revert to correct location\n\n if (original.next) {\n const isNoop = original.next && original.next.previousSib... | [
"0.53918445",
"0.5333649",
"0.52749443",
"0.52349114",
"0.5218984",
"0.5191169",
"0.517269",
"0.51595616",
"0.51427627",
"0.5067348",
"0.5044781",
"0.5034173",
"0.5027323",
"0.50227445",
"0.5005332",
"0.4976861",
"0.49688527",
"0.4966697",
"0.49623466",
"0.49615896",
"0.49284... | 0.5042726 | 11 |
Composite means it takes into account transforms as well as layout. | function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false;}var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement);var isOffsetParentAnElement=isHTMLElement(offsetParent);var scroll={scrollLeft:0,scrollTop:0};var offse... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function composite(src, ops) {\n console.log('composite operations');\n console.log(ops);\n\n var mat = Matrix3x3.identity();\n for(var i=0;i<ops.length;i++) {\n var m = Matrix3x3.identity();\n var params = ops[i];\n switch( params[0] ) {\n ... | [
"0.65486985",
"0.6166722",
"0.6166722",
"0.6010471",
"0.59579456",
"0.58461636",
"0.5741393",
"0.5688997",
"0.56546265",
"0.56008905",
"0.556109",
"0.5505642",
"0.5482712",
"0.5294749",
"0.5281335",
"0.52623343",
"0.5191511",
"0.50583845",
"0.5051368",
"0.50366163",
"0.503661... | 0.0 | -1 |
On visiting object, check for its dependencies and visit them recursively | function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach(function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);if(depModifier){sort(depModifier);}}});result.push(modifier);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function traverse(object, ancestors, visitor) {\n var key, child, tempList;\n\n visitor.call(null, object);\n for (key in object) {\n if (object.hasOwnProperty(key)) {\n child = object[key];\n if (typeof child === 'object' && chi... | [
"0.67661756",
"0.650305",
"0.65017045",
"0.6474099",
"0.64717424",
"0.6372098",
"0.6370522",
"0.6334102",
"0.6309952",
"0.6289112",
"0.6213317",
"0.6195653",
"0.61104006",
"0.6004782",
"0.60006046",
"0.5977171",
"0.5937908",
"0.5914214",
"0.5798761",
"0.5770098",
"0.576878",
... | 0.0 | -1 |
Modifiers have the ability to execute arbitrary code before the first update cycle runs. They will be executed in the same order as the update cycle. This is useful when a modifier adds some persistent data that other modifiers need to use, but the modifier is run after the dependent one. | function runModifierEffects(){state.orderedModifiers.forEach(function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options=_ref3$options===void 0?{}:_ref3$options,effect=_ref3.effect;if(typeof effect==='function'){var cleanupFn=effect({state:state,name:name,instance:instance,options:options});var noopFn=funct... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n if (typeof effect === 'functi... | [
"0.6597659",
"0.6554965",
"0.65514743",
"0.65514743",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
"0.65354544",
... | 0.68994534 | 2 |
Note: We don't need `envHasBigInt64Array` in fde es6/index.js | function equal$1(a,b){// START: fast-deep-equal es6/index.js 3.1.1
if(a===b)return true;if(a&&b&&typeof a=='object'&&typeof b=='object'){if(a.constructor!==b.constructor)return false;var length,i,keys;if(Array.isArray(a)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(!equal$1(a[i],b[i]))retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function v64(v65,v66,v67,v68,v69) {\n const v70 = ArrayBuffer(split);\n // v70 = .unknown\n}",
"function h(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}",
"function makeEnv(env) {\n env.getTotalMemory = function () { return mdle['TOTAL_MEMORY']; };\n env.abort = function () { process.exit(-... | [
"0.59258646",
"0.54551214",
"0.53476554",
"0.5341588",
"0.53322065",
"0.53000367",
"0.52759856",
"0.5270142",
"0.51673603",
"0.5133303",
"0.5119744",
"0.50289637",
"0.5027842",
"0.5000861",
"0.49966353",
"0.4969807",
"0.49406448",
"0.49262202",
"0.4903299",
"0.49010926",
"0.4... | 0.0 | -1 |
Removes all keyvalue entries from the list cache. | function listCacheClear(){this.__data__=[];this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear(){this.__data__=[];}",
"function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}",
"function listCacheClear() ... | [
"0.7357779",
"0.7357779",
"0.7357779",
"0.7357779",
"0.7317932",
"0.72645503",
"0.72645503",
"0.7262977",
"0.72569066",
"0.72569066",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",
"0.7234546",... | 0.7236393 | 18 |
Removes all keyvalue entries from the stack. | function stackClear(){this.__data__=new ListCache();this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear () {\n this._dict = {}\n this._stack = [this._dict]\n }",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear(){this.__data__={'array':[],'map':null};}",
"function stackClear() {\n\t this.__... | [
"0.63577217",
"0.63291264",
"0.63291264",
"0.63291264",
"0.62734073",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62274295",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006",
"0.62171006"... | 0.0 | -1 |
Removes all keyvalue entries from the hash. | function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}",
... | [
"0.67331547",
"0.66229314",
"0.65130246",
"0.6456053",
"0.62131137",
"0.6201214",
"0.6139392",
"0.61100906",
"0.6029288",
"0.5966744",
"0.59360605",
"0.59072584",
"0.59072584",
"0.59072584",
"0.59040016",
"0.5900616",
"0.5900616",
"0.5900616",
"0.58648694",
"0.58648694",
"0.5... | 0.0 | -1 |
Removes all keyvalue entries from the map. | function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map$1||ListCache)(),'string':new Hash()};} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }",
"clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }",
"function multiMapRemo... | [
"0.7589402",
"0.70686156",
"0.673569",
"0.6651485",
"0.6528891",
"0.6266802",
"0.6257602",
"0.6257602",
"0.6257602",
"0.6170819",
"0.6170819",
"0.6170819",
"0.616584",
"0.6152476",
"0.6147431",
"0.6147431",
"0.6147431",
"0.6147431",
"0.6147431",
"0.6147431",
"0.6147431",
"0... | 0.5825702 | 55 |
Deeply get a value from an object via its path. | function getIn(obj,key,def,p){if(p===void 0){p=0;}var path=toPath(key);while(obj&&p<path.length){obj=obj[path[p++]];}return obj===undefined?def:obj;} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }",
"function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i+... | [
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.8193551",
"0.7947024",
"0.7807266",
"0.77647674",
"0.7747176",
"0.7579353",
"0.75734",
"0.7538337",
"0.7516273",
"0.7497333",
"0.74887854",
"0.74285764",
"0.73955286",
... | 0.0 | -1 |
Deeply set a value from in object via it's path. If the value at `path` has changed, return a shallow copy of obj with `value` set at `path`. If `value` has not changed, return the original `obj`. Existing objects / arrays along `path` are also shallow copied. Sibling objects along path retain the same internal js refe... | function setIn(obj,path,value){var res=clone(obj);// this keeps inheritance when obj is a class
var resVal=res;var i=0;var pathArray=toPath(path);for(;i<pathArray.length-1;i++){var currentPath=pathArray[i];var currentObj=getIn(obj,pathArray.slice(0,i+1));if(currentObj&&(isObject$2(currentObj)||Array.isArray(currentObj)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setIn(obj, path, value) {\n var res = clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1... | [
"0.75242656",
"0.7520379",
"0.7399823",
"0.7399823",
"0.7399823",
"0.73113424",
"0.71814436",
"0.67938864",
"0.67573845",
"0.67254883",
"0.67254883",
"0.66972333",
"0.66972333",
"0.64113533",
"0.63646054",
"0.63281685",
"0.632334",
"0.63189703",
"0.6268811",
"0.6060656",
"0.6... | 0.7266066 | 6 |
Recursively a set the same value for all keys and arrays nested object, cloning | function setNestedObjectValues(object,value,visited,response){if(visited===void 0){visited=new WeakMap();}if(response===void 0){response={};}for(var _i=0,_Object$keys=Object.keys(object);_i<_Object$keys.length;_i++){var k=_Object$keys[_i];var val=object[k];if(isObject$2(val)){if(!visited.get(val)){visited.set(val,true)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"setObjectWithNestedKey(obj, key, value) {\n\n if(key.indexOf(\".\")) {\n // Need to deal with arrays\n var keys = key.split(\".\");\n var lastHash = keys.pop();\n for(var i = 0; i < keys.length; i++) {\n let keyPointer = keys[i];\n\n ... | [
"0.63569784",
"0.6188108",
"0.61728525",
"0.6083384",
"0.6081756",
"0.6077687",
"0.60632044",
"0.60546595",
"0.60530597",
"0.5991888",
"0.598843",
"0.59701836",
"0.5966591",
"0.5966591",
"0.5966591",
"0.5966591",
"0.5966591",
"0.59539026",
"0.5939421",
"0.5895184",
"0.5834293... | 0.6219428 | 1 |
Validate a yup schema. | function validateYupSchema(values,schema,sync,context){if(sync===void 0){sync=false;}if(context===void 0){context={};}var validateData=prepareDataForValidation(values);return schema[sync?'validateSync':'validate'](validateData,{abortEarly:false,context:context});} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validationSchema() {\n return {\n name: Yup.string().required(true),\n };\n}",
"function validateYupSchema(values, schema, sync, context) {\n if (sync === void 0) {\n sync = false;\n }\n\n if (context === void 0) {\n context = {};\n }\n\n var validateData = prepareDataForValidation(value... | [
"0.708026",
"0.6426762",
"0.6426762",
"0.6426762",
"0.6426762",
"0.6426762",
"0.6426762",
"0.6037371",
"0.59873",
"0.5872371",
"0.5733999",
"0.5728448",
"0.56688386",
"0.5661867",
"0.56045157",
"0.553236",
"0.549124",
"0.54804677",
"0.54655415",
"0.5416495",
"0.54163957",
"... | 0.71655756 | 0 |
deepmerge array merging algorithm | function arrayMerge(target,source,options){var destination=target.slice();source.forEach(function merge(e,i){if(typeof destination[i]==='undefined'){var cloneRequested=options.clone!==false;var shouldClone=cloneRequested&&options.isMergeableObject(e);destination[i]=shouldClone?deepmerge_1(Array.isArray(e)?[]:{},e,optio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mergeArrays(arr1, arr2) {\n \n}",
"merge(tree) {\n let arr = tree.toArray();\n for(let i=0; i<arr.length; i++) {\n this.add(arr[i]);\n }\n }",
"function mergeSort(array) {\r\n //まずアレイを一つずつ要素が入った子アレイを持つ親アレイにする。\r\n const decomposedArray = [];\r\n for (let ele of array) {\r\n dec... | [
"0.6493913",
"0.64938843",
"0.64637727",
"0.6422636",
"0.63669133",
"0.6352357",
"0.633785",
"0.63314736",
"0.6298962",
"0.62649876",
"0.622593",
"0.622237",
"0.6176762",
"0.6166889",
"0.614755",
"0.6132026",
"0.61226326",
"0.6093744",
"0.60814524",
"0.60814524",
"0.60814524"... | 0.6866639 | 0 |
Return multi select values based on an array of options | function getSelectedValues(options){return Array.from(options).filter(function(el){return el.selected;}).map(function(el){return el.value;});} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (el) {\n return el.value;\n });\n}",
"function getSelectedValues(options) {\n return Array.from(options).filter(function (el) {\n return el.selected;\n }).map(function (... | [
"0.7157802",
"0.7157802",
"0.7157802",
"0.7157802",
"0.7157802",
"0.7157802",
"0.68796736",
"0.68796736",
"0.68406266",
"0.68406266",
"0.68306524",
"0.6830643",
"0.6739273",
"0.669184",
"0.6674298",
"0.6674298",
"0.66361904",
"0.6542995",
"0.6434029",
"0.6427701",
"0.64018255... | 0.749405 | 0 |
Return the next value for a checkbox | function getValueForCheckbox(currentValue,checked,valueProp){// If the current value was a boolean, return a boolean
if(typeof currentValue==='boolean'){return Boolean(checked);}// If the currentValue was not a boolean we want to return an array
var currentArrayOfValues=[];var isValueInArray=false;var index=-1;if(!Arra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"nextValue() {\n let value = this.getContext().changeValue(NEXT_VALUE);\n\n if (value === null) return value;\n this.value = value;\n\n return true;\n }",
"function next() {\n setValue(()=>{\n return checkValue(value+1)\n })\n }",
"next() {\n ... | [
"0.66381294",
"0.64310277",
"0.6164489",
"0.6139948",
"0.60716945",
"0.6049012",
"0.5960204",
"0.59186673",
"0.5884741",
"0.5867915",
"0.58380634",
"0.5821627",
"0.58103305",
"0.5798497",
"0.57925844",
"0.57908046",
"0.57835233",
"0.5776785",
"0.57597613",
"0.57554394",
"0.57... | 0.0 | -1 |
Connect any component to Formik context, and inject as a prop called `formik`; | function connect(Comp){var C=function C(props){return/*#__PURE__*/react.createElement(FormikConsumer,null,function(formik){!!!formik?warning(false,"Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> com... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n ... | [
"0.713233",
"0.71126294",
"0.71036565",
"0.7081676",
"0.7058521",
"0.7058521",
"0.619911",
"0.6107712",
"0.6107712",
"0.6107712",
"0.598304",
"0.5802057",
"0.5759564",
"0.5643108",
"0.5533933",
"0.53613365",
"0.5301838",
"0.52787024",
"0.52782476",
"0.52213615",
"0.52167946",... | 0.61819106 | 7 |
! Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT... | function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(genera... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function WSAPI() {\n }",
"private internal function m248() {}",
"private public function m246() {}",
"createObjectContext2() {\n console.log('deprecated')\n return C.extension\n }",
"supportsPlatform() {\n return true;\n }",
"function T7(){return typeof window>\"u\"&&(self.window=self),functio... | [
"0.5718999",
"0.5127648",
"0.50340307",
"0.4986635",
"0.4893337",
"0.48703453",
"0.48676834",
"0.48674643",
"0.4854622",
"0.48420036",
"0.48402965",
"0.48402965",
"0.48220244",
"0.47662336",
"0.4719181",
"0.4710195",
"0.4675956",
"0.4675956",
"0.46712086",
"0.46453077",
"0.46... | 0.0 | -1 |
by calls to these methods by a Babel plugin. In PROD (or in packages without access to React internals), they are left as they are instead. | function warn(format){{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];}printWarning('warn',format,args);}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function resetIfUsingPreact() {\n if (window.preact !== undefined) {\n jsxLoader.compiler.pragma = 'React.createElement';\n jsxLoader.compiler.pragmaFrag = 'React.Fragment';\n }\n }",
"react() {\n return;\n }",
"function globalizeReact() {\n ... | [
"0.6231517",
"0.5987249",
"0.5949213",
"0.57122",
"0.57122",
"0.5705207",
"0.56892043",
"0.56892043",
"0.55873036",
"0.5555952",
"0.5543145",
"0.5543145",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0.5510524",
"0... | 0.0 | -1 |
Trust the developer to only use possibleRegistrationNames in true | function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies);registerDirectEvent(registrationName+'Capture',dependencies);} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"allow() {\n this._isAllowed = true;\n }",
"static allowOnlyUsers(ctx) {\n if( ctx.clientIdentity.getMSPID() === USERS_MSP_ID )\n return\n throw new Error(PERMISSION_ERROR_MESSAGE)\n }",
"get Restricted() {}",
"static allowOnlyRegistrar(ctx) {\n if( ctx.clientId... | [
"0.6821976",
"0.6397543",
"0.63840806",
"0.62601405",
"0.6199454",
"0.6155516",
"0.6138417",
"0.60157514",
"0.59850806",
"0.5874411",
"0.5874405",
"0.5854616",
"0.5825604",
"0.58157027",
"0.5803607",
"0.578216",
"0.5779587",
"0.575128",
"0.57488424",
"0.57419086",
"0.5734621"... | 0.0 | -1 |
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 {if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if
// the hydration is successful of a javascript: URL, we
// sti... | {
"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.8159446",
"0.8159446",
"0.8144443",
"0.8068438",
"0.8068438",
"0.80646837",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
"0.8060194",
... | 0.7925386 | 37 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.