Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
console.log(factorial(5)); 4! = 4 3 2 1 = 24
function factorial(num) { if (num === 1) return 1; if (num === 0) return 1; return num * factorial(num - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function factorial(num) {\n \n}", "function factorial(num){\n \n}", "function factorial(num){\n \n}", "function factorial(n) {\n\n}", "function factorial(n) {\n // var n = 4;\n var result = 1;\n while(n){\n result *= n--;\n }\n return result;\n}", "function factorial(n){\n\tlet ans=1;\n\tf...
[ "0.83758086", "0.83176744", "0.83176744", "0.82278544", "0.8107369", "0.80086976", "0.79500467", "0.787038", "0.7866725", "0.7835471", "0.7832561", "0.7830572", "0.78175426", "0.7803723", "0.7794929", "0.7793866", "0.7778766", "0.7778266", "0.7757857", "0.7751301", "0.7727654...
0.0
-1
console.log(collectOddValuesIterative([1,2,3,4,5])); console.log(collectOddValues([1,2,3,4,5])); console.log(collectOddValuesPure([1,2,3,4,5])); this logic will avoid us from creating a variable out of the scope of the function to push the result into that is the case in a pure recursion example right below
function collectOddValues(arr) { let result = []; function helper(helperInput) { if (helperInput.length === 0) { return; } if (helperInput[0] % 2 !== 0) { result.push(helperInput[0]); } // calling recursively with an array with every item but the one we just tested helper(helpe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collectOddValuesPure(arr) {\n let newArr = []; // this will be defined as a new array each time through which is ok here due to concatenating the arrays at the end\n if(arr.length === 0) return newArr;\n if(arr[0] % 2 !== 0){\n newArr.push(arr[0])\n }\n newArr = newArr.concat(collectOddValuesPure(...
[ "0.7725358", "0.7636324", "0.70571303", "0.7054031", "0.70276266", "0.7019393", "0.69431037", "0.6933581", "0.6914478", "0.6888918", "0.6878085", "0.6850258", "0.67831975", "0.6769277", "0.63984454", "0.62836915", "0.628362", "0.6270445", "0.625251", "0.6231331", "0.6231309",...
0.6895595
9
console.log(power(2,5)); console.log(powerIterative(2,5)); mimic Math.pow()
function power(base, exponent) { if (exponent === 0) return 1; if (exponent === 1) return base; return base * power(base, exponent - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function power (a,b){\n var result = Math.pow(a,b)\n return result\n}", "function power_1(a){return a * a;}", "function Power(a,b)\n{\nresult=Math.pow(a,b);\nreturn result;\n}", "function pow(a, b){ \n var power = 1 \n for(var i=1; i<=b; i++){\n power *= a\n } \n return po...
[ "0.7662915", "0.7615304", "0.76066667", "0.7598406", "0.756582", "0.7565236", "0.7524054", "0.7519252", "0.7487908", "0.74683416", "0.74569225", "0.74362653", "0.7413074", "0.7340462", "0.73325694", "0.7330808", "0.73295605", "0.7318255", "0.72643065", "0.7258486", "0.7254489...
0.66805565
88
yeh, this is pretty nasty... If more code is added here, this should be refactored.
function fieldSpecificSetup() { switch (name) { case 'date': $('.datePicker').lwDatepicker({ parseDate: TF.Dates.tryParseDate, formatDate: TF.Dates.formatDate, autoHideAfterClick: true }); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "static private internal function m121() {}", "static final private internal function m106() {}", "transient protected internal ...
[ "0.66519535", "0.64091027", "0.6193973", "0.60514736", "0.5958856", "0.59204257", "0.59029424", "0.5732265", "0.57092935", "0.57059056", "0.55405885", "0.5539175", "0.5506246", "0.54974914", "0.53752327", "0.537119", "0.53171074", "0.5296498", "0.5240626", "0.52377576", "0.52...
0.0
-1
Component used to separate the sides of the applicaiton.
render() { return ( <div id="Favorites"> <Columns input={this.props.favorites} action={this.props.remove}/> </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Side() { }", "function sidePanel() {\n strokeWeight(0);\n textSize(36);\n textStyle(BOLD);\n textAlign(CENTER);\n textFont(\"Cambria\");\n\n //This makes the side pannel\n fill(0, 45, 72);\n rect(width - 400, 0, width, height);\n\n //This is for the dividers on the side pannel\n fill(0, 140, 1...
[ "0.60725635", "0.56526834", "0.557668", "0.5570021", "0.5547128", "0.5534079", "0.5526594", "0.5525502", "0.5499804", "0.54867935", "0.5486359", "0.54324204", "0.543022", "0.54205626", "0.540923", "0.53964096", "0.53723776", "0.537169", "0.5365895", "0.53609806", "0.5348107",...
0.0
-1
making item in collection+json
function makingItem(dataFromDb, path){ for(let i=0; i<dataFromDb.length; i++ ){ const item = {}; item.href = path + '/' + dataFromDb[i].id; item.data = []; item.links = []; insertingDataToCollection(dataFromDb, item, i); checkingResource(item, path); cj.collection.items.pus...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "asJson() {\n return this.collection;\n }", "function fromDatastore(item){\n item.id = item[Datastore.KEY].id;\n return item;\n}", "function makeItem(id) {\n return getJSON(baseUrl + \"item/\" + id + \".json\");\n}", "function fromDatastore(item){\n item.id = item[Datastore.KEY]....
[ "0.6533277", "0.6267395", "0.59745896", "0.59648544", "0.5856486", "0.5855891", "0.5847379", "0.57934284", "0.5750815", "0.5737805", "0.5716928", "0.5699237", "0.5640711", "0.5627619", "0.5593963", "0.555576", "0.5547223", "0.55410206", "0.55369425", "0.55310225", "0.55310225...
0.60874826
2
inserting data to items
function insertingDataToCollection(dataFromDb,item, i){ let dataNumbering=0; for (parameter in dataFromDb[i]) { item.data[dataNumbering++] = { 'name': parameter, 'value': dataFromDb[i][parameter], 'prompt': parameter } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItem(data) {\n console.log(` Adding: ${data.lastName} (${data.owner})`);\n Items.insert(data);\n}", "function addItem(data) {\n console.log(` Adding: ${data.lastName} (${data.owner})`);\n Items.insert(data);\n}", "function addData(data) {\n console.log(` Adding: ${data.title}`);\n console....
[ "0.74867165", "0.74867165", "0.709601", "0.70142156", "0.69420856", "0.6883254", "0.6774716", "0.67215157", "0.665556", "0.6645886", "0.6618524", "0.654998", "0.6481947", "0.64744055", "0.6472292", "0.6422671", "0.6414556", "0.6414556", "0.6403393", "0.64030457", "0.6363306",...
0.71647066
2
checking if the resource is book, comment or shelf for giving correct links
function checkingResource(item, path){ const relBookItem = [ ['collection', path], ['read-comments', item.href +'/comments'], ['item', item.href ], ['read-shelves', item.href + '/shelves' ] ]; const relComments = [ ['collection', path], ['read-book', path.slice(0,-9)], // cut out /comments...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function action() {\n var $ = cheerio.load(item.techops.getHTML(item));\n var links = $('a');\n var foundERR;\n if (links != undefined) {\n links = links.filter((i, link) => {\n if ($(link).attr('href') !== undefined) {\n ...
[ "0.5657984", "0.5573943", "0.5565357", "0.5507853", "0.5507853", "0.5506649", "0.54081166", "0.5360829", "0.5342994", "0.53023463", "0.52859807", "0.52587855", "0.5247657", "0.5238383", "0.5226933", "0.52234703", "0.51711315", "0.5169476", "0.5167792", "0.5156416", "0.5147423...
0.7494727
0
function to insert links into collection of books, comments or shelves
function insertingLinksToCollection (item, linked) { let linksNumbering=0; for( let i=0; i<linked.length; i++ ) { item.links[linksNumbering++] = { 'rel': linked[i][0], 'href': linked[i][1], 'prompt': linked[i][0] } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertLinks () {\n var pages = {\n RecentChanges: {\n title: i18n('recent_changes').escape(),\n links: ['WikiActivity', 'DiscussionsActivity']\n },\n WikiActivity: {\n title: i18n('wiki_activity').escape(),\n links: ['WikiActivity/watchlist', 'RecentChanges', ...
[ "0.6846802", "0.6611574", "0.6462446", "0.62685007", "0.6246101", "0.6230345", "0.6167841", "0.6131243", "0.60349214", "0.58786005", "0.5872514", "0.5852423", "0.5825894", "0.5824214", "0.5806357", "0.57882714", "0.5785838", "0.5769876", "0.5751688", "0.5749094", "0.571136", ...
0.72827816
0
query for searching by author and datePublished on books collection
function renderBooksQueries(books, path) { const query = {}; query.rel = "search"; query.href = path + '/search' query.prompt = "search"; query.data = []; query.data[0] = { 'name' : 'author', 'value' : '', 'prompt' : 'search book by author ?author={value}' }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPostsByAuthor() {\n\tvar snippet = {\n\t\tquery: {authorId: \"-K_W_cxqkjGVo8zEfLUc\"}\n\t}\n\trimer.post.findByAuthor(snippet, function(error, value) {\n\t\tif(error) {\n\t\t\tconsole.log(error)\n\t\t}\n\t\telse {\n\t\t\tconsole.log(value)\n\t\t}\n\t})\n}", "async function getCourses() {\n\n const p...
[ "0.59037983", "0.5762454", "0.56271696", "0.56176263", "0.5609176", "0.55276203", "0.55052185", "0.5398921", "0.53826004", "0.5372615", "0.5359874", "0.53372633", "0.5322586", "0.53187823", "0.5284201", "0.52763236", "0.52736914", "0.5271212", "0.5269594", "0.52644944", "0.52...
0.5988273
0
making Template into collection for POST or PUT
function renderTemplate(dataFromDb) { let template = { data: [] }; const blackList = ['id', 'created_at', 'updated_at', 'book_id']; // for doing filtering in array. you cant put/post this parameters and they will not be shown in template // making array with keys from first object in array and moving id, createdAt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateApiSet(templateId) {\n return {\n create: function(options, callback) {\n\n options.data = Object(options.data);\n options.data._tp = [ObjectId(templateId)];\n\n CRUD.create({\n templateId: templateId,\n data: options.data,\n...
[ "0.59638816", "0.5657147", "0.56569004", "0.5599211", "0.55316466", "0.5483781", "0.5480741", "0.54374766", "0.5414376", "0.5402964", "0.53730357", "0.5330794", "0.5315614", "0.53080755", "0.53067327", "0.5304139", "0.53034765", "0.525426", "0.5250732", "0.5231922", "0.522529...
0.62815964
0
fn2 exthend from fn1
function inherbit( fn1, fn2 ){ var prototype = Object.create( fn1.prototype ); prototype.constructor = fn2; fn2.prototype = prototype; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fn1(a,b) {\n function fn2(){\n alert(\"sum = \"+ (a+b).toStrin());\n }\n fn2();\n}", "function fun1 ( ) {}", "function f1() {}", "function fun1() {}", "function fun1() {}", "function add2(fn1, fn2) {\n return add(fn1(), fn2());\n}", "function add2(fn1, fn2) {\n return add(fn1...
[ "0.6769947", "0.6744832", "0.6711253", "0.6680243", "0.6680243", "0.66161764", "0.66161764", "0.66133785", "0.659684", "0.6583497", "0.65590936", "0.65590936", "0.6553439", "0.6553439", "0.6553439", "0.6553439", "0.6553439", "0.6553439", "0.6553439", "0.6553439", "0.6398641",...
0.6750071
1
REGEX para encontrar palavras menores que um determinado tamanho dentro do texto
function minWordRegex(size = 0) { if (size <= 0) return new RegExp(); const regexText = `${REGEX_BOUNDARY}(${REGEX_TEXT}{1,${size}})${REGEX_BOUNDARY}`; return new RegExp(regexText, 'gi'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "req_10_loremipsum(texto) {\n let textoDefault = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt mi mauris, vitae consectetur felis lobortis vel. Suspendisse posuere nibh sit amet tellus dictum tempus. Integer posuere dui ante, eu feugiat purus rutrum at. Vestibulum enim ipsum, finibu...
[ "0.60160726", "0.51634175", "0.5161203", "0.5130031", "0.49858046", "0.49252275", "0.49213877", "0.4918497", "0.49074602", "0.49036652", "0.48461837", "0.47984284", "0.47953093", "0.4790699", "0.47693056", "0.47471347", "0.4734657", "0.47335982", "0.47296727", "0.47190377", "...
0.5280755
1
Junta a regex de todas palavras, montando uma regex completa para cada lista de palavras
function buildRegexWithWords(words) { const regex = new RegExp(words.map(wordRegexTemplate).join('|'), 'gi'); return regex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateRegExp(phrases) {\n const inner = phrases\n .map(phrase =>\n phrase\n .split(/\\s+/)\n .map(word => escapeRegExp(word))\n .join('[\\\\s\"?!.]+')\n )\n .join('|');\n\n return new RegExp(`(^|[^\\\\w])(${inner})(?=[^\\\\w]|$)`, 'iu');\n}", "function createRegexP...
[ "0.6032404", "0.5952433", "0.56534815", "0.56231767", "0.55763805", "0.5543225", "0.5443699", "0.5428958", "0.53261393", "0.525491", "0.5250821", "0.5248066", "0.52291906", "0.51992935", "0.51913196", "0.51890236", "0.5163521", "0.5139335", "0.50940984", "0.5060084", "0.50193...
0.5914037
2
Simply & Intutive Approach But, Inefficiency Performance!!!
function simply_solution(n, cores) { var answer = 0; var core = []; for (let i of cores) { core.push({precessTime: i, t: i}); } while (n != 0) { for (let i = 0; i < core.length; i++) { if (core[i].t == core[i].precessTime) { n--; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "static private internal function m121() {}", "function X(){!function(t){$[W++]^=255&t,$[W++]^=t>>8&255,$[W++]^=t>>16&255,$[W++]^=t>>24&255,W>=J&&(W-=J)}((new Date).getTime())}", "transient protected internal function m189() {}", "private public function m246() {}", ...
[ "0.5594369", "0.5465765", "0.52321637", "0.52267617", "0.51763785", "0.50508857", "0.50508857", "0.4992191", "0.49812338", "0.49743208", "0.4963377", "0.49585354", "0.49428165", "0.4932988", "0.49309796", "0.48964787", "0.4891719", "0.48895395", "0.48616186", "0.48544273", "0...
0.0
-1
handleResponsive is a utility to assign all of the breakpoint event handlers we want for this module
function handleResponsive() { app.ResponsiveBreakpoints.register_event( '0-768', 'image-swap-0-768-'+self.initCount , self.setup0_768.bind(self) // using es5-shim.js ) app.ResponsiveBreakpoints.register_event( '768-+', 'image-swap-768up-'+self.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleResponsive() {\n app.ResponsiveBreakpoints.register_event(\n '0-768',\n 'interior-beer-0-768',\n self.setup0_768.bind(self) // using es5-shim.js\n )\n\n app.ResponsiveBreakpoints.register_event(\n '768-+',\n 'interior-beer-768up',\n ...
[ "0.870386", "0.79652065", "0.7113976", "0.6656507", "0.6500392", "0.6500392", "0.6500392", "0.6494087", "0.6494087", "0.647579", "0.64530617", "0.64530617", "0.64487755", "0.64487755", "0.64487755", "0.6444351", "0.635815", "0.63448054", "0.6337828", "0.630362", "0.6286914", ...
0.8571842
1
Asks backend API for launch/es
function LaunchFactory(API, $http) { return { getAll: function(launchSize) { return $http.get(API + '/launches/?launchsize=' + launchSize); }, get: function(id) { return $http.get(API + '/launches/' + id); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startAPIRequests()\t{\n // Get app configuration.\n loadConfig().then(() => {\n // -> Get save data.\n afterConfigLoaded();\n loadVideoInformation().then(() => {\n // -> start requesting subs.\n requestSubs();\n });\n });\n}", "async function fe...
[ "0.5889645", "0.5776641", "0.57689565", "0.5612228", "0.5590654", "0.55452317", "0.5540255", "0.551959", "0.5482604", "0.5454276", "0.5406082", "0.5377455", "0.5377455", "0.5360107", "0.53269005", "0.5311091", "0.53087384", "0.53021747", "0.5262257", "0.5245185", "0.52448606"...
0.0
-1
fecth the toys first
function fetchToys() { return fetch("http://localhost:3000/toys") .then(function(response) { return response.json(); }) .then(function(json) { let fetchedToys = json displayToys(fetchedToys) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "spreadMoist() {\n if (this.hasTree()) {\n this.getSurrounds().forEach(tile => {\n if (!tile.water && !tile.moist) {\n tile.setMoist();\n tile.spreadMoist();\n }\n });\n }\n }", "think() {\r\n\r\n // Firs...
[ "0.55759865", "0.5562941", "0.5562276", "0.5521139", "0.5458573", "0.5391424", "0.5366597", "0.5364296", "0.5355023", "0.5337174", "0.53278744", "0.5278231", "0.524606", "0.52351207", "0.52273196", "0.5201305", "0.51949835", "0.5188584", "0.51868886", "0.5170263", "0.516618",...
0.0
-1
add divs to each toy
function displayToys(fetchedToys) { fetchedToys.forEach(toy => { let tCollection = document.getElementById("toy-collection") let addedDiv = document.createElement('div') addedDiv.classList.add('card') addedDiv.innerHTML = ` <h2>${toy.name}</h2> <img src=${toy.image} class="toy-avatar" /> `...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "maakDivs() {\n this.container = document.getElementById(\"cont\");\n for(let i = 0; i < 42; i++) {\n this.backside = document.createElement(\"div\");\n this.backside.className = 'items';\n this.container.appendChild(this.backside);\n }\n }", "function addD...
[ "0.6813745", "0.63994324", "0.6352263", "0.6111279", "0.6106932", "0.60750604", "0.60613626", "0.6044165", "0.6038111", "0.6028149", "0.60222906", "0.5960454", "0.5949945", "0.59451205", "0.5944863", "0.5926801", "0.5920659", "0.59154135", "0.590818", "0.5878314", "0.58774644...
0.0
-1
adding plus one like
function addingLikes(numberOfLikes) { let newNumber = parseInt(numberOfLikes.innerHTML); newNumber++; numberOfLikes.innerHTML = newNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "plus(number) {\n\n }", "function countPlus(){\n setCount(count+1)\n }", "function add(x) {\n return x + 'y'\n }", "function add(a,b){\n \treturn parseInt(a) + parseInt(b) \n }", "function add(number) {\n\t\treturn number + number;\n\t}", "function plus(a, b)...
[ "0.7174825", "0.6895542", "0.68639207", "0.68283176", "0.675751", "0.66951287", "0.667374", "0.6653826", "0.665131", "0.66255873", "0.6625132", "0.6615624", "0.66153175", "0.66110486", "0.6582275", "0.658005", "0.65773445", "0.6547406", "0.6528966", "0.6497403", "0.6497403", ...
0.0
-1
add a new toy
function fetchNewToy() { let formData = { name: document.getElementsByClassName("input-text")["name"].value, image: document.getElementsByClassName("input-text")["image"].value }; let configObj = { method: "POST", headers: { "Content-Type": "application/json", "Accept": "application/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNewToy(toy) {\n const toyContainer = document.getElementById(\"toy-collection\");\n toyContainer.innerHTML += renderToy(toy);\n}", "function addNewToy(name, image){\n\t\tfetch('http://localhost:3000/toys', {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n \t...
[ "0.7465535", "0.6886152", "0.67829096", "0.6623541", "0.6615017", "0.65500766", "0.65423703", "0.646641", "0.64439964", "0.6423089", "0.63429576", "0.62952185", "0.6290751", "0.62702245", "0.6222796", "0.61946213", "0.61758566", "0.6169777", "0.61666095", "0.61462164", "0.613...
0.0
-1
PRIVATE FUNCTIONS (none require knowledge of component state or props) return value as a Number (or null if value isn't a valid positive Number and can't be coerced into one)
function validateValue(value) { // check that value is a a valid Number -> no negative numbers or NaN allowed if (typeof value === 'number' && value >= 0 && value === value) return value; // check that value is a string and can be turned into a valid positive Number if (typeof value === 'string') retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ToNumber(value) {\n return isNaN(value) ? 0 : Number(value);\n }", "function getNumber(value) {\n return typeof value === 'number' ? value : parseFloat(value);\n}", "function numTest(value){\n if(isNaN(value)){\n return value;\n }\n else{\n return ...
[ "0.73250544", "0.729738", "0.7133368", "0.7123578", "0.7123578", "0.7123578", "0.7104285", "0.70801675", "0.70643085", "0.6883099", "0.6852957", "0.68379056", "0.68115056", "0.68115056", "0.68098325", "0.6807291", "0.67912877", "0.67889166", "0.6787803", "0.6765823", "0.67574...
0.66448045
31
calculates data about numberString which will factor into later calculations
function parseNumberString(numberString) { const decimalIdx = numberString.indexOf('.'); return { decimalIdx, // number of digits after dot decimalPlaces: decimalIdx > 0 ? (numberString.length - decimalIdx - 1) : 0, // number of digits before dot leadingDigit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readNumber(nStr, title) {\n\t\tif (title.includes(\"QTY\")) {\n\t\t\tword = \"\";\n\t\t} else if (title.includes(\"Beef\") || title.includes(\"Wool\")) {\n\t\t\tword = \" KG\";\n\t\t} else if (title.includes(\"Milk\")) {\n\t\t\tword = ' L';\n\t\t} else if (title.includes(\"Yarn\")) {\n\t\t\tword = ' KM';\...
[ "0.6613452", "0.640364", "0.640364", "0.640364", "0.640364", "0.6375065", "0.6363108", "0.6348021", "0.6221714", "0.6199725", "0.61787105", "0.6162951", "0.6133938", "0.6099681", "0.6091945", "0.60280126", "0.60198987", "0.60112965", "0.600935", "0.6006026", "0.6004566", "0...
0.58426344
38
expects numbers (can be either integers or floats) returns extra calc info + equally sized (with padding) arrays of digit chars representing each numberString
function parseNumbers(lesserNumber, greaterNumber) { const lesserString = Math.abs(lesserNumber).toString(); const { decimalIdx: lesserDecimalIdx, leadingDigits: lesserLeadingDigits, decimalPlaces: lesserDecimalPlaces, rightPad: lesserRightPad } = parseNumberString(lesserStr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function number(numbers) { }", "function getDigits(d) {\r\n switch (d) {\r\n case '0':\r\n return [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0...
[ "0.618566", "0.616528", "0.60956395", "0.59696406", "0.5942874", "0.59383535", "0.59124964", "0.58921516", "0.5867251", "0.586386", "0.58448905", "0.58434975", "0.5827057", "0.5824506", "0.5812473", "0.58102703", "0.57558095", "0.57460725", "0.5743623", "0.5715029", "0.570945...
0.5440861
47
return simplyestimated of repetitions of reel (more repetitions = greater implied visual distance between digits)
function calculateReelCount(difference, prevDifference, prevReelCount) { let relativeDifference; switch (prevReelCount) { case 1: relativeDifference = difference + (10 * (prevDifference + (prevDifference > 0 ? 0 : 10))); if (relativeDifference < 10) return 1; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function longestRepetition(s) {\n //console.log(s)\n var i = 0,\n seq = 0,\n results = [];\n \n if ( s === ('')){\n return ['', 0]\n }\n \n for(let i=0; i<s.length; i++) {\n var current = s[i],\n next = s[i + 1];\n \n if (typeof results[seq] === 'undefined') {\n ...
[ "0.556856", "0.5474626", "0.5455683", "0.541508", "0.53806835", "0.53346807", "0.53085923", "0.52639306", "0.52583146", "0.5247459", "0.5223863", "0.521297", "0.51972085", "0.5195192", "0.51657844", "0.5151599", "0.51017463", "0.5073647", "0.50703704", "0.5066072", "0.5064962...
0.52006394
12
calculate translateY based off size of reel and each digit's place w.r.t. beginning and end of reel
function calculateTranslateYPercent(reelCount, difference) { switch (reelCount) { case 0: return 0; case 1: return difference > 0 ? difference * 10 // difference is positive : (difference + 10) * 10; // difference is negative ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ve(e){if(0==e.height)return 0;for(var t,a=e.text.length,n=e;t=se(n);){var r=t.find(0,!0);n=r.from.line,a+=r.from.ch-r.to.ch}for(n=e;t=ce(n);){var f=t.find(0,!0);a-=n.text.length-f.from.ch,n=f.to.line,a+=n.text.length-f.to.ch}return a}", "getTranslate() {\n // 8:00 is translateY(43px)\n let...
[ "0.619376", "0.5948454", "0.59300154", "0.5909592", "0.5860575", "0.5852332", "0.55366766", "0.5533212", "0.55132854", "0.55132854", "0.55119646", "0.54730093", "0.5468497", "0.54618406", "0.5453371", "0.5453153", "0.5447297", "0.5431814", "0.5431762", "0.5370856", "0.5366985...
0.0
-1
generate calculations needed for animating transitions between digits of fromNumber > digits of toNumber
function createDigitConfigList(numbersData, flowReverse) { const { lastLeadingZeroIdx, lesserDigitList, greaterDigitList } = numbersData; const digitConfigList = []; for (let idx = 0; idx < lesserDigitList.length; idx++) { const lesserDigit = lesserDigitList[idx]; // determine if beginning...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@bind\n countUp(fromValue, toValue) {\n const format = this.formatValue.bind(this);\n const startValue = isFinite(fromValue) ? fromValue : 0;\n const numberEl = this.numberEl;\n const diff = toValue - startValue;\n let startTime = performance.now();\n\n const tick = function(t) {\n let prog...
[ "0.6260974", "0.62102866", "0.60304254", "0.59264183", "0.59217906", "0.5832825", "0.58235544", "0.5808527", "0.57677734", "0.5741179", "0.5695458", "0.5643708", "0.5643528", "0.5550714", "0.55017686", "0.55000675", "0.5477309", "0.5471937", "0.5422434", "0.541145", "0.538482...
0.5169423
58
Get object of wallets with order value Create object with path to order field in DB Update only order field for each wallet
async saveWalletsOrder ({ rootGetters }, wallets) { const updates = {} const result = {} for (const walletId in wallets) { updates[`${walletId}/order`] = wallets[walletId] } await db.ref(`users/${rootGetters['user/userUid']}/accounts`) .update(updates, (error) => { error ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fullOrdersUpdate(orders) {\n const ourOrders = {};\n for (const order of Bybit.createOrders(orders).filter(order => order.status === 'open')) {\n ourOrders[order.id] = order;\n }\n\n this.orders = ourOrders;\n }", "fullOrdersUpdate(orders) {\n const ourOrders = {};\n for (const order of B...
[ "0.6448588", "0.64238816", "0.6208705", "0.6173994", "0.5945218", "0.5871349", "0.5767085", "0.5762372", "0.57081693", "0.57027036", "0.56681013", "0.56649846", "0.5653358", "0.55905205", "0.5487572", "0.54859084", "0.5444787", "0.5415806", "0.53753185", "0.5367803", "0.53366...
0.6735468
0
Adds anchor with number of requested reviews
function addChangesRequested(pToken) { // Don't spam the API const reviewAdded = document.getElementsByClassName(reviewsPullsChangesRequested); if (reviewAdded.length) return; gitApiCall(userURL, pToken, user => { const currentUser = user.login; const userReviewsURL = reviewChangesURL.replace('$user', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateAverageRating() {\n const { restaurantStarRating } = this.pageElements;\n const { averageReview, reviews } = this.restaurant;\n const link = document.createElement('a');\n\n // Add stars\n restaurantStarRating.appendChild(makeStarRating(averageReview));\n\n // Add link\n link.setAttrib...
[ "0.6298986", "0.5813229", "0.5789883", "0.57840973", "0.5756684", "0.5742852", "0.57110316", "0.57092535", "0.5708135", "0.5708135", "0.5708135", "0.5708135", "0.57073706", "0.56628233", "0.56323427", "0.5581381", "0.55074036", "0.5506572", "0.54625577", "0.5441425", "0.54237...
0.0
-1
This below function is what gets called when you click on friends tab
function getAllUsers(){ return fetch("http://localhost:3000/users") .then((resp) => resp.json()) .then(function(users) { users.forEach(function(user) { postContainer.innerHTML += renderSingleProfile(user); }); return users } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showFriendTab()\r\n{\r\n\t\r\n\tvar open=getTabIndexByTitle('My Friends');\r\n\tif (open<0)// if the tab is not open yet\r\n\t{\t\r\n\t\tvar aTab= createFriendTab('tabPanel','My Friends', true);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tshowTab('tabPanel',open[1]);\r\n\t}\r\n}", "function friends (person,kb,col) {...
[ "0.72213846", "0.6666962", "0.6626487", "0.6597456", "0.65827364", "0.6478653", "0.642265", "0.63149035", "0.6253569", "0.62494373", "0.6217153", "0.61279297", "0.6122412", "0.61042416", "0.6089591", "0.60884607", "0.6077763", "0.6043149", "0.60110015", "0.5968789", "0.593972...
0.0
-1
Helper Functions Returns true if the given string is a list of floats or a list of float pairs.
function isArray(value) { if (value.startsWith('(')) { var tokens = value.split(","); if ((tokens.length < 4) || (tokens.length % 2 !== 0)) { return false; } var pos = 0; while (pos < tokens.length) { var val1 = tokens[pos].trim().substring(1).trim() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isFloat(str){\n \n if (str=='') {\n return true;\n }\n var reg = /^-?\\d+(\\.\\d{1,2})?$/;\n return reg.test(str);\n}", "function isFloat(str){\n\n\tlet out = true;\n\tif (str.search(/[^\\.\\d]/) != -1 || (str.indexOf(\".\") != str.lastIndexOf(\".\"))){\n\n\t\tout = false;\n\t};\n\...
[ "0.7010895", "0.6981138", "0.67103446", "0.67103446", "0.66936874", "0.66096234", "0.65493476", "0.6503941", "0.6478075", "0.63507175", "0.6303921", "0.62723684", "0.60711336", "0.6046616", "0.6032928", "0.60146797", "0.59266067", "0.5866383", "0.58491504", "0.58313394", "0.5...
0.65120745
7
Returns true if the given string is a dictionary of integer : float pairs.
function isDict(value) { var tokens = value.split(","); for (var i = 0; i < tokens.length; i++) { var pair = tokens[i].split(':'); if (pair.length != 2) { return false; } if (isNaN(parseInt(pair[0].trim()))) { return false; } if (isNaN(pars...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isFloat (s)\r\n\r\n{ var i;\r\n var seenDecimalPoint = false;\r\n\r\n if (isEmpty(s))\r\n if (isFloat.arguments.length == 1) return defaultEmptyOK;\r\n else return (isFloat.arguments[1] == true);\r\n\r\n if (s == decimalPointDelimiter) return false;\r\n\r\n // Search through stri...
[ "0.57699203", "0.57699203", "0.56771004", "0.5635026", "0.5611658", "0.54433596", "0.5443342", "0.5425345", "0.5414805", "0.54048014", "0.53865486", "0.5382073", "0.5374136", "0.53681386", "0.533157", "0.5323784", "0.5323784", "0.5323784", "0.53170764", "0.53170764", "0.53170...
0.7416225
0
Adds movie information template to container
function addMovieInformation() { document.querySelector( '.movie-information' ).innerHTML = getTemplate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function featuringTemplate(movie) {\n return (\n `<div class=\"featuring\">\n <div class=\"featuring-image\">\n <img src=\"${movie.medium_cover_image}\" width=\"70\" height=\"100\" alt=\"\">\n </div>\n <div class=\"featuring-content\">\n <p class=\"featuring-title\">P...
[ "0.6782001", "0.6462284", "0.6330685", "0.6258108", "0.62488383", "0.6235774", "0.61993057", "0.61823285", "0.6155364", "0.60186374", "0.6014148", "0.58926135", "0.5863723", "0.5837031", "0.5836398", "0.582536", "0.58102167", "0.58090734", "0.5763655", "0.57415164", "0.574059...
0.7946036
0
if you enter your own GET METHOD IN URL and it is incorrect
function setRestrauntDataError(){ resNameElement.innerHTML = "Error unknown restraunt"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GET() {\n }", "function returnMethod(){\n return 'GET';\n}", "function normalizedHttpMethod( httpMethod ) {\n httpMethod = ( httpMethod || \"\" ).toLowerCase();\n switch ( httpMethod ) {\n case \"get\":\n case \"post\":\n case \"delete\":...
[ "0.6999532", "0.66725445", "0.65709627", "0.6514888", "0.6509984", "0.6471284", "0.62930036", "0.62914324", "0.6203346", "0.6123114", "0.60978043", "0.6044339", "0.6044339", "0.6032036", "0.6011792", "0.6003527", "0.5986706", "0.5986706", "0.5951086", "0.58953696", "0.5804813...
0.0
-1
returns the Force as a float
static gravityFormula(circle1,circle2){ let m1 = circle1.physics.mass let m2 = circle2.physics.mass let dist = Vector2.distance(circle1.position,circle2.position) return (m1*m2)/(dist*dist) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get floatValue() {}", "get getForce() {\n return this.force;\n }", "toUnsafeFloat() { return parseFloat(this.toString()); }", "function _fForce()\n {\n MODEL.instance.masses.forEach(function(mass) {\n // \"f\"riction (damping) opposes velocity\n mass.f.add(VECTOR.mul...
[ "0.74264", "0.6594727", "0.6579337", "0.65403885", "0.6499907", "0.6390945", "0.6347857", "0.6333193", "0.630359", "0.6267096", "0.6235773", "0.6235773", "0.62041545", "0.6195359", "0.61295915", "0.61163384", "0.61038655", "0.6089831", "0.60647124", "0.603335", "0.6018865", ...
0.0
-1
THIS FUNCTION IS ONLY FOR DEBUGGING. REMOVE IT FROM MODULE EXPORTS WHEN PUBLISHING
function Expose(interfacePlayable) { return registry.playables[interfacePlayable.id()]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "function _____SHARED_functions_____(){}", "static final private internal function m106() {}", "protected internal function m252() {}", "function devDebug(){\n\n}", "static private protected public internal function m117() {}", ...
[ "0.692331", "0.69214123", "0.65515965", "0.6497197", "0.64329064", "0.6427986", "0.6372627", "0.6360907", "0.6318961", "0.6316605", "0.6270218", "0.62387776", "0.61706156", "0.61500484", "0.6130113", "0.61134076", "0.60726684", "0.60362625", "0.600314", "0.5997259", "0.599725...
0.0
-1
TODO: bug: when searchwrap is opened, offset is calculated incorrectly
function menuFix() { // When user scrolls past original position of nav if ($(window).scrollTop() >= navOffset) { $('nav.site-nav').addClass('navbar-fixed-top'); // add fixed position to nav, $('#cu-identity-wrap').addClass('menu-margin'); // account for new gap in page flow, } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OLpageLoc(o,t){\r\nvar l=0;\r\nwhile(o.offsetParent&&o.offsetParent.tagName.toLowerCase()!='html'){\r\nl+=o['offset'+t];o=o.offsetParent;}l+=o['offset'+t];\r\nreturn l;\r\n}", "function readyToSearchScrollPosition() {\n window.scrollTo({\n 'top': scrollAnchor.offsetTop,\n 'left': 0,\n ...
[ "0.62731874", "0.61467344", "0.6113642", "0.5960456", "0.5917765", "0.59076655", "0.59064806", "0.5880516", "0.5782969", "0.577257", "0.577257", "0.57085085", "0.5703908", "0.5672894", "0.5659975", "0.56123286", "0.5607488", "0.5594317", "0.55940086", "0.5589519", "0.55884385...
0.0
-1
To click update button
function Updatecategory(id) { const access = sessionStorage.getItem('access'); console.log("id value", id); const Id = id; const payload = { 'name': DataForUpdate.name, } const requestOptions = { method: 'PUT', headers: { 'Content-Type': 'application/json', Auth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUpdateButton(id_updated, new_filling, new_name){\n var id_button = \"#button_\" + id_updated;\n $(id_button).children(\".filling_dispenser\").text(new_filling);\n //$(id_button).children(\".battery_dispenser\").text(new_battery);\n $(id_button).children(\".name_dispenser\").text(new_name);\n parse...
[ "0.71981144", "0.6868811", "0.6845723", "0.6839085", "0.6762607", "0.67178196", "0.6679747", "0.66087186", "0.6597289", "0.6592765", "0.6582227", "0.6574002", "0.6574002", "0.6574002", "0.6574002", "0.6574002", "0.6574002", "0.6574002", "0.6574002", "0.6574002", "0.65594", ...
0.0
-1
Handle Select boxes Get Select Name and Value(value and label)
handleSelectItems(name, value){ if(name == 'productgroup'){ delete this.state.errors.selectProductGroup; this.setState({ selectProductGroup: value }) } if(name == 'measurementtype'){ delete this.state.errors.selectMeasurementType; var Product = this.state.Product; var priceme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSelectValues(select) {\n\t\t\t var result = [];\n\t\t\t var options = select && select.options;\n\t\t\t var opt;\n\n\t\t\t for (var i=0, iLen=options.length; i<iLen; i++) {\n\t\t\t\topt = options[i];\n\n\t\t\t\tif (opt.selected) {\n\t\t\t\t result.push(opt.value || opt.text);\n\t\t\t\t}\n\t\t\t }...
[ "0.63906586", "0.63110965", "0.62816375", "0.6253983", "0.62376213", "0.61941487", "0.6179891", "0.6162969", "0.61442363", "0.61426055", "0.61157167", "0.610242", "0.6037659", "0.60367566", "0.6026499", "0.6017579", "0.6012205", "0.59907144", "0.5989655", "0.5979312", "0.5963...
0.0
-1
Fetch All Product Group
GetProductgroups(){ var that = this; var reqQuery = {}; reqQuery['userdetails'] = getUserDetails(); const request = new Request(`${process.env.API_HOST}/ManageProducts.svc/GetProductGroups/json`, { method: 'POST', headers: new Headers({ 'Content-Type': 'application/json' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetchGroups() {\n this.fetchData({type: \"FETCH_GROUPS\"})\n }", "async getAllGroups() {\n log('get all groups ....');\n return this.api.get('/api/1.0/tags', {\n params: {\n company: this.companyId,\n token: this.token,\n limit: LIMIT,\n },\n }).then((response) =...
[ "0.6622948", "0.6413356", "0.63074714", "0.6215059", "0.61378384", "0.6117041", "0.6088958", "0.6068282", "0.6068121", "0.6066577", "0.6050161", "0.6019679", "0.60137695", "0.59943944", "0.597176", "0.5962652", "0.5958492", "0.59541404", "0.59529334", "0.5932415", "0.5874368"...
0.6985152
0
Fetch All Revenue Type
getRevenueType(){ var that = this; var credentials = {}; credentials['userdetails'] = getUserDetails(); const request = new Request(`${process.env.API_HOST}/ManageRevenueTypes.svc/GetAllRevenueTypes/json`, { method: 'POST', headers: new Headers({ 'Content-Type': 'application/j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllExpenseTypes() {\n try {\n let expenseTypesData = await this.expenseTypeDynamo.getAllEntriesInDB();\n let expenseTypes = _.map(expenseTypesData, (expenseTypeData) => {\n expenseTypeData.categories = _.map(expenseTypeData.categories, (category) => {\n return JSON.parse(categ...
[ "0.6067422", "0.59266514", "0.57775974", "0.57489514", "0.5702701", "0.56604844", "0.5642029", "0.5621562", "0.5512583", "0.55100125", "0.5507934", "0.5496232", "0.5485312", "0.54158574", "0.54121965", "0.5411198", "0.5410111", "0.5378652", "0.53666705", "0.53546005", "0.5353...
0.65845424
0
Fetch All Tax Groups
getTaxGroups(){ var that = this; var reqQuery = {}; reqQuery['userdetails'] = getUserDetails(); const request = new Request(`${process.env.API_HOST}/ManageTaxes.svc/GetTaxGroups/json`, { method: 'POST', headers: new Headers({ 'Content-Type': 'application/json' }), body: JSON.stringify(reqQuery) })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllGroups() {\n return datacontext.get('Customer/GetAllGroups');\n }", "async getAllGroups() {\n log('get all groups ....');\n return this.api.get('/api/1.0/tags', {\n params: {\n company: this.companyId,\n token: this.token,\n limit: LIMIT,\n },...
[ "0.6204573", "0.6133287", "0.58127326", "0.57582736", "0.57493085", "0.56794804", "0.5627291", "0.562003", "0.5615317", "0.56132686", "0.5573172", "0.55478024", "0.5543983", "0.5534247", "0.547141", "0.5468243", "0.5455276", "0.5441448", "0.54334253", "0.54186076", "0.5393097...
0.7484243
0
Fetch All Printer Groups
GetPrintergroups(){ var that = this; var reqQuery = {}; reqQuery['userdetails'] = getUserDetails(); const request = new Request(`${process.env.API_HOST}/ManagePrinters.svc/GetPrinterGroups/json`, { method: 'POST', headers: new Headers({ 'Content-Type': 'application/json' }), body: JSON.stringify(req...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getGroups() {\n\t return request.get({ uri: process.env.AUTHZ_API_URL + '/groups', json: true, headers: { 'Authorization': 'Bearer ' + this.accessToken } })\n\t .then(res => {\n\t log(chalk.green.bold('Groups:'), `Loaded ${res.groups.length} groups.`);\n\t return res.groups;\n\t });\n\t}", "asyn...
[ "0.6091649", "0.6066593", "0.6009918", "0.5971511", "0.5893484", "0.58785266", "0.5820844", "0.5794968", "0.57639164", "0.57639164", "0.57639164", "0.57639164", "0.5754694", "0.5663988", "0.5647919", "0.56201833", "0.5618742", "0.55901146", "0.5542923", "0.5536725", "0.553642...
0.76762265
0
Fetch All Measurement Type
GetMeasurementType(){ var that = this; var reqQuery = {}; reqQuery['userdetails'] = getUserDetails(); const request = new Request(`${process.env.API_HOST}/ManageMeasuringUnits.svc/GetMeasuringUnits/json`, { method: 'POST', headers: new Headers({ 'Content-Type': 'application/json' }), body: JSON.stri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAllMeasurementTypes(){\n\t\tvar that = this;\n\t\tvar reqQuery = {};\n\t\treqQuery['userdetails'] = getUserDetails();\n\t\tconst request = new Request(`${process.env.API_HOST}/ManageMeasuringUnits.svc/GetMeasuringUnits/json`, {\n\t\tmethod: 'POST',\n\t\theaders: new Headers({\n\t\t 'Content-Type': 'application...
[ "0.70488393", "0.67433697", "0.6408691", "0.61700594", "0.60806763", "0.58838487", "0.5843623", "0.58245486", "0.5777976", "0.57744086", "0.56867224", "0.5645506", "0.5629542", "0.5627389", "0.5599909", "0.5521436", "0.55017745", "0.54986733", "0.54814184", "0.54587656", "0.5...
0.6507093
2
alert("Just testing!"); Arguments Goes into the functions part of the function call Parameters catch the arguments and in the function definition Create a function that calculates teh area of a rectangle.....again
function calcArea(w,h){ //var width = 10; //var height = 20; var area=w*h; console.log("The area is "+ area); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcArea(w,l){//parameters go here.\n //var width=10;\n //var length=20;\n //var area=width*length;\n\n var area=w*l;\n console.log(\"area of rectangle is \"+area);\n\n}", "function areaOfRectangle(a,b){\n return a*b;\n}", "function calcArea (w,h){//parameters go here\n//hard coded ...
[ "0.7846014", "0.7729052", "0.7671937", "0.7583228", "0.7509535", "0.7509037", "0.74915427", "0.740241", "0.738701", "0.73349863", "0.7314236", "0.72872835", "0.7230103", "0.7222551", "0.7206537", "0.7181791", "0.716954", "0.7134508", "0.7008689", "0.69828546", "0.696596", "...
0.7359877
9
Return an ordinal number for folders
category(item) { // <...> come at the very end if (/^<.+>$/.test(item.label)) { // non-null behavior unknown. Should be handled by logPoints team return 1000; } // everything else in between return 999; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function int2dir (i) {\n dir = i * 90;\n return dir;\n}", "get dirType()\n\t{\n\t\texchWebService.commonAbFunctions.logInfo(\"exchangeAbFolderDirectory: get dirType\\n\");\n\t\treturn 2;\n\t}", "get dirPrefId()\n\t{\n\t\texchWebService.commonAbFunctions.logInfo(\"exchangeAbFolderDirectory: get dirPrefId:...
[ "0.55946356", "0.556331", "0.5557335", "0.5466062", "0.54482204", "0.54206365", "0.54117566", "0.5369605", "0.5350736", "0.53386116", "0.53167385", "0.52887994", "0.5259656", "0.52374154", "0.52266026", "0.521131", "0.518077", "0.518077", "0.518077", "0.5159276", "0.5158957",...
0.0
-1
retorna la cantidad de clavos necesarios para clavar todos los tablones
function clavarTablones(tablones, posClavos) { for (var i = 0; i < tablones.length; i++) { for (var j = 0; j < posClavos.length; j++) { if((posClavos[j] >= tablones[i][0] && posClavos[j] <= tablones[i][1]) ) { contadorDeClavos++; break; } } } if(tablones.length > contadorDeClav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ConjuntoGenerico_Tamanho() {\r\n var quantidade = 0;\r\n for (var chave in this.Tabela) {\r\n if (this.Tabela[chave] != null) {\r\n quantidade = quantidade + 1;\r\n }\r\n }\r\n return quantidade;\r\n}", "function crearTablasInspeccionAscensores(){\n crearTablaInform...
[ "0.63042766", "0.60118824", "0.59473526", "0.59190434", "0.5718379", "0.56282055", "0.5580523", "0.54889834", "0.54247874", "0.54119354", "0.53746057", "0.5351498", "0.5351271", "0.5348878", "0.5339931", "0.5334693", "0.53270674", "0.53195035", "0.5309606", "0.5257364", "0.52...
0.5653031
5
crea los tablones a partir de los array A y B
function crearTablones(inicio, fin) { var tablones = []; for (var k in inicio) { tablones.push([inicio[k], fin[k]]); } return tablones; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tablero() {\n\tfor(var i=0;i<20;i++) {\n\t\ttableroCartas[i] = new Array(20);\n\t\tfor (var j=0; j<20; j++) {\n\t\t\ttableroCartas[i][j] = 0;\n\t\t}\n\t}\n}", "function crearTabla(array) {\n var tabla = document.createElement(\"table\");\n let cabecera = document.createElement(\"tr\");\n for (a...
[ "0.58469635", "0.5777849", "0.57666695", "0.5723877", "0.57092756", "0.5612104", "0.5596593", "0.5594405", "0.5582964", "0.5526865", "0.55091", "0.5476333", "0.5474326", "0.5458076", "0.54472965", "0.5429371", "0.5422504", "0.5389188", "0.5389031", "0.5389031", "0.5389031", ...
0.5851985
0
mport reviewImg from './../../../assets/feed.png';
function NurseOverview(props){ return( <div className=" kt-container kt-container--fluid kt-grid__item kt-grid__item--fluid"> <div className="container"> <div className="row"> <div className="col-xl-12"> <div className="kt-portlet kt-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getImageSource(){\n return `assets/images/cards/${this.rank}_of_${this.suit}.png`;\n }", "makeImagePath2(product) {\n return require(`../assets/images/${product.images[2]}`);\n }", "makeImagePath1(product) {\n return require(`../assets/images/${product.images[1]}`);\n }", "makeImage...
[ "0.6485762", "0.64636296", "0.64271855", "0.6316809", "0.59034723", "0.5804887", "0.5733522", "0.5728967", "0.5720563", "0.5680959", "0.5676653", "0.5660847", "0.5570473", "0.55425376", "0.5536123", "0.5530754", "0.5526776", "0.5438658", "0.5430241", "0.5412279", "0.5395193",...
0.0
-1
blink arrow on the next step blink arrow on the next step
function animatearrow() { if (document.getElementById('arrow1').style.visibility=="hidden") document.getElementById('arrow1').style.visibility="visible"; else document.getElementById('arrow1').style.visibility="hidden"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToNextStep(){\n unhighlightArrow(currStepId, numberToString[currStepId]);\n currStepId+=1;\n replaceStep();\n highlightArrow(currStepId, numberToString[currStepId]); \n}", "function runStep() { //function to start blinking\n\n stepToggle = ((stepToggle == 0) ? 1 : 0);\n step.writeSync(stepToggl...
[ "0.71299183", "0.70555675", "0.6887742", "0.6744624", "0.6744624", "0.6547281", "0.64880985", "0.6466648", "0.6450525", "0.6364325", "0.63599044", "0.63490796", "0.6346249", "0.62066376", "0.6182585", "0.6167092", "0.6167092", "0.6161182", "0.6161165", "0.615573", "0.61497146...
0.0
-1
function magic starts here
function magic() { if (simsubscreennum==1) { refresh2(); refresh1(); repeat+=1; if(flag==1) { console.log('flagis1'); document.getElementById('canvas3').style.visibility="hidden"; document.getElementById('arrow1').style.visibility='hidden'; document.getElementById('nextButton').style.v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function miFuncion (){}", "private public function m246() {}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "private internal function m248() {}", "static private internal function m121() {}", "function _____SHARED_functions_____(){}", "protected internal function m...
[ "0.7016415", "0.69424325", "0.69259167", "0.69259167", "0.69259167", "0.6846178", "0.67263377", "0.6699796", "0.6670867", "0.66075456", "0.6516631", "0.6515493", "0.6492836", "0.64834815", "0.64152825", "0.64006567", "0.63596475", "0.6275122", "0.62309223", "0.62295145", "0.6...
0.0
-1
Created by silviu.checherita on 5/24/2017.
function MediaSample() { let expectedConditions = protractor.ExpectedConditions; this.video = element(by.tagName('video')); this.waitToLoad = () => { browser.wait(expectedConditions.presenceOf(this.video), 5000); }; this.isLoaded = () => { return this.video.isPresent() }; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient final protected internal function m174() {}", "transient private internal function m185() {}", "static transient fina...
[ "0.6349184", "0.62087214", "0.6112443", "0.57573", "0.5751511", "0.5737102", "0.5639061", "0.5638068", "0.56258506", "0.5566228", "0.55296427", "0.5529047", "0.5529047", "0.5529047", "0.5529047", "0.5529047", "0.5529047", "0.5529047", "0.5529047", "0.5529047", "0.5529047", ...
0.0
-1
climb(3) > 3. 111 12 21 climb(4) > 5. 1111 121 121 22 211 climb(6) > 13
function climb(n){ if(n==1){ return 1 } else if (n==2){ return 2 } else { return climb(n-1) + climb(n-2) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chocolateFeast(n, c, m) {\r\n \r\n if (n / c == m) {\r\n return n / c + 1;\r\n }\r\n else if (n / c < m) {\r\n return n / c;\r\n }\r\n else if (n / c > m) {\r\n \r\n var k = n / c;\r\n var re = k - m;\r\n return k = re + 1 + k\r\n \r...
[ "0.6508679", "0.6177625", "0.5984442", "0.59296954", "0.58196366", "0.5809127", "0.57748055", "0.572511", "0.56803524", "0.5679985", "0.5678998", "0.566927", "0.56653935", "0.56634045", "0.5647632", "0.5640347", "0.56293577", "0.5629122", "0.5628229", "0.56240326", "0.561863"...
0.70033693
0
2 function addItem and adding it to the global variable
function addItem(item) { basket.push(item); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItem() {\n\n}", "function addItem(item) {\n groceries.push(\"item\");\n displayData();\n}", "function add(item) {\n data.push(item);\n console.log('Item Added...');\n }", "function addItem(item) {\n backpack.push(item);\n}", "function addItem( item ){\n cart.push(item);\n return c...
[ "0.76316047", "0.74071264", "0.73005444", "0.7111655", "0.7109933", "0.70776075", "0.7071", "0.7045544", "0.6946034", "0.69121796", "0.6903481", "0.6896678", "0.68616956", "0.68093944", "0.67812556", "0.6769523", "0.6733066", "0.6729447", "0.67210996", "0.66789734", "0.666419...
0.698383
8
Is this actually adding it to the global variable basket? Go back and check this Adding two different things into the basket to test if another object getting added to the global variable will work. 3 List Items function with a loop. (Looping over items in the basket (apples and oranges))
function listItems() { for (let i of basket) { //Had a console.log inside the function but it didn't seem to affect anything so I removed it //console.log(basket); is what I had inside before. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AddItem(item){\n console.log(\"Adding \" + item.Name + \" to the basket!\");\n basket.push(item);\n}", "function addBasket() {\n if (basket.length === 0 || (basket.find(x => x.name === item.name)) === undefined) {\n item.quantity = updatedQuantity\n basket.push(item)\n ...
[ "0.74302506", "0.7226441", "0.71393734", "0.7034112", "0.68712795", "0.6792305", "0.66667193", "0.66439164", "0.664339", "0.66415787", "0.6485246", "0.64763284", "0.64612067", "0.6400438", "0.63694775", "0.6350924", "0.6280776", "0.62790596", "0.6269025", "0.6266429", "0.6266...
0.67911315
6
4 Creating a function that is called empty to empty the global variable basket of apple and orange
function empty() { basket = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function empty(){\n basket = [];\n return console.log('You have emptied your basket.')\n}", "function empty () {}", "function empty () {}", "function empty () {}", "function emptyBasket(){\n sessionStorage.clear();\n loadBasket();\n}", "function emptyBasket(){\n sessionStorage.clear();\n lo...
[ "0.7670744", "0.6712614", "0.6712614", "0.6712614", "0.66457564", "0.66457564", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", "0.66128844", ...
0.81363547
0
2 function called isFull
function isFull(items) { for (let i = 0; i < items.length; i++) { if (items <= maxItems) { return false; } else { return true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isFull(){\n //Doesnt matter for javascript\n }", "isFull() {\n return (this.lastIndex === (this.capacity() - 1));\n }", "isFull() {\n return ((this.tail + 1) % this.size) === this.head;\n }", "isFull() {\n return this.length() === this.capacity;\n }", "isFull() {\n ...
[ "0.7603384", "0.7551845", "0.75229645", "0.7518023", "0.7510842", "0.73905015", "0.7324642", "0.7294793", "0.722696", "0.7226954", "0.72017497", "0.7197157", "0.71583927", "0.6940792", "0.69253546", "0.6844762", "0.6844129", "0.6800867", "0.6742862", "0.6735331", "0.6720338",...
0.634217
34
Register an object so that it can be interacted with.
add(object) { this.meshes[object.id] = object; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static registerObject(o){\n\t\tObject.objects.push(o)\n\t}", "register() {\n registry.register(this);\n }", "function register() {\n safeRegister();\n exports.clone.register();\n exports.copy.register();\n exports.extend.register();\n exports.typeOf.register();\n }", ...
[ "0.7495103", "0.6846139", "0.68033725", "0.6637061", "0.6558987", "0.62276006", "0.6103582", "0.6103582", "0.60400176", "0.60108995", "0.59962875", "0.59688437", "0.59398115", "0.58255905", "0.5741583", "0.57134193", "0.56738275", "0.56708986", "0.5658559", "0.56437427", "0.5...
0.0
-1
Prevent an object from being interacted with.
remove(object) { var id = object.id; if (this.meshes[id]) { // If there's no existing mesh, we can't remove it. delete this.meshes[id]; } // If the object is currently selected, remove it. if (this.selected[id]) { delete this.selected[object.id]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "canBeInteractedWith() { return false; }", "function unblock_user_interaction(paper) {\n paper.setInteractivity(true);\n}", "function disableInteraction() {\n moving = true;\n setTimeout(function () {\n moving = false;\n }, 500);\n }", "function block_user_interaction(pap...
[ "0.6802561", "0.67227113", "0.67186683", "0.6713088", "0.6703381", "0.64573336", "0.6445479", "0.63603693", "0.63547856", "0.63147765", "0.63049835", "0.62937814", "0.6183088", "0.6170592", "0.61699814", "0.6038184", "0.6036891", "0.60148185", "0.6007503", "0.60047644", "0.59...
0.0
-1
Gets the mesh, which includes reticle and/or ray. This mesh is then added to the scene.
getReticleRayMesh() { return this.root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get() {\n return this.mesh;\n }", "function findFirstChildMesh(parent)\r\n{\r\n // find the mesh child\r\n for (var i = 0; i < parent.childCount; i++) {\r\n\r\n // get child and its materials\r\n var child = parent.getChild(i);\r\n if (child.typeId == \"Microsoft.VisualStudio...
[ "0.6682806", "0.63667303", "0.63189125", "0.6248903", "0.6152726", "0.61486936", "0.614609", "0.6116385", "0.61089206", "0.6050091", "0.59412867", "0.59162265", "0.59068066", "0.5830208", "0.5734437", "0.57064503", "0.5678024", "0.5631152", "0.5609168", "0.5603924", "0.560120...
0.6750623
0
Gets the currently selected object in the scene.
getSelectedMesh() { let count = 0; let mesh = null; for (var id in this.selected) { count += 1; mesh = this.meshes[id]; } if (count > 1) { console.warn('More than one mesh selected.'); } return mesh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCurrentScene() {\n return this.scenes[this.currentSceneIndex];\n }", "function get_selection()\n {\n return selection;\n }", "function getSelection(){\n return selection;\n }", "function get_current_selection() {\n /* Get the DOM element */\n let brush = document.getEleme...
[ "0.68446416", "0.67736536", "0.66900384", "0.64587975", "0.63792086", "0.63569045", "0.62713087", "0.62269694", "0.61974025", "0.61948377", "0.6194328", "0.6182364", "0.61682576", "0.6164118", "0.606743", "0.6037744", "0.60277355", "0.596977", "0.5962054", "0.5926879", "0.590...
0.6002019
17
Hides and shows the reticle.
setReticleVisibility(isVisible) { this.reticle.visible = isVisible; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggle() {\n\t\tif (this.isVisible) {\n\t\t\tthis.display();\n\t\t} else {\n\t\t\tthis.hide();\n\t\t}\n\t}", "hide() {\n this.isVisible = false;\n }", "toggleHidden() {\n if (this.isHidden) this.show();\n else this.hide();\n }", "function toggleVisibility() {\n if (!$('#traile...
[ "0.7143829", "0.7015782", "0.6793881", "0.6790431", "0.67757905", "0.67701066", "0.6760394", "0.6679017", "0.66574675", "0.6652824", "0.6630496", "0.66130877", "0.66092795", "0.6594586", "0.6585657", "0.657888", "0.657096", "0.652238", "0.65176576", "0.6500362", "0.6483283", ...
0.7073939
1
Enables or disables the raycasting ray which gradually fades out from the origin.
setRayVisibility(isVisible) { this.ray.visible = isVisible; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animate() {\n requestAnimationFrame(animate);\n controls.isOnObject(false);\n ray.ray.origin.copy(controls.getObject().position);\n ray.ray.origin.y -= 10;\n intersections = ray.intersectObjects(objects);\n if (intersections.length > 0) {\n var distance = intersections[0].distance...
[ "0.5885875", "0.57465494", "0.5648594", "0.5566861", "0.5562547", "0.5498276", "0.5390311", "0.53659046", "0.5359512", "0.5351779", "0.53268844", "0.53190076", "0.53161836", "0.5254424", "0.5253967", "0.52537704", "0.5228208", "0.52277684", "0.52258563", "0.52116996", "0.5204...
0.62025833
0
Enables and disables the raycaster. For touch, where finger up means we shouldn't be raycasting.
setActive(isActive) { // If nothing changed, do nothing. if (this.isActive == isActive) { return; } // TODO(smus): Show the ray or reticle adjust in response. this.isActive = isActive; if (!isActive) { this.moveReticle_(null); for (let id in this.selected) { let mesh =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disable() {\n this.stopTouching_();\n this.events_.removeAll();\n }", "function enableMouse() {\n\tnoMouse = false;\n}", "function disableGestures() {\n lastPanningEnabled = cy.panningEnabled();\n lastZoomingEnabled = cy.zoomingEnabled();\n lastBoxSelectionEnabled = cy.boxSelectionE...
[ "0.6324415", "0.59418964", "0.5906397", "0.57984394", "0.57431734", "0.56760716", "0.56673545", "0.56565267", "0.5638467", "0.5544125", "0.5542858", "0.55279076", "0.5471107", "0.5453296", "0.5441419", "0.544021", "0.5431366", "0.54308397", "0.5422164", "0.5414585", "0.540240...
0.0
-1
Creates the geometry of the reticle.
createReticle_() { // Create a spherical reticle. let innerGeometry = new THREE.SphereGeometry(INNER_RADIUS, 32, 32); let innerMaterial = new THREE.MeshBasicMaterial({ color: 0xffffff, transparent: true, opacity: 0.9 }); let inner = new THREE.Mesh(innerGeometry, innerMaterial); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createGeometry()\n {\n this.executeMidpoint();\n\n // Prepare specifics buffers for WebGL\n this.verticesBuffer = getVertexBufferWithVertices(this.vertices);\n this.colorsBuffer = getVertexBufferWithVertices(this.colors);\n this.indicesBuffer = getIndexBufferWithIndices(this.indices);\...
[ "0.67437255", "0.6488343", "0.6320209", "0.6056338", "0.60216045", "0.5968775", "0.5898256", "0.5829884", "0.5826275", "0.5770176", "0.57299346", "0.57203186", "0.5718987", "0.5707535", "0.5704397", "0.5676092", "0.5673346", "0.56604844", "0.5639926", "0.56370103", "0.5629954...
0.6479053
2
Moves the reticle to a position so that it's just in front of the mesh that it intersected with.
moveReticle_(intersections) { // If no intersection, return the reticle to the default position. let distance = RETICLE_DISTANCE; if (intersections) { // Otherwise, determine the correct distance. let inter = intersections[0]; distance = inter.distance; } this.reticleDistance = di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function act(){\n\t\tmodel.transform.localPosition = relativePosition;\n\t\t//Does nothing\n\t}", "moveToOriginal() {\r\n if (this.mesh.position.manhattanDistanceTo(this.originalPosition) < Number.EPSILON) return;\r\n\r\n this.moveTransition(this.originalPosition, this.originalRotation);\r\n this...
[ "0.62903655", "0.60658056", "0.6059056", "0.5924169", "0.59129584", "0.5906503", "0.59039116", "0.5898887", "0.5877562", "0.5873165", "0.5869938", "0.5780233", "0.5759141", "0.5748868", "0.57459575", "0.57096624", "0.5688244", "0.5669733", "0.5649015", "0.56038284", "0.558299...
0.5941444
3
Combine data and draw initial map
function combine_data(vis_function_args) { return function(error, raw_school_data, raw_state_data) { // Select the fields we want from school data raw_school_data.forEach(function(d) { school_data.push({ college: d.college_name, state: d.state, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function downloadMap(){\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n ctx.fillStyle = \"black\";\r\n ctx.fillRect(0, 0, 1000, 1000);\r\n ctx.fillStyle = \"green\";\r\n ctx.font = \"50px Arial\";\r\n\r\n ctx.fillText(\"Creating map... Please wait...\",50,300);\r\n //download map to ...
[ "0.6719642", "0.6589005", "0.64920354", "0.6482378", "0.64678234", "0.6445547", "0.6441342", "0.64038473", "0.63904196", "0.6352638", "0.63505626", "0.6340718", "0.6332832", "0.6321416", "0.6309819", "0.6308931", "0.62978256", "0.62841034", "0.62796736", "0.6263391", "0.62554...
0.0
-1
Something is wonky above recheck
setCountryCode() { this.countryCode = 'us'; this.setCurrencySymbol(); fetch('http://ip-api.com/json') .then(results => results.json()) .then(results => { this.countryCode = results.countryCode.toLowerCase(); this.setCurrencySymbol(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check() {}", "function check_and_report() {\n \n }", "function _checkAi(){return true;}", "function manuallyCheckForUpdate() {\r\n\tcheckForUpdate(true);\r\n} //End manual update check", "function checkSolution(){\n\t puzzleSolution;\n\t}", "function checkChecker(){\n\tvar spam = theF...
[ "0.67483747", "0.6511063", "0.62772715", "0.60351044", "0.5797522", "0.5794861", "0.5790423", "0.576268", "0.5749922", "0.5730773", "0.5722106", "0.5720482", "0.57021224", "0.56992865", "0.5677852", "0.567019", "0.56612456", "0.5647725", "0.56372106", "0.562508", "0.562012", ...
0.0
-1
Filter through database for searched movie title
function getMovie(movieSelection) { $.ajax({ url: 'http://localhost:9393/api/movies', data: movieSelection, dataType: 'json', method: 'GET', success: function(rawData) { $('.content-container').empty(); rawData.forEach(function(dataObj) { var movieTitle = dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter_movie_data_by_title(title) {\n\tfiltered_data = [];\n\t$(sf_movie_data).each( function(i,data){\n\t\tif (data[8] == title) {\n\t\t\tfiltered_data.push(data);\n\t\t}\n\t} );\n\treturn filtered_data;\n}", "function filterMovies(titlename) {\r\n const filteredMovies = movies.filter(word => word.T...
[ "0.7588663", "0.7575678", "0.7394003", "0.7196488", "0.71098363", "0.6968832", "0.69556093", "0.6945938", "0.6808057", "0.6697441", "0.6630299", "0.66124284", "0.6609417", "0.6553139", "0.6539986", "0.6528101", "0.64728445", "0.6466924", "0.6465915", "0.6462834", "0.640666", ...
0.0
-1
main page ,get data from mongodb
function showAddressBook(){ fetch("http://localhost:3000/contacts",{ method: "GET", headers: { 'Content-Type':'application/json' }, }) .then(response =>response.json()) .then(result =>{ //console.log(r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getObjectData() {\n\n // console.log(\"Running getObjectData\");\n\n if (dbConnection) {\n\n var dbo = dbConnection;\n dbo\n .collection(\"stats\")\n .find(\n { name: \"lists\" },\n { projection: { _id: 0, objects: 1 } }\n )\n .toArray(function (err, result) {\n ...
[ "0.6560489", "0.6487037", "0.6432556", "0.64225376", "0.63977146", "0.63955057", "0.6320506", "0.6320109", "0.6227202", "0.6214468", "0.61980593", "0.61618984", "0.61579204", "0.6142425", "0.6139055", "0.612137", "0.6120249", "0.6118853", "0.6116351", "0.6101983", "0.60637593...
0.0
-1
constructor to hold state information
constructor(props){ super(props); this.state = { isLogginActive: true, isLoggedIn : false, isLoginScreen : true, username:'', password: '', HighScore: 0, email: '', // user objects and users saved to state users: [ {username:'silversamurai',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() { \r\n super();\r\n this.state = {};\r\n }", "function State() { }", "constructor() {\n\n // we use the super keyword and method to call the constructor of a parent class\n // this gives us access to the properties of the parent class. It MUST \n // be used B...
[ "0.76805836", "0.75243104", "0.7480358", "0.7382845", "0.738277", "0.7368476", "0.7367897", "0.729586", "0.7189152", "0.7138873", "0.712739", "0.7127279", "0.7095871", "0.7092278", "0.70920116", "0.70637715", "0.7062521", "0.7052066", "0.7048175", "0.7010378", "0.70048004", ...
0.0
-1
function not used but is made to simulate login and change the state which control which is shown
changeLoggedin(){ this.setState(prevState => ({ isLogginActive: !prevState.isLogginActive })); this.setState(prevState => ({ isLoggedIn: !prevState.isLoggedIn })); this.setState(prevState => ({ isLoginScreen: !prevState.isLoginScreen })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function switchToLogin(){\n\t\tturnService.closeWaitingAlert();\n\t\t$userLoginArea.show();\t\t\n\t\t$pageWrapper.hide();\n\t}", "function simulateLogin() {\n $(\"#form_div\").hide();\n $(\"#table\").show();\n $(\"#msg\").hide(); \n getFreightLoads(1);\n setStatusText(\"\", \"\");\n}", "function loginIni...
[ "0.7440894", "0.72806364", "0.720675", "0.714334", "0.71260875", "0.70208955", "0.7012817", "0.6990583", "0.6955813", "0.69048184", "0.6858924", "0.68530095", "0.68180835", "0.6808439", "0.67822015", "0.67662305", "0.67637515", "0.67466694", "0.6715839", "0.67094505", "0.6707...
0.0
-1
this function is called when the rightside blue piece is clicked
changeState() { this.setState(prevState => ({ isLogginActive: !prevState.isLogginActive })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cellRightClick() {\n\tcellClick(pointingAtX,pointingAtY, null);\n}", "goToTheRight() {\n this.lightBoxRightButton.addEventListener('click', () => {\n this.switchRight();\n });\n }", "function click() {\r\n\t// if the piece is highlighted, move the piece\r\n\...
[ "0.69036597", "0.68905926", "0.6746489", "0.6716573", "0.667035", "0.666816", "0.6658359", "0.65773404", "0.6569524", "0.65236", "0.6497495", "0.6454799", "0.64429975", "0.64389133", "0.6422593", "0.6415935", "0.6407352", "0.64006615", "0.6395726", "0.63582367", "0.63360703",...
0.0
-1
See Runs when a user installs an addon.
function onInstall(e) { onOpen(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "onFirstInstalled() {\n\n }", "function OnInstalled() {\r\n alert(\"Join/Split Lines 1.01 by Peter Klein installed sucessfully!\");\...
[ "0.6925315", "0.6925315", "0.6925315", "0.6923475", "0.6503637", "0.64987457", "0.64242274", "0.6149239", "0.6136783", "0.61229575", "0.5991991", "0.5991991", "0.5991991", "0.5991991", "0.5991991", "0.59878", "0.59678704", "0.5912476", "0.58891135", "0.58823466", "0.58812857"...
0.6594277
6
Runs when a user opens a Doc
function onOpen(e) { // Register our add-on: this will add it to the sidebar DocumentApp.getUi().createAddonMenu() .addItem('Show Sidebar', 'showSidebar') // button + callback .addItem('Create Table From Selection', 'createTableFromPrefs') .addSeparator() .addItem('Clear Preferences', 'deletePrefere...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onOpen() {\n var ui = DocumentApp.getUi();\n ui.createMenu('Script menu')\n .addItem('Setup', 'setup')\n .addItem('Create Events First Time', 'createDocForEvents')\n .addToUi();\n}", "function doOpenDocument() {\n var presenter = new mindmaps.OpenDocumentPresenter(eventBus,\n ...
[ "0.70379096", "0.69576174", "0.6869092", "0.6783678", "0.67486477", "0.67000633", "0.65742624", "0.64616996", "0.6454562", "0.6361524", "0.6254087", "0.6248975", "0.6246262", "0.6209606", "0.6199084", "0.60967714", "0.60831565", "0.60818654", "0.6049294", "0.5968909", "0.5960...
0.55087405
65
===== Preferences handling Save every key/value in prefs to the User Preferences
function savePreferences(prefs) { let userProps = PropertiesService.getUserProperties(); for (let key in prefs) userProps.setProperty(key, prefs[key]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function savePrefs()\n{\n let preferences = collatePrefs( prefs );\n browser.storage.local.set({\"preferences\": preferences});\n}", "function lc_savePreferences(prefs){\r\n if(!GM_setValue) return;\r\n for(opt in prefs){\r\n // prefs we do not save\r\n if(/^(debug|styles)$/.test(opt)) continue;\r\...
[ "0.8001825", "0.7727682", "0.7439519", "0.73615164", "0.7307888", "0.7030163", "0.70051265", "0.69810116", "0.69137216", "0.68388325", "0.6815027", "0.6784516", "0.6774234", "0.6727055", "0.6727055", "0.67155915", "0.6709482", "0.6664324", "0.66454464", "0.6642611", "0.664126...
0.8024817
0
Read and return all key/values previously saved in User Preferences
function loadPreferences() { return PropertiesService.getUserProperties().getProperties(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserPreferences() {\r\n\treturn JSON.parse(readUserData());\r\n}", "function readUserPreferencesFromLocalStorage() {\n let userPrefences = readObjectFromLocalStorage(userPreferencesKeyInLocalStorage);\n if ( Object.keys(userPrefences).length > 0){\n return userPrefences;\n }\n retu...
[ "0.7354551", "0.718603", "0.6757769", "0.63913095", "0.6341749", "0.63219637", "0.6313185", "0.6287063", "0.6287063", "0.62864536", "0.62332493", "0.6203496", "0.6198624", "0.61868864", "0.61731774", "0.6168321", "0.6151384", "0.61149967", "0.60826117", "0.6057215", "0.605360...
0.70164245
2
Delete all User Preference
function deletePreferences() { PropertiesService.getUserProperties().deleteAllProperties(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function purgePrefs() {\n\tfor (var key in localStorage) {\n\t\tif (key.indexOf(\"mtd_\") >= 0) {\n\t\t\tlocalStorage.removeItem(key);\n\t\t\tconsole.log(\"Removing key \"+key+\"...\");\n\t\t}\n\t}\n\tif (isApp) {\n\t\tconst Store = require('electron-store');\n\t\tconst store = new Store({name:\"mtdsettings\"});\n...
[ "0.6749565", "0.64683604", "0.63792336", "0.634479", "0.62665224", "0.6248762", "0.62387854", "0.62358284", "0.6224135", "0.6165834", "0.61605656", "0.6152019", "0.60813963", "0.60722905", "0.6068457", "0.6058499", "0.6033755", "0.5989241", "0.59784293", "0.5970944", "0.59560...
0.8153803
0
===== Main functions Render our sidebar.html when the users click on Addon > Start
function showSidebar() { var ui = HtmlService .createHtmlOutputFromFile('sidebar') .setTitle('Create table'); DocumentApp.getUi().showSidebar(ui); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onOpen(e) {\n DocumentApp.getUi().createAddonMenu()\n .addItem('Start', 'showSidebar')\n .addToUi();\n}", "function showSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('sidebar').setTitle(ADDON_TITLE);\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function showSidebar() ...
[ "0.74014384", "0.70200866", "0.6977413", "0.6825587", "0.67840433", "0.67532825", "0.6660827", "0.66568214", "0.66180414", "0.660343", "0.660343", "0.64972687", "0.6486007", "0.63838655", "0.63761204", "0.63727283", "0.637146", "0.6366236", "0.63448906", "0.63143086", "0.6307...
0.64156884
13
Call createTable using the previously saved preferences
function createTableFromPrefs() { createTable(loadPreferences()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTable() {\n\n db.transaction(function (tx) { tx.executeSql(createStatement, [], showRecords, onError); });\n\n}", "function createTables() {\n var db = getDatabase();\n\n db.transaction(\n function(tx) {\n tx.executeSql('CREATE TABLE IF NOT EXISTS configuration(id INTEGE...
[ "0.7051992", "0.6873597", "0.6839681", "0.66657466", "0.6623603", "0.6570236", "0.65118945", "0.6501184", "0.6437556", "0.64356697", "0.6413625", "0.6410777", "0.6384", "0.6368639", "0.631159", "0.6306262", "0.6283339", "0.6266392", "0.6251276", "0.62075436", "0.62013227", ...
0.85432756
0
une liste pour les DT, une pour chaque DT, et une pour toutes les Agences fonction principale
function affiche_carte() { //================DECLARATION DES VARIABLES================= // var myLatlng = new google.maps.LatLng(48.853, 2.35); var mapOptions = { zoom: 12, center: myLatlng}; // On créé la map et on l'affiche dans la div map-canvas var map = new google.maps.Map(document.getEle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function depEmpDt() {\n let depEmpArr = depDataTable();\n depEmpArr.forEach(element => {\n let dataArr = Object.values(element);\n dataTable.rows().add(dataArr);\n });\n}", "function empDt() {\n let depdtArr = empDataTable();\n depdtArr.forEach(element => {\n let dataArr = Object.values(element);\n...
[ "0.5589646", "0.55356276", "0.541857", "0.5413978", "0.5413978", "0.5413978", "0.5413978", "0.5413978", "0.53735095", "0.5345355", "0.53178346", "0.5209088", "0.5204133", "0.520169", "0.51894414", "0.5171642", "0.5151835", "0.5140989", "0.51364535", "0.51271296", "0.5106848",...
0.0
-1
once a user has successfully logged in, we want to refresh the post listing that is displayed. To do that, we'll call the callback passed in from the parent.
refreshPostsFromLogin(){ this.props.refreshPosts(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onLoggedIn(authData) {\n\t\tconsole.log(authData);\n\t\tthis.setState({\n\t\t\tuser: authData.user.Username,\n\t\t});\n\n\t\tlocalStorage.setItem('token', authData.token);\n\t\tlocalStorage.setItem('user', authData.user.Username);\n\t\tthis.getMovies(authData.token);\n\t}", "function refreshPostsByLikes(userId) ...
[ "0.57285285", "0.57196736", "0.5655469", "0.55837184", "0.5558647", "0.5542038", "0.5518835", "0.54895455", "0.5488674", "0.5479723", "0.5448978", "0.5441246", "0.54199624", "0.54130393", "0.54061985", "0.539111", "0.5389225", "0.5386229", "0.5377251", "0.53696346", "0.536555...
0.6384389
0
Transpile, concatenate and minify scripts
function scripts() { return ( gulp .src(["./assets/js/**/*"]) .pipe(newer("./docs/assets/js")) .pipe(babel({presets: ['@babel/preset-env']})) .pipe(minify({noSource: true, ext: {min: '.min.js'}})) .pipe(gulp.dest("./docs/assets/js/")) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jsTask() {\n return src(files.jsPath)\n .pipe(babel())\n .pipe(conCat('main.js'))\n //terser minifies the files after concat put them togheter\n .pipe(terser())\n .pipe(dest('pub/js'));\n}", "function scripts() {\n return (\n gulp\n .src(javascript_...
[ "0.77183026", "0.7505158", "0.74631685", "0.7441485", "0.7430886", "0.7321527", "0.72635686", "0.72280025", "0.7225908", "0.7139907", "0.7098217", "0.70972663", "0.7083956", "0.7059652", "0.7048225", "0.70410556", "0.7032802", "0.70132846", "0.70022404", "0.7001835", "0.69945...
0.6624717
59
Generating random phrase to the display.
addPhraseToDisplay() { const ul = document.getElementById('phrase').firstElementChild; for (let i = 0; i < this.phrase.length; i++) { let li = document.createElement('li'); li.textContent = this.phrase[i]; if (li.textContent === ' ') { li.classList.add('hide', 'space'); } els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomPhrase() {\n var phraseNum = randomNumber(first, phrases.length - 1);\n var thePhrase = phrases[phraseNum];\n $('#message').text(thePhrase);\n}", "getRandomPhrase() { // Gets a random phrase\n const rand = this.phrases[Math.fl...
[ "0.7966083", "0.7813603", "0.7775044", "0.77634877", "0.7722865", "0.76878345", "0.76154625", "0.7539965", "0.7539965", "0.75282747", "0.75269794", "0.75218964", "0.75206316", "0.75137526", "0.75130284", "0.7492473", "0.74907225", "0.74730414", "0.7462704", "0.7460989", "0.74...
0.0
-1
Method check the letter vs phrase[i], returns true/false.
checkLetter(letterToCheck) { let checkForMatch = 0; for (let i = 0; i < this.phrase.length; i++) { if (letterToCheck === this.phrase[i].toLowerCase()) { checkForMatch++ } } if (checkForMatch > 0) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkLetter(letter) {\r\r // Loop through the phrase text and if the letter matches\r // the phrase text at index j, return true\r for (let j = 0; j < this.phrase.length; j++){\r\r\n if (this.phrase[j] == letter)\r\n return true;\r\n }\r\r // No match, r...
[ "0.8366424", "0.7846759", "0.78412545", "0.7723166", "0.7715468", "0.7661892", "0.75496215", "0.7542644", "0.7471315", "0.7440397", "0.74284834", "0.7421099", "0.7416715", "0.7406988", "0.73830515", "0.7373371", "0.7369795", "0.73579127", "0.7335481", "0.73203814", "0.731855"...
0.7788646
3
Show matched letter method: Adds show class and removes hide class
showMatchedLetter(letter) { const lis = document.getElementById('phrase').firstElementChild.children; for (let i = 0; i < lis.length; i++) { if (lis[i].textContent.toLowerCase() === letter) { lis[i].classList.add('show'); lis[i].classList.remove('hide'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showMatchedLetter(correctLetter){\n correctLetter.classList.remove('hide');\n correctLetter.classList.add('show');\n }", "showMatchedLetter(letter) {\r\n const letters = Array.from(document.getElementsByClassName(letter));\r\n letters.forEach(match => {\r\n match.class...
[ "0.8346035", "0.8340802", "0.8276691", "0.82493126", "0.80687463", "0.8033849", "0.8031622", "0.801039", "0.79637843", "0.7960156", "0.79389083", "0.7883817", "0.7859035", "0.78460395", "0.7799869", "0.77922493", "0.77774626", "0.7777057", "0.77651566", "0.7765142", "0.775603...
0.74283946
31
retrieves appointments of individual doctor based on index of clicked doctor
updateAppointmentsList(docIndex) { const doctor = this.state.doctors[docIndex]; const doctorID = doctor.id; this.setState({ selectedDoctor: doctor, displayMakeAppointmentButton: true }); fetch(`/appointments/${doctorID}`) .then((res) => { return res.json(); // this returns a pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserAppointments() {\n // Hard-code in appointments for now\n const appt1 = new Appointment(0, \"Regular Checkup\", new dateTime(\"2019\", \"Feb\",\"28\",1100), new dateTime(\"2019\", \"Feb\",\"28\",1200), doctorList[1]);\n\n // Note: Adding appointments is done from doctor's side\n // Resc...
[ "0.61240005", "0.5956104", "0.5872043", "0.58458036", "0.5838649", "0.5832773", "0.5748825", "0.57014674", "0.5681564", "0.5608389", "0.5545669", "0.55386263", "0.55359626", "0.55248326", "0.54807454", "0.5419038", "0.53982604", "0.5385525", "0.53749347", "0.5372639", "0.5364...
0.6446039
0
'message' passes from playerLoses to roundEnds to displayMessage.
playerLoses() { this.roundEnds('LOSER'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateMessage() {\n if(this.pente.winner) {\n this.interface.updatePenteStatusMessage(\"Gameover (\"\n + ((this.pente.winner == \"w\") ? \"P1\" : \"P2\") + \" Won)\");\n return;\n }\n\n if(!this.pente.active_game) {\n this.interface.updatePenteStatus...
[ "0.6956218", "0.6610727", "0.6517196", "0.64398706", "0.642357", "0.63026655", "0.62934667", "0.6282688", "0.62804896", "0.62641615", "0.61907", "0.6181097", "0.6177922", "0.6176871", "0.612962", "0.6129558", "0.6125773", "0.61180484", "0.6116672", "0.61114734", "0.61112803",...
0.6762501
1
new declaration space, making redeclaring x as a string valid
function declSpace() { for(var x = "this is a string";;){} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Assign_Free_Literal() {\r\n}", "function f(x) { return x + 'f'; }", "function add()\n{\n var xx = \"dsd\";\n}", "function f(x) {\n var x = 100; // error: interferes with parameter declaration\n}", "function varify(ast, stats, allIdentifiers, changes) {\n\t function unique(name) {\n\t ...
[ "0.56054527", "0.5518988", "0.54968673", "0.5411816", "0.53742754", "0.53742754", "0.5371244", "0.5351038", "0.5334781", "0.53080034", "0.5277089", "0.5246046", "0.52218187", "0.5208499", "0.5207842", "0.51960576", "0.51921433", "0.5146895", "0.5134234", "0.5129688", "0.51296...
0.63148147
0
Equality test for settings objects
function settingsEqual(s1, s2) { return s1.powers == s2.powers && s1.negs == s2.negs && s1.bonuses == s2.bonuses && s1.playersPerTeam == s2.playersPerTeam; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "compareNewSettings(props) {\n const newSettings = extractSettings(props);\n const cell0 =\n this.settings &&\n this.settings.data &&\n this.settings.data[0][0] != newSettings.data[0][0];\n\n let changedSettings = {};\n if (this.settings) {\n O...
[ "0.66807926", "0.6306412", "0.58272547", "0.5718076", "0.5699185", "0.5659488", "0.565383", "0.5651505", "0.5640554", "0.5583058", "0.55816954", "0.55544585", "0.5549336", "0.55424696", "0.5517315", "0.55136096", "0.5511037", "0.55107987", "0.5504028", "0.5487821", "0.5476181...
0.75836605
0
Equality test for two games.
function gameEqual(g1, g2) { if((g1 == undefined && g2 != undefined) || (g1 != undefined && g2 == undefined)) { return false; } return g1.round == g2.round && g1.tuhtot == g2.tuhtot && g1.ottu == g2.ottu && g1.forfeit == g2.forfeit && g1.team1 == g2.team1 && g1.team2 == g2.team2 && g1.score1 == g2.sco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function areTheyEqual() {\n\n // check class list -> to get the value of teh faced down card\n const cardOneValue = cardOneElement.innerHTML.trim();\n const cardTwoValue = cardTwoElement.innerHTML.trim();\n\n // check if both classes are equal and that the item isn't in the list to begin with\n if (...
[ "0.66778576", "0.6373651", "0.6361167", "0.63381934", "0.6317479", "0.62919164", "0.62644386", "0.6248061", "0.61603165", "0.6151268", "0.6124505", "0.60803604", "0.6059554", "0.60396504", "0.60301596", "0.59794897", "0.5955787", "0.5949349", "0.592962", "0.59165186", "0.5916...
0.81324303
0
Is version a less than version b? Versions are 3piece dotdelimited, e.g. '1.2.3'
function versionLt(a, b) { var aSplit = a.split('.'), bSplit = b.split('.'); if(aSplit[0] != bSplit[0]) { return aSplit[0] < bSplit[0]; } if(aSplit[1] != bSplit[1]) { return aSplit[1] < bSplit[1]; } return aSplit[2] < bSplit[2]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function version_lt(a, b) {\n var i;\n a = a.split('.');\n b = b.split('.');\n for (i = 0; i < a.length; i += 1) {\n if (parseInt(a[i], 10) < parseInt(b[i], 10)) {\n return true;\n }\n }\n return false;\n }", "function isVersionLes...
[ "0.8863581", "0.8087876", "0.76848173", "0.73144287", "0.7290684", "0.7267676", "0.72642386", "0.72058487", "0.70960385", "0.6998213", "0.69087106", "0.6856035", "0.6819599", "0.68070376", "0.67940325", "0.67700243", "0.67656195", "0.6745655", "0.67373484", "0.6712501", "0.67...
0.8552107
1
Do any players on this team have year/grade info?
function teamHasYearData(team) { for(var p in team.roster) { var year = team.roster[p].year; if(year != undefined && year != '') { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allSeasonPlayers(player) {\r\n return player.GP === 82;\r\n}", "isYearActive(year) {\n const date = this.createMoment(this.value).year(year);\n return date.isSame(this.value, 'year');\n }", "function checkYear(value, yearArr) {\n\n return yearArr.some(element => {\n\n ret...
[ "0.66386044", "0.5975533", "0.59318423", "0.5880738", "0.58718747", "0.5816979", "0.58000106", "0.575972", "0.5753324", "0.5732203", "0.5700912", "0.5669231", "0.56660825", "0.56104445", "0.55969155", "0.55896884", "0.5573749", "0.5539276", "0.551299", "0.54949254", "0.547027...
0.7523828
0
conversion on team data structure (version 2.1.0) Changes rosters from arrays of strings to arrays of objects with the year property
function teamConversion2x1x0(loadTeams) { for(var i in loadTeams) { var curTeam = loadTeams[i]; var rosterObj = {}; for(var j in curTeam.roster) { rosterObj[curTeam.roster[j]] = {year: ''}; } curTeam.roster = rosterObj; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groupBy(arr){\n const groupByYear = arr.reduce(function (acc, item) {\n acc[item.year] = acc[item.year] || []\n acc[item.year].push(item)\n\n return acc;\n }, Object.create(null));\n return groupByYear\n}", "mapTeamData(team, ownersList) {\n const owners = ownersList.filter(owner => o...
[ "0.61961085", "0.6135663", "0.6128215", "0.6024644", "0.5992058", "0.59869134", "0.5968288", "0.59281915", "0.5832093", "0.58312917", "0.5780124", "0.5774587", "0.5766684", "0.57484215", "0.572038", "0.5711007", "0.5694178", "0.5684176", "0.5680315", "0.56665146", "0.56659013...
0.70810837
0
conversion on team data structure (version 2.2.0) Adds the teamlevel UG and D2 properties, and adds the division 2 property to each player
function teamConversion2x2x0(loadTeams) { for(var i in loadTeams) { var curTeam = loadTeams[i]; curTeam.teamUGStatus = false; curTeam.teamD2Status = false; for(var player in curTeam.roster) { curTeam.roster[player].div2 = false; curTeam.roster[player].undergrad = false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function teamConversion2x1x0(loadTeams) {\n for(var i in loadTeams) {\n var curTeam = loadTeams[i];\n var rosterObj = {};\n for(var j in curTeam.roster) {\n rosterObj[curTeam.roster[j]] = {year: ''};\n }\n curTeam.roster = rosterObj;\n }\n}", "mapTeamData(team, ownersList) {\n const ...
[ "0.5841712", "0.57429343", "0.57298917", "0.5684265", "0.5546478", "0.5488447", "0.54545957", "0.5417565", "0.5367713", "0.5292088", "0.5279067", "0.5222256", "0.5197874", "0.5190331", "0.5157878", "0.51571137", "0.5140191", "0.5137323", "0.51303864", "0.51109254", "0.5108235...
0.5884707
0
conversion on team data structure (version 2.3.0) Adds the teamlevel small school and JV properties.
function teamConversion2x3x0(loadTeams) { for(var i in loadTeams) { var curTeam = loadTeams[i]; curTeam.smallSchool = false; curTeam.jrVarsity = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function footballTeam (player){\n\tvar teamobj = {}\n\tteamobj.player = player;\n\tteamobj.addInfo =addInfo;\n\tteamobj.arrayOfPlayers= [];\n\tteamobj.increaseLevel=increaseLevel;\n\tteamobj.isAvailable=isAvailable;\n\tteamobj.decrease=decrease;\n\tteamobj.sortPalyerBy=sortPalyerBy;\n\treturn teamobj\n}", "addTe...
[ "0.5748103", "0.5564482", "0.5488929", "0.53398126", "0.52508235", "0.5240456", "0.51590395", "0.51367587", "0.5101806", "0.5054155", "0.5045673", "0.5042461", "0.5040697", "0.50251967", "0.5012057", "0.49688908", "0.49495453", "0.49435875", "0.49403518", "0.4903185", "0.4897...
0.57357585
1
For each player in this game, increment that player's count in the index. Assumes that teams and players are already defined.
function addGameToPlayerIndex(game, index) { var team1 = game.team1, team2 = game.team2; for(var p in game.players1) { if(toNum(game.players1[p].tuh) > 0) { index[team1][p]++; } } for(var p in game.players2) { if(toNum(game.players2[p].tuh) > 0) { index[team2][p]++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateRoleCounts() {\n this.numMafia = this.numCops = this.numDoctors = this.numTown = 0;\n var roleCounts = [ 0, 0, 0, 0 ];\n for (var name in this.players) {\n var player = this.players[name];\n roleCounts[player.role-1] += player.alive ? 1 : 0;\n }\n this...
[ "0.6422129", "0.6354274", "0.6228611", "0.6199049", "0.6179817", "0.6164564", "0.61332333", "0.6132244", "0.60988307", "0.59866965", "0.59848404", "0.5978326", "0.5947646", "0.59460247", "0.5909276", "0.5868126", "0.58532387", "0.58174", "0.5805598", "0.57701665", "0.5764901"...
0.68123215
0
Update the player index when a game is modified. Decrementing ever player in the old game, then incrementing every player in the new game is superfluous but much cleaner code. Set newGame to null if deleteing rather than modifying oldGame
function modifyGameInPlayerIndex(oldGame, newGame, index) { var oldTeam1 = oldGame.team1, oldTeam2 = oldGame.team2; for(var p in oldGame.players1) { if(toNum(oldGame.players1[p].tuh) > 0) { index[oldTeam1][p]--; } } for(var p in oldGame.players2) { if(toNum(oldGame.players2[p].tuh) > 0) { index[oldTeam2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateCurrentPlayer(){\n this.currentPlayer = this.currentPlayer + 1;\n if (this.playerBoards.length === this.currentPlayer) {\n this.currentPlayer = 0 \n }\n }", "function currentPlayerIndex(game) {\n const nPlayers = Math.max(1, game.players.length);\n ...
[ "0.6627245", "0.6355763", "0.63354623", "0.620725", "0.6140692", "0.6110087", "0.60466754", "0.59609866", "0.5944651", "0.58694834", "0.5829308", "0.58214724", "0.5802805", "0.5791978", "0.57804555", "0.5775125", "0.57640374", "0.5751982", "0.5726639", "0.5705263", "0.5702575...
0.75664896
0
Update team names and rosters in the player index
function modifyTeamInPlayerIndex(oldTeam, newTeam, index) { var oldTeamName = oldTeam.teamName; var newPlayerList = Object.keys(newTeam.roster); var newIndexPiece = {}; var count = 0; for(var p in oldTeam.roster) { var newPlayerName = newPlayerList[count++]; if(newPlayerName != undefined && newTeam.ro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(){\n scoreboard.update();\n redTeam.forEach(player => player.update());\n blueTeam.forEach(player => player.update());\n\n}", "updateInfo(){\r\n\r\n db.ref(\"players/player\" + this.index).set({\r\n name : this.name, distance : this.distance,rank:this.rank\r\n })\r\n\...
[ "0.68029976", "0.6483154", "0.6287185", "0.62564385", "0.6195341", "0.6171975", "0.61275285", "0.6105095", "0.6094713", "0.60790944", "0.6072233", "0.60537446", "0.6050303", "0.6036494", "0.60238355", "0.5937809", "0.5936325", "0.59191406", "0.58898276", "0.58861226", "0.5884...
0.64916116
1
Generate the data necessary for showing the abbreviated standings table in the sidebar
function getSmallStandings(myTeams, myGames, gamesPhase, groupingPhase, settings) { var summary = myTeams.map(function(item, index) { var obj = { teamName: item.teamName, division: item.divisions[groupingPhase], //could be 'noPhase' wins: 0, losses: 0, ties: 0, points...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _buildTable() {\n // _displayLoading(true);\n _addGradeRange();\n _renderSelects();\n var table = _setupDataTable(renderTable());\n renderFeatures();\n}", "function showAll(courseId) {\n // Figure out how many columns we'll need.\n // const term = window.CST_OVERRIDES.terms.find( e => e...
[ "0.62150455", "0.6007237", "0.60058796", "0.5983393", "0.59677064", "0.59132016", "0.59122056", "0.58579916", "0.58255136", "0.5824721", "0.5809704", "0.5782041", "0.5765499", "0.5760672", "0.5754801", "0.5743942", "0.57196087", "0.57128894", "0.5701798", "0.5700745", "0.5697...
0.0
-1