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
check if a specific revision of a doc has been deleted metadata: the metadata object from the doc store rev: (optional) the revision to check. defaults to winning revision
function isDeleted(metadata, rev) { if (!rev) { rev = winningRev(metadata); } var id = rev.substring(rev.indexOf('-') + 1); var toVisit = metadata.rev_tree.map(getTrees); var tree; while ((tree = toVisit.pop())) { if (tree[0] === id) { return !!tree[1].deleted; } toVisit = toVisit.con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDeleted(metadata, rev) {\n if (!rev) {\n rev = merge.winningRev(metadata);\n }\n var dashIndex = rev.indexOf('-');\n rev = rev.substring(dashIndex + 1);\n var deleted = false;\n merge.traverseRevTree(metadata.rev_tree,\n function (isLeaf, pos, id, acc, opts) {\n if (id === rev) {\n ...
[ "0.7825355", "0.77617997", "0.76810896", "0.76696163", "0.5264871", "0.5187858", "0.51750463", "0.51750463", "0.51750463", "0.51750463", "0.51750463", "0.51750463", "0.51750463", "0.51750463", "0.51750463", "0.51750463", "0.51750463", "0.5166083", "0.51549625", "0.51192695", ...
0.77657074
1
returns the current leaf node for a given revision
function latest(rev, metadata) { var toVisit = metadata.rev_tree.slice(); var node; while ((node = toVisit.pop())) { var pos = node.pos; var tree = node.ids; var id = tree[0]; var opts = tree[1]; var branches = tree[2]; var isLeaf = branches.length === 0; var history = node.history ? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function latest(rev, metadata) {\n var toVisit = metadata.rev_tree.slice();\n var node;\n while ((node = toVisit.pop())) {\n var pos = node.pos;\n var tree = node.ids;\n var id = tree[0];\n var opts = tree[1];\n var branches = tree[2];\n var isLeaf = branche...
[ "0.63806385", "0.62786674", "0.6111722", "0.60900617", "0.6043748", "0.5992285", "0.5992285", "0.5985945", "0.5985945", "0.59399116", "0.59279877", "0.5777313", "0.5713351", "0.56867075", "0.56633407", "0.566034", "0.56602913", "0.56602913", "0.56602913", "0.56602913", "0.548...
0.6328168
1
compare two docs, first by _id then by _rev
function compareByIdThenRev(a, b) { var idCompare = compare(a._id, b._id); if (idCompare !== 0) { return idCompare; } var aStart = a._revisions ? a._revisions.start : 0; var bStart = b._revisions ? b._revisions.start : 0; return compare(aStart, bStart); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareByIdThenRev(a, b) {\n var idCompare = compare(a._id, b._id);\n if (idCompare !== 0) {\n return idCompare;\n }\n var aStart = a._revisions ? a._revisions.start : 0;\n var bStart = b._revisions ? b._revisions.start : 0;\n return compare(aStart, bStart);\n }", ...
[ "0.78660136", "0.78059393", "0.7796018", "0.7796018", "0.68521404", "0.66045064", "0.65016294", "0.62477", "0.6178576", "0.61473364", "0.61358166", "0.61358166", "0.61142457", "0.6010382", "0.59429914", "0.5881196", "0.5776751", "0.5634929", "0.55900633", "0.55783194", "0.554...
0.78396475
1
return true if the given doc matches the supplied selector
function matchesSelector(doc, selector) { /* istanbul ignore if */ if (typeof selector !== 'object') { // match the CouchDB error message throw new Error('Selector error: expected a JSON object'); } selector = massageSelector(selector); var row = { 'doc': doc }; var rowsMatched = filterInMem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchesSelector(doc, selector) {\n\t /* istanbul ignore if */\n\t if (typeof selector !== 'object') {\n\t // match the CouchDB error message\n\t throw new Error('Selector error: expected a JSON object');\n\t }\n\n\t selector = massageSelector(selector);\n\t var row = {\n\t 'doc': doc\n\t };...
[ "0.7891607", "0.7891393", "0.68257505", "0.68257505", "0.6633541", "0.64249736", "0.63947785", "0.6354774", "0.6324669", "0.62871546", "0.62871546", "0.62871546", "0.6147902", "0.6131271", "0.6069602", "0.6046851", "0.6024531", "0.6024531", "0.6008125", "0.6008125", "0.600812...
0.79104877
1
simple shim for objectStore.getAll(), falling back to IDBCursor
function getAll(objectStore, keyRange, onSuccess) { if (typeof objectStore.getAll === 'function') { // use native getAll objectStore.getAll(keyRange).onsuccess = onSuccess; return; } // fall back to cursors var values = []; function onCursor(e) { var cursor = e.target.result; if (cursor) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAll(objectStore, keyRange, onSuccess) {\n if (typeof objectStore.getAll === 'function') {\n // use native getAll\n objectStore.getAll(keyRange).onsuccess = onSuccess;\n return;\n }\n // fall back to cursors\n var values = [];\n\n function onCursor(e) {\n var cursor = e.target.result;\n...
[ "0.7042705", "0.6946174", "0.69054055", "0.6469892", "0.615792", "0.6140529", "0.604753", "0.604753", "0.60406893", "0.60268885", "0.59179974", "0.58745646", "0.5872662", "0.5859401", "0.5859395", "0.58155125", "0.58038235", "0.57971907", "0.57493395", "0.57493395", "0.574234...
0.7115437
0
dead simple promise pool, inspired by but much smaller in code size. limits the number of concurrent promises that are executed
function pool(promiseFactories, limit) { return new Promise(function (resolve, reject) { var running = 0; var current = 0; var done = 0; var len = promiseFactories.length; var err; function runNext() { running++; promiseFactories[current++]().then(onSuccess, onError); } f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makePromisePool(limit) {\n let running = 0\n const pending = new Set()\n\n return promiseMakerFn => {\n const [promise, O, X] = makePromise()\n promise.finally(() => ((running -= 1), next()))\n pending.add({ promiseMakerFn, O, X })\n next()\n return promise\n }\n\n function next() {\n ...
[ "0.7960533", "0.76286846", "0.7543828", "0.7542026", "0.7542026", "0.7542026", "0.75397694", "0.7059322", "0.7059322", "0.6976798", "0.65296185", "0.64235175", "0.6420039", "0.6325337", "0.6319267", "0.6243103", "0.61991376", "0.6173999", "0.6105135", "0.60942614", "0.6088654...
0.7633295
1
Generate a URL with the host data given by opts and the given path
function genUrl(opts, path) { // If the host already has a path, then we need to have a path delimiter // Otherwise, the path delimiter is the empty string var pathDel = !opts.path ? '' : '/'; // If the host already has a path, then we need to have a path delimiter // Otherwise, the path delimiter is the emp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function genUrl(opts, path) {\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter is the empty string\n var pathDel = !opts.path ? '' : '/';\n\n // If the host already has a path, then we need to have a path delimiter\n // Otherwise, the path delimiter...
[ "0.82040316", "0.8172279", "0.8132815", "0.80840516", "0.78035307", "0.65011346", "0.63447386", "0.6296463", "0.6134188", "0.6092163", "0.603775", "0.60196096", "0.59934306", "0.5980371", "0.59655374", "0.59655374", "0.59655374", "0.59655374", "0.59655374", "0.59655374", "0.5...
0.8230585
1
Action for toggling blockquote.
function toggleBlockquote(editor) { var cm = editor.codemirror; _toggleLine(cm, "quote"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleBlockquote(editor) {\n\t\t\tvar cm = editor.codemirror;\n\t\t\t_toggleLine(cm, \"quote\");\n\t\t}", "function toggleBlockquote(editor) {\n\t\tvar cm = editor.codemirror;\n\t\t_toggleLine(cm, \"quote\");\n\t}", "function toggleBlockquote(editor) {\n var cm = editor.codemirror;\n _toggleLine...
[ "0.698894", "0.6968174", "0.6917067", "0.6896073", "0.6862668", "0.6846925", "0.65188867", "0.63669336", "0.6190969", "0.60638434", "0.59763944", "0.59763944", "0.59763944", "0.59763944", "0.5927263", "0.5917169", "0.5884498", "0.5878615", "0.5864442", "0.58451414", "0.582722...
0.70506614
1
an object to hold acceleration values in all three dimensions.
function AccelerationObject(){ this.x = 0; this.y = 0; this.z = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static set acceleration(value) {}", "static get acceleration() {}", "function Acceleration(x, y, z)\n{\n\tthis.x = x;\n\tthis.y = y;\n\tthis.z = z;\n\tthis.timestamp = new Date().getTime();\n}", "get Acceleration() {}", "updateAcceleration() {\n //this.a = [0, -0.2 * gravity, 0];\n this.a = g...
[ "0.72305465", "0.6919182", "0.68123055", "0.67094547", "0.6630976", "0.65611905", "0.6557556", "0.65142816", "0.64949405", "0.649371", "0.63773865", "0.6372993", "0.62266386", "0.5876286", "0.58693075", "0.58444387", "0.5755563", "0.5743577", "0.5743577", "0.5743577", "0.5715...
0.70646334
1
Pull data from the directory spreadsheet
function getDatabase() { var file, files = DriveApp .getFoldersByName('Lockdown Labmates') .next() .getFilesByName(formResponseSheetName); //Retrieve the ID //Check if the doc exists. If it doesn't, return nothing if (files.hasNext ()){ file = files.next(); } else { return "fuck"; } var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDirectory(sheetName) {\n let dirBackend = SpreadsheetApp.openById(permDirID)\n // get users\n let userSheet = dirBackend.getSheetByName('Users')\n let userTable = userSheet.getRange(2, 1, userSheet.getLastRow() - 1, 6).getValues()\n let users = {}\n for (let i = 0; i < userTable.length; i++) {\n ...
[ "0.63613397", "0.5797145", "0.5713778", "0.5648744", "0.5630163", "0.5574559", "0.5571511", "0.5567233", "0.554365", "0.55419457", "0.5540379", "0.5506437", "0.5504653", "0.5499846", "0.54864305", "0.54858565", "0.54848266", "0.54693115", "0.5463988", "0.54523915", "0.5407210...
0.5834265
1
generates a biome for a planet based on obrit/life
function biomeGenerator(orbit, life) { let biomes = []; //gets an array of possible biomes if (life) { biomes = orbit == 3 ? ["Desert", "Ocean", "Forest"] : ["Desert", "Ice Sheet", "Tundra"]; } else { biomes = orbitBiomes.get(orbit); } //choses one of the biomes return biomes[Math.floor(Math.rand...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function planetGenerator() {\n let planet = null;\n\n if (Math.random() < 0.5) {\n //leave an empty orbit\n planets.push(planet);\n return;\n }\n\n let orbit = planets.length + 1;\n let life = (orbit == 4 || orbit == 3) && Math.random() < 0.5;\n let biome = biomeGenerator(orbit, life);\n planet = n...
[ "0.68623453", "0.6694145", "0.6593927", "0.60321397", "0.5996892", "0.59680814", "0.59431154", "0.5877023", "0.5873246", "0.57879245", "0.5728207", "0.56533337", "0.5636421", "0.56249243", "0.55896384", "0.5562611", "0.55205965", "0.55122036", "0.5511639", "0.5448815", "0.541...
0.757018
0
creates the HTML element of the planet with random size + color based on biome
async function stylePlanet(planet) { let planetElement = document.createElement("div"); planetElement.setAttribute("class", "planet"); planetElement.setAttribute("id", planet.orbit); let planetSize = Math.floor(Math.random() * 25) + 15; let planetColor = biomesMap.get(planet.biome); let planetOrbit = plane...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPlanet() {\n //This randomizes a single planet. Maybe one could give parameters\n //to instruct what kind of planet it will be. parameters could be\n //in key=>value array.\n }", "function planetGenerator() {\n let planet = null;\n\n if (Math.random() < 0.5) {\n //leave an empty orb...
[ "0.7257987", "0.71529895", "0.65777487", "0.65142477", "0.6501013", "0.6491695", "0.6302912", "0.6236277", "0.62318707", "0.6216249", "0.61588484", "0.6149513", "0.6135433", "0.61279505", "0.6120155", "0.61057854", "0.6084381", "0.6066269", "0.60559785", "0.6054518", "0.60543...
0.74502933
0
creates a window with the solar system
function createSystemWindow() { planets = []; createSystemBG(); for (let i = 0; i < 8; i++) { planetGenerator(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AppSolarSystem() {\n this.initialize();\n //this.createBox();\n this.createPlanet(\"mercury\", 0.4, 3, 0.6, 0.8, \"img/textures/mercury/planet.jpg\");\n this.createPlanet(\"venus\", 1, 5, 0.6, 0.7, \"img/textures/venus/planet.jpg\");\n this.createPlanet(\"earth\", 1, 8, ...
[ "0.6858712", "0.67065823", "0.6654916", "0.63517445", "0.62986535", "0.62623227", "0.61064476", "0.6047999", "0.60052085", "0.597703", "0.5973366", "0.5971243", "0.5971224", "0.5932897", "0.58945185", "0.5883093", "0.5867724", "0.58539045", "0.5849143", "0.58105", "0.58056885...
0.7118662
0
this function is only used for recalculating the new merkle roots that are stored in the contract when changing the merkle tree
calcInitialRoots(){ const tree = this.getTree(); const root = tree.getRoot().toString('hex') console.log("Root Balances: ", "0x" + root) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_changedNode(){\n\n if (this.root.autoMerklify)\n this._refreshHash(true);\n }", "function MerkleTree(block)\n{\n\t//Flat array of buffers containing the merkle tree\n\tvar self = this;\n\tself.merkleTree = generateMerkleTree(block);\n\t\n\tgenerateMerkleTree(block);\t\n\t\n\tconsole.log(JSO...
[ "0.6160654", "0.60109264", "0.5719065", "0.5706654", "0.5701879", "0.56942457", "0.5587106", "0.55514747", "0.5541205", "0.5465741", "0.53613377", "0.53071207", "0.52584", "0.5219268", "0.5219148", "0.5208852", "0.52075833", "0.520389", "0.5201094", "0.51905656", "0.5169348",...
0.6162125
0
showing Additional Info modal
#showAdditionalInfoModal() { $('.additionalInfo.modal').modal('setting', 'transition', 'fade up') .modal('show'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateInformationModal() {\n\t// add text to the label\n\tvar category = allViews[activeView];\n\t// trim the heading \"TissueSpecific\" if necessary\n\tif (category.substr(0,14) == \"TissueSpecific\") {\n\t\tcategory = category.substr(14);\n\t}\n\t$('#informationLabel').text(category+\" Information\");...
[ "0.69092923", "0.6833369", "0.68310595", "0.68022907", "0.67966974", "0.6751689", "0.6710326", "0.66975284", "0.6695916", "0.6683013", "0.6642709", "0.6633426", "0.6620661", "0.6620661", "0.6619391", "0.66066504", "0.658396", "0.6562944", "0.65296733", "0.65129286", "0.651074...
0.7895643
0
randomized groups, then sorts into number of groups determined
function sortGroups(numGroups) { var tempArrayOfNames = []; for (var i = 0; i < arrayOfNames.length; i++) { tempArrayOfNames[i] = arrayOfNames[i] } shuffle(tempArrayOfNames); groupArray = []; for (var i = 0; i < numGroups; i++) { groupArray[i] = []; } //while loop checks to ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addDivs(numGroups) {\n $('.groups').empty();\n for (var i = 1; i <= numGroups; i++) {\n $('.groups').append('<div class=\"group\" id=\"group' + i + '\"><h1 id=\"groupnum' + i + '\">' + randomAnimal[i-1] + '</h1></div>');\n }\n }", "function reshuffle() {\n shuffleArray(group.people);\n...
[ "0.6227344", "0.60478145", "0.596778", "0.5861056", "0.58443964", "0.5825889", "0.5811702", "0.5785562", "0.5765694", "0.57390755", "0.5718627", "0.5691817", "0.5684391", "0.5684391", "0.5650391", "0.56396776", "0.5630268", "0.56276023", "0.56129074", "0.5586458", "0.55425", ...
0.6808563
0
appends divs to DOM based on number of groups
function addDivs(numGroups) { $('.groups').empty(); for (var i = 1; i <= numGroups; i++) { $('.groups').append('<div class="group" id="group' + i + '"><h1 id="groupnum' + i + '">' + randomAnimal[i-1] + '</h1></div>'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderAllGroupsElements(groups) {\r\n let groupsDiv = document.querySelector(\".groups .addNewGroup\");\r\n\r\n groups.forEach((el) => {\r\n groupsDiv.before(renderOneGroupElement(el))\r\n })\r\n}", "function createGroups(){\n\tgroupNumber = parseInt($(this).attr('class'));\n\t\n\t// Cl...
[ "0.7146353", "0.6965554", "0.6481782", "0.6411108", "0.6245863", "0.6236563", "0.62317526", "0.6189805", "0.6165264", "0.61576515", "0.61363965", "0.61339664", "0.60381186", "0.6032524", "0.5978738", "0.59175736", "0.58969456", "0.5892247", "0.5883444", "0.58785784", "0.58768...
0.8147112
0
choose a random object from the gameItems for computer's play
function computerPlay(){ const items = ["rock", "paper","scissor"] return items[Math.floor(Math.random() * items.length)] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computerPlay(){\r\n let weapon = ['rock','paper','scissors']\r\n let selection = Math.floor(Math.random() * (3 - 0) + 0)\r\n\r\n return weapon[selection]\r\n}", "function computerPlay() {\n\tconst weapons = ['rock', 'paper', 'scissors']\n\treturn weapon[weapons[getRandomInt(3)]]\n}", "functio...
[ "0.72707236", "0.7048706", "0.7008897", "0.6987336", "0.6977609", "0.6976384", "0.6974171", "0.69659126", "0.69570655", "0.6940586", "0.6894356", "0.68901384", "0.68841344", "0.68557984", "0.68470675", "0.68231803", "0.6812036", "0.67969304", "0.6794306", "0.6773863", "0.6747...
0.72262996
1
refresh the total count
function refreshTotalCount() { AlleleFearTotalCountAPI.get(function(data){ vm.total_count = data.total_count; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshTotalCount() {\n NonMutantCellLineTotalCountAPI.get(function(data){\n vm.total_count = data.total_count;\n });\n }", "function refreshTotalCount() {\n\t\t\tconsole.log(\"refreshTotalCount()\");\n ...
[ "0.87057227", "0.85118437", "0.8140928", "0.7857839", "0.76430935", "0.74783754", "0.74549466", "0.72521204", "0.72473663", "0.7183539", "0.71662116", "0.7112885", "0.70975506", "0.70758784", "0.70628893", "0.699175", "0.69736266", "0.69521135", "0.6947783", "0.6928309", "0.6...
0.85455346
1
load a selected object from results
function loadObject() { console.log("loadObject()"); if (vm.results.length == 0) { return; } if (vm.selectedIndex < 0) { return; } pageScope.loadingStart(); AlleleFearGetAPI.get({ key: vm.results[vm.selectedIndex].alleleKey }, function(data) { vm.apiDomain = data; vm.apiDomain.a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadObject() {\n\t\t\tconsole.log(\"loadObject()\");\n\n\t\t\tif(vm.results.length == 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(vm.selectedIndex < 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tNonMutantCellLineGetAPI.get({ key: vm.results[vm.selectedIndex].cellLineKey }, function(data) {\n\t\t\t\tvm.apiDomain ...
[ "0.66937256", "0.63080126", "0.625077", "0.6106328", "0.5884433", "0.58383685", "0.5771593", "0.5769547", "0.5758975", "0.5718888", "0.56568795", "0.56341314", "0.5631993", "0.5572336", "0.55507356", "0.5545601", "0.5545601", "0.55396295", "0.55127895", "0.55092406", "0.55058...
0.6911044
0
change of row/field detected if current mutationInvolves row has changed
function changeMutationInvolvesRow(index) { console.log("changeMutationInvolvesRow: " + index); vm.selectedMIIndex = index; if (vm.apiDomain.mutationInvolves[index] == null) { vm.selectedMIIndex = 0; return; } if (vm.apiDomain.mutationInvolves[index].processStatus == "x") { vm.apiDomain.mu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Mutation(row) {\n this.row = row;\n this.updates = [];\n}", "function rowHasChanged(row) {\n\tvar inputs = row.getElementsByTagName(\"input\");\n\tvar cells = row.getElementsByTagName(\"td\");\n\tvar item;\n\tif (row.id.slice(0, row.id.indexOf(\"-\")) == \"base\") {\n\t\titem = baseItems.get(cells[2]....
[ "0.6167813", "0.6109331", "0.6071855", "0.6042586", "0.6006953", "0.600455", "0.59718424", "0.59586585", "0.5949487", "0.5940188", "0.59371793", "0.5920809", "0.59196055", "0.59170485", "0.58948565", "0.5758863", "0.5742115", "0.57343143", "0.57170665", "0.56984884", "0.56910...
0.65563095
0
add new mutationInvolves row
function addMutationInvolvesRow() { console.log("addMutationInvolvesRow"); if (vm.apiDomain.mutationInvolves == undefined) { vm.apiDomain.mutationInvolves = []; } var i = vm.apiDomain.mutationInvolves.length; vm.apiDomain.mutationInvolves[i] = { "processStatus": "c", "relationshipKey": "",...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Mutation(row) {\n this.row = row;\n this.updates = [];\n}", "function changeMutationInvolvesRow(index) {\n\t\t\tconsole.log(\"changeMutationInvolvesRow: \" + index);\n\n\t\t\tvm.selectedMIIndex = index;\n\n\t\t\tif (vm.apiDomain.mutationInvolves[index] == null) {\n\t\t\t\tvm.selectedMIIndex = 0;\n\t\t...
[ "0.6395526", "0.613532", "0.5775177", "0.5626092", "0.55743045", "0.5570473", "0.55412847", "0.5538134", "0.5527709", "0.54158294", "0.540974", "0.53794175", "0.537033", "0.53093845", "0.5294745", "0.5281303", "0.52794284", "0.5260007", "0.52462155", "0.52462155", "0.5204323"...
0.78466684
0
add new expressesComponents row
function addExpressesComponentsRow() { console.log("addExpressesComponentsRow"); if (vm.apiDomain.expressesComponents == undefined) { vm.apiDomain.expressesComponents = []; } var i = vm.apiDomain.expressesComponents.length; vm.apiDomain.expressesComponents[i] = { "processStatus": "c", "rel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addRow() {\n}", "addRow() {\n let newAlt = new AltColumnFilters(this.holder, this.paneOb)\n newAlt.id = this.idCount\n this.idCount++\n // add to the pane collection for export as well\n this.paneOb.altFiltersState[newAlt.id] = { colname: \"\", op: \"\", val: \"\" }\n ...
[ "0.6951766", "0.6839724", "0.6807414", "0.67900145", "0.6757758", "0.67415833", "0.672223", "0.6718299", "0.67003274", "0.6646298", "0.66070276", "0.6526366", "0.6519308", "0.6502127", "0.6483837", "0.64445394", "0.6437827", "0.6434556", "0.6433923", "0.6420855", "0.6419608",...
0.83025527
0
add new driverComponents row
function addDriverComponentsRow() { console.log("addDriverComponentsRow"); if (vm.apiDomain.driverComponents == undefined) { vm.apiDomain.driverComponents = []; } var i = vm.apiDomain.driverComponents.length; vm.apiDomain.driverComponents[i] = { "processStatus": "c", "relationshipKey": "",...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addRow() {\n}", "function classification_add_row(evt) {\n var remove = el(\"div.remove\", [\"✖\"])\n var confirm = el(\"div.remove\", ['\\u2714'])\n input = el(\"input#input\")\n remove.addEventListener('click', classification_remove_row) \n confirm.addEventListener('click', classificatio...
[ "0.6916044", "0.6804435", "0.66993034", "0.6574896", "0.65565854", "0.6508478", "0.6478315", "0.64511687", "0.638118", "0.637918", "0.63324255", "0.6326446", "0.6321412", "0.631582", "0.6306859", "0.6299337", "0.62983173", "0.62890714", "0.62709904", "0.6270121", "0.62692374"...
0.8182816
0
marker region using vm.markerRegionSearch, search for markers in region specified
function searchMarkerRegion() { console.log("searchMarkerRegion()"); if (vm.markerRegionSearch == null) { addMarkerRegion(); } if ( vm.apiDomain.alleleKey == "" || vm.m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMarkerRegionToMI() {\n\t\t\tconsole.log(\"addMarkerRegionToMI()\");\n\n\t\t\tif (\n vm.markerRegionSearch == null\n || vm.markerRegionSearch.refsKey == null\n || vm.markerRegionSearch.refsKey == \"\"\n ...
[ "0.6239516", "0.6219511", "0.61713094", "0.5819622", "0.57513344", "0.56241536", "0.5569391", "0.5569391", "0.5549003", "0.54444253", "0.5413561", "0.5388732", "0.53504854", "0.53486603", "0.53346133", "0.5333203", "0.53219897", "0.5309598", "0.5300754", "0.52915645", "0.5284...
0.76397777
0
add vm.markerRegion list to first empty MI row
function addMarkerRegionToMI() { console.log("addMarkerRegionToMI()"); if ( vm.markerRegionSearch == null || vm.markerRegionSearch.refsKey == null || vm.markerRegionSearch.refsKey == "" ) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearDriverMarker(){\n if(driverMarkers.length>0){\n driverMarkers.forEach(function(valu,key,arry){\n valu.setMap(null);\n if(key===arry.length-1){\n driverMarkers=[];\n }\n });\n }\n\n }", "function undoAdd(){\r\n\tvar marker=markers_array[markers_array.length...
[ "0.5637986", "0.5563324", "0.5556865", "0.55185086", "0.54923743", "0.54702", "0.5446895", "0.54071224", "0.5374151", "0.5332071", "0.5315665", "0.53066486", "0.5264657", "0.52559984", "0.52255493", "0.52152634", "0.5211608", "0.5201629", "0.52007836", "0.51887745", "0.518532...
0.67740536
0
clipboard /////////////////////////////////////////////////////////////////// reset clipboard
function resetClipboardMI() { console.log("resetClipboardMI()"); vm.clipboardMI = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetClipboardNote() {\n if ($clip_note) {\n $clip_note.text('');\n toggleHidden($clip_note, true);\n }\n }", "function Clipboard () {}", "function clearClipboardDC() {\n\t\t\tconsole.log(\"clearClipboardDC()\");\n\t\t\tresetClipboardDC();\n\t\t}", "function co...
[ "0.7367297", "0.7263749", "0.71370155", "0.71230507", "0.709364", "0.70686775", "0.70563", "0.7041122", "0.6973855", "0.6973855", "0.6695921", "0.65617996", "0.64975166", "0.64806813", "0.6474418", "0.6470975", "0.6447503", "0.64472014", "0.6436814", "0.6418409", "0.6410308",...
0.75568306
0
delete one clipboard item
function deleteClipboardMI(row) { console.log("deleteClipboardMI(): " + row); vm.clipboardMI.splice(row,1) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function menuDelBkmkItem (selection) {\n // Cancel previous cut and clipboard if any\n if (isClipboardOpCut == true) {\n\trefreshCutPanel(bkmkClipboardIds, false);\n\trefreshCutSearch(bkmkClipboardIds, false);\n\tnoPasteZone.clear();\n }\n bkmkClipboardIds.length = bkmkClipboard.length = 0;\n isClipboardOpCut...
[ "0.7040831", "0.70173395", "0.69399166", "0.64374113", "0.63396394", "0.63396394", "0.63396394", "0.6250345", "0.6100489", "0.6090164", "0.59366006", "0.5878792", "0.5874768", "0.5867705", "0.5859887", "0.58503926", "0.58358127", "0.5811952", "0.58100796", "0.5807615", "0.579...
0.7208753
0
clear all clipboard items
function clearClipboardMI() { console.log("clearClipboardMI()"); resetClipboardMI(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearClipboardEC() {\n\t\t\tconsole.log(\"clearClipboardEC()\");\n\t\t\tresetClipboardEC();\n\t\t}", "function clearClipboardDC() {\n\t\t\tconsole.log(\"clearClipboardDC()\");\n\t\t\tresetClipboardDC();\n\t\t}", "function resetClipboardMI() {\n\t\t\tconsole.log(\"resetClipboardMI()\");\n\t\t\tvm.clipb...
[ "0.7525494", "0.7160301", "0.7049015", "0.6755534", "0.6666057", "0.6664711", "0.6316679", "0.6304833", "0.630104", "0.62728596", "0.62671375", "0.62528443", "0.6234268", "0.62071943", "0.6192106", "0.61768323", "0.61755764", "0.6159433", "0.6159012", "0.6142844", "0.6135296"...
0.749007
1
clear all clipboard items
function clearClipboardEC() { console.log("clearClipboardEC()"); resetClipboardEC(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearClipboardMI() {\n\t\t\tconsole.log(\"clearClipboardMI()\");\n\t\t\tresetClipboardMI();\n\t\t}", "function clearClipboardDC() {\n\t\t\tconsole.log(\"clearClipboardDC()\");\n\t\t\tresetClipboardDC();\n\t\t}", "function resetClipboardMI() {\n\t\t\tconsole.log(\"resetClipboardMI()\");\n\t\t\tvm.clipb...
[ "0.749007", "0.7160301", "0.7049015", "0.6755534", "0.6666057", "0.6664711", "0.6316679", "0.6304833", "0.630104", "0.62728596", "0.62671375", "0.62528443", "0.6234268", "0.62071943", "0.6192106", "0.61768323", "0.61755764", "0.6159433", "0.6159012", "0.6142844", "0.6135296",...
0.7525494
0
Create the UI of the Players
function createPlayersUI() { document.getElementById('players').innerHTML = ''; for (var i = 0; i < players.length; i++) { //Create DOM elements var div_player = document.createElement('div'); var div_playerid = document.createElement('div'); var div_hand = document.createElemen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildPlayerPanel() {\n deleteListPanel();\n var listPlayerPanel = document.getElementById(\"current-player-panel\");\n\n var playerElt;\n listPlayers.forEach((player) => {\n playerElt = document.createElement(\"div\");\n playerElt.innerHTML = player.name;\n playerElt.setAttribute(\"class\", \...
[ "0.6817928", "0.663591", "0.6559797", "0.6522087", "0.65158683", "0.65016145", "0.6484839", "0.64227414", "0.64106125", "0.639673", "0.6372733", "0.633785", "0.6278092", "0.6269438", "0.6252302", "0.6226558", "0.62104636", "0.6177956", "0.6177096", "0.61720914", "0.6156168", ...
0.6783609
1
Deal 1st Hand 2 cards per player
function dealFirstHand() { addRemoveButtons(); for (var i = 0; i < 2; i++) { // 2 cards to each player for (var x = 0; x < players.length; x++) { let card = deck.pop(); players[x].Hand.push(card); renderCard(card, x); updatePoints(); } } up...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deal () {\n for (let i = 0; i < 2; i++) {\n this.dealPlayerCard();\n this.playerCardReveal();\n $(\".player-card-back\").attr(\"class\", \"card\");\n };\n this.dealDealerCard();\n this.dealerCardReveal();\n $(\".dealer-card-back\").eq(0).attr(\"cl...
[ "0.7677819", "0.7554967", "0.75013566", "0.7418737", "0.7402979", "0.7268263", "0.72602284", "0.7236773", "0.7224666", "0.7196961", "0.71891606", "0.7178368", "0.7010271", "0.686795", "0.682574", "0.68223464", "0.6750932", "0.6690645", "0.6683033", "0.6675885", "0.6674529", ...
0.7646561
1
returns the number of points that a player has in hand
function getPoints(player) { var points = 0; for (var i = 0; i < players[player].Hand.length; i++) { points += players[player].Hand[i].Weight; if (points == 21) { endGame(); } else if (points > 21) { if ((players[player].Hand[0].Value == players[player].Hand[1].Va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPoints(player){\r\n var points = 0;\r\n for(var i = 0; i < players[player].Hand.length; i++){\r\n points += players[player].Hand[i].Weight;\r\n }\r\n players[player].Points = points;\r\n return points;\r\n}", "count() {\n let c = 0;\n\n if (this.players.p1 !== undefined) {...
[ "0.74689984", "0.72661126", "0.6999465", "0.6911661", "0.6895979", "0.6889857", "0.6837579", "0.6704738", "0.6672935", "0.6636033", "0.662603", "0.6605991", "0.6605991", "0.6605991", "0.6602051", "0.655302", "0.6527299", "0.6527299", "0.6527299", "0.6527299", "0.6527299", "...
0.7381058
1
create the Card UI with HTML Icons
function getCardUI(card) { var el = document.createElement('div'); var icon = ''; if (card.Suit == 'Hearts') icon = '&hearts;'; else if (card.Suit == 'Spades') icon = '&spades;'; else if (card.Suit == 'Diamonds') icon = '&diams;'; else icon = '&clubs;'; el.cla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateCardItems(card){\n return `<li class =\"card\"><i class = \"fa ${card}\"></i></li>`;\n\n }", "function cardIcons(isNative, isIntroduced, isThreatened, isEndangered) {\n const div = document.createElement(\"div\");\n div.setAttribute(\"class\", \"card-icons\");\n\n if (!!isNative) {...
[ "0.73448277", "0.71302664", "0.7083591", "0.70715755", "0.7050194", "0.70260715", "0.7008562", "0.69638675", "0.6955177", "0.69414026", "0.6898246", "0.6852234", "0.67963445", "0.67333776", "0.6722692", "0.66616094", "0.6623369", "0.66028655", "0.65603054", "0.6519018", "0.64...
0.72845054
1
PULL SPECIFIC TYPE OF DOGFRIENDLY PLACE FROM DATABASE
function fetchPlace(property, value, parseFetch){ $('#view').empty(); $('#view').append('<div id="place-list"><h1 id="typeLabel">' + value + '</h1></div>') parseFetch.equalTo(property, value) .find({ success: function(obj) { console.log(obj); obj.forEach(function(item){ // what to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPlaces(){\n // Get places : this function is useful to get the ID of a PLACE\n // Ajust filters, launch search and view results in the log\n // https://developers.jivesoftware.com/api/v3/cloud/rest/PlaceService.html#getPlaces(List<String>, String, int, int, String)\n\n // Filters\n // ?filter=se...
[ "0.55456257", "0.5211204", "0.5197538", "0.51939094", "0.51890904", "0.5179992", "0.5178025", "0.51770055", "0.51484835", "0.5144775", "0.5117938", "0.51019967", "0.5068428", "0.50670666", "0.50564826", "0.5053357", "0.50458187", "0.4992837", "0.49862263", "0.49855217", "0.49...
0.5627507
0
After unmounting the view we remove the keyboard listeners
componentWillUnmount() { BackHandler.removeEventListener('hardwareBackPress'); /*this.keyboardHideListener.remove(); this.keyboardDidShowListener.remove();*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "detachKeyboardZoomEvents() {\n fabric.util.removeListener(document, KEY_DOWN, this._listeners.keydown);\n fabric.util.removeListener(document, KEY_UP, this._listeners.keyup);\n }", "componentWillUnmount() {\n this.focusListener.remove();\n }", "function removeKeyboardListeners() {\n window.re...
[ "0.75281405", "0.74739426", "0.7454723", "0.74075973", "0.74075973", "0.73633224", "0.73377836", "0.7323313", "0.7306123", "0.7306123", "0.7267781", "0.7261986", "0.72214246", "0.72214246", "0.7217405", "0.7217405", "0.71908355", "0.71340525", "0.7108083", "0.70706683", "0.70...
0.78657585
0
assuming body is key:value pair of property and type helper function to generate properties
function genProperties(){ var result = {}; // generates this structure //"properties": { // "user": { // "type": "string" // }, // "tweets": { // "type": "string" // }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get properties() {\n return {\n \"cityProp\": {\n \"name\": \"cityProp\",\n \"type\": \"String\",\n \"value\": \" \",\n \"reflect\": true,\n \"attribute\": true,\n \"observer\": false\n },\n \"inputId\": {\n \"name\": \"inputId\",\n \"type\": \"String\",\n \"value\": \" \",\...
[ "0.5971218", "0.58164716", "0.580001", "0.5794977", "0.57883", "0.57652014", "0.57652014", "0.57485735", "0.55467665", "0.5516606", "0.5488572", "0.5460956", "0.5425175", "0.5368707", "0.5361336", "0.5353836", "0.53486365", "0.53381616", "0.53333783", "0.5324093", "0.5320738"...
0.7787009
0
End Global Variables Start Helper Functions start generate dynamic naviagtion bar helper function
function dynamic_nav(){ /* this function generate naviagtion bar dynamically accourding to number of section */ for (section of sections){ //Section name from section data-nav for list const section_name = section.getAttribute('data-nav'); //Section Id for naviagtion to section...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateNav(callback){\n\t\t\tdocument.getElementById(\"terminal\").innerHTML = framework[\"terminal\"];\n\t\t\tdocument.getElementById(\"terminal-content\").innerHTML = framework[\"nav\"];\n\t\t\tcallback(current_tab);\n\t\t}", "function NavigationBarGenerator() {\n\t\tthis.bar = null;\n\t\tthis.leftIt...
[ "0.7170976", "0.6803702", "0.67643285", "0.6738926", "0.6737437", "0.67113227", "0.67037004", "0.66660124", "0.663615", "0.66279036", "0.65635026", "0.65291053", "0.6484304", "0.6473839", "0.64474833", "0.644088", "0.64404684", "0.6435236", "0.64293677", "0.64277154", "0.6425...
0.6911864
1
asking for geolocation permissions
async askForLocation() { this.setState({ requestingGeolocation: true }); return RNLocation.requestPermission({ ios: 'whenInUse', android: { detail: 'fine', rationale: { title: 'Acessar sua localização', message: 'Para exibir as informações climáticas, o Vem pro iFood gostaria de acessa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pollGeo () {\n\n //Check if we have permissions and fetch if we don't already have\n if (navigator.permissions) {\n navigator.permissions.query({name: 'geolocation'}).then(function(PermissionStatus) {\n if ('granted' === PermissionStatus.state) {\n getGeo ();\n ...
[ "0.7728759", "0.72103566", "0.7146749", "0.7114778", "0.70126265", "0.6923085", "0.6919207", "0.6847803", "0.68050736", "0.6780397", "0.6775905", "0.67703056", "0.6728499", "0.67138827", "0.6665374", "0.66517943", "0.66102445", "0.6600563", "0.6557661", "0.65549195", "0.65447...
0.7282332
1
These functions are intended to make a single codebase work with both the Bignum and Number types in javascript. return the number zero in the same type as 'x'
function numzero(x) { if (typeof(x) == 'number') return 0; if (typeof(x) == 'bigint') return 0n; console.log(typeof(x)=='object'?x.constructor.name:typeof(x), x); throw "unsupported number"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numiszero(x)\n{\n if (typeof(x) == 'number') return x==0;\n if (typeof(x) == 'bigint') return x==0n;\n return x.iszero();\n}", "function zero(){ return 0;}", "function numone(x)\n{\n if (typeof(x) == 'number') return 1;\n if (typeof(x) == 'bigint') return 1n;\n console.log(typeof(x)=...
[ "0.7016366", "0.6827809", "0.6759785", "0.6736412", "0.6713464", "0.6713464", "0.67014956", "0.6568518", "0.6568518", "0.6563812", "0.6563812", "0.6563812", "0.6563812", "0.6563812", "0.6563812", "0.6563812", "0.6563812", "0.6563812", "0.6563812", "0.6563812", "0.6563812", ...
0.8181062
0
return the number one in the same type as 'x'
function numone(x) { if (typeof(x) == 'number') return 1; if (typeof(x) == 'bigint') return 1n; console.log(typeof(x)=='object'?x.constructor.name:typeof(x), x); throw "unsupported number"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addOneFromNumber(x){\n return ++x;\n}", "function numval(x)\n{\n if (x instanceof Value) { return x.uint(); }\n return x;\n}", "function convertToNumberN(x) {\n let number = Number(x);\n return number;\n}", "function num(x) {\n if (typeof x != \"number\") {\n throw new Err...
[ "0.6819565", "0.6781115", "0.6435343", "0.64106584", "0.63674444", "0.6336259", "0.62639195", "0.6229624", "0.6206423", "0.6191874", "0.61464536", "0.6008562", "0.59843385", "0.5966555", "0.5965375", "0.59629005", "0.5954563", "0.59300107", "0.5923913", "0.59137547", "0.59050...
0.7575962
0
convert 'a' to the same type as b.
function cvnum(a, b) { if (typeof(a) == typeof(b)) return a; if (typeof(b) == 'bigint') return BigInt(a); if (typeof(b) == 'number') return Number(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function as_(self, b) {\n return core.map_(self, () => b);\n}", "function sameType(a, b) {\n return typeof a === typeof b\n}", "function b(a){if(null===a||a===void 0)throw new TypeError('Object.assign cannot be called with null or undefined');return Object(a)}", "function R2a(a,b){if(w(a,b))return!0;if(!a|...
[ "0.5719045", "0.5710264", "0.56555605", "0.55677015", "0.5512521", "0.5487699", "0.54824156", "0.54714066", "0.53979367", "0.53155595", "0.5299403", "0.5299403", "0.5299403", "0.5299403", "0.5299403", "0.5299403", "0.5296131", "0.52314997", "0.5196371", "0.518056", "0.5168729...
0.6024387
0
Return the value of `tryThis` unless it's undefined, then return `that`
function thisOrThat(tryThis, that) { return typeof tryThis !== 'undefined' ? tryThis : that; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thisOrThrow(tryThis, orThrowMessage) {\n if (typeof tryThis !== 'undefined') {\n return tryThis;\n }\n throw new Error(orThrowMessage);\n}", "try() {\n if (this.isOk()) {\n return this.value\n }\n throw this.error\n }", "unwrapOrElse(fn) {\n if (this.isOk()) {\n return thi...
[ "0.7017592", "0.588293", "0.5384213", "0.5349013", "0.53303385", "0.53065234", "0.53024733", "0.5280039", "0.52766746", "0.5263199", "0.5217649", "0.52052766", "0.5197551", "0.5193279", "0.517859", "0.517859", "0.517859", "0.5165592", "0.51310366", "0.5098514", "0.5071048", ...
0.8037334
0
Return the value of `tryThir` or throw an error (with provided message);
function thisOrThrow(tryThis, orThrowMessage) { if (typeof tryThis !== 'undefined') { return tryThis; } throw new Error(orThrowMessage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "try() {\n if (this.isOk()) {\n return this.value\n }\n throw this.error\n }", "function thisOrThat(tryThis, that) {\n return typeof tryThis !== 'undefined' ? tryThis : that;\n}", "function attempt() {\r\n return \"I have thrown by return\"\r\n}", "function tryCatch(f) {\n try {\n retur...
[ "0.6353638", "0.5629945", "0.56241953", "0.5446592", "0.5377909", "0.536097", "0.5244645", "0.5233055", "0.5227618", "0.5111289", "0.5109751", "0.510146", "0.5084009", "0.5046532", "0.5044831", "0.504334", "0.49684513", "0.49651766", "0.49484345", "0.49484345", "0.49484345", ...
0.65891314
0
Sets the canCompute property accordingly if a score can be computed given the current data
computeHandler() { if (ASCVDRisk.canCalculateScore()) { this.setState({ canCompute: true, }); } else { this.setState({ canCompute: false, }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "makeDecision(scores) {\n if (this.getAggregateScore(scores) > 70) return true\n else return false\n }", "compute()\n {\n super.compute();\n this.needsRecompute = false;\n }", "compute()\n {\n super.compute();\n this.needsRecompute = false;\n }", "checkAvailableS...
[ "0.6089795", "0.5505705", "0.5505705", "0.532808", "0.5324012", "0.52888405", "0.5284307", "0.5130543", "0.51049906", "0.50931525", "0.5069147", "0.5066748", "0.49873033", "0.49819532", "0.49690092", "0.4922024", "0.4918774", "0.49050453", "0.4889918", "0.47596368", "0.473998...
0.70554906
0
obtener servicio por id
async function getServicioById(id){ var query = 'select * from servicios where id = ?'; var rows = await pool.query(query, [id]); return rows[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getService(service) {\n for (var i = 0; i < window.services.length; i++)\n if (window.services[i].id === service) return services[i];\n}", "async getService (req, res) {\n console.log('getting services')\n const user = await jwt.getUser()\n const service = await Services.findById(req....
[ "0.66853434", "0.63979906", "0.62836903", "0.62495345", "0.6174333", "0.6097719", "0.6087232", "0.6047677", "0.6033321", "0.59208804", "0.5892825", "0.58717936", "0.58608156", "0.58455014", "0.58353966", "0.5819712", "0.5818716", "0.58171827", "0.58171827", "0.58165133", "0.5...
0.7022546
0
5. La funcionalidad del boton ver ordenes debera de tomar el usuario seleccionado para visualizar solo las ordenes de dicho usuario
function usuarioSeleccionado(idUsuario){ var Usuario = usuarios[idUsuario].nombre; document.getElementById('bienvedida').innerHTML= `<h1 style="font-weight: 900;color: #5c3286;">¡Hola ${Usuario}</h1> <h3 style="color: #5c3286;">¿Qué Necesitas?</h3>`; document.getElementById('dropdown01').innerHTM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acceder(){\r\n limpiarMensajesError()//Limpio todos los mensajes de error cada vez que corro la funcion\r\n let nombreUsuario = document.querySelector(\"#txtUsuario\").value ;\r\n let clave = document.querySelector(\"#txtClave\").value;\r\n let acceso = comprobarAcceso (nombreUsuario, clave);\...
[ "0.60409784", "0.6026116", "0.59865236", "0.5970268", "0.5960698", "0.5951205", "0.5949893", "0.59297585", "0.58988047", "0.5868646", "0.583825", "0.5829535", "0.5813213", "0.58112544", "0.5808251", "0.5801423", "0.5795151", "0.57797897", "0.5735427", "0.57334715", "0.5717952...
0.6257528
0
Change the current video display to a loop of this.resource_path+"idle.mp4"
_idle_video() { this.video_panel.attr('loop', true); this.video_src.attr('src', this.resource_path + 'idle.mp4'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoVideo() {\r\n // Reloop the list of videos from the first movie\r\n if (position == movieInfo.length) {\r\n position = 0;\r\n document.getElementsByTagName(\"video\")[0].onended = function () {\r\n setTimeout(autoVideo, 2000);\r\n };\r\n }\r\n\r\n document.getElementById(\"mp4\").src...
[ "0.6373412", "0.6364759", "0.6282959", "0.62742364", "0.6272126", "0.62660134", "0.62425107", "0.620729", "0.61729556", "0.6151296", "0.6128199", "0.61252433", "0.6117125", "0.6085003", "0.6045804", "0.6028911", "0.6000032", "0.59707737", "0.59707737", "0.59570557", "0.592674...
0.81227696
0
Highlight the goal shape in green and redraw the board to apply change.
highlight_correct() { this.selection_board.get_shape(this.shape).set_highlight('green'); this.selection_board.draw(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "draw(){\n fill(this.color);\n if(this.winner){\n if(this.winner_toggle % 3 == 0){\n fill('YELLOW');\n }\n this.winner_toggle += 1;\n }\n stroke(this.color);\n rect(this.r*CELL_SIZE, this.c*CELL_SIZE, \n CELL_SIZE,...
[ "0.67881095", "0.6486936", "0.632772", "0.63001466", "0.626336", "0.6248278", "0.618958", "0.61881983", "0.6185462", "0.617906", "0.6172567", "0.6152492", "0.61437017", "0.6070631", "0.6068082", "0.6057606", "0.6037192", "0.6029856", "0.5998168", "0.5982057", "0.59523594", ...
0.7329163
0
Start tracking mouse coordinates as it is moved
_start_mouse_track() { this.current_mouse_movement = []; var self = this; var coord_scaling = this.selection_board.scale_to_source_size(); // start tracking loop this.track_id = setInterval(function() { let mousePos = document.get_mouse_pos(); // save a single time-coordinate pair of the current ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trackPosition(e) {\n mouse.x = e.pageX;\n mouse.y = e.pageY;\n}", "function trackPosition(e) {\n\tmouse.x = e.pageX;\n\tmouse.y = e.pageY;\n}", "startTrackMousePosition() {\n this.canvasObject.canvas.addEventListener(\"mousemove\",\n this.callbackFunctions.trackMousePosition);\n }", ...
[ "0.7750621", "0.77354205", "0.76250803", "0.7505444", "0.74426794", "0.7298219", "0.72692406", "0.7247985", "0.7027258", "0.69828355", "0.69824934", "0.69468147", "0.6886323", "0.6878357", "0.6859068", "0.68510467", "0.6841553", "0.680044", "0.67840964", "0.6774632", "0.67600...
0.8276871
0
Stop mouse tracking and store tracking info for current piece
_stop_mouse_track() { if (this.track_id) { this.track_id = clearInterval(this.track_id); } this.add_info('movement', this.current_mouse_movement, 'shape'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stopTracking() {\n HyperTrack.onTrackingStop();\n }", "function stopTracking( tracker ) {\n var events = [\n \"mouseover\", \"mouseout\", \"mousedown\", \"mouseup\", \"mousemove\",\n \"click\",\n $.MouseTracker.wheelEventName,\n \"touch...
[ "0.68773395", "0.6859805", "0.6813194", "0.6746971", "0.6623613", "0.6573536", "0.6562747", "0.6519182", "0.63682276", "0.6319383", "0.6281949", "0.6280554", "0.6265919", "0.6183421", "0.61815244", "0.6085637", "0.6058074", "0.6057195", "0.60515904", "0.6033303", "0.6028455",...
0.8161628
0
Send booking request email to admin user
prepareBookingRequestEmailToadminuser(adminData) { try { var adminEmailId = adminData.adminEmailId; var deferred = Q.defer(); var templatePath = path.join(__dirname, '../templates/Email/bookingRequestAdminUser.html'); var templateData = { 'imageLog...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reservmail(req, res, next) {\n sendEmailWithTemplate(req.body.reservationId, req, res, 'reservmail');\n}", "function registeredmail(req, res, next) {\n sendEmailWithTemplate(req.body.reservationId, req, res, 'registeredmail');\n}", "function draftEmail(request){\n request.buttonLink = \"https://goo...
[ "0.6573987", "0.6179532", "0.6177417", "0.6116658", "0.6046636", "0.6021611", "0.60139376", "0.60118735", "0.6000059", "0.59956807", "0.5991381", "0.59782845", "0.59396046", "0.59277344", "0.59095335", "0.5907119", "0.5904013", "0.58977664", "0.5891039", "0.5883149", "0.58088...
0.6187515
1
define the UserApi class
function UserApiClass(initJson) { return this.getInstance().init(initJson); // when called from "new", return the only instance of the API }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UserController() {}", "function User(){\n\n}", "function Api(){\n}", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "constructor(api) {\r\n this._api = api;\r\n }", "function user()\n {\n\n }", ...
[ "0.67986935", "0.67969996", "0.66813004", "0.6670934", "0.6670934", "0.6670934", "0.6624171", "0.66188383", "0.6614669", "0.66059476", "0.66059476", "0.66058046", "0.65203375", "0.6513135", "0.6491886", "0.64558226", "0.6450918", "0.64280754", "0.64038026", "0.6370471", "0.63...
0.7320505
0
Generates C3js line chart chartType : chart's type, ex: spline containerId : id of container where to place chart columnsData : chart's data minMax : configure min and max values for y axis of the chart
function generateChart(chartType, containerId, columnsData, minMax) { if (!minMax) { var newChart = c3.generate({ bindto : containerId, data : { columns : columnsData, type : chartType }, transition: { duration: 0 }, tooltip: { show: false }, po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawChart(chartType){\n\n var NormalSkin=\"sknlblSSRSB15px\";\n var activeSkin=\"sknlbl003E75SSPSB5R15px\";\n var XaxisArray=[];\n var YaxisArray=[];\n var data=[];\n var maxVal=0;\n\n if(chartType===\"1M\")\n {\n XaxisArray=['5', '10', '15', '20', '25', '30'];\n YaxisArr...
[ "0.62067014", "0.6191937", "0.6127916", "0.60989547", "0.6065508", "0.5907766", "0.5835683", "0.58313096", "0.5816003", "0.58145565", "0.5814203", "0.58046156", "0.5802613", "0.5793232", "0.5748936", "0.57142335", "0.5666355", "0.56111306", "0.5607783", "0.560362", "0.5601132...
0.65897006
0
Generates easyPieChart pie chart containerId : id of container where to place chart color : pie chart's color pieSize : pie chart's size
function generatePieChart(containerId, color, pieSize) { $(containerId).easyPieChart({ animate:{ duration:500, enabled:true }, barColor:color, trackColor:'#ccc', scaleColor:false, lineWidth:5, lineCap:'circle', size: pieSize }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generatePieChart() {\n var pieChartOutline = {\n \t\"header\": {\n \t\t\"title\": {\n \t\t\t\"text\": \"Inheritance\",\n \t\t\t\"fontSize\": 20,\n \t\t\t\"font\": \"Helvetica Neue\",\n // \"font-weight\": \"bold\",\n \t\...
[ "0.71957266", "0.70562696", "0.6755985", "0.66023445", "0.6579263", "0.65573126", "0.6522442", "0.6403368", "0.63739026", "0.6345529", "0.63024473", "0.62735635", "0.6263925", "0.62502486", "0.62345636", "0.6195863", "0.61677295", "0.6157573", "0.61470485", "0.61363614", "0.6...
0.8393226
0
Idem to loadTable() but add a progressbar in the latest column of each row
function loadTableWithBar(tableId, fields, data) { var rows = ''; $.each(data, function(index, item) { var row = '<tr>'; $.each(fields, function(index, field) { if (index == (fields.length - 1)) { var progressBar = '<div class="progress">'; progressBar += '<div class="pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showPageLoadingIndicator() {\n\t\tlet max_columns = this.column_name_array.length+1;\n\t\tgetComponentElementById(this,\"DataTableBody\").html('<tr id=\"'+this.getUid()+'_DataTableLoading\"><td' +\n\t\t\t' colspan=\"'+max_columns+'\"' +\n\t\t\t'><div class=\"dx-loading\"></div></td></tr>');\n\t}", "function load...
[ "0.7012566", "0.68496925", "0.6693384", "0.6559026", "0.6429839", "0.64061695", "0.6393641", "0.6370808", "0.6325213", "0.6157633", "0.6121466", "0.6047354", "0.6047354", "0.60166997", "0.60166025", "0.5987696", "0.594481", "0.5918644", "0.59121096", "0.5908379", "0.5902583",...
0.7522037
0
__________________________________________________________________________ Constructor client: apiClient the request will run against (see apiClient) reqConfig: request config (see: axiosConfig)
constructor(client, reqConfig, cancelObj=null) { assert(client && reqConfig,`apiRequest: must specify a client and a configuration`); this._id = uuidv4().substring(0,8); log.debug(`[${this._id}]: new request: ${JSON.stringify(reqConfig)}`); this._client = client; this._config = r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.client = axios.create({\n baseURL: constants.api.url\n });\n }", "function Client (globalRequest) {\n var emptyResponse = JSON.parse(JSON.stringify(response))\n var body = ''\n\n // utility function to create an empty request object\n this.emptyRequest = fun...
[ "0.7127608", "0.6338743", "0.6288502", "0.6194328", "0.61556137", "0.61141205", "0.601488", "0.60051614", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0.59896076", "0...
0.66570896
1
__________________________________________________________________________ Clone this request: return a new identical request with a diff ID
clone() { log.debug(`[${this._id}]: generating a fresh (clone) request`); return this._client.request(this._config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clone () {\n\t if (!(this instanceof Request)) {\n\t throw new TypeError('Illegal invocation')\n\t }\n\n\t // 1. If this is unusable, then throw a TypeError.\n\t if (this.bodyUsed || this.body?.locked) {\n\t throw new TypeError('unusable')\n\t }\n\n\t // 2. Let clonedRequest be the resu...
[ "0.6540173", "0.64380705", "0.63302237", "0.63193965", "0.62110066", "0.60919213", "0.6055578", "0.5970088", "0.5926019", "0.5854349", "0.5854349", "0.584467", "0.57998204", "0.57713234", "0.57640874", "0.5740893", "0.5732225", "0.57166696", "0.5714018", "0.5678447", "0.56501...
0.76173896
0
__________________________________________________________________________ Cancel a running request Does not throw Returns true/false on successful/failed cancel.
cancel(message) { assert(this._canceled === false); // no re-canceling log.debug(`[${this._id}]: attempting to cancel request`); if (this._state !== 'running') { log.warn(`[${this._id}]: cannot cancel non-running request (state: ${this._state})`); return false; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cancel() {\n if (this._requestTask && typeof this._requestTask.abort === 'function') {\n this._requestTask.abort();\n }\n\n this._requestTask = null;\n }", "function cancel() {\n if (status === RUNNING) {\n // Setting status to CANCELLED does not necessarily mean that the task/iterators ar...
[ "0.7820226", "0.7418652", "0.7405619", "0.73909605", "0.73909605", "0.7388922", "0.73655933", "0.732943", "0.732943", "0.732943", "0.732943", "0.732943", "0.732943", "0.732943", "0.732943", "0.732943", "0.732943", "0.732943", "0.73152375", "0.7300602", "0.7286479", "0.72806...
0.7943204
0
Initializes owl carousel and updates the corresponding state
initCarousel() { this.$owlContainer = $( this.owlContainer ); this.$owlContainer.owlCarousel({ itemsCustom: [ [0, 1], [540, 2], [780, 3], [1150, 4] ], pagination: false, }); this.setState({ owlInit: true }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function owlCarouselInit() {\r\n\t\t\t\r\n\t\t\tif ( $('.owl-carousel').length === 0 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$('.owl-carousel').each(function () {\r\n\t\t\t\t\r\n\t\t\t\t$(this).addClass('owl-theme'); \r\n\t\t\t\t\r\n\t\t\t\tvar $that = $(this),\r\n\t\t\t\t$autoRotateBool = $...
[ "0.75856274", "0.73762023", "0.7333789", "0.7095208", "0.7094833", "0.6813156", "0.68103784", "0.6778385", "0.6767924", "0.6753492", "0.6748906", "0.67348325", "0.67266273", "0.66689104", "0.66362184", "0.66287625", "0.65786743", "0.65747046", "0.6553", "0.65367174", "0.65344...
0.8070093
0
SDK version: 1.5 or higher The NetCast Platform provides an onPlayStateChange event in the Media Player plugin object. Developers can receive play state change event. Developer can receive a play state change event when the play state of currently playing media item is changed.
onPlayStateChange() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPlayerStateChange(event) {\n\n }", "function onPlayerStateChange(event) {\n\n\t// console.log(\"event\"+event.data);\n\n}", "function onPlayerStateChange(event) {\n if (event.data == YT.PlayerState.PLAYING) {\n console.log(\"now playing...\");\n }\n console.log(\"Player state has ch...
[ "0.76388407", "0.7415198", "0.7244441", "0.7153471", "0.7020724", "0.7020302", "0.6996749", "0.698231", "0.695646", "0.69290775", "0.6920086", "0.6912915", "0.6905845", "0.68264586", "0.6791289", "0.6777111", "0.67679906", "0.67141545", "0.67104423", "0.66993266", "0.6680503"...
0.8243744
0
Set environment map for Image Based Lighting
setEnvironmentMap (envMap) { if (this._envProbe) { this._envProbe.setEnvironmentMap(this._renderer, envMap); this._envProbeUpdated(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadEnvironmentMap(environmentMapName) {\n textureLoader.load(`textures/cube/${environmentMapName}`, function (texture) {\n texture.mapping = THREE.UVMapping;\n var sphereMaterial = new THREE.MeshBasicMaterial({ map: texture });\n\n if (!environmentMap) {\n var sphereGeo...
[ "0.6771547", "0.639698", "0.6281999", "0.6174412", "0.6112948", "0.5976984", "0.59591436", "0.59029275", "0.5901573", "0.58965886", "0.5888482", "0.5795386", "0.57929516", "0.5784023", "0.57675993", "0.57671374", "0.576619", "0.5765358", "0.5761696", "0.574833", "0.57279074",...
0.6429953
1
increment our time and flip the clock every minute
function updateTimeEveryMinute() { time.increment(); flipClock(time.copy()); setTimeout(updateTimeEveryMinute, 60000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function increment() {\n\t\t// setActive(false);\n\t\t// this floor logic allows the adding of minutes to always round down the seconds\n\t\tconst newTimer = Math.floor((sessionTime + 60000) / 60000) * 60000;\n\t\t// setTimer(newTimer);\n\t\tsetSessionTime(newTimer);\n\t}", "function tick() {\n if (hrs === 0 ...
[ "0.74435455", "0.74028563", "0.72287583", "0.7207101", "0.71668375", "0.7146529", "0.71206105", "0.71063113", "0.7080477", "0.7075878", "0.7064927", "0.7047888", "0.7041439", "0.70390016", "0.7019569", "0.7004769", "0.7002202", "0.6981922", "0.6974929", "0.6972943", "0.696406...
0.821882
0
select m.quantity, i.ingredient_name as ingredientname from mix as m join ingredients as i on i.id = m.ingredient_id where m.recipe_id = 3
function getShoppingList(recipe_id) { return db('mix as m') .join('ingredients as i', 'i.id', 'm.ingredient_id') .select('i.ingredient_name', 'm.quantity') .where('m.recipe_id', recipe_id) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInstructions(recipe_id) { \n /*\n select re.recipe_name as recipeName,\n ri.instructions as instructions\n from \n recipes_ingredients as ri\n join\n recipes as re\n on \n re.id = ri.recipe_id\n\n where \n ri.recipe_id = re.recipe_name\n */\n re...
[ "0.67923355", "0.67778766", "0.64411664", "0.61896473", "0.61195904", "0.60644686", "0.60094273", "0.58744574", "0.585325", "0.5831028", "0.5800836", "0.5800714", "0.57468957", "0.5723946", "0.5696102", "0.5694199", "0.5658482", "0.5658295", "0.5598194", "0.5596772", "0.55855...
0.79311633
0
select s.instructions, s.step_number, r.recipe_name from steps as s join recipe as r on r.id = s.recipe_id where r.id = 1
function getInstructions(recipe_id) { return db('steps as s') .join('recipe as r', 'r.id', 's.recipe_id') .select('s.instructions', 's.step_number', 'r.recipe_name') .where('r.id', recipe_id) .orderBy('s.step_number') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInstructions(id) {\n return db(\"recipes as r\")\n .select(\"s.step_number\", \"s.description\")\n .join(\"steps as s\", { \"r.id\": \"s.recipe_id\" })\n .where({ \"r.id\": id });\n}", "function getInstructions(recipe_id) { \n /*\n select re.recipe_name as recipeName,\n ri.instr...
[ "0.80208457", "0.76199454", "0.70883375", "0.63972706", "0.6076393", "0.5848926", "0.5819005", "0.57882255", "0.57841325", "0.56960696", "0.56833696", "0.56147844", "0.56139994", "0.5577542", "0.5521002", "0.5455041", "0.53934216", "0.5374815", "0.53604263", "0.53581077", "0....
0.7874774
1
getRainbowRgbColor is normally used as such: let color = getRainbowRgbColor(1, 1, 1, 0, 2 Math.PI / 3, 4 Math.PI / 3, 150, 55, updateCounter / 1000);
function getRainbowRgbColor(frequency1, frequency2, frequency3, phase1, phase2, phase3, center, width, counter) { // Center is the R, G, B values middle point, width is how much they oscillate around that // Counter offsets the color to cycle the rainbow if (typeof center === "undefined") center = 128; if (typeof...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateRainbowColours() {\n var size = 16;\n rainbow = new Array(size);\n for (var i = 0; i < size; i++) {\n var red = sin_to_hex(i, 0 * Math.PI * 2 / 3); // 0 deg\n var blue = sin_to_hex(i, 1 * Math.PI * 2 / 3); // 120 deg\n var green = sin_to_hex(...
[ "0.73029166", "0.7063736", "0.7031674", "0.7026943", "0.69903356", "0.696585", "0.6960983", "0.69007736", "0.6866167", "0.68329483", "0.6812839", "0.67908305", "0.67752725", "0.66911334", "0.66702026", "0.66386306", "0.6628308", "0.6601476", "0.65975785", "0.6592978", "0.6589...
0.7378804
0
CounterCtrl() The controller for active tasks counter.
function CounterCtrl(todoList, todoFilter) { var vm = this; /** * activeTaskCount() * Get active task count, given a filter. * @return : A count of tasks for the filter applied. */ vm.activeTaskCount = function() { var currentFilter = todoFilter.option; var filterTasks =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timerController() {\n this.model = new timerModel();\n this.view = new timerView();\n}", "function taskCtrl(\n $scope,\n $rootScope,\n $log\n ) {\n\n var self = this;\n\n // Display scope name in console & AngularJS Batarang\n self.title = \"taskControl...
[ "0.60533965", "0.56485504", "0.55355185", "0.55260134", "0.550961", "0.5478103", "0.5457433", "0.54524225", "0.5451977", "0.54490715", "0.5392192", "0.53901124", "0.53867596", "0.5267755", "0.5231897", "0.5231897", "0.5231897", "0.5231897", "0.5194977", "0.5162576", "0.511471...
0.7403302
0
Returns an active estimate for a component if it has one
function component_viewer_res_data_get_active_estimate_for_component(component_uid) { for (var cur_do = 0; cur_do < dataObjects.RESOURCEALLOCATIONkeys.length; cur_do++) { var res_alloc_obj = dataObjects.RESOURCEALLOCATIONs[dataObjects.RESOURCEALLOCATIONkeys[cur_do]]; if (res_alloc_obj.itemuid==component_uid) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function component_viewer_res_data_component_has_active_estimate\n(component_uid) {\n\treturn component_viewer_res_data_get_active_estimate_for_component(component_uid)!=undefined;\n}", "function component_viewer_res_data_componentRequiresEstimate(component_object) {\n\t//Given the UID of a component determine i...
[ "0.69671744", "0.559047", "0.5562321", "0.5342762", "0.52844036", "0.52118516", "0.5165079", "0.5146835", "0.50728214", "0.5050953", "0.5021068", "0.5013622", "0.4990543", "0.49869907", "0.49585214", "0.4956334", "0.495283", "0.49437916", "0.49370825", "0.49254236", "0.491804...
0.7200335
0
Return true if this component has an active estimate. (Ignore completed estimates)
function component_viewer_res_data_component_has_active_estimate (component_uid) { return component_viewer_res_data_get_active_estimate_for_component(component_uid)!=undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isActive() {\n if (this.health <= 0) return false;\n let aliveOp = this.operators.find(o => o.getHealth() > 0);\n return !!aliveOp;\n }", "isInactive() {\n return this.workStatus == 0;\n }", "isActive(){\n return this._units.some(unit => unit.isActive());\n }", "function...
[ "0.66076756", "0.63182276", "0.6299058", "0.6080482", "0.60049486", "0.5995913", "0.5954696", "0.59416443", "0.58721924", "0.574932", "0.5722817", "0.5694171", "0.56842846", "0.5650246", "0.5645736", "0.562327", "0.56028855", "0.5595321", "0.55868673", "0.55694216", "0.556159...
0.77292395
0
Return true if this uid is in the missing estimate list
function component_viewer_res_data_notify_component_has_entry_in_missing_estimate_list(uid) { for (var cur_do = 0; cur_do < component_viewer_res_data_glob.componentsMissingEstimate.length; cur_do++) { if (component_viewer_res_data_glob.componentsMissingEstimate[cur_do]==uid) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hadDiscount(userId) {\n\t\t\tvar hadIt = false;\n\t\t\tif (model.eventDetails.discountedMembers.indexOf(userId) !== -1) {\n\t\t\t\thadIt = true;\n\t\t\t}\n\t\t\treturn hadIt;\n\t\t}", "function checkForUid(arr, uid){\n var duplicate = false;\n for (var i = 0; i < arr.length; i++) {\n if...
[ "0.5837297", "0.5701866", "0.5619006", "0.5619006", "0.54468495", "0.5412257", "0.5339746", "0.533324", "0.5317653", "0.5314519", "0.5297755", "0.52948797", "0.5280015", "0.52724344", "0.52682865", "0.5226794", "0.5224967", "0.52180344", "0.5206072", "0.5184818", "0.51592237"...
0.80200654
0
Create an LINKED estimate for an unestimated component
function component_viewer_res_data_create_estimate(component_uid, edited_value_obj) { component_viewer_res_data_create_estimate_INTERNAL( edited_value_obj, component_uid, //No component edited_value_obj.remain //Origional days same as remain ); if (typeof(component_uid)!="undefined"){ //REMOVE FROM estimate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateViewObjects(state) {\n if (!this.viewObjects[\"main\"] || (!this.labels[state.labels[this.constructor.name]] && this[state.labels[this.constructor.name]])) {\n this.createViewObjects(state);\n }\n const obj = this.viewObjects[\"main\"];\n\n let _start = extractCoords(th...
[ "0.5272004", "0.5131414", "0.50375116", "0.47459522", "0.46644223", "0.46563154", "0.4647242", "0.46382537", "0.46343398", "0.4624346", "0.45799172", "0.45573682", "0.45509264", "0.4548067", "0.4532959", "0.45063698", "0.44983557", "0.4495093", "0.44937086", "0.44805497", "0....
0.5262272
1
Edit estimate if change_comp_status is not undefined then also alter the component status
function component_viewer_res_data_edit_estimate(estimate_uid, edited_value_obj, change_comp_status) { var resAlloc_obj = dataObjects.RESOURCEALLOCATIONs[estimate_uid]; if (typeof(resAlloc_obj)=="undefined") { console.log("ERROR couldn't save bad uid"); return; }; resAlloc_obj.text = edited_value_obj.text; r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function component_viewer_res_data_notify_component_state_change(component_uid) {\n\t//console.log(\"Change of state for \" + component_uid);\n\tvar comp = ic_soa_data_getComponentFromUID(component_uid);\n\tvar missing_estimate = false;\n\tif (component_viewer_res_data_componentRequiresEstimate(comp)) {\n\t\tif (t...
[ "0.612878", "0.6068418", "0.58945465", "0.56741905", "0.5671254", "0.5653548", "0.56329757", "0.55187786", "0.5510436", "0.55026805", "0.5461668", "0.53948784", "0.5365129", "0.532341", "0.5316959", "0.53008145", "0.5291999", "0.52481973", "0.52427125", "0.5242646", "0.523443...
0.7442576
0
Functions below deal with scheduled data Returns the highest lane end day passed the scheduled lane object
function component_viewer_res_data_sch_getHighestLaneEndDay(lane_obj) { var max_end = 0; for (var alloc_res in lane_obj.allocated_resourses) { if (lane_obj.allocated_resourses[alloc_res].end_day>max_end) max_end=lane_obj.allocated_resourses[alloc_res].end_day; }; return max_end; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLatestDeparture(data) {\n function reducer(latestDepartureTime, curVisitor) {\n let curDeparture = curVisitor.departure === null ? 0 : Number.parseInt(curVisitor.departure);\n return Math.max(latestDepartureTime, curDeparture);\n }\n let baseDepartureTime = 0;\n return data.reduce(reducer, ba...
[ "0.5851617", "0.5800483", "0.5707091", "0.5707091", "0.57051533", "0.55885154", "0.5504501", "0.5400494", "0.5343488", "0.533484", "0.52961946", "0.52586395", "0.5249782", "0.52393425", "0.5177751", "0.51604986", "0.51351374", "0.51319003", "0.51279914", "0.51259047", "0.5124...
0.8163684
0
B extends A subClass: B, superClass: A
function _inherits (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function'); } // B.prototype = Object.create(superClass.prototype,{ // value: B, // writable: true, // configurable: true // }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function superClass(...args) {}", "function inheritPrototype(A, B) {\n var F = function () {};\n F.prototype = B.prototype;\n A.prototype = new F();\n A.prototype.constructor = A;\n }", "function inherit(subClass, superClass) {\n subClass.prototype = Object.create(superClass.p...
[ "0.68779945", "0.67429805", "0.6440109", "0.6437616", "0.6424733", "0.6377585", "0.63676476", "0.63676476", "0.6282839", "0.6245043", "0.62125087", "0.61171365", "0.6057348", "0.6055549", "0.6040961", "0.60378474", "0.60030425", "0.59831613", "0.5964591", "0.5933625", "0.5914...
0.70016694
0
Hide the bench table
function hidePrettyBenchSelect() { $('body').removeClass('show-bench-select'); $( '#pretty-bench-select-table td' ).removeClass('disabled').removeClass('current'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _sh_overview_hidden(){\n\tin_overview = false;\n\twrap_plane_clone.visible = false;\n\tif( paused_preserve ) pause();\n}", "function a11yc_empty_table(){\n//console.time('a11yc_empty_table');\njQuery(function($){\n//\tconsole.log('function:'+'a11yc_empty_table');\n\tif(!a11yc_env.is_hide_passed_item) re...
[ "0.6859059", "0.6694643", "0.6670508", "0.64512885", "0.64119774", "0.63874435", "0.6377733", "0.6351545", "0.6320533", "0.6319975", "0.629952", "0.622252", "0.62174135", "0.62056786", "0.62042046", "0.62030697", "0.62009346", "0.6153147", "0.6146636", "0.6131178", "0.6119598...
0.722625
0
Register input for tag list
set tagList(value) { if (value) { this._tagList = value; this._tagList.registerInput(this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerTagAddingEvents() {\n $('#tagsinput').keypress(function (event) {\n if (event.which == 44 || event.which == 13) {\n event.preventDefault();\n let data = $(this).val().split(',');\n addTag(this, data);\n }\n });\n\n $('#tagsinput').change(func...
[ "0.73130053", "0.6840723", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", "0.6688772", ...
0.7482665
0
Checks to see if the blur should emit the (tagEnd) event.
blur() { this.focused = false; // Blur the tag list if it is not focused if (!this._tagList.focused) { this.triggerValidation(); this._tagList.blur(); } // tslint:disable-next-line: no-unnecessary-type-assertion if (this.addOnBlur) { th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleBlur(event) {\n this.finishUpdate();\n }", "handleBlur () {\n // Should the container require to do anything in particular here\n }", "function handleBlur() {\n\t\t\tif (onBlur) {\n\t\t\t\tonBlur(value);\n\t\t\t}\n\t\t}", "function blurEvent() {\n active = false;\...
[ "0.6515852", "0.64525867", "0.6440872", "0.6392629", "0.63059855", "0.62739193", "0.6241703", "0.618038", "0.61073154", "0.60012114", "0.5978789", "0.5964718", "0.5943729", "0.5943729", "0.5943729", "0.5926518", "0.5925562", "0.592143", "0.592143", "0.592143", "0.592143", "...
0.74266684
0
Checks whether a keycode is one of the configured separators.
isSeparatorKey(event) { if (hasModifierKey(event)) { return false; } // tslint:disable-next-line: deprecation return this.separatorKeyCodes.indexOf(event.keyCode) > -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_isSeparatorKey(event) {\n return !hasModifierKey(event) && new Set(this.separatorKeyCodes).has(event.keyCode);\n }", "function callIfSeparator(callback) {\n return function (event) {\n if (inputSeperators[event.key]) {\n callback(event)\n }\n }\n}", "function __is_comm_chars(char_code)\...
[ "0.75900245", "0.63875955", "0.6213", "0.6073058", "0.59754413", "0.59616935", "0.59616935", "0.59616935", "0.58977956", "0.58893317", "0.58751225", "0.5765509", "0.5751939", "0.5733874", "0.5732385", "0.57171416", "0.57171416", "0.57122713", "0.56997275", "0.5688668", "0.568...
0.6991408
1
define the random reward
function getRandomReward() { var rewards = ["gold", "silver", "bronze", "A rock", "some dirt", "a sharp tooth"]; var randIndex = Math.floor(Math.random() * rewards.length); return rewards[randIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setReward(state) {\n\n let currentLevel = state.currentLevel;\n let difficulty = state.difficulty;\n let reward = Reward[difficulty];\n let levels = state.levels;\n\n \n if(currentLevel===0){\n levels[0].reward = reward.rewardPer;\n }\n else if(currentLevel < 10){\n \n\n fun...
[ "0.63975745", "0.63338083", "0.62080926", "0.6177284", "0.6172507", "0.6159136", "0.614812", "0.6100958", "0.5976048", "0.5930688", "0.59286004", "0.59132254", "0.58818054", "0.5877065", "0.58718747", "0.5851719", "0.58509773", "0.5831132", "0.58071846", "0.5785781", "0.57809...
0.65190387
0
Function for save a House Metric
function saveHouseMetric(houseMetric, res){ houseMetric.save() .then( function (){ return res.status(200).jsonp(houseMetric); }) .catch(function (saveError){ return res.status(500).send(saveError.message); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save() {\r\n Utilities.saveObject('bejeweled_high_score', BEST_SCORE);\r\n }", "function saveMeter()\r\n{\r\n\taddEntpMeter(arrEntp[gArrayIndex]);\r\n}", "function saveDoseByMeasure(uuids, configuredByAdmin) {\r\n return post('/dosebymeasure/save', { uuids: uuids, configuredByAdmin: confi...
[ "0.6015997", "0.5886285", "0.55259216", "0.55156124", "0.54967815", "0.54839486", "0.54724264", "0.54457134", "0.54383516", "0.54048336", "0.53938043", "0.5371769", "0.53400576", "0.53098017", "0.53021955", "0.5300268", "0.5274058", "0.5274058", "0.5274058", "0.5274058", "0.5...
0.7086685
0
Detect if the string contains only numbers and capital letters.
function isLetterNumer(in_str) { var numbers = /^[0-9A-Z]+$/; return String(in_str).match(numbers) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAlpha(c){\r\n return /^\\w$/.test(c) && /^\\D$/.test(c);\r\n}", "function onlyLetters(input) {\n\tinput = input.toUpperCase();\n\tfor (var i = 0; i < input.length; i++) {\n\t\tif (input[i] > 'Z' || input[i] < 'A')\n\t\t\treturn false\n\t}\n\treturn true;\n}", "function containsOnlyLetters(input)\...
[ "0.762941", "0.7598577", "0.7537046", "0.74238986", "0.7381426", "0.7366432", "0.7291007", "0.726328", "0.7215013", "0.71804506", "0.7174825", "0.7174825", "0.71730244", "0.7170017", "0.71635914", "0.71463007", "0.71172", "0.7097507", "0.70861995", "0.7083618", "0.70356715", ...
0.761001
1
Return true is the input string is a valid TUM code
function isTumCode(in_code) { return (typeof(in_code) == 'string' &&//input must be defined and non-null (in_code == 'SWT' || //Make sure if the code meets the coding rule isCurrency(in_code) || //tum: Custom tum, 40 capital letters or number isCustomTum(in_code) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mtMtCheck(tin) {\n if (tin.length !== 9) {\n // No tests for UTR\n var chars = tin.toUpperCase().split(''); // Fill with zeros if smaller than proper\n\n while (chars.length < 8) {\n chars.unshift(0);\n } // Validate format according to last character\n\n\n switch (tin[7]) {\n ca...
[ "0.66450095", "0.6606755", "0.6548072", "0.64440924", "0.6426774", "0.6395485", "0.6368211", "0.63568753", "0.6157577", "0.6104843", "0.6093714", "0.5895562", "0.58809847", "0.58792603", "0.58677447", "0.5840993", "0.57991934", "0.5792304", "0.5788775", "0.5783172", "0.577467...
0.7216503
0
Check if the input is a valid Amount object Amount should have 3 properties value issuer/counterparty currency
function isAmount(in_obj) { if (typeof(in_obj) != 'object') return false; if (typeof in_obj.value !== 'string' || !isFloat(in_obj.value)) return false; if (!isTumCode(in_obj.currency)) return false; //AMOUNT could have a field named //either as 'issuer' //or as 'counterpa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAmountObject(arg) {\n var keys = Object.keys(arg).sort();\n return (keys.length === 3 &&\n keys[0] === \"currency\" &&\n keys[1] === \"issuer\" &&\n keys[2] === \"value\");\n}", "function checkAmount(amount) {\n if (!(typeof amount === 'string' || amount instanceof bignum...
[ "0.72425765", "0.68506896", "0.63830847", "0.63830847", "0.63646406", "0.63048995", "0.6232855", "0.6124543", "0.6101802", "0.6054436", "0.6047618", "0.6014982", "0.5963359", "0.5918097", "0.5883579", "0.570904", "0.5705352", "0.5665364", "0.5633286", "0.56128967", "0.5594654...
0.7711453
0
Build the amount object with three parameters.
function buildAmount(in_currency, in_issuer, in_value) { if (!isTumCode(in_currency)) throw new ParamException("Invalid currency code!"); if (!base.isValidAddress(in_issuer)) throw new ParamException("Invalid Jingtum address!"); if (!isFloat(in_value)) throw new ParamException("Inv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NewOrderConstructor(amount) {\n this.amount = amount;\n}", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0x40699cd0;\n this.SUBCLASS_OF_ID = 0x8680d126;\n\n this.currency = args.currency;\n this.totalAmount = args.totalAmount;\n ...
[ "0.61510247", "0.6111992", "0.6027065", "0.6016583", "0.5888909", "0.5872877", "0.5829563", "0.5817405", "0.58097917", "0.5776138", "0.57740027", "0.57490385", "0.5730509", "0.57277685", "0.5694682", "0.56837386", "0.5658847", "0.56552154", "0.5589759", "0.55820286", "0.55769...
0.70485383
0
Prefill the service form with reminder data
function fillServiceForm(data, remID) { // Parse data const serviceName = data["service"]["name"] const reminderDuration = data["reminder"]["duration"] const reminderMileAmount = data["reminder"]["mile-amount"] const partsList = data["service"]["parts"] // Add reminder and service to form ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearForm() {\n that.data = {\n taskDate: {}\n };\n }", "function resetPresidentForm(){\n fechaInicioField.setValue('');\n descripcionEventoField.setValue('');\n }", "function setUpForm()\r\n {\r\n var form = {\r\n patients : patients,\...
[ "0.62985075", "0.62759423", "0.6175734", "0.6063305", "0.6030602", "0.59470314", "0.58975875", "0.58783674", "0.5867902", "0.58307177", "0.5829812", "0.5822626", "0.57979745", "0.5786799", "0.5784099", "0.57644707", "0.57240826", "0.5710509", "0.570641", "0.5694941", "0.56930...
0.71589065
0
Add mock helper functions for parentchild relationships
function parentChildHelper(childof){ return { getChildId: function(){ return childof.child; }, getFatherId: function(){ return childof.father; }, getMotherId: function(){ return childof.mother; } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testRelationHlpMethods(cb){\n\n var Parent = Model.define('P1', ['MemoryDataSource'], {\n content:{}\n });\n Parent.extendDefaults({ connection:{ collection:'parents' } });\n \n var Child = Model.define('CH1', ['MemoryDataSource'], {\n parentId:{ isString:true },\n cont...
[ "0.59224886", "0.57158494", "0.56044465", "0.554698", "0.5172177", "0.5158063", "0.5115977", "0.50993717", "0.50480115", "0.5035069", "0.50189334", "0.49531323", "0.4929998", "0.49252206", "0.48995632", "0.48872945", "0.48147494", "0.48147494", "0.47913477", "0.4770895", "0.4...
0.64603937
0
pinta la fila con los datos del arraglo 'arrayPrescripcion'
function agregarFilaPrescripcion(arrayPrescripcion, categoria_safe){ var arrayLongitud = arrayPrescripcion.length - 1; var tipo_medicamento = ""; if(arrayPrescripcion[arrayLongitud]["safe"] == "npt"){ tipo_medicamento = "_npt"; }else if(arrayPrescripcion[arrayLongitud]["safe"] == "oncologico" || arrayPrescr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inicializarArrayResultados() {\r\n for(var i=1;i<=totalPreguntas;i++) {\r\n resultadoEncuesta[\"p\"+i+\"-alt\"]=[0,0,0,0];\r\n }\r\n}", "function registrarDatos(ancho,grueso,varas,precioP) {\n datos[0].push(ancho);\n datos[1].push(grueso);\n datos[2].push(varas);\n ...
[ "0.6354957", "0.5703654", "0.57010955", "0.5701004", "0.56194514", "0.5573747", "0.5561426", "0.5560084", "0.5532718", "0.5473581", "0.54657793", "0.54562914", "0.5453394", "0.54425466", "0.5436318", "0.5415544", "0.5391707", "0.5380336", "0.53330314", "0.53176737", "0.531494...
0.5937732
1
elimina la fila de la prescripcion con el indice enviado
function EliminarFilaPrescripcion(fila){ $('#fila'+fila).remove(); $('.fila'+fila+"Observacion").remove(); arrayPrescripcion.splice(fila,1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarLinea(indice){\n $(\"#fila\" + indice).remove();\n calculaTotalAjusteInv();\n detalles=detalles-1;\n evaluarAjusteInv();\n}", "function DeleteAsistencia(idAsistencia) {\n let i = 0;\n asistieron.forEach(element => {\n if (element == idAsistencia) asistieron.splice(i, 1);\n ...
[ "0.7306197", "0.71466106", "0.6924188", "0.6891403", "0.6873424", "0.68695503", "0.6839892", "0.6778743", "0.6778075", "0.675672", "0.67342806", "0.67275447", "0.67161727", "0.67128277", "0.6693152", "0.6678615", "0.66343105", "0.66204244", "0.66042006", "0.6595986", "0.65955...
0.7485687
0
Component Util boxshadow: none | hshadow vshadow blur spread color inset|initial|inherit textshadow: none | offsetx offsety blurradius color |initial|inherit utility function to process values accordingly numbers must be floats and color must be rgb object
function processShadowArray (shadow,tweenProp){ let newShadow, i; if (shadow.length === 3) { // [h-shadow, v-shadow, color] newShadow = [shadow[0], shadow[1], 0, 0, shadow[2], 'none']; } else if (shadow.length === 4) { // [h-shadow, v-shadow, color, inset] | [h-shadow, v-shadow, blur, color] newShadow = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_updateCss() {\n\t\tlet data = this.getValues(),\n\t\t\tname = this.controlOptions.control.name,\n\t\t\tcssString = '';\n\n\t\tif ( data['horizontal-position'] || data['vertical-position'] || data['blur-radius'] || data['spread-radius'] ) {\n\t\t\tcssString = [];\n\t\t\tcssString.push( this.shadowType );\n\t\t\tcs...
[ "0.5858038", "0.5794732", "0.5773075", "0.57399696", "0.57388836", "0.57318056", "0.55427617", "0.5461558", "0.5448848", "0.53919613", "0.53829736", "0.5378871", "0.53749955", "0.53736484", "0.53702927", "0.53638375", "0.5353961", "0.53538704", "0.53325856", "0.5318334", "0.5...
0.58285975
1
Utility function that returns style string removing properties listed in 'exclude' parameter.
function getStyleAsStringExcluding(el, exclude = []) { var style = el.style; for (var i = 0; i < exclude.length; i++) { style.removeProperty(exclude[i]); } var styleArr = Array.from(style); var str = styleArr.map(function (pair) { return pair.join(': '); }).join('; '); //console.log('Style Attrubu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "uncss(...removeProps) {\n\t\tlet css = {};\n\t\tfor (let prop of removeProps)\n\t\t\tcss[prop] = '';\n\t\treturn this.css(css);\n\t}", "uncss(...removeProps) {\n\t\tlet css = {};\n\t\tfor (let prop of removeProps)\n\t\t\tcss[prop] = '';\n\t\treturn this.css(css);\n\t}", "function createDangerousStringForStyles...
[ "0.65420085", "0.65420085", "0.6479958", "0.6479958", "0.6479958", "0.6479958", "0.6479958", "0.64736784", "0.64736784", "0.64736784", "0.64736784", "0.64736784", "0.64736784", "0.64736784", "0.6294109", "0.6294109", "0.6294109", "0.6281829", "0.6281829", "0.6281829", "0.6280...
0.78926057
0
Get types of each category (list of unique values in a column)
function getTypes() { if (focusCategory === "All Types") { return ["All Types"]; } else { return d3.map(this.data.pointsData, function(d) { return d[categories[focusCategory]]; }).keys().sort(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUniqueTypes() {\r\n let typesSet = this.state.types;\r\n this.state.items.map(item => (item.types.map(type => {if(this.state.allowedTypes.indexOf(type) > -1) typesSet.add(type)})));\r\n return Array.from(typesSet);\r\n }", "getData(category){\n let data = [];\n let subcat...
[ "0.59962016", "0.5856952", "0.58564067", "0.58421314", "0.5777762", "0.57625455", "0.5710579", "0.5695006", "0.5684691", "0.5681738", "0.56562954", "0.5558702", "0.5558", "0.5541252", "0.5474432", "0.54603183", "0.54436255", "0.5373881", "0.5357798", "0.53400755", "0.532156",...
0.6367363
0
Assign each bin to the nearest centroid
function assignBins() { bins.forEach(function(d, i) { // Assign the hexagon to the closest centroid d.index = nearestCentroidIndex(d); // Count the number of data points in the hexagon focusCentroids.forEach(function(c, j) { if (getCentroidIndex(c) == getCentroidIndex(d)) { if (c.hasOwnProperty("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function centroid(){\n var xc = 0;\n var yc = 0;\n for(var i = 0; i < conHull.length; i++){\n xc += conHull[i].x;\n yc += conHull[i].y;\n }\n xc = xc/conHull.length;\n yc = yc/conHull.length;\n return {\n x: xc,\n y: yc\n };\n}", "function moveCentroids()\n {\...
[ "0.6166685", "0.613342", "0.60661894", "0.6064006", "0.6012836", "0.5822644", "0.57663745", "0.5755271", "0.5725136", "0.56956923", "0.56679803", "0.56672585", "0.5664302", "0.5664302", "0.5664302", "0.5664302", "0.5664302", "0.5664302", "0.5664302", "0.5664302", "0.5664302",...
0.7920083
0
List of named slots to initialize.
get slots() { return {}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSlots() {\n\t\treturn this.metadata.slots || {};\n\t}", "slots(slots) {\n if (slots) {\n for (const slot of Object.keys(slots)) {\n const slotValue = slots[slot];\n this.slot(slot, slotValue);\n } \n }\n return this;\n }", "funct...
[ "0.64357346", "0.6433176", "0.6179862", "0.6179862", "0.61544365", "0.6102861", "0.6049443", "0.6022536", "0.601442", "0.60108536", "0.60108536", "0.60108536", "0.60108536", "0.60108536", "0.600578", "0.600578", "0.5998267", "0.59889096", "0.59889096", "0.5987853", "0.5982165...
0.682024
0
Verifies if the given guess matches all the history entries.
function matchesHistory(guess, history) { if (!isValid(guess)) { return false } return history.every((entry) => compatibleWithHistoryEntry(guess, entry)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compatibleWithHistoryEntry(guess, entry) {\n const score = computeScore(entry.guess, guess)\n return score.red === entry.score.red && score.white === entry.score.white\n}", "function isValid(guess) {\n return !hasDuplicates(guess)\n}", "function checkGuess () {\n var isItRepeated = $guessed...
[ "0.67761683", "0.6199069", "0.60662234", "0.60148746", "0.59749436", "0.57707703", "0.57174027", "0.57114613", "0.56848365", "0.56467575", "0.55509496", "0.55453384", "0.5539379", "0.553429", "0.5528839", "0.54987717", "0.5497508", "0.5490793", "0.54308856", "0.5406938", "0.5...
0.79820687
0
A valid guess has no duplicates.
function isValid(guess) { return !hasDuplicates(guess) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGuess () {\n var isItRepeated = $guessed.includes($guess);\n if (isItRepeated === true) {\n alreadyGuessed = true;\n } else {\n alreadyGuessed = false;\n }\n }", "function isValidGuess(guess) {\n if (guess.length !== 4) {\n ret...
[ "0.76279175", "0.7339495", "0.6997341", "0.6910023", "0.6905771", "0.6838795", "0.6750785", "0.67406875", "0.6676057", "0.63629085", "0.6333109", "0.63157445", "0.62921125", "0.6283974", "0.62794435", "0.6268656", "0.6248784", "0.6236466", "0.6226111", "0.62184954", "0.618894...
0.8099062
0
Funcion imprimir profesiones y uso de condicionales
function imprimirProfesiones(persona) { console.log(`${persona.nombre} es:`) if(persona.ingeniero) { console.log(`Ingeniero`); } else{ console.log('No es ingeniero'); } if(persona.cantante){ console.log('Cantante'); } else{ console.log('No es cantante'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imprimirProfesiones(persona) {\n // primeramente le pedimos que nos muestre\n // por consola el nombre de la persons\n // con template string que nos permie interpolar-\n // variables\n console.log(`${persona.nombre} es:`);\n\n // con esta condicional imprimimos las profesiones-\n // que cumplan la...
[ "0.66406107", "0.6087288", "0.599217", "0.56532663", "0.56445444", "0.5624837", "0.55806065", "0.54230726", "0.53907347", "0.5366025", "0.5353644", "0.53489023", "0.5326253", "0.5313433", "0.52847445", "0.52459687", "0.5195423", "0.51892644", "0.5184862", "0.51631397", "0.515...
0.6649648
0
Funcion que evalua la mayoria de edad de una persona y returna true o false
function esMayorDeEdad(persona){ return persona.edad >= MAYORIAD_DE_EDAD; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function esMayorDeEdad(persona) {\n // Retornamos la condicion\n return persona.edad >= MAYORIA_DE_EDAD;\n}", "function esMayorDeEdad(persona) {\n return persona.edad>=MAYORIA_DE_EDAD\n}", "function esMayorDeEdad(persona) {\n return persona.edad >= MAYORIA_DE_EDAD\n}", "function verificarMayorEdad() {\...
[ "0.7853104", "0.77064884", "0.77023286", "0.7461819", "0.7295786", "0.7285241", "0.701473", "0.68939924", "0.6795768", "0.6792084", "0.6753672", "0.6669193", "0.6632974", "0.66215086", "0.6579155", "0.634817", "0.63330615", "0.6328935", "0.6292745", "0.6274796", "0.6274796", ...
0.7919024
0
Update the current existing inventory item quantities (in arr1). If an item cannot be found, add the new item and quantity into the inventory array. The returned inventory array should be in alphabetical order by item.
function updateInventory(arr1, arr2) { // All inventory must be accounted for or you're fired! var j; var curItem = []; var newItem = []; //push the names of the current inventory item into a new array for (var i = 0; i < arr1.length; i++){ curItem.push(arr1[i][1]); } //push the names of the ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateInventory(arr1, arr2) {\n const curInventory = arr1;\n const newInventory = arr2;\n let updatedInventory = [];\n let curTracker = []; // Capture indexes of inclusive currentInventory\n \n // Add all items from newInventory and inclusive currentInventory\n newInventory.forEach(fu...
[ "0.753411", "0.7506689", "0.7430184", "0.7272552", "0.72297794", "0.72065884", "0.70672005", "0.6805789", "0.6797499", "0.6623122", "0.6560943", "0.65088075", "0.6505202", "0.64328057", "0.63297504", "0.6287039", "0.6233087", "0.6082094", "0.60369945", "0.60162264", "0.600948...
0.81557703
0
3: Which item has a "GBP" currency code? Display it's name and price.
function isGbp(item) { return item.currency_code === "GBP" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currencyCode(){\n var gbpCurrencyCode = \"\";\n items.forEach(function(num){\n if(num.currency_code == \"GBP\"){\n gbpCurrencyCode = num.title + \" \" + num.price;\n }\n });\n console.log(gbpCurrencyCode);\n return gbpCurrencyCode;\n}", "function question3 () {\n let bri...
[ "0.7525521", "0.7383495", "0.7314003", "0.7223933", "0.7093801", "0.70682234", "0.6912216", "0.68737173", "0.686776", "0.68348336", "0.6791474", "0.6765867", "0.6726141", "0.67138636", "0.6669866", "0.664133", "0.65179205", "0.6419089", "0.6378655", "0.6337994", "0.63368416",...
0.76119167
0
Gets the current root span.
get currentRootSpan() { return this.contextManager.get('rootspan'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set currentRootSpan(root) {\n if (this.contextManager.active) {\n this.contextManager.set('rootspan', root);\n }\n }", "getRoot () {\n if (this._root) {\n return this._root;\n }\n }", "getRoot() {\n\n\t\treturn this._root;\n\n\t}", "getRoot() {\n\n\t\tr...
[ "0.6776074", "0.6424778", "0.6091065", "0.6091065", "0.60908973", "0.60908973", "0.60415584", "0.6024723", "0.5950057", "0.5950057", "0.5916248", "0.58677113", "0.58397543", "0.583105", "0.583105", "0.5785163", "0.5779507", "0.57690394", "0.57690394", "0.5769015", "0.57661015...
0.90108424
0