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
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.75903755", "0.70695037", "0.6735827", "0.6653031", "0.653072", "0.62686956", "0.62589216", "0.62589216", "0.62589216", "0.6171725", "0.6171725", "0.6171725", "0.61668706", "0.61542076", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0....
0.0
-1
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
Converts a Rule to CSS string.
function toCss(selector, style) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var result = ''; if (!style) return result; var _options$indent = options.indent, indent = _options$indent === undefined ? 0 : _options$indent; var fallbacks = style.fallbacks; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toCSSDeclaration(prop, val) {\n var props = toCSSProps(prop);\n for (var i = 0, ii = props.length; i < ii; ++i) {\n props[i] += \": \"+val+\";\";\n }\n return props.join(\"\");\n }", "toString(): string {\n if (Array.isArray(this.style)) {\n let str = ''\n for (let index =...
[ "0.6155813", "0.61170787", "0.57044065", "0.56851584", "0.56824833", "0.5646435", "0.564149", "0.564149", "0.564149", "0.564149", "0.5634502", "0.5634502", "0.5634502", "0.5634502", "0.5634502", "0.5634502", "0.5634502", "0.5634502", "0.5634502", "0.5634502", "0.5634502", "...
0.0
-1
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n ...
[ "0.5276731", "0.52603525", "0.51912946", "0.5183357", "0.5126483", "0.50448495", "0.48931673", "0.4861047", "0.48415267", "0.48314145", "0.48242697", "0.48147812", "0.48078167", "0.47866392", "0.47839633", "0.47597152", "0.47521117", "0.47409353", "0.47275993", "0.47050476", ...
0.0
-1
MUST be called after `prepareSource` called Here we need to make auto series, especially for auto legend. But we do not modify series.name in option to avoid side effects.
function autoSeriesName(seriesModel) { // User specified name has higher priority, otherwise it may cause // series can not be queried unexpectedly. var name = seriesModel.name; if (!modelUtil.isNameSpecified(seriesModel)) { seriesModel.name = getSeriesAutoName(seriesModel) || name; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoSeriesName(seriesModel) {\n\t // User specified name has higher priority, otherwise it may cause\n\t // series can not be queried unexpectedly.\n\t var name = seriesModel.name;\n\t\n\t if (!isNameSpecified(seriesModel)) {\n\t seriesModel.name = getSeriesAutoName(seriesModel)...
[ "0.6024482", "0.5718334", "0.5563059", "0.55489856", "0.5540183", "0.5534914", "0.5531053", "0.55204344", "0.5485926", "0.5465797", "0.54637825", "0.546132", "0.54566145", "0.5449891", "0.54401815", "0.54395604", "0.540884", "0.53690237", "0.5357786", "0.53247726", "0.5272336...
0.58028686
4
Data in excludeDimensions is copied, otherwise transfered.
function cloneListForMapAndSample(original, excludeDimensions) { var allDimensions = original.dimensions; var list = new List(zrUtil.map(allDimensions, original.getDimensionInfo, original), original.hostModel); // FIXME If needs stackedOn, value may already been stacked transferProperties(list, original); var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exclude_data() {\n\t new_data = _.difference(data, actives());\n\t if (new_data.length == 0) {\n\t alert(\"I don't mean to be rude, but I can't let you remove all the data.\\n\\nTry selecting just a few data points then clicking 'Exclude'.\");\n\t return false;\n\t }\n\t data = new_data;\n\t re...
[ "0.60022384", "0.58739597", "0.58630013", "0.5722877", "0.54597485", "0.5357128", "0.5327038", "0.5267931", "0.5105552", "0.5099597", "0.5065691", "0.5064692", "0.50224197", "0.5011634", "0.49663877", "0.49649844", "0.49575442", "0.49248365", "0.49244294", "0.49177247", "0.49...
0.5786024
5
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function defaultKeyGetter(item) { return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onChildAppStart () {\n\n }", "get Android() {}", "onMessageStart() { }", "_playbackCompatibility() {\n // Detect audio playback capabilities.\n\n // Detect HTML5 Audio playback.\n // http://caniuse.com/#feat=audio\n this.canUseAudio = Boolean(new Audio());\n console.log('Native HTML5 Audio pl...
[ "0.47174537", "0.4658246", "0.45285463", "0.45032862", "0.44835344", "0.44350168", "0.4382653", "0.43627265", "0.43324777", "0.4301593", "0.42541128", "0.42418656", "0.4221815", "0.42179117", "0.41816333", "0.41801563", "0.41795337", "0.417805", "0.4176735", "0.41745046", "0....
0.0
-1
Provide setColor helper method to avoid determine if set the fill or stroke outside
function symbolPathSetColor(color, innerColor) { if (this.type !== 'image') { var symbolStyle = this.style; var symbolShape = this.shape; if (symbolShape && symbolShape.symbolType === 'line') { symbolStyle.stroke = color; } else if (this.__isEmptyBrush) { symbolStyle.stroke = color; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setFill(color) {\n if (color === false) color = `transparent`;\n this.ctx.fillStyle = color;\n }", "setStroke(color) {\n if (color === false) color = `transparent`;\n this.ctx.strokeStyle = color;\n }", "function setStrokeFillColor() {\r\n strokeColor = getStrokeColor.value\r\n fillColor = ...
[ "0.7412084", "0.7294955", "0.723742", "0.71584886", "0.7113421", "0.70960176", "0.69534606", "0.68138146", "0.68125325", "0.67718714", "0.6758125", "0.6755196", "0.6750894", "0.6710762", "0.6707737", "0.66941595", "0.6684559", "0.66750085", "0.66727597", "0.66604334", "0.6658...
0.61856997
59
Wrap to ensure clean parameters are given to `parse`.
function parseEntities(value, options) { var settings = {} var option var key if (!options) { options = {} } for (key in defaults) { option = options[key] settings[key] = option === null || option === undefined ? defaults[key] : option } if (settings.position.indent || settings.posi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitize( params, cb ){\n\n var clean = {};\n\n // ensure the input params are a valid object\n if( Object.prototype.toString.call( params ) !== '[object Object]' ){\n params = {};\n }\n\n // input text\n if('string' !== typeof params.input || !params.input.length){\n return cb( 'invalid param...
[ "0.58494884", "0.5466211", "0.5399879", "0.5269356", "0.50587845", "0.5005599", "0.4992227", "0.49827754", "0.49827754", "0.49827754", "0.49827754", "0.49827754", "0.49827754", "0.49827754", "0.49827754", "0.49827754", "0.49771205", "0.49339113", "0.49310955", "0.4919989", "0...
0.0
-1
Parse entities. eslintdisablenextline complexity
function parse(value, settings) { var additional = settings.additional var nonTerminated = settings.nonTerminated var handleText = settings.text var handleReference = settings.reference var handleWarning = settings.warning var textContext = settings.textContext var referenceContext = settings.referenceCon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_parseEntities() {\n this._parseAllTestFiles();\n this._parseFixtures();\n this._parseFunctionalTests();\n this._parsePerformanceTests();\n }", "get_entitys(text) {\r\n // everything between {}\r\n const items = text.match(/\\{([^}]+)\\}/g);\r\n // the length of items \r\n const items_le...
[ "0.681308", "0.67262226", "0.6658845", "0.6528585", "0.63414043", "0.6314433", "0.6267606", "0.6267606", "0.6267606", "0.6267606", "0.6267606", "0.6267606", "0.6267606", "0.6267606", "0.6207816", "0.61651844", "0.60006106", "0.58273095", "0.5772756", "0.5741549", "0.5643226",...
0.5580815
24
Flush `queue` (normal text). Macro invoked before each entity and at the end of `value`. Does nothing when `queue` is empty.
function flush() { if (queue) { result.push(queue) if (handleText) { handleText.call(textContext, queue, {start: prev, end: now()}) } queue = '' } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flush () {\n flushing = true\n run(queue)\n run(userQueue)\n reset()\n}", "function flush () {\n flushing = true\n run(queue)\n run(userQueue)\n reset()\n}", "function flush () {\n flushing = true\n run(queue)\n run(userQueue)\n reset()\n}", "function flush() {\n if (queue) {\n ...
[ "0.70874876", "0.70874876", "0.70874876", "0.6971438", "0.6960171", "0.6915473", "0.6880513", "0.6880513", "0.6599287", "0.65359473", "0.6397193", "0.62741274", "0.62356603", "0.62093806", "0.61778224", "0.61778224", "0.61778224", "0.61480325", "0.61480325", "0.61480325", "0....
0.69164586
10
Check if `character` is outside the permissible unicode range.
function prohibited(code) { return (code >= 0xd800 && code <= 0xdfff) || code > 0x10ffff }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isCharAndNotRestricted(c) {\n return (c === 0x9) ||\n (c === 0xA) ||\n (c === 0xD) ||\n (c > 0x1F && c < 0x7F) ||\n (c === 0x85) ||\n (c > 0x9F && c <= 0xD7FF) ||\n (c >= 0xE000 && c <= 0xFFFD) ||\n (c >= 0x10000 && c <= 0x10FFFF);\n}", "function isRes...
[ "0.67476285", "0.66701907", "0.65477204", "0.6438206", "0.63760465", "0.6366012", "0.63554764", "0.6335903", "0.613634", "0.613634", "0.61324656", "0.6131802", "0.6103023", "0.60951996", "0.6073138", "0.6072251", "0.6036462", "0.6001648", "0.59772575", "0.59645826", "0.596259...
0.0
-1
Check if `character` is disallowed.
function disallowed(code) { return ( (code >= 0x0001 && code <= 0x0008) || code === 0x000b || (code >= 0x000d && code <= 0x001f) || (code >= 0x007f && code <= 0x009f) || (code >= 0xfdd0 && code <= 0xfdef) || (code & 0xffff) === 0xffff || (code & 0xffff) === 0xfffe ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isCharAndNotRestricted(c) {\n return (c === 0x9) ||\n (c === 0xA) ||\n (c === 0xD) ||\n (c > 0x1F && c < 0x7F) ||\n (c === 0x85) ||\n (c > 0x9F && c <= 0xD7FF) ||\n (c >= 0xE000 && c <= 0xFFFD) ||\n (c >= 0x10000 && c <= 0x10FFFF);\n}", "function isVal...
[ "0.72532046", "0.721876", "0.70968354", "0.7084506", "0.6995928", "0.69754803", "0.6965176", "0.69254243", "0.6893943", "0.6863503", "0.6695414", "0.66376597", "0.66186094", "0.6597152", "0.6583336", "0.6561093", "0.65308106", "0.65262747", "0.6521222", "0.6505618", "0.647833...
0.0
-1
Remove final newline characters from `value`.
function trimTrailingLines(value) { var val = String(value) var index = val.length while (val.charAt(--index) === line) { // Empty } return val.slice(0, index + 1) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trimTrailingLines(value) {\n return String(value).replace(/\\n+$/, '')\n}", "function trimTrailingLines(value) {\n var val = String(value);\n var index = val.length;\n\n while (val.charAt(--index) === line) { /* empty */ }\n\n return val.slice(0, index + 1);\n}", "function trimTrailingLines(value...
[ "0.79480493", "0.7229775", "0.7208231", "0.7208231", "0.69982606", "0.6687853", "0.6399552", "0.63851583", "0.6329458", "0.6270205", "0.6220877", "0.6215881", "0.6215881", "0.62151474", "0.62026143", "0.6172999", "0.6161238", "0.61498433", "0.61375123", "0.61375123", "0.61375...
0.7213269
4
Normalize an identifier. Collapses multiple white space characters into a single space, and removes casing.
function normalize(value) { return collapseWhiteSpace(value).toLowerCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalize(name) {\n return name.replace(/[- _]+/g, '').toLowerCase();\n }", "function normalize(name) {\n return name.replace(/[- _]+/g, '').toLowerCase();\n }", "function normalizeName(name) {\n s = name;\n var pos = 0;\n while (true)\n {\n pos = s.search(' ');\n if (pos...
[ "0.6639997", "0.6639997", "0.6630079", "0.65121317", "0.64945793", "0.64342403", "0.6421398", "0.6413606", "0.6330361", "0.6327154", "0.63263845", "0.63179886", "0.63179886", "0.6314241", "0.6299053", "0.6299053", "0.6299053", "0.6299053", "0.6299053", "0.6299053", "0.6299053...
0.63189054
15
Take a potentially misbehaving resolver function and make sure onFulfilled and onRejected are only called once. Makes no guarantees about asynchrony.
function doResolve(fn, promise) { var done = false; var res = tryCallTwo(fn, function (value) { if (done) return; done = true; resolve(promise, value); }, function (reason) { if (done) return; done = true; reject(promise, reason); }); if (!done && res === IS_ERROR) { done = true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doResolve(fn, onFulfilled, onRejected) {\n var done = false;\n try {\n fn(function (value) {\n if (done) return;\n done = true;\n onFulfilled(value);\n }, function (reason) {\n if (done) return;\n done = true;\n onRejected(reaso...
[ "0.70790076", "0.7072583", "0.70426524", "0.70407116", "0.70407116", "0.70407116", "0.70328355", "0.7032209", "0.7032209", "0.7032209", "0.7032209", "0.7032209", "0.7015546", "0.6960999", "0.6960999", "0.6960999", "0.6960999", "0.68085325", "0.62830186", "0.61700356", "0.6023...
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.7501177", "0.749944", "0.74186414", "0.74186414", "0.7415844", "0.7413234", "0.73725617", "0.73725617", "0.73725617", "0.73725617", "0.73725617", "0.73725617", "0.73725617", "0.7370341", "0.7370341", "0.7370341", "0.7370341", "0.73276705", "0.73276705", "0.73276705", "0.73...
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 ? __WEBPACK_IMPORTED_MODULE_2__components_connectAdvanced__["a" /* default */] : _ref$connectHOC, _ref$mapStateToPropsF = _ref.mapStateToPropsFactories...
{ "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.6037481", "0.60318357", "0.60318357", "0.59998536", "0.5954973", "0.5954973", "0.5954973", "0.59449977", "0.59152806", "0.5906259", "0.5872966", "0.5872966", "0.58575654", "0.5854597", "0.5854597", "0.5834004", "0.5834004", "0.5827216", "0.5819405", "0.5818854", "0.5802200...
0.0
-1
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.6488717", "0.6488717", "0.62161803", "0.60621536", "0.5905748", "0.581518", "0.5802108", "0.5797418", "0.5765932", "0.5765932", "0.5765932", "0.5765932", "0.5765932", "0.5760507", "0.5760507", "0.5760507", "0.5760507", "0.5744363", "0.5737953", "0.5732007", "0.5732007", ...
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.78342724", "0.78342724", "0.78342724", "0.78342724", "0.78342724", "0.780846", "0.7790602", "0.7778198", "0.77706814", "0.77682495", "0.77348673", "0.7734363", "0.77285075", "0.7727274", "0.7727274", "0.7723047", "0.77218086", "0.7720413", "0.7720413", "0.7705801", "0.7705...
0.7763141
13
Expose a method for transforming tokens into the path function.
function tokensToFunction (tokens) { // Compile all the tokens into regexps. var matches = new Array(tokens.length) // Compile all the patterns before compilation. for (var i = 0; i < tokens.length; i++) { if (typeof tokens[i] === 'object') { matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n const matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (let i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^...
[ "0.6187564", "0.6012206", "0.5989516", "0.5987429", "0.5987429", "0.5987429", "0.5987429", "0.5987429", "0.5987429", "0.5960049", "0.5960049", "0.5960049", "0.5960049", "0.5960049", "0.5927901", "0.5922615", "0.59035426", "0.5896853", "0.5896853", "0.5896853", "0.5896853", ...
0.0
-1
When new generator function is created, rule counter is reset. We need to reset the rule counter for SSR for each request. It's inspired by
function createGenerateClassName() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _options$dangerouslyU = options.dangerouslyUseGlobalCSS, dangerouslyUseGlobalCSS = _options$dangerouslyU === void 0 ? false : _options$dangerouslyU, _options$productionPr = opti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function apply_counter_DocGenerator() {\n\t//----Debugging------------------------------------------\n\t// The following alert-Command is useful for debugging \n\t//alert(\"docgenerator.js:741 apply_counter(\"+this.aIndexNT+\",\"+this.aFoundNonterms[this.aIndexNT]+\")-Call\")\n\t//----Create Object/Instance of Doc...
[ "0.6131504", "0.59267735", "0.5732803", "0.5691879", "0.56759423", "0.5632598", "0.55653703", "0.55594885", "0.55580324", "0.5527327", "0.5476769", "0.54673666", "0.54563147", "0.54505396", "0.54501295", "0.5411598", "0.53879875", "0.53879875", "0.53879875", "0.53879875", "0....
0.0
-1
Subset of jsspresetdefault with only the plugins the MaterialUI components are using.
function jssPreset() { return { plugins: [(0, _jssGlobal.default)(), (0, _jssNested.default)(), (0, _jssCamelCase.default)(), (0, _jssDefaultUnit.default)(), // Disable the vendor prefixer server-side, it does nothing. // This way, we can get a performance boost. // In the documentation, we are using `aut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jssPreset() {\n return {\n plugins: [(0, _jssGlobal2.default)(), (0, _jssNested2.default)(), (0, _jssCamelCase2.default)(), (0, _jssDefaultUnit2.default)(), (0, _jssVendorPrefixer2.default)(), (0, _jssPropsSort2.default)()]\n };\n}", "function jssPreset() {\n return {\n plugins: [(0, _jssGlobal...
[ "0.77260846", "0.77260846", "0.7714767", "0.7714767", "0.7714767", "0.7714767", "0.7714767", "0.7714767", "0.7714767", "0.7714767", "0.7714767", "0.7714767", "0.7714767", "0.76545835", "0.7649487", "0.7649487", "0.7649487", "0.7628448", "0.7628448", "0.7628448", "0.7628448", ...
0.75487584
42
Link rule with CSSStyleRule and nested rules with corresponding nested cssRules if both exists.
function linkRule(rule, cssRule) { rule.renderable = cssRule; if (rule.rules && cssRule.cssRules) rule.rules.link(cssRule.cssRules); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function linkRule(rule, cssRule) {\n rule.renderable = cssRule;\n if (rule.rules && cssRule.cssRules) rule.rules.link(cssRule.cssRules);\n }", "function linkRule(rule, cssRule) {\n\t rule.renderable = cssRule;\n\t if (rule.rules && cssRule.cssRules) rule.rules.link(cssRule.cssRules);\n\t}", "function ...
[ "0.66849154", "0.6598769", "0.6598769", "0.58282167", "0.58182436", "0.5704105", "0.56454116", "0.56221616", "0.56104237", "0.55535614", "0.5530914", "0.5530914", "0.5501708", "0.54628265", "0.5443712", "0.54388773", "0.54348826", "0.54348826", "0.53836423", "0.53685164", "0....
0.6688036
29
Executes a task 'atomically'. Tasks scheduled during this execution will be queued and flushed after this task has finished (assuming the scheduler endup in a released state).
function exec(task) { try { suspend(); task(); } finally { release(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async executeTask (task) {\n\t\ttask.isRunning = true;\n\t\ttask.startTime = Date.now ();\n\t\ttask.setPercentComplete (0);\n\t\tthis.updateTask.setNextRepeat (0);\n\t\ttry {\n\t\t\ttask.cancelBreak ();\n\t\t\tawait task.run ();\n\t\t\tif (task.isCancelled) {\n\t\t\t\ttask.isSuccess = false;\n\t\t\t}\n\t\t}\n\t\tc...
[ "0.6738934", "0.67383885", "0.67383885", "0.67383885", "0.67383885", "0.67383885", "0.67383885", "0.67383885", "0.67383885", "0.67383885", "0.67383885", "0.67383885", "0.6682655", "0.6682655", "0.6682655", "0.6682655", "0.66595495", "0.6650427", "0.6650427", "0.6650427", "0.6...
0.63046724
57
Executes or queues a task depending on the state of the scheduler (`suspended` or `released`)
function asap(task) { queue.push(task); if (!semaphore) { suspend(); flush(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exec(task){try{suspend();task();}finally{release();}}", "function asap(task){queue.push(task);if(!semaphore){suspend();flush();}}", "function next(){ // runs current scheduled task and creates timeout to schedule next\n\t\tif(task !== null){ // is task scheduled??\n\t\t\ttask.func(); ...
[ "0.64051074", "0.6147723", "0.6108051", "0.6078632", "0.60702425", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", "0.58739275", ...
0.56073475
45
Puts the scheduler in a `suspended` state. Scheduled tasks will be queued until the scheduler is released.
function suspend() { semaphore++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resume() {\n this._isSuspended = false;\n }", "function resetSchedulerState () {\n queue.length = activatedChildren.length = 0;\n has = {};\n if (process.env.NODE_ENV !== 'production') {\n circular = {};\n }\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n queue.length...
[ "0.59033966", "0.58409965", "0.58409965", "0.5825749", "0.58187574", "0.58187574", "0.58146566", "0.58146566", "0.5811632", "0.5808949", "0.5808949", "0.5808949", "0.5808949", "0.5808949", "0.5808949", "0.58050317", "0.5800251", "0.5796339", "0.5792082", "0.5792082", "0.57707...
0.0
-1
Puts the scheduler in a `released` state.
function release() { semaphore--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {}\n waiting = flushing = false;\n}", "function resetSchedulerState () {\n index = queue.length = activatedChildren.length = 0;\n has = {};\n if (false) {}\n waiting = flushing = false;\n}", ...
[ "0.594616", "0.594616", "0.594616", "0.594616", "0.594616", "0.594616", "0.5941836", "0.5929653", "0.5929653", "0.5929653", "0.5893197", "0.5876419", "0.586946", "0.58640796", "0.58640796", "0.58390933", "0.58390933", "0.58390933", "0.58390933", "0.58390933", "0.58390933", ...
0.0
-1
Releases the current lock. Executes all queued tasks if the scheduler is in the released state.
function flush() { release(); var task = void 0; while (!semaphore && (task = queue.shift()) !== undefined) { exec(task); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function releaseLock() {\n if (lockCounter === 1) {\n setLocked(false);\n }\n\n --lockCounter;\n }", "release() {\n let next = this.queue.shift()\n \n if(next) {\n next()\n }\n else {\n this.acquired = false\n }\n }", "async release ...
[ "0.6857504", "0.63277626", "0.6290498", "0.60993075", "0.59073865", "0.58066976", "0.5770847", "0.5737693", "0.5735024", "0.57271", "0.57271", "0.57271", "0.57271", "0.5669001", "0.56024784", "0.5510376", "0.5505545", "0.5412345", "0.53583914", "0.5326157", "0.5300598", "0....
0.5765125
17
Used to track a parent task and its forks In the new fork model, forked tasks are attached by default to their parent We model this using the concept of Parent task && main Task main task is the main flow of the current Generator, the parent tasks is the aggregation of the main tasks + all its forked tasks. Thus the wh...
function forkQueue(name, mainTask, cb) { var tasks = [], result = void 0, completed = false; addTask(mainTask); function abort(err) { cancelAll(); cb(err, true); } function addTask(task) { tasks.push(task); task.cont = function (res, isErr) { if (completed) { return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async save_on_child(inputTask) {\n logger.debug(\"save_on_child\");\n let wakeup = false;\n let task, parentTask, err;\n let now = Date.now();\n // Update the task\n [err, task] = await to(this.dbTask.update(inputTask.id, {\n check: null,\n set: {\n ...
[ "0.6296198", "0.5866736", "0.5866736", "0.58619046", "0.58619046", "0.5859074", "0.5859074", "0.5859074", "0.5859074", "0.57865244", "0.5691711", "0.5684435", "0.55871767", "0.54257214", "0.5376446", "0.53374606", "0.531305", "0.531305", "0.5250187", "0.52144283", "0.52002734...
0.5857473
11
cancellation of the main task. We'll simply resume the Generator with a Cancel
function cancelMain() { if (mainTask.isRunning && !mainTask.isCancelled) { mainTask.isCancelled = true; next(TASK_CANCEL); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancel() {\n /**\n We need to check both Running and Cancelled status\n Tasks can be Cancelled but still Running\n **/\n //\n if (iterator._isRunning && !iterator._isCancelled) {\n iterator._isCancelled = true\n taskQueue.cancelAll() // cancel all tasks,特别是 mainTask\n ...
[ "0.75327426", "0.74604726", "0.7452224", "0.7452224", "0.7430871", "0.73604226", "0.7348724", "0.7347025", "0.73073906", "0.7281145", "0.7281145", "0.7281145", "0.7281145", "0.7281145", "0.7281145", "0.7281145", "0.7281145", "0.7281145", "0.7281145", "0.7281145", "0.6893484",...
0.66455287
38
This may be called by a parent generator to trigger/propagate cancellation cancel all pending tasks (including the main task), then end the current task. Cancellation propagates down to the whole execution tree holded by this Parent task It's also propagated to all joiners of this task and their execution tree/joiners ...
function cancel() { /** We need to check both Running and Cancelled status Tasks can be Cancelled but still Running **/ if (iterator._isRunning && !iterator._isCancelled) { iterator._isCancelled = true; taskQueue.cancelAll(); /** Ending with a Never result will propagat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancel() {\n\t /**\n\t We need to check both Running and Cancelled status\n\t Tasks can be Cancelled but still Running\n\t **/\n\t if (iterator._isRunning && !iterator._isCancelled) {\n\t iterator._isCancelled = true;\n\t taskQueue.cancelAll();\n\t /**\n\t Ending w...
[ "0.6542979", "0.65321195", "0.65129775", "0.6506381", "0.63822454", "0.6379121", "0.63786757", "0.63767415", "0.63767415", "0.5896874", "0.58884734", "0.5737647", "0.5737647", "0.5737647", "0.5737647", "0.5545616", "0.5545616", "0.5499438", "0.5499438", "0.5499438", "0.549943...
0.6481109
14
This is the generator driver It's a recursive async/continuation function which calls itself until the generator terminates or throws
function next(arg, isErr) { // Preventive measure. If we end up here, then there is really something wrong if (!mainTask.isRunning) { throw new Error('Trying to resume an already finished generator'); } try { var result = void 0; if (isErr) { result = iterator.throw(arg); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function asyncGenerator(iter) {\n\n let front = null, back = null;\n\n let aIter = {\n\n next(val) { return send(\"next\", val) },\n throw(val) { return send(\"throw\", val) },\n return(val) { return send(\"return\", val) },\n };\n\n aIter[Symbol.asyncIterator] = function() { retur...
[ "0.7247499", "0.69678634", "0.6824029", "0.6824029", "0.6824029", "0.6824029", "0.68160576", "0.68160576", "0.67736614", "0.6765286", "0.6761332", "0.67356366", "0.67328244", "0.6731124", "0.6731124", "0.6726775", "0.6692271", "0.6654314", "0.66265875", "0.6559309", "0.653594...
0.6798725
10
Completion callback passed to the appropriate effect runner
function currCb(res, isErr) { if (effectSettled) { return; } effectSettled = true; cb.cancel = __WEBPACK_IMPORTED_MODULE_0__utils__["u" /* noop */]; // defensive measure if (sagaMonitor) { isErr ? sagaMonitor.effectRejected(effectId, res) : sagaMonitor.effectResolved(effec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currCb(res, isErr) {\n\t if (effectSettled) {\n\t return;\n\t }\n\n\t effectSettled = true;\n\t cb.cancel = _utils.noop; // defensive measure\n\t if (sagaMonitor) {\n\t isErr ? sagaMonitor.effectRejected(effectId, res) : sagaMonitor.effectResolved(effectId, res);\n\t...
[ "0.60890347", "0.6011439", "0.59627074", "0.5957549", "0.5957549", "0.59232086", "0.59232086", "0.591867", "0.59096324", "0.58920145", "0.58920145", "0.58920145", "0.58920145", "0.5881055", "0.5857217", "0.5831372", "0.5831372", "0.5831372", "0.5831372", "0.5831372", "0.58313...
0.59439874
7
Constructors Numeral prototype object
function Numeral(input, number) { this._input = input; this._value = number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Numeric() {}", "function clone(obj) {\n var i, p, ps;\n function ExpantaNum(input,input2) {\n var x=this;\n if (!(x instanceof ExpantaNum)) return new ExpantaNum(input,input2);\n x.constructor=ExpantaNum;\n var parsedObject=null;\n if (typeof input==\"string\"&&(input[0]==...
[ "0.67007893", "0.6554412", "0.64832586", "0.64832586", "0.64832586", "0.64432883", "0.64226717", "0.6332535", "0.6293809", "0.62504554", "0.6247352", "0.6230088", "0.6230088", "0.62279457", "0.62187207", "0.6210622", "0.61585087", "0.6156894", "0.6146817", "0.6136993", "0.612...
0.0
-1
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n // if this is the first time the home screen is loading\n // we must initialize Facebook\n if (!window.FB) {\n window.fbAsyncInit = function() {\n window.FB.init({\n appId : '280945375708713',\n cookie : true, // enable cookies to allow the s...
[ "0.58239114", "0.5636436", "0.55561024", "0.5489578", "0.54000443", "0.53866804", "0.53644276", "0.5328038", "0.53228885", "0.53161097", "0.53161097", "0.5294202", "0.52671087", "0.5217594", "0.5199815", "0.5192735", "0.5192259", "0.5156162", "0.51420206", "0.5130883", "0.512...
0.0
-1
Call this.constructor.gDSFP to support subclasses. Use the setState() updater to ensure state isn't stale in certain edge cases.
function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function componentWillMount(){// Call this.constructor.gDSFP to support sub-classes.\nvar state=this.constructor.getDerivedStateFromProps(this.props,this.state);if(state!==null&&state!==undefined){this.setState(state);}}", "function componentWillMount() {\n // Call this.constructor.gDSFP to support sub-...
[ "0.6139449", "0.5685993", "0.5578849", "0.55435675", "0.55435675", "0.55435675", "0.54348207", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", "0.53722733", ...
0.0
-1
Do some preprocess to avoid error happened when interpolating from arr0 to arr1
function fillArr(arr0, arr1, arrDim) { var arr0Len = arr0.length; var arr1Len = arr1.length; if (arr0Len !== arr1Len) { // FIXME Not work for TypedArray var isPreviousLarger = arr0Len > arr1Len; if (isPreviousLarger) { // Cut the previous arr0.length = arr1Len; } else { // Fill...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolate (arr0, arr1, p) {\n var q = 1 - p;\n return [q * arr0[0] + p * arr1[0], q * arr0[1] + p * arr1[1], q * arr0[2] + p * arr1[2]];\n }", "function prioritize(arr1, callback){}", "function doubleTrouble(arr){\n arr.length *= 2;\n for(var i = ar...
[ "0.611728", "0.5633865", "0.53377026", "0.51771027", "0.51649016", "0.51649016", "0.51378816", "0.51007056", "0.508923", "0.5087704", "0.50774944", "0.50482863", "0.5041385", "0.5031048", "0.5022834", "0.4969509", "0.4940224", "0.48838168", "0.48825815", "0.48733222", "0.4871...
0.5110432
14
performance in scenarios of large amount text.
function renderPlainText(hostEl, ctx, text, style, rect, prevEl) { 'use strict'; var needDrawBg = needDrawBackground(style); var prevStyle; var checkCache = false; var cachedByMe = ctx.__attrCachedBy === ContextCachedBy.PLAIN_TEXT; // Only take and check cache for `Text` el, but not RectText. if (prevEl !...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "analyze(text) {\n this.text = this.purify(text);\n this.index = 0;\n this.list = [];\n this.buffer = \"\";\n\n while (this.index < this.text.length) {\n this.state.transference(this.index, true);\n }\n return this.list;\n }", "_drawSourceText(text) {\n let context = this.getCont...
[ "0.6015067", "0.5988325", "0.5911306", "0.5894167", "0.58776987", "0.57967967", "0.57963806", "0.5777366", "0.5755295", "0.5726947", "0.5698994", "0.5686076", "0.5652949", "0.5641966", "0.5626645", "0.56076276", "0.55978674", "0.5589345", "0.5588015", "0.55834883", "0.5572972...
0.0
-1
var valueSplitReg = /[\s,]+/;
function createPathProxyFromString(data) { if (!data) { return new PathProxy(); } // var data = data.replace(/-/g, ' -') // .replace(/ /g, ' ') // .replace(/ /g, ',') // .replace(/,,/g, ','); // var n; // create pipes so that we can split the data // for (n = 0; n < cc.length; n++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function split( val )\n\t{\n\t\treturn val.split( /,\\s*/ );\n\t}", "function commaSplit(val) {\n return val.split(/,\\s*/);\n}", "function split(value) {\n return typeof value === 'string' ? value.split(/ *, */g) : undefined;\n}", "function splitVal(string, separator) {\n\t var val, i, l;\n\t ...
[ "0.78492373", "0.7696042", "0.69221085", "0.6802163", "0.6657593", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6586796", "0.6511391", "0.6411759", "0.6411759", ...
0.0
-1
Merge multiple paths TODO Apply transform TODO stroke dash TODO Optimize double memory cost problem
function mergePath(pathEls, opts) { var pathList = []; var len = pathEls.length; for (var i = 0; i < len; i++) { var pathEl = pathEls[i]; if (!pathEl.path) { pathEl.createPathProxy(); } if (pathEl.__dirtyPath) { pathEl.buildPath(pathEl.path, pathEl.shape, true); } pathList....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dedupePathParts(path) {\n let startPathIdxs = [];\n let curPathIdx = -1;\n let startPartPos = 0;\n let intersections = [];\n let pathParts = [];\n for (let i = 1; i < path.length; i++) {\n let lastKey = path[i - 1].x + \"__\" + path[i - 1].y;\n let ke...
[ "0.6273108", "0.59052885", "0.58947754", "0.5766077", "0.574933", "0.5727824", "0.5727817", "0.5704255", "0.5704255", "0.5682538", "0.5682538", "0.5682538", "0.5682538", "0.56654656", "0.5660568", "0.5651678", "0.5628781", "0.56250507", "0.56250507", "0.5593339", "0.55876833"...
0.61321384
9
And `getCoordinateSystems` and `getComponentByElement` will be injected in echarts.js
function ExtensionAPI(chartInstance) { zrUtil.each(echartsAPIList, function (name) { this[name] = zrUtil.bind(chartInstance[name], chartInstance); }, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_initializeComponent() {\n //Heade\n this.elements.header = document.createElement(\"div\");\n this.elements.title = document.createElement(\"span\");\n this.elements.range = document.createElement(\"span\");\n\n this.elements.header.className = \"chart-header\";\n this.el...
[ "0.55974853", "0.54726034", "0.5358293", "0.5317312", "0.5299026", "0.52872515", "0.52872515", "0.52872515", "0.52872515", "0.52872515", "0.52872515", "0.5269054", "0.5258679", "0.5217854", "0.5192633", "0.5168299", "0.5168299", "0.5168299", "0.5168299", "0.51420677", "0.5126...
0.0
-1
Originally detect dimCount by data[0]. Should we optimize it to only by sysDims and dimensions and encode. So only necessary dims will be initialized. But (1) custom series should be considered. where other dims may be visited. (2) sometimes user need to calcualte bubble size or use visualMap on other dimensions beside...
function getDimCount(source, sysDims, dimsDef, optDimCount) { // Note that the result dimCount should not small than columns count // of data, otherwise `dataDimNameMap` checking will be incorrect. var dimCount = Math.max(source.dimensionsDetectCount || 1, sysDims.length, dimsDef.length, optDimCount || 0); each...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCustomDims() {\n var dims = [];\n \n // client id\n \n var tracker = ga.getByName('t0');\n \n dims.push( {slot: 11, value: tracker.get('clientId')} );\n \n if (typeof dataLayer.user === 'object') {\n \n var loggedIn = 'not logged in';\n ...
[ "0.65010047", "0.6482728", "0.63587344", "0.62782633", "0.6267692", "0.61935574", "0.60171443", "0.58644235", "0.5714209", "0.5711893", "0.55884963", "0.55850387", "0.54324347", "0.5410598", "0.53910816", "0.5356613", "0.53496027", "0.53309214", "0.5321984", "0.529007", "0.52...
0.61193025
8
Consider big data, do not create map until needed.
function getOrCreateMap(ordinalMeta) { return ordinalMeta._map || (ordinalMeta._map = createHashMap(ordinalMeta.categories)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MapCache(){this.__data__={};}", "function MapCache(){this.__data__={};}", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t this.__data__ = {};\n\t }", "function MapCache() {\n\t t...
[ "0.6768721", "0.6768721", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6231768", "0.6185928", "0.6174837", "...
0.0
-1
|1|2|3|4|. So the displayed ticks and splitLine/splitArea should between each data item, otherwise cause misleading (e.g., split tow bars of a single data item when there are two bar series). Also consider if tickCategoryInterval > 0 and onBand, ticks and splitLine/spliteArea should layout appropriately corresponding t...
function fixOnBandTicksCoords(axis, ticksCoords, tickCategoryInterval, alignWithLabel, clamp) { var ticksLen = ticksCoords.length; if (!axis.onBand || alignWithLabel || !ticksLen) { return; } var axisExtent = axis.getExtent(); var last; if (ticksLen === 1) { ticksCoords[0].coord = axisExtent[0]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addMiddleMajorTicks(tickscount, ticksDistance, distanceFromFirstToSecond, distanceModifier, normalLayout, ticksFrequency) {\n const that = this.context;\n\n let majorTicks = '', majorLabels = '', valuePlusExponent;\n\n for (let i = 1; i < tickscount; i++) {\n let number = distanceFr...
[ "0.60392827", "0.60314906", "0.6030362", "0.59701616", "0.59503067", "0.5904751", "0.5722795", "0.57056075", "0.55909246", "0.5581331", "0.55562097", "0.5527876", "0.5527876", "0.5527876", "0.5527876", "0.5525694", "0.5525234", "0.5525234", "0.5498436", "0.54696405", "0.53311...
0.58438474
7
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function isAxisUsedInTheGrid(axisModel, gridModel, ecModel) { return axisModel.getCoordSysModel() === gridModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAxisUsedInTheGrid(axisModel,gridModel,ecModel){return ecModel.getComponent('grid',axisModel.get('gridIndex')) === gridModel;}", "function isAxisUsedInTheGrid(axisModel, gridModel, ecModel) {\n return axisModel.getCoordSysModel() === gridModel;\n}", "function isAxisUsedInTheGrid(axisModel, gridMod...
[ "0.7948871", "0.75928974", "0.74694026", "0.7452342", "0.7443889", "0.73049873", "0.73049873", "0.6089321", "0.60461277", "0.5841964", "0.582401", "0.5642828", "0.5627801", "0.551255", "0.5483444", "0.5434537", "0.54322475", "0.53323364", "0.53227866", "0.53124547", "0.530107...
0.75588936
8
Do not execute util needed.
function getLabelDefaultText(idx, opt) { return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Util() {}", "function DWRUtil() { }", "function AeUtil() {}", "function Utils(){}", "function Utils() {}", "function Utils() {}", "private public function m246() {}", "function _____SHARED_functions_____(){}", "private internal function m248() {}", "static private internal function m121(...
[ "0.6675781", "0.6511974", "0.63683903", "0.6353246", "0.633664", "0.633664", "0.61127895", "0.6072407", "0.600812", "0.5830197", "0.57776296", "0.5775812", "0.5761761", "0.57195854", "0.5696808", "0.5674436", "0.56700087", "0.56700087", "0.5631267", "0.5621573", "0.5604435", ...
0.0
-1
.dirname, .basename, and .extname methods are extracted from Node.js v8.11.1, backported and transplited with Babel, with backwardscompat fixes Copyright Joyent, Inc. and other Node contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation f...
function normalizeArray(parts, allowAboveRoot) { // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === '.') { parts.splice(i, 1); } else if (last === '..') { parts.splice(i, 1); up++; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeArray(parts,allowAboveRoot){// if the path tries to go above the root, `up` ends up > 0\nvar up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==='.'){parts.splice(i,1);}else if(last==='..'){parts.splice(i,1);up++;}else if(up){parts.splice(i,1);up--;}}// if the path is allowed to g...
[ "0.6246232", "0.62140876", "0.6013123", "0.5982529", "0.5973695", "0.5966872", "0.58964515", "0.58964515", "0.58888525", "0.5883687", "0.58758354", "0.58038723", "0.5782002", "0.5782002", "0.5782002", "0.5782002", "0.5782002", "0.5782002", "0.5778279", "0.57694095", "0.576392...
0.0
-1
Check if the given character code, or the character code at the first character, is alphabetical.
function alphabetical(character) { var code = typeof character === 'string' ? character.charCodeAt(0) : character return ( (code >= 97 && code <= 122) /* a-z */ || (code >= 65 && code <= 90) /* A-Z */ ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alphabetical(character) {\n var code = typeof character === 'string' ? character.charCodeAt(0) : character;\n return code >= 97 && code <= 122 /* a-z */ || code >= 65 && code <= 90 /* A-Z */;\n}", "function sc_isCharAlphabetic(c)\n { return sc_isCharOfClass(c.val, SC_LOWER_CLASS) ||\n\t sc_isCharO...
[ "0.8074409", "0.80584985", "0.7876338", "0.7807832", "0.7781106", "0.7738571", "0.7737814", "0.768371", "0.768371", "0.7679861", "0.76093054", "0.7583284", "0.7579192", "0.75711703", "0.75508785", "0.7491448", "0.7488431", "0.7480748", "0.74655735", "0.7437942", "0.7437942", ...
0.7922033
6
Gets indentation information for a line.
function indentation(value) { var index = 0; var indent = 0; var character = value.charAt(index); var stops = {}; var size; while (character in characters) { size = characters[character]; indent += size; if (size > 1) { indent = Math.floor(indent / size) * size; } stops[indent]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIndent (line) {\n return line.match(/^\\s*/)[0].length\n}", "getCurrentLineIndentation() {\n return this.currentLine.length - Utils.ltrim(this.currentLine, ' ').length;\n }", "function indentLevel(linea) {\n var level = 0;\n for ( i in linea ) {\n if ( linea[i] != ' ' ) { brea...
[ "0.7321178", "0.68024457", "0.673355", "0.6241265", "0.6205445", "0.6142215", "0.61237204", "0.5931858", "0.5885914", "0.58800983", "0.58800983", "0.58800983", "0.58800983", "0.58800983", "0.58320516", "0.57890755", "0.5771645", "0.57372", "0.5698956", "0.565636", "0.5610286"...
0.0
-1
TODO publish internal ReactClass displayName transform
function ReactGridLayout(props, context) { _classCallCheck(this, ReactGridLayout); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _initialiseProps.call(_this); (0, _utils.autoBindHandlers)(_this, ["onDragStart", "onDrag", "onDragStop", "onResizeStart", "onR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDisplayClassName(){\n\t\treturn this._display_class_name;\n\t}", "get className() { return this._props.className || \"\"; }", "setDisplayClassName(value){\n\t\tthis._display_class_name = value;\n\t}", "render() {\n const { label } = this.props;\n\n const titleClasses = classNames({\n 'name': tr...
[ "0.6850576", "0.6731187", "0.649638", "0.64357996", "0.63679445", "0.63265", "0.63127345", "0.630359", "0.6296376", "0.6286751", "0.62428015", "0.6225114", "0.62110835", "0.6204786", "0.6204786", "0.6204786", "0.6204786", "0.6204786", "0.6204786", "0.6204786", "0.6204786", ...
0.0
-1
The flush function processes all tasks that have been scheduled with `rawAsap` unless and until one of those tasks throws an exception. If a task throws an exception, `flush` ensures that its state will remain consistent and will resume where it left off when called again. However, `flush` does not make any arrangement...
function flush() { while (index < queue.length) { var currentIndex = index; // Advance the index before calling the task. This ensures that we will // begin flushing on the next task the task throws an error. index = index + 1; queue[currentIndex].call(); // Prevent l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "flush() {\n while (this.index < this.queue.length) {\n var currentIndex = this.index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n this.index = this.index + 1;\n ...
[ "0.7485601", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.7459772", "0.745246", "0.745246", "0.7428259", "0.7207523", "0.6686876", "0.6441336", "0.64116555", "0.64116555", "...
0.7410741
62
To request a high priority event, we induce a mutation observer by toggling the text of a text node between "1" and "1".
function makeRequestCallFromMutationObserver(callback) { var toggle = 1; var observer = new BrowserMutationObserver(callback); var node = document.createTextNode(""); observer.observe(node, {characterData: true}); return function requestCall() { toggle = -toggle; node.data = toggle; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyText() {\n const t2 = document.getElementById(\"t5\");\n if (t2.firstChild.nodeValue == \"5\") {\n t2.firstChild.nodeValue = \"mff\";\n } else {\n t2.firstChild.nodeValue = \"aik\";\n }\n}", "function titleChangeOne(){\n pTag.textContent = \"1\"\n}", "makeRequestCallFromMutationObse...
[ "0.5829935", "0.5782394", "0.56806177", "0.5668707", "0.5582027", "0.5576605", "0.5576605", "0.5576605", "0.5576605", "0.5576605", "0.5576605", "0.5576605", "0.5576605", "0.5576605", "0.5576605", "0.5576605", "0.5575233", "0.5553972", "0.55535644", "0.5516341", "0.5490151", ...
0.5560804
61
Build a destructive iterator for the value list
function iteratorFor(items) { var iterator = { next: function() { var value = items.shift() return {done: value === undefined, value: value} } } if (support.iterable) { iterator[Symbol.iterator] = function() { return iterator } } return iterator }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createIteratorFromValue(value){\n return (function(){\n let used = false;\n\n return {\n next: function(){\n try {\n return used ? {done: true} : {value: value, done: false};\n ...
[ "0.6567051", "0.61971587", "0.6129268", "0.60959846", "0.6081213", "0.6081213", "0.60518825", "0.60518825", "0.60518825", "0.60518825", "0.60518825", "0.60395825", "0.6019784", "0.6000144", "0.593555", "0.59003186", "0.5864537", "0.58550805", "0.57782644", "0.57182074", "0.56...
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(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectWithoutPropertiesLoos...
{ "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.57956916", "0.57956916", "0.57820904", "0.57820904", "0.57820904", "0.57818544", "0.57818544", "0.57818544", "0.57818544", "0.57674724", "0.57674724", "0.5764291", "0.57614416", "0.5760722", "0.5760722", "0.5760722", "0.5760722", "0.5760722", "0.5760722", "0.5760722", "0.5...
0.0
-1
About 1.5x faster than the twoarg version of Arraysplice()
function spliceOne(list, index) { for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) { list[i] = list[k]; } list.pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fastSplice(arr, startIdx, removeCount) {\n let i, length = arr.length;\n if (startIdx >= length || removeCount === 0) {\n return;\n }\n removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount);\n let len = length - removeCount;\n ...
[ "0.744647", "0.7080408", "0.7065331", "0.7043188", "0.6856226", "0.67497593", "0.67107934", "0.6686752", "0.6685283", "0.66846037", "0.6680079", "0.6664003", "0.6650399", "0.6632233", "0.6606584", "0.6587291", "0.6575215", "0.6563328", "0.652124", "0.65082574", "0.6500428", ...
0.0
-1
This implementation is based heavily on node's url.parse
function resolvePathname(to) { var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var toParts = to && to.split('/') || []; var fromParts = from && from.split('/') || []; var isToAbs = to && isAbsolute(to); var isFromAbs = from && isAbsolute(from); var mustEndAbs = isToAbs |...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseUrl(url) {\n\t const firstChar = url.charAt(0);\n\t if (firstChar === '~') {\n\t const secondChar = url.charAt(1);\n\t url = url.slice(secondChar === '/' ? 2 : 1);\n\t }\n\t return parseUriParts(url);\n\t}", "function parseURL(request, response){\n \tvar parseQuery = true...
[ "0.71809614", "0.7169062", "0.7079193", "0.7053831", "0.69422793", "0.6807314", "0.67121065", "0.6706578", "0.6643755", "0.66429675", "0.6620273", "0.6606428", "0.65816253", "0.6572329", "0.6572066", "0.6572066", "0.6572066", "0.6572066", "0.6572066", "0.6553755", "0.65512776...
0.0
-1
Extracts a styles object with only props that contain function values.
function getDynamicStyles(styles) { var to = null; for (var key in styles) { var value = styles[key]; var type = typeof value === 'undefined' ? 'undefined' : _typeof(value); if (type === 'function') { if (!to) to = {}; to[key] = value; } else if (type === 'object' && value !== null && ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractStyleParts() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var classes = [];\n var objects = [];\n var stylesheet = _Stylesheet__WEBPACK_IMPORTED_MODULE_0__.Stylesheet.getInstance();\n function _processArgs(argsLis...
[ "0.62761724", "0.62761724", "0.62759346", "0.6259358", "0.6161896", "0.6100022", "0.60847485", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873", "0.6068873",...
0.6004265
66
Get a style property value.
function getPropertyValue(cssRule, prop) { try { return cssRule.style.getPropertyValue(prop); } catch (err) { // IE may throw if property is unknown. return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getStyle(el, property) {\n if (window.getComputedStyle) {\n return document.defaultView.getComputedStyle(el, null)[property];\n }\n if (el.currentStyle) {\n return el.currentStyle[property];\n ...
[ "0.74297154", "0.74020785", "0.7399583", "0.7328178", "0.7311819", "0.7249292", "0.72404826", "0.72404826", "0.7203527", "0.71599", "0.7143572", "0.7133223", "0.70882905", "0.70766973", "0.7049624", "0.70360684", "0.70360684", "0.7029471", "0.7014411", "0.69898814", "0.698285...
0.0
-1
Set a style property.
function setProperty(cssRule, prop, value) { try { var cssValue = value; if (Array.isArray(value)) { cssValue = (0, _toCssValue2['default'])(value, true); if (value[value.length - 1] === '!important') { cssRule.style.setProperty(prop, cssValue, 'important'); return true; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setStyle(property, value) {\n if (!this._props.style) this._props.style = {};\n this._props.style[property] = value;\n }", "function setStyle(element, property, value) {\n element.style[property] = value;\n}", "function setStyle(n, key, value) {\n n.style[key] = value;\n \n }", "function set...
[ "0.798955", "0.7963325", "0.77943856", "0.7488918", "0.73106766", "0.73015743", "0.7267794", "0.7267794", "0.7191311", "0.71117854", "0.71055925", "0.701523", "0.69587797", "0.69548684", "0.69548684", "0.69548684", "0.6919497", "0.69163847", "0.69163847", "0.6902449", "0.6784...
0.0
-1
Remove a style property.
function removeProperty(cssRule, prop) { try { cssRule.style.removeProperty(prop); } catch (err) { (0, _warning2['default'])(false, '[JSS] DOMException "%s" was thrown. Tried to remove property "%s".', err.message, prop); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeProperty(key) {\n var root = document.documentElement;\n\n root.style.removeProperty(key);\n}", "function removeProperty(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop);\n } else {\n cssRule...
[ "0.7552239", "0.75076085", "0.7401514", "0.7401514", "0.72485965", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", "0.7171906", ...
0.6827221
52
Find attached sheet with an index higher than the passed one.
function findHigherSheet(registry, options) { for (var i = 0; i < registry.length; i++) { var sheet = registry[i]; if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) { return sheet; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findHigherSheet(registry, options) {\n for (var i = 0; i < registry.length; i++) {\n var sheet = registry[i];\n if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n return null;\n }...
[ "0.7568327", "0.7539894", "0.7499265", "0.7499265", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.747529", "0.7...
0.74848413
30
Find attached sheet with the highest index.
function findHighestSheet(registry, options) { for (var i = registry.length - 1; i >= 0; i--) { var sheet = registry[i]; if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) { return sheet; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findHighestSheet(registry, options) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var sheet = registry[i];\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n return null;\n }", "function findHighestSheet(r...
[ "0.7736575", "0.7705434", "0.76975965", "0.76975965", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", "0.76529163", ...
0.76706815
30
Find a comment with "jss" inside.
function findCommentNode(text) { var head = getHead(); for (var i = 0; i < head.childNodes.length; i++) { var node = head.childNodes[i]; if (node.nodeType === 8 && node.nodeValue.trim() === text) { return node; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IsInComment (ss, nn)\r\n { let ii=-1, bb=0;\r\n do { ii=ss.indexOf(\"{\",ii+1); bb++; }\r\n while ((ii>=0)&&(ii<nn));\r\n ii=-1;\r\n do { ii=ss.indexOf(\"}\",ii+1); bb--; }\r\n while ((ii>=0)&&(ii<nn));\r\n return(bb);\r\n }", "function findCommentNode(text) {\n var head = ...
[ "0.6377709", "0.62308645", "0.61687344", "0.61220884", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", "0.6100771", ...
0.6173891
31
Find a node before which we can insert the sheet.
function findPrevNode(options) { var registry = _sheets2['default'].registry; if (registry.length > 0) { // Try to insert before the next higher sheet. var sheet = findHigherSheet(registry, options); if (sheet) return sheet.renderer.element; // Otherwise insert after the last attached. sheet ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPrevNode(options) {\n var registry = sheets.registry;\n\n if (registry.length > 0) {\n // Try to insert before the next higher sheet.\n var sheet = findHigherSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.pa...
[ "0.742122", "0.74023736", "0.7398438", "0.7398438", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.736221", "0.73238313", "0...
0.69660425
57
Insert style element into the DOM.
function insertStyle(style, options) { var insertionPoint = options.insertionPoint; var prevNode = findPrevNode(options); if (prevNode) { var parentNode = prevNode.parentNode; if (parentNode) parentNode.insertBefore(style, prevNode); return; } // Works with iframes and any node types. if (in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertStyle(style) {\n var a=document.createElement(\"style\");\n a.innerHTML=style;\n document.head.appendChild(a);\n}", "function insertStyle(style, options) {\n var insertionPoint = options.insertionPoint;\n var nextNode = findPrevNode(options);\n\n if (nextNode !== false && nextNode.pare...
[ "0.7943686", "0.7706128", "0.7683789", "0.7653549", "0.7653549", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "0.76448977", "...
0.7471658
65
Get a function to be used for $ref replacement.
function getReplaceRef(container) { return function (match, key) { var rule = container.getRule(key); if (rule) return rule.selector; (0, _warning2.default)(false, '[JSS] Could not find the referenced rule %s in %s.', key, container.options.meta || container); return key; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fnref(name){\n return mkdat(\"fnref\", name);\n }", "function createRef() {\n var func = function setRef(node) {\n func.current = node;\n };\n return func;\n}", "function composeRef() {\n for (\n var _len = arguments.length, refs = new Array(_len), _key = 0;\n ...
[ "0.6647678", "0.64526016", "0.61173856", "0.6064114", "0.6064114", "0.6062332", "0.59781957", "0.5977644", "0.59640795", "0.5950898", "0.5860265", "0.58586544", "0.58553106", "0.58344084", "0.58344084", "0.583199", "0.5819225", "0.5819225", "0.5757566", "0.57340044", "0.56950...
0.5898635
39
Clones the object and adds a camel cased property version.
function addCamelCasedVersion(obj) { var regExp = /(-[a-z])/g; var replace = function replace(str) { return str[1].toUpperCase(); }; var newObj = {}; for (var key in obj) { newObj[key] = obj[key]; newObj[key.replace(regExp, replace)] = obj[key]; } return newObj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n var newObj = {};\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n return newO...
[ "0.70179635", "0.69537616", "0.69537616", "0.6897523", "0.68786496", "0.68298036", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115", "0.6755115"...
0.68762004
35
Add unit to numeric values.
function defaultUnit() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var camelCasedOptions = addCamelCasedVersion(options); function onProcessStyle(style, rule) { if (rule.type !== 'style') return style; for (var prop in style) { style[prop] = iterate(pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unit(i, units) {\n\t if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n\t return i;\n\t } else {\n\t return \"\" + i + units;\n\t }\n\t }", "function unit(i, units) {\n if ((typeof i === \"string\") && (!i.match(/^[\\-0-9\\.]+$/))) {\n return i;\n } else {\...
[ "0.6619121", "0.6577961", "0.6577961", "0.65765446", "0.65598017", "0.65598017", "0.61913127", "0.60770285", "0.6070005", "0.6069515", "0.6069515", "0.6069515", "0.6058283", "0.6048955", "0.60442847", "0.6030799", "0.6025983", "0.5933324", "0.59169674", "0.5811792", "0.579957...
0.0
-1
Sort props by length.
function jssPropsSort() { function sort(prop0, prop1) { return prop0.length - prop1.length; } function onProcessStyle(style, rule) { if (rule.type !== 'style') return style; var newStyle = {}; var props = Object.keys(style).sort(sort); for (var prop in props) { newStyle[props[prop]] = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByLength(array) {\n\treturn array.sort(function (a, b) {\n\t\treturn a.length - b.length || // sort by length, if equal then\n\t\t\ta.localeCompare(b); // sort by dictionary order\n\t});\n}", "function sortByLength(strs) {\n let sortedArray = \n strs.sort((sortedArray, valueLength) => {...
[ "0.64766407", "0.63836104", "0.62847036", "0.6231552", "0.6111517", "0.6102041", "0.6031589", "0.59946394", "0.5980601", "0.5941717", "0.5935182", "0.5909202", "0.59040016", "0.5883093", "0.5868574", "0.5841102", "0.5841102", "0.5841102", "0.5841102", "0.5841102", "0.5841102"...
0.58517116
45
We are not using the React state in order to avoid unnecessary rerender.
function MuiThemeProviderOld(props, context) { var _this; (0, _classCallCheck2.default)(this, MuiThemeProviderOld); _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(MuiThemeProviderOld).call(this)); // Get the outer theme from the context, can be null _this.broadcas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillMount(){\n this.setState({ React: false })\n}", "forceUpdateHandler(){\n this.setState({ reRender: true})\n }", "componentWillUpdate() {\n if (this.state.loading) {\n this.setState({loading: false});\n }\n }", "componentWillUnmount() {\n // this.setState({\n...
[ "0.69557714", "0.66014534", "0.63659847", "0.63452876", "0.6269845", "0.62435424", "0.6234533", "0.6224398", "0.62141883", "0.62103724", "0.6194993", "0.6194271", "0.6184434", "0.618085", "0.6175016", "0.6175016", "0.6175016", "0.6175016", "0.6175016", "0.6175016", "0.6175016...
0.0
-1
subscribe to changes and return the subscriptionId
function subscribe (listener) { if (typeof listener !== 'function') { throw new Error('listener must be a function.') } var currentId = id; listeners[currentId] = listener; id += 1; return currentId }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "subscribe() {\n this.subscriptionID = this.client.subscribe(this.channel, this.onNewData)\n this.currencyCollection.subscribe(this.render)\n this.currencyCollection.subscribe(this.drawInitialSparkLine)\n this.currencyCollection.subscribeToSparkLineEvent(this.drawSparkLine)\n }", "subscribe() {}", ...
[ "0.66414976", "0.6636783", "0.6488186", "0.6438682", "0.6429223", "0.6314081", "0.6314081", "0.62983894", "0.62851685", "0.62526435", "0.6248892", "0.62311745", "0.62244433", "0.61944747", "0.61919916", "0.6164755", "0.615399", "0.6128188", "0.61213034", "0.60926414", "0.6091...
0.62886333
32
remove subscription by removing the listener function
function unsubscribe (id) { listeners[id] = undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unsubscribe(listener){\n let index = this.listeners.indexOf(listener);\n if( index >= 0 )\n this.listeners.splice(index, 1);\n }", "function unsubscribe(listener) {\r\n var index = subscribers.indexOf(listener);\r\n if (index > -1) {\r\n subscr...
[ "0.80233115", "0.79838675", "0.77063024", "0.7670059", "0.7670059", "0.7670059", "0.76247954", "0.7593567", "0.7579748", "0.75748676", "0.7527585", "0.7527585", "0.7519006", "0.7416231", "0.7416231", "0.7404862", "0.7404862", "0.7403127", "0.73808044", "0.73549074", "0.733554...
0.7503803
36
3kb. Support for the jssexpand plugin.
function arrayMerge(destination, source) { return source; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jsmin(input,level,callback,sleep){var a=b='',theLookahead=EOF=-1;var LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';var DIGITS='0123456789',ALNUM=LETTERS+DIGITS+'_$\\\\';var cb=callback;var slp=sleep?sleep:50;var kbStep=10;function isAlphanum(c){return c!=EOF&&(ALNUM.indexOf(c)>-1||c.charC...
[ "0.5693042", "0.56452864", "0.5603044", "0.5507222", "0.5434183", "0.54249126", "0.54203904", "0.53993446", "0.5387056", "0.5336157", "0.5266502", "0.52206725", "0.52186984", "0.5195725", "0.5195725", "0.5195725", "0.51949745", "0.5190634", "0.5189627", "0.51729983", "0.51581...
0.0
-1
Try/catch helper to minimize deoptimizations. Returns a completion record like context.tryEntries[i].completion. This interface could have been (and was previously) designed to take a closure to be invoked without arguments, but in all the cases we care about we already have an existing method we want to call, so there...
function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tryCatch(fn, obj, arg) { // 59\n try { // 60\n return { type: \"normal\", arg: fn.call(obj, arg) }; ...
[ "0.5071776", "0.50614226", "0.4850592", "0.47933117", "0.47933117", "0.47933117", "0.47933117", "0.47933117", "0.47843823", "0.47843823", "0.47061986", "0.4688475", "0.4669107", "0.4657011", "0.46567062", "0.46567062", "0.46567062", "0.4637437", "0.46204373", "0.4614591", "0....
0.0
-1
Dummy constructor functions that we use as the .constructor and .constructor.prototype properties for functions that return Generator objects. For full spec compliance, you may wish to configure your minifier not to mangle the names of these two functions.
function Generator() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tempCtor() {}", "function temporaryConstructor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function TempCtor() {}", "function HelperConstructor() {}", "function DummyClass() {\r\n // ...
[ "0.72172284", "0.70239335", "0.69515", "0.69515", "0.69515", "0.69515", "0.69515", "0.69515", "0.6760172", "0.6601051", "0.6570967", "0.6570967", "0.6570967", "0.64853686", "0.6443493", "0.63998854", "0.6393905", "0.6378928", "0.6378928", "0.6337652", "0.6275769", "0.627576...
0.0
-1
Helper for defining the .next, .throw, and .return methods of the Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function(method) { prototype[method] = function(arg) { return this._invoke(method, arg); }; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defineIteratorMethods(prototype){[\"next\",\"throw\",\"return\"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg);};});}", "function defineIteratorMethods(prototype){[\"next\",\"throw\",\"return\"].forEach(function(method){prototype[method]=function(arg){return th...
[ "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.74821436", "0.71796995", "0.6995674", "0.6995674", "0.6973852", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", "0.69677955", ...
0.0
-1
Throws a `Cancel` if cancellation has been requested.
function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async cancel() {\n throw new Error(this.cancelMessage);\n }", "cancel() {\n throw new Error(\"Not implemented.\")\n }", "isCanceled(cancelled) {\n if (cancelled) {\n throw new Error(\"Cancelled request\");\n }\n }", "function throwIfCancellationRequested(config) {\n ...
[ "0.79471016", "0.7735734", "0.75341254", "0.74463314", "0.7423634", "0.73854464", "0.73854464", "0.73854464", "0.73854464", "0.73854464", "0.7205521", "0.71672016", "0.71622115", "0.7161273", "0.71419287", "0.71383584", "0.71383584", "0.71383584", "0.71383584", "0.71383584", ...
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.73577744", "0.73577744", "0.73577744", "0.73577744", "0.73179376", "0.72645366", "0.72645366", "0.7262961", "0.7256912", "0.7256912", "0.7236398", "0.7236398", "0.7236398", "0.7236398", "0.7236398", "0.7236398", "0.7236398", "0.7236398", "0.7236398", "0.7236398", "0.723455...
0.0
-1
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.63582766", "0.63304627", "0.63304627", "0.63304627", "0.6274707", "0.6228773", "0.6228773", "0.6228773", "0.6228773", "0.6228773", "0.6228773", "0.6228773", "0.62184376", "0.62184376", "0.62184376", "0.62184376", "0.62184376", "0.62184376", "0.62184376", "0.62184376", "0.6...
0.0
-1
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.75903755", "0.70695037", "0.6735827", "0.6653031", "0.653072", "0.62686956", "0.62589216", "0.62589216", "0.62589216", "0.6171725", "0.6171725", "0.6171725", "0.61668706", "0.61542076", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0....
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
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.7351907", "0.67814267", "0.64990556", "0.6471846", "0.6265842", "0.6195419", "0.6195419", "0.6195419", "0.6195419", "0.59573215", "0.5942058", "0.5942058", "0.59362245", "0.59197164", "0.58265406", "0.5790372", "0.57813364", "0.57693726", "0.57346", "0.5724901", "0.5708006...
0.0
-1
Translate the node so he can't be seen on the screen. Later, we gonna translate back the node to his original location with `translate3d(0, 0, 0)`.`
function getTranslateValue(props, node) { var direction = props.direction; var rect = node.getBoundingClientRect(); var transform; if (node.fakeTransform) { transform = node.fakeTransform; } else { var computedStyle = (0, _ownerWindow.default)(node).getComputedStyle(node); transform = computedSty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function translateNode() {\n var shift = [\n '-webkit-transform: translate3d(' + move.shiftX + 'px,' + move.shiftY + 'px,0)'\n ].join(';');\n\n $letter[0].setAttribute('style', shift);\n }", "function translateUp() {\n console.log('translate up triggered');\n var m = new ...
[ "0.72410685", "0.7009398", "0.70035565", "0.68942595", "0.6629465", "0.6625556", "0.656836", "0.65602887", "0.6532624", "0.64708436", "0.64619964", "0.646194", "0.6441571", "0.6324719", "0.62232083", "0.61789477", "0.61789477", "0.61638653", "0.6140673", "0.6074221", "0.60709...
0.0
-1
Based on the jquery plugin
function detectScrollType() { if (cachedType) { return cachedType; } if (!inDOM || !window.document.body) { return 'indeterminate'; } var dummy = window.document.createElement('div'); dummy.appendChild(document.createTextNode('ABCD')); dummy.dir = 'rtl'; dummy.s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function letsJQuery() {\r\n\tcreateOptionsMenu();\r\n\tpressthatButton();\r\n }", "function letsJQuery() {\r\n if (typeof $ == 'function') {\r\n // Your Script Code Here\r\n $('ul.ghnavsub li a').each( function() {\r\n $(this).attr('href', $(this).attr('href') +...
[ "0.5739969", "0.54825324", "0.5414143", "0.54043096", "0.53570336", "0.533439", "0.5311655", "0.524411", "0.5233962", "0.5224589", "0.51932734", "0.51886165", "0.5180954", "0.5164674", "0.51628804", "0.51546305", "0.51441187", "0.5134989", "0.5106428", "0.50865716", "0.506587...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 // Added the nonzero y check to make Flow happy, but it is redundant return x !== 0 || y !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function i(e){return!0===\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\nfunction(e){return null!=e&&\"object\"==typeof e&&!1===Array.isArray(e)}(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", ...
[ "0.7044135", "0.6979357", "0.68574303", "0.6821805", "0.68029666", "0.67803156", "0.6729492", "0.67206", "0.6709456", "0.66839457", "0.6676559", "0.6676559", "0.6676559", "0.66488636", "0.6640003", "0.6640003", "0.6640003", "0.6640003", "0.6625777", "0.6623136", "0.6623136", ...
0.0
-1
Performs equality by iterating through keys on an object and returning false when any key has values which are not strictly equal between the arguments. Returns true when the values of all keys are strictly equal.
function shallowEqual(objA, objB) { if (is(objA, objB)) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return fa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equalForKeys(a, b, keys) {\n if (!angular.isArray(keys) && angular.isObject(keys)) {\n keys = protoKeys(keys, [\"$$keys\", \"$$values\", \"$$equals\", \"$$validates\", \"$$new\", \"$$parent\"]);\n }\n if (!keys) {\n keys = [];\n for (var n in a) keys.push(n)...
[ "0.6574509", "0.6574509", "0.64681697", "0.6455496", "0.64342684", "0.6335082", "0.6295761", "0.62716174", "0.62408465", "0.62238336", "0.6213946", "0.61829424", "0.61578864", "0.61297685", "0.6126962", "0.6072984", "0.60342914", "0.6013455", "0.60039705", "0.59775335", "0.59...
0.0
-1
Updates the position of the popper, computing the new offsets and applying the new style. Prefer `scheduleUpdate` over `update` because of performance reasons.
function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n\t // if popper is destroyed, don't perform any further update\n\t if (this.state.isDestroyed) {\n\t return;\n\t }\n\t\n\t var data = {\n\t instance: this,\n\t styles: {},\n\t arrowStyles: {},\n\t attributes: {},\n\t flipped: false,\n\t offsets: {}\n\t };\n\t\n\t // ...
[ "0.8122915", "0.80954975", "0.80918527", "0.80918527", "0.80918527", "0.80918527", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698", "0.8073698"...
0.0
-1
Setup needed event listeners used to update the popper position
function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(refe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function g(e){if(Q.popperInstance?(y()||Q.popperInstance.scheduleUpdate(),Q.props.livePlacement&&!y()&&Q.popperInstance.enableEventListeners()):(Q.popperInstance=v(),Q.props.livePlacement||Q.popperInstance.disableEventListeners())\n/**\n * If the instance previously had followCursor behavior, it will be\n ...
[ "0.6769961", "0.64175797", "0.640298", "0.62235487", "0.6183138", "0.6181778", "0.61700886", "0.6156643", "0.6137371", "0.61044204", "0.6096479", "0.6080637", "0.6066954", "0.6064188", "0.60330737", "0.60322464", "0.602896", "0.6024871", "0.6023273", "0.6015612", "0.6015612",...
0.0
-1
It will add resize/scroll events and start recalculating position of the popper element when they are triggered.
function enableEventListeners() { if (!this.state.eventsEnabled) { this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "adoptPositionOnResize() {\n if (this.adoptOnResize) {\n\n /**\n * Get app event manager\n * @type {ApplicationEventManager|{subscribe, eventList}}\n */\n const appEventManager = this.view.controller.root().eventManager;\n\n appEventManager.subscribe({\n event: {name: appE...
[ "0.6574355", "0.6568465", "0.65395826", "0.64589787", "0.64420676", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", "0.64285433", ...
0.0
-1
Remove event listeners used to update the popper position
function removeEventListeners(reference, state) { // Remove resize event listener on window getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { target.removeEventListener('scroll', state.upd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEvents () {\n this.container.classList.remove(\"tooltiped\");\n\n this.container.removeEventListener(\"mouseenter\", this._mouseOver);\n this.container.removeEventListener(\"mousemove\", this._mouseMove);\n this.container.removeEventListener(\"mouseleave\", this._mouseOut);\n ...
[ "0.6902162", "0.6785765", "0.6785765", "0.6785765", "0.6770545", "0.6743059", "0.6592434", "0.6507296", "0.6457278", "0.6452451", "0.6450113", "0.64127916", "0.63347775", "0.629248", "0.62742007", "0.62729037", "0.6259061", "0.62421805", "0.6237802", "0.62315637", "0.62195307...
0.0
-1
It will remove resize/scroll events and won't recalculate popper position when they are triggered. It also won't trigger `onUpdate` callback anymore, unless you call `update` method manually.
function disableEventListeners() { if (this.state.eventsEnabled) { cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(){ // if popper is destroyed, don't perform any further update\nif(this.state.isDestroyed){return;}var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}}; // compute reference element offsets\ndata.offsets.reference = getReferenceOffsets(this.state,this.popper,this...
[ "0.74887305", "0.7337264", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", "0.7306295", ...
0.0
-1
Responsively hides children based on the selected implementation.
function Hidden(props) { var implementation = props.implementation, other = (0, _objectWithoutProperties2.default)(props, ["implementation"]); if (implementation === 'js') { return _react.default.createElement(_HiddenJs.default, other); } return _react.default.createElement(_HiddenCss.default, other...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hide_children() { \n for (var key of this.keys) {\n try { this.elements[key].hide(); }\n catch (e) {}\n }\n }", "hide() {\n for (var dependent of this.get_dependents()) {\n try { dependent.hide(); }\n catch (e) {}\n }\n }", "onBefore...
[ "0.6662816", "0.65854114", "0.6387713", "0.6311994", "0.6193124", "0.61872214", "0.618235", "0.61372846", "0.60836935", "0.5994085", "0.5950488", "0.5940459", "0.59025013", "0.58841044", "0.5882401", "0.5878085", "0.5862444", "0.58587444", "0.5853939", "0.58372295", "0.582114...
0.53755254
99
Exported for test purposes.
function reset() { nodeThatClaimedTheSwipe = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "static transient final private internal function m43() {}", "static ...
[ "0.709873", "0.6826393", "0.6734548", "0.65948", "0.6539365", "0.64787847", "0.6432612", "0.6423974", "0.6405733", "0.6352501", "0.6186126", "0.61713326", "0.6169758", "0.6167037", "0.61595154", "0.6111748", "0.60788107", "0.60628295", "0.59556884", "0.5897385", "0.58781725",...
0.0
-1
TODO Draggable for group FIXME Draggable on element which has parent rotation or scale
function Draggable() { this.on('mousedown', this._dragStart, this); this.on('mousemove', this._drag, this); this.on('mouseup', this._dragEnd, this); this.on('globalout', this._dragEnd, this); // this._dropTarget = null; // this._draggingTarget = null; // this._x = 0; // this._y = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDragElements(obj) {\n\n var move = function (dx, dy) {\n\n var paperScaleX = this.paper.transform().localMatrix.a;\n var paperScaleY = this.paper.transform().localMatrix.d;\n\n this.attr({\n transform: this.data('origTransform') + (this.data('origTransform') ? \"T\" :...
[ "0.61102396", "0.60807246", "0.5972379", "0.58171", "0.58006895", "0.57378423", "0.5733399", "0.57289654", "0.5723652", "0.56866825", "0.56772196", "0.5622204", "0.560267", "0.55717206", "0.5563128", "0.5555958", "0.5543954", "0.552768", "0.55146784", "0.54873514", "0.5482532...
0.0
-1
Use timsort because in most case elements are partially sorted
function shapeCompareFunc(a, b) { if (a.zlevel === b.zlevel) { if (a.z === b.z) { // if (a.z2 === b.z2) { // // FIXME Slow has renderidx compare // // http://stackoverflow.com/questions/20883421/sorting-in-javascript-should-every-compare-function-have-a-return-0-statement // //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timSort(){\n console.log(\"WORK IN PROGRESS\");\n let run = 32;\n\n for(let i = 0; i < values.length; i += run) {\n insertionSort(i, Math.min((i+31), (values.length-1)));\n }\n\n for(let size = run; size < values.length; size = 2 * size) {\n for(let left = 0; left < values.len...
[ "0.732599", "0.68316054", "0.66567266", "0.66413707", "0.6584359", "0.6582991", "0.6537814", "0.6420741", "0.6419311", "0.63901913", "0.6379468", "0.6361535", "0.63173974", "0.6280678", "0.6278599", "0.62157226", "0.6212711", "0.617773", "0.6152679", "0.6149934", "0.614975", ...
0.0
-1
Displayable for incremental rendering. It will be rendered in a separate layer IncrementalDisplay have two main methods. `clearDisplayables` and `addDisplayables` addDisplayables will render the added displayables incremetally. It use a not clearFlag to tell the painter don't clear the layer if it's the first element. ...
function IncrementalDisplayble(opts) { Displayble.call(this, opts); this._displayables = []; this._temporaryDisplayables = []; this._cursor = 0; this.notClear = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Displayable(opts){opts = opts || {};Element.call(this,opts); // Extend properties\n for(var name in opts) {if(opts.hasOwnProperty(name) && name !== 'style'){this[name] = opts[name];}} /**\n \t * @type {module:zrender/graphic/Style}\n \t */this.style = new Style(opts.style);this._rect = ...
[ "0.6213168", "0.5756399", "0.5756399", "0.56918347", "0.56884956", "0.5577846", "0.5547541", "0.5346625", "0.53179514", "0.5314656", "0.5273291", "0.5256486", "0.5206572", "0.51939934", "0.51723945", "0.51640016", "0.51606536", "0.51556456", "0.514929", "0.513892", "0.5118991...
0.6358434
2
Consider case: `chart.setOption(opt1);` Then user do some interaction like dataZoom, dataView changing. `chart.setOption(opt2);` Then user press 'reset button' in toolbox. After doing that all of the interaction effects should be reset, the chart should be the same as the result of invoke `chart.setOption(opt1); chart....
function mergeOption(oldOption, newOption) { newOption = newOption || {}; each(newOption, function (newCptOpt, mainType) { if (newCptOpt == null) { return; } var oldCptOpt = oldOption[mainType]; if (!ComponentModel.hasClass(mainType)) { oldOption[mainType] = merge(oldCptOpt, newCptOpt,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mergeOptions (options, notMerge, lazyUpdate) {\n this.delegateMethod('setOption', options, notMerge, lazyUpdate)\n }", "function disableTransformOptionMerge(datasetModel) {\n\t var transformOption = datasetModel.option.transform;\n\t transformOption && setAsPrimitive(datasetModel.option.transfo...
[ "0.6303412", "0.5848325", "0.57568246", "0.5715067", "0.56939334", "0.56775606", "0.56565017", "0.5627229", "0.5626283", "0.5525146", "0.54815155", "0.54549444", "0.544667", "0.54168737", "0.5406247", "0.5353499", "0.53463477", "0.5309133", "0.52979535", "0.5291714", "0.52712...
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function get(opt, path) { path = path.split(','); var obj = opt; for (var i = 0; i < path.length; i++) { obj = obj && obj[path[i]]; if (obj == null) { break; } } return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "private public function m246() {}", "private internal function m248() {}", "get() {}", "constructor() {\n throw new Error('Not implemented');\n }", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "constructor() {\n\t}", "constructor() {\n\t}", "n...
[ "0.5306975", "0.5000489", "0.49478292", "0.49032435", "0.48796922", "0.4813589", "0.47755355", "0.47755355", "0.47531366", "0.47512633", "0.47255257", "0.47252375", "0.4716664", "0.4704309", "0.4702985", "0.46977335", "0.4639922", "0.45913684", "0.45748463", "0.45701677", "0....
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file e...
function _default(ecModel) { var stackInfoMap = createHashMap(); ecModel.eachSeries(function (seriesModel) { var stack = seriesModel.get('stack'); // Compatibal: when `stack` is set as '', do not stack. if (stack) { var stackInfoList = stackInfoMap.get(stack) || stackInfoMap.set(stack, []); var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "preIngestData() {}", "function computeSeries(buffer, sampletype, label, currentTimestamp) {\n return {\n uncompressSamples: [\n {\n data_relative_timestamp: currentTimestamp,\n data: {\n value: getMeasure(buffer, sampletype),\n label: label\n }\n }\n ],\n ...
[ "0.5410034", "0.5304022", "0.5245771", "0.50559783", "0.49194318", "0.48766923", "0.48601583", "0.4846069", "0.4829413", "0.4761499", "0.47281638", "0.47208792", "0.47143358", "0.46898055", "0.46832228", "0.46718368", "0.46295142", "0.46060568", "0.45894733", "0.45880577", "0...
0.0
-1