query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
This adapter function allows Collection arguments to be used in JavaScript for...of loops
function asIterable(collection) { if (collection[Symbol.iterator]) return collection; return new IterableAdapter(collection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iterate(collection) {\n return new IteratorWithOperators(utils_1.toIterator(collection));\n}", "forEach(coll, func) {\n\n return [].forEach.call(coll, func);\n\n }", "function collectAnimals(...collection) {\n return collection\n}", "function SimpleObject2(){\n this.collection = [1,...
[ "0.65394455", "0.6252329", "0.58867645", "0.5847246", "0.5815132", "0.5789505", "0.5769293", "0.5766747", "0.5763708", "0.574111", "0.5723564", "0.5715508", "0.5715508", "0.5715508", "0.5712675", "0.5705062", "0.57047635", "0.57021457", "0.5666941", "0.5666941", "0.56650126",...
0.6449172
1
newStdTx creates a new StdTx from some messages, with default values for fees, memo and sigs
function newStdTx(msgs, fee = defaultFee, memo = '', signatures = null) { return { type: 'cosmos-sdk/StdTx', value: { msg: msgs, fee: fee, signatures: signatures, memo: memo, }, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createTx(utxos, amount, fee, toAddress, memo) {\n // transforming UTXOs fields to how module expects it\n for (let u of utxos) {\n u.confirmations = 6; // hack to make module accept 0 confirmations\n u.txid = u.tx_hash;\n u.vout = u.tx_output_n;\n u.amount = new BigNumber(u.value);\n ...
[ "0.6602532", "0.6076608", "0.598929", "0.59132266", "0.5774689", "0.57231843", "0.56268317", "0.56017715", "0.55828893", "0.55466884", "0.54897153", "0.54856926", "0.5411235", "0.5409788", "0.53493637", "0.5321441", "0.53214407", "0.5269485", "0.5253094", "0.5252816", "0.5249...
0.8641803
0
CosmosSDK msgs newMsgSend creates a new MsgSend
function newMsgSend(address, to, coins) { const sendTx = { type: 'cosmos-sdk/MsgSend', value: { from_address: address, to_address: to, amount: _.sortBy(coins, 'denom'), }, }; return sendTx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createNewMessage() {\n var message = {};\n message.webId = Util.getUniqueId();\n message.dateUpdate = Util.getISOCurrentTime();\n message.dateSent = \"\";\n message.value = \"\";\n message.type = 0;\n message.entityType = \"\";\n message.entityId = n...
[ "0.6290083", "0.6266808", "0.61746", "0.6055833", "0.6055833", "0.59921914", "0.5963545", "0.58826256", "0.5878705", "0.5865341", "0.58334774", "0.57653534", "0.5762651", "0.5709263", "0.5685348", "0.5673948", "0.56659985", "0.5637683", "0.5619835", "0.5604515", "0.55966145",...
0.6551838
0
newMsgCreateAtomicSwap creates a new MsgCreateAtomicSwap
function newMsgCreateAtomicSwap( sender, recipient, recipientOtherChain, senderOtherChain, randomNumberHash, timestamp, amount, heightSpan, crossChain ) { return { type: 'bep3/MsgCreateAtomicSwap', value: { from: sender, to: recipient, recipient_other_chain: recipientOtherC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newMsgClaimAtomicSwap(sender, swapID, randomNumber) {\n return {\n type: 'bep3/MsgClaimAtomicSwap',\n value: {\n from: sender,\n swap_id: swapID,\n random_number: randomNumber,\n },\n };\n}", "function newMsgRefundAtomicSwap(sender, swapID) {\n return {\n type: 'bep3/MsgRef...
[ "0.72932976", "0.68538904", "0.46329498", "0.45745468", "0.43818542", "0.4356354", "0.43473122", "0.43409225", "0.43409225", "0.43049306", "0.42813805", "0.42772356", "0.42548844", "0.4247555", "0.42160606", "0.42005393", "0.41905418", "0.41845065", "0.41429734", "0.41224173", ...
0.68986344
1
newMsgClaimAtomicSwap creates a new MsgClaimAtomicSwap
function newMsgClaimAtomicSwap(sender, swapID, randomNumber) { return { type: 'bep3/MsgClaimAtomicSwap', value: { from: sender, swap_id: swapID, random_number: randomNumber, }, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newMsgCreateAtomicSwap(\n sender,\n recipient,\n recipientOtherChain,\n senderOtherChain,\n randomNumberHash,\n timestamp,\n amount,\n heightSpan,\n crossChain\n) {\n return {\n type: 'bep3/MsgCreateAtomicSwap',\n value: {\n from: sender,\n to: recipient,\n recipient_other_c...
[ "0.6289002", "0.6092649", "0.44040135", "0.43264738", "0.4218959", "0.41952267", "0.41107717", "0.410448", "0.4097353", "0.40923062", "0.4055246", "0.40443555", "0.40333277", "0.40209058", "0.39803556", "0.39510822", "0.39478046", "0.3935209", "0.3935209", "0.39327183", "0.39...
0.761141
0
newMsgRefundAtomicSwap creates a new MsgRefundAtomicSwap
function newMsgRefundAtomicSwap(sender, swapID) { return { type: 'bep3/MsgRefundAtomicSwap', value: { from: sender, swap_id: swapID, }, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newMsgClaimAtomicSwap(sender, swapID, randomNumber) {\n return {\n type: 'bep3/MsgClaimAtomicSwap',\n value: {\n from: sender,\n swap_id: swapID,\n random_number: randomNumber,\n },\n };\n}", "function newMsgCreateAtomicSwap(\n sender,\n recipient,\n recipientOtherChain,\n ...
[ "0.631701", "0.6061283", "0.45954642", "0.4186862", "0.41307318", "0.4102626", "0.4076681", "0.40632382", "0.4044103", "0.40335244", "0.4026604", "0.39997312", "0.39983204", "0.3997659", "0.39942387", "0.39896208", "0.39754143", "0.3953738", "0.3953738", "0.39528188", "0.3950...
0.7770128
0
Returns an array of the coefficients that produce the most consecutive primes.
function quadraticPrimes() { let arr = []; let answer; for (let a = -1000; a < 1000; a++) { for (let b = -1000; b <= 1000; b++) { let x = consecutivePrimes(a, b); if (x.length > arr.length) { arr = x; answer = [a, b]; } } } return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPrimes(n){\n let k = (n-2)/2;\n let arr = [k+1];\n for(let i = 1;i<k+1;i++){\n let j = i;\n while((i+j+2*i*j)<= k){//can optimize ?\n arr[i+j+2*i*j] = 1;\n j++;\n }\n }\n let fixedArray = [];\n let count = 0;\n for(let i = 0; i < k+1;i++){\n if(arr[i] != 1){\n fixedArr...
[ "0.65283793", "0.6080185", "0.6036383", "0.5983481", "0.5978956", "0.59518623", "0.59064686", "0.59030616", "0.58302826", "0.5817813", "0.58009535", "0.58001924", "0.57913816", "0.5784605", "0.5758995", "0.57486063", "0.5726968", "0.572678", "0.57267684", "0.570401", "0.56891...
0.6968218
0
var dogs = ["Hardly any", "More than a handful!", "Woah that's a lot of dogs!", "101 DALMATIANS!!!"]; return number <= 10 ? dogs[0] : number <= 50 ? dogs[1] : number == 101 ? dogs[3] : dogs[2] }
function howManyDalmatians(number) { return number == 101 ? "101 DALMATIANS!!" : number <= 10 ? "Hardly any" : number <= 50 ? "More than a handful" : "Woah that's a lot of dogs!" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howManyDalmatians(number) {\n var dogs = [\n \"Hardly any\",\n \"More than a handful!\",\n \"Woah that's a lot of dogs!\",\n \"101 DALMATIANS!!!\"\n ];\n\n var respond;\n\n // number <= 10 ? dogs[0] : (number <= 50 ? dogs[1] : (number = 101 dogs[3] : dogs[2]))\n\n if (number <= 10) {\n ...
[ "0.8144256", "0.6901854", "0.6568007", "0.6498699", "0.6446267", "0.63718903", "0.6312783", "0.63125765", "0.6257646", "0.620693", "0.61804193", "0.6177238", "0.6134142", "0.6121899", "0.6121319", "0.60705984", "0.6067937", "0.60655385", "0.60655385", "0.6040579", "0.6040579"...
0.70614344
1
Width of the crossfade transition zone (proportion to the current LOD&039;s whole length) [01]. Only used if it&039;s not animated.
get fadeTransitionWidth() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set fadeTransitionWidth(value) {}", "function getWidth() {\n return caroussel.offsetWidth;\n }", "get width() { return 1 }", "function getWorldWidth() {\r\n return document.getElementById(\"mundo\").offsetWidth;\r\n}", "function getWidth() {\n return w;\n }", "get width() {...
[ "0.6629392", "0.59758365", "0.5934346", "0.5860912", "0.5826125", "0.5806743", "0.57887214", "0.578269", "0.5617026", "0.56008816", "0.5599145", "0.55451477", "0.5544377", "0.5524482", "0.5517066", "0.550574", "0.549399", "0.5478376", "0.54753387", "0.54662365", "0.54475176",...
0.6851534
0
Width of the crossfade transition zone (proportion to the current LOD&039;s whole length) [01]. Only used if it&039;s not animated.
set fadeTransitionWidth(value) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get fadeTransitionWidth() {}", "function getWidth() {\n return caroussel.offsetWidth;\n }", "get width() { return 1 }", "function getWorldWidth() {\r\n return document.getElementById(\"mundo\").offsetWidth;\r\n}", "function getWidth() {\n return w;\n }", "get width() {\n ...
[ "0.6851252", "0.5975704", "0.59352255", "0.5860322", "0.5826192", "0.58071923", "0.5788711", "0.57820576", "0.5619186", "0.5601108", "0.55997556", "0.55447733", "0.5544204", "0.5525715", "0.5517291", "0.5506097", "0.5494582", "0.5478464", "0.5476065", "0.5466849", "0.5447644"...
0.6629469
1
List of renderers for this LOD level.
get renderers() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set renderers(value) {}", "get BasedOnRenderers() {}", "set BasedOnRenderers(value) {}", "getRenderer() {\n return this.renderer;\n }", "function ArrayRendererManager() {\n var _me = this;\n /*\n * Store the registered renderers\n */\n _me._arrayRenderers = {};\n\n /*\n * Reg...
[ "0.69486034", "0.6264941", "0.5402885", "0.5144433", "0.513916", "0.5072191", "0.497936", "0.49547544", "0.49286628", "0.49151173", "0.49019745", "0.485143", "0.4849316", "0.48320988", "0.48073265", "0.47829896", "0.47735152", "0.47659725", "0.47639483", "0.47608742", "0.4745...
0.83203274
0
List of renderers for this LOD level.
set renderers(value) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get renderers() {}", "get BasedOnRenderers() {}", "set BasedOnRenderers(value) {}", "getRenderer() {\n return this.renderer;\n }", "function ArrayRendererManager() {\n var _me = this;\n /*\n * Store the registered renderers\n */\n _me._arrayRenderers = {};\n\n /*\n * Register...
[ "0.83203274", "0.6264941", "0.5402885", "0.5144433", "0.513916", "0.5072191", "0.497936", "0.49547544", "0.49286628", "0.49151173", "0.49019745", "0.485143", "0.4849316", "0.48320988", "0.48073265", "0.47829896", "0.47735152", "0.47659725", "0.47639483", "0.47608742", "0.4745...
0.69486034
1
The screen relative height to use for the transition [01].
get screenRelativeTransitionHeight() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set screenRelativeTransitionHeight(value) {}", "function screenHeight() {\n return Math.max(window.outerHeight, window.screen.height);\n}", "get worldScreenHeight()\n {\n return this.screenHeight / this.scale.y;\n }", "get screenHeightInWorldPixels()\n {\n return this.screenHeight /...
[ "0.8216487", "0.7499551", "0.7365901", "0.7320679", "0.7245203", "0.71566397", "0.71415335", "0.7089132", "0.7059679", "0.70075166", "0.6965492", "0.690643", "0.6818608", "0.68142813", "0.67633814", "0.6762472", "0.67425716", "0.67222095", "0.67213947", "0.6709064", "0.661094...
0.8423638
0
The screen relative height to use for the transition [01].
set screenRelativeTransitionHeight(value) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get screenRelativeTransitionHeight() {}", "function screenHeight() {\n return Math.max(window.outerHeight, window.screen.height);\n}", "get worldScreenHeight()\n {\n return this.screenHeight / this.scale.y;\n }", "get screenHeightInWorldPixels()\n {\n return this.screenHeight / this...
[ "0.84247804", "0.7497406", "0.7363672", "0.73181784", "0.72430664", "0.7156788", "0.7139692", "0.7087396", "0.70595765", "0.70055354", "0.69654703", "0.69047964", "0.6820089", "0.68136835", "0.67632055", "0.6762115", "0.67421484", "0.6722431", "0.6720586", "0.67068887", "0.66...
0.8217658
1
Allows you to set a request specific processing pipeline
withPipeline(pipeline) { this.data.pipes = pipeline.slice(0); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setRequestDispatcher(fn) {\n\t\tcustomRequestDispatcher = fn;\n\t}", "function requestPipelineMethod(alwaysRun) {\r\n if (alwaysRun === void 0) { alwaysRun = false; }\r\n return function (target, propertyKey, descriptor) {\r\n var method = descriptor.value;\r\n descriptor.value = fun...
[ "0.53287864", "0.5303765", "0.52859885", "0.5270845", "0.5270845", "0.5270845", "0.5261588", "0.5231558", "0.5230794", "0.51868", "0.516634", "0.50952655", "0.5074302", "0.5074025", "0.48890197", "0.48835373", "0.48115104", "0.4804819", "0.4802935", "0.47586626", "0.47515488"...
0.5450776
0
Adds this query to the supplied batch
inBatch(batch) { if (this.hasBatch) { throw Error("This query is already part of a batch."); } if (objectDefinedNotNull(batch)) { batch.track(this); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_batch (batch, callback) {\n this._isBatch = true\n this._query(batch, callback)\n }", "function pushQuery(query) {\n if (!query) return;\n\n if ((0, _lodash.isString)(query)) {\n query = {\n sql: query\n };\n }\n\n if (!query.bindings) {\n query.bindings = this.formatter.bindings;\n }\...
[ "0.6738695", "0.62983817", "0.5925207", "0.58854264", "0.58535326", "0.5627194", "0.55285007", "0.546938", "0.5407068", "0.5383476", "0.5383476", "0.5381393", "0.5381393", "0.5381393", "0.5381393", "0.5381393", "0.5381393", "0.5381393", "0.5381393", "0.5381393", "0.5381393", ...
0.7309068
0
Indicates if the current query has a batch associated
get hasBatch() { return objectDefinedNotNull(this.data.batch); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "inBatch(batch) {\n if (this.hasBatch) {\n throw Error(\"This query is already part of a batch.\");\n }\n if (objectDefinedNotNull(batch)) {\n batch.track(this);\n }\n return this;\n }", "hasQuery() {\n return this.native.hasQuery();\n }", "e...
[ "0.68014437", "0.66077596", "0.6111962", "0.6043703", "0.6012763", "0.5928788", "0.58431214", "0.57590896", "0.5690101", "0.56549716", "0.565025", "0.562297", "0.5602865", "0.5594791", "0.5577973", "0.5573363", "0.55442584", "0.5531841", "0.546872", "0.5464556", "0.54601896",...
0.79336846
0
The batch currently associated with this query or null
get batch() { return this.hasBatch ? this.data.batch : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get batch() {\n\t\treturn this.__batch;\n\t}", "function getBatching() {\n return internal.batching;\n }", "inBatch(batch) {\n if (this.hasBatch) {\n throw Error(\"This query is already part of a batch.\");\n }\n if (objectDefinedNotNull(batch)) {\n ...
[ "0.7222986", "0.6531854", "0.6373762", "0.630438", "0.63001215", "0.59076613", "0.5759563", "0.55740994", "0.5562678", "0.5538384", "0.5280169", "0.52327234", "0.5188413", "0.5173921", "0.5144791", "0.51338464", "0.5104078", "0.50671875", "0.5038801", "0.50184035", "0.5008587...
0.78698975
0
Gets the parent url used when creating this instance
get parentUrl() { return this.data.parentUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParent() {\n var url = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi);\n var parts = url.split(\"/\");\n return parts[4];\n}", "get parent() {\n return this._routerState.parent(this);\n }", "get parent() {\n return this._routerState.parent(this);\n }", "get parent(...
[ "0.6989179", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.69387746", "0.6665967", "0.6610856", "0.65907496", ...
0.7857265
0
Hash password with SHA256
function hash(password) { return crypto.createHash('sha256').update(password).digest('hex'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "passwordHash(pass, salt) {\n\t\t//sha256\n\n\t\treturn crypto.createHash('sha256').update(pass + salt).digest('hex')\n\n\t\t//return \"12\" + pass + salt + \"34\";\n\t}", "function hash(pwd) {\n var shaObj = new jsSHA(\"SHA-256\", \"TEXT\");\n var coeff = 1000 * 5;\n var date = Date.now(); //or use any other...
[ "0.77004504", "0.7296462", "0.71952206", "0.7159546", "0.71093524", "0.7105408", "0.70843464", "0.7053566", "0.69599736", "0.6931698", "0.69187826", "0.6884453", "0.68699855", "0.6865787", "0.68606025", "0.68606025", "0.6809191", "0.67860043", "0.6722862", "0.67223245", "0.67...
0.805794
0
Create a new session for the authenticated user. The token is hash(hash(password))
function createSession(username, password, callback) { getAuth(username, password, function(err, resp) { if(_.isEmpty(resp)) { throw new Error('Could not find any records'); } conn.query( 'insert into session set ?', { token: hash(resp[0].password_hash), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sessionCreate(req, res) {\n User\n .findOne({ email: req.body.email })\n .then((user) => {\n if(!user || !user.validatePassword(req.body.password)) {\n res.status(401).render('sessions/new', { message: 'Unrecognised credentials' });\n }\n //activity log for a current userId\n ...
[ "0.6532519", "0.6385722", "0.6325375", "0.6187545", "0.6132167", "0.61111283", "0.6078221", "0.60772675", "0.60682964", "0.60148156", "0.5994828", "0.5977917", "0.5975696", "0.5969119", "0.59398055", "0.59072936", "0.5904206", "0.5900934", "0.5891175", "0.5863691", "0.5814075...
0.6917927
0
callback function on map error
function mapError(err){ VM.isMapError(true); VM.mapError("<img class='error-gif' src='https://media.giphy.com/media/gMq5BfFDVXi8M/giphy.gif'><p class='error-text'>"+ "Sorry,Maps not loaded,try again <br> Reason: "+err+"</p>" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapError() {\n global.appInit('failure');\n console.error('Loading Google Maps API failed!');\n }", "function failedMaps( error ){\n\tconsole.log(error);\n\tinitMaps( new google.maps.LatLng(50.776585,6.083612) );\n}", "function mapError() {\n alert(\"Map could not be loaded, please try again...
[ "0.64104664", "0.6380608", "0.6379415", "0.63339716", "0.6301707", "0.62765133", "0.6228923", "0.6114744", "0.6110992", "0.6105052", "0.60787815", "0.6071619", "0.6058299", "0.6055827", "0.6047297", "0.59303206", "0.59303206", "0.59280896", "0.59048253", "0.59048253", "0.5904...
0.7037712
0
update drug group selection
function btnUpdateDrugGroupSelection(object) { // get the practices added to focus group var orgs = getOrgs(); if (orgs.length == 0) { alert('Please select practices as part of focus group.'); return; } var org = orgs.join(); // check if a specific drug group is selected drug...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEditGroup(selection) {\n\n console.log(selection);\n\n //get the svg id and type of the text under the button\n var svgGroupId = d3.select(selection.parentNode).attr('id');\n var svgGroupType = svgGroupId.slice(0, -1); //get the group type: aux\n var svgGroupNum = parseInt(svgGroupId.sli...
[ "0.68545854", "0.65744036", "0.64925134", "0.63394505", "0.6284825", "0.62825364", "0.6251971", "0.6206007", "0.61791545", "0.6172679", "0.616601", "0.61023885", "0.6086163", "0.6083434", "0.6082171", "0.6018344", "0.5972318", "0.59709924", "0.59542876", "0.5936803", "0.58849...
0.6671045
1
update chapters cost plot
function updateChapterpCostsPlot() { var traces = []; var chs = []; var month = latest['Jan 18']; var orgs = getOrgs(); for (var index = 0; index < chapters.length; index++) { chs.push('ch' + chapters[index]); } for (var index = 0; index < orgs.length; index++) { var costs ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_viz2()\n{\n percentages = run_calculations(GLOBAL.question, GLOBAL.selected_countries);\n create_viz(GLOBAL.question, percentages)\n}", "function updateCost() {\n TOTAL_COST.textContent = `Total: $${costCount}`;\n }", "function updateInfo(){\n $('#info-text').html(\"($\"+value+\", ...
[ "0.6017805", "0.5907598", "0.5659663", "0.5603038", "0.55857533", "0.5579822", "0.5544194", "0.5487793", "0.54720217", "0.54611725", "0.54558146", "0.5455189", "0.5437675", "0.54042095", "0.53948003", "0.5385179", "0.53641945", "0.53628284", "0.53554946", "0.53478056", "0.533...
0.7709139
0
get drug group code
function getDrugGroupCode(groupName) { return drugGroupBnfMapping[groupName]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async pRandGroup(string, data) {\n string = replacer(string,\"-\")\n const $ = await pRCL(\"group\",string)\n const bool = $('title').text().slice(0, 3) == \"404\";\n return await this.#pRandDataGiver($,string,\"pRandGroup\",data,bool,\"group\")\n }", "function getGroup() {\n\t\t\t...
[ "0.63302296", "0.62432283", "0.6083942", "0.6057007", "0.5972805", "0.59663767", "0.59626746", "0.59626746", "0.59110606", "0.58823395", "0.58372855", "0.5832882", "0.5756026", "0.5751907", "0.5747354", "0.5734045", "0.57068926", "0.56191754", "0.56083083", "0.56071514", "0.5...
0.8006287
0
update group costs plot
function updateGroupCostsPlot() { var traces = []; var orgs = getOrgs(); var months = Object.keys(trend_dates); for (var dgIndex in drugGroupSelected) { var dgName = drugGroupSelected[dgIndex]; var dg = getDrugGroupCode(dgName); for (var index = 0; index < orgs.length; index++) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateChart(selectedGroup) {\n // recompute density estimation\n //kde = kernelDensityEstimator(kernelEpanechnikov(7), x.ticks(40))\n //var density = kde( data\n // .filter(function(d){ return d.Species == selectedGroup})\n // .map(function(d){ return +d.Sepal_Length...
[ "0.66570336", "0.65379167", "0.650813", "0.6393946", "0.6317392", "0.6267001", "0.61359394", "0.6082507", "0.60767484", "0.60061413", "0.59867895", "0.5960329", "0.59438765", "0.59378564", "0.59038", "0.5877206", "0.58698803", "0.5838846", "0.58370996", "0.5834585", "0.582888...
0.7479389
0
This function adds a quote to the table 'quotes'.
function addQuote(quote) { //The games_id comes from the props (either an onClick from GamesView, or from the URL) let newQuote = { quote, games_id }; //Post the quote to the database let options = { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringif...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newQuote(quote) {\n\tquotes.push(quote);\n\tdocument.querySelector(\".quote q\").innerText = quote;\n}", "function addQuotes() {\n // ask the user to input the author and then the quote\n inquirer.prompt([\n {\n type: \"input\",\n name: \"author\",\n message: \"Please input the autho...
[ "0.7025852", "0.66694397", "0.64252514", "0.6419739", "0.62212616", "0.61904895", "0.60094416", "0.5808845", "0.57950944", "0.5776773", "0.57414544", "0.57370144", "0.57338893", "0.5686852", "0.56710833", "0.56511587", "0.55625963", "0.5560641", "0.5560005", "0.5520714", "0.5...
0.7100271
0
Grab Master Character URL List
function characterUrlList(req, res) { // Scrape top player for all character links axios.get('https://swgoh.gg/u/%C3%ADn%20dragons%20blood/collection/') .then(function (response) { const $ = cheerio.load(response.data) var characterList = $('.char-portrait-full-link') var urlNames = [] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get targetsUrls() {\n return this.openurl.map(m => (`${this.lookupURL}?ip=${this.ipAddress}&url=${encodeURIComponent(m)}`));\n }", "function getURLs()\n{\n\tlet urls = [];\n\t\n\tsymbols.forEach(company=>{\n\t\tlet url = standardURL.replace(\"%#company#%\",company);\n\t\turls.push(url);\n\t});\n\t\n\treturn ...
[ "0.56369525", "0.56300306", "0.5628245", "0.55082965", "0.54960275", "0.54495853", "0.5345605", "0.534104", "0.5296542", "0.5283862", "0.5261925", "0.5257291", "0.525565", "0.52406883", "0.52354586", "0.52251697", "0.5194646", "0.5183668", "0.5179713", "0.5127366", "0.5108887...
0.5969027
0
Grab Master Ship URL List
function shipUrlList(req, res) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get targetsUrls() {\n return this.openurl.map(m => (`${this.lookupURL}?ip=${this.ipAddress}&url=${encodeURIComponent(m)}`));\n }", "function createURLS() {\r\n\t$.get('xml/ships.xml', function(xml){\t\t\r\n\t\t\r\n\t\t//Selects the ship from the XML file and loads the information int the DOM\r\n\t\t$(xml).fi...
[ "0.60809207", "0.5940041", "0.5848151", "0.57831895", "0.57700473", "0.5755111", "0.55467397", "0.5508351", "0.5472136", "0.5440887", "0.54319566", "0.53774685", "0.5348127", "0.53371155", "0.5330974", "0.5307555", "0.5298977", "0.5275117", "0.52402043", "0.5236582", "0.52112...
0.67614424
0
Parse out one ship at a time
function shipParser(req, res) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripShip(ship){\r\n return {start: [ship.start[0] + 1, ship.start[1] + 1], end: [ship.end[0] - 1, ship.end[1] - 1]};\r\n}", "function getShip() {\n\tvar ships : GameObject[] = GameObject.FindGameObjectsWithTag(\"Ship\");\n\tvar rnd : int = Random.value * (ships.length - 1);\n\treturn ships[rnd];\n\t\n...
[ "0.561562", "0.55147886", "0.5487925", "0.5455368", "0.5445486", "0.53714067", "0.53516614", "0.5312984", "0.5311134", "0.53110033", "0.5273962", "0.52686006", "0.5261242", "0.5259026", "0.52328944", "0.5206791", "0.5192341", "0.5141306", "0.50809", "0.5079085", "0.5075301", ...
0.5901924
0
options.paths = [] options.uploadDir = ''
function upload(options) { var uploadedNum = 0 var uploadedFiles = [] var paths = options.paths || [] var uploadDir = options.uploadDir || config.uploadDir var uploadUrl = config.apiUrl + 'upload/uploadImage.php' return new Promise(function (resolve, reject) { if (paths.length == 0) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uploadFiles(files) {\n return uploadfs.root.populate(files, function(){});\n }", "upload() {\n\t\treturn true;\n\t}", "supportsUploads() {\n\t\treturn true;\n\t}", "initializeFileUpload(initializeUploadUrl, filename) {\n const payload = [\n {\n key: filename,\n },\n ...
[ "0.6413628", "0.63312316", "0.626234", "0.6145839", "0.6105288", "0.6031589", "0.5985968", "0.58607906", "0.5832453", "0.5742604", "0.5733311", "0.5730659", "0.57273203", "0.56952137", "0.5690552", "0.5685832", "0.5644983", "0.562111", "0.5597199", "0.55837506", "0.5581838", ...
0.6467703
0
post comment data to api
function postCommentDataToApi(data) { fetch(`https://5e0df4b536b80000143db9ca.mockapi.io/etranzact/v1/article/${data.articleId}/comments`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data) }).then(result => { if (result) { window.location....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postComment() {\n \n restApi.postFeedback(feedbackCtrl.objectMessage)\n .success(function (data) {\n })\n .error(function (error) {\n $scope.status = 'Unable to load customer data: ' + error.message;\n });\n }", "postComment(_id...
[ "0.7713625", "0.75287277", "0.7491456", "0.7480471", "0.7391697", "0.7369954", "0.73323727", "0.73053694", "0.7259202", "0.7251033", "0.72187465", "0.71594846", "0.7154657", "0.71002793", "0.7083446", "0.7056173", "0.6992707", "0.6988288", "0.69738024", "0.6962113", "0.692998...
0.8131902
0
update comment data to api
function updateCommentDataToApi(data) { console.log(data) fetch(`https://5e0df4b536b80000143db9ca.mockapi.io/etranzact/v1/article/${data.articleId}/comments/${data.id}`, { method: 'PUT', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data) }).then(result => { if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getComment(idpost) {\n fetch(\"http://127.0.0.1:8000/api/post/comment/\" + idpost)\n .then(response => {\n response.json().then((data) => {\n console.log(data);\n this.updateComment(data);\n });\n });\n }", "@acti...
[ "0.76291", "0.74935997", "0.7468171", "0.7432492", "0.72013855", "0.7195693", "0.71734923", "0.71324426", "0.7040648", "0.7005345", "0.6894395", "0.68886757", "0.6852472", "0.68456614", "0.6837887", "0.6837536", "0.68024075", "0.6761404", "0.6739433", "0.6733475", "0.67316216...
0.8086059
0
items in the alarm
function alarmItem(id, start, type, tone, snooze) { this.id = id; this.start = start; this.type = type; this.tone = tone; this.snooze = snooze; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gotAll(alarms) {\n\t\t\n\t\t// If there are active alarms\n\t\tif (alarms.length > 0) {\n\n\t\t\t// Get these alarms\n\t\t\tfor (var alarm of alarms) {\n\t\t\t\t// Push alarm object properties into activeAlarms array\n\t\t\t\tactiveAlarms.push([alarm.name, alarm.scheduledTime]);\n\t\t\t}\n\n\t\t\t// Show ...
[ "0.64110655", "0.58739513", "0.5598445", "0.558583", "0.5577573", "0.5575785", "0.5553782", "0.5524682", "0.55077857", "0.54820925", "0.5464577", "0.54641193", "0.5458046", "0.54563934", "0.5447409", "0.5447409", "0.54154724", "0.54129326", "0.534772", "0.5332294", "0.5329491...
0.6216067
1
Extracts the image name from the current image
extractImageName() { if (this.state.currentImage.constructor === File) { return this.state.currentImage.name; } else { return this.parseURLForName(this.state.currentImage.src); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImageName(img) {\n let _DIVIDER;\n if (img.match('/') != null) {\n _DIVIDER = '/';\n } else {\n _DIVIDER = '\\\\';\n }\n return img.split(_DIVIDER).pop();\n }", "function imageName(imageSrc) {\n const image...
[ "0.7920904", "0.78808135", "0.76753026", "0.7071618", "0.7051428", "0.69416547", "0.68447685", "0.68158734", "0.67199135", "0.6421731", "0.6416172", "0.6318177", "0.62947845", "0.6294219", "0.6276378", "0.62384963", "0.62224317", "0.6221677", "0.62007856", "0.6196099", "0.618...
0.869048
0
Extracts the file type / extension of the current image
extractFileType() { if (this.state.currentImageURL == "") { return ""; } var fileName = this.parseURLForName(this.state.currentImageURL); var fileExtension = fileName.substring(fileName.indexOf(".") + 1); if (fileExtension == undefined || fileExtension == null || fileExtension == "") { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get fileType() {\n let filenameParts = this.name.split('.')\n let imageType;\n if(filenameParts.length > 1) {\n if(filenameParts[-1] == \"jpg\") {\n return \"jpeg\";\n } else {\n return filenameParts[-1];\n }\n } else {\n return 'png';\n }\n }", "function getType...
[ "0.79190004", "0.7802756", "0.71857715", "0.6979337", "0.69571406", "0.69315606", "0.6920371", "0.6835011", "0.6827966", "0.67843676", "0.6760611", "0.67547184", "0.6732971", "0.6714643", "0.6695633", "0.6666482", "0.6662365", "0.6654792", "0.6642695", "0.6633863", "0.6602545...
0.8394402
0
Store results within state
handleResults(results){ this.setState({ results: results }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateResults() {\n const temp = this.state.renderArray.concat(this.state.everything);\n this.props.changeDisplayData(temp);\n }", "function _initState(){\n itemsProcessed = 0,\n currentId = 1,\n saveResults = {\n $id: currentId++,\n $type: BREEZE_MONGOOSE_NS + '.SaveResul...
[ "0.6531233", "0.6223218", "0.6139454", "0.6093032", "0.60791695", "0.60330313", "0.6000624", "0.6000624", "0.5936125", "0.5920767", "0.5890486", "0.58694565", "0.5864939", "0.5859813", "0.58568084", "0.5836018", "0.5796642", "0.5786798", "0.57692283", "0.57615423", "0.5717813...
0.6564781
0
Recieve new ingredient name from child and pass all the necessary information to to update state to add the new ingredient
handleAddIngredientSubmit(newIngredientName){ console.log('handleAddIngredientSubmit ' + newIngredientName + '!') this.props.addIngredient( this.props.week, // week name this.props.day, // day name this.props.meal, // meal name this.state.name, // dis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addIngredient(e) {\n e.preventDefault();\n setFormData({\n ...formData,\n ingredients: [...formData.ingredients, defaultIngredientObj],\n });\n }", "function addIngredient() {\n const ingredient = {\n name: newIngredient.toLowerCase(),\n amount: 0,\n ...
[ "0.68512607", "0.67763513", "0.6763874", "0.6546588", "0.6525864", "0.65166575", "0.6512146", "0.6488678", "0.64656097", "0.6435843", "0.63696134", "0.6342223", "0.6299478", "0.6207822", "0.6156753", "0.6143557", "0.6142994", "0.6132089", "0.6122461", "0.61076486", "0.6085179...
0.68735397
0
the method that deletes a listed hotel
deleteHotel(hotel){ if(confirm("are you sure you want to delete?")){ this.sendAction('deleteHotel',hotel); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteFavoriteHotels(req, res, next) {\n getDB().then((db) => {\n db.collection('favoritehotels')\n .findAndRemove({ _id: ObjectID(req.params.id) }, (removeErr, doc) => {\n if (removeErr) return next(removeErr);\n res.removedHotels = doc;\n db.close();\n next();\n });\n re...
[ "0.6723824", "0.6720077", "0.64734674", "0.63234705", "0.62180656", "0.61733454", "0.6172311", "0.6094949", "0.60862094", "0.6066984", "0.60536915", "0.5990208", "0.597087", "0.5948082", "0.59102225", "0.5888295", "0.587543", "0.5856634", "0.58513105", "0.58505577", "0.583122...
0.68260574
0
the method that is used to update an existing hotel
update(hotel,params){ this.sendAction('update',hotel,params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editFavoriteHotel(req, res, next) {\n getDB().then((db) => {\n db.collection('favoritehotels')\n .findAndModify({ _id: ObjectID(req.params.id) }, [] /* sort */,\n { $set: req.body.hotel }, { new: true }, (updateError, doc) => {\n if (updateError) return next(updateError);\n\n // re...
[ "0.6835563", "0.68204457", "0.68204457", "0.68204457", "0.6740008", "0.6298331", "0.6257378", "0.62429917", "0.62420434", "0.6090784", "0.60016125", "0.593932", "0.59085244", "0.59052926", "0.58825517", "0.58822215", "0.5877414", "0.58661085", "0.5843159", "0.5839003", "0.581...
0.8027207
0
This example creates a simple polygon representing the Bermuda Triangle. Note that the code specifies only three LatLng coordinates for the polygon. The API automatically draws a stroke connecting the last LatLng back to the first LatLng.
function initMap() { const map = new google.maps.Map(document.getElementById("map"), { zoom: 5, center: { lat: 24.886, lng: -70.268 }, mapTypeId: "terrain", }); // Define the LatLng coordinates for the polygon's path. Note that there's // no need to specify the final coordinates to complete the poly...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addZone(listaVertices) {\n\n zona = new google.maps.Polygon({\n paths: listaVertices,\n map: map,\n // fillColor: '#fff',\n strokeColor: '#fff',\n })\n}", "function drawPolygon(coordinates){\n\tctx.beginPath();\n\tctx.moveTo(coordinates[0][0], coordinates[0][1]);\n\tfor...
[ "0.6446862", "0.6230013", "0.61617476", "0.614615", "0.60955864", "0.60278493", "0.60215753", "0.602135", "0.6004224", "0.5995754", "0.5994064", "0.59493124", "0.5932723", "0.5892932", "0.5875078", "0.58629644", "0.58561033", "0.58554184", "0.58499986", "0.5849959", "0.583862...
0.7072133
0
transitions to extra resources panel by showing extra resources panel and hiding answer panel
function toggleResSection() { $("#answer").hide(); $("#extra_resources").show(); $("#nav_ans > pre").css("color","rgba(0,0,0,0)"); $("#nav_res > pre").css("color","black"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareToShow() {}", "function prepareToShow() {}", "showQuestion() {\n\t\t$('#content').empty();\n\t\tthis.questionList[this.currentQuestion].display('#content');\n\t\tfor (var alternative of this.alternativeList) {\n\t\t\tif (alternative.question_questionId === this.questionList[this.currentQuestion...
[ "0.60577244", "0.60577244", "0.60126626", "0.5935197", "0.593062", "0.5918962", "0.58979654", "0.58536613", "0.5806474", "0.5789457", "0.5779808", "0.5745946", "0.5722922", "0.57081056", "0.56682014", "0.566574", "0.56511503", "0.56424975", "0.563929", "0.5638694", "0.5621483...
0.6573265
0
switch to review mode by hiding progress panel and displaying feedback panel etc.
function setUpReviewEnvironment(){ $("#right_nav").hide(); $("#feedback_container").show(); $("#finish_review_button").show(); toggleAnsSection(); $("#solution, #justification").prop("readonly",true); $("#submit_button").hide(); $("#home_button").click(function(){...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reviewMyAnswers() {\n if (FinalExam == EXAM_POSITION_BYCOURSE) {\n\n SetMode(\"review\");\n ShowFinalExamTestQuestion(1);\n document.getElementById(\"showQuestionNumber\").style.visibility = 'visible';\n document.getElementById(\"submittest\").style.visibility = 'visible';\n return;\n }\n...
[ "0.66815746", "0.6395616", "0.6366412", "0.62903345", "0.62622267", "0.61441976", "0.59288406", "0.5922464", "0.59171695", "0.5860236", "0.5803967", "0.57783073", "0.57775503", "0.57485056", "0.5718747", "0.571028", "0.57088816", "0.5695519", "0.5675208", "0.56473243", "0.563...
0.6623769
1
store user's provided feedbacks across pages
function storeFeedback(feedback, feedbackType){ var feedback_list; if(feedbackType === "OWN"){ feedback_list = JSON.parse(sessionStorage.ownFeedbacks); feedback_list.push(feedback); sessionStorage.ownFeedbacks = JSON.stringify(feedback_list); } else if(feedbac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function savefeedback() {\n savingFeedback = true;\n var restFrag = '_update/createNewSuggestion';\n var doc = new Object();\n doc.page = \"quiz\";\n doc.block = window['kToggle']['activeBlock'];\n doc.version = 'v02';\n doc.suggestion = $(\"#textarea\").val();\n doc.trackingID = getUniqueVisitID();\n i...
[ "0.6604315", "0.6546175", "0.64410406", "0.6350991", "0.6173005", "0.6172048", "0.6131157", "0.6062642", "0.60168326", "0.5991589", "0.58827686", "0.5840538", "0.5829771", "0.5827676", "0.5787058", "0.57666487", "0.5730887", "0.5721274", "0.5716588", "0.5710494", "0.5685259",...
0.6826952
0
populate feedback panel with stored user's feedbacks
function populateFeedback(feedbackType){ var feedback_list; if(feedbackType === "OWN"){ feedback_list = JSON.parse(sessionStorage.ownFeedbacks); } else if(feedbackType === "PEER"){ feedback_list = JSON.parse(sessionStorage.peerFeedbacks); } for (i = 0; i <...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayFeedback() {\r\n var check = localStorage.getItem(\"customer\");\r\n if(check == null){\r\n return;\r\n }\r\n var a = localStorage.getItem(\"customer\").split(\"\\n\");\r\n var b = localStorage.getItem(\"rating\").split(\"\\n\");\r\n var c = localStorage.getItem(\"feedback\").split(\"\\n\"...
[ "0.6459252", "0.6429155", "0.6167648", "0.60670453", "0.60519445", "0.60435724", "0.5977185", "0.5974723", "0.5936652", "0.5874801", "0.57991934", "0.5758009", "0.5732406", "0.5679913", "0.56459045", "0.56180596", "0.56116265", "0.5609685", "0.5583614", "0.5571487", "0.556685...
0.6899888
0
define a Door constructor function. A door instance exposes the two methods open and close that chage the values of a state property respectively to open and closed.
function Door () { this.state="open"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SecurityDoor (){\n\tDoor.call(this);\n}", "function mainDoor() {\n\t\n\tPhaser.State.call(this);\n\t\n}", "createDoor() {\r\n this.door = this.physics.add.image(this.level.door.x, this.level.door.y, \"door\").setOrigin(0.5,1);\r\n this.door.body.allowGravity = false;\r\n }", "constr...
[ "0.623029", "0.6160745", "0.6037868", "0.6009402", "0.5924697", "0.5924697", "0.58925277", "0.58132553", "0.57900953", "0.5675037", "0.5661501", "0.56524086", "0.5651368", "0.5554328", "0.5542667", "0.5532731", "0.5531693", "0.5513751", "0.55078834", "0.5505716", "0.5488577",...
0.7497154
0
exercise01b define a SecurityDoor constructor function that inherits the bhehaviour from Door but once closed a security_door instance can be locked via the lock method. Invoking the unlock method, bring the security_door back to the close state.
function SecurityDoor (){ Door.call(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unlock() {\n this._locked = false;\n }", "unlock() {\n this._locked = false;\n }", "_unlock() {\n this._locked = false;\n }", "function HandleUnlock() {}", "function unlock()\n{\n\t// your crazy stuff here...\n}", "unlock() {\n\t this.isLocked = false;\n\t this.refresh...
[ "0.5897486", "0.5897486", "0.5862759", "0.583625", "0.5486294", "0.5434415", "0.5428524", "0.53555596", "0.52949244", "0.5241157", "0.52025896", "0.5199442", "0.5172", "0.51614743", "0.5127272", "0.5072725", "0.50645816", "0.50491935", "0.49853352", "0.49793497", "0.4930798",...
0.7921285
0
Functions Init Celebrity Gossip Relevance Chart
function initCelebrityGossipRelevanceChart($celeberity_chart, x, y) { // Create chart let celeberity_chart = new Chart($celeberity_chart, { type: 'bar', options: { scales: { yAxes: [{ ticks: { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initGraphs() {\r\n \r\n}", "init() {\n\t\t\t\t$svg = $sel.append('svg').attr('class', 'pudding-chart');\n\t\t\t\tconst $g = $svg.append('g');\n\n\t\t\t\t// setup viz group\n\t\t\t\t$links = $g.append('g').attr('class', 'g-links');\n\t\t\t\t$nodes = $g.append('g').attr('class', 'g-nodes');\n\t\t\t\t$let...
[ "0.64403015", "0.6403729", "0.63735735", "0.63404393", "0.62930685", "0.6288229", "0.6226427", "0.6215295", "0.6210645", "0.620502", "0.6145801", "0.6144137", "0.6139227", "0.6126091", "0.61160135", "0.6106129", "0.610477", "0.6084453", "0.6065096", "0.6044247", "0.6026788", ...
0.6812406
0
Init Follower Gossip Relevance Chart
function initFollowerRelevanceChart($follower_chart, x, y) { let follower_chart = new Chart($follower_chart, { type: 'bar', options: { scales: { yAxes: [{ gridLines: { color: Charts.colors.gray[900], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initGraphs() {\r\n \r\n}", "init() {\n\t\t\t\t$svg = $sel.append('svg').attr('class', 'pudding-chart');\n\t\t\t\tconst $g = $svg.append('g');\n\n\t\t\t\t// setup viz group\n\t\t\t\t$links = $g.append('g').attr('class', 'g-links');\n\t\t\t\t$nodes = $g.append('g').attr('class', 'g-nodes');\n\t\t\t\t$let...
[ "0.6007871", "0.59852916", "0.5984121", "0.59542626", "0.5858915", "0.5822383", "0.58155894", "0.58114946", "0.5791378", "0.5778736", "0.57472545", "0.57377017", "0.57056266", "0.5640815", "0.5624369", "0.56173444", "0.56027645", "0.5599332", "0.55932313", "0.55461574", "0.54...
0.67679274
0
retrieving the index of the value in BASE62 string
function getIndex(value) { if (!isNaN(value * 1)) { return BASE62.charAt(value); } if (value === value.toUpperCase()) { return 35 + value.charCodeAt(0) - 64; } return 9 + value.charCodeAt(0) - 96; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getIndex(t) {\n\t\treturn t.charCodeAt(0) - \"a\".charCodeAt(0);\n\t}", "function find(x, base32) {\n\n //x is any base32 character\n var ret = -1;\n for (i = 0; i < base32.length; i++) {\n if (base32[i] === x) {\n ret = i;\n break;\n }\n }\n return ret;\n}", ...
[ "0.65434474", "0.6378973", "0.63755715", "0.62850416", "0.62850416", "0.6264552", "0.61868757", "0.61388385", "0.60835344", "0.60396713", "0.6032773", "0.6000377", "0.5953635", "0.5950561", "0.59464633", "0.5927746", "0.59005266", "0.58610755", "0.5856349", "0.5839476", "0.58...
0.7897845
0
create market by user
static create(req, res, next) { User.findById({ _id: req.userData.id, }) .then((user) => { console.log(user); if (user) { if (user.resources.golds >= 30 && user.resources.foods >= 10) { const resources = user.resources; resources.golds -= 30; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTrade() {\n fetch(`${apiUrl}/trade`, {\n // Adding method type\n method: \"POST\",\n // Adding headers to the request\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n },\n // Adding body or contents to send to bac...
[ "0.6400124", "0.61227924", "0.5996638", "0.58249867", "0.57981473", "0.5780239", "0.5771865", "0.5688469", "0.56257313", "0.5619344", "0.56069046", "0.5599803", "0.55993", "0.55736893", "0.55666673", "0.55604225", "0.5545567", "0.5544018", "0.5541262", "0.55187553", "0.551686...
0.6127406
1
Validates constraints, if any. This function will throw if the provided value does not respect those constraints.
validateConstraints(mapper, value, objectName) { const failValidation = (constraintName, constraintValue) => { throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); }; if (mapper.constraints && value != undefi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validate(value) {\n if (value < 0 || value > 1) throw new Error(\"Please enter a valid value.\");\n }", "validate(value) {\n if (value < 0) throw new Error('Valor negativo para nota');\n }", "static get constraints() {\n return ['required'];\n }", "validate(value){\n if...
[ "0.655188", "0.6529605", "0.6448728", "0.63513815", "0.63185805", "0.6243196", "0.61096585", "0.6084472", "0.60464925", "0.57098526", "0.5660779", "0.55779743", "0.5568982", "0.5562539", "0.55061996", "0.54270536", "0.5404781", "0.5404781", "0.5404781", "0.5404781", "0.539029...
0.6839943
0
Serialize the given object based on its metadata defined in the mapper.
serialize(mapper, object, objectName, options = {}) { var _a, _b, _c; const updatedOptions = { rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "", includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false, xmlCharKey: (_c = opti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "serialize(mapper, object, objectName, options = { xml: {} }) {\n var _a, _b, _c;\n const updatedOptions = {\n xml: {\n rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.xml.includeRoot) !== null && _b !==...
[ "0.6996822", "0.6335554", "0.62022644", "0.62022644", "0.5881635", "0.5739187", "0.5620642", "0.5597316", "0.55660576", "0.554981", "0.55276895", "0.54964185", "0.5490166", "0.53464186", "0.5322822", "0.5304249", "0.5303765", "0.5286629", "0.5284296", "0.5273263", "0.5265368"...
0.7021111
0
Opens the settings menu
openSettingsMenu() { if(this.menuSettings.hasGameStarted) { this.settings_save.style.display = 'none'; this.settings_cancel.style.display = 'inline-block'; this.player_number.style.display = 'none'; } else { this.settings_save.style.display = 'inline-block'; this.settings_cancel.style.display = 'no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function open_settings() {\n\t\tsettings_dialog.open();\n\t}", "function dialog_open() {\n\t\tsettings_dialog.open();\n\t}", "function clickedSettings(e) {\n\tvar settingsController = Alloy.createController('settings');\n\tvar win = settingsController.getView();\n\n\tif (Alloy.Globals.navgroup) {\n\t\tAlloy.Gl...
[ "0.86225724", "0.78238773", "0.7808606", "0.77557385", "0.7744162", "0.7638471", "0.7342001", "0.7318117", "0.7265629", "0.72278345", "0.71929085", "0.717475", "0.7156141", "0.712646", "0.7115881", "0.7066287", "0.70225567", "0.6854506", "0.6831035", "0.67928165", "0.67629606...
0.8066251
1
Closes the settings menu
closeSettingsMenu() { this.settings_menu.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeSettings() {\n var HIDDEN_THREADS = loadSettings();\n $('.rage_settings').remove();\n hideThreads(HIDDEN_THREADS);\n}", "function closeMainSettingsModal() {\n mainSettingsModal.style.display = 'none';\n}", "function closeMenu(menu) {\n choices = $(menu).find(\".choices\")\n ...
[ "0.7183226", "0.71515864", "0.70753884", "0.7062569", "0.69539917", "0.68458873", "0.68214506", "0.66889304", "0.662274", "0.6619404", "0.6616879", "0.6607496", "0.65616524", "0.65346557", "0.65258974", "0.64159465", "0.6411363", "0.640261", "0.6380028", "0.63660896", "0.6354...
0.89878416
0
Saves the selected settings and starts the game
saveSettingsMenu() { const player_number = this.player_number.value; Player.setupPlayers(player_number); // start the game this.menuSettings.hasGameStarted = true; this.settings_menu.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveSettings() {\n $('*[data-settings]').each(function() {\n conf.set($(this).attr(\"data-settings\"), $(this).val());\n });\n\n renderApp(true);\n}", "function saveSettingsToObject() {\n preferences.steamUserName = $(\"#steamUserName\").val();\n preferences.appearanceSettings = {\n \...
[ "0.6916582", "0.6778486", "0.67632437", "0.66793483", "0.6669981", "0.65828377", "0.658095", "0.6554411", "0.6547943", "0.6523316", "0.6437295", "0.64366275", "0.63512284", "0.6330641", "0.6317223", "0.6312108", "0.63071734", "0.6298526", "0.62586546", "0.62273234", "0.619439...
0.7711191
0
Ventana Para seleccionar la Playlist y agregarla
function seleccionarPlaylist(i) { (async() => { const { value: lista } = await Swal.fire({ title: 'Selecciona una Playlist', input: 'select', inputOptions: toObject(nombres), inputPlaceholder: 'Selecciona una Playlist', showCancelButton: true, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadPlaylistItem() {\n // item index in playlist array\n var index = parseInt(this.getAttribute('data-playlist-index'), 10);\n myPlayer.playlist.currentItem(index);\n myPlayer.play();\n }", "function playPlaylist(){\r\n\tif(playlist.length > 0){\r\...
[ "0.6803868", "0.6800449", "0.6782865", "0.67694026", "0.67384887", "0.6710724", "0.66348314", "0.66047865", "0.65788126", "0.6536529", "0.64524734", "0.64524734", "0.64524734", "0.64434576", "0.6433621", "0.64252114", "0.6423632", "0.64006853", "0.6392261", "0.63716173", "0.6...
0.7058998
0
Release 1: Find a Key Value Match input two hashes loop through the length of the hash to be able to iterate through all the information in the hashes check to see if any of the indexes in the first hash is equal to any of the indexes in the second hash if any of the key value pairs match, then return true. If not, ret...
function findingAMatch(hashOne, hashTwo){ PersonalInformationOne = (Object.keys(hashOne)); PersonalInformationTwo = (Object.keys(hashTwo)); for (var x = 0; x < PersonalInformationOne.length; x++) { if (hashOne[PersonalInformationOne[x]] == hashTwo[PersonalInformationOne[x]]){ return true; } } return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function key_value_match(hash1, hash2){\n var is_equal = false\n\n if (hash1[\"age\"] == hash2[\"age\"] || hash1[\"name\"] == hash2[\"name\"]) {\n is_equal = true;\n };\n\n return is_equal;\n}", "function keyMatch(a, b) {\n a = [].concat(a);\n b = [].concat(b);\n for (var i = 0; i < ...
[ "0.73217607", "0.71661025", "0.7018895", "0.7010044", "0.68396443", "0.68203706", "0.6815368", "0.6815368", "0.6815368", "0.6815368", "0.67447263", "0.6603557", "0.65354794", "0.6494332", "0.64884466", "0.64880776", "0.6428129", "0.6391135", "0.6350558", "0.63494563", "0.6320...
0.7724603
0
Factory of interfaces conn mhp connection object interfaceName name of the interface in remote application api methods array of names of methods in appropriate interface
function newInterface(conn, interfaceName, methods) { const interfaceMethods = {}; methods.forEach((methodName) => { interfaceMethods[methodName] = (...args) => { const callback = args.pop(); conn.callMethod(interfaceName, methodName, args, callback); }; }); return interfaceMethods; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getConnectorInterface(_co, _m) {\n return this.getInterface(\"connectors\", _co, _m);\n }", "function Interface(){}", "function Interface () {}", "extend(methods, f) {\n return createInterface(\n methods,\n f,\n this.constructor,\n th...
[ "0.5741843", "0.5681937", "0.5633733", "0.5594242", "0.55874646", "0.55745065", "0.5530057", "0.54631406", "0.5421697", "0.5354536", "0.52726597", "0.5271006", "0.5262451", "0.52538043", "0.52202976", "0.5192598", "0.5164", "0.5146842", "0.51422316", "0.51407665", "0.5130108"...
0.75805205
0
Constructs a new UpdateLoyaltyProgram. Update Loyalty Program
constructor() { UpdateLoyaltyProgram.initialize(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Program() {\n\tthis.updateRate = 2;\n\tthis.control = new Control(this);\n\tthis.createNewProgram();\n}", "async function getDefaultLoyaltyProgram() {\n const { programs } = await loyaltyApi.listLoyaltyPrograms();\n return programs && programs.length > 0 ? programs[0] : null;\n}", "function makeAppl...
[ "0.5965929", "0.5466112", "0.54520947", "0.5401393", "0.51868707", "0.4861262", "0.48524642", "0.48222697", "0.48130104", "0.48023382", "0.47823155", "0.47697294", "0.47418976", "0.4684119", "0.46812543", "0.46675533", "0.46464652", "0.46310678", "0.4615225", "0.46135908", "0...
0.76820004
0
follow: for the given author, toggle between following and unfollowing args: author, isFollow int author the id of the member to follow bool isFollow true to follow and false to unfollow
function follow(authorID, isFollow) { // set the API path for this call const pathAPI = `/follow/${authorID}/${isFollow}/`; console.log(`path = ${pathAPI}`); // send the request to the server fetch(pathAPI) .then(response => { response.json() if (response.ok) { console.log(`response OK`); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function follow_user(user, current_user, follow){\n\n // the boolean follow is passed in from the follow function and determines whether to\n // follow or unfollow a user\n\n if (follow){\n fetch(`/follow`, {\n method: 'POST',\n body: JSON.stringify({\n\n user: user,\n current_user: c...
[ "0.7314781", "0.69848317", "0.6549524", "0.647114", "0.6464905", "0.63861954", "0.6357695", "0.6300448", "0.62950635", "0.62500197", "0.6245306", "0.61344105", "0.6121034", "0.6099636", "0.6086977", "0.6013987", "0.59594804", "0.5957824", "0.59415853", "0.5888377", "0.5881204...
0.77545077
0
toggleLike: for the given post, the button can toggle between "like" and "unlike". args: likeObj html element likeObj the buton associated with post that will toggle when the button has a value onclick "like", a like is associaed with this post and the button is updated. when the button has a value of "unlike", this us...
function toggleLike(likeObj) { // let's find out if the user is liking or unliking with post then send // the correct params to the fetch var current_state; var next_state; if (likeObj.dataset.name.trim().toLowerCase() ==="like") { updateLike(likeObj.dataset.postid, 1); next_state = "unlike"; } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleLike(photo){\n var Liked = photosHash[photo.id].likedByUser;\n var likeCount = photosHash[photo.id].likeCount;\n\n Photo.toggleLike(photo)\n .then(Liked) // set value\n .then(function(like){\n if(like) likeCount(likeCount() + 1)\n...
[ "0.68773913", "0.6665431", "0.6640318", "0.6613465", "0.6535225", "0.6516373", "0.64304084", "0.6362156", "0.6308628", "0.6287072", "0.6176429", "0.6131645", "0.6052443", "0.60342646", "0.6030434", "0.5991163", "0.5976804", "0.59590626", "0.5959004", "0.5957884", "0.59417135"...
0.8380071
0
updateLike updates like information serverside args postId, displayLike int postId = post id that will be liked int isLike = +1 indicates we add a like, 0 indicates we unlike
function updateLike(postId, isLike) { console.log(`entering -- updateLike -- function`) // from the boolean set the integer value for the fetch pathAPI = `posts/${parseInt(postId)}/${parseInt(isLike)}`; console.log(`pathAPI = ${pathAPI}`); fetch(pathAPI) .then(response => response.json()) .then(result ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function likePost(postLike, cb){\n if(cb === undefined) cb = redis.print;\n console.log(\"likePost, postLike=\" + JSON.stringify(postLike));\n \n if (postLike.isLiked) {\n var likeTime = moment().valueOf();\n client.zadd(util.format(KEYS.POST_LIKES, postLike.postId), likeTime, postLike.likerUserId, cb);\...
[ "0.7552005", "0.7440358", "0.73358274", "0.71876144", "0.70074475", "0.6990959", "0.69162863", "0.684423", "0.6839113", "0.6811177", "0.68091947", "0.6783591", "0.6689758", "0.6661079", "0.66593575", "0.6578051", "0.6487145", "0.6473499", "0.64686877", "0.6463089", "0.6452926...
0.81465554
0
Create a function to target the changes to the inputs Create variable to check for sizing, using dataset Look for the names of the variables Set new value for the variables based on events, documentElement, set property Append sizing to the variables
function variableUpdate(e) { const suffix = this.dataset.sizing || ''; document.documentElement.style.setProperty(`--${this.name}`, this.value + suffix); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleUpdate() {\n const suffix = this.dataset.sizing || '';\n // console.log(suffix); to double check in the console\n //we are using the name of each variable which has been defined in the dataset as 'name' to grab the variables of the root document console.log(this.name);//\n document.docum...
[ "0.63659155", "0.5988037", "0.59721506", "0.59470195", "0.59207684", "0.58763736", "0.58715534", "0.57991177", "0.57723904", "0.56725234", "0.56702614", "0.5652254", "0.5602286", "0.55903125", "0.55818814", "0.55687994", "0.5564075", "0.55631614", "0.55565614", "0.5525168", "...
0.6403596
0
Debug method Returns translated source if available
getTranslatedSource() { const extension = this.gl.getExtension('WEBGL_debug_shaders'); return extension ? extension.getTranslatedShaderSource(this.handle) : 'No translated source available. WEBGL_debug_shaders not implemented'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get sourceString() {\n return this.source.contents;\n }", "static printTranslate(_class) {\n const xxx = eval(_class + '.printTranslate');\n if (typeof(xxx) === 'function') {\n xxx();\n }\n }", "function t_translationstring_TranslationString() {}", "_toStringDetails...
[ "0.59098095", "0.58902866", "0.58398336", "0.5816372", "0.5565994", "0.5500169", "0.5484537", "0.5481212", "0.5438771", "0.5438771", "0.5429435", "0.5424269", "0.5396735", "0.538369", "0.5369901", "0.5369901", "0.5369901", "0.5369901", "0.5338434", "0.5331144", "0.5329278", ...
0.71906793
0
The meat of the script. It prompts the user for a character image URL and will fetch it. Then it attempts to extract the character information from the image metadata and performs basic validation on it. If the validation passes, it will update the action bar's value with the load command for the character.
function onClickHandler() { var value = prompt("Enter the character's image URL"); if (!value) { return; } GM_xmlhttpRequest({ method: "GET", url: value, onload: function(response) { if (response.status === 200) { window.exifr.parse(response.r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetPic()\n{\n if (READONLY) {\n return;\n }\n // Get the current path.\n var path = sheet().PicURL.value;\n\n if (path.length == 0)\n path = \"http://\";\n else if (path == \"v4/blank.png\")\n path = \"none\";\n\n // Get a uri from the user.\n var uri = prompt(\"Enter a URI for your chara...
[ "0.5660597", "0.5644911", "0.5572898", "0.5394992", "0.53686744", "0.5255575", "0.52471703", "0.52215385", "0.5201279", "0.519629", "0.51865417", "0.5186449", "0.51824814", "0.5181303", "0.5156702", "0.51502883", "0.5122499", "0.51108915", "0.5098668", "0.5094698", "0.5083893...
0.6978652
0
Determine if we are in either of the Adventure URLs.
function locationIsAdventurePlayPage(location) { if (!location || typeof location !== "string") { return false; } var url = location.split('/').pop(); return url.includes(adventurePlayUrlFragment) || url.includes(mainPlayUrlFragment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isCorrectAhURL() {\n var parser = document.createElement('a');\n parser.href = document.getElementById(\"epp_url\").value;;\n if(parser.hostname === hostNames[2]) {\n var path = parser.pathname.split(\"/\");\n if(path.length < 3) {\n return false;\n } else if(path[1] === \"episodes\" || (...
[ "0.5969806", "0.5885", "0.5757826", "0.5705906", "0.5599405", "0.54730564", "0.5470817", "0.5463998", "0.5395742", "0.53921425", "0.53768134", "0.53358567", "0.53347206", "0.5317116", "0.53109103", "0.5300981", "0.52943087", "0.52895445", "0.5272935", "0.52422523", "0.5217709...
0.6250419
0
A timeout loop that checks every second to see if the action bar is loaded yet.
function timeOut() { clearTimeout(timeoutVal); timeoutVal = setTimeout(function () { const actionBarParent = getLastQuerySelector(actionBarSelector).parentNode; if (!actionBarParent) { consoleLog("Action bar does not exist, restarting loop."); timeOut(); retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onCheatButtonTimeout() {\n // console.log('onCheatButtonTimeout');\n while (gaStateBeforeCheat.length > 0) {\n var back = gaStateBeforeCheat.pop();\n $(back).show();\n }\n\n gGameLocked = false;\n}", "function timeoutCheck() {\n timeout = setTimeout(function() {\n var...
[ "0.57473165", "0.57189715", "0.5715751", "0.56931865", "0.5642481", "0.56420213", "0.5639821", "0.5537957", "0.5521668", "0.5500904", "0.5494358", "0.5494358", "0.5471671", "0.5455649", "0.5449612", "0.5439771", "0.5436718", "0.54178077", "0.5390598", "0.53863657", "0.5368534...
0.6135456
0
Apply any waiting register changes, first in pipe.current, then in later ones. Then clear out the pipe.
flush_pipe() { this.delay_slots(this.pipe.current); this.delay_slots(this.pipe.items[0]); this.delay_slots(this.pipe.items[1]); this.pipe.move_forward(); this.pipe.move_forward(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pipeLoop() {\n currentWrite = Promise.resolve();\n\n if (shuttingDown === true) {\n return Promise.resolve();\n }\n\n return writer._readyPromise.then(function () {\n return ReadableStreamDefaultReaderRead(reader).then(function (_ref5) {\n ...
[ "0.53222704", "0.5194467", "0.5160384", "0.50331986", "0.5025975", "0.5002283", "0.4998681", "0.49629772", "0.4953197", "0.49389362", "0.49337906", "0.49337906", "0.49104953", "0.49002263", "0.4880593", "0.48755127", "0.48748875", "0.48646474", "0.48460072", "0.4837986", "0.4...
0.6113754
0
; public static const ELEMENT_LEFT:BEMElement =
function ELEMENT_LEFT$static_(){CommentMetaDataPanel.ELEMENT_LEFT=( CommentMetaDataPanel.BLOCK.createElement("left"));}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get left() {}", "function ELEMENT_RIGHT$static_(){CommentMetaDataPanel.ELEMENT_RIGHT=( CommentMetaDataPanel.BLOCK.createElement(\"right\"));}", "static set left(value) {}", "function DMElement() {}", "get left() {\n\t\treturn this.origin.x\n\t}", "get border_left () {\n return new IconData(0xe2...
[ "0.6150965", "0.5923893", "0.5654261", "0.56258714", "0.54598427", "0.5438618", "0.5438618", "0.5315096", "0.5289314", "0.52875966", "0.525063", "0.5199972", "0.51775736", "0.5174123", "0.5145494", "0.51378", "0.51257807", "0.51257807", "0.51257807", "0.51257807", "0.5119673"...
0.76790065
0
; public static const ELEMENT_RIGHT:BEMElement =
function ELEMENT_RIGHT$static_(){CommentMetaDataPanel.ELEMENT_RIGHT=( CommentMetaDataPanel.BLOCK.createElement("right"));}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ELEMENT_LEFT$static_(){CommentMetaDataPanel.ELEMENT_LEFT=( CommentMetaDataPanel.BLOCK.createElement(\"left\"));}", "static right() {\n\n // Return a Direction pointing towards the right\n return new Direction([1, 0, 0]);\n }", "static get right() {}", "get border_right () {\n return new Ic...
[ "0.6426105", "0.5961597", "0.5865158", "0.5816074", "0.5816074", "0.563482", "0.56116927", "0.56116927", "0.56116927", "0.55221254", "0.5484323", "0.5484323", "0.5484323", "0.5484323", "0.5482069", "0.54287666", "0.5428441", "0.5426397", "0.5365703", "0.5365703", "0.5356418",...
0.757437
0
Call the callback with (x,y,z,value,face) of all blocks along the line segment from point 'origin' in vector direction 'direction' of length 'radius'. 'radius' may be infinite. 'face' is the normal vector of the face of that block that was entered. It should not be used after the callback returns. If the callback retur...
raycast(origin, direction, radius) { // From "A Fast Voxel Traversal Algorithm for Ray Tracing" // by John Amanatides and Andrew Woo, 1987 // <http://www.cse.yorku.ca/~amana/research/grid.pdf> // <http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.3443> // Extensions to the described algorith...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ray(origin) {\n\t\tvar stepX = step(sin, cos, origin.x, origin.y);\n\t\tvar stepY = step(cos, sin, origin.y, origin.x, true);\n\t\tvar nextStep = stepX.length2 < stepY.length2\n\t\t\t? inspect(stepX, 1, 0, origin.distance, stepX.y)\n\t\t\t: inspect(stepY, 0, 1, origin.distance, stepY.x);\n\n\t\tif (nextSt...
[ "0.52091837", "0.5182735", "0.49814376", "0.47832918", "0.46035647", "0.45986024", "0.45822304", "0.45706367", "0.4519821", "0.4511377", "0.4511377", "0.4442823", "0.44262624", "0.43729368", "0.43532145", "0.43478566", "0.43455553", "0.4323815", "0.4306728", "0.42862016", "0....
0.5366955
0
To print the Queue data.
printQueue() { if (!this.isEmpty()) { let temp = this.first; let str = "[ "; while (temp !== null) { str += temp.data + ", "; temp = temp.next; } str = str.slice(0, str.length - 2) + " ]"; return str; } else { console.log("Queue is ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "print() {\n if (this.queue.tail == null) {\n process.stdout.write('[]\\n');\n }\n else {\n let iterator = this.queue.head;\n for (let i = 0; i < this.top; i++) {\n for (let j = 0+i; j < this.top - i; j++) {\n if (iterator.next ...
[ "0.7854783", "0.74046195", "0.7373748", "0.71668255", "0.71428317", "0.6825262", "0.65823287", "0.6484577", "0.6323043", "0.6273049", "0.62711966", "0.6242221", "0.6206888", "0.6183244", "0.6171897", "0.61652046", "0.61357623", "0.6093138", "0.60855365", "0.60627395", "0.6014...
0.7531218
1
Inserts element at the last of the Queue
enQueue(element) { if (!this.isFull()) { let newNode = new Node(element); if (this.last === null) { this.last = newNode; this.first = newNode; } else { this.last.next = newNode; this.last = newNode; } this.length += 1; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addToQueue(value){\n const node = new Node(value);\n if(!this.last){\n this.first = node;\n this.last = this.first;\n } else {\n this.last.next = node;\n this.last = node;\n } \n return ++this.size;\n }", "enqueue(item) {\n queue.unshift(item)\n }", "enqueu...
[ "0.68836164", "0.68610257", "0.68194866", "0.67470074", "0.6697882", "0.66850406", "0.6626739", "0.6605528", "0.65842766", "0.6540813", "0.65303147", "0.6484993", "0.64750767", "0.6449034", "0.6442107", "0.643877", "0.64235437", "0.6409323", "0.6404131", "0.63987887", "0.6386...
0.69449145
0
moves the select prompt down
function td_aj_search_move_prompt_down() { if (td_aj_first_down_up === true) { td_aj_first_down_up = false; } else { if (td_aj_search_cur_sel === td_aj_search_results) { td_aj_search_cur_sel = 0; } else { td_aj_search_cur_sel++; } } jQuery('.td_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onUpKey() {\n const len = this.opt.choices.realLength;\n this.selected = this.selected > 0 ? this.selected - 1 : len - 1;\n this.render();\n }", "onUpKey() {\n var len = this.opt.choices.realLength;\n this.selected = this.selected > 0 ? this.selected - 1 : len - 1;\n this.render();\n }", "o...
[ "0.6519755", "0.64817953", "0.64817953", "0.64434296", "0.6437931", "0.6370422", "0.63171417", "0.63122517", "0.62160015", "0.6158045", "0.6093534", "0.60620666", "0.6051968", "0.60385907", "0.60289955", "0.60289115", "0.602671", "0.5991689", "0.5984955", "0.5968519", "0.5967...
0.69005305
0
creates the first container and row common to each section, if they don't exist yet
function fnCommonRow(s) { // arg = step number if ($(`#step-${s}`).length) { // already exists // console.log("it exists"); } else { // create new let el1 = $(`<div class='container' id="${s}">`); let el2 = $(`<div class='section' id='step-${s}'>`); el1.append(el2); $("#main-content")....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createSections(scope){\n // Find all nodes between two H* tags\n //\n // Note: Always get the next sibling PRIOR to insertion\n // or else the nextSibling walking will not work.\n var \n contentType,\n tag;\n\n // TODO This needs to recursively create\n // the document hiera...
[ "0.61369735", "0.57550424", "0.5718578", "0.5685238", "0.56637657", "0.5580812", "0.5570126", "0.55252695", "0.5473615", "0.54495627", "0.54426414", "0.54426414", "0.5435089", "0.54258007", "0.5419902", "0.541831", "0.5401973", "0.54001266", "0.53892165", "0.5379485", "0.5362...
0.6442788
0
create parallax image section, if it doesn't exist
function fnCreateParallax(s) { // arg = step number if ($(`#jump-${s}`).length) { // exists } else { let el1 = $(`<div class="parallax-container align-wrapper">`); let el2 = $(`<div class="section no-pad-bot" id='jump-${s}'>`); let el3 = $(`<div class="container">`); let el4 = $(`<div class="r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initImageParallax() {\n //select all section .with-parallax\n gsap.utils.toArray(\".with-parallax\").forEach((section) => {\n //get the image\n const image = section.querySelector(\"img\");\n\n //create tween for the image\n gsap.to(image, {\n yPercent: 20,\n ease: \"none\",\n ...
[ "0.74516124", "0.6814735", "0.6659496", "0.6659496", "0.6489475", "0.6444184", "0.63578993", "0.634977", "0.63390166", "0.6274367", "0.6261532", "0.62388706", "0.6194126", "0.6084377", "0.60686976", "0.60661924", "0.60346866", "0.60058755", "0.59964836", "0.59775966", "0.5941...
0.7008746
1
returns the number of the box that the gesture begins in note: code is kind of backwards but the box numbers are correct
function getBox() { if (relX <= 116) { // column 1 if (relY <= 133) { // row 1 return 0; } else if (relY > 133 && relY <= 266) { // row 2 return 3; } else { // row 3 return 6; } } else if (relX > 116 && relX <= 224) { // column 2 i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currentBoxFullyFilled(boxIndex){/*...*/}", "function previousBoxIndex() {\n if (box_index - 1 < 0) {\n return boxes.length - 1;\n }\n\n return box_index - 1;\n}", "function getWinNumber() {\n for (var i = 0; i < animationSteps; i++) {\n if (currentWinPosition < 11) {\n c...
[ "0.6284073", "0.61577857", "0.5977564", "0.59662163", "0.5912023", "0.5892528", "0.587802", "0.5843007", "0.5821765", "0.58125865", "0.5740086", "0.57195663", "0.5711741", "0.571084", "0.5621916", "0.5603917", "0.5598053", "0.559233", "0.5556723", "0.55499065", "0.55214447", ...
0.63548464
0
2) Open Firebug and enable the Net panel 3) Select Net panel 4) Execute test implemented on the test page. 5) Perform testdriver code 6) Finish test.
function runTest() { FBTest.sysout("issueXXXX.START"); // 1) Load test case page FBTest.openNewTab(basePath + "net/XXXX/issueXXXX.html", function(win) { // 2) Open Firebug and enable the Net panel. FBTest.openFirebug(); FBTest.enableNetPanel(function(win) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runTest()\n{\n FBTest.openNewTab(basePath + \"console/3503/issue3503.html\", (win) =>\n {\n FBTest.sysout(\"issue3503; Test page loaded.\");\n\n FBTest.enableConsolePanel(() =>\n {\n var config = {\n tagName: \"div\",\n classes: \"logRow ...
[ "0.6466645", "0.64126694", "0.6408021", "0.6271687", "0.62382394", "0.613489", "0.6133849", "0.60856307", "0.6082798", "0.60078615", "0.5972365", "0.5943743", "0.5877714", "0.5836421", "0.5818088", "0.579794", "0.5743394", "0.5735515", "0.5717146", "0.5671513", "0.56565094", ...
0.84288293
0
return key of property in object `obj` with maximum value
function maxKey(obj) { let maxKey = undefined; let maxValue = -Infinity; for (const [key, value] of Object.entries(obj)) { if (value > maxValue) { maxKey = key; maxValue = value; } } return maxKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getMaxKey(obj) {\n let max = 0;\n let maxKey;\n for (const [key, value] of obj) {\n if (value > max) {\n max = value;\n maxKey = key;\n }\n }\n return maxKey;\n }", "function getPropertyWithLargestValue(obj) {\n const properties = Object.keys(obj);\n const values = O...
[ "0.8394895", "0.8264155", "0.7849876", "0.7671345", "0.75729865", "0.7560165", "0.71787935", "0.6796274", "0.6778682", "0.66807044", "0.66501606", "0.66435593", "0.66435593", "0.66435593", "0.66435593", "0.6642329", "0.66359574", "0.66309536", "0.6605199", "0.6605199", "0.640...
0.82666934
1
updates the counts above the ToDo list
function updateToDoCounts(data) { if (data != null) { updateTotalTODO(data.items.length) var completedData = data.items.filter(element => element.isCompleted); document.getElementById("completed-badge").innerText = completedData.length; document.getElementById("uncompleted-badge").in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countTodos(todoList) {\n let count = 0\n // iterates through length of todo list, adding 1 for every new item\n for (let i = 0; i < todoList.length; i++);\n todoCounter.textContent(count);\n}", "function updateCountTask() {\n var tasksNumber = $('li').not('.done').length;\n $('#tasksNumber...
[ "0.7263339", "0.72357875", "0.70652914", "0.6887958", "0.68251735", "0.6822635", "0.6758742", "0.66244364", "0.66122484", "0.65431005", "0.65422964", "0.6513258", "0.64722794", "0.6349555", "0.63415235", "0.6327363", "0.63234633", "0.6321974", "0.6307349", "0.6299501", "0.629...
0.7612886
0
to Display the value of the calendar on the text
function displayCalendarValue(val) { $('#todoDueDate').data('kendoDatePicker').value(val); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calendar() {\n 'use strict';\n var day = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n month = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n date = new Date();\n\n set...
[ "0.7173904", "0.68381184", "0.6747254", "0.674054", "0.6723133", "0.67134", "0.6709266", "0.6698994", "0.6674232", "0.66468155", "0.66326016", "0.6631262", "0.66213447", "0.661979", "0.6548636", "0.6508516", "0.648541", "0.6461704", "0.6459169", "0.6447739", "0.64115095", "...
0.6842194
1
Define the Rectangle with K and L edges K will be the horizontal edge ( imaginary ) L will be the vertical edge
function Rectangle(K, L) { if (typeof K === 'number' && typeof L === 'number') { return { width: K, height: L }; } else { throw new Error("Edge values of the rectangle must be number !"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function kc(a,b){this.width=a;this.height=b}", "function K(){var e=l.getBoundingClientRect(),t=\"offset\"+[\"Width\",\"Height\"][r.ort];return 0===r.ort?e.width||l[t]:e.height||l[t]}", "function Rectangle(a, b) {\n this.length = a;\n this.width = b;\n this.perimeter = 2 * (a + b);\n this.area = a *...
[ "0.63005894", "0.62761575", "0.5972928", "0.59653926", "0.59354424", "0.5933203", "0.5910595", "0.5870691", "0.58609104", "0.5834262", "0.5804555", "0.57967824", "0.579037", "0.5783255", "0.5771684", "0.5749134", "0.5731057", "0.5707035", "0.5706418", "0.56888604", "0.5688453...
0.77927005
0
Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS I...
function validateExactNumberOfArgs(functionName, args, numberOfArgs) { if (args.length !== numberOfArgs) { throw new __WEBPACK_IMPORTED_MODULE_1__error__["b" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__["a" /* Code */].INVALID_ARGUMENT, "Function " + functionName + "() requires " + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateExactNumberOfArgs(functionName, args, numberOfArgs) {\n if (args.length !== numberOfArgs) {\n throw new error_1.FirestoreError(error_1.Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires \" +\n formatPlural(numberOfArgs, 'argument') +\n ', but was ca...
[ "0.8212975", "0.8098403", "0.8077566", "0.7897835", "0.78821003", "0.7784088", "0.7763278", "0.76305413", "0.7620307", "0.75888187", "0.7562136", "0.7204516", "0.7065742", "0.69398063", "0.69398063", "0.67967033", "0.6748843", "0.6667645", "0.65853286", "0.64655113", "0.64308...
0.8240847
0
Validates the invocation of functionName has at least the provided number of arguments (but can have many more). Forward the magic "arguments" variable as second parameter on which the parameter validation is performed: validateAtLeastNumberOfArgs('myFunction', arguments, 2);
function validateAtLeastNumberOfArgs(functionName, args, minNumberOfArgs) { if (args.length < minNumberOfArgs) { throw new __WEBPACK_IMPORTED_MODULE_1__error__["b" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__["a" /* Code */].INVALID_ARGUMENT, "Function " + functionName + "() requires at least ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateAtLeastNumberOfArgs(functionName, args, minNumberOfArgs) {\n if (args.length < minNumberOfArgs) {\n throw new error_1.FirestoreError(error_1.Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires at least \" +\n formatPlural(minNumberOfArgs, 'argument') +\n ...
[ "0.8486302", "0.8406746", "0.83728313", "0.8193123", "0.8180057", "0.80921406", "0.80898315", "0.7979592", "0.79398537", "0.7930743", "0.79249173", "0.75848377", "0.75848377", "0.7495599", "0.74805105", "0.7250359", "0.70380425", "0.67697966", "0.66850907", "0.6658831", "0.66...
0.84608537
1
Validates the invocation of functionName has number of arguments between the values provided. Forward the magic "arguments" variable as second parameter on which the parameter validation is performed: validateBetweenNumberOfArgs('myFunction', arguments, 2, 3);
function validateBetweenNumberOfArgs(functionName, args, minNumberOfArgs, maxNumberOfArgs) { if (args.length < minNumberOfArgs || args.length > maxNumberOfArgs) { throw new __WEBPACK_IMPORTED_MODULE_1__error__["b" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__["a" /* Code */].INVALID_ARGUMENT, "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateBetweenNumberOfArgs(functionName, args, minNumberOfArgs, maxNumberOfArgs) {\n if (args.length < minNumberOfArgs || args.length > maxNumberOfArgs) {\n throw new error_1.FirestoreError(error_1.Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires between \" + minNumberOfArgs ...
[ "0.80914235", "0.8035508", "0.7986333", "0.77993906", "0.7782098", "0.76830614", "0.76812845", "0.76810527", "0.76805484", "0.7602966", "0.75890213", "0.72553766", "0.71223307", "0.71223307", "0.6592973", "0.65552604", "0.6393688", "0.63783324", "0.628437", "0.6266183", "0.62...
0.8074924
1
Validates the provided argument is an array and has as least the expected number of elements.
function validateNamedArrayAtLeastNumberOfElements(functionName, value, name, minNumberOfElements) { if (!(value instanceof Array) || value.length < minNumberOfElements) { throw new __WEBPACK_IMPORTED_MODULE_1__error__["b" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__["a" /* Code */].INVALID_AR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateNamedArrayAtLeastNumberOfElements(functionName, value, name, minNumberOfElements) {\n if (!(value instanceof Array) || value.length < minNumberOfElements) {\n throw new error_1.FirestoreError(error_1.Code.INVALID_ARGUMENT, \"Function \" + functionName + \"() requires its \" + name + \" a...
[ "0.71001923", "0.7059193", "0.7057985", "0.7048692", "0.7036902", "0.6928012", "0.6913578", "0.6830763", "0.6727819", "0.6727819", "0.66993785", "0.65643513", "0.654506", "0.6488657", "0.6446785", "0.6437385", "0.64368945", "0.64348274", "0.64339334", "0.6381505", "0.63784176...
0.7113673
0
Validates the provided argument is defined.
function validateDefined(functionName, position, argument) { if (argument === undefined) { throw new __WEBPACK_IMPORTED_MODULE_1__error__["b" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_1__error__["a" /* Code */].INVALID_ARGUMENT, "Function " + functionName + "() requires a valid " + ordinal(position) +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertIsDefined(arg) {\n if (isUndefinedOrNull(arg)) {\n throw new Error('Assertion Failed: argument is undefined or null');\n }\n return arg;\n }", "hasArgument(name) {\n let args = is_int(name) ? Object.values(this.arguments) : this.arguments;\n return isset(ar...
[ "0.70696026", "0.67964745", "0.67783517", "0.67783517", "0.6778133", "0.6770381", "0.67679846", "0.6759289", "0.67529154", "0.67492795", "0.67240065", "0.670269", "0.670269", "0.65545624", "0.65124106", "0.65124106", "0.65099436", "0.65099436", "0.6471695", "0.6445196", "0.64...
0.6896325
1
Safely checks if the number is NaN.
function safeIsNaN(value) { if (NumberAsAny.IsNaN) { return NumberAsAny.IsNaN(value); } else { return typeof value === 'number' && isNaN(value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRealNaN(v) {\n return isNaN(v) && (typeof v === 'number');\n }", "testIsNaN() {\n this.isNaN(NaN);\n this.hasException(() => this.isNaN(0));\n }", "function isNotNaN(a) {\n return !isNaN(a);\n}", "function checkNaN(x){\n if (isNaN(x)){\n return NaN;\n }\n re...
[ "0.76557434", "0.7534277", "0.7501335", "0.7490203", "0.74040467", "0.7375826", "0.7366422", "0.7318118", "0.72768265", "0.72768265", "0.7244417", "0.72431076", "0.72220105", "0.72220105", "0.72220105", "0.7180573", "0.71666044", "0.71160203", "0.7112084", "0.70943594", "0.70...
0.76779646
1
Wraps an IDBRequest in a PersistencePromise, using the onsuccess / onerror handlers to resolve / reject the PersistencePromise as appropriate.
function wrapRequest(request) { return new __WEBPACK_IMPORTED_MODULE_2__persistence_promise__["a" /* PersistencePromise */](function (resolve, reject) { request.onsuccess = function (event) { var result = event.target.result; resolve(result); }; request.onerror = func...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapRequest(request) {\n return new persistence_promise_1.PersistencePromise(function (resolve, reject) {\n request.onsuccess = function (event) {\n var result = event.target.result;\n resolve(result);\n };\n request.onerror = function (event) {\n r...
[ "0.73064786", "0.6913539", "0.66908586", "0.65440285", "0.5936779", "0.5721664", "0.55439997", "0.54328454", "0.5197631", "0.5103116", "0.5062032", "0.49987894", "0.4934631", "0.49066702", "0.4875528", "0.4846124", "0.48404044", "0.48190904", "0.4815265", "0.48014838", "0.478...
0.7098583
1
Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS I...
function assertUint8ArrayAvailable() { if (typeof Uint8Array === 'undefined') { throw new __WEBPACK_IMPORTED_MODULE_2__util_error__["b" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_2__util_error__["a" /* Code */].UNIMPLEMENTED, 'Uint8Arrays are not available in this environment.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertUint8ArrayAvailable() {\n if (typeof Uint8Array === 'undefined') {\n throw new error_1.FirestoreError(error_1.Code.UNIMPLEMENTED, 'Uint8Arrays are not available in this environment.');\n }\n}", "function assertUint8Array(obj, what) {\n if (!(obj instanceof Uint8Array)) {\n thr...
[ "0.7752827", "0.72896075", "0.6978823", "0.6610659", "0.6458979", "0.6416097", "0.6352856", "0.6352856", "0.6285634", "0.58814406", "0.5856308", "0.5856308", "0.58527064", "0.58527064", "0.58527064", "0.58527064", "0.58527064", "0.58527064", "0.58527064", "0.58527064", "0.585...
0.7875894
0
Helper function to assert Base64 functions are available at runtime.
function assertBase64Available() { if (!__WEBPACK_IMPORTED_MODULE_0__platform_platform__["a" /* PlatformSupport */].getPlatform().base64Available) { throw new __WEBPACK_IMPORTED_MODULE_2__util_error__["b" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_2__util_error__["a" /* Code */].UNIMPLEMENTED, 'Blobs a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assertBase64Available() {\n if (!platform_1.PlatformSupport.getPlatform().base64Available) {\n throw new error_1.FirestoreError(error_1.Code.UNIMPLEMENTED, 'Blobs are unavailable in Firestore in this environment.');\n }\n}", "function assertBase64Available() {\n if (!PlatformSupport.getPla...
[ "0.72393614", "0.71043265", "0.710193", "0.6989285", "0.6984504", "0.6743679", "0.6743533", "0.6400233", "0.63437974", "0.63437974", "0.63437974", "0.629356", "0.6199292", "0.61021847", "0.6005001", "0.600424", "0.5946086", "0.5946086", "0.5874133", "0.58636886", "0.557872", ...
0.73314357
0
Encodes a path separator into the given result
function encodeSeparator(result) { return result + escapeChar + encodedSeparatorChar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encodeSeparator(result) {\n return result + escapeChar + encodedSeparatorChar;\n}", "function encodeSeparator(result) {\r\n return result + escapeChar + encodedSeparatorChar;\r\n}", "function encode(path) {\n var result = '';\n\n for (var i = 0; i < path.length; i++) {\n if (result.length > 0...
[ "0.7616714", "0.75988406", "0.70941406", "0.7083024", "0.7083024", "0.7079729", "0.66242987", "0.6498955", "0.6207476", "0.6207476", "0.61420417", "0.6130264", "0.6033861", "0.6010739", "0.6010739", "0.600147", "0.59590703", "0.59508383", "0.5946399", "0.5927247", "0.59167707...
0.7623624
1
Computes the prefix successor of the given path, computed by encode above. A prefix successor is the first key that cannot be prefixed by the given path. It's useful for defining the end of a prefix scan such that all keys in the scan have the same prefix. Note that this is not a general prefix successor implementation...
function prefixSuccessor(path) { var c = path.charCodeAt(path.length - 1); // TODO(mcg): this really should be a general thing, but not worth it right // now Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__["a" /* assert */])(c === 1, 'successor may only operate on paths generated by encode'); retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prefixSuccessor(path) {\n var c = path.charCodeAt(path.length - 1);\n // TODO(mcg): this really should be a general thing, but not worth it right\n // now\n assert_1.assert(c === 1, 'successor may only operate on paths generated by encode');\n return path.substring(0, path.length - 1) + Str...
[ "0.83166116", "0.54157555", "0.5385872", "0.53674537", "0.53674537", "0.5250164", "0.5206626", "0.5192818", "0.5192818", "0.5192818", "0.5192818", "0.5176386", "0.5176386", "0.5176386", "0.5176386", "0.5176386", "0.5176386", "0.5176386", "0.5060936", "0.5043504", "0.5024863",...
0.785823
1
Takes an array of values and sequences them using the promise (or value) returned by the supplied callback. The callback for each item is called after the promise is resolved for the previous item. The function returns a promise which is resolved after the promise for the last item is resolved.
function sequence(values, fn, initialValue) { var result = Promise.resolve(initialValue); values.forEach(function (value) { result = result.then(function (lastResult) { return fn(value, lastResult); }); }); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function futureSequence(values, ec) {\n return Future.create(cb => {\n try {\n // This can throw, handling error below\n const futures = futureIterableToArray(values, ec);\n // Short-circuit in case the list is empty, otherwise the\n // futureSequenceLoop fails...
[ "0.65573204", "0.65257514", "0.64948356", "0.645398", "0.64101714", "0.64101714", "0.64101714", "0.64101714", "0.6272763", "0.6272763", "0.6204837", "0.6140625", "0.61312264", "0.61219186", "0.6101858", "0.60487056", "0.60035443", "0.59333915", "0.59025514", "0.5867575", "0.5...
0.74569863
1
Constructs a DatabaseInfo using the provided host, databaseId and persistenceKey.
function DatabaseInfo(databaseId, persistenceKey, host, ssl) { this.databaseId = databaseId; this.persistenceKey = persistenceKey; this.host = host; this.ssl = ssl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DatabaseInfo(databaseId, persistenceKey, host, ssl, forceLongPolling) {\n this.databaseId = databaseId;\n this.persistenceKey = persistenceKey;\n this.host = host;\n this.ssl = ssl;\n this.forceLongPolling = forceLongPolling;\n }", "function DatabaseInfo(databaseId, persistenceKey, host,...
[ "0.7728687", "0.7703169", "0.54505146", "0.52739936", "0.5248774", "0.52350277", "0.520796", "0.5186079", "0.51671886", "0.51625276", "0.5158448", "0.51395655", "0.51335275", "0.49675044", "0.49641263", "0.49597192", "0.494995", "0.49486953", "0.49262512", "0.49046996", "0.49...
0.80444795
1
Applies the resume token to the TargetChange, but only when it has a new value. null and empty resumeTokens are discarded.
function applyResumeToken(change, resumeToken) { if (resumeToken.length > 0) { change.resumeToken = resumeToken; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get resumeToken() {\n var _a;\n return (_a = this.cursor) === null || _a === void 0 ? void 0 : _a.resumeToken;\n }", "function resumeWithCursor(newCursor) {\n changeStream.cursor = newCursor;\n processResumeQueue(changeStream);\n }", "function resumeWithCursor(newCursor) {\n chan...
[ "0.5273446", "0.49682227", "0.49156103", "0.48481652", "0.48295945", "0.48187667", "0.47828066", "0.47765383", "0.47005275", "0.46947423", "0.4667244", "0.45698443", "0.45620272", "0.4558257", "0.4515426", "0.4515426", "0.4486082", "0.4462987", "0.44623008", "0.44219774", "0....
0.7990906
1
Return a firebase namespace object. In production, this will be called exactly once and the result assigned to the 'firebase' global. It may be called multiple times in unit tests.
function createFirebaseNamespace() { var apps_ = {}; var factories = {}; var appHooks = {}; // A namespace is a plain JavaScript Object. var namespace = { // Hack to prevent Babel from modifying the object returned // as the firebase namespace. __esModule: true, initi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFirebaseNamespace() {\r\n var apps_ = {};\r\n var factories = {};\r\n var appHooks = {};\r\n // A namespace is a plain JavaScript Object.\r\n var namespace = {\r\n // Hack to prevent Babel from modifying the object returned\r\n // as the firebase namespace.\r\n __...
[ "0.74697155", "0.7389798", "0.738586", "0.738586", "0.73854023", "0.73854023", "0.7384057", "0.72946495", "0.72946495", "0.72939384", "0.7290955", "0.72347414", "0.72320783", "0.72304523", "0.6471739", "0.6037649", "0.5864682", "0.581762", "0.5795178", "0.57914066", "0.578708...
0.74579585
1
Exports the Firestore namespace into the provided `exportObject` object under the key 'firestore'. This is used for wrapped binary that exposes Firestore as a goog module.
function configureForStandalone(exportObject) { var copiedNamespace = Object(__WEBPACK_IMPORTED_MODULE_5__util_obj__["f" /* shallowCopy */])(firestoreNamespace); // Unlike the use with Firebase, the standalone allows the use of the // constructor, so export it's internal class copiedNamespace['Firestore...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function configureForStandalone(exportObject) {\n var copiedNamespace = obj_1.shallowCopy(firestoreNamespace);\n // Unlike the use with Firebase, the standalone allows the use of the\n // constructor, so export it's internal class\n copiedNamespace['Firestore'] = database_1.Firestore;\n exportObject...
[ "0.7561555", "0.7561555", "0.51090056", "0.496594", "0.49015334", "0.4880598", "0.48560235", "0.47995186", "0.46858516", "0.46603066", "0.46435073", "0.4591561", "0.45391735", "0.4530574", "0.4525025", "0.45236632", "0.4520332", "0.4519556", "0.4519556", "0.45089045", "0.4506...
0.76107097
0
Calculates the array of firestore.DocumentChange's for a given ViewSnapshot. Exported for testing.
function changesFromSnapshot(firestore, snapshot) { if (snapshot.oldDocs.isEmpty()) { // Special case the first snapshot because index calculation is easy and // fast var lastDoc_1; var index_1 = 0; return snapshot.docChanges.map(function (change) { var doc = new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changesFromSnapshot(firestore, snapshot) {\n if (snapshot.oldDocs.isEmpty()) {\n // Special case the first snapshot because index calculation is easy and\n // fast\n var lastDoc_1;\n var index_1 = 0;\n return snapshot.docChanges.map(function (change) {\n va...
[ "0.709365", "0.63562584", "0.6289724", "0.61929476", "0.5830394", "0.5361782", "0.52901095", "0.52174306", "0.5175312", "0.51609755", "0.51111907", "0.5110334", "0.5110334", "0.5109372", "0.5052694", "0.50473684", "0.50198907", "0.500182", "0.4994931", "0.49634793", "0.494220...
0.6864729
1