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
1. write a function that takes an array as its first parameter and returns the first item in the array
function firstNumber() { return numbers.shift(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firstOfArray(array){\n\n return array[0] ;\n}", "function first(array) {\n return array[0];\n}", "function firstOfArray(arr){\nreturn (arr[0]);\n}", "function first(arr) {\n return arr[0];\n}", "function firstElement(array) {\r\n return array[0];\r\n}", "function firstElement(array) {\...
[ "0.8884667", "0.8801613", "0.87985694", "0.87685674", "0.8736956", "0.87170994", "0.8683574", "0.8464235", "0.83881235", "0.8326118", "0.8315426", "0.8241177", "0.82356614", "0.8203873", "0.80955446", "0.80923474", "0.8040413", "0.8040413", "0.8040413", "0.8040413", "0.804022...
0.0
-1
2. write a function that takes an array as its first parameter and returns the last item in the array
function lastNumber(numbers) { return numbers.pop() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lastOfArray(array){\n return array[array.length-1];\n}", "function last(array) {\n return array[array.length - 1];\n}", "function getLast(arr){\r\n return arr[arr.length - 1]\r\n}", "function lastOfArray(arr){\nreturn arr[arr.length-1];\n\n}", "function last(array) {\n return (array[arra...
[ "0.8837226", "0.8803829", "0.8790698", "0.8750663", "0.867468", "0.86148685", "0.86137277", "0.8603288", "0.8593917", "0.8584224", "0.8584224", "0.85745716", "0.85744935", "0.85707986", "0.8570027", "0.85621893", "0.85431075", "0.85431075", "0.85431075", "0.8537812", "0.85179...
0.0
-1
Make this function return the input string, capitalized. f("hello world"); // Hello World f("ALL YOUR BASE ARE BELONG"); // All Your Base Are Belong HINT: Write a function that capitalizes a single word. Split the input sentence into an array of words Iterate over each word, calling your "capitalize word" function Join...
function makeIntoTitle(sentence) { sentence = sentence.toLowerCase().split(' '); for (let i = 0; i < sentence.length; i++) { sentence[i] = sentence[i].charAt(0).toUpperCase() + sentence[i].slice(1); } return sentence.join(' '); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function f(str) {\n const words = str.split(' ');\n let capitalizedWords = [];\n for (let i = 0; i < words.length; i++) {\n const capitalizedWord = words[i].charAt(0).toUpperCase() + words[i].slice(1).toLowerCase();\n capitalizedWords.push(capitalizedWord);\n }\n return capitalizedWords.join(' ');\n}", ...
[ "0.81813943", "0.8109156", "0.80978614", "0.8020319", "0.7975291", "0.797008", "0.7917246", "0.7903007", "0.78934443", "0.78884095", "0.7887226", "0.78862846", "0.78617984", "0.78509575", "0.784791", "0.7842436", "0.782917", "0.78167844", "0.77848285", "0.77848285", "0.775504...
0.0
-1
Clone object data without functions
function safeClone(source) { var destination = {}; traversal_1.traversal(function (name, sourceValue) { if (typeof (sourceValue) !== 'function') { destination[name] = sourceValue; } }, destination, [source]); return destination; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneData(data) {\n return data;\n //return JSON.parse(JSON.stringify(data));\n}", "function clone(object) { return JSON.parse(JSON.stringify(object))}", "clone() {\n\t\tlet data = JSON.parse(JSON.stringify(this.Serialize()));\n\t\treturn new this.constructor(data);\n\t}", "function clone(obj) {\n...
[ "0.76192415", "0.7589071", "0.7483125", "0.7420705", "0.73991996", "0.7356116", "0.7353913", "0.7342351", "0.732563", "0.72913265", "0.72885", "0.72885", "0.72885", "0.72885", "0.72692287", "0.72447604", "0.72447604", "0.72240055", "0.7197881", "0.7197881", "0.71815133", "0...
0.0
-1
render is getting called every time you type a new keystroke because the keystroke is updating the internal state
render() { console.log(this.state) return ( <div className="App"> <PokedexHeader author={this.state.author} name={this.state.name} /> {/* <PokedexHeader author="@faize" name={"faize"} />*/} <Segment basic > <Input label={"input your name"} value={this.state.name} onChange={this.onCh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onKeypress() {\n this.render();\n }", "onKeypress() {\n this.render();\n }", "render() {\n\t\t// watch for change and call event handler to update state\n\t\treturn (\n\n\t\t\t<div>\n\t\t\t\t<input \n\t\t\t\t\tvalue={this.state.term} // set input value to match state\n\t\t\t\t\tonChange={event => this....
[ "0.7708014", "0.7708014", "0.69829005", "0.67204523", "0.66898674", "0.66149735", "0.6607646", "0.659978", "0.65937185", "0.65937185", "0.6588883", "0.65846497", "0.65482175", "0.6531403", "0.6477347", "0.64410776", "0.6433588", "0.6390564", "0.63725793", "0.63653785", "0.636...
0.0
-1
Opens a dashboard.handlebars template file and converts it to HTML string. That HTML is eventually sent to the browser as response body.
function renderDashboardView(context) { const viewAbsolutePath = path_1.default.join(__dirname, 'dashboard.handlebars'); const renderView = handlebars_1.default.compile(fs_1.default.readFileSync(viewAbsolutePath, { encoding: 'utf8' })); return renderView(context); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function template(err, data) {\n var self = this\n if(err) { self.emit(\"error\", err) } \n fs.readFile(public_dir + \"template.html\", function(error, html){\n var compiler = handlebars.compile(\"\"+html)\n var out = compiler({ html: data, css_addr: \"mark.css\" })\n self.emit('data', out)\n self.e...
[ "0.6288853", "0.6267345", "0.6067419", "0.59904295", "0.59235334", "0.5897153", "0.58753794", "0.5839718", "0.5826536", "0.5761332", "0.5716463", "0.56784135", "0.5672609", "0.566956", "0.5652096", "0.56487614", "0.5609627", "0.557231", "0.5571531", "0.55635524", "0.55574566"...
0.61082685
2
Creates a div called main and calls functions that populate the index points and nav buttons.
function createCarousel(array) { $("#lecture").append("<div class='main'></div>"); var $el = $("#lecture").children().last(); createIndexPoints(array, $el); createNavButtons($el); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n buildNavbar();\n $(\"body\").append($(\"<div>\").addClass(\"container\").attr(\"id\", \"mainContainer2\"));\n createJumboTron();\n $(\"body\").append($(\"<div>\").addClass(\"container h-100 scrollspy\").attr(\"id\", \"mainContainer\"));\n buildMoviePage();\n\n...
[ "0.72256243", "0.69906545", "0.68970454", "0.6719496", "0.6602695", "0.65078306", "0.64585155", "0.6451817", "0.6415589", "0.63754356", "0.6371141", "0.63513124", "0.6339282", "0.6332398", "0.63227355", "0.6319466", "0.62886137", "0.6217405", "0.62171143", "0.62090605", "0.61...
0.0
-1
Function which updates the indexTracker and active point when advanced. Also updates information presented in the currentInterval div with the object specified by indexTracker.
function nextSlide() { indexTracker++; if (indexTracker >= peopleArray.length) { indexTracker = 0; } allFadeOut(); window.setTimeout(updateIndexPoints,500); allFadeIn(); intervalReset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateIndexPoints() {\n for (var i = 0; i < peopleArray.length; i++) {\n $(\"#index\" + i).removeClass(\"index-point-active\");\n\n if (i == indexTracker) {\n $(\"#index\" + i).addClass(\"index-point-active\");\n }\n updateCurrentStudent(indexTracker);\n }\n}",...
[ "0.6799192", "0.5645764", "0.54940337", "0.5365312", "0.53502405", "0.52654266", "0.523389", "0.5229187", "0.5204928", "0.5199848", "0.51537395", "0.51345116", "0.51167244", "0.50611216", "0.5046517", "0.50425047", "0.50235325", "0.50059026", "0.5004968", "0.49984747", "0.499...
0.5014149
17
Function which updates the indexTracker and active point when reversed. Also updates information presented in the currentInterval div with the object specified by indexTracker.
function prevSlide() { indexTracker--; if (indexTracker < 0) { indexTracker = peopleArray.length - 1; } allFadeOut(); window.setTimeout(updateIndexPoints,500); allFadeIn(); intervalReset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateIndexPoints() {\n for (var i = 0; i < peopleArray.length; i++) {\n $(\"#index\" + i).removeClass(\"index-point-active\");\n\n if (i == indexTracker) {\n $(\"#index\" + i).addClass(\"index-point-active\");\n }\n updateCurrentStudent(indexTracker);\n }\n}",...
[ "0.60106146", "0.5805888", "0.56091857", "0.5463891", "0.54136944", "0.530404", "0.52615464", "0.5259813", "0.5259813", "0.5259813", "0.5259813", "0.52048737", "0.5145475", "0.5111389", "0.51088023", "0.5031033", "0.50182253", "0.5015076", "0.50140274", "0.49731404", "0.49607...
0.5192619
12
Prepends a div to the lecture div that reverses the carousel when clicked and appends a div to the lecture div that advances the carousel when clicked.
function createNavButtons($el) { $el.prepend("<div id='prev' class='nav-button'><span><</span></div>"); $el.append("<div id='next' class='nav-button'><span>></span></div>"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCarousel() {\n carouselInner.innerHTML = \"\";\n carouselInner.appendChild(printCarouselPages(1, posts));\n carouselInner.appendChild(printCarouselPages(2, posts));\n carouselInner.appendChild(printCarouselPages(3, posts));\n // carouselInner.innerHTML += \"<div class='after'></div>\";\n}", "fu...
[ "0.6368043", "0.63013047", "0.62395227", "0.6009137", "0.59725046", "0.59072465", "0.5848232", "0.5838737", "0.5834892", "0.5833549", "0.58267134", "0.5819163", "0.5804016", "0.57809037", "0.57776624", "0.5748551", "0.57414806", "0.57382643", "0.57322556", "0.572804", "0.5719...
0.0
-1
Function which populates a number of index points equivalent to the number of elements in the uploaded object.
function createIndexPoints(array, $el) { for (var i = 0; i < array.length; i++) { $el.append("<div class='index-point' id='index" + i + "'><div class='num'>"+ i +"</div></div>") } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function incrementIndex()\r\n {\r\n //increment index\r\n counter += 1;\r\n // at end of array start over\r\n if (counter >= currentObjects.length)\r\n {\r\n counter = 0;\r\n }\r\n }", "function getSize()\n{\n return this.intIndex;\n}", "function ...
[ "0.6571174", "0.606076", "0.6047616", "0.5943774", "0.573535", "0.5727145", "0.57118875", "0.5702273", "0.5627841", "0.5606544", "0.5590245", "0.55538774", "0.5549468", "0.55443084", "0.5538314", "0.5531697", "0.5518919", "0.5478761", "0.5473712", "0.54685724", "0.5467953", ...
0.5505311
17
Changes the active index point to that index point specified bu the index tracker variable.
function updateIndexPoints() { for (var i = 0; i < peopleArray.length; i++) { $("#index" + i).removeClass("index-point-active"); if (i == indexTracker) { $("#index" + i).addClass("index-point-active"); } updateCurrentStudent(indexTracker); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setActiveIDX(aID){\r\n\tactiveID = aID;\r\n\tformID = aID;\r\n}", "function setIndex(indx) {\n index = indx;\n}", "_setIndex(index) {\n const that = this,\n oldContext = that.context;\n\n that.context = that;\n that.index = index;\n that.context = oldContext;...
[ "0.61006105", "0.6069943", "0.60476303", "0.60372686", "0.5903489", "0.58818036", "0.58424246", "0.57547086", "0.5741396", "0.5694571", "0.56718934", "0.5634732", "0.5594339", "0.5593086", "0.55827314", "0.55529386", "0.55249864", "0.5469685", "0.5433463", "0.5429193", "0.542...
0.62214905
0
This function updates the information in the 'currentStudent' div with that data stored in the object at the 'indexTracker' position of the zeta array.
function updateCurrentStudent(position){ $('#studentName').text(peopleArray[position].name); $('#studentGithub').html("<a href='" + peopleArray[position].github + "'>"+peopleArray[position].github+"</a>"); $('#studentShoutout').text(peopleArray[position].shoutout); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateIndexPoints() {\n for (var i = 0; i < peopleArray.length; i++) {\n $(\"#index\" + i).removeClass(\"index-point-active\");\n\n if (i == indexTracker) {\n $(\"#index\" + i).addClass(\"index-point-active\");\n }\n updateCurrentStudent(indexTracker);\n }\n}",...
[ "0.6850586", "0.652867", "0.6102974", "0.59784716", "0.57988894", "0.5786315", "0.5769829", "0.5768189", "0.57054496", "0.565516", "0.5649071", "0.5626777", "0.5621566", "0.56113183", "0.56080675", "0.5590245", "0.55750674", "0.5559273", "0.5524965", "0.54921967", "0.54683954...
0.7227685
0
Fades out all divs with class 'info'
function allFadeOut(){ $('.info').fadeOut(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allFadeIn(){\n $('.info').fadeIn();\n}", "function fadeStuffs() {\n $(\".hidden\").fadeIn('slow', 'swing').removeClass('hidden');\n }", "function showInfo(arg) {\n\t\treturn arg.find('.info').removeClass('hide');\n\t}", "function hideInfo() {\n $(infoDiv).html(\"\");\n}", "function...
[ "0.77941304", "0.7256567", "0.6394909", "0.63390315", "0.63268656", "0.6305706", "0.6236463", "0.6083341", "0.6031117", "0.5997939", "0.5994377", "0.5989868", "0.59650666", "0.5964113", "0.59520626", "0.5941941", "0.5937082", "0.5905686", "0.59019536", "0.5888188", "0.5882285...
0.8357624
0
Fades in all divs with class 'info'
function allFadeIn(){ $('.info').fadeIn(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allFadeOut(){\n $('.info').fadeOut();\n\n}", "function fadeStuffs() {\n $(\".hidden\").fadeIn('slow', 'swing').removeClass('hidden');\n }", "function addFadeAnimation() {\n document.querySelector(\".info-container\").classList.add(\"fade-in\");\n document.querySelector(\".info-conta...
[ "0.7941707", "0.72886485", "0.65310764", "0.6470117", "0.6372564", "0.63507676", "0.63105553", "0.62840134", "0.62580174", "0.6217649", "0.61645037", "0.61589485", "0.6148279", "0.6094", "0.60704046", "0.6070054", "0.6068985", "0.6065793", "0.60361105", "0.6021457", "0.600128...
0.83964276
0
List are especially useful if we don't have to perforem searches on the items in the list or put them into some type of sorted order. Abstract data type (ADT)
function List() { this.dataStore = []; //initializes an empty arry to store list elements this.listSize = 0; //property: number of elements in a list this.pos = 0; //property: current position in list this.length = length; //property: returns the number of elements in list this.toString = toString; //function...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function List() {\n this.listSize = 0;\n this.pos = 0;\n this.dataStore = [];\n this.clear = clear;\n this.find = find;\n this.toString = toString;\n this.insert = insert;\n this.append = append;\n this.remove = remove;\n this.front = front;\n this.end = end;\n this.prev = prev;\n this.next = next;\n ...
[ "0.6453388", "0.6387026", "0.6376517", "0.62259936", "0.6189958", "0.6189958", "0.6079338", "0.5850736", "0.5678244", "0.56526905", "0.5650872", "0.5637289", "0.5581338", "0.55515784", "0.5513529", "0.55056286", "0.5474338", "0.5474338", "0.5439056", "0.5412546", "0.53967065"...
0.5969052
7
Example 1 var names = new List(); names.append("Cynthia"); names.append("Raymond"); names.append("Barbara"); console.log(names.toString()); names.remove("Raymond"); console.log(names.toString());
function insert(element,after) { var insertPos = this.find(after); if (insertPos > -1) { this.dataStore.splice(insertPos+1,0,element); ++this.listSize; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function list_string(){\n\t//create a list\n\tvar list = new LinkedList();\n\tconsole.log(\"After Initializing\");\n\tlist.toString();\n\t\n\t//Push Test\n\tlist.push(\"There\"); list.push(\"Hello\");\n\tconsole.log(\"After Pushing\");\n\tlist.toString();\n\t\n\t//Append Test\n\tlist.append(\"Friend\"); list.appen...
[ "0.65672284", "0.6482876", "0.636537", "0.63084644", "0.6195601", "0.6130619", "0.6127089", "0.6077958", "0.6056363", "0.60347205", "0.60302985", "0.60072654", "0.5973468", "0.5899766", "0.5886732", "0.5865512", "0.584779", "0.5842671", "0.58147144", "0.57393146", "0.5734484"...
0.0
-1
Grabs the information for create a flash card entry box and turns it into a card then appends it to the collection of FlashCards
function CreateFlashCard(){ console.log('Creating Card') let Card = [] // Array to hold current flascard information // Gets the question for the flashcard let question = document.getElementById("textAreaQuestion").value // Gets the count of how many possible answers were cr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFlashcard() {\n const card = {\n card_front: document.getElementById(\"card_front\").value,\n card_back: document.getElementById(\"card_back\").value,\n deck_id: document.getElementById(\"deck_id\").value,\n category: document.getElementById(\"category\").value,\n }\...
[ "0.74794185", "0.69356513", "0.68586457", "0.6730184", "0.65954274", "0.6584719", "0.6556826", "0.6556826", "0.6550122", "0.65038663", "0.6471434", "0.6459402", "0.62552905", "0.6241155", "0.6196052", "0.6187337", "0.6169869", "0.61676806", "0.6143066", "0.6141244", "0.614123...
0.6837194
3
Clears the entry info in create a flash card
function ClearCard(){ console.log('Clearing Card') // Clears the question textarea let textArea = document.getElementById("textAreaQuestion") textArea.value = "" // Clears each question input let answers = document.querySelectorAll('input[type="text"]') for(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SavedCards() {\r\n this.clearData();\r\n}", "function resetCard() {\n deleteActiveMarker();\n $('.card-spinner').addClass('show').removeClass('hide');\n $('.card-body').addClass('invisible');\n $('.gm-style').find('.card-cc').remove();\n $('#search-searchboxinput').val('');\n $('.card...
[ "0.68543035", "0.6648107", "0.6639955", "0.65191936", "0.6405642", "0.6401155", "0.63994235", "0.62779516", "0.62708", "0.62483484", "0.6231634", "0.6215908", "0.62041825", "0.6190391", "0.6189733", "0.6183213", "0.61598366", "0.61521053", "0.612403", "0.6107972", "0.6078868"...
0.59345126
34
Displays the step the timer page
function SetTimer(){ document.getElementById('timer').style.display = "flex" document.getElementById('CreateFlashCards').style.display = "none" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function start() {\r\n\tgenerateLastStep();\r\n\ttimeout = setTimeout(showSteps, 2000);\r\n}", "display(){\n $('#timer').text(timer.hours + \":\" + timer.minutes + \":\"+ timer.secondes);\n }", "function displayTimer() {\n\tif(sec < 10)\n\t\tsecHTML.innerHTML = '0' + sec;\n\telse\n\t\tsecHTML.innerHT...
[ "0.67106503", "0.67101717", "0.65257555", "0.6479301", "0.64714134", "0.6427533", "0.6423634", "0.6400595", "0.6394881", "0.63922036", "0.6340964", "0.63383925", "0.63016045", "0.6259548", "0.62572205", "0.62562245", "0.6245099", "0.623656", "0.6221287", "0.62056303", "0.6197...
0.0
-1
Set the quiz time
function ConvertQuizTime(){ // Gets the quiz time let quizTime = document.getElementById('quizTime').value // Covert time to milliseconds let minutes = quizTime.split(':')[0] let seconds = quizTime.split(':')[1] let minutesToMilli = minutes * 60000 let seconds...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTimer() {\n time--;\n\n timerEl.textContent = time;\n\n if (time <=0)\n endQuiz()\n }", "function setTime() {\n document.getElementById(\"timer\").innerHTML = countDown + \"secs left\";\n // countDown--;\n if (countDown == -1) {\n clearInterval(quizTime);\...
[ "0.7088449", "0.6848622", "0.672682", "0.6670548", "0.66121393", "0.6571386", "0.65406567", "0.6497734", "0.649521", "0.6493142", "0.648764", "0.6463771", "0.6451763", "0.64107186", "0.6388841", "0.6361547", "0.6341887", "0.6325809", "0.63180506", "0.63061756", "0.6303927", ...
0.5850603
92
START Get all the flashcards and quiz time and start the flashcard learning
function StartQuiz(){ ConvertQuizTime() console.log('Starting Quiz') document.getElementById('timer').style.display = "none" document.getElementById("quizbox").style.display = "flex" // Show the flashcard quiz // Start the quiz countdown StartQuizCountDown()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startQuiz() {\n console.log(\"start\"); \n buildQuestionCard();\n startTimer();\n}", "start() {\n this.reset();\n // are there cards?\n const hasCards = this.getTotal(); \n // if no, then this is the first run, add 15 cards, shuffle and add to set\n if (hasCar...
[ "0.6794858", "0.66527796", "0.6468518", "0.6337589", "0.62924606", "0.62801164", "0.622421", "0.61996967", "0.6196635", "0.6178947", "0.6178937", "0.61759627", "0.6173236", "0.6163914", "0.6145893", "0.6139236", "0.6110353", "0.6105472", "0.6099565", "0.60979384", "0.60953903...
0.6235585
6
Start the quiz countdown Start a timer to let the user know that the quiz will begin in 10 seconds so they are fully prepared
function StartQuizCountDown(){ // Initiate clock at 5 seconds let start = 5 let startID = setInterval(function(){ start = start - 1 setStartCountDown(start) if(start == 0){ clearInterval(startID) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startQuiz() {\n remainingTime = timer;\n $questionTimerText.textContent = remainingTime;\n\n displayQuiz();\n\n quizTimer = setInterval(() => {\n $questionTimerText.textContent = --remainingTime;\n if (remainingTime < 0) {\n endQuiz(true);\n }\n }, 1000);\n}"...
[ "0.8053016", "0.8005825", "0.7944975", "0.7914005", "0.7833364", "0.7831392", "0.78247815", "0.7809332", "0.77464205", "0.77015907", "0.7679153", "0.7662502", "0.7661076", "0.7649502", "0.7647681", "0.76414895", "0.7614556", "0.75838846", "0.7574548", "0.7550084", "0.75457287...
0.7690075
10
Choose block using weighted chance
function ChooseBox(){ let randomBox = chance.weighted(['1', '2','3','4','5'], [50,26,14,7,3]) return randomBox }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "selectBlock(blocks){\n const block = this.getRandomWeight(this.weights[0])\n const check = this.getWeightedVal(this.weights[0], block)\n blocks[check]()\n }", "selectBandit() {\n if (Math.random() > this.epsilon) {\n this.attemptBandit(this.getHighestReward());\n } else {\n this.attempt...
[ "0.7802599", "0.6701355", "0.6546743", "0.65314394", "0.6456781", "0.6340497", "0.6331165", "0.6227585", "0.6227551", "0.6214135", "0.6164277", "0.6096319", "0.6071459", "0.60343045", "0.60252005", "0.60015386", "0.5991528", "0.5980997", "0.5973756", "0.59575814", "0.59310704...
0.68469024
1
Random integer between 1 and array length
function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min + 1) ) + min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomNumber(arrayLength){\n return Math.floor(Math.random() * arrayLength);\n\n }", "function getRandomNum(array) {\n return Math.floor(Math.random() * array.length)\n}", "function getRandomNumber(array) {\n return Math.floor(Math.random() * array.length);\n}", "function getRandNum(array)...
[ "0.85801053", "0.8238106", "0.81105745", "0.8093962", "0.8053006", "0.79930437", "0.79904926", "0.7873399", "0.78151834", "0.7813715", "0.78039676", "0.78039676", "0.77248317", "0.7706113", "0.7706113", "0.7706113", "0.7643922", "0.76280504", "0.7549172", "0.75284714", "0.752...
0.0
-1
Pick a question and start time returns an array [randomQuestion, blockNumber]
function PickQuestion(){ // picks a random block based off weighted numbers let block = ChooseBox() // Get a question from one of the 5 levels of blocks if(blocks[block].length != 0 ){ // Do the rest of the work here console.log('BLOCK NOT 0',blocks[block])...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseQuestion() {\n \n randomQuestion = questionsArray[questionsArrayIndex]; \n\n return randomQuestion;\n}", "function beginFirstQuestion (){\n\n // Set score to 0; Set index to 0\n score = 0;\n index = 0;\n correctAnswerIndex = questions[index].a;\n\n // getQuestion();\n $(\"#score\").t...
[ "0.61325836", "0.60314375", "0.5909662", "0.5864046", "0.58561796", "0.58208406", "0.58117884", "0.5771501", "0.5759381", "0.57476753", "0.56926507", "0.56898785", "0.56898785", "0.5684026", "0.56586176", "0.56483585", "0.5648106", "0.5646441", "0.5634461", "0.5628331", "0.56...
0.6997018
0
Builds the flashcard layout
function BuildCard(CardQuestion,block){ let MainQuestion = CardQuestion[0] // question let PossibleAnswers = CardQuestion[1] // possible answer // Disable and enable the question text area to add the main question document.getElementById('mainQuestion').innerHTML = MainQuestion ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildLayout(){\r\n this.phaseElement.id = \"rid-opacity\";\r\n\r\n this.sidebar.classList.add(\"sidebar\");\r\n \r\n this.turnImage.classList.add(\"player-img\")\r\n \r\n this.turnImageContainer.classList.add(\"player-img-container\");\r\n this.turnImageContainer.ap...
[ "0.6581857", "0.6280391", "0.6116194", "0.5965371", "0.5815336", "0.58033437", "0.58033437", "0.5789004", "0.57439876", "0.5721373", "0.57119757", "0.56961614", "0.5689698", "0.56862885", "0.5666027", "0.5662925", "0.5651545", "0.5647298", "0.564561", "0.56376165", "0.561354"...
0.0
-1
Generates the flashcard info for the quiz
function FillCardInfo(possibleAnswer){ // Create the div box to hold the radio button and answer let divWithRadioButtons = document.createElement('div') divWithRadioButtons.className = "control withRadioButton" divWithRadioButtons.id = "answer_box_" + possibleAnswer.split(' ')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CreateFlashCard(){\n\n console.log('Creating Card')\n let Card = [] // Array to hold current flascard information \n\n // Gets the question for the flashcard \n let question = document.getElementById(\"textAreaQuestion\").value\n\n // Gets the count of how many possible ...
[ "0.6804841", "0.65950876", "0.65001947", "0.640916", "0.63440496", "0.6325163", "0.6285647", "0.62421894", "0.623659", "0.6236178", "0.6235836", "0.6226626", "0.6215974", "0.62142074", "0.6086311", "0.60717773", "0.6024215", "0.60233927", "0.60220927", "0.60220236", "0.602114...
0.634963
4
Takes the users answer input and checks to see if they are correct
function SubmitAnswer(CardQuestion,block){ // See if the user picked the correct answer let correctAnswer = 'radio_button_' + CardQuestion[2].split(" ").join("-") // Gets correct answer let ChooseCorrectly = document.getElementById(correctAnswer).checked // If chose c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAnswer(){\n trueAnswer = returnCorrectAnswer();\n userAnswer = getInput();\n// this if statement is stating if user inputs the right answer what happens and if not what happens\n if(userAnswer === trueAnswer){\n var messageCorrect = array[global_index].messageCorrect;\...
[ "0.79758614", "0.7952405", "0.76519203", "0.75733757", "0.7564621", "0.75550836", "0.7533477", "0.7525357", "0.74787396", "0.74511355", "0.74377686", "0.7433593", "0.7432739", "0.7425698", "0.73956275", "0.73699594", "0.73677737", "0.73529416", "0.7336497", "0.7333649", "0.73...
0.0
-1
Steps to resolve when selecting correct answer
function PickedCorrect(CardQuestion){ // Add 2pts to score score = score + 2 window.alert('You are correct, the answer is '+ CardQuestion[2].toString()); // Find the flashcard in the block and move it up another level and add two points console.log('current block is'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function answerIsIncorrect () {\r\n feedbackForIncorrect();\r\n}", "function answerIsCorrect() {\n correctAnswerFeedback();\n nextQuestion();\n addToScore();\n}", "function answerIsCorrect () {\r\n feedbackForCorrect();\r\n updateScore();\r\n}", "function correctAnswer() {\n return $scope.answer.val...
[ "0.67767817", "0.6632412", "0.6515259", "0.64799005", "0.64304966", "0.64186794", "0.6351454", "0.63320196", "0.6312241", "0.6280251", "0.6278678", "0.62654495", "0.62608564", "0.62543756", "0.6218044", "0.6214488", "0.61835754", "0.6152255", "0.6151416", "0.61484337", "0.613...
0.0
-1
Resets the cards for answers
function ClearQuizCards(){ // Deletes all possible answers and radio buttons function removeAllChildNodes(parent) { while (parent.firstChild) { parent.removeChild(parent.firstChild); } } const container = document.querySelector('#quizAnswe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCards(){\n resetStars();\n selectedCards = [];\n canSelectCard = true;\n shuffleCards(cards);\n displayCards(cards);\n listenForCardFlip();\n}", "function reset() {\n\tstate.questionCounter = 0;\n\tstate.score = 0;\n\tstate.questions = [\n\t\t{\n\t\t\tid: 0,\n\t\t\tpregunta: 'Ets un/a Vilafra...
[ "0.823503", "0.7892642", "0.77560514", "0.77470326", "0.7741995", "0.77387136", "0.76341", "0.7567042", "0.7543321", "0.7527784", "0.74885327", "0.74768984", "0.7476754", "0.74744254", "0.7462099", "0.74492097", "0.74462414", "0.74451315", "0.7443599", "0.7430073", "0.7416761...
0.0
-1
Deletes all possible answers and radio buttons
function removeAllChildNodes(parent) { while (parent.firstChild) { parent.removeChild(parent.firstChild); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ClearExerciceRadio() {\n for (var i = 0; i < questExercices.length; i++) {\n questExercices[i].checked = false;\n }\n}", "function clearAnswers() {\n\temptyArrays();\n\t\n\t$(\"#par\").find(\"span\").css(\"background-color\",\"white\");\n\tjQuery(\".tm-input\").tagsManager('empty');\n\tchangeSelect...
[ "0.7284129", "0.7245476", "0.7219547", "0.7219203", "0.7124099", "0.70652026", "0.7031961", "0.69815475", "0.6967996", "0.6909558", "0.69028217", "0.6852993", "0.6846826", "0.6825193", "0.68021905", "0.6794663", "0.67908496", "0.6789088", "0.67606056", "0.6727283", "0.6700161...
0.0
-1
FUNCTIONS Creiamo una funzione per iterare nell'array e che appenda al container le icone. tip: possiamo usare un ciclo foreach qui e destrutturare gli le proprieta degli elementi di un array tip: il template literal ci puo aiutare con il markup
function print(array,icons){ icons.html(""); array.forEach((element) => { const {family,prefix,name,color}= element; icons.append( ` <div> <i class="${family} ${prefix}${name}"></i> <div class="title">${name}</div> </div> ` ) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderLoop(arr, target) {\n const wrapper = document.createElement('div');\n for (let val of arr) {\n wrapper.appendChild(val.domElem);\n }\n\n this.addToDom(wrapper, target);\n }", "function populateHtml (array){\n //prendo il div che devo popolare\n const cardsContainer = $(\".c...
[ "0.64464283", "0.6249081", "0.62451226", "0.6227921", "0.621461", "0.618706", "0.6159047", "0.6102149", "0.609622", "0.6077826", "0.6073754", "0.6055547", "0.6016475", "0.60129946", "0.60021085", "0.5993968", "0.5992939", "0.5975304", "0.5969557", "0.59682596", "0.59591275", ...
0.5439724
100
TODO: Create a function to write README file
function writeToFile(fileName, data) { fs.writeFileSync(fileName, data, function(error){ if(error) throw error; console.log("file generated"); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeREADME(savefileName, data) {\n fs.writeFile(savefileName, data, () => {});\n \n console.log('Your README has been generated, check the dist folder')\n}", "function writeToFile(data) {\n fs.writeFile(\"./README.md\", generatePage(data), (err) => {\n if (err) throw new Error(err);\n\n conso...
[ "0.8046509", "0.7696626", "0.768839", "0.7663395", "0.7626277", "0.76148146", "0.7602286", "0.7578946", "0.7541147", "0.7540382", "0.75210065", "0.7514193", "0.74550664", "0.742388", "0.74172145", "0.7404131", "0.7388332", "0.7375996", "0.7369353", "0.7357422", "0.73573166", ...
0.0
-1
TODO: Create a function to initialize app
function init() { inquirer.prompt(questions) .then(function(response){ const reply = generateMarkdown(response); console.log(reply); writeToFile("README.md",reply) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initApp() {\n var router = new App.Router();\n var dispatcher = new App.Dispatcher();\n\n router.once('route', function() {\n dispatcher.runAction(router.getCurrent(), router.getParams());\n });\n\n // Start!\n router.startHistory();\n}", "function initApp() {\n\tinitSounds();\n\tinitSensors();...
[ "0.79479647", "0.77002335", "0.7586568", "0.73925894", "0.73391724", "0.73390007", "0.7099471", "0.70958203", "0.70333046", "0.70254284", "0.702292", "0.6990041", "0.69848007", "0.69813603", "0.69411135", "0.6926034", "0.692329", "0.69096684", "0.6873826", "0.68626636", "0.68...
0.0
-1
type computed | watch
function pickDepFns (isBeforeMount, cate, type, depDesc, stateModule, oldState, committedState, cUkey) { const moduleDep = depDesc[stateModule]; // it can be refModuleDep or moduleDep const pickedFns = []; // 针对type module, init-module-state时,已对_computedValueOri赋值了默认cuDesc, // 所以此时可以安全的直接判断非关系,而不用担心 {}对象存在...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ComputedProperty() {}", "run () {\n if (this.active) {\n var value = this.get();\n if (\n value !== this.value ||\n // Deep watchers and watchers on Object/Arrays should fire even\n // when the value is the same, because the value may\n // have mutated.\n ...
[ "0.60049975", "0.5651497", "0.5597279", "0.55902827", "0.55902827", "0.54399", "0.5419434", "0.5419434", "0.5419434", "0.5419434", "0.5419434", "0.5417953", "0.541102", "0.541102", "0.541102", "0.541102", "0.541102", "0.541102", "0.541102", "0.541102", "0.541102", "0.541102...
0.0
-1
map registration info to ccContext
function mapRegInfo(module, ccClassKey, regRenderKeyClasses, classKeyPrefix, regWatchedKeys, regConnect, __checkStartUp, __calledBy) { if (module === void 0) { module = MODULE_DEFAULT; } if (__checkStartUp === true) checkCcStartupOrNot(); const allowNamingDispatcher = __calledBy === 'cc'; con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static onRegister(context){\n\t}", "register(ctx) {\n\t\treturn this.customerLogic.createCustomer(ctx);\n\t}", "function ContextRegister() { // ./common/cpu.js:95\n this.PTEBase = 0; // ./common/cpu.js:96\n this.BadVPN2 = 0; // ./common/cpu.js:97\n // ./common/cpu.js:98\n this.asUInt32 = function() //...
[ "0.54258335", "0.5323748", "0.53105456", "0.5125686", "0.5115191", "0.51027805", "0.5081454", "0.49986997", "0.49886903", "0.49886903", "0.49810937", "0.4963086", "0.49513945", "0.48879474", "0.48872966", "0.48787376", "0.48444146", "0.48352796", "0.48319677", "0.4815517", "0...
0.63595444
0
if you are sure the input state is really belong to global state, call cc.setGlobalState, note! cc will filter the input state to meet global state shape and only pass the filtered state to global module
function setGlobalState (state, cb, renderKey, delay) { const ref = pickOneRef(); ref.ctx.setGlobalState(state, cb, renderKey, delay); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setGlobalState(newState) {\n state = { ...state, ...newState };\n console.log(\"new state:\", state);\n draw();\n}", "resetGlobalState() {\n globalState = {\n ...globalInitialValue,\n };\n }", "function resolve_input(state){\n var copy = copy_inputs();\n state[input_id] = copy[0] ...
[ "0.6086331", "0.5504887", "0.54428935", "0.5327648", "0.5311519", "0.529389", "0.5257912", "0.5250462", "0.5200878", "0.5200878", "0.5192729", "0.51872396", "0.5140175", "0.5115195", "0.51074064", "0.50969845", "0.50901866", "0.5075233", "0.50640684", "0.50566584", "0.5033137...
0.54914844
2
ItemVM needs a reference back to its collection to inform of it being changed
function ItemVM(dto, collectionVM) { if (dto === void 0) { dto = null; } var _this = _super.call(this, dto) || this; _this.exampleItemId = 0; _this.itemString = ko.observable(""); _this.itemInt = ko.observable(0); _this.itemBool = ko.observable(false); _this.examp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "__itemsChanged(e) {\n this.__items = [...e.detail.value];\n }", "updateItem( state, item ){\n // find the local copy\n var staleItem = state.items.find(entry => entry.id == item.id);\n \n\t\t\t\tif( !staleItem ) { // no local object found, create it\n ...
[ "0.65201557", "0.64675856", "0.6421839", "0.63404316", "0.624717", "0.6196633", "0.6144663", "0.6140043", "0.607767", "0.6022441", "0.59616977", "0.596165", "0.596165", "0.58728045", "0.58585924", "0.5825975", "0.5822184", "0.5815412", "0.5781724", "0.5771797", "0.5749598", ...
0.6593296
0
fetch all blogs before rendering
async componentDidMount() { await this.refreshBlog() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function fetchBlogs() {\n try {\n const BlogData = await API.graphql(graphqlOperation(listBlogs))\n const Blog = BlogData.data.listBlogs.items\n SetBlogs(Blog)\n console.log(Blog)\n } catch (err) {\n console.log(...
[ "0.8020958", "0.73913497", "0.7183226", "0.6948828", "0.6940637", "0.69182104", "0.68375933", "0.67914593", "0.6734963", "0.6711803", "0.6710809", "0.666969", "0.65411097", "0.65343344", "0.648796", "0.64700556", "0.6445271", "0.6444366", "0.64443654", "0.64086527", "0.640284...
0.5947034
60
var b = 1; console.log("Result is "+(a+b)); function statement
function greet() { console.log("hi!!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sum(a,b)\r\n{\r\n var res=a+b;\r\n console.log(res)\r\n}", "function add(a, b){\r\nvar c= a+b;\r\nconsole.log(c);\r\n\r\n}", "function add(a, b) {\n let result = a + b;\n console.log(`add result is ${result}`);\n}", "function addition (a, b){\n\tconsole.log(a + b);\n}", "function sum(...
[ "0.8645659", "0.83637273", "0.83334553", "0.82974344", "0.8261841", "0.8167358", "0.8153633", "0.81111324", "0.8087368", "0.80756956", "0.80556375", "0.80288297", "0.8027018", "0.7980744", "0.7980694", "0.797526", "0.7957661", "0.7957661", "0.79448307", "0.79393166", "0.79129...
0.0
-1
bom browser object model
function getBom(){ console.log(screen.Width); //console.log(window.innerWidth);//para ver la anchura de la ventana console.log(window.innerHeight);//para ver la altura de la ventana console.log(window.location.href);//para sacar la localizacion }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function amzn_ps_bm_browser() {\n DOCUMENT = document;\n var interfaceMembers = ['getPlatformConfigs','setPlatformConfigs','addLocalPlatformConfig','init']; // these member function that should be implemented across all browsers\n this.getInterfaceMembers = function(){\n return interfaceMembers;\n ...
[ "0.6509391", "0.5708788", "0.5648835", "0.56481975", "0.5496235", "0.54885024", "0.54885024", "0.5467042", "0.5467042", "0.5467042", "0.5439296", "0.5432228", "0.5391594", "0.537162", "0.5348668", "0.5348668", "0.53195393", "0.5291786", "0.5278566", "0.52772397", "0.52770483"...
0.0
-1
CON ESTE METODO LO QUE PUEDO HACER ES REDIRECCIONAR AL OTRO SITIO
function redirect(url){ window.location.href= url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function principal() {\n choquecuerpo();\n choquepared();\n dibujar();\n movimiento();\n \n if(cabeza.choque (comida)){\n comida.colocar();\n cabeza.meter();\n } \n}", "async function atualizarEstoque(id, tipo) {\r\n const dado = VETORDEITENSESTOQUE.find((element) => elemen...
[ "0.6202226", "0.6127615", "0.6101293", "0.60924745", "0.60893095", "0.6073203", "0.6035088", "0.60112697", "0.59890676", "0.5988224", "0.5984971", "0.59434754", "0.5938113", "0.59179384", "0.59175915", "0.58768016", "0.5871561", "0.5857812", "0.5853441", "0.58422", "0.5826544...
0.0
-1
/ Function to create your custom Google Map
function init() { // Google Map options // For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions var mapOptions = { disableDefaultUI : true, draggable : false, disableDoubleClickZoom : true, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMap() {\t\n\tvar myLatlng = new google.maps.LatLng(0, 0);\n\tvar myOptions = {\n\t\tzoom: 4,\n\t center: myLatlng,\n\t mapTypeId: google.maps.MapTypeId.ROADMAP\n\t}\n \tvar map = new google.maps.Map(document.getElementById(\"map_canvas\"), myOptions);\n\treturn customized(map);\n}", "functi...
[ "0.8046562", "0.7621456", "0.75459903", "0.75362295", "0.74644303", "0.7405838", "0.73655874", "0.736543", "0.7361515", "0.73551995", "0.7335949", "0.7321055", "0.7307956", "0.7301192", "0.72601074", "0.72588617", "0.7248326", "0.72167635", "0.7192427", "0.71667886", "0.71662...
0.0
-1
Only letters single name without spaces: ex: Pavel + trim() func
setPersonName(name) { name = name.trim(); const nameRegex = /^[a-zA-Z]{1,100}$/; if (!name.length || !name || (name.length > 100)) { throw new Error('Invalid name length'); } if (name.match(nameRegex)) { return name; } throw new Error('Name includes symbols that are not all...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanName(name){\n\tvar low_name = name.toLowerCase();\n\tvar clean_name = low_name.replace(' ', '');\n\tvar trim_name = clean_name.trim();\n\treturn clean_name;\n}", "function filterName(name) {\n return name.toLowerCase().replace(/ /g, '');\n}", "function trimName(name) {\r\n\t\t\treturn name;\r\...
[ "0.81388414", "0.79748476", "0.7346243", "0.7022069", "0.699297", "0.69760877", "0.6963007", "0.6935452", "0.6928705", "0.69055164", "0.6905005", "0.68804836", "0.6876262", "0.68631935", "0.68629044", "0.6850387", "0.6850387", "0.6849138", "0.6839972", "0.68355626", "0.681734...
0.6486536
57
Only letters multi word with spaces: ex: Ticket Not Started + trim() func Labels, Roles, Statuses
setParam(param) { param = param.trim(); const alphaRegex = /^[a-zA-Z ]+$/; if (!param.length || !param || (param.length > 100)) { throw new Error('Parameter name is not valid'); } if (param.match(alphaRegex)) { return param; } throw new Error('Please include only valid symb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanspace(str){return str.replace(/[^\\w\\s]/gi, ' '); }", "function filterSpace(test){\n\treturn test != \"\";\n}", "function onlyOneWord (arr)\n{\n\nvar output = arr.filter (m => !(m.includes(\" \") ))\n\n return output\n}", "function trimfield(str) \r\n{ \r\n return str.replace(/^\\s+|\\s+$...
[ "0.6596824", "0.628946", "0.62705576", "0.6200639", "0.6188363", "0.6177141", "0.61547077", "0.61177385", "0.6096438", "0.60700697", "0.6057131", "0.60545516", "0.60164744", "0.6015772", "0.60018677", "0.59840894", "0.5975424", "0.59512067", "0.5949098", "0.5940733", "0.59325...
0.0
-1
Include everything but check length: ex: njd123[},?/!23 ^% + trim() func
setDescription(description) { description = description.trim(); if (!description.length || !description || (description.length > 8000) ) { throw new Error('Description is of invalid length'); } return description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clean( w ){\n\treturn w.replace(/[^\\d\\w\\s,().\\?\\/\\\\n\\\\t{}<>=\\\"\\\":%-]/gi, '') // remove special chars\n\t\t\t.replace(/\\s+/g, \" \") // remove extra spaces\n\t\t\t.trim(); // remove trailing chars\n}", "_trim(s) { return (s.charAt(0) == '#') ? s.substring(1, 7) : s }", "function validate...
[ "0.5980339", "0.59762436", "0.5933642", "0.58959717", "0.5857597", "0.5828739", "0.5790755", "0.5790755", "0.5771178", "0.5741842", "0.5739822", "0.571909", "0.571909", "0.571909", "0.5717605", "0.57073337", "0.570187", "0.5699401", "0.56992835", "0.5696418", "0.5690423", "...
0.0
-1
url for photoes: ex: + trim() func
setPhoto(photo) { photo = photo.trim(); const urlRegex = `/(ftp|http|https):\/\/(\w+:{0,1} \w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/`; if (!photo.length || !photo) { throw new Error('The cover image is not correct'); } if (photo.match(urlRegex)) { return photo; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUrlPic(picture) { return \"url(\"+picture+\")\"; }", "function getUrlPic(picture) { return \"url(\"+host+picture+\")\"; }", "function getUrlPic(picture) { return \"url(\"+host+picture+\")\"; }", "placeholderArtwork(url) {\n if(!url) return \"http://placehold.it/100x100\";\n\n // const regx ...
[ "0.72466224", "0.69033444", "0.69033444", "0.6569581", "0.6400202", "0.6357156", "0.62709385", "0.62548274", "0.62399524", "0.6217509", "0.61766833", "0.6105429", "0.60943", "0.60753524", "0.6069626", "0.6024845", "0.6000083", "0.5986476", "0.59649634", "0.5947992", "0.593295...
0.61024916
12
naming different sections,models,topic etc: ex: whatever + trim() func
setTitles(titles) { const titlesRegex = /^[a-zA-Z0-9]+([-_\.][a-zA-Z0-9]+)*[a-zA-Z0-9]$/; titles = titles.trim(); if (!titles.length || !titles || (titles.length <= 3) || (titles.length > 30)) { throw new Error('Invalid titles length'); } if (titles.match(titlesRegex)) { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanName(){\n\n}", "function stripFieldsContaining(topic, fieldName) {\n var newProps = new Array();\n for (var it=0; it < topic.properties.length; it++) {\n // resultHandler.append('<tr><td>'+topic.properties[i].label+'</td><td>'+topic.properties[i].value+'</td></tr>');\n if (topic.pro...
[ "0.5353515", "0.5258415", "0.5250364", "0.5228935", "0.51611906", "0.515562", "0.5093588", "0.5043517", "0.5008176", "0.49816", "0.49212888", "0.49121884", "0.48839945", "0.4861624", "0.48502392", "0.48368424", "0.48283374", "0.4827597", "0.48195377", "0.4816966", "0.4809513"...
0.0
-1
setting passwords or titles allowing many symbols: ex: whatever (max: 32)
setPassword(password) { const passwordRegex = `^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,32}$`; if (!password.length || !password || password.length > 32 || password.length < 6) { throw new Error('Invalid password length!'); } // delete return below to enable regex validations return pas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writePassword(len, upper,lower,num, sym) {\n \n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n // var char = upperCase + lowerCase + Numbers + Symbols;\n // var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN...
[ "0.6886876", "0.668547", "0.6621488", "0.66041183", "0.6597313", "0.654126", "0.65229154", "0.6428567", "0.64155465", "0.64060175", "0.64036983", "0.6387474", "0.63474315", "0.6344222", "0.6330458", "0.63271695", "0.6325554", "0.6302527", "0.62594014", "0.62437314", "0.623051...
0.0
-1
adds 5 minutes of focusTime & playTime up to 60 minutes
function addFocus() { setFocusTime(prevTime => prevTime < 60 ? prevTime + 5 : prevTime); setPlayTime(prevTime => prevTime < 3600 ? prevTime + 300 : prevTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reduceFocus() {\n setFocusTime(prevTime => prevTime > 5 ? prevTime - 5 : prevTime);\n setPlayTime(prevTime => prevTime > 300 ? prevTime - 300 : prevTime);\n }", "function adjustTimers() {\n\tgameTime += 10;\n\tquestionTime += 10;\n}", "function focus25min() {\n\tvar minutes = 25;\n\n\t// how ma...
[ "0.6803891", "0.6688666", "0.6476613", "0.6419792", "0.6412445", "0.6297171", "0.6282679", "0.6272967", "0.6254446", "0.6248658", "0.6212295", "0.6172621", "0.6169862", "0.6167546", "0.61367553", "0.6104736", "0.6058839", "0.6057783", "0.60442895", "0.60338897", "0.6032884", ...
0.7071186
0
reduces 5 minutes of focusTime & playTime down to 5 minutes
function reduceFocus() { setFocusTime(prevTime => prevTime > 5 ? prevTime - 5 : prevTime); setPlayTime(prevTime => prevTime > 300 ? prevTime - 300 : prevTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addFocus() {\n setFocusTime(prevTime => prevTime < 60 ? prevTime + 5 : prevTime);\n setPlayTime(prevTime => prevTime < 3600 ? prevTime + 300 : prevTime);\n }", "function timeReduce () {\n var soundSource = 'http://soundbible.com/grab.php?id=187&type=mp3';\n var soundAlert = new Audi...
[ "0.6735059", "0.65000844", "0.63381815", "0.63372725", "0.6296363", "0.6190894", "0.6116192", "0.6112667", "0.6109652", "0.60997564", "0.6094498", "0.60878474", "0.6068134", "0.60602593", "0.6054197", "0.6050007", "0.60195386", "0.6018162", "0.599471", "0.5968529", "0.5949304...
0.78134626
0
adds 1 minute to break time up to 15 minutes
function addBreak() { setBreakTime(prevTime => prevTime < 15 ? prevTime + 1 : prevTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EDIT_LAST15MINUTES(s) {\n const date = new Date();\n s.dateTimeStart = interval(date, 15);\n s.dateTimeEnd = date;\n }", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", ...
[ "0.6898866", "0.6775922", "0.6775922", "0.6775922", "0.6775922", "0.6775922", "0.6775922", "0.6775922", "0.66393334", "0.66317767", "0.6528563", "0.6431617", "0.6397053", "0.6310344", "0.6292401", "0.62883574", "0.61981994", "0.6146911", "0.6042866", "0.6024929", "0.6007757",...
0.6958538
0
reduces 1 minute of break time down to 1 minute
function reduceBreak() { setBreakTime(prevTime => prevTime > 1 ? prevTime - 1 : prevTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes() {}", "function turnHoursToMinutes(duration) {}", "fun...
[ "0.6671871", "0.6671871", "0.6671871", "0.6671871", "0.6671871", "0.6671871", "0.6671871", "0.637936", "0.63315856", "0.631358", "0.62690586", "0.60757244", "0.6065412", "0.6063418", "0.6052187", "0.6020811", "0.59970284", "0.5994579", "0.5978296", "0.5944225", "0.59422165", ...
0.6621965
7
sets timer on or off when play/pause button is pressed and starts session (displays countdown)
function playPause() { setSession(true); setIsTimerRunning((prevState) => !prevState); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startSession () {\n pausedTime = 0;\n secondsPassed = 0;\n timerId = intervalTrigger()\n start = new moment()\n startDate = start._d\n enablePause();\n enableEnd();\n}", "function startTimer() {\n minutes = times.sessionMinutes;\n seconds = minutes * 60;\n document.getElementById('top-la...
[ "0.75864786", "0.74457407", "0.7366484", "0.73247045", "0.7305316", "0.72464174", "0.71844435", "0.7141914", "0.7114717", "0.71023697", "0.70949", "0.70881456", "0.7028527", "0.7009516", "0.69979256", "0.68982404", "0.6886621", "0.6873368", "0.6864893", "0.6853563", "0.683341...
0.7622086
0
stops the session and timer, resets playTime to last selected focusTime, and resets to focus mode for next start
function stopSession() { setSession(false); setIsTimerRunning(false); setIsFocused(true); // resets session to focus mode if stopped during a break setPlayTime(focusTime * 60); // resets playTime in seconds setProgress(0); // resets progress bar }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stop() {\n\t\tclearInterval(timer);\n\t\tdocument.getElementById(\"display\").innerHTML = \"\";\n\t\t// go back to beginning so it doesn't function as a pause button\n\t\tframeIndex = 0;\n\t\tswitchEnabled();\n\t}", "function stop() {\n clearInterval(timerId);\n timerId = undefined;\n pau...
[ "0.70124143", "0.69486403", "0.69243354", "0.6905735", "0.68570626", "0.6849429", "0.6808442", "0.679484", "0.6739792", "0.6734468", "0.67265075", "0.6720654", "0.6714687", "0.6689002", "0.66632843", "0.66624624", "0.65995514", "0.6592013", "0.659121", "0.6588283", "0.6577351...
0.8119731
0
functions that are invoked every second // Decrements pomodoro time by 1 second when the timer is running
function decrementTime() { if (playTime >= 1) setPlayTime(prevState => prevState - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onTimer(){\r\n\tif (turn == OPPONENT) return;\r\n\tupdate_handler({time:timer});\r\n\ttimer--;\r\n\tif (timer < 0){\r\n\t\tmissStep();\r\n }\r\n}", "function pomodoro() {\n pending = true;\n pauseTimer();\n resetTimerHelper();\n document.getElementById('timer').innerText = \"25:00\";\n}"...
[ "0.76496226", "0.74562573", "0.7373638", "0.7234621", "0.71534455", "0.71202487", "0.71067846", "0.7102558", "0.7077288", "0.7044092", "0.70365787", "0.70355713", "0.7030453", "0.701067", "0.69969666", "0.6993479", "0.6992841", "0.6920356", "0.6876289", "0.6862291", "0.685808...
0.0
-1
switches between focus and break mode when time runs out and plays bell
function switchModes() { if (playTime < 1) { new Audio(`https://bigsoundbank.com/UPLOAD/mp3/1482.mp3`).play(); setPlayTime(isFocused ? breakTime * 60 : focusTime * 60); setIsFocused((current) => !current); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForFocusState(){\r\n player.focusState=!document.hidden;\r\n const kkeke = setTimeout(checkForFocusState,50);\r\n}", "function reduceFocus() {\n setFocusTime(prevTime => prevTime > 5 ? prevTime - 5 : prevTime);\n setPlayTime(prevTime => prevTime > 300 ? prevTime - 300 : prevTime);\n }"...
[ "0.6750659", "0.66651404", "0.65784055", "0.65463847", "0.64982045", "0.64682156", "0.64551353", "0.6454736", "0.6424968", "0.64129823", "0.6352386", "0.6341286", "0.6308789", "0.6293364", "0.6262262", "0.62473595", "0.62132233", "0.6205394", "0.61859137", "0.61782736", "0.61...
0.7025735
0
increases progress bar completion proportionally based on selected focus or break time
function increaseProgress() { if (playTime < 1) return setProgress(0); if (isFocused) return setProgress(prevState => prevState + 1/(focusTime*60) * 100); if (!isFocused) return setProgress(prevState => prevState + 1/(breakTime*60) * 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateCompletion() {\r\n $(\"#stepNo\").html(step);\r\n var percentCompleted = Math.round((step - 1) / (maxStep - 1) * 100 / 5) * 5;\r\n if (percentCompleted == 0) {\r\n percentCompleted += 5;\r\n }\r\n $(\"#percentCompleted\").html(percentCompleted);\r\n $(\"#percentMeter\").c...
[ "0.6905064", "0.66760105", "0.66678363", "0.6538795", "0.6523645", "0.6523355", "0.6515938", "0.647952", "0.6459697", "0.64281803", "0.63897073", "0.6368806", "0.63585865", "0.635729", "0.6355244", "0.633501", "0.6331397", "0.6319985", "0.631773", "0.63145995", "0.63117296", ...
0.7329298
0
bind event handlers to modal triggers
function getModal(name_of_modal,link) { $('body').on('click', link, function(e){ e.preventDefault(); $(name_of_modal).modal().open(); }); // attach modal close handler $('.modal .close').on('click', function(e){ e.preventDefault(); $.modal().close(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindEvents () {\n var Modal = $('#modalEditTrack');\n\n // EDIT Track in Modal Window\n $('body').delegate('.btn-edit', 'click', function (e) {\n var trackId = $(e.currentTarget).data('id');\n // console.log('trackId =', trackId);\n loadTrackData(trackId);\n });\n\n // SAVE...
[ "0.7607788", "0.7542653", "0.7285421", "0.70171994", "0.6989761", "0.6970103", "0.68705446", "0.68343437", "0.6749048", "0.67204946", "0.66925406", "0.6676113", "0.6634209", "0.6631942", "0.6607952", "0.6581969", "0.65505433", "0.64919865", "0.6486651", "0.6464359", "0.646359...
0.0
-1
Maintain a list of tracks, and rerender them whenever either their size changes or the zoom level changes Zooming changes the domain of the scales. Resizing changes the range. Both trigger a rerender.
constructor(props) { super(props); this.dragging = false; // is this element being dragged? this.element = null; this.closing = false; this.yPositionOffset = 0; this.xPositionOffset = 0; this.scrollTimeout = null; this.activeTransitions = 0; this.zoomTransform = zoomIdentity; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeTracks() {\n // keeps track of the new Tracks to be rendered\n let newTrackList = [];\n // keeps track of the indexes of the Tracks to update our global currentTracks rendered\n let newTrackIndexes = [];\n\n for (let i = 1; i < this.totalTracks; i++) {\n // Check...
[ "0.6022866", "0.5869167", "0.5863946", "0.5803292", "0.5683169", "0.5682739", "0.5679343", "0.5634319", "0.56122255", "0.5545093", "0.553338", "0.54882324", "0.5447375", "0.54288584", "0.539972", "0.5380496", "0.5380496", "0.5380496", "0.5377827", "0.535754", "0.534874", "0...
0.57572585
4
this can definitely be simplified.
function diff(x, y){ var valueDiff = Math.abs(userArr[x]-answerArr[y]); compatibility.push(valueDiff); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "static transient final priv...
[ "0.6483835", "0.62797475", "0.6215517", "0.60395396", "0.60384667", "0.59340614", "0.59107226", "0.58482814", "0.583041", "0.5765851", "0.5672051", "0.56633234", "0.54998076", "0.5487992", "0.5476337", "0.54643583", "0.5433059", "0.54289544", "0.5311704", "0.52908987", "0.524...
0.0
-1
actions render the mustache template
function render(data) { // https://github.com/janl/mustache.js#usage $target.html(Mustache.render(template, data)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayTemplate(){\n\t//var glueFrame = Mustache.render(tplContent,data);// alternative version with just one template\n\tvar glueFrame = Mustache.render(tplFrame,data,partials);//ADD for template\n\ttarget.html(glueFrame);// ADD for template\n}", "function renderActions() {\n $('.schedule-page__...
[ "0.672636", "0.66842866", "0.66831195", "0.66831195", "0.6663603", "0.6520771", "0.6496457", "0.6496457", "0.6496457", "0.6491011", "0.6342293", "0.62657547", "0.62256616", "0.60839486", "0.59938926", "0.5959713", "0.59556913", "0.5928205", "0.58960074", "0.5891083", "0.57990...
0.6118954
13
convert a string in to an array
function _stringToArr(str) { let arr = str.split(','); arr = jQuery.grep(arr, newArr => { return newArr !== ''; }); return arr; // NOTE Remember to convert the array in to a string with `arr.toString()` // before storing the data back in the database. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arr(str){\r\n return Array.from(str);\r\n}", "function string_to_array(input) {\n return input.trim().split(/\\s+/);\n}", "function string_to_array (str) {\n var arr = [];\n var res = str.split(' ');\n arr.push(res);\n return arr;\n }", "function string_to_array(str) {\n retu...
[ "0.79824156", "0.79606205", "0.7884775", "0.78385717", "0.7809517", "0.76434207", "0.7605214", "0.7578102", "0.749832", "0.7463005", "0.73547244", "0.7344586", "0.733689", "0.7282745", "0.7274829", "0.72301614", "0.72023284", "0.7188449", "0.7159328", "0.7144683", "0.7130795"...
0.7134302
20
toggle the special janitor mode
function _keyMode(data) { if (data.key === 'false' && data.targetQueue === '') { data.key = 'true'; call.hideCall(); model.putJson(data); } else { data.key = 'false'; call.displayCall(); model.putJson(data); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleTmiMode() {\n tmiModeExpanded = !tmiModeExpanded;\n\n $('collapse').style.display =\n tmiModeExpanded ? 'inline' : 'none';\n $('expand').style.display =\n tmiModeExpanded ? 'none' : 'inline';\n\n document.body.className =\n tmiModeExpanded ? 'show-tmi-mode' : 'hide-tmi-mode';\n\n ...
[ "0.60242695", "0.59101284", "0.57692695", "0.5751065", "0.5750617", "0.5687548", "0.56595725", "0.55570304", "0.55570304", "0.55454415", "0.55132425", "0.5500097", "0.5499134", "0.5498483", "0.54967636", "0.549656", "0.549656", "0.549656", "0.5476932", "0.54538286", "0.542243...
0.0
-1
Compare `currentFloor` with the array and get the closest floor. Here is where the route of the elevator is optimized.
function _sortFloorQueue(queue, currentFloor) { if (queue.length !== 0) { let closest = queue.reduce((prev, curr) => { return (Math.abs(curr - currentFloor) < Math.abs(prev - currentFloor) ? curr : prev); }); queue.splice(queue.indexOf(closest), 1); queue.splice(0, 0, closest); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLowestFloorForElevator(elevator) {\n return bottomFloor;\n }", "function findTheBestElevator(elevators,floor)\n {\n var elevArr = elevators.map(function(elev){ \n return {elev:elev, distance:Math.abs(elev.currentFloor()-floor.floorNum())+elev.destina...
[ "0.69810313", "0.69535685", "0.6775115", "0.65889245", "0.65600955", "0.64808315", "0.64300776", "0.61789066", "0.6121956", "0.6027962", "0.5775664", "0.5753486", "0.57493275", "0.56604385", "0.5649611", "0.56483626", "0.56166065", "0.55530417", "0.55328715", "0.5526629", "0....
0.62424386
7
move the elevator from one floor to another
function moveElevator(data) { console.log('%c `moveElevator()` ', 'background: #222; color: #bada55'); let queue = _stringToArr(data.targetQueue); // queue.length === 0 ? queue : queue = _sortFloorQueue(queue, data.currentFloor); queue = _sortFloorQueue(queue, data.currentFloor); // the elevator ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callElevator(f) {\r\n console.log('Elevator called from floor ' + f)\r\n//st is the state, I is idle, D is down, U is up\r\n if (a.st == 'I' && b.st == 'I') {\r\n//f is floor that has been called, cf is current floor, da/db distance from the floor to the destination, ce is which elevator is going\r\...
[ "0.7041121", "0.6787582", "0.67811745", "0.6715662", "0.67001957", "0.64972067", "0.6328538", "0.6300275", "0.62201905", "0.6162167", "0.6123021", "0.607982", "0.60584176", "0.6046662", "0.59953046", "0.5991482", "0.5976575", "0.5936341", "0.5930621", "0.5924225", "0.5890514"...
0.7322981
0
This creates a table view of all employees in order by id ===========================================================
function viewAllEmployees(promptUser) { connection.query(`SELECT emp.id, emp.first_name, emp.last_name, role.title, department.name AS department, role.salary, concat(mng.first_name,' ',mng.last_name) as manager FROM employee emp LEFT JOIN role ON emp.role_id = role.id LEFT JOIN department ON role.department_id = d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "viewAllEmployees() {\n\t\treturn this.connection.query(\n\t\t\t`\n SELECT\n e1.id AS ID,\n e1.first_name AS First_Name,\n e1.last_name AS Last_Name,\n role.title AS Role,\n department.name AS Department,\n CONCAT(e...
[ "0.7254256", "0.71534604", "0.71528983", "0.70049715", "0.6975287", "0.6933073", "0.6861214", "0.6859459", "0.6839456", "0.6830745", "0.68199706", "0.6800683", "0.6798703", "0.6786966", "0.67819375", "0.67732", "0.67692155", "0.6752748", "0.6738438", "0.66880894", "0.667543",...
0.64470637
37
function for toggle the image
function ripOnload(toggleObj, thisObj) { onAnchorToggle(toggleObj); ripDirectionTypeCheck('tf1_ripDirection1'); var imgId=thisObj.id; switch(imgId){ case 'tf1_ripAuthentication': enableTextFieldByAnchorClick('tf1_ripAuthentication','tf1_ripAuthentication tf1_ripFirstMd5KeyId tf1_ripFirstMd5Aut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "asdftoggle(img){\n this.currimg = img.image;\n this.asdfdialog = !this.asdfdialog;\n }", "function toggleImage(image) {\n if(isToggleOn) {\n drawImage(EMOJIS[emojiIndex][IMAGE_INDEX]);\n }\n else {\n g.clear();\n }\n isToggleOn = !isToggleOn;\n}", "function imgToggler() ...
[ "0.78718174", "0.7679665", "0.7656906", "0.7609137", "0.7508932", "0.7498366", "0.7409481", "0.72815704", "0.709278", "0.70884746", "0.7056952", "0.7046101", "0.7007066", "0.6979472", "0.6885685", "0.6847169", "0.6843804", "0.6831347", "0.6823994", "0.6806296", "0.6799027", ...
0.0
-1
function for validate form when user clicks on submit button OnSubmit event
function ripValidate() { var txtFieldIdArr = new Array(); txtFieldIdArr[0] = "tf1_ripFirstMd5KeyId, "+LANG_LOCALE['12056']; txtFieldIdArr[1] = "tf1_ripFirstMd5AuthKey, "+LANG_LOCALE['12169']; txtFieldIdArr[2] = "tf1_dateTimePickerFirstStartValue, "+LANG_LOCALE['11978']; txtFieldIdArr[3] = "tf1_dateTimePi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateOnSubmit(e) {\n // validate the entire form\n return this.runValidation(false);\n }", "function validateForm() {\n return true;\n}", "function validateForm()\n{\n return true;\n}", "function validateForm()\n{\n return true;\n}", "function validateAndSubmit() {\r\n v...
[ "0.8055706", "0.7655723", "0.7578975", "0.7578975", "0.74958545", "0.74596155", "0.7420257", "0.73991257", "0.7387497", "0.7381894", "0.7345624", "0.7293216", "0.7280517", "0.72784925", "0.7266556", "0.72187436", "0.72154486", "0.7209912", "0.72004956", "0.7176825", "0.715748...
0.0
-1
function for changing the Direction and Version settings of radio buttons and select box Onclick event and onchange event
function ripDirectionTypeCheck(radioName) { var selecteDir = radioCheckedValueGet(radioName); var selectedVer = comboSelectedValueGet('tf1_ripVersion'); if (selectedVer && selecteDir) { if ((!isNaN(selecteDir) && parseInt(selecteDir, 10) == 0) || (!isNaN(selectedVer) && parseInt(selectedVer, 10) == 0) || (!isNaN(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function optionChanged(){\n init();\n}", "function initialize_device_picker(){\n $('.pooltool_grid_item_modifier_class').on('vclick', function(ev){\n ev.preventDefault();\n if(ev.currentTarget.nextElementSibling && ev.currentTarget.nextElementSibling.className === \"radiobutton_griditem\"){\n ...
[ "0.65791136", "0.6555195", "0.65361977", "0.64075", "0.6392647", "0.63348645", "0.6242486", "0.6221868", "0.61698794", "0.6142061", "0.6126512", "0.60753614", "0.60250944", "0.6011728", "0.59999603", "0.59940726", "0.59939003", "0.5973911", "0.5966993", "0.59604675", "0.59564...
0.0
-1
function for enable or disble text boxs while clicking on checkbox image buttons Onclick event
function authEnable() { var enableObj = document.getElementById('tf1_ripAuthentication'); if (!enableObj || enableObj.disabled) return; var imgObj = document.getElementById('tf1_ripAuthentication').className; var imageName = imgObj.substring(imgObj.lastIndexOf('/') + 1); if (imageName == ON_ANCHOR) { fieldSta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkboxEnable(){\n $('#checkbox1').show(\"slide\", { direction: \"up\" }, 500);\n $('#step_2').prop('disabled', false);\n $('#step_2').removeClass('bg-disable');\n $('#bg-legend_2').removeClass('bg-legend');\n addClickableClass();\n}", "function enableDisableFieldsByImageClick(data, this...
[ "0.6636205", "0.66132516", "0.6528831", "0.64900494", "0.64761126", "0.641448", "0.6414143", "0.6412922", "0.6391171", "0.6323664", "0.63001865", "0.6291497", "0.6279355", "0.6261522", "0.6260512", "0.6244276", "0.6237145", "0.6225637", "0.622365", "0.6220055", "0.6193403", ...
0.0
-1
Return a random number from min (inclusive) to max (exclusive)
function getRandomNumber(min, max) { return min + Math.random() * (max - min); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomIntEx(min, max) {//max not inclusive\r\n return Math.floor(Math.random() * (max - min)) + min;\r\n}", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function randInt(min, max) { return Math.random() * (max - min) + min; }", "function getRndInteger(min, max) ...
[ "0.87401855", "0.86139107", "0.86139107", "0.8597439", "0.8596633", "0.8594545", "0.85897577", "0.85897386", "0.8578997", "0.8572918", "0.8572643", "0.85697865", "0.8556537", "0.85518616", "0.854917", "0.85413885", "0.85397786", "0.8537909", "0.8534723", "0.8534723", "0.85299...
0.8523964
22
Return a random colour code
function getRandomColour() { var hex = "0123456789ABCDEF"; var colourCode = "#"; for (var i = 0; i < 6; i++) { colourCode += hex.charAt(Math.floor(getRandomNumber(0, 16))); } return colourCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randColor() {\n return Math.floor(Math.random() * 256);\n}", "function randColor()\n {\n return '#'+ Math.floor(Math.random()*16777215).toString(16);\n }", "function randomColor () {\nreturn Math.floor (Math.random() * 256) ;\n}", "function gencolor() {\n len = _COLOR....
[ "0.8738735", "0.86419004", "0.86134064", "0.85675025", "0.8550608", "0.851986", "0.85191274", "0.85074985", "0.8503299", "0.8496951", "0.8484525", "0.8481434", "0.8471049", "0.84593135", "0.8450522", "0.8435886", "0.8429412", "0.84219384", "0.8419832", "0.841948", "0.8410743"...
0.83737624
30
Show the shape with a random timeout of up to 2000 ms
function showShapeTimed() { setTimeout(showShape, getRandomNumber(0, 2000)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appearAfterDelay()\n{\nsetTimeout(makeShapeAppear,Math.random()*2000); \n}", "function delayFigure() {\n\t\t\t\tsetTimeout(showFigure, Math.random() * 2000);\n\t\t\t\t\n\t\t\t}", "function makeCircle() {\n setTimeout(function () {\n\n box.style.backgroundColor = getRandomColor();\n bo...
[ "0.7754644", "0.73688376", "0.7120159", "0.70542026", "0.6985883", "0.6930278", "0.67624736", "0.6648887", "0.6470659", "0.64419824", "0.6387167", "0.633033", "0.6280923", "0.6280923", "0.62410885", "0.6216354", "0.62145877", "0.6174666", "0.6103215", "0.60983026", "0.6091075...
0.8743899
0
Return current time in milliseconds
function getTime() { return new Date().getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function time() {\n return (Date.now() / 1000);\n }", "function currentTime() {\n return Math.round(Date.now() / 1000);\n}", "function currentTime() {\n return Math.round(Date.now() / 1000);\n}", "function time() {\n\treturn Date.now() / 1000.0;\n}", "function nowMs()\r\n {\r\n return new D...
[ "0.828142", "0.8273646", "0.8273646", "0.8151369", "0.8067987", "0.80141664", "0.8003772", "0.79575783", "0.79549676", "0.7924127", "0.77979535", "0.779381", "0.77894413", "0.76725906", "0.76322335", "0.7631676", "0.7631228", "0.76239294", "0.7618397", "0.7584961", "0.755405"...
0.0
-1
Event handler for shape.onclick event
function onShapeClicked() { t2 = getTime(); hideShape(); updateTimer(t1, t2); showShapeTimed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickShape() {\n\tidName('shape-layer').style.pointerEvents = 'auto';\n\tclassName('upper-canvas')[0].style.pointerEvents = 'auto';\n\tidName('paint-layer').style.pointerEvents = 'none';\n}", "function shape_click(map_id, shapeObject, shape_id, shapeInfo) {\n\n //'use strict';\n if (!HTMLWidgets.shi...
[ "0.77722865", "0.74252754", "0.71561366", "0.7138478", "0.7125821", "0.7085151", "0.70276767", "0.6978059", "0.6970891", "0.6760562", "0.67538154", "0.67262536", "0.66659087", "0.6619553", "0.66139245", "0.65845245", "0.6583739", "0.6485171", "0.64691585", "0.64652014", "0.64...
0.63171124
23
creating a function normally
function myHobies(){ console.log("My hobies are Singing, listening to music and travelling"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makefunc(x) {\r\n// return function() { return x; }\r\n// return new Function($direct_func_xxx$);\r\n return new Function(\"return x;\")\r\n}", "function miFuncion (){}", "function normal() {}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function crea...
[ "0.70143646", "0.6717005", "0.67009395", "0.6642064", "0.6642064", "0.6642064", "0.6607823", "0.6465027", "0.64520264", "0.6451895", "0.6440575", "0.63760227", "0.6314516", "0.6297753", "0.62925136", "0.62804693", "0.62585324", "0.62585324", "0.62585324", "0.62585324", "0.625...
0.0
-1
with anonomous funtion within it inner and outer functions
function outer(){ inner =function(){ console.log("HYf classes are on Sundays from 12:00 - 16:00 ")}; return inner; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function outer() {\n inner();\n}", "function outer2() {\n \n\n let inner2 = () => {\n \n };\n\n \n}", "function outerFn() {\n var data \"something from outer\";\n return function innerFn() {\n var innerData = \"something from inner\";\n return data + \" \" + innerData;\...
[ "0.6635069", "0.6486641", "0.64001745", "0.6325281", "0.62783587", "0.616327", "0.6103467", "0.60977393", "0.60823256", "0.60563207", "0.6051567", "0.6038512", "0.6019302", "0.6011767", "0.6011545", "0.5974418", "0.5959098", "0.5941936", "0.5910261", "0.5900285", "0.5884447",...
0.61219466
6
Determine the full path to the app's xcode project file.
function findXCodeproject(context, callback) { fs.readdir(iosFolder(context), function(err, data) { var projectFolder; var projectName; // Find the project folder by looking for *.xcodeproj if (data && data.length) { data.forEach(function(folder) { if (folder.match(/\.xcodeproj$/)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrentFileOrDefault() {\n var pFile = LaunchBar.executeAppleScript('if application \"TaskPaper\" is running then',\n 'tell application id (id of application \"TaskPaper\")',\n ' set a to file of the front document',\n ' return POSIX path of a',\n 'end tell',\n ...
[ "0.6790908", "0.67188025", "0.6675877", "0.64041394", "0.63718736", "0.6335384", "0.6239425", "0.6225519", "0.6076278", "0.5985691", "0.5774016", "0.576142", "0.5754567", "0.5651076", "0.5540252", "0.55324364", "0.5493142", "0.54804087", "0.54337275", "0.54020303", "0.5336764...
0.6288198
6
Determine the full path to the ios platform
function iosFolder(context) { return context.opts.cordova.project ? context.opts.cordova.project.root : path.join(context.opts.projectRoot, 'platforms/ios/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function platformPath(p) {\n return p.split('/').join(path.sep);\n}", "function get_platform(){\n if (['darwin', 'win32', 'win64'].indexOf(process.platform) === -1) return 'linux';\n if (['darwin'].indexOf(process.platform) === -1) return 'win';\n return 'mac';\n }", "getPlatformPath({ path, uri }...
[ "0.71571016", "0.68294954", "0.6781377", "0.6641107", "0.6641107", "0.6641107", "0.6641107", "0.6641107", "0.6641107", "0.6641107", "0.6641107", "0.6641107", "0.6641107", "0.66403246", "0.6599514", "0.65473527", "0.64777523", "0.64403737", "0.62877506", "0.6273859", "0.615411...
0.71755934
0
Return the list of files in the share extension project, organized by type
function getShareExtensionFiles(context) { var files = {source:[],plist:[],resource:[]}; var FILE_TYPES = { '.h':'source', '.m':'source', '.plist':'plist' }; forEachShareExtensionFile(context, function(file) { var fileType = FILE_TYPES[file.extension] || 'resource'; files[fileType].push(file); }); ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFileList(extension){\n $scope[extension+'_list'] = \"\";\n File.getFiles({ filter: extension, location: ProjectObject.original_location }).then(function (resp) {\n $scope[extension+'_list'] = resp;\n $sc...
[ "0.68672305", "0.6563678", "0.631977", "0.61577773", "0.6130375", "0.6107603", "0.61005145", "0.60254157", "0.6003351", "0.59986895", "0.5979426", "0.59008235", "0.5896936", "0.58835185", "0.5864591", "0.5860778", "0.58559287", "0.5805303", "0.579484", "0.57218254", "0.571665...
0.7480963
0
isAvailable = (stage: number, challenge: number, progress: number) => this.minStage <= stage && this.minChallenge <= challenge && progress === this.progress 1;
triggersNow() { return Math.random() * 100 < (this.prod || 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get satisfied() {\n return this.taken >= this.take && this.hours >= this.min_hours;\n }", "function passesCritical(){\n return (billsTotal()>= criticalLevelSet);\n}", "isValid() {\n return this.hr > 0 && this.hr < 25\n && this.min > -1 && this.min < 60\n && this.slam > -1 && this.slam < 30...
[ "0.65317845", "0.6253351", "0.62293404", "0.614462", "0.6130722", "0.6115749", "0.6108365", "0.6087181", "0.6040662", "0.6028662", "0.6025741", "0.59634334", "0.5963383", "0.5933654", "0.59029305", "0.5865553", "0.58413124", "0.5839926", "0.5803892", "0.57543474", "0.5740458"...
0.0
-1
checks if our web app has a good connection with the api
test_good_connection() { axios.get("https://protected-ravine-04165.herokuapp.com/health") .then((response) => { if(response.data === "Great connection") { console.log("TEST: React App has good connection to API - PASSED"); } else { console.log("TES...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkIsConnected() {\r\n if (_connectionState != Labs.ConnectionState.Connected) {\r\n throw \"API not initialized\";\r\n }\r\n }", "function checkAPI(result) {\n let isAPILiveUp = result === undefined;\n writeError(1, `API may be down, or check your connection.`);\n}",...
[ "0.75326866", "0.6995165", "0.6957891", "0.6740038", "0.6712344", "0.6706419", "0.66266954", "0.6573761", "0.64454126", "0.64102083", "0.6397192", "0.63849986", "0.6358182", "0.6355429", "0.6325751", "0.63224506", "0.63224506", "0.6273873", "0.6265922", "0.6237175", "0.622266...
0.69860697
2
checks if the /trend route in the API has a response
test_trend() { axios.get("https://protected-ravine-04165.herokuapp.com/trend") .then((response) => { console.log("TEST: API /trend returns data - PASSED"); }).catch(() => { console.log("TEST: API /trend returns data - FAILED"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "test_complete_trends_apple() {\n axios.get(\"https://protected-ravine-04165.herokuapp.com/complete/trends/apple\")\n .then((response) => {\n if(response.data.length > 5) {\n console.log(\"TEST: API /complete/trends/apple returns data - PASSED\");\n } else {\n ...
[ "0.6636881", "0.6625567", "0.61621207", "0.5859293", "0.5773051", "0.56104904", "0.554062", "0.5480525", "0.5476823", "0.5433208", "0.5328923", "0.5309198", "0.53062576", "0.5286025", "0.52827376", "0.52764386", "0.5234073", "0.521917", "0.52188027", "0.5197097", "0.51778114"...
0.6142358
3
checks if the /trends/apple route in the API has a response length of more than 5
test_trends_apple() { axios.get("https://protected-ravine-04165.herokuapp.com/trends/apple") .then((response) => { if(response.data.length > 5) { console.log("TEST: API /trends/apple returns data - PASSED"); } else { console.log("TEST: API /trends/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "test_complete_trends_apple() {\n axios.get(\"https://protected-ravine-04165.herokuapp.com/complete/trends/apple\")\n .then((response) => {\n if(response.data.length > 5) {\n console.log(\"TEST: API /complete/trends/apple returns data - PASSED\");\n } else {\n ...
[ "0.70978403", "0.6122955", "0.5888025", "0.56726307", "0.5657873", "0.5559646", "0.5552107", "0.5542589", "0.5491881", "0.54804003", "0.54007256", "0.5355723", "0.53407884", "0.5336596", "0.53148186", "0.52818435", "0.5280809", "0.52337587", "0.5190549", "0.5175666", "0.51347...
0.6904093
1
checks if the /sentiment/apple route in the API has a response length of more than 5
test_sentimet_blank() { axios.get("https://protected-ravine-04165.herokuapp.com/sentiment/apple") .then((response) => { if(response.data.length > 5) { console.log("TEST: API /sentiment/apple returns data - FAILED"); } else { console.log("TEST: API ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "test_complete_trends_apple() {\n axios.get(\"https://protected-ravine-04165.herokuapp.com/complete/trends/apple\")\n .then((response) => {\n if(response.data.length > 5) {\n console.log(\"TEST: API /complete/trends/apple returns data - PASSED\");\n } else {\n ...
[ "0.64167744", "0.6197777", "0.58225954", "0.57663757", "0.57239807", "0.56509346", "0.562911", "0.56176347", "0.5616398", "0.55167717", "0.5469427", "0.5456077", "0.5449224", "0.54090446", "0.5400664", "0.53549254", "0.5317426", "0.5303845", "0.5297782", "0.52841413", "0.5264...
0.6857678
0
checks if the /links/apple route in the API has a response
test_links_apple() { axios.get("https://protected-ravine-04165.herokuapp.com/links/apple") .then((response) => { console.log("TEST: API /links/apple returns data - PASSED"); }).catch(() => { console.log("TEST: API /links/apple returns data - FAILED"); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkResponseURL(i, linkObj, response) {\n\n // TODO!!!!\n // https://www.medbridgeeducation.com/sign-in/?after_signin_url=patient-engagement-for-speech-language-pathology?utm_content=header\n // This resolved as OK even though its not. The failed redirect check should have caught this. Might hav...
[ "0.5756468", "0.55576456", "0.5528958", "0.55179733", "0.5511194", "0.5495507", "0.54698384", "0.5445339", "0.5415101", "0.5377752", "0.5367696", "0.5348734", "0.5336912", "0.52927583", "0.5279649", "0.5276832", "0.52752197", "0.52629644", "0.524445", "0.5241395", "0.5214267"...
0.59373343
0
checks if the /complete/trends/apple route in the API has a response length of more than 5
test_complete_trends_apple() { axios.get("https://protected-ravine-04165.herokuapp.com/complete/trends/apple") .then((response) => { if(response.data.length > 5) { console.log("TEST: API /complete/trends/apple returns data - PASSED"); } else { cons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "test_trends_apple() {\n axios.get(\"https://protected-ravine-04165.herokuapp.com/trends/apple\")\n .then((response) => {\n if(response.data.length > 5) {\n console.log(\"TEST: API /trends/apple returns data - PASSED\");\n } else {\n console.log(\"TE...
[ "0.6695912", "0.59802586", "0.5939625", "0.584139", "0.57269216", "0.55778164", "0.5553691", "0.5517063", "0.5414589", "0.54078114", "0.53607595", "0.5307881", "0.5307094", "0.5294494", "0.5278716", "0.526003", "0.5252883", "0.5252398", "0.5220288", "0.5220116", "0.51841015",...
0.70860624
0
Function Name: SignUp() Description: This function lets the user sign up while using regEX to make sure they use correct characters. Output: Puts name into database and sends them to the video page.
signUp(){ var lowerUsername = this.state.username.toLowerCase(); var validLetters = /^[A-Za-z0-9]+$/; if( !lowerUsername.match(validLetters)|| lowerUsername.length < 3){ this.setState({ errorMessage: "Username does not meet requirements. Please try again!"}) return } else{ var data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goSignUp() {\n \n body.innerHTML = renderSignupDiv(first, \n last, email1, pass1, '', message1);\n assignListener('signup2');\n }", "function signUp(){\n var userFullName = document.getElementById(\"userFullName\").value;\n var userSurname = document.getElementById...
[ "0.66217566", "0.661092", "0.6490278", "0.64595175", "0.6453684", "0.64504987", "0.64391184", "0.64042825", "0.63702583", "0.63325506", "0.63291615", "0.6270839", "0.62085974", "0.61774945", "0.6168508", "0.61538893", "0.6096409", "0.6078755", "0.60751426", "0.60672385", "0.6...
0.0
-1
Function Name: logIn() Description: This function lets the user log in and access the video page. Output: Stores the name into the local storage.
logIn(){ fetch('/api/names/user/' +this.state.username.toLowerCase(), { method: 'GET', headers: { 'Content-Type': 'application/json', }, }).then((response) => { if (!response.ok) { this.setErrorMessage(response.json().content); } return response.json(); })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logIn(){\n loggedIn = true;\n\tloginPlayer();\n}", "function handleLogin(success,allUsers) { \n if (success === false) { \n alert(\"Ooops...try a different username\"); \n } \n else { \n catchAllAvailableUsers(allUsers);\n localVideo = document.getElementById('localVideo');\n remot...
[ "0.6873667", "0.64415157", "0.6092795", "0.60523117", "0.5929965", "0.59099203", "0.58994824", "0.58663964", "0.5857998", "0.58514464", "0.5828803", "0.5822102", "0.58049846", "0.5796798", "0.5790276", "0.576937", "0.5762873", "0.5725811", "0.5725293", "0.57193315", "0.571027...
0.0
-1
Function Name: checkNewUserHeader() Description: This checks if the user is new or returning to tell them if they are supposed to sign in. Output: create new user or enter user name.
checkNewUserHeader(){ if(this.props.isNewUser===true){ return "Please Create a Username"; } else{ return "Please Enter your Username Below to Log In" } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newUser() {\r\n\tvar hppurl;\r\n var language = getLanguage();\r\n\tvar country = getCountry();\r\n\t\r\n\tif( language_support == 'y' || language_support == 'Y') {\r\n hppurl = cfserver + \"/hppcf/createuser.do?lang=\" +\r\n \tlanguage + \"&cc=\" + country + \"&hpappid=\" + application_i...
[ "0.6471462", "0.63221526", "0.630849", "0.62837595", "0.6273569", "0.62307686", "0.6205616", "0.62027884", "0.61549807", "0.61100113", "0.60969317", "0.5979875", "0.5930516", "0.5904834", "0.58955413", "0.5888716", "0.5886606", "0.5886233", "0.5867129", "0.584434", "0.5841325...
0.6898023
0
Function Name: checkNewUserHelper() Description: This checks if the user is new or returning to tell them if they are supposed to sign in. Output: empty or a description on how to sign in.
checkNewUserHelper(){ if(this.props.isNewUser===true){ return (<ul style={{float:'left',textAlign:'left'}}> <strong>Username requirements:</strong> <li>Only use letters and numbers (No special characters or spaces eg: !@#$% etc...).</li> <li>Usernames are not case sensitive.</li> <li>M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkNew() {\n\tif(localStorage.getItem(\"newUser\") === null) {\n\t\twindow.newUserModal();\n\t}\n}", "function u_checklogin(ctx, force, passwordkey, invitecode, invitename, uh) {\n if (u_sid = u_storage.sid) {\n api_setsid(u_sid);\n u_checklogin3(ctx);\n } else {\n if (!forc...
[ "0.6440501", "0.63473034", "0.6333268", "0.63214123", "0.62841713", "0.6146519", "0.6132399", "0.6071626", "0.60461736", "0.60279644", "0.60234326", "0.5982642", "0.59730864", "0.5924194", "0.5919222", "0.5912355", "0.5912161", "0.5858766", "0.58549464", "0.58521694", "0.5847...
0.62325394
5
Function Name: checkNewUserEnter() Description: This checks if the user is new or returning to tell them if they are supposed to sign in. Output: signup or login function
checkNewUserEnter(){ if(this.props.isNewUser===true){ return this.signUp() } else{ return this.logIn() } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signUpUser(event) {\n event.preventDefault();\n var userName = userNameInput.value.trim().toUpperCase();\n var email = userEmailInput.value;\n var password = userPasswordInput.value;\n\n //If statements to alert the user to input info or that they have already signed up\n if (!userName) ...
[ "0.6560079", "0.65418893", "0.647706", "0.6455698", "0.6318892", "0.6306825", "0.6284936", "0.6203737", "0.61988056", "0.6168061", "0.6165531", "0.61505896", "0.61358577", "0.61337507", "0.6122719", "0.61216193", "0.61183554", "0.61179084", "0.60907966", "0.6090131", "0.60870...
0.706831
0
Function Name: checkNewUserButton() Description: This checks if the user is new or returning to tell them if they are supposed to sign in. Output: signup or login button
checkNewUserButton(){ if(this.props.isNewUser===true){ return <Button id="signupButton" kind='primary' style={{ padding: "20px" ,fontSize:"20px"}} onClick={()=>this.signUp()}>Sign Up</Button> } else{ return <Button className="loginb" id="loginButton" kind='primary' style={{ padding: "20px...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isUserLoggedIn() {\n //console.log(`User registered button should be present`);\n return this.userRegisteredButton.isExisting();\n }", "function checkNew() {\n\tif(localStorage.getItem(\"newUser\") === null) {\n\t\twindow.newUserModal();\n\t}\n}", "function useNewButton() {\r\n createUser()...
[ "0.7400915", "0.70703965", "0.69313943", "0.6496933", "0.6412593", "0.6395916", "0.6309966", "0.62434983", "0.6206133", "0.61950207", "0.6169558", "0.6156865", "0.6150199", "0.6132271", "0.6128412", "0.61198175", "0.61062044", "0.6086782", "0.60479885", "0.60296214", "0.60092...
0.7017055
2
Ball movements and collisions logic. This method is executed in the scope of a Ball.
function getBallMovementsLogic(game) { /*- Tracking where is the lowest brick to know when we can load the next level -*/ var lowestBrickY = 0; return function () { var slider = game.slider, bricksList = game.bricksList, ball = this, ballSpeed = ball.getSpeed(), ballPosition = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ballMove(){\n //move position Y\n this._posY += this._ballVelocityY;\n //move position X\n this._posX += this._ballVelocityX;\n \n }", "function moveBall() {\n balls.forEach((element) => {\n if (\n element.xPos + element.radius > canvas.width ||\n element.xPos -...
[ "0.79392064", "0.7849151", "0.78481185", "0.78156924", "0.7703549", "0.76941234", "0.7630353", "0.7623808", "0.7603971", "0.7586432", "0.7576847", "0.7519593", "0.7422574", "0.74212295", "0.74071324", "0.7400604", "0.7395348", "0.73950124", "0.7384367", "0.7370861", "0.735669...
0.72415894
29
Slider movements and collisions logic.
function getSliderMovementsLogic(game) { return function () { var speed = this.getSpeed(), position = this.getPosition(), displacement; var speedXAbs = Math.abs(speed.getX()), thereIsMovement = false; /*- Checking slider controls -*/ if (!this.goingRight() && this.goingLeft()) { speed...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collisionDetection() {\n if (\n collideRectRect(sliderX,sliderY,30,height,this.x,this.y,this.r,this.r * 2) && sliderSpeed >= 0) {\n this.color = random(160);\n }\n if (collideRectRect(sliderX, sliderY, 30, height, this.x, this.y, this.r, this.r * 2) && sliderSpeed < 0) {\...
[ "0.6707439", "0.66780186", "0.66703486", "0.6602795", "0.65658903", "0.65422404", "0.6501568", "0.6464446", "0.64569354", "0.6429339", "0.64164907", "0.6403766", "0.63487667", "0.63316065", "0.62951434", "0.62915945", "0.6262759", "0.6260168", "0.6254457", "0.6236139", "0.621...
0.6439313
9
calling write function+we are selecting the number
function writeeventill(x){ for (var i=0; i<=x; i++) { if (i % 2 === 0){ console.log(i); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function write() {}", "function writeNumber(buffer, pos, number) {\n buffer.writeUInt8(number >> 8, pos, true)\n buffer.writeUInt8(number & 0x00FF, pos + 1, true)\n\n return 2\n}", "function writeNumber(buffer, pos, number) {\n buffer.writeUInt8(number >> 8, pos, true)\n buffer.writeUInt8(number & 0x00FF,...
[ "0.68282306", "0.63602215", "0.63602215", "0.63471806", "0.6232605", "0.6127119", "0.58735967", "0.57660574", "0.57330096", "0.558531", "0.55775774", "0.5541878", "0.5524583", "0.551184", "0.5482422", "0.5482422", "0.5469228", "0.5438628", "0.5427801", "0.5425298", "0.5402894...
0.0
-1
Function of loading msgs
function load_msgs() { //load msgs $.ajax({ type: "POST", url: "chat/load_msgs.php", //Output php feedback success: function(html) { //Clear input box $("#msgs_room").empty(); //Output php feedback $("#msgs_room").append(html); //scroll down $("#msgs_room").scrollTop(90000); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadMessages(convList){\n // var convList = [\n // conv_id: String, /* id of this conversation, same as contact id if type is one or con, group id if type is grp */\n // type: String, /* 1- CON, 2 - ONE, 3 - GRP */\n // timestamp: String, ...
[ "0.70456403", "0.6968905", "0.6928073", "0.6874969", "0.67127275", "0.6640672", "0.6612971", "0.6586224", "0.6562918", "0.65374845", "0.64787745", "0.64685106", "0.6435902", "0.64115417", "0.63929814", "0.6390166", "0.6346203", "0.63427967", "0.63318443", "0.6323457", "0.6323...
0.7125821
0
Add Methods After Inheritance Add all necessary code so the Dog object inherits from Animal and the Dog's prototype constructor is set to Dog. Then add a bark() method to the Dog object so that beagle can both eat() and bark(). The bark() method should print "Woof!" to the console.
function Animal() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Dog(name) {\n Animal.call(this, 'Dog', name);\n // At this point, only the PROPERTIES of Animal has been inherited, not it's methods\n}", "function Dog(name){\r\n Pet.call(this, name);\r\n \r\n this.whatAmI = function() {\r\n return \"I am a Dog.\"\r\n } \r\n}", "function Dog () {\n ...
[ "0.7355475", "0.73009443", "0.69592994", "0.6872724", "0.6866581", "0.6866581", "0.68133736", "0.67814255", "0.67070174", "0.66722155", "0.66697216", "0.66697216", "0.66474706", "0.66398346", "0.6615101", "0.6577503", "0.65706253", "0.6567933", "0.6566393", "0.6559106", "0.64...
0.6315577
59