Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Get the value of a mapped parameter for a point.
function getMappingParameterValue(context, propMetrics, useSeriesExtremes, defaultMapping, mappingOptions, contextValueProp) { if (typeof mappingOptions === 'number') { return mappingOptions; } if (typeof mappingOptions === 'function') { return mapping...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get point() {}", "get(param) {\n this.init();\n const res = this.map.get(param);\n return !!res ? res[0] : null;\n }", "get(param) {\n this.init();\n const res = this.map.get(param);\n return !!res ? res[0] : null;\n }", "get(param) {\n this.init();\n const res...
[ "0.662713", "0.6298166", "0.6247772", "0.6247772", "0.6247772", "0.6247772", "0.6247772", "0.6194154", "0.6042607", "0.5810786", "0.5805467", "0.5803254", "0.5759473", "0.56806755", "0.5542757", "0.55276066", "0.55164814", "0.548154", "0.546422", "0.54394823", "0.5411411", ...
0.5685517
13
Get mapping parameter value with defined fallback and defaults.
function getParamValWithDefault(context, propMetrics, useSeriesExtremes, mappingParamOptions, fallback, defaults, contextValueProp) { return pick(getMappingParameterValue(context, propMetrics, useSeriesExtremes, extend({ min: 0, max: 1, mapTo: 'y', mapFunction: 'linear', within: 'chart' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMappingParameterValue(context, propMetrics, useSeriesExtremes, defaultMapping, mappingOptions, contextValueProp) {\n if (typeof mappingOptions === 'number') {\n return mappingOptions;\n }\n if (typeof mappingOptions === 'function') {\n retu...
[ "0.6740792", "0.6491884", "0.6288678", "0.62298614", "0.6225293", "0.6225293", "0.6225293", "0.6225293", "0.6119442", "0.585986", "0.5837943", "0.58090913", "0.5731215", "0.5731215", "0.5731215", "0.5731215", "0.5731215", "0.57219523", "0.56961614", "0.56961614", "0.5692615",...
0.7485033
0
Get time value for a point event.
function getPointTime(point, startTime, duration, timeMappingOptions, propMetrics, useSeriesExtremes) { var time = getParamValWithDefault({ point: point, time: 0 }, propMetrics, useSeriesExtremes, timeMappingOptions, 0, { min: 0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function o2ws_get_time() { return o2ws_get_float(); }", "function eventTime(e) {\n // In gecko, synthetic events seem to be in microseconds rather than ms.\n // So if the timestamp is much larger than the current time, assue it is\n // in microseconds and divide by 1000\n var ts = e.timeStamp;\n i...
[ "0.6570955", "0.6162505", "0.6067989", "0.6002507", "0.59957033", "0.59634656", "0.5903083", "0.58670574", "0.58509535", "0.5809185", "0.57928145", "0.576765", "0.5759683", "0.57391346", "0.5724623", "0.570989", "0.56812483", "0.5674343", "0.56292933", "0.56036675", "0.559350...
0.70574737
0
Get duration for a series
function getAvailableDurationForSeries(series, totalDuration, propMetrics, afterSeriesWait) { var timeProp, seriesDuration; var availableDuration = totalDuration - (series.chart.series.length - 1) * afterSeriesWait, hasGlobalTimeProp = propMetr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get duration() {\n if (!this.endedLocal) {\n return null;\n }\n const ns = this.diff[0] * 1e9 + this.diff[1];\n return ns / 1e6;\n }", "get duration() {\n var _a, _b;\n const current = (_b = (_a = this.current) === null || _a === void 0 ? void 0 : _a.durati...
[ "0.6696723", "0.6529032", "0.6455217", "0.6331058", "0.6331058", "0.6216839", "0.6196631", "0.61192924", "0.6112286", "0.6037249", "0.5918839", "0.5917581", "0.5913486", "0.59048367", "0.58961165", "0.587944", "0.5866519", "0.5817639", "0.57956403", "0.577619", "0.57676005", ...
0.5290269
53
Build and add a track to the timeline.
function addTimelineChannelFromTrack(timeline, audioContext, destinationNode, options) { var speechOpts = options, instrMappingOpts = (options.mapping || {}), engine = options.type === 'speech' ? new SonificationSpeaker({ language: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTrack(track) {\n\ttracks[nextFreeIndexTracks] = track;\n\tnextFreeIndexTracks++;\n\t// Refresh the dropdownMenu\n\tgenerateDropdownMenu();\n}", "function newTrack() {\r\n smf = new JZZ.MIDI.SMF(0, config.ticks_per_quarter_note); // type 0, 192 ticks per quarter note\r\n trk = new JZZ.MIDI.SMF.M...
[ "0.63268954", "0.62164867", "0.61523956", "0.60450864", "0.59857345", "0.59774065", "0.5912572", "0.5889717", "0.58870304", "0.5872038", "0.58026254", "0.57934093", "0.57137835", "0.5697749", "0.5682703", "0.5651789", "0.5637206", "0.5624257", "0.562274", "0.5622717", "0.5621...
0.48940757
89
Add event from a point to a mapped instrument track.
function addMappedInstrumentEvent(context, channel, mappingOptions, propMetrics, roundToMusicalNotes, contextValueProp) { var getParam = function (param, fallback, defaults, parent) { return getParamValWithDefault(context, propMetrics, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMappedEventForPoint(context, channel, trackOptions, propMetrics) {\n var eventsAdded = [];\n if (trackOptions.type === 'speech' && trackOptions.mapping) {\n var eventAdded = addMappedSpeechEvent(context,\n channel,\n trackOption...
[ "0.6673975", "0.6625777", "0.62246466", "0.61732394", "0.6143243", "0.5806881", "0.5719487", "0.565206", "0.564609", "0.56209874", "0.561513", "0.5591454", "0.5589931", "0.55782646", "0.5564772", "0.5492461", "0.54646623", "0.54605204", "0.542015", "0.5418612", "0.5398039", ...
0.5919496
5
Get the message value to speak for a point.
function getSpeechMessageValue(context, messageParam) { return format(typeof messageParam === 'function' ? messageParam(context) : messageParam, context, context.point && context.point.series.chart); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get point() {}", "function getPointValue(points) {\n return (points === \"bull\" ? 25 : parseInt(points));\n}", "_getAnswresMessageValue () {\n let value = this.isFirstAnswer ? locale[this.app.lang][\"messenger\"][\"first message\"] \n : locale[this.app.lang][\"messenger...
[ "0.6474043", "0.6009539", "0.5983747", "0.5749851", "0.5749851", "0.5571379", "0.5554816", "0.5420443", "0.541548", "0.5406027", "0.5403495", "0.53681165", "0.5349346", "0.5256481", "0.5248963", "0.5229647", "0.52216864", "0.5171186", "0.5159892", "0.5113951", "0.5107352", ...
0.7025698
0
Add an event from a point to a mapped speech track.
function addMappedSpeechEvent(context, channel, mappingOptions, propMetrics, contextValueProp) { var getParam = function (param, fallback, defaults) { return getParamValWithDefault(context, propMetrics, false, mappingOptions[par...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMappedEventForPoint(context, channel, trackOptions, propMetrics) {\n var eventsAdded = [];\n if (trackOptions.type === 'speech' && trackOptions.mapping) {\n var eventAdded = addMappedSpeechEvent(context,\n channel,\n trackOption...
[ "0.68496835", "0.63642", "0.6098648", "0.5978955", "0.569293", "0.5674563", "0.56390977", "0.55645514", "0.55645514", "0.55645514", "0.55645514", "0.55599016", "0.55573726", "0.5541995", "0.5541995", "0.54980403", "0.54415363", "0.54302126", "0.5403601", "0.53592074", "0.5347...
0.61884755
2
Add events to a channel for a point&track combo.
function addMappedEventForPoint(context, channel, trackOptions, propMetrics) { var eventsAdded = []; if (trackOptions.type === 'speech' && trackOptions.mapping) { var eventAdded = addMappedSpeechEvent(context, channel, trackOptions.mapping,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "attachChannelEvents() {\n this.channel.onmessage = this.handleChannelMessage;\n\n this.channel.onopen = e => {\n this.channel.send('ping');\n }\n\n this.channel.onerror = e => {\n console.log('channel error', e);\n }\n\n this.channel.onclose = e => {\n console.log('channel closed')...
[ "0.6172635", "0.5874577", "0.57757485", "0.5522837", "0.55055654", "0.54996455", "0.54852515", "0.54666936", "0.54483986", "0.5367018", "0.5346808", "0.5330845", "0.53301394", "0.5302431", "0.52715755", "0.5254987", "0.5254987", "0.5229247", "0.5225105", "0.5222631", "0.52093...
0.5839481
2
Get a reduced set of points from a list, depending on grouping opts.
function getGroupedPoints(pointGroupOpts, points) { var alg = pointGroupOpts.algorithm || 'minmax', r = function (ix) { return (points[ix] ? [points[ix].point] : []); }; if (alg === 'first') { return r(0); } if (alg === 'last') { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPriceGroups(){\n\tlet result = _.groupBy(pizzaToppingPrices, (item) => {\n\t\t//this will return based on item passes in and value\n return Math.floor(item.price / 1.0) \n })\n\treturn result;\n}", "function group(xs){\r\n return groupBy(Eq.eq, xs);\r\n}", "function groupBy(list, ke...
[ "0.49686024", "0.4959315", "0.49492052", "0.48897445", "0.48382217", "0.4828372", "0.4828372", "0.47929943", "0.4791876", "0.4791876", "0.4791876", "0.4791876", "0.4791876", "0.47857442", "0.4781533", "0.47752723", "0.47752723", "0.4725169", "0.4725169", "0.4725169", "0.47251...
0.5919898
0
Should a track be active for this event?
function isActive(context, activeWhen, lastPropValue) { if (typeof activeWhen === 'function') { return activeWhen(context); } if (typeof activeWhen === 'object') { var prop = activeWhen.prop, val = pick(context.value, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isFree() {\n return this.track === FREE;\n }", "_onTrackingUpdated(state, reason) {\n var trackingNormal = false;\n if (state == ViroConstants.TRACKING_NORMAL) {\n trackingNormal = true;\n } \n // this.props.dispatchARTrackingInitialized(trackingNormal);\n }", "beginTracking_() {\n ...
[ "0.6240693", "0.60997355", "0.60818404", "0.59344465", "0.58302075", "0.5792639", "0.5791062", "0.5791062", "0.5774904", "0.577031", "0.5769471", "0.57648104", "0.5745697", "0.5713664", "0.56820816", "0.56698364", "0.56635374", "0.56379104", "0.5616719", "0.56161296", "0.5610...
0.0
-1
Build a new timeline object from a chart.
function timelineFromChart(audioContext, destinationNode, chart) { var options = chart.options.sonification || {}, defaultInstrOpts = options.defaultInstrumentOptions, defaultSpeechOpts = options.defaultSpeechOptions, defaultPointGroupOpts ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTimeline() {\n var chart = new SmoothieChart();\n chart.addTimeSeries(random, { strokeStyle: 'rgba(0, 255, 0, 1)', fillStyle: 'rgba(0, 255, 0, 0.2)', lineWidth: 4 });\n chart.streamTo(document.getElementById(\"chart\"), 500);\n // HACK: because the chart needs some init d...
[ "0.5783884", "0.56669784", "0.56661886", "0.5555917", "0.5522354", "0.54568934", "0.54072917", "0.5400847", "0.5389629", "0.5357733", "0.532238", "0.5243249", "0.52336955", "0.52191854", "0.52182174", "0.52018815", "0.5201063", "0.5149905", "0.5118414", "0.51052564", "0.50936...
0.6094433
0
Update sonification object on chart.
function updateSonificationEnabled() { var sonification = this.sonification, sOptions = this.options && this.options.sonification; if (sOptions && sOptions.enabled) { if (sonification) { sonification.update(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateChart() {\n let xLabel = this.getChartX();\n let yLabel = this.getChartY();\n let t = this.getChartTargetArray();\n this.setChartData(this.json[xLabel], this.json[yLabel], t, xLabel, yLabel, this.getModel());\n }", "updateChart () {\n \n }", "function updateChart() {\n\n // Re...
[ "0.696096", "0.67251736", "0.65153193", "0.6362125", "0.63387644", "0.63387644", "0.6325927", "0.63058203", "0.62209105", "0.6220326", "0.619807", "0.61862713", "0.6148006", "0.6139942", "0.61382765", "0.6100394", "0.6084562", "0.6064198", "0.6051968", "0.6029409", "0.5984269...
0.6211995
10
connecting to the AuctionHouse
async subscribeToAuctionHouse(auctionHouseAddress){ this.auctionHouseContract = new AuctionHouse(); await this.auctionHouseContract.connect(App.provider.getSigner(),auctionHouseAddress ); this.auctionHouseContract.registerToEvents(sellerUI); try{ await this.auctionH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async connectToContract(){\n\n await this.auctionContract.connect( App.provider.getSigner(), this.auctionContract.contractAddress);\n this.auctionContract.registerToEvents(sellerUI);\n }", "async connect() {\n /* Connect to the database and to Redis */\n this._publisher = redis.cre...
[ "0.6430484", "0.6364127", "0.60938877", "0.60653895", "0.59818625", "0.59608155", "0.5904209", "0.59036183", "0.5903031", "0.5876452", "0.5850329", "0.5832612", "0.5821605", "0.57648045", "0.5745753", "0.5740335", "0.57279813", "0.5717713", "0.5674392", "0.5674392", "0.565894...
0.55444777
39
submitting a new auction giving a description of the selled object
submitAuction(objectDescription){ this.auctionHouseContract.submitAuction(objectDescription); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "newAuctionSubmitted(sellerAddress, objectDescription) {\n $(\"#auctionCard\").show();\n $(\"#newAuctionSubmitted\").text(\"New\");\n $(\"#newAuctionSubmitted\").show();\n\n $(\"#currentAuctionHeader\").text(\"A new Auction has been submitted!\");\n $(\"#currentAuctionObjectDescri...
[ "0.68831414", "0.64104044", "0.6340575", "0.6275288", "0.5862196", "0.5847358", "0.5838866", "0.5814748", "0.56884265", "0.56467414", "0.5641656", "0.5625749", "0.558507", "0.55765927", "0.5568547", "0.55529195", "0.55240136", "0.5506404", "0.549557", "0.5484952", "0.5484776"...
0.750677
0
connecting to the deployed contract
async connectToContract(){ await this.auctionContract.connect( App.provider.getSigner(), this.auctionContract.contractAddress); this.auctionContract.registerToEvents(sellerUI); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function connect() {\n try {\n // load the network configuration\n let ccp = JSON.parse(fs.readFileSync(config.conexionPath, 'utf8'));\n\n // Create a new file system based wallet for managing identities.\n const walletPath = path.join(process.cwd()+'/esc_core/wallet');\n ...
[ "0.66935325", "0.63742065", "0.6231973", "0.6166465", "0.6112974", "0.60752654", "0.60573184", "0.60332865", "0.60258645", "0.6018338", "0.6009369", "0.6000707", "0.5990096", "0.59797", "0.5979588", "0.5936654", "0.5933498", "0.5920587", "0.58996475", "0.5891995", "0.5888954"...
0.7522157
0
cria o tr da atividade
function criarTrAtividade(){ let trAtividade = document.createElement("tr") let tdAtividade = document.createElement("td") let tddetalhe = document.createElement("td") let tdprazo = document.createElement("td") let botaodelete = criarbotaoexclusao() let botaomodificar = criarbotaomodificar() tdAtiv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function criaTh(paciente) {\n var pacienteTr = document.createElement('tr')\n var nomeTh = document.createElement('th')\n var pesoTh = document.createElement('th')\n var alturaTh = document.createElement('th')\n var gorduraTh = document.createElement('th')\n var imcTh = document.createElement('th...
[ "0.7029057", "0.68585974", "0.6547116", "0.6462693", "0.64178705", "0.6240374", "0.6224564", "0.62192595", "0.61900836", "0.6175867", "0.6170511", "0.61428297", "0.6099195", "0.609878", "0.60984004", "0.60957056", "0.6095381", "0.6080185", "0.6078691", "0.60777", "0.60594803"...
0.75372523
0
Encrypts the entire keychain
decrypt(seed){ if(this.isEncrypted()) this.keychain = Keychain.fromJson(CryptoJS.AES.decrypt(this.keychain, seed)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "encrypt(seed){\n if(!this.isEncrypted()) this.keychain = CryptoJS.AES.encrypt(this.keychain, seed);\n }", "encrypt(plaintext, key) {\n \n // Pad the plaintext (using spaces as padding).\n while(plaintext.length % 8 != 0) {\n plaintext += \" \";\n }\n plaint...
[ "0.6734232", "0.62199533", "0.613427", "0.61213225", "0.60881215", "0.6068233", "0.6062772", "0.59298044", "0.5924353", "0.5919564", "0.59154385", "0.58798105", "0.5781789", "0.57505447", "0.5747872", "0.5725435", "0.56755465", "0.5665225", "0.5662476", "0.565052", "0.5645190...
0.0
-1
Decrypts the entire keychain
encrypt(seed){ if(!this.isEncrypted()) this.keychain = CryptoJS.AES.encrypt(this.keychain, seed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "decrypt(seed){\n if(this.isEncrypted()) this.keychain = Keychain.fromJson(CryptoJS.AES.decrypt(this.keychain, seed));\n }", "function decryptKeys() {\n $('.errorlist').hide();\n const crypto = new OpenCrypto();\n const passphrase = document.getElementById('id_passphrase').value;\n crypto.de...
[ "0.70105064", "0.6494559", "0.6476443", "0.64619195", "0.6174879", "0.6111384", "0.60436064", "0.60418916", "0.6028439", "0.60055417", "0.5960047", "0.5915266", "0.58987665", "0.58912235", "0.58422923", "0.5840686", "0.5838801", "0.58149815", "0.5809765", "0.5780073", "0.5741...
0.0
-1
replaces radio buttons with images
function addLayoutThumbnails() { // get layout inputs var layoutInputs = panel.find('#customize-control-layout').find('input'); // add the appropriate image to each label layoutInputs.each( function() { $(this).parent().css('background-image', 'url("../wp-content/themes/sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setImagesAsRadio(div, question) {\n div.addClass('radio-images');\n var buttons = div.find('label');\n\n $.each(buttons, function (key, value) {\n $(value).find('span').css('background-image', 'url(images/question' + question + '-' + (key + 1) + '.png)');\n });\n ...
[ "0.73638004", "0.6888079", "0.6701284", "0.63204277", "0.6139941", "0.61316353", "0.6131287", "0.6126844", "0.6100993", "0.60253304", "0.60220873", "0.6017891", "0.5990021", "0.59136087", "0.5905419", "0.5893804", "0.587623", "0.584686", "0.58319616", "0.5819448", "0.5806938"...
0.5737271
31
add the 'selected' class when a new input is selected
function addSelectedLayoutClass(inputs, target) { // remove 'selected' class from all labels inputs.parent().removeClass('selected'); // apply 'selected' class to :checked input if (target.prop('checked')) { target.parent().addClass('selected'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchSelected() {\n // get currently selected option\n selected = select.options[select.selectedIndex];\n select.className = selected.className;\n }", "function setCheckSelection()\r\n{\r\n $(\".checkSelection input\").click(function()\r\n {\r\n if ($(this).is(\":checked\"))\r\n {\r\n ...
[ "0.71585894", "0.6903121", "0.6697602", "0.66481674", "0.66238976", "0.65487194", "0.6467012", "0.63802636", "0.63479555", "0.6329849", "0.6309904", "0.63059735", "0.6276575", "0.62407255", "0.61768", "0.6171507", "0.6159971", "0.6157552", "0.614225", "0.61411965", "0.613208"...
0.6947042
1
Repeater Control // update Customizer based on user changes
function customize_repeater_write($element){ var customize_repeater_val = ''; // combine user-entered values into one string $element.find('.customize_repeater_fields .customize_repeater_page_select').each(function(){ if ( $(this).find(':selected').val() != '' ) { // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function customize_repeater_single_field() {\n var $control = $(this).parents('#customize-control-slider_pages');\n customize_repeater_write($control);\n }", "repeaterOnInit( $repeater, options ) {\n }", "repeaterOnAddItem() {\n }", "function layers_update_customizer_interface() {\n\t\...
[ "0.6198411", "0.614876", "0.57278883", "0.56714535", "0.5602072", "0.5530798", "0.5489925", "0.5390055", "0.53351295", "0.53109795", "0.52953845", "0.5251151", "0.51842886", "0.509462", "0.5051932", "0.50486124", "0.5019468", "0.50019354", "0.49400774", "0.49266082", "0.49167...
0.5516485
6
add a new dropdown selector
function customize_repeater_add_field(e){ e.preventDefault(); var $control = $(this).parents('#customize-control-slider_pages'); // duplicate the blueprint select $control.find('#blueprint-page-select').clone().removeAttr('id').appendTo('.customize_repeater_fields'); // add the r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function McDropdownPanel() { }", "function createDropDown(){\r\r\n\t\tvar $form = $(\"div#country-select form\");\r\r\n\t\t$form.hide();\r\r\n\t\tvar source = $(\"#country-options\");\r\r\n\t\tsource.removeAttr(\"autocomplete\");\r\r\n\t\tvar selected = source.find(\"option:selected\");\r\r\n\t\tvar options = $(...
[ "0.6893469", "0.6888038", "0.68141353", "0.6786226", "0.66484016", "0.65819407", "0.65754354", "0.6555587", "0.6502786", "0.6502184", "0.64783657", "0.6474482", "0.647084", "0.6447942", "0.644603", "0.64322627", "0.643031", "0.6409068", "0.6404328", "0.63870335", "0.6366674",...
0.62815624
26
update Customizer when a new option is selected
function customize_repeater_single_field() { var $control = $(this).parents('#customize-control-slider_pages'); customize_repeater_write($control); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function optionChanged(){\n init();\n}", "function optionChanged(samplechoice) {\n\n buildCharts(samplechoice);\n meta(samplechoice);\n\n}", "function updateOption(event) \n\t\t\t{\t\n\t\t\t\tvar options = _.clone(this.model.get('options'));\n\t\t\t\tvar optionName = event.target.name;\n\t\t\t\t//suppo...
[ "0.63477427", "0.6145315", "0.61405545", "0.6120415", "0.6019529", "0.60029495", "0.59597456", "0.5923117", "0.5912645", "0.590435", "0.58557147", "0.5780427", "0.5770246", "0.57459414", "0.5743474", "0.5743205", "0.57400477", "0.5730399", "0.5693611", "0.56885904", "0.568089...
0.0
-1
Show either the page or post settings based on whether user has chose to use pages/posts for the content
function updateSlideContentDisplay() { if ( $('#customize-control-slider_posts_or_pages').find('input:checked').val() == 'pages' ) { $('#customize-control-slider_recent_posts').addClass('hide'); $('#customize-control-slider_post_category').addClass('hide'); $('#customize-cont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_hide_metabox() {\n if ((jQuery('body').hasClass('post-php')||(jQuery('body').hasClass('post-new-php')))&&jQuery('body').hasClass('post-type-page')) {\n var metaID = jQuery('#page_template').val().slice(0, -4);\n metaboxName = metaID.substring(metaID.indexOf('-') + 1);\n ...
[ "0.6073129", "0.6031371", "0.6015185", "0.5933694", "0.5863778", "0.565334", "0.5644368", "0.5554159", "0.55344886", "0.5528097", "0.5404549", "0.54004925", "0.53677016", "0.53468794", "0.531175", "0.5295876", "0.5279508", "0.52647567", "0.52491087", "0.5179168", "0.51778966"...
0.6458443
0
Show either the page or post settings based on whether user has chose to use pages/posts for the content
function updateSlideSettingsDisplay() { if ( $('#customize-control-slider_auto_rotate').find('input:checked').val() == 'no' ) { $('#customize-control-slider_time').addClass('hide'); console.log('asdfsfd'); } else { $('#customize-control-slider_time').removeClass('hide...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSlideContentDisplay() {\n if ( $('#customize-control-slider_posts_or_pages').find('input:checked').val() == 'pages' ) {\n $('#customize-control-slider_recent_posts').addClass('hide');\n $('#customize-control-slider_post_category').addClass('hide');\n $('#custo...
[ "0.6457839", "0.6072405", "0.6029727", "0.6013963", "0.59326464", "0.5864515", "0.5652328", "0.56438124", "0.55537117", "0.5532689", "0.5528462", "0.54048806", "0.5399484", "0.53676605", "0.5346862", "0.5311694", "0.5296639", "0.5278521", "0.52643114", "0.52487874", "0.517920...
0.0
-1
The button should be in the `select` state if there are more unchecked checkboxes than checked, if there are not more unchecked than checked it should be in the `unselect` state
function update_status(context){ let group = $(context).attr('data-check-selector-group'); let checked = 0; let unchecked = 0; console.log('Checkbox Changed!'); // check state of all checkboxes in the group $(`input[type="checkbox"][data-check-selector-group="${group}"]`).each(function(index){...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "uncheck(selected, value) {\n let index = \"\";\n if (value === \"Device\") {\n index = this.state.devSel.indexOf(selected);\n this.state.devSel.splice(index, 1);\n } else if (value === \"Subject\") {\n index = this.state.subSel.indexOf(selected);\n t...
[ "0.64062893", "0.6330291", "0.62996083", "0.62730885", "0.6265633", "0.6263881", "0.6249509", "0.6232082", "0.62175804", "0.6216567", "0.61775595", "0.61665076", "0.6085698", "0.60784453", "0.6072262", "0.6031305", "0.60250723", "0.6023589", "0.60205066", "0.6008203", "0.6003...
0.0
-1
add to product array function
function addProducttoArray() { var QuesObject={// ProdObject={ Quesid:QuesID, Qtitle:document.getElementById("Qtitle").value, Marks:document.getElementById("Marks").value, Option1:document.getElementById("Option1").value, Option2:document.getElementById("Option2").value, Option3 :document.getEleme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function productOfArray(arr) {\n \n}", "function manualProductArray(arr) {\n const newArray = [];\n newArray.push(arr[1] * arr[2] * arr[3] * arr[4]);\n newArray.push(arr[0] * arr[2] * arr[3] * arr[4]);\n newArray.push(arr[1] * arr[0] * arr[3] * arr[4]);\n newArray.push(arr[1] * arr[2] * arr[0] * arr[4]);\n...
[ "0.7490286", "0.7262567", "0.71859264", "0.6961709", "0.68149674", "0.6795832", "0.67562383", "0.65268093", "0.6517569", "0.6488553", "0.6466253", "0.6428872", "0.64181465", "0.64022547", "0.6392117", "0.6315259", "0.6301264", "0.62954986", "0.62873244", "0.62775785", "0.6264...
0.0
-1
add to DOM function
function addProducttoDOM(ProdObj,flag2) { var listdiv1=document.createElement("div"); var Qtitle=ProdObj.Qtitle; var Marks=ProdObj.Marks; var Option1 = ProdObj.Option1; var Option2 = ProdObj.Option2; var Option3 = ProdObj.Option3; var Option4 = ProdObj.Option4; var Ans = ProdObj.Ans; var Qid=ProdObj.Quesid; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AddforiegnElement()\n{\n\n}", "function insertDom(element){\n\n}", "function addFunction() {\r\n element.appendChild(mouseSattelite);\r\n O$._mouseSatteliteTrackMouse(mouseSattelite);\r\n element.onmouseover = function () {\r\n O$._mouseSatteliteShow(mouseSattelite);\r\n };\r\n ele...
[ "0.7227034", "0.69010603", "0.6845407", "0.65545684", "0.6439872", "0.6337186", "0.63330066", "0.6309226", "0.6290396", "0.6108612", "0.60972697", "0.6053408", "0.60426205", "0.6027376", "0.6027376", "0.6027376", "0.6027376", "0.59855276", "0.59830785", "0.59790975", "0.59771...
0.0
-1
removing object from array
function removeFromProductsArray(id) { ProdArray.splice(id,1); console.log(ProdArray); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_remove(array, obj) {\n index = $.inArray(obj, array);\n if(index > -1) {\n console.log(array.splice(index, 1));\n return array.splice(index, 1);\n } else {\n return array;\n }\n}", "removeObject(object) {\n //loop goes through array and finds the object to d...
[ "0.7473899", "0.73272616", "0.7059553", "0.70546246", "0.7051295", "0.7046959", "0.69915515", "0.6984642", "0.69550055", "0.692897", "0.6881394", "0.6874809", "0.6813299", "0.68120885", "0.6811884", "0.6805754", "0.6796704", "0.6779797", "0.6774029", "0.676581", "0.6754798", ...
0.0
-1
insert into fields during edit function
function insertIntoFields(QuesObject) { var qtitle=document.getElementById("Qtitle"); var marks=document.getElementById("Marks"); var option1=document.getElementById("Option1"); var option2=document.getElementById("Option2"); var option3 = document.getElementById("Option3"); var optoin4 = document.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onEdit() {\n setValues();\n}", "function setEditFields(row) {\r\n document.getElementById(\"idField\").value = row.children[0].innerText;\r\n document.getElementById(\"editName\").value = row.children[1].innerText;\r\n document.getElementById(\"editEmail\").value = row.children[2].innerText;\r...
[ "0.69672227", "0.68773544", "0.6750424", "0.6658084", "0.66429377", "0.6621223", "0.64968634", "0.6451086", "0.63990074", "0.63860595", "0.6357113", "0.6357113", "0.6329056", "0.63283074", "0.632657", "0.6315741", "0.6309374", "0.63036776", "0.6301773", "0.6299404", "0.624970...
0.0
-1
joinRe logically computes regexps.join(separator), but fixes the backreferences so they continue to match.
function joinRe(regexps, separator) { // backreferenceRe matches an open parenthesis or backreference. To avoid // an incorrect parse, it additionally matches the following: // - [...] elements, where the meaning of parentheses and escapes change // - other escape sequences, so we do not mispars...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joinRe(regexps, separator) {\n // backreferenceRe matches an open parenthesis or backreference. To avoid\n // an incorrect parse, it additionally matches the following:\n // - [...] elements, where the meaning of parentheses and escapes change\n // - other escape sequences, so ...
[ "0.8123558", "0.811208", "0.811208", "0.7840968", "0.6303121", "0.57718927", "0.57718927", "0.57713854", "0.575701", "0.5687646", "0.5615546", "0.5571824", "0.55573624", "0.5471974", "0.54527503", "0.5450168", "0.5380257", "0.53647244", "0.53647244", "0.53647244", "0.53647244...
0.81291777
1
Core highlighting function. Accepts a language name, or an alias, and a string with the code to highlight. Returns an object with the following properties: relevance (int) value (an HTML string with highlighting markup)
function highlight(name, value, ignore_illegals, continuation) { function escapeRe(value) { return new RegExp(value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm'); } function subMode(lexeme, mode) { var i, length; for (i = 0, length = mode.contains.length; i < length; i++) { if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _highlight(languageName, code, ignore_illegals, continuation) {\n var codeToHighlight = code;\n\n function endOfMode(mode, lexeme) {\n if (startsWith(mode.endRe, lexeme)) {\n while (mode.endsParent && mode.parent) {\n mode = mode.parent;\n }\n return mode;\n }...
[ "0.73768395", "0.72865534", "0.6974324", "0.67928493", "0.6714645", "0.6704199", "0.6682448", "0.66816705", "0.66544604", "0.66544604", "0.66544604", "0.66544604", "0.66544604", "0.66544604", "0.66544604", "0.6651274", "0.6651274", "0.6651028", "0.6651028", "0.6651028", "0.66...
0.62503046
65
Highlighting with language detection. Accepts a string with the code to highlight. Returns an object with the following properties: language (detected language) relevance (int) value (an HTML string with highlighting markup) second_best (object with the same structure for secondbest heuristically detected language, may...
function highlightAuto(text, languageSubset) { languageSubset = languageSubset || options.languages || objectKeys(languages); var result = { relevance: 0, value: escape(text) }; var second_best = result; languageSubset.filter(getLanguage).filter(autoDetection).forEach(function(name) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightAuto(text, languageSubset) {\n languageSubset = languageSubset || options.languages || Object.keys(languages);\n var result = {\n relevance: 0,\n value: escape(text)\n };\n var second_best = result;\n languageSubset.forEach(function(name) {\n if (!getLanguage(name)) ...
[ "0.7003363", "0.7003363", "0.7003363", "0.7003363", "0.7003363", "0.7003363", "0.7003363", "0.6997082", "0.6997082", "0.6997082", "0.6997082", "0.6997082", "0.6997082", "0.6997082", "0.6997082", "0.6984094", "0.6981115", "0.69770724", "0.69770724", "0.69770724", "0.69770724",...
0.68204635
30
Postprocessing of the highlighted markup: replace TABs with something more useful replace real linebreaks with '' for nonpre containers
function fixMarkup(value) { return !(options.tabReplace || options.useBR) ? value : value.replace(fixMarkupRe, function(match, p1) { if (options.useBR && match === '\n') { return '<br>'; } else if (options.tabReplace) { return p1.replace(/\t/g, options.tabRepl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fixMarkup(value) {\n\t if (options.tabReplace) {\n\t value = value.replace(/^((<[^>]+>|\\t)+)/gm, function(match, p1 /*..., offset, s*/) {\n\t return p1.replace(/\\t/g, options.tabReplace);\n\t });\n\t }\n\t if (options.useBR) {\n\t value = value.replace(/\\n/g, '<br>');\n\t...
[ "0.6449593", "0.6449593", "0.6449593", "0.6449593", "0.64347124", "0.6364993", "0.6364993", "0.6364993", "0.635881", "0.63435537", "0.6333169", "0.6333169", "0.6333169", "0.6333169", "0.6333169", "0.63016206", "0.62795514", "0.6220824", "0.6210846", "0.6210846", "0.6210846", ...
0.62082
27
Applies highlighting to a DOM node containing code. Accepts a DOM node and two optional parameters for fixMarkup.
function highlightBlock(block) { var node, originalStream, result, resultNode, text; var language = blockLanguage(block); if (isNotHighlighted(language)) return; if (options.useBR) { node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); node.innerHTML = block.inne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightNode(node, highlightCallback, excludePredicate) {\n\t// if ('TR' === node.parentNode.nodeName.toUpperCase()) return;\n\tif (excludePredicate(node)) return;\n\n\t// Create a highlight\n\tvar highlight = highlightCallback(node);\n\t// Wrap it around the text node\n\tnode.parentNode.replaceChild(hig...
[ "0.6468099", "0.6365062", "0.62299484", "0.5959755", "0.58466893", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5758622", "0.5751197", "0.5751197", ...
0.0
-1
Updates highlight.js global options with values passed in the form of an object.
function configure(user_options) { options = inherit(options, user_options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UpdateConfiguration() {\n var config = vscode.workspace.getConfiguration('hl7tools');\n highlightFieldBackgroundColor = config['highlightBackgroundColor'];\n}", "static define(specs, options) {\n return new HighlightStyle(specs, options || {});\n }", "function populate_highlights() {\n...
[ "0.60895437", "0.5841328", "0.57532036", "0.548085", "0.5392932", "0.52368146", "0.52301514", "0.52255565", "0.51959443", "0.5194259", "0.51704454", "0.51664495", "0.5163631", "0.5139959", "0.5139959", "0.51343834", "0.5132378", "0.5132378", "0.51175046", "0.5103606", "0.5096...
0.0
-1
Applies highlighting to all .. blocks on a page.
function initHighlighting() { if (initHighlighting.called) return; initHighlighting.called = true; var blocks = document.querySelectorAll('pre code'); ArrayProto.forEach.call(blocks, highlightBlock); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initHighlighting() {\n if (initHighlighting.called)\n return;\n initHighlighting.called = true;\n\n var blocks = document.querySelectorAll('pre code');\n Array.prototype.forEach.call(blocks, highlightBlock);\n }", "function initHighlighting() {\n if (initHighlighting.called)\n ...
[ "0.6966066", "0.6966066", "0.6966066", "0.6966066", "0.6966066", "0.6966066", "0.6966066", "0.6966066", "0.6949708", "0.6932811", "0.6927352", "0.6927352", "0.6927352", "0.6927352", "0.6891129", "0.6875322", "0.6859059", "0.6673306", "0.663066", "0.63396484", "0.6177897", "...
0.69219875
27
Attaches highlighting to the page load event.
function initHighlightingOnLoad() { addEventListener('DOMContentLoaded', initHighlighting, false); addEventListener('load', initHighlighting, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initHighlightingOnLoad() {\n window.addEventListener('DOMContentLoaded', initHighlighting, false);\n window.addEventListener('load', initHighlighting, false);\n }", "function initHighlightingOnLoad() {\n addEventListener('DOMContentLoaded', initHighlighting, false);\n addEvent...
[ "0.80268514", "0.7993287", "0.7993287", "0.7922299", "0.7922299", "0.7922299", "0.7922299", "0.7922299", "0.778201", "0.7738398", "0.74058837", "0.73645383", "0.73645383", "0.73645383", "0.73645383", "0.70029616", "0.6562669", "0.65551406", "0.65435123", "0.65405047", "0.6540...
0.7933503
22
During execution of guarded functions we will capture the first error which we will rethrow to be handled by the top level error handler.
function rethrowCaughtError() { if (hasRethrowError) { var error = rethrowError; hasRethrowError = false; rethrowError = null; throw error; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _tryEachErrorHandler(next, ctx) {\n if (ctx.ix >= ctx.steps.length) return next(ctx.err2 || ctx.err, 'done'); else { ctx.next = next; _tryStepContext(ctx, _tryNext); }\n }", "function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw ...
[ "0.6413389", "0.63478714", "0.63478714", "0.63478714", "0.63478714", "0.63478714", "0.63478714", "0.63478714", "0.6329948", "0.6325536", "0.61638904", "0.6154849", "0.6154849", "0.6154849", "0.6154849", "0.6154849", "0.6154849", "0.6154849", "0.6154849", "0.6154849", "0.61548...
0.5952027
99
Recomputes the plugin list using the injected plugins and plugin ordering.
function recomputePluginOrdering() { if (!eventPluginOrder) { // Wait until an `eventPluginOrder` is injected. return; } for (var pluginName in namesToPlugins) { var pluginModule = namesToPlugins[pluginName]; var pluginIndex = eventPluginOrder.indexOf(pluginName); !(pluginIndex > -1) ? invaria...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "orderPlugins() {\r\n debug('orderPlugins:before', this.pluginNames);\r\n const runLast = this._plugins\r\n .filter(p => p.requirements.has('runLast'))\r\n .map(p => p.name);\r\n for (const name of runLast) {\r\n const index = this._plugins.findIndex(p => p.name...
[ "0.7994548", "0.74701035", "0.7169167", "0.71361053", "0.71361053", "0.71361053", "0.7128741", "0.7122665", "0.71187073", "0.7117351", "0.7117351", "0.7117351", "0.71010214", "0.71010214", "0.71010214", "0.709135", "0.709135", "0.709135", "0.709135", "0.709135", "0.709135", ...
0.0
-1
Standard/simple iteration through an event's collected dispatches.
function executeDispatchesInOrder(event) { var dispatchListeners = event._dispatchListeners; var dispatchInstances = event._dispatchInstances; { validateEventDispatches(event); } if (Array.isArray(dispatchListeners)) { for (var i = 0; i < dispatchListeners.length; i++) { if (event.isPropagationS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forEachEventDispatch(event,cb){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if(\"production\"!==process.env.NODE_ENV){validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break...
[ "0.6340201", "0.6318283", "0.6216154", "0.6129209", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6122544", "0.6119329", "0.6119329", "0.61154145", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.60784554", "0.6078455...
0.0
-1
Given a DOM node, return the closest ReactDOMComponent or ReactDOMTextComponent instance ancestor.
function getClosestInstanceFromNode(node) { if (node[internalInstanceKey]) { return node[internalInstanceKey]; } while (!node[internalInstanceKey]) { if (node.parentNode) { node = node.parentNode; } else { // Top of the tree. This node must not be part of a React tree (or is // unmo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[...
[ "0.7372026", "0.7372026", "0.7372026", "0.7372026", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.73251814", "0.7309252", "0.7309252", "0...
0.0
-1
Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent instance, or null if the node was not rendered by this React.
function getInstanceFromNode$1(node) { var inst = node[internalInstanceKey]; if (inst) { if (inst.tag === HostComponent || inst.tag === HostText) { return inst; } else { return null; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n if (node instanceof react__WEBPACK_IMPORTED_MODULE_0__.Component) {\n return react_dom__WEBPACK_IMPORTED_MODULE_1__.findDOMNode(node);\n }\n return null;\n}", "function findFirstReactDOMImpl(node) {\n\t\t // This n...
[ "0.759609", "0.7379761", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.73493093", "0.7329296", "0.7329296", "...
0.0
-1
Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding DOM node.
function getNodeFromInstance$1(inst) { if (inst.tag === HostComponent || inst.tag === HostText) { // In Fiber this, is just the state node right now. We assume it will be // a host component or host text. return inst.stateNode; } // Without this first invariant, passing a non-DOM-component triggers t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n\t\t // This node might be from another React instance, so we make sure not to\n\t\t // examine the node cache here\n\t\t for (; node && node.parentNode !== node; node = node.parentNode) {\n\t\t if (node.nodeType !== 1) {\n\t\t // Not a DOMElement, therefore not a...
[ "0.67850256", "0.67771465", "0.6770746", "0.67658514", "0.67658514", "0.6751226", "0.6741835", "0.6741215", "0.6741215", "0.6741215", "0.6741215", "0.6741215", "0.6741215", "0.6741215", "0.6739783", "0.6739783", "0.6739783", "0.6739783", "0.6739783", "0.6739783", "0.6732065",...
0.0
-1
Return the lowest common ancestor of A and B, or null if they are in different trees.
function getLowestCommonAncestor(instA, instB) { var depthA = 0; for (var tempA = instA; tempA; tempA = getParent(tempA)) { depthA++; } var depthB = 0; for (var tempB = instB; tempB; tempB = getParent(tempB)) { depthB++; } // If A is deeper, crawl up. while (depthA - depthB > 0) { instA = g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLowestCommonAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromIns...
[ "0.827648", "0.827648", "0.827648", "0.8272024", "0.8272024", "0.8272024", "0.8253801", "0.8228311", "0.8228311", "0.8228311", "0.8228311", "0.8199109", "0.81985116", "0.81836075", "0.81836075", "0.81836075", "0.81836075", "0.81836075", "0.81836075", "0.81836075", "0.81836075...
0.0
-1
Return if A is an ancestor of B. Return the parent instance of the passedin instance. Simulates the traversal of a twophase, capture/bubble event dispatch.
function traverseTwoPhase(inst, fn, arg) { var path = []; while (inst) { path.push(inst); inst = getParent(inst); } var i = void 0; for (i = path.length; i-- > 0;) { fn(path[i], 'captured', arg); } for (i = 0; i < path.length; i++) { fn(path[i], 'bubbled', arg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAncestor(instA, instB) {\n\t !('_nativeNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : invariant(false) : void 0;\n\t !('_nativeNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : in...
[ "0.74978", "0.74978", "0.74978", "0.7487795", "0.7487795", "0.7487795", "0.7469975", "0.7397992", "0.7397992", "0.7397992", "0.7397992", "0.7397992", "0.7397992", "0.7397992", "0.7397992", "0.7397992", "0.7353573", "0.7353573", "0.72663087", "0.71507376", "0.71507376", "0.7...
0.0
-1
Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that should would receive a `mouseEnter` or `mouseLeave` event. Does not invoke the callback on the nearest common ancestor because nothing "entered" or "left" that element.
function traverseEnterLeave(from, to, fn, argFrom, argTo) { var common = from && to ? getLowestCommonAncestor(from, to) : null; var pathFrom = []; while (true) { if (!from) { break; } if (from === common) { break; } var alternate = from.alternate; if (alternate !== null && alte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_handleMouseEnter() {\n this._hovered.next(this);\n }", "_elementMouseEnterHandler() {\n const that = this;\n\n if (that.clickMode === 'hover' && !that.disabled && !that.readonly) {\n that._handleMouseInteraction();\n }\n }", "_elementMouseEnterHandler() {\n ...
[ "0.50947124", "0.49230158", "0.49230158", "0.48819527", "0.48786473", "0.48786473", "0.48689318", "0.4865141", "0.4798619", "0.47754136", "0.4734082", "0.4734082", "0.4734082", "0.4734082", "0.4734082", "0.4734082", "0.4734082", "0.4734082", "0.4734082", "0.4734082", "0.4729"...
0.0
-1
Some event types have a notion of different registration names for different "phases" of propagation. This finds listeners by a given phase.
function listenerAtPhase(inst, event, propagationPhase) { var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase]; return getListener(inst, registrationName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listenerAtPhase(inst, event, propagationPhase) {\n\t\t var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n\t\t return getListener(inst, registrationName);\n\t\t}", "function listenerAtPhase(inst, event, propagationPhase) {\n\t\t var registrationName = event.dispat...
[ "0.6933563", "0.6933563", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.69319165", "0.6925391", "0.6925391", "0.690162", "0.690162", "0.690162", "0.690...
0.0
-1
A small set of propagation patterns, each of which will accept a small amount of information, and generate a set of "dispatch ready event objects" which are sets of events that have already been annotated with a set of dispatched listener functions/ids. The API is designed this way to discourage these propagation strat...
function accumulateDirectionalDispatches(inst, phase, event) { { !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0; } var listener = listenerAtPhase(inst, event, phase); if (listener) { event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); ev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDirectionalDispatches(inst,upwards,event){if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(inst,'Dispatching inst must not be null'):void 0;}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(inst,event,phase);if...
[ "0.634988", "0.634988", "0.6246947", "0.62320817", "0.6085175", "0.6085175", "0.6085175", "0.6085175", "0.6085175", "0.5957822", "0.5957822", "0.5951132", "0.59434575", "0.59434575", "0.59267145", "0.59267145", "0.5926377", "0.5926377", "0.5926377", "0.5926377", "0.5926377", ...
0.0
-1
Collect dispatches (must be entirely collected before dispatching see unit tests). Lazily allocate the array to conserve memory. We must loop through each event and perform the traversal for each one. We cannot perform a single traversal for the entire collection of events because each event may have a different target...
function accumulateTwoPhaseDispatchesSingle(event) { if (event && event.dispatchConfig.phasedRegistrationNames) { traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeDispatchesInOrder(event){var dispatchListeners=event._dispatchListeners;var dispatchInstances=event._dispatchInstances;{validateEventDispatches(event);}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break;}// Listeners and Instances...
[ "0.6037271", "0.6037271", "0.6037271", "0.6037271", "0.6037271", "0.59035826", "0.58939475", "0.58939475", "0.58939475", "0.58939475", "0.58771354", "0.58328724", "0.58328724", "0.58328724", "0.58328724", "0.58328724", "0.58328724", "0.58328724", "0.58328724", "0.58328724", "...
0.0
-1
Accumulates without regard to direction, does not look for phased registration names. Same as `accumulateDirectDispatchesSingle` but without requiring that the `dispatchMarker` be the same as the dispatched ID.
function accumulateDispatches(inst, ignoredDirection, event) { if (inst && event && event.dispatchConfig.registrationName) { var registrationName = event.dispatchConfig.registrationName; var listener = getListener(inst, registrationName); if (listener) { event._dispatchListeners = accumulateInto(eve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function accumulateDispatches(id, ignoredDirection, event) {\n\t if (event && event.dispatchConfig.registrationName) {\n\t var registrationName = event.dispatchConfig.registrationName;\n\t var listener = getListener(id, registrationName);\n\t if (listener) {\n\t event._dispatchListeners = accumulate...
[ "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "0.7467158", "...
0.0
-1
Do not uses the below two methods directly! Instead use constants exported from DOMTopLevelEventTypes in ReactDOM. (It is the only module that is allowed to access these methods.)
function unsafeCastStringToDOMTopLevelType(topLevelType) { return topLevelType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget);runEventQueueInBatch(events);}", "function handleTopLevel(topLevelType,targetInst,nativeEvent,nativeEventTarget){var events=extractEvents(topLevelType,tar...
[ "0.64485747", "0.64485747", "0.64485747", "0.6335035", "0.6323805", "0.6260746", "0.6219601", "0.6147271", "0.6147271", "0.6147271", "0.6147271", "0.6147271", "0.60981554", "0.60981554", "0.60797906", "0.59533143", "0.59354424", "0.5894617", "0.5893646", "0.5893646", "0.58936...
0.0
-1
Return whether a native keypress event is assumed to be a command. This is required because Firefox fires `keypress` events for key commands (cut, copy, selectall, etc.) even though no character is inserted.
function isKeypressCommand(nativeEvent) { return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. !(nativeEvent.ctrlKey && nativeEvent.altKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isKeypressCommand(nativeEvent) {\n\t return (\n\t (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n\t // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n\t !(nativeEvent.ctrlKey && nativeEvent.altKey)\n\t );\n\t}", "function isKeypressCommand(nativeEvent...
[ "0.8017686", "0.8017686", "0.8017686", "0.8017686", "0.8017686", "0.8017686", "0.8017686", "0.8009321", "0.80005544", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", "0.7999407", ...
0.0
-1
Get the value for a property on a node. Only used in DEV for SSR validation. The "expected" argument is used as a hint of what the expected value is. Some properties have multiple equivalent values.
function getValueForProperty(node, name, expected, propertyInfo) { { if (propertyInfo.mustUseProperty) { var propertyName = propertyInfo.propertyName; return node[propertyName]; } else { var attributeName = propertyInfo.attributeName; var stringValue = null; if (propertyInfo.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForProperty(node,name,expected){{var propertyInfo=getPropertyInfo(name);if(propertyInfo){var mutationMethod=propertyInfo.mutationMethod;if(mutationMethod||propertyInfo.mustUseProperty){return node[propertyInfo.propertyName];}else{var attributeName=propertyInfo.attributeName;var stringValue=null;if...
[ "0.8159313", "0.8159313", "0.8144338", "0.8068711", "0.8068711", "0.8065011", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "0.8060409", "...
0.0
-1
Get the value for a attribute on a node. Only used in DEV for SSR validation. The third argument is used as a hint of what the expected value is. Some attributes have multiple equivalent values.
function getValueForAttribute(node, name, expected) { { if (!isAttributeNameSafe(name)) { return; } if (!node.hasAttribute(name)) { return expected === undefined ? undefined : null; } var value = node.getAttribute(name); if (value === '' + expected) { return expected; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "function getValueForAttribute(node,name,expected){{if(!i...
[ "0.74273", "0.74273", "0.74273", "0.74273", "0.74273", "0.74273", "0.74273", "0.74273", "0.74273", "0.74273", "0.7329875", "0.7329875", "0.7326812", "0.73234344", "0.73234344", "0.73234344", "0.73234344", "0.73234344", "0.73234344", "0.73234344", "0.73234344", "0.73234344",...
0.0
-1
Flow does not allow string concatenation of most nonstring types. To work around this limitation, we use an opaque type that can only be obtained by passing the value through getToStringValue first.
function toString(value) { return '' + value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function string(val) {\n return {value: val, type: 'string'};\n}", "get stringValue() {}", "function toString(value){return ''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function toString(value){return''+value;}", "function toString(value){retu...
[ "0.629761", "0.62820274", "0.62584126", "0.6221969", "0.6221969", "0.6221969", "0.6221969", "0.6221969", "0.6221969", "0.6183617", "0.6146946", "0.6066032", "0.6066032", "0.6066032", "0.6066032", "0.6066032", "0.6066032", "0.6066032", "0.6066032", "0.6066032", "0.6066032", ...
0.61116004
74
Implements an host component that allows setting these optional props: `checked`, `value`, `defaultChecked`, and `defaultValue`. If `checked` or `value` are not supplied (or null/undefined), user actions that affect the checked state or value will trigger updates to the element. If they are supplied (and not null/undef...
function getHostProps(element, props) { var node = element; var checked = props.checked; var hostProps = _assign({}, props, { defaultChecked: undefined, defaultValue: undefined, value: undefined, checked: checked != null ? checked : node._wrapperState.initialChecked }); return hostProps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(props) {\n super(props);\n this.value = props.value;\n this.id = RadioButton.idGenerator(this.value);\n this.groupName = props.groupName;\n this.optional = {};\n if (typeof props.onChangeCallback === 'function') {\n this.optional.onChangeCallback =\n...
[ "0.6890051", "0.6786124", "0.6786124", "0.6786124", "0.6786124", "0.6786124", "0.6786124", "0.6786124", "0.6786124", "0.6786124", "0.6388983", "0.62581325", "0.6211063", "0.6131558", "0.6131558", "0.6131558", "0.6131558", "0.6131558", "0.6131558", "0.6131558", "0.6131558", ...
0.0
-1
In Chrome, assigning defaultValue to certain input types triggers input validation. For number inputs, the display value loses trailing decimal points. For email inputs, Chrome raises "The specified value is not a valid email address". Here we check to see if the defaultValue has actually changed, avoiding these proble...
function setDefaultValue(node, type, value) { if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== 'number' || node.ownerDocument.activeElement !== node) { if (value == null) { node.defaultValue = toString(node._wrapperState.initialValue); } else if (node.defaultValue...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shouldSetInputTextToDefaultValue (props) {\n let result = (this.previousDefaultValue != props.defaultValue) || (this.previousChangeIndicator != props.changeIndicator)\n return result\n }", "function checkValue(value, defaultValue) {\n return (value ? value : defaultValue)\n }", "function setDe...
[ "0.7001391", "0.6644677", "0.6552164", "0.6552164", "0.65132856", "0.65132856", "0.65047485", "0.65047485", "0.65047485", "0.65047485", "0.65047485", "0.6384706", "0.6384706", "0.6384706", "0.6384706", "0.6384706", "0.6384706", "0.6384706", "0.6384706", "0.6384706", "0.637699...
0.0
-1
SECTION: handle `change` event
function shouldUseChangeEvent(elem) { var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "onchange() {}", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}...
[ "0.78543967", "0.77067053", "0.7598371", "0.7521558", "0.7511186", "0.7503912", "0.7448648", "0.7420735", "0.74017644", "0.73862594", "0.7366617", "0.73554325", "0.73509383", "0.7349494", "0.7343744", "0.73396116", "0.73379546", "0.73352873", "0.733255", "0.7328203", "0.73217...
0.0
-1
(For IE <=9) Starts tracking propertychange events on the passedin element and override the value property so that we can distinguish user events from value changes in JS.
function startWatchingForValueChange(target, targetInst) { activeElement = target; activeElementInst = targetInst; activeElement.attachEvent('onpropertychange', handlePropertyChange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('on...
[ "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.74979377", "0.7280494", "0.71933466", "0.71933466", "0.7044488", "0.7031727", "0.7023512", "0.6934371", "0.6934371", "0...
0.0
-1
(For IE <=9) Removes the event listeners from the currentlytracked element, if any exists.
function stopWatchingForValueChange() { if (!activeElement) { return; } activeElement.detachEvent('onpropertychange', handlePropertyChange); activeElement = null; activeElementInst = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "function removeListeners(useCapturing) {\r\r\n // get all div in list\r\r\...
[ "0.7508426", "0.7133356", "0.7102572", "0.7083943", "0.7083943", "0.7073792", "0.70535064", "0.7042104", "0.70371777", "0.701214", "0.7003209", "0.6983204", "0.69750965", "0.69402474", "0.6920452", "0.69157857", "0.6911497", "0.6897683", "0.68618655", "0.68615925", "0.6860962...
0.0
-1
(For IE <=9) Handles a propertychange event, sending a `change` event if the value of the active element has changed.
function handlePropertyChange(nativeEvent) { if (nativeEvent.propertyName !== 'value') { return; } if (getInstIfValueChanged(activeElementInst)) { manualDispatchChangeEvent(nativeEvent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}", "function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('on...
[ "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.7169499", "0.69452703", "0.6840728", "0.6832034", "0.6743966", "0.6695023", "0.6695023", "0.6695023", "0.6695023", "0.6695023", ...
0.0
-1
For IE8 and IE9.
function getTargetInstForInputEventPolyfill(topLevelType, targetInst) { if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.in...
[ "0.7188425", "0.701918", "0.69894475", "0.69894475", "0.67849606", "0.6688933", "0.65080756", "0.6453405", "0.6453405", "0.6431592", "0.63625026", "0.63478786", "0.62841743", "0.62473077", "0.6229113", "0.6196999", "0.6170207", "0.61580634", "0.6143879", "0.613126", "0.611870...
0.0
-1
SECTION: handle `click` event
function shouldUseClickEvent(elem) { // Use the `click` event to detect changes to checkbox and radio inputs. // This approach works across all browsers, whereas `change` does not fire // until `blur` in IE8. var nodeName = elem.nodeName; return nodeName && nodeName.toLowerCase() === 'input' && (elem.type ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClick( event ){ }", "handleClick() {}", "function handleClick(){\n console.log(\"clicked\");\n}", "function handleClick(event)\n{\n}", "click() { }", "function clickHandler(){\n console.log('I am clicked');\n}", "function clickHandler(event) {\n\tindexChangeSections(event);\n\ttabChangeSect...
[ "0.8123866", "0.7879277", "0.7531671", "0.7500634", "0.7475805", "0.7402668", "0.73915786", "0.7379595", "0.7379595", "0.7331232", "0.7330436", "0.7245654", "0.72390676", "0.72122186", "0.7116352", "0.7082111", "0.7062615", "0.7056091", "0.7017624", "0.7006748", "0.6982211", ...
0.0
-1
Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support getModifierState. If getModifierState is not supported, we map it to a set of modifier keys exposed by the event. In this case, Lockkeys are not supported. Translation from modifier key to the associated property in the event.
function modifierStateGetter(keyArg) { var syntheticEvent = this; var nativeEvent = syntheticEvent.nativeEvent; if (nativeEvent.getModifierState) { return nativeEvent.getModifierState(keyArg); } var keyProp = modifierKeyToProp[keyArg]; return keyProp ? !!nativeEvent[keyProp] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}", "function modifierStateGetter(keyArg){var syn...
[ "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.79761153", "0.7876964", "0.7876964", "0.7797127", "0.76017725", "0.7565894", ...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own
function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; }
{ "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.65730107", "0.65730107", "0.64682955", "0.64555305", "0.6434891", "0.6334537", "0.6295769", "0.62714773", "0.62397087", "0.6223443", "0.621306", "0.61826247", "0.61570287", "0.61292493", "0.6126947", "0.60739607", "0.6033475", "0.6013597", "0.60036635", "0.59774935", "0.59...
0.0
-1
`ReactInstanceMap` maintains a mapping from a public facing stateful instance (key) and the internal representation (value). This allows public methods to accept the user facing instance as an argument and map them back to internal methods. Note that this module is currently shared and assumed to be stateless. If this ...
function get(key) { return key._reactInternalFiber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapWrapper(key)\n{\n\tthis.key = key;\n}", "function Map() {\n this.container = new Object();\n}", "function Map() {\r\n this.keys = [];\r\n this.values = [];\r\n}", "function Map() {\n\tthis.keys = [];\n\tthis.values = [];\n\n\t// add a key / value pair to map\n\tthis.add = function(key, v...
[ "0.562381", "0.5442556", "0.5437988", "0.5428394", "0.5293428", "0.5227495", "0.52200353", "0.5151936", "0.51480985", "0.5144992", "0.51231676", "0.5115584", "0.51124734", "0.5112011", "0.50555336", "0.5043425", "0.5024156", "0.5024156", "0.4996948", "0.4996948", "0.4996948",...
0.0
-1
Find the deepest React component completely containing the root of the passedin instance (for use when entire React trees are nested within each other). If React trees are not nested, returns null.
function findRootContainerNode(inst) { // TODO: It may be a good idea to cache this to prevent unnecessary DOM // traversal, but caching is difficult to do correctly without using a // mutation observer to listen for all DOM changes. while (inst.return) { inst = inst.return; } if (inst.tag !== HostRoot)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findFirstReactDOMImpl(node) {\n // This node might be from another React instance, so we make sure not to\n // examine the node cache here\n for (; node && node.parentNode !== node; node = node.parentNode) {\n if (node.nodeType !== 1) {\n // Not a DOMElement, therefore not a React component\n ...
[ "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.68762755", "0.67978483", "0.67978483", "0.67978483", "0.67978483", "0.67978483", "0.67978483"...
0.0
-1
Used to store ancestor hierarchy in top level callback
function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) { if (callbackBookkeepingPool.length) { var instance = callbackBookkeepingPool.pop(); instance.topLevelType = topLevelType; instance.nativeEvent = nativeEvent; instance.targetInst = targetInst; return instance; } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fullAncestor(node, callback, baseVisitor, state) {\n if (!baseVisitor) { baseVisitor = base; }\n var ancestors = []\n ;(function c(node, st, override) {\n var type = override || node.type;\n var isNew = node !== ancestors[ancestors.length - 1];\n if (isNew) { ancestors.push(node); ...
[ "0.63650066", "0.63650066", "0.63517284", "0.6194851", "0.60661834", "0.59946203", "0.59337914", "0.5927715", "0.5798319", "0.57487017", "0.5732234", "0.56577903", "0.5634935", "0.5633306", "0.56213325", "0.5599346", "0.5596999", "0.5585871", "0.5580441", "0.5567022", "0.5566...
0.0
-1
Implements an host component that warns when `selected` is set.
function validateProps(element, props) { { // This mirrors the codepath above, but runs for hydration too. // Warn about invalid children here so that client and hydration are consistent. // TODO: this seems like it could cause a DEV-only throw for hydration // if children contains a non-element objec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get _shouldUpdateSelection(){return this.selected!=null;}", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { return this._selected; }", "get selected() { ...
[ "0.58353996", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.5718122", "0.56539005", "0.5585994", "0.5577131", "0.5575268", "0.55627316", "0.55627316", "0.5543366", "0.55249584"...
0.0
-1
Validation function for `value` and `defaultValue`.
function checkSelectPropTypes(props) { ReactControlledValuePropTypes.checkPropTypes('select', props); for (var i = 0; i < valuePropNames.length; i++) { var propName = valuePropNames[i]; if (props[propName] == null) { continue; } var isArray = Array.isArray(props[propName]); if (props.mult...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "'validateValue'(value) {}", "function checkValue(value, defaultValue) {\n return (value ? value : defaultValue)\n }", "function validateInput(\n value,\n { float, canBeNegative, canBeEmpty, defaultValue }\n) {\n if (`${value}`.length > 0) {\n const valueAsNumber = float ? parseFloat(value) : pa...
[ "0.7436162", "0.6856192", "0.65868", "0.6431272", "0.64279246", "0.64279246", "0.6416799", "0.6416799", "0.6416799", "0.6316331", "0.6230596", "0.6195563", "0.616348", "0.61238676", "0.6050824", "0.6044303", "0.6036909", "0.59743184", "0.59359854", "0.58691984", "0.58653325",...
0.0
-1
Implements a host component that allows optionally setting the props `value` and `defaultValue`. If `multiple` is false, the prop must be a stringable. If `multiple` is true, the prop must be an array of stringables. If `value` is not supplied (or null/undefined), user actions that change the selected option will trigg...
function getHostProps$2(element, props) { return _assign({}, props, { value: undefined }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectValueType(props,propName,componentName){if(props[propName]==null){return null;}if(props.multiple){if(!Array.isArray(props[propName])){return new Error(\"The `\"+propName+\"` prop supplied to <select> must be an array if \"+\"`multiple` is true.\");}}else {if(Array.isArray(props[propName])){return ne...
[ "0.60979104", "0.60627514", "0.5823668", "0.5823668", "0.5733924", "0.5711647", "0.5705135", "0.5705135", "0.5705135", "0.5705135", "0.5705135", "0.5684935", "0.5681286", "0.56410694", "0.5631979", "0.5631979", "0.5631979", "0.5631979", "0.5631979", "0.5631979", "0.5631979", ...
0.0
-1
Implements a host component that allows setting `value`, and `defaultValue`. This differs from the traditional DOM API because value is usually set as PCDATA children. If `value` is not supplied (or null/undefined), user actions that affect the value will trigger updates to the element. If `value` is supplied (and not ...
function getHostProps$3(element, props) { var node = element; !(props.dangerouslySetInnerHTML == null) ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : void 0; // Always set children to the same thing. In IE9, the selection range will // get reset if `textContent` is mutated...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set value(val) {\n if (this.#el) this.#el.value = val;\n else this.#value = val;\n }", "setValue(value){\n const thisWidget = this;\n const newValue = thisWidget.parseValue(value);\n \n /* TODO: Add validation */\n if(newValue !=thisWidget.value && thisWidget.isValid(newValue)){\n this...
[ "0.64194894", "0.5993452", "0.59779125", "0.59779125", "0.59779125", "0.59779125", "0.59779125", "0.59779125", "0.59779125", "0.5952545", "0.5928599", "0.5900086", "0.5880415", "0.5880415", "0.5880415", "0.5880415", "0.5880415", "0.5880415", "0.5880415", "0.5823071", "0.57661...
0.0
-1
Assumes there is no parent namespace.
function getIntrinsicNamespace(type) { switch (type) { case 'svg': return SVG_NAMESPACE; case 'math': return MATH_NAMESPACE; default: return HTML_NAMESPACE$1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentObject(){\r\n var obj = parent;\r\n if (namespace !== \"\") {\r\n for (var i = 0, ii = namespace.split(\".\"); i < ii.length; i++) {\r\n obj = obj[ii[i]];\r\n }\r\n }\r\n return obj.easyXDM;\r\n}", "function namespaceHTMLInternal() {\n instructionState.lF...
[ "0.59287155", "0.57859004", "0.57859004", "0.57859004", "0.57859004", "0.57859004", "0.57859004", "0.57409227", "0.5689071", "0.5670551", "0.5663015", "0.5637689", "0.5581282", "0.5439333", "0.5438476", "0.54079413", "0.53944105", "0.53682894", "0.5355496", "0.532924", "0.532...
0.0
-1
Hyphenates a camelcased CSS property name, for example: > hyphenateStyleName('backgroundColor') hyphenateStyleName('MozTransition') hyphenateStyleName('msTransition') < "mstransition" As Modernizr suggests ( an `ms` prefix is converted to `ms`.
function hyphenateStyleName(name) { return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}", "function hyphenateStyleName(name){return name.replace(uppercasePa...
[ "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.81872857", "0.7949319" ]
0.7950179
87
Operations for dealing with CSS properties. This creates a string that is expected to be equivalent to the style attribute generated by serverside rendering. It bypasses warnings and security checks so it's not safe to use this value for anything other than comparison. It is only used in DEV for SSR validation.
function createDangerousStringForStyles(styles) { { var serialized = ''; var delimiter = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } var styleValue = styles[styleName]; if (styleValue != null) { var isCustomProperty = sty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get styles () {\n return css`${unsafeCSS(style)}`\n }", "get cssText() {\n var properties = [];\n for (var i = 0, length = this.length; i < length; ++i) {\n var name = this[i];\n var value = this.getPropertyValue(name);\n var priority = this.getPropertyPriority(name);\n if (p...
[ "0.6745135", "0.661401", "0.6602852", "0.65247476", "0.65247476", "0.6436216", "0.64069366", "0.63674486", "0.6298139", "0.6198508", "0.618331", "0.6170014", "0.6170014", "0.6169674", "0.6165187", "0.6114536", "0.6075997", "0.6075997", "0.60752136", "0.60752136", "0.60752136"...
0.0
-1
Calculate the diff between the two objects.
function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { { validatePropertiesInDevelopment(tag, nextRawProps); } var updatePayload = null; var lastProps = void 0; var nextProps = void 0; switch (tag) { case 'input': lastProps = getHostProps(domElement, las...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function diff(v1, v2) {\n return {\n x: v1.x - v2.x,\n y: v1.y - v2.y\n };\n}", "function diff(a, b) {\n totalDifference += Math.abs(a - b);\n }", "getDifference(other) {\n return {\n xDiff: other.x - this.x,\n yDiff: other.y - this.y,\n };\n }", "functi...
[ "0.73584795", "0.70092916", "0.6960951", "0.6865758", "0.6865758", "0.6865758", "0.6865758", "0.6865758", "0.6865758", "0.66720665", "0.6600449", "0.65714246", "0.65645313", "0.6558132", "0.65098464", "0.6492369", "0.6446226", "0.6443762", "0.6413908", "0.6397446", "0.6332192...
0.0
-1
Renderers that don't support persistence can reexport everything from this module.
function shim() { invariant(false, 'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.');}// Persistence (when unsupported)", "function shim(){invariant(false,'The current renderer does not support persistence. This error is likely caused by a bug...
[ "0.6271655", "0.6271655", "0.6271655", "0.6271655", "0.6056097", "0.6056097", "0.6056097", "0.6020151", "0.6020151", "0.6020151", "0.6020151", "0.58906555", "0.582867", "0.5826662", "0.5710087", "0.5710087", "0.5657837", "0.54290974", "0.54290974", "0.5422143", "0.5422143", ...
0.55845344
51
1 unit of expiration time represents 10ms.
function msToExpirationTime(ms) { // Always add an offset so that we don't clash with the magic number for NoWork. return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_OFFSET;}", "function msToExpirationTime(ms){// Always add an offset so that we don't clash with the magic number for NoWork.\nreturn(ms/UNIT_SIZE|0)+MAGIC_NUMBER_O...
[ "0.69083685", "0.69083685", "0.69083685", "0.69083685", "0.68177795", "0.68177795", "0.68177795", "0.6728504", "0.66832036", "0.66832036", "0.66832036", "0.6663674", "0.66431606", "0.66385615", "0.65983444", "0.65983444", "0.65983444", "0.6567885", "0.65556103", "0.65173113", ...
0.0
-1
This is used to create an alternate fiber to do work on.
function createWorkInProgress(current, pendingProps, expirationTime) { var workInProgress = current.alternate; if (workInProgress === null) { // We use a double buffering pooling technique because we know that we'll // only ever need at most two versions of a tree. We pool the "other" unused // node tha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createFiber(func) {\n return this.createLaxFiber.apply(this, __arguments.withContext(this.LAX_EMPTY_CONTEXT, arguments));\n }", "function createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double bu...
[ "0.61896163", "0.5820936", "0.5820936", "0.5820936", "0.5820936", "0.5820936", "0.5820936", "0.5820936", "0.5779841", "0.57326216", "0.5644085", "0.5644085", "0.5644085", "0.5644085", "0.5644085", "0.5644085", "0.5644085", "0.5644085", "0.5644085", "0.5644085", "0.5644085", ...
0.56123704
46
Used for stashing WIP properties to replay failed work in DEV.
function assignFiberPropertiesInDEV(target, source) { if (target === null) { // This Fiber's initial properties will always be overwritten. // We only use a Fiber to ensure the same hidden class so DEV isn't slow. target = createFiber(IndeterminateComponent, null, null, NoContext); } // This is inten...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if (enableProfilerTimer && unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n }", "function InternalBreakpointState() { }", "function InternalBreakpointState() {}", ...
[ "0.6011011", "0.54045147", "0.53980833", "0.53980833", "0.5266002", "0.5239496", "0.5219925", "0.51719093", "0.5114947", "0.50887054", "0.5083666", "0.5075196", "0.50734526", "0.5067331", "0.5053954", "0.50185883", "0.49673146", "0.4958323", "0.494461", "0.49131462", "0.49120...
0.47266462
74
TODO: This should be lifted into the renderer. The following attributes are only used by interaction tracing builds. They enable interactions to be associated with their async work, And expose interaction metadata to the React DevTools Profiler plugin. Note that these attributes are only defined when the enableSchedule...
function createFiberRoot(containerInfo, isConcurrent, hydrate) { // Cyclic construction. This cheats the type system right now because // stateNode is any. var uninitializedFiber = createHostRootFiber(isConcurrent); var root = void 0; if (enableSchedulerTracing) { root = { current: uninitializedFib...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFiberRoot(containerInfo,isConcurrent,hydrate){// Cyclic construction. This cheats the type system right now because\n// stateNode is any.\nvar uninitializedFiber=createHostRootFiber(isConcurrent);var root=void 0;if(enableSchedulerTracing){root={current:uninitializedFiber,containerInfo:containerInfo,...
[ "0.59179026", "0.59179026", "0.55583066", "0.5217998", "0.5217998", "0.5206779", "0.5206779", "0.5206779", "0.5206779", "0.5206779", "0.5182678", "0.5114505", "0.5114505", "0.5114505", "0.5114505", "0.5114505", "0.5114505", "0.49895343", "0.49895343", "0.49842146", "0.4984214...
0.5153387
28
TODO: Offscreen updates should never suspend. However, a promise that suspended inside an offscreen subtree should be able to ping at the priority of the outer render.
function markPendingPriorityLevel(root, expirationTime) { // If there's a gap between completing a failed root and retrying it, // additional updates may be scheduled. Clear `didError`, in case the update // is sufficient to fix the error. root.didError = false; // Update the latest and earliest pending time...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "if (\n workInProgressSuspendedReason === SuspendedOnData &&\n workInProgressRoot === root\n ) {\n // Mark the root as ready to continue rendering.\n workInProgressSuspendedReason = SuspendedAndReadyToContinue;\n }", "async _enq...
[ "0.6278924", "0.58324903", "0.56463873", "0.5617326", "0.5554062", "0.5537759", "0.5517409", "0.5405228", "0.53932965", "0.53863806", "0.5385599", "0.53360736", "0.53360736", "0.5300644", "0.5290972", "0.5246568", "0.5242257", "0.5242257", "0.5242139", "0.5228306", "0.5228306...
0.0
-1
Invokes the mount lifecycles on a previously never rendered instance.
function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) { { checkClassInstance(workInProgress, ctor, newProps); } var instance = workInProgress.stateNode; instance.props = newProps; instance.state = workInProgress.memoizedState; instance.refs = emptyRefsObject; var contextT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mount() {\n this.willMount();\n this.render();\n this.didMount();\n }", "componenetWillMount() { }", "function runMountCallback() {\n if (!hasMountCallbackRun && currentMountCallback) {\n hasMountCallbackRun = true;\n reflow(popper);\n currentMountCallback();\n...
[ "0.69552606", "0.676551", "0.67323613", "0.6718914", "0.6500413", "0.6377975", "0.6374852", "0.6356763", "0.6339651", "0.6288687", "0.62478185", "0.6208385", "0.6208385", "0.6208385", "0.6208385", "0.6208385", "0.6208385", "0.61914253", "0.61914253", "0.608951", "0.608593", ...
0.0
-1
Invokes the update lifecycles and returns false if it shouldn't rerender.
function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) { var instance = workInProgress.stateNode; var oldProps = workInProgress.memoizedProps; instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "needsUpdate() {\n // Call subclass lifecycle method\n return (\n this.internalState.needsUpdate ||\n this.hasUniformTransition() ||\n this.shouldUpdateState(this._getUpdateParams())\n );\n // End lifecycle method\n }", "shouldComponentUpdate(next_props){\n if (!next_props.update){\...
[ "0.7417848", "0.73684907", "0.73239565", "0.7296705", "0.7289543", "0.7108138", "0.7067573", "0.70314443", "0.702017", "0.69990176", "0.69611555", "0.69611555", "0.69410723", "0.69229597", "0.68923277", "0.68425786", "0.6839337", "0.683208", "0.6773803", "0.67644703", "0.6764...
0.0
-1
This wrapper function exists because I expect to clone the code in each path to be able to optimize each path individually by branching early. This needs a compiler or we can do it manually. Helpers that don't need this branching live outside of this function.
function ChildReconciler(shouldTrackSideEffects) { function deleteChild(returnFiber, childToDelete) { if (!shouldTrackSideEffects) { // Noop. return; } // Deletions are added in reversed order so we add it to the front. // At this point, the return fiber's effect list is empty except for ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function o0(o1)\n{\n var o2 = -1;\n try {\nfor (var o259 = 0; o3 < o1.length; function (o502, name, o38, o781, o782, o837, o585, o838, o549) {\n try {\no839.o468();\n}catch(e){}\n // TODO we should allow people to just pass in a complete filename instead\n // of parent and name being tha...
[ "0.5566109", "0.53213644", "0.51827335", "0.51801336", "0.5171545", "0.51541567", "0.51278126", "0.5108448", "0.50893056", "0.507995", "0.49813968", "0.4943932", "0.49333256", "0.4903526", "0.48437303", "0.48303488", "0.4814915", "0.48059094", "0.47969678", "0.47947752", "0.4...
0.0
-1
Warns if there is a duplicate or missing key
function warnOnInvalidKey(child, knownKeys) { { if (typeof child !== 'object' || child === null) { return knownKeys; } switch (child.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: warnForMissingKey(child); var key = child.key; if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkDuplicates(error) {\n if (error.name === \"MongoError\" && error.code === 11000) {\n // check if the error from Mongodb is duplication error\n // eslint-disable-next-line no-useless-escape\n const regex = /index\\:\\ (?:.*\\.)?\\$?(?:([_a-z0-9]*)(?:_\\d*)|([_a-z0-9]*))\\s*dup key/i;\n c...
[ "0.64586234", "0.63743407", "0.62774295", "0.61566454", "0.61478174", "0.61425227", "0.61372644", "0.61251426", "0.61251426", "0.61219513", "0.6114083", "0.6114083", "0.6114083", "0.61133426", "0.61059004", "0.6096614", "0.60936666", "0.6082668", "0.5989997", "0.59782195", "0...
0.58638847
76
This API will tag the children with the sideeffect of the reconciliation itself. They will be added to the sideeffect list as we pass through the children and the parent.
function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) { // This function is not recursive. // If the top level item is an array, we treat it as a set of children, // not as a fragment. Nested arrays on the other hand will be treated as // fragment nodes. Recursion happe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) // Noop.\n return;\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's ...
[ "0.69682604", "0.69398147", "0.69398147", "0.69398147", "0.69398147", "0.69329154", "0.69329154", "0.69329154", "0.69329154", "0.69329154", "0.69329154", "0.6927033", "0.6927033", "0.6927033", "0.6926911", "0.6926911", "0.6926911", "0.6922876", "0.69209063", "0.6912807", "0.6...
0.0
-1
This module is forked in different environments. By default, return `true` to log errors to the console. Forks can return `false` if this isn't desirable.
function showErrorDialog(capturedError) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static runningOnNode ()\n\t\t{ let ud = \"undefined\";\n\n\t\t\tif (typeof process === ud)\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process.versions )\n\t\t\t{ return false;\n\t\t\t}\n\t\t\tif (! process.versions.node )\n\t\t\t{ return false;\n\t\t\t}\n\t\...
[ "0.6476742", "0.59491473", "0.584118", "0.5588432", "0.5582435", "0.54698336", "0.54398966", "0.5429671", "0.5409681", "0.5409681", "0.5398092", "0.5377223", "0.53769946", "0.5359536", "0.5359536", "0.53345436", "0.52284026", "0.5201319", "0.5185094", "0.51222306", "0.5118625...
0.0
-1
Capture errors so they don't interrupt unmounting.
function safelyCallComponentWillUnmount(current$$1, instance) { { invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance); if (hasCaughtError()) { var unmountError = clearCaughtError(); captureCommitPhaseError(current$$1, unmountError); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "simulateUnmount() {\n this.volumeUnmountListener(this.volumeInfo_.volumeId);\n }", "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EElistenerCount(dest,'error')===0)errorOrDestroy(dest,er);}// Make sure our error handler is attached before userland ones.", "functi...
[ "0.6382745", "0.5922248", "0.5853449", "0.5853449", "0.5853449", "0.5848702", "0.582052", "0.582052", "0.582052", "0.57682675", "0.5742897", "0.5742897", "0.5742897", "0.5742897", "0.5742897", "0.5732277", "0.5732277", "0.5732277", "0.56900203", "0.56900203", "0.56573915", ...
0.0
-1
Useroriginating errors (lifecycles and refs) should not interrupt deletion, so don't let them throw. Hostoriginating errors should interrupt deletion, so it's okay
function commitUnmount(current$$1) { onCommitUnmount(current$$1); switch (current$$1.tag) { case FunctionComponent: case ForwardRef: case MemoComponent: case SimpleMemoComponent: { var updateQueue = current$$1.updateQueue; if (updateQueue !== null) { var lastEffect =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "detach() {\n throw new Error('Not Implemented');\n }", "detach() {\n throw new Error('Not Implemented');\n }", "function deleteErrHandler(error, result) {\n\tif (error) {\n\t\tlog(\"cannot delete data\")\n\t\tthrow error\n\t} else {\n\t\tlog(\"Delete Success\") \n\t}\n}", "componentWillUnmount() {\n ...
[ "0.6073619", "0.6073619", "0.5911379", "0.5903796", "0.5880644", "0.582539", "0.58034223", "0.5790749", "0.5754785", "0.57070786", "0.56810534", "0.5670852", "0.563262", "0.563262", "0.563084", "0.5604567", "0.554395", "0.55357057", "0.55357057", "0.55357057", "0.5519276", ...
0.0
-1
Creates a unique async expiration time.
function computeUniqueAsyncExpiration() { var currentTime = requestCurrentTime(); var result = computeAsyncExpiration(currentTime); if (result >= lastUniqueAsyncExpiration) { // Since we assume the current time monotonically increases, we only hit // this branch when computeUniqueAsyncExpiration is fired ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeUniqueAsyncExpiration() {\n var currentTime = requestCurrentTime();\n var result = computeAsyncExpiration(currentTime);\n if (result <= lastUniqueAsyncExpiration) {\n // Since we assume the current time monotonically increases, we only hit\n // this branch when computeUniqueAsyncExpiration...
[ "0.680362", "0.680362", "0.680362", "0.680362", "0.680362", "0.680362", "0.680362", "0.680362", "0.67899007", "0.677218", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6765476", "0.6756696", "0.6756696", "0.675669...
0.67935026
30
For every call to renderRoot, one of onFatal, onComplete, onSuspend, and onYield is called upon exiting. We use these in lieu of returning a tuple. I've also chosen not to inline them into renderRoot because these will eventually be lifted into the renderer.
function onFatal(root) { root.finishedWork = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n ...
[ "0.50565606", "0.49944818", "0.49920338", "0.49108234", "0.49108234", "0.49108234", "0.49068365", "0.49064353", "0.4878389", "0.4878389", "0.4878389", "0.4818158", "0.4818158", "0.4818158", "0.48053417", "0.48053417", "0.48053417", "0.48053417", "0.48053417", "0.48053417", "0...
0.48617375
36
requestWork is called by the scheduler whenever a root receives an update. It's up to the renderer to call renderRoot at some point in the future.
function requestWork(root, expirationTime) { addRootToSchedule(root, expirationTime); if (isRendering) { // Prevent reentrancy. Remaining work will be scheduled at the end of // the currently rendering batch. return; } if (isBatchingUpdates) { // Flush work at the end of the batch. if (isUn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestWork(root,expirationTime){addRootToSchedule(root,expirationTime);if(isRendering){// Prevent reentrancy. Remaining work will be scheduled at the end of\n// the currently rendering batch.\nreturn;}if(isBatchingUpdates){// Flush work at the end of the batch.\nif(isUnbatchingUpdates){// ...unless we're...
[ "0.76540715", "0.76540715", "0.7632348", "0.7632348", "0.7632348", "0.7144737", "0.7144737", "0.7144737", "0.7100884", "0.70814735", "0.70748216", "0.70748216", "0.70748216", "0.70748216", "0.70748216", "0.70748216", "0.70748216", "0.70748216", "0.70748216", "0.70748216", "0....
0.69819415
90
TODO: Batching should be implemented at the renderer level, not inside the reconciler.
function batchedUpdates$1(fn, a) { var previousIsBatchingUpdates = isBatchingUpdates; isBatchingUpdates = true; try { return fn(a); } finally { isBatchingUpdates = previousIsBatchingUpdates; if (!isBatchingUpdates && !isRendering) { performSyncWork(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateBatches() {\n if (this.dirty === this.cacheDirty) {\n return;\n }\n if (this.graphicsData.length === 0) {\n return;\n }\n if (this.dirty !== this.cacheDirty) {\n for (var i = 0; i < this.graphicsData.length; i++) {\n var data ...
[ "0.66131675", "0.6574288", "0.65535474", "0.65384126", "0.65384126", "0.6136533", "0.6087616", "0.6049396", "0.6025469", "0.5977921", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.5929122", "0.588165", "0.5860314", ...
0.0
-1
TODO: Batching should be implemented at the renderer level, not inside the reconciler.
function unbatchedUpdates(fn, a) { if (isBatchingUpdates && !isUnbatchingUpdates) { isUnbatchingUpdates = true; try { return fn(a); } finally { isUnbatchingUpdates = false; } } return fn(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateBatches() {\n if (this.dirty === this.cacheDirty) {\n return;\n }\n if (this.graphicsData.length === 0) {\n return;\n }\n if (this.dirty !== this.cacheDirty) {\n for (var i = 0; i < this.graphicsData.length; i++) {\n var data ...
[ "0.6613556", "0.6574571", "0.6553784", "0.65374845", "0.65374845", "0.61367923", "0.6086636", "0.60503185", "0.6025809", "0.5979128", "0.5930317", "0.5930317", "0.5930317", "0.5930317", "0.5930317", "0.5930317", "0.5930317", "0.5930317", "0.5930317", "0.5882931", "0.5860626",...
0.0
-1
TODO: Batching should be implemented at the renderer level, not within the reconciler.
function flushSync(fn, a) { !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0; var previousIsBatchingUpdates = isBatchingUpdates; isBatchingUpdates = true; try { return syncUpdates(fn, a); } finally { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateBatches() {\n if (this.dirty === this.cacheDirty) {\n return;\n }\n if (this.graphicsData.length === 0) {\n return;\n }\n if (this.dirty !== this.cacheDirty) {\n for (var i = 0; i < this.graphicsData.length; i++) {\n var data ...
[ "0.6655879", "0.6612628", "0.66121787", "0.65431845", "0.65431845", "0.61227435", "0.6102243", "0.60430694", "0.60361063", "0.59567624", "0.5913783", "0.5913783", "0.5913783", "0.5913783", "0.5913783", "0.5913783", "0.5913783", "0.5913783", "0.5913783", "0.587053", "0.5861533...
0.0
-1
This file intentionally does not have the Flow annotation. Don't add it. See `./inlinetyped.js` for an explanation.
function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; return { // This tag allow us to uniquely identify this as a React Portal $$typeof: REACT_POR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function notInlineUseCase() { console.log('Not an inline use case');}", "function anotherFunction() {\n /***/\n console.log(\"This function.\");\n}", "getHeader() {\n return `/**\n * IN2 Logic Tree File\n *\n * This file has been generated by an IN2 compiler.\n */\\n/*eslint-disable-line*/func...
[ "0.61124945", "0.5576725", "0.55532897", "0.55456424", "0.5474689", "0.54358435", "0.5422549", "0.5398275", "0.5336859", "0.53078914", "0.52868474", "0.5274263", "0.5250119", "0.52368945", "0.5229526", "0.52215517", "0.520125", "0.5189212", "0.5189212", "0.51750404", "0.51652...
0.0
-1