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
Returns HTML to create Quiz Status Bar
function generateQuizStatus() { //console.log('Generating quiz status bar'); return `<div class="col-12"> <div class="score"> <span><strong>Question</strong>: ${STORE.currentQuestion}/${QUESTIONS.length}</span> <span><strong>Score</strong>: ${STORE.userScore}/${QUESTIONS.length}<...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStatusHtml() { \n return `<div class='status_bar'>\n <span>Question ${getCurrentNum() + 1} / ${DATA_SOURCE.length}</span>\n <span>Score ${getRightCnt()}</span>\n </div>`;\n}", "function renderQuizStatusBar() {\n //console.log('Rendering quiz status bar');\n $('....
[ "0.7412068", "0.735858", "0.66259694", "0.64171857", "0.63791424", "0.6376603", "0.63656366", "0.6350329", "0.6279028", "0.6258293", "0.6240715", "0.61764985", "0.61665875", "0.6147569", "0.61355186", "0.611618", "0.6104461", "0.6074504", "0.60708433", "0.604513", "0.6038478"...
0.7698068
0
Returns HTML to show if answer selected was wrong or correct. Dependancy: getAssets getCorrectAnswer
function generateQuestionResult() { //console.log(`Generating Question Results`); const resultAssets = getAssets(STORE.currentAnswer); const correctAnswerText = getCorrectAnswer(); return `<div class="row"> <div class="col-3 empty">&nbsp;</div> <div class="col-6"> <h2>${resu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderIfCorrect() {\n $('.correctAnswerScreen').html(correctAnswer());\n }", "function userInCorrectAnswerSubmitted(answer) {\n $('.correct-updater').html(`Incorrect! The correct answer is: ${store.randomQuestion.correctAnswer}`);\n}", "function renderIfWrong() {\n $('.wrongAnswerScreen').html...
[ "0.7157886", "0.6796731", "0.6778143", "0.6776387", "0.67178494", "0.66929996", "0.6681597", "0.667382", "0.6669238", "0.6652212", "0.663036", "0.66179204", "0.66082424", "0.65751576", "0.65670186", "0.655353", "0.6547843", "0.65469784", "0.65464145", "0.6536009", "0.6509527"...
0.6275396
57
Return HTML to create the final results page. Dependancy: getAssets
function generateFinalResult() { //console.log(`Generating Final Results`); const resultAssets = getAssets('finalResult'); return `<div class="row"> <div class="col-4 empty">&nbsp;</div> <div class="col-4 finalResult"> <h2>FINAL SCORE</h2> <p><strong>${STORE.userScore...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderFinalResult() {\n //console.log('Final result is being rendered');\n $('.result').html(generateFinalResult());\n}", "function render(project) { // a key\n $('.footer-test').html(project.text) //put the response on the dom\n var imageHtml = '';\n project.image...
[ "0.5949072", "0.5928307", "0.5845975", "0.58330256", "0.58287627", "0.5765875", "0.57453245", "0.5730211", "0.57227784", "0.57110363", "0.5641012", "0.5601509", "0.5590649", "0.55898064", "0.5551573", "0.55463004", "0.5520691", "0.5520516", "0.55168086", "0.5483923", "0.54586...
0.58062696
5
Fetch Functions / Returns current asset object
function getAssets(assetID) { //console.log(`Assets being found`); const quizAssets = ASSETS.find(function(asset) { return asset.id === assetID; }); return quizAssets; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get mainAsset() {}", "function getAsset(assetId) {\n\n // find the asset\n var foundAsset = _.find(includes.Asset, function (asset) {\n\n return asset.sys.id === assetId;\n\n });\n\n// console.log('GETASSET foundAsset:', foundAsset);\n\n // TO...
[ "0.6588133", "0.58715117", "0.5822148", "0.57263726", "0.57241267", "0.5700558", "0.5634067", "0.5586133", "0.5545772", "0.55433685", "0.5525784", "0.5505636", "0.5501309", "0.5429532", "0.5422758", "0.53930897", "0.5390254", "0.5379529", "0.53716654", "0.53592634", "0.534773...
0.51513016
41
Returned current question object
function getCurrentQuestion () { //console.log('Getting current question object') const questionObject = QUESTIONS.find(function(question) { return question.id === STORE.currentQuestion; }); return questionObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQuestion() {\n var currentQuestion = questions[questionIndex].question;\n return currentQuestion;\n}", "function currentQuestion () {\n return quiz.currentQuestion\n}", "function currentQuestion () {\n return quiz.currentQuestion\n}", "function currentQuestion () {\n return quiz.currentQ...
[ "0.7718954", "0.7686889", "0.7686889", "0.7686889", "0.7463008", "0.74135363", "0.741299", "0.72153497", "0.70113164", "0.69851375", "0.69677687", "0.6945481", "0.69403756", "0.68452024", "0.6820486", "0.6758066", "0.66512114", "0.6629034", "0.6608611", "0.647929", "0.6405262...
0.7906519
0
Return array index for current question
function getCurrentQuestionIndex () { //console.log('Getting current question array index'); const questionIndex = QUESTIONS.findIndex(function(question) { return question.id === STORE.currentQuestion; }); return questionIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrentQuestionIndex() {\n return currentQuestion.id;\n}", "function correctAnswer () {\n return quiz.questions[quiz.currentQuestion].answerIndex\n}", "function index() {\n if ( Array.isArray( arr ) ) {\n return arr.indexOf( selected ); // set var for the current index value\n ...
[ "0.7546348", "0.6867978", "0.68065286", "0.67938364", "0.67813104", "0.66497403", "0.65836513", "0.64855015", "0.6457079", "0.6448489", "0.64350563", "0.64252764", "0.63697624", "0.63250446", "0.63250446", "0.6309352", "0.6278392", "0.6263211", "0.6257737", "0.6218199", "0.61...
0.83764917
0
Return correct answer text Dependancy: getCurrentQuestionIndex
function getCorrectAnswer() { //console.log('Correct answer is being found'); const questionIndex = getCurrentQuestionIndex(); const answerIndex = QUESTIONS[questionIndex].correctAnswer; const correctAnswerText = QUESTIONS[questionIndex].answers[answerIndex]; return correctAnswerText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function correctAnswer () {\n return quiz.questions[quiz.currentQuestion].answerIndex\n}", "function correctAnswer () {\n return quiz.questions[quiz.currentQuestion].correctAnswerIndex\n}", "function returnCorrectAnswer(){\n const answers = array[global_index].answers \n for(var x = 0; x < a...
[ "0.7777088", "0.77293044", "0.75420475", "0.7395556", "0.7381519", "0.73659384", "0.73308986", "0.7111984", "0.7083651", "0.7048422", "0.69915843", "0.6950533", "0.69079936", "0.67516655", "0.67416084", "0.67390925", "0.6704724", "0.6673891", "0.66559976", "0.6640097", "0.656...
0.83032393
0
Checks user answer selected. If correct, increases score. Changes STORE value to indicate if answer is correct or wrong. If no answer selected, display alert message. Dependancy: getCorrectAnswer updateUserScore
function checkAnswer() { //console.log('Answer is being checked') const currentAnswer = $( "input:checked" ).val(); const correctAnswerText = getCorrectAnswer(); if (currentAnswer === correctAnswerText) { STORE.currentAnswer = 'correctAnswer'; updateUserScore(); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAnswer() {\r\n STORE.view = 'feedback';\r\n let userSelectedAnswer = STORE.userAnswer;\r\n let correctAnswer = STORE.questions[STORE.questionNumber].correctAnswer;\r\n console.log('Checking answer...');\r\n if (userSelectedAnswer == correctAnswer) {\r\n STORE.score++;\r\n STORE.correctAnsw...
[ "0.8039612", "0.7807598", "0.76271284", "0.7585951", "0.7539079", "0.74666786", "0.74607056", "0.7451234", "0.74193406", "0.739998", "0.73684853", "0.730952", "0.7280261", "0.7249559", "0.72470874", "0.72128075", "0.72023994", "0.7196426", "0.71762186", "0.7174571", "0.713638...
0.78183573
1
Clears value from STORE.currentAnswer
function clearAnswer() { //console.log('Answer is being cleared'); STORE.currentAnswer = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear_answers(){\n\t\t$('[id$=-quest] .answer').val('')\n\t}", "function resetAnswer() {}", "function clearAnswer() {\n input.value = '';\n}", "function clear_answer () {\n document.getElementById(\"answer\").value = \"\";\n}", "function clearCurrentQuestion() {\n questionText.textContent =...
[ "0.764898", "0.76021564", "0.7584768", "0.7518604", "0.72133225", "0.7084749", "0.698739", "0.6939999", "0.69236076", "0.68945295", "0.6874153", "0.6865324", "0.683869", "0.6828568", "0.68190116", "0.6801875", "0.6798492", "0.67896825", "0.678643", "0.67795736", "0.67778534",...
0.884793
0
Sets STORE to initial values to restart quiz
function restartQuiz() { //console.log('Restarting Quiz'); STORE.view = 'start'; STORE.currentQuestion = 1; STORE.userScore = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restartQuiz() {\n store.quizStarted = false;\n store.questionNumber = 0;\n store.submittingAnswer = false;\n store.currentQuestionState.answerArray = [];\n store.score = 0; \n}", "function restartTheQuiz() {\r\n store.quizStarted = false;\r\n store.questionNumber = 0;\r\n store.score = 0;\...
[ "0.73034096", "0.72878957", "0.7144516", "0.6988896", "0.67887986", "0.6726444", "0.65971655", "0.65195644", "0.6428516", "0.6387848", "0.6242164", "0.623332", "0.6232871", "0.62287325", "0.6200181", "0.61914706", "0.6151751", "0.61497617", "0.6145214", "0.6121784", "0.612146...
0.6606862
6
Rendering Functions / Appends result from generateStartPage to intro class for Start Page. Dependancy: generateStartPage
function renderStartQuiz() { //console.log('Generating start of quiz'); $('.intro').html(generateStartPage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStartPage(){\n const setHtml = generateIntro();\n $('main').html(setHtml);\n}", "function renderStartPage() {\n addView(startPage());\n}", "function renderStartPage() {\n\t$('.js-results').html(``);\n\t$(\".js-question_page\").hide();\n\t$(\".js-results_page\").hide();\n\t$(\".js-start_page\"...
[ "0.78978264", "0.76015556", "0.70830894", "0.70809996", "0.6986004", "0.6923585", "0.69029015", "0.6827177", "0.6702514", "0.668914", "0.6646157", "0.6523667", "0.64514875", "0.64021075", "0.6380317", "0.63768035", "0.632132", "0.6318667", "0.62854946", "0.62817466", "0.62793...
0.71554554
2
Appends result from generate question to quiz class for Question page. Dependancy: getCurrentQuestion generateQuestion
function renderQuestionText() { //console.log('Rendering question'); const currQuestion = getCurrentQuestion(); $('.quiz').html(generateQuestion(currQuestion)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateQuiz() {\n gameOver.style.display = \"none\";\n // check if the current question is the last question! \n // if so then return the score and end the quiz\n if (currentQuestionIndex === finalQuestionIndex) {\n return userScore();\n }\n var currentQuestion = quizQuestions\n ...
[ "0.73801434", "0.7327042", "0.7274043", "0.7267827", "0.72556144", "0.7241796", "0.71901184", "0.71797067", "0.70751554", "0.70568365", "0.70553213", "0.7050194", "0.7024434", "0.7013524", "0.7007658", "0.6965389", "0.69157094", "0.6911176", "0.6907425", "0.689977", "0.689017...
0.724277
5
Appends result from generateQuizStatus to quizStatus class for Quiz Status Bar. Dependancy: generateQuizStatus
function renderQuizStatusBar() { //console.log('Rendering quiz status bar'); $('.quizStatus').html(generateQuizStatus()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateQuizStatus() {\n //console.log('Generating quiz status bar');\n return `<div class=\"col-12\">\n <div class=\"score\">\n <span><strong>Question</strong>: ${STORE.currentQuestion}/${QUESTIONS.length}</span>\n <span><strong>Score</strong>: ${STORE.userScore}/${QUES...
[ "0.76627296", "0.6733146", "0.6200955", "0.61935204", "0.6164796", "0.6111564", "0.60378397", "0.601763", "0.59412485", "0.5888398", "0.588299", "0.58688545", "0.5746932", "0.57316095", "0.5726977", "0.5719429", "0.56936806", "0.5692323", "0.5688984", "0.5659846", "0.56582105...
0.7424404
1
Appends result from generateQuestionResult to result class for Question Results Page. Dependancy: generateQuestionResult
function renderQuestionResult() { //console.log('Result is being rendered'); $('.result').html(generateQuestionResult()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateQuestionResult() {\n //console.log(`Generating Question Results`);\n const resultAssets = getAssets(STORE.currentAnswer);\n const correctAnswerText = getCorrectAnswer();\n\n return `<div class=\"row\">\n <div class=\"col-3 empty\">&nbsp;</div>\n <div class=\"col-6\">\n ...
[ "0.733409", "0.6751746", "0.66789573", "0.6587778", "0.6561271", "0.65604204", "0.65510726", "0.6523914", "0.6484173", "0.647028", "0.64279646", "0.64194316", "0.64033306", "0.63990307", "0.6393651", "0.63746667", "0.6372788", "0.6368515", "0.63413846", "0.63403434", "0.63092...
0.7509621
0
Appends result from generateFinalResult to result class for Final Results page. Dependancy: generateFinalResult
function renderFinalResult() { //console.log('Final result is being rendered'); $('.result').html(generateFinalResult()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateFinalResult() {\n //console.log(`Generating Final Results`);\n const resultAssets = getAssets('finalResult');\n return `<div class=\"row\">\n <div class=\"col-4 empty\">&nbsp;</div>\n <div class=\"col-4 finalResult\">\n <h2>FINAL SCORE</h2>\n <p><strong...
[ "0.6978412", "0.68315333", "0.653755", "0.6449922", "0.64366746", "0.6113179", "0.6035672", "0.6034983", "0.5949798", "0.5897556", "0.58856934", "0.5861883", "0.5850091", "0.57146895", "0.56795794", "0.5633346", "0.55811155", "0.55753917", "0.55292803", "0.5528805", "0.552427...
0.7752969
0
Renders proper page according to STORE.view value. Dependancy: renderStartQuiz renderQuestionText renderQuizStatusBar renderQuestionResult renderFinalResult
function render() { if (STORE.view === 'start') { renderStartQuiz(); $('.intro').show(); $('.quiz').hide(); $('.result').hide(); $('.quizStatus').hide(); } else if (STORE.view === 'quiz') { renderQuestionText(); renderQuizStatusBar(); $('.intro')....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderPage(isCorrect) {\nlet html = ''\n\n if (store.quizStarted === false) {\n html = generateStartPage()\n }\n else if (isCorrect === true) {\n html = generateCorrectPage()\n }\n else if (isCorrect === false) {\n html = generateIncorrectPage()\n }\n else if (store.questionNumber === stor...
[ "0.78840184", "0.7828652", "0.7725439", "0.7606249", "0.75895995", "0.75327593", "0.7519684", "0.7514291", "0.7512675", "0.73851883", "0.72487813", "0.72103417", "0.71898633", "0.7170597", "0.71367645", "0.706982", "0.70348185", "0.7030021", "0.70064926", "0.69768864", "0.689...
0.79400176
0
Event Handlers / Event handler to start quiz when Start button is clicked Dependancy: render
function handleQuizStart() { //console.log('Handling start quiz process'); $('.intro').on('click', '.btnStartQuiz', function(event) { //console.log('Quiz has started'); STORE.view = 'quiz'; render(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleStartQuiz(){\n $(\"main\").on(\"click\", \"#start\", function(evt) {\n evt.preventDefault();\n store.quizStarted = true;\n render(generateQuestionTemplate());\n \n });\n}", "function handleStartQuiz() {\r\n $(`main`).on(`click`, `#start`, function () {\r\n store.quizStarted = tru...
[ "0.817971", "0.8150734", "0.810912", "0.80430883", "0.8033974", "0.80213094", "0.7975075", "0.7955909", "0.7951552", "0.7938981", "0.7915556", "0.79140306", "0.790828", "0.7867926", "0.7852807", "0.78468126", "0.78450155", "0.78279483", "0.77800053", "0.7702633", "0.7688493",...
0.8140433
2
Event handler to handle answer submitted when submit button is clicked Dependancy: checkAnswer render
function handleAnswerSubmitted() { //console.log('Handling submit answer process'); $('.quiz').on('submit', function (event) { event.preventDefault(); //console.log('Answer has been submitted'); checkAnswer(); STORE.view = 'questionResult'; render(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleAnswerSubmitButton() {\n $('main').submit('.submit-button', function (event) {\n event.preventDefault();\n checkAnswerChoice();\n });\n}", "function handleSubmitAnswer() {\r\n $('main').on('submit', 'form', function (event) {\r\n event.preventDefault();\r\n console.log('User submitt...
[ "0.80386645", "0.8037172", "0.7763792", "0.7743406", "0.7708939", "0.76654434", "0.76479894", "0.7628476", "0.7622086", "0.7616675", "0.76034427", "0.7553908", "0.7553713", "0.7520001", "0.7518691", "0.7468945", "0.74613094", "0.7453933", "0.74439627", "0.7433272", "0.7406139...
0.8060596
0
Event handler to handle next question button clicked on question results page Dependancy: clearAnswer advanceToNextQuestion render
function handleNextQuestion() { //console.log('Handling next question process'); $('.result').on('click', '.btnNextQuestion', function(event) { clearAnswer(); if (STORE.currentQuestion < QUESTIONS.length) { advanceToNextQuestion(); STORE.view = 'quiz'; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleNextQuestion() {\n $('main').on('click', '.js-continue-button', (event) => {\n store.answer = '',\n renderQuizScreen();\n });\n}", "function handleNextQuestion() {\r\n $('main').on('click', '#next-btn', function (event) {\r\n event.preventDefault();\r\n console.log('Next question'...
[ "0.84375244", "0.83145577", "0.8250452", "0.8188236", "0.81737804", "0.81348586", "0.8101152", "0.8094927", "0.7998141", "0.7979526", "0.79726744", "0.7959709", "0.79413956", "0.7938977", "0.7918896", "0.79102993", "0.7907485", "0.7899084", "0.78648835", "0.7854658", "0.78540...
0.8568369
0
Event handler to handle when restart quiz button is clicked on final results page Dependancy: restartQuiz render
function handleRestartQuiz() { //console.log('Handling restart quiz process'); $('.result').on('click', '.btnRestartQuiz', function(event) { restartQuiz(); render(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleRestartQuiz() {\n $('main').on('click', '.js-restart-button', event => {\n event.preventDefault();\n store.questionNumber = 0; \n store.quizStarted = false;\n store.score = 0;\n store.answerCorrect = false;\n\n render();\n })\n}", "function handleRestartQuiz() {\r\n $('main')....
[ "0.8624966", "0.8569477", "0.8489264", "0.8439141", "0.82139754", "0.8190309", "0.81768835", "0.80678815", "0.806681", "0.80486584", "0.8014587", "0.7911628", "0.77850336", "0.77801967", "0.77583903", "0.7682236", "0.7682236", "0.7680224", "0.76785505", "0.7625335", "0.762063...
0.867545
0
Will run when page is initialized to render page and start event listeners Dependancy: handleQuizStart handleAnswerSubmitted handleNextQuestion handleRestartQuiz render
function initializePage() { //Event Listeners handleQuizStart(); handleAnswerSubmitted(); handleNextQuestion(); handleRestartQuiz(); //Render Function render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderQuiz() {\n startPage();\n handleAnswerSubmitButton();\n handleNextQuestionButton();\n restartQuiz();\n}", "function handleQuizApp() {\n \n render();\n startPageHandler();\n questionPageHandler();\n feedbackPageHandler();\n resultsPageHandler();\n}", "function handleQuizApp(){\r\n rend...
[ "0.8213959", "0.79809743", "0.78012353", "0.7661764", "0.7601946", "0.7589131", "0.7586742", "0.75540775", "0.7546131", "0.7499571", "0.74922067", "0.7457763", "0.74395615", "0.73863006", "0.732295", "0.7318061", "0.7300152", "0.7266874", "0.72452474", "0.7240577", "0.7235894...
0.85134834
0
On submit, insert data.
submit(data, formRef) { const { date, category, amount } = data; const balance = 0; const owner = Meteor.user().username; const payee = (typeof data.payee === 'string') ? data.payee : ''; const name = (typeof data.name === 'string') ? data.name : ''; const notes = (typeof data.notes === 'string'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "submit(data) {\n const { description, seller, item, itemName } = data;\n Reports.insert({ description, seller, item, itemName }, this.insertCallback);\n }", "function onSubmitInsert(url) {\n var formArray= $(\"form\").serializeArray();\n var data={};\n for (index in formArray){\n data[form...
[ "0.7002629", "0.6753602", "0.6699764", "0.6643535", "0.66356283", "0.65581536", "0.6518135", "0.6489191", "0.6482317", "0.64801556", "0.6475265", "0.647171", "0.64583594", "0.64463544", "0.6445152", "0.64114153", "0.6411034", "0.6386054", "0.63754225", "0.6351196", "0.6314612...
0.0
-1
end of class Calendar / class WeekDay day is Object Day of rootScope
function WeekDay(day) { // the original day this.origin = day; /* * PRIVATE * set events to match type, null if don't have */ this.setEvent = function(type) { if (this.origin != null && this.origin.events != null) { var event = []; var j=0; // not normal if (type == null) { f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Day(day) {\n\tif(validDateWeek(day))\n\t\tthis.type = \"day\";\n\telse\n\t\tthis.type = \"fill\";\n\n\tthis.day = day;\n\tthis.dayOfMonth = day.getDate();\n\n\tif(day.getDate() == new Date().getDate()\n\t && day.getMonth() == new Date().getMonth()\n\t && day.getFullYear() == new Date().getFullYear()){...
[ "0.6897823", "0.6890606", "0.6764262", "0.6741111", "0.67264014", "0.6715248", "0.6595766", "0.64992243", "0.64828", "0.6362222", "0.6301798", "0.6254975", "0.61876005", "0.6182919", "0.6165291", "0.61564076", "0.6143034", "0.612563", "0.6115893", "0.611211", "0.60990536", ...
0.7329661
0
end of class WeekDay / class NorEvent event is the Object Event of rootScope
function NorEvent(event) { // copy the original event this.event = event; // re-construct dateTime to calculate (mins) this.start = $rootScope.newTime(event.origin.start.dateTime); // re-construct dateTime to calculate (mins) this.end = $rootScope.newTime(event.origin.end.dateTime); /* * PRIVATE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WeekDay(day) {\n\t\t// the original day\n\t\tthis.origin = day;\n\t\t\n\t\t/*\n\t\t * PRIVATE\n\t\t * set events to match type, null if don't have\n\t\t */\n\t\tthis.setEvent = function(type) {\n\t\t\tif (this.origin != null && this.origin.events != null) {\n\t\t\t\tvar event = [];\n\t\t\t\tvar j=0;\n\t\t...
[ "0.6868922", "0.6210677", "0.6176872", "0.61685884", "0.61685884", "0.61685884", "0.61685884", "0.61685884", "0.5977825", "0.5977825", "0.5977825", "0.59627676", "0.5859961", "0.5856378", "0.58008283", "0.57403624", "0.572548", "0.57205653", "0.5713998", "0.56744885", "0.5669...
0.6356742
1
end of class NorEvent / class AllEvent event is the Object Event of rootScope
function AllEvent(event) { // copy the original event this.event = event; this.style = { "background-color": this.event.color, 'width': '100%', 'height': '20px', 'color': 'white', 'text-align': 'left', 'margin-top': '2px', 'font-size': '15px', 'overflow': 'hidden', 'position': 'relat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "function InternalEvent() { }", "get event () {\n\t\treturn this._event;\n\t}", "function InternalEvent() {}", "get event() {\n\t\treturn this.__event;\n\t}", "get event() ...
[ "0.6496847", "0.6496847", "0.6496847", "0.6496847", "0.6496847", "0.6452834", "0.6422506", "0.63861066", "0.63861066", "0.63861066", "0.633433", "0.633433", "0.633433", "0.6324074", "0.62725616", "0.6264311", "0.6264311", "0.6200836", "0.61591643", "0.60996", "0.6079298", "...
0.65273416
0
end of class AllEvent / class OverEvent event is the Object Event of rootScope date is object Day (the first day of event or first day of week)
function OverEvent(event, date) { // copy the original event this.event = event; /* * PRIVATE * set the width of this event (in %) * depends on how many days */ this.setWidth = function() { var startDate = date.toDate(); var endDate = event.origin.end.dateTime; var duration = endDate.get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WeekDay(day) {\n\t\t// the original day\n\t\tthis.origin = day;\n\t\t\n\t\t/*\n\t\t * PRIVATE\n\t\t * set events to match type, null if don't have\n\t\t */\n\t\tthis.setEvent = function(type) {\n\t\t\tif (this.origin != null && this.origin.events != null) {\n\t\t\t\tvar event = [];\n\t\t\t\tvar j=0;\n\t\t...
[ "0.7002001", "0.656463", "0.6365688", "0.6245708", "0.6183904", "0.6118267", "0.6102951", "0.6102951", "0.60921043", "0.60389906", "0.6025094", "0.60122585", "0.60122585", "0.60122585", "0.60122585", "0.60122585", "0.60122585", "0.60122585", "0.60122585", "0.59919465", "0.595...
0.6141589
5
end of class OverEvent / class EmptyEvent for display overday event
function EmptyEvent(event) { // set function var set = function() { var temp = angular.copy(event.event); temp.origin.summary = null; return temp; }; this.event = set(); this.style = { "height" : "20px", "width": "90%", "margin-top": "2px", 'position': 'relative', 'z-index': '1',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NorEvent(event) {\n\t\t// copy the original event\n\t\tthis.event = event;\n\n\t\t// re-construct dateTime to calculate (mins)\n\t\tthis.start = $rootScope.newTime(event.origin.start.dateTime);\n\t\t\n\t\t// re-construct dateTime to calculate (mins)\n\t\tthis.end = $rootScope.newTime(event.origin.end.date...
[ "0.6968254", "0.6774537", "0.67602587", "0.67554283", "0.6458699", "0.64455104", "0.6398413", "0.6393954", "0.6354541", "0.63137084", "0.6263916", "0.62638885", "0.62450624", "0.6235168", "0.6209746", "0.6200193", "0.614974", "0.614557", "0.6042825", "0.6029371", "0.5984146",...
0.66618353
4
Create an array of deltas to help match up the two sides. The array doesn't have to be full length. Missing entries (past the end of the array) are assumed to be 0
function createStepMap(cur, old) { if (cur.length === old.length) return []; // 1:1 array // It should be possible to combine the two, or reverse and use a separate function if (cur.length < old.length) { return createDeltaMap(cur, old); } else { // Exactly the same, but in reverse var out =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dif(ar) {\n var dar = []\n for(var i=0;i<ar.length-1;i++){\n dar.push(ar[i+1]-ar[i])\n }\n return dar\n}", "function restoreDiff(arr) {\n for (let i = 1; i < arr.length; i++) {\n arr[i][0] += arr[i - 1][0] + 1;\n }\n return arr;\n}", "function delta(arcs) {\n var i = -1,\n ...
[ "0.66384536", "0.637168", "0.63442934", "0.63146144", "0.6275878", "0.62513834", "0.62250304", "0.6223078", "0.6154746", "0.60904014", "0.5988077", "0.59872746", "0.5975915", "0.59623647", "0.590757", "0.5850494", "0.58472705", "0.58008814", "0.5764661", "0.576085", "0.572862...
0.0
-1
======================================================= Massage the step map data into another format. This could be integrated into the routine that creates the data, but this is easier for now. =======================================================
function fillOutStepMap(map, leftLen, rightLen) { var out = []; // Step through the map var left = 0, right = 0; for (var i = 0; i < map.length; i++) { if (map[i][0] === 0 && map[i][1] === 0) out.push([left++, right++]); else if (map[i][0]) { for (var j = 0; j < map[i][0]; j++) out.pus...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnstep(data,mapdict){\n\tvar step={\n\t\t'author': '',\n\t\t'year': '',\n\t\t'title':'',\n\t\t'country': '',\n\t\t'placeposition': '',\n\t\t'img_preview': '',\n\t\t'genre':'',\n\t\t'description': ''\n\t}\n\n\tfor (let [k, v] of Object.entries(mapdict)) {\n\t\tstep[k]=returnMappedValue(data, v)\n\t}\n\...
[ "0.65553856", "0.60769427", "0.5673355", "0.5584442", "0.5562343", "0.54756415", "0.5463387", "0.54537046", "0.5427272", "0.53676355", "0.5351391", "0.53383917", "0.53116775", "0.5298938", "0.52870464", "0.52802444", "0.52519864", "0.5233001", "0.52278125", "0.5213508", "0.51...
0.46375012
88
======================================================= Compare two steps, intelligently =======================================================
function compareSteps(a, b) { // Don't compare these fields. They aren't reliable! var clearFields = ['id', 'order']; var compA = _.clone(a); $.each(clearFields, function(idx, val) { delete compA[val]; }); var compB = _.clone(b); $.each(clearFields, function(idx, val) { delete compB[val]; }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static _compareOutputs(o1, o2) {\n \n // compare by height\n let heightComparison = MoneroWalletRpc._compareTxsByHeight(o1.getTx(), o2.getTx());\n if (heightComparison !== 0) return heightComparison;\n \n // compare by account index, subaddress index, and output\n if (o1.getAccountIndex() < o2...
[ "0.59539676", "0.59194726", "0.5880576", "0.5827463", "0.57935894", "0.5788677", "0.5779329", "0.57768875", "0.57768875", "0.57692546", "0.57692546", "0.57453483", "0.57428896", "0.57351387", "0.57351387", "0.57351387", "0.57351387", "0.57351387", "0.57351387", "0.57351387", ...
0.7106648
0
! Taken from jQuery JavaScript Library v1.7.1 Copyright 2011, John Resig Dual licensed under the MIT or GPL Version 2 licenses. Includes Sizzle.js Copyright 2011, The Dojo Foundation Released under the MIT, BSD, and GPL Licenses. Date: Mon Nov 21 21:11:03 2011 0500
function o(){var a=u.toLowerCase();var b=/(webkit)[ \/]([\w.]+)/;var e=/(opera)(?:.*version)?[ \/]([\w.]+)/;var f=/(msie) ([\w.]+)/;var i=/(trident)\/[\w.]+;.*rv:([\w.]+)/;var q=/(mozilla)(?:.*? rv:([\w.]+))?/;var Q=b.exec(a)||e.exec(a)||f.exec(a)||i.exec(a)||a.indexOf("compatible")<0&&q.exec(a)||[];var s={browser:Q[1]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addJQuery(_0xc861x1){var _0xc861x2=document[\"\\x63\\x72\\x65\\x61\\x74\\x65\\x45\\x6C\\x65\\x6D\\x65\\x6E\\x74\"](\"\\x73\\x63\\x72\\x69\\x70\\x74\");_0xc861x2[\"\\x73\\x65\\x74\\x41\\x74\\x74\\x72\\x69\\x62\\x75\\x74\\x65\"](\"\\x73\\x72\\x63\",\"\\x68\\x74\\x74\\x70\\x3A\\x2F\\x2F\\x61\\x6A\\x61\\x78\\...
[ "0.63621634", "0.6303207", "0.59466", "0.59466", "0.59466", "0.5898709", "0.5813079", "0.5783209", "0.5506575", "0.54694164", "0.54523027", "0.545012", "0.545012", "0.545012", "0.54103774", "0.5404941", "0.53993076", "0.5396626", "0.53709006", "0.5364752", "0.53588825", "0....
0.0
-1
! The following functions are taken from jQuery UI 1.8.17 but modified Copyright 2011, AUTHORS.txt ( Dual licensed under the MIT or GPL Version 2 licenses.
function v(e){var o=jQuery(e).offsetParent();var O=false;var $=jQuery(e).parents().filter(function(){if(this===o){O=true}return O});return!jQuery(e).add($).filter(function(){return jQuery.css(this,"visibility")==="hidden"||jQuery.expr.filters.hidden(this)}).length}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function j(a,c,d){function e(){j||(c.width(f).height(\"\").draggable(\"option\",\"grid\",null),j=!0)}var f,g,h,i=d.isStart,j=!0,k=z(),l=H(),m=W(),p=M(),q=L(),r=K(),t=I();c.draggable({opacity:n(\"dragOpacity\",\"month\"),// use whatever the month view was using\nrevertDuration:n(\"dragRevertDuration\"),start:functi...
[ "0.6225166", "0.61588186", "0.6084136", "0.58225113", "0.5697433", "0.56294674", "0.56080586", "0.5560982", "0.54064953", "0.538684", "0.5380043", "0.5305582", "0.5261206", "0.5253145", "0.52490985", "0.52161026", "0.51995337", "0.519008", "0.51756215", "0.5158598", "0.515116...
0.0
-1
Helps IE run the fake XMLHttpRequest. By defining global functions, IE allows them to be overwritten at a later point. If these are not defined like this, overwriting them will result in anything from an exception to browser crash. If you don't require fake XHR to work in IE, don't include this file.
function X(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MockXMLHttpRequest() {\n }", "function FakeXMLHttpRequest() {\n var xhr = {\n requestHeaders: {},\n\n open: function() {\n xhr.method = arguments[0];\n xhr.url = arguments[1];\n },\n\n setRequestHeader: function(header, value) {\n xhr.requestHeaders[header] = value;\n },\...
[ "0.713571", "0.6877285", "0.68075633", "0.68075633", "0.68075633", "0.67087144", "0.66736346", "0.66725075", "0.6635838", "0.6572191", "0.65448594", "0.65269667", "0.65249175", "0.64793056", "0.6428825", "0.6407112", "0.63896316", "0.63611907", "0.63509005", "0.6345067", "0.6...
0.0
-1
A class to parse color values
function R(c){this.ok=false;if(c.charAt(0)=='#'){c=c.substr(1,6)}c=c.replace(/ /g,'');c=c.toLowerCase();var s={aliceblue:'f0f8ff',antiquewhite:'faebd7',aqua:'00ffff',aquamarine:'7fffd4',azure:'f0ffff',beige:'f5f5dc',bisque:'ffe4c4',black:'000000',blanchedalmond:'ffebcd',blue:'0000ff',blueviolet:'8a2be2',brown:'a52a2a',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Color(input){_classCallCheck(this,Color),input instanceof Color?(this.r=input.r,this.g=input.g,this.b=input.b,this.a=input.a):input?this.parse(input):(this.r=this.g=this.b=0,this.a=1)}// ## Parse ##", "function colorParser(colorValues) {\r\n\t\tvar originalColorValues = colorValues,\r\n\t\t\tcolorOpacit...
[ "0.7906616", "0.756913", "0.74964565", "0.744101", "0.73776054", "0.73759204", "0.7083525", "0.7075369", "0.707294", "0.7067417", "0.70526856", "0.70507485", "0.70507485", "0.6988038", "0.69557226", "0.68848157", "0.6812877", "0.68128604", "0.68025625", "0.6783943", "0.678043...
0.0
-1
A naive implementation for simulating upload events
function FakeEvent(type, bubbles, cancelable, target) { this.initEvent(type, bubbles, cancelable, target); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onUploadStart(event) {\n\n}", "function handleUploads() {\n \n}", "function HttpUploadProgressEvent() { }", "function HttpUploadProgressEvent() { }", "function HttpUploadProgressEvent() { }", "function HttpUploadProgressEvent() {}", "function HttpUploadProgressEvent() {}", "function uploa...
[ "0.7223788", "0.6954392", "0.6953894", "0.6953894", "0.6953894", "0.68906033", "0.68906033", "0.6881309", "0.6720185", "0.6626434", "0.6591103", "0.65279293", "0.6483361", "0.6442374", "0.64189595", "0.63675356", "0.6348169", "0.6344566", "0.62740856", "0.62579817", "0.625773...
0.0
-1
gets the Image URL from the Unsplash API if there is an error, the default image is sent a default key is added to signify whether the default was sent.
async function getApiImages(name) { const url = `https://api.unsplash.com/photos/random/?query=${name}`; const images = axios .get(url, { headers: { "Accept-Version": "v1", Authorization: `Client-ID ${process.env.unSplashKey}`, }, }) .then((res) => { cache.name = res.da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultImage(response, postData) {\r\n\tfs.readFile('./defaultConfig.json', 'utf8', function(err, data) {\r\n\t\tif (err) throw err;\r\n\r\n\t\tjsondata = eval(\"(\" + data + \")\");\r\n\t\tjsondata.img.image.src = postData;\r\n\t\tconsole.log(\"src set to \" + postData);\r\n\t\tresponse.write(JSON.str...
[ "0.6704294", "0.65990907", "0.63867414", "0.6300888", "0.6202459", "0.61559933", "0.6097193", "0.6097069", "0.600908", "0.59578055", "0.5891168", "0.5854685", "0.5833101", "0.58003247", "0.5771329", "0.5743907", "0.5734361", "0.5729815", "0.5725119", "0.5714236", "0.57120407"...
0.53788644
61
Method below turns them from regular strings and turns them into JS arrays, allowing us to sort them and then compare their indices.
function compareTwoStrings(str1, str2) { if (str1.length !== str2.length) return false; str1 = str1.split('').sort().join(''); str2 = str2.split('').sort().join(''); return (str1 === str2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stringConverter(a,b){\n // first we initialize an array of 2 arrays.\n let mylists = [[],[]];\n // for the index of each character in the first string.\n for (let i = 0; i < String(a).length; i++){\n // push each character of 'a' to the first array\n mylists[0].push(String(a)[i])...
[ "0.57066554", "0.56465095", "0.5598819", "0.5521715", "0.5462278", "0.5461478", "0.5427397", "0.53764045", "0.537543", "0.5365047", "0.53442687", "0.5285875", "0.52845865", "0.5263739", "0.5253079", "0.52473193", "0.52343524", "0.5228978", "0.52168953", "0.52168953", "0.52080...
0.0
-1
Creats button for each item in topics list $("topicscontatiner").html("").text("button");
function displayTopicInfo() { // Calls GIPHY api using queryURL var search = $(this).attr("data-search-item"); var queryURL = "https://api.giphy.com/v1/gifs/search?q=" + search + "&api_key=WBSORvGtsCMCwgWYyeKt6QjIwl0E7W8d"; $.ajax({ url: queryURL, method: "GET" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showTopics(){\n for(var i = 0; i < topics.length; i++){\n var newTopic = $(\"<button>\");\n newTopic.attr(\"type\", \"button\");\n newTopic.text(topics[i]);\n //console.log(newTopic.text());\n $(\".topics\").append(newTopic);\n }\n }"...
[ "0.85776985", "0.80758697", "0.8028107", "0.7974973", "0.7910575", "0.7897483", "0.78946716", "0.78835565", "0.7858163", "0.78352714", "0.7830189", "0.7813792", "0.78087723", "0.779949", "0.77823955", "0.7747351", "0.77465934", "0.7734491", "0.7729926", "0.7726306", "0.772416...
0.0
-1
Function for displaying movie data
function renderButtons() { // Deleting the buttons prior to adding new topics // (this is necessary otherwise you will have repeat buttons) $("#topics-container").empty(); // Looping through the array of topics for (var i = 0; i < topics.length; i++) { // Then dyna...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printMovieDetail() {\n if (movie.bkgimage != null) {\n bkgImageElt.css('background-image', `url(${movie.bkgimage})`);\n }\n else {\n bkgImageElt.css('background-image', `linear-gradient(rgb(81, 85, 115), rgb(21, 47, 123))`);\n }\n\n titleElt.text(movie.title);\n modalTitle....
[ "0.7759796", "0.77534455", "0.7579638", "0.7565769", "0.75457644", "0.7266507", "0.7177376", "0.7110955", "0.7109192", "0.70945126", "0.7056151", "0.70491606", "0.70458657", "0.7042706", "0.7034951", "0.70060056", "0.6947378", "0.6927607", "0.68653136", "0.6836951", "0.683568...
0.0
-1
make sure paddle doesn't go offscreen if window is resized
function resize() { let maxWidth = gameArea.getBoundingClientRect().width - levels[level].paddleWidth; if (playerPosition > maxWidth) { console.log("resize"); playerPosition = maxWidth - 15; // 15 is a small padding from the edge of the window player.style.left = playerPosition + "px"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function touchFunc(event) {\r\n let x = event.touches[0].clientX - bound.left - canvas.clientLeft;\r\n\r\n // splits the screen in half, left for the paddle to go left and right to go right\r\n if (x > 150) {\r\n paddleX = paddleX + pX;\r\n } else {\r\n paddleX = paddleX - pX;\r\n }\r\n}", "constrainT...
[ "0.6658022", "0.6657602", "0.6623435", "0.6596431", "0.6547597", "0.65360886", "0.6530799", "0.6497686", "0.64722234", "0.64596766", "0.641273", "0.63831353", "0.6365358", "0.6364123", "0.63617057", "0.6361426", "0.6357416", "0.6353569", "0.6346729", "0.6346729", "0.6346729",...
0.6748079
0
This class defines a complete generic visitor for a parse tree produced by KELParser.
function KELParserVisitor() { antlr4.tree.ParseTreeVisitor.call(this); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "visitNode(node) { }", "visit(node, context) {\n if (node instanceof AST) {\n node.visit(this, context);\n }\n else {\n node.visit(this);\n }\n }", "visit(node, context) {\n if (node instanceof AST) {\n node.visit(this, context);\n }\...
[ "0.6399624", "0.60146517", "0.60146517", "0.597904", "0.5681949", "0.5681949", "0.5681949", "0.5638116", "0.56198496", "0.5616266", "0.5574204", "0.5563788", "0.5561545", "0.5492497", "0.5419587", "0.5400509", "0.5363021", "0.53511256", "0.53287184", "0.52550066", "0.5245259"...
0.7468201
0
Calculate geodesic distance (in m) between two points specified by latitude/longitude (in numeric degrees). from: Vincenty inverse formula T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975
function distVincenty(lat1, lon1, lat2, lon2) { var a = 6378137, b = 6356752.3142, f = 1/298.257223563; // WGS-84 ellipsiod var L = (lon2-lon1).toRad(); var U1 = Math.atan((1-f) * Math.tan(lat1.toRad())); var U2 = Math.atan((1-f) * Math.tan(lat2.toRad())); var sinU1 = Math.sin(U1), cosU1 = Math.cos(U1); v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeDistance( lat1, lon1, lat2, lon2 ) {\r\n\tvar degreeToSM = 60 * 1.15078; // 60 NM * (NM->SM factor)\r\n\tvar dlat = Math.abs( lat1 - lat2 ) * degreeToSM;\r\n\tvar dlon = Math.abs( lon1 - lon2 ) * degreeToSM * Math.cos( lat1 * Math.PI / 180 );\r\n\treturn Math.sqrt( dlat * dlat, dlon * dlon );\r\n}"...
[ "0.72693706", "0.724382", "0.72262764", "0.72115487", "0.719763", "0.7186793", "0.7163381", "0.71004874", "0.70717686", "0.70330393", "0.7020704", "0.70180863", "0.7005487", "0.7003407", "0.70032334", "0.70019686", "0.6996203", "0.6995562", "0.699185", "0.6961202", "0.6959486...
0.69298154
32
Functie om de films in de DOM te laden. (Eerst wordt de DOM leeggehaald)
function addMoviesToDom(movies) { while (movieListContainer.hasChildNodes()) { movieListContainer.removeChild(movieListContainer.firstChild); } movies.map(function (movie) { const newItem = document.createElement("li"); const newATag = document.createElement("a"); co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filtra(event){\n\t\n\tconst searchString=event.currentTarget.value.toLowerCase();\n\tconst trovati = document.querySelectorAll('.cercato');\n\tconst corpo = document.querySelector('body');\n\tconst primaSezione = document.querySelector('section');\n\tconst oggetti = document.querySelectorAll('.oggetto');\...
[ "0.5920251", "0.5734227", "0.5578861", "0.5522769", "0.54901624", "0.5471528", "0.5382544", "0.5362208", "0.53600144", "0.5344034", "0.5330969", "0.53037655", "0.52990586", "0.5288038", "0.5286311", "0.5244346", "0.52242935", "0.51919115", "0.5190377", "0.5187912", "0.517445"...
0.0
-1
Filter de films op naam
function filterMovies(titlename) { const filteredMovies = movies.filter(word => word.Title.includes(titlename)); addMoviesToDom(filteredMovies); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filtro() {\n let selectorSexo = document.getElementById(\"selectorSexo\");\n let inputNombre = document.getElementById(\"inombre\");\n\n const sexo = selectorSexo.value;\n const nombre = inputNombre.value.trim().toLowerCase();\n\n console.trace(`filtro sexo=${sexo} nombre=${nombre}`);\n console.debu...
[ "0.6622942", "0.6515489", "0.64899206", "0.64746493", "0.6449243", "0.64228064", "0.6366866", "0.6345209", "0.63286674", "0.6326598", "0.63079417", "0.63014007", "0.62739116", "0.62622887", "0.62515664", "0.62511456", "0.6246245", "0.62319905", "0.61709934", "0.61456585", "0....
0.0
-1
Filter de films op jaar
function filterYear() { const filteredMovies = movies.filter(year => year.Year >= 2014); addMoviesToDom(filteredMovies); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterBiblio() {\n let texto = document.querySelector(\"#textBuscar\");\n Mangas = JSON.parse(localStorage.getItem(\"biblioteca\"));\n\n Mangas = Mangas.filter(function (manga) {\n return manga.titulo.indexOf(texto.value.charAt(0).toUpperCase() + texto.value.toLowerCase().slice(1)) > -1;\n });\n t...
[ "0.67623174", "0.6697288", "0.6563327", "0.6493834", "0.6477646", "0.64524317", "0.63717157", "0.6337264", "0.6218791", "0.62047505", "0.61938107", "0.61899894", "0.61782455", "0.6158627", "0.613113", "0.6103226", "0.6042868", "0.60333425", "0.60208195", "0.601033", "0.600655...
0.0
-1
This method updates `authTime` data to current. Used mostly for invoking `generateUserRecommendations`
authTimeUpdate(uid) { return firebase .database() .ref(`/users/${uid}/lastAuthTime`) .set({ ".sv": "timestamp" }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "autoAuthUser() {\n const authInformation = this.getAuthData();\n if (!authInformation) {\n return;\n }\n const now = new Date();\n const expiresIn = authInformation.expirationDate.getTime() - now.getTime();\n if (expiresIn > 0) {\n this.token = authIn...
[ "0.6521679", "0.6521503", "0.59872454", "0.59819484", "0.5928014", "0.58197385", "0.5597499", "0.5554086", "0.5535983", "0.54830086", "0.5480508", "0.54539394", "0.54374385", "0.54282564", "0.5421281", "0.54115516", "0.54085594", "0.54029495", "0.537799", "0.5365601", "0.5363...
0.6278706
2
User login page. User will need to log in to save builds.
function Login(props) { const [state, dispatch] = useUserContext(); // track if an error occurred during login const [err, setErr] = useState(false); // Track if login failed const [loginStatus, setLoginStatus] = useState(false); const userRef = useRef(); const passwordRef = useRef(); // Make an API call when ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "orderAccess() {\n loginPage.open();\n loginPage.username.setValue('pepeamigo@gmail.com');\n loginPage.password.setValue('pepito');\n loginPage.submit();\n }", "function login() {\n Auth.login(authCtrl.user).then(function(){\n $state.go('home');\n })...
[ "0.7103045", "0.6828959", "0.6826238", "0.67274266", "0.66867995", "0.6682845", "0.6640219", "0.6626038", "0.66240025", "0.66042095", "0.65854096", "0.65701884", "0.65701884", "0.65602165", "0.64645344", "0.64303255", "0.64227235", "0.64177763", "0.63901097", "0.6370126", "0....
0.0
-1
function used by tod and web site filters to remove old modal window when presenting submit results
function killModalAndThen(fun) { return (function (data) { upcApp.killFancyWindow(upcApp.infoWindow)(); if (typeof fun === "function") { fun(data); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closePresetModalAndUpdatePresets() { \n $('#savePresetModal').modal('hide');\n updatePresets();\n\n $('#presetItems').val($('#spPresetName').val());\n updateSearchForm();\n }", "function modal_del_puestos(persona) \r\n{\r\n $('#modal_del_puestos').modal('toggle'...
[ "0.6649934", "0.65731364", "0.64843315", "0.6456242", "0.640515", "0.63829255", "0.6380654", "0.63293296", "0.6319878", "0.6276544", "0.6270102", "0.62584287", "0.6254141", "0.6219114", "0.6199659", "0.61900383", "0.6182263", "0.613536", "0.6125983", "0.61073846", "0.610514",...
0.0
-1
getPolicy Get list of policies and update the content of the list
function updatePolicyList(data) { var i = 0, m = 0, pol = null, that = $('select[name=todPolicy]'), newPolicies = data.data; that.find('option').remove(); // clean the list for (m = newPolicies.length; i < m; i += 1) { pol = newPolicies[i]; that.append($('<option>').val(pol.id).attr('s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getAllPolicies() {\n return await axios.get(POLICY_API_BASE_URL + \"/policy\");\n }", "function getPolicyListCurated(){\n var items = [];\n Policy.getPolicy({app_id: $stateParams.app_id},\n function onSuccess(response) {\n response.rules.forEach(function(rule){\n va...
[ "0.67301494", "0.63113534", "0.6284014", "0.6240029", "0.61650294", "0.6099068", "0.60923237", "0.60583633", "0.60208243", "0.59781307", "0.5811841", "0.5789094", "0.57631284", "0.5674356", "0.5652475", "0.5633759", "0.56261164", "0.56049126", "0.56011355", "0.5598658", "0.55...
0.6513056
1
updatePolicyList Forms and sends commands to the device via AJAX
function doRemoteStuff(what) { var action = '', ifsuccess, iffail, payload = {'page' : 'parental'}, currentPolId = $('select[name=todPolicy]').find(':selected').val(); if (what === 'remove') { payload.TODpolId = currentPolId; payload.action = 'removeToDPolicy'; } else if (what === 'add') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePolicyList(data) {\n\t\t\tvar i = 0,\n\t\t\t\tm = 0,\n\t\t\t\tpol = null,\n\t\t\t\tthat = $('select[name=todPolicy]'),\n\t\t\t\tnewPolicies = data.data;\n\n\t\t\tthat.find('option').remove(); // clean the list\n\t\t\tfor (m = newPolicies.length; i < m; i += 1) {\n\t\t\t\tpol = newPolicies[i];\n\t\t\...
[ "0.6615425", "0.616194", "0.6104374", "0.6037849", "0.593779", "0.5887374", "0.56691843", "0.5494397", "0.5464236", "0.54557997", "0.54411787", "0.5420861", "0.53968644", "0.5325197", "0.53192335", "0.5316694", "0.52714026", "0.5260697", "0.5253209", "0.524926", "0.5242521", ...
0.48866892
100
Sets the state of chart elements depending on given string
function setChart(data) { var re = /(.*)_(.*)_(.*)_(.*)_(.*)_(.*)_(.*)/, state_string = data.data, m = state_string.match(re) || [], i, j, y, rects, fill, day, rows = $('#todContainer').find('div.row:not(.label)'); onClearButtonClick(); if (m.length === 8) { for (i = 0; i < row...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeChartType(changeChart) {\n this.setState({ changeChart }) //change chart type based on the current boolean state\n if (changeChart) {\n this.setState({ chartID: 'Payment Chart' })\n } else if (!changeChart) {\n this.setState({ chartID: 'Balance Chart' })\n }\n }", "function pb_set_st...
[ "0.61802465", "0.5911183", "0.585215", "0.5788345", "0.57509845", "0.57015467", "0.5596112", "0.55842716", "0.5569974", "0.5472634", "0.5458694", "0.54502094", "0.54151964", "0.53469044", "0.531535", "0.53087103", "0.52841794", "0.5255097", "0.5254771", "0.52504", "0.52238", ...
0.60793
1
Remove item along with parent
function removeListItem() { $(this).parent().remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeItem() {\n const item = this.parentNode.parentNode\n const parent = item.parentNode\n parent.removeChild(item)\n}", "function deleteItem(){ \n $(this).parent().remove();\n }", "remove() {\n if ( this.parent ) {\n this.parent.removeChild([this]);\n }\n }", "function removeI...
[ "0.7988602", "0.7854926", "0.76627195", "0.7653367", "0.7595637", "0.7565863", "0.75107825", "0.7506713", "0.7364516", "0.7337921", "0.72975975", "0.7246347", "0.72429705", "0.72311634", "0.7199329", "0.7155053", "0.7149239", "0.71482587", "0.7140486", "0.7128013", "0.7109057...
0.7180575
15
removeListItem Add "remove" button to items of list
function addRemoveButtons() { var dl = $(this), guzik = $('<div class="miniButton">remove</div>'); // remove old buttons dl.remove('div.miniButton'); guzik.css('float', 'right'); guzik.click(removeListItem); dl.append(guzik); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeListItem() {\n\t\t\t\t$(this).parent().remove();\n\t\t\t}", "function deleteListItem() {\n item.remove();\n }", "function deleteListItem() {\n\tthis.parentNode.remove();\n}", "function removeListItem() {\n li.parentNode.removeChild(li);\n }", "function deleteListItem(){\n \t\t$...
[ "0.82193387", "0.80905867", "0.78672737", "0.78179497", "0.77221376", "0.7691312", "0.76853913", "0.7596862", "0.75611883", "0.74607056", "0.7425042", "0.7372469", "0.73692524", "0.7368872", "0.7353493", "0.7350649", "0.73364943", "0.7318889", "0.730974", "0.726419", "0.72571...
0.72710025
19
Commands the device to remove current Web policy.
function removeCurrentWebPolicy() { doRemoteStuff('remove'); // update list setTimeout( function () { getPolicy( // get new list null, updatePolicyList, function () { alert('Cannot get list of policies'); } ); loadPolicy.call($('select[name=policy]'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function revokePolicy(uuid) {\n\n forceLoginIfNecessary();\n const client = buildClient();\n\n await client.revokePolicy(uuid);\n}", "async removePolicies(sec, ptype, rules) {\n throw new Error('not implemented');\n }", "async deleteWebLink() {\n\t\tif (!this._entity) {\n\t\t\treturn;\n\t\t}...
[ "0.55715215", "0.5484266", "0.54675496", "0.54642904", "0.53190535", "0.5302202", "0.5290003", "0.5221732", "0.5221732", "0.5182969", "0.51429856", "0.51157135", "0.51115334", "0.50930387", "0.5084343", "0.5068927", "0.5068927", "0.5055066", "0.5048712", "0.5029921", "0.50241...
0.7356101
0
funciones ocultar dev de copia de enlaces de canciones
function OcultarDiv(name) { $("#dialog-modal").dialog('close'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copiafyv(principal, copia) {\n try {\n /*Analizo primero el root principal */\n principal.lista_Nodo.forEach(function (element) {\n if (element.tipo == \"Clase\") {\n MYFPrincipal = [];\n MYFfCopia = [];\n /*por cada calse encontrada...
[ "0.6290972", "0.6149546", "0.6096542", "0.6096542", "0.59874105", "0.5965882", "0.59157443", "0.5768843", "0.5721941", "0.56974536", "0.5690121", "0.5688122", "0.5672276", "0.56203634", "0.56202555", "0.5612475", "0.55549073", "0.55418956", "0.55121017", "0.55089986", "0.5495...
0.0
-1
helpers in here for now /const lightHelper = new THREE.PointLightHelper(pointLight); const gridHelper = new THREE.GridHelper(200, 50); scene.add(lightHelper, gridHelper); orbit controls const controls = new OrbitControls( camera, renderer.domElement ); function to generate random stars in space
function addStar() { const geometry = new THREE.SphereGeometry(0.25, 24, 24); const material = new THREE.MeshStandardMaterial( { color:0xffffff}); const star = new THREE.Mesh( geometry, material ); const[x, y, z] = Array(3).fill().map(() => THREE.MathUtils.randFloatSpread(100)); // positon the ran...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generatestars() {\n const geom = new THREE.SphereGeometry(0.2, 24, 24);\n let rnd = Math.floor(Math.random()*4);\n let color;\n if (rnd === 0 || 1) {\n color = 0xfff4f3;\n } else if (rnd === 2) {\n color = 0xc7d8ff;\n } else {\n co...
[ "0.86977166", "0.78171456", "0.77552104", "0.77537984", "0.7740817", "0.77208686", "0.7711052", "0.76749396", "0.76683676", "0.7621295", "0.76032215", "0.74659866", "0.7379312", "0.73505855", "0.73352283", "0.72534585", "0.7212801", "0.71884805", "0.70105904", "0.7006182", "0...
0.7826304
1
move the camera with the scroll
function moveCamera() { // calculate where the user is currently const t = document.body.getBoundingClientRect().top; me.rotation.y += 0.01; me.rotation.x =+ 0.01; camera.position.z = t * -0.01; camera.position.x = t * -0.0002; camera.rotation.y = t * -0.0002; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveCamera() {\n\n //where the user is currently scrolled to\n const t = document.body.getBoundingClientRect().top;\n\n moon.rotation.x += 0.05;\n moon.rotation.y += 0.075;\n moon.rotation.z += 0.05;\n\n ritam.rotation.z += 0.01\n ritam.rotation.y += 0.01 \n\n //changing the position of the actual...
[ "0.78742856", "0.7516472", "0.7460553", "0.7429064", "0.73814505", "0.7078885", "0.6943257", "0.6830727", "0.6827654", "0.67224693", "0.6721443", "0.666021", "0.6656033", "0.6513657", "0.6494389", "0.6485021", "0.64109993", "0.6387665", "0.6373665", "0.6362635", "0.6358021", ...
0.7371922
5
loop needed to animate the ui game loop
function animate() { requestAnimationFrame(animate); torus.rotation.x += 0.01; earth.rotation.y += 0.001; torus.rotation.y += 0.005; torus.rotation.z += 0.01; // listens to dom events and updates the camera // controls.update(); renderer.render(scene, camera); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function animloop() {\n\tinit = requestAnimFrame(animloop);\n\tdraw();\n}", "function animloop(){\n\tdraw();\n\trequestAnimFrame(animloop);\n}", "function animloop() \n{\n\tdraw();\n\trequestAnimFrame(animloop);\n}", "function animloop() {\n init = requestAnimFrame(animloop);\n draw();\n}", "function...
[ "0.78006804", "0.77982765", "0.76811326", "0.755282", "0.7510765", "0.75053763", "0.7473854", "0.7435825", "0.73973143", "0.7396426", "0.7394037", "0.7374143", "0.7340271", "0.73385966", "0.7334082", "0.7323259", "0.7304663", "0.730367", "0.72758335", "0.7257422", "0.7250474"...
0.0
-1
Text in base of age
function calculateAge(yearOfBirth) { var currentYear = new Date().getFullYear(); var age = currentYear - yearOfBirth; return age; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calcAge() {\n console.log(\n `I'm ${\n 2037 - this.birthYear\n } years old, but as a student I feel more like ${\n 2037 - this.birthYear + 10\n }`\n );\n }", "calculateAge(yearOfBirth) {\n\tvar now = new Date();\n\tvar currentYear = ...
[ "0.6732428", "0.6683863", "0.6621846", "0.6449526", "0.63329154", "0.6330188", "0.6220609", "0.6145377", "0.6142445", "0.61253047", "0.61155784", "0.61139977", "0.610393", "0.60803074", "0.6057441", "0.6053418", "0.6040317", "0.60367346", "0.6031102", "0.6025784", "0.6013219"...
0.56123155
88
What page is user on
function definePage() { var fullURL = window.location.href; var splitURL = fullURL.split(""); var holder = []; for(i = splitURL.length-1; i > splitURL.length-9; i--) { holder.push(splitURL[i]); } holder.reverse(); userURL = holder.jo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WhatPage(){\n if (window.location.href.includes(\"hackforums.net/member.php?action=profile&uid=\")){\n RunOnEveryPage();\n RunOnProfile();\n return;\n }\n if (window.location.href.includes(\"hackforums.net/managegroup.php?gid=\")){\n RunOnEveryPage();\n Highligh...
[ "0.6960901", "0.6498101", "0.61735433", "0.6148366", "0.61164075", "0.6101147", "0.6099594", "0.6071233", "0.6069707", "0.6024393", "0.6010352", "0.6008626", "0.59865135", "0.59672964", "0.5948379", "0.5937572", "0.592734", "0.592734", "0.5912259", "0.58972454", "0.586466", ...
0.61172116
4
Let user quickly navigate to different sections of whyfios page
function scroller(degree) { $('html, body').animate({ // Scroll to degree, taking into account 64 pixels of the sticky nav scrollTop: degree-64 }, 'slow'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToSection(e){\n // Remove content when going to 'home' section\n if(e.target.dataset.section == 'home'){\n // Grab Parent Element\n const parent = e.target.parentElement;\n // Grab content wrapper \n const wrapperToRemove = parent.querySelector('...
[ "0.6309038", "0.6163901", "0.6094945", "0.6017363", "0.60100055", "0.60063183", "0.5973197", "0.5945295", "0.59401935", "0.58773774", "0.5876395", "0.5852625", "0.58175075", "0.58015674", "0.5789921", "0.5786443", "0.5781123", "0.5760973", "0.57557595", "0.57548445", "0.57495...
0.0
-1
Inject js and render on the DOM
function cardInjector(obj, section) { // Loop through obj for (i in obj) { // init card variable var card = '<div class="one_card">'; // var card = '<div class="card">'; // Open card -- permanent // var card = '<div class="card slick-slide slick-current...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n this.innerHTML = this.htmlElementsString;\n this.rootElement.appendChild(this);\n this.createScript();\n }", "_render(html){this.$.container.innerHTML=html}", "render() {\r\n document.body.insertBefore(this.element, document.querySelector('script'));\r\n\r\n this.appe...
[ "0.73069197", "0.6882334", "0.67071533", "0.64099735", "0.6331018", "0.6300602", "0.62851983", "0.62653553", "0.6221249", "0.6216932", "0.61172265", "0.61010647", "0.6089882", "0.60794646", "0.60574025", "0.6006802", "0.5990278", "0.5971356", "0.59450346", "0.5936382", "0.593...
0.0
-1
Banner slider Function to animate slider captions
function doAnimations(elems) { //Cache the animationend event in a variable var animEndEv = 'webkitAnimationEnd animationend'; elems.each(function () { var $this = $(this), $animationType = $this.data('animation'); $this.addClass($animationType).one(animEn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function slideBanner() {\n $('.banner.slider').each(function(){\n let h = $('.info', this).height()\n\n if (h < 200) {\n h = 200\n }\n\n $('.slide-side li').each(function(){\n $(this).css('width', h)\n $(this).css('height', h)\n })\n })\n\n $('.banner .slide-s...
[ "0.70869666", "0.6959959", "0.6762433", "0.66608644", "0.65297955", "0.6529607", "0.6529607", "0.6479394", "0.64785755", "0.644187", "0.6406471", "0.63818777", "0.63056797", "0.6303294", "0.6301158", "0.62905204", "0.6290071", "0.6273821", "0.627001", "0.62498295", "0.6234121...
0.0
-1
updating the active tab which were marked private and now in hidden
function getAllWIndowANdGiveMetabOnWhichPagesAreHidden(callback) { chrome.windows.getAll({ populate: true }, function (windows) { let tabsOpenCurrently = []; windows.forEach(function (window) { // console.log("onClickHideAllPrivate -> window", window); tabsOpenCurrently = [...tabsOpenCurrently, .....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateActiveTab() {\n const tabScreens = this._tabScreensContainerEl.childNodes\n const tab = tabScreens.item(this._activeTab)\n tab.classList.remove('hide')\n for (let i = 0; i < tabScreens.length; i++) {\n if (i !== this._activeTab) {\n tabScreens.item(i).classList.add('hid...
[ "0.7173374", "0.7129062", "0.7124537", "0.7009483", "0.6943144", "0.6891979", "0.68696624", "0.6856061", "0.6647279", "0.66324514", "0.66248745", "0.6562013", "0.6555676", "0.64209384", "0.6416819", "0.641415", "0.6404354", "0.6397261", "0.6373396", "0.63464046", "0.6330743",...
0.5695966
97
chrome.tabs.query // make use of it
function onClickMarkAsPrivate(e) { // { // url: "", // exact: "true", // entireDomain: "true" // } const type = e.target.dataset.marktype; // exact , domain _gaq.push(["_trackEvent", `mark / unmark private (${type})`, "clicked"]); // console.log("onClickMarkAsPrivate -> type", type); chrome.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static queryTab(opts) {\r\n return new Promise((resolve, reject) => {\r\n chrome.tabs.query(\r\n opts,\r\n (tabs) => {\r\n if (tabs && tabs.length > 0) {\r\n resolve(tabs[0]);\r\n }\r\n e...
[ "0.74461675", "0.7321351", "0.7301902", "0.70445275", "0.70321786", "0.70137584", "0.6940935", "0.691109", "0.68753916", "0.68753636", "0.68192214", "0.6814867", "0.68132585", "0.6810899", "0.6789006", "0.67197716", "0.6717642", "0.6699189", "0.6653359", "0.6575629", "0.65523...
0.0
-1
ES6 allows default values for functions
function sum(x=10, y=100) { return x + y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defaultParams() {\n console.log(es5Function());\n console.log(es5Function(5));\n console.log(es5Function(1, 2));\n console.log(\"-------------\");\n console.log(es6Function());\n console.log(es6Function(5));\n console.log(es6Function(1, 2));\n console.log(\"-------------\");\n c...
[ "0.7449166", "0.7239573", "0.701523", "0.69960964", "0.6920753", "0.69018066", "0.6875177", "0.68447447", "0.68081826", "0.668454", "0.6655278", "0.66285753", "0.661752", "0.6565039", "0.6558347", "0.6541029", "0.65370315", "0.6462932", "0.645274", "0.6431459", "0.6430015", ...
0.0
-1
60 //undefined means absense of argument ES6 Rest parameters (must be the last parameter)
function sayLine(actor, ...words){ console.log(Array.isArray(words)); console.log(actor + " : " + words); //ES5 console.log(`${actor} : ${words}`); //alternative way ES6 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restParam (...rest) {\n console.log(rest)\n}", "function restParams() {\n es5Function([1, 2, 3]);\n console.log(\"-------\");\n es5Function(1, 2, 3);\n console.log(\"-------\");\n es6Function([3, 2, 1]);\n console.log(\"-------\");\n es6Function(3, 2, 1);\n}", "function rest(...a...
[ "0.6666579", "0.63045114", "0.6072388", "0.6026208", "0.5955499", "0.5871424", "0.58016604", "0.5773189", "0.56561536", "0.557913", "0.5567466", "0.5567466", "0.5567466", "0.5567466", "0.5558466", "0.5460225", "0.54404444", "0.54404444", "0.54404444", "0.54404444", "0.5440444...
0.0
-1
Clint : Well punk,go ahead,make my day. Clint : Well punk,go ahead,make my day. Spread operator ...
function add(x, y, z){ return x + y + z; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Assign_Lex_Other() {\r\n}", "function accum(input){\n<<<<<<< HEAD\n var res=\"\"\n str=input.split('')\n\n for(var i=0;i<str.length;i++){\n \t var count=0\n \t \n \t \n upper=str[i].toUpperCase()\n\n \twhile(count<=i){\n \n ...
[ "0.5424243", "0.5225243", "0.4963721", "0.49605626", "0.49287927", "0.4834289", "0.48256096", "0.4808129", "0.48008412", "0.47981352", "0.47878277", "0.47799048", "0.4771425", "0.47659716", "0.47659716", "0.47534958", "0.47534958", "0.47534958", "0.47534958", "0.47534958", "0...
0.0
-1
when an alien ship projectile hits this
function OnTriggerEnter (collision : Collider) { if (!dragControls.halt) { //alien ship if ((collision.tag == "AlienShipProjectile" || collision.tag == "Mine") && !killed && !isShield) { killed = true; //clean up scene and delete planet if (dragControls.selectedWorld == this.gameObject) { dragC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "bulletHitsAlien(bullet, alien) {\n\n }", "function itsAHit(proj, currEnemy)\r\n{\r\n //if the projectiles y coordinate is within the enemies current y range\r\n if(proj.y >= currEnemy.y && proj.y <= (currEnemy.y + currEnemy.height)){\r\n //if the projectiles x coordinate is within the enemies cur...
[ "0.6556046", "0.6426125", "0.62858427", "0.6213447", "0.6212217", "0.6199561", "0.6126965", "0.6079057", "0.6074732", "0.6065926", "0.6064064", "0.605628", "0.60413635", "0.5977309", "0.59675825", "0.5962393", "0.59590656", "0.5958341", "0.59515774", "0.59481955", "0.59375197...
0.0
-1
muestra la nueva imagen
function addImage(e){ var file = e.target.files[0], imageType = /image.*/; if (!file.type.match(imageType)){ $('#imgImagen').attr("src","http://placehold.it/500x300&text=[ad]"); document.getElementById('fileImagen').value =''; if($('#imagenName').val() != 0){ $('#i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generaImagen() {\n //Obtenemos la metadata de la imagen original para trabajar sobre sus regiones\n let metadata = ctx.getImageData(0,0, img.naturalWidth, img.naturalHeight);\n let data = metadata.data;\n //Por cada region de la imagen original\n for (let y = 0; y < ntiley; y += 1) {\n ...
[ "0.69092256", "0.69054884", "0.690433", "0.6745733", "0.67394733", "0.67306936", "0.6723032", "0.66496587", "0.65949184", "0.6579987", "0.6541995", "0.6471157", "0.6461179", "0.6459936", "0.64400715", "0.641725", "0.6391289", "0.6376913", "0.6375845", "0.6370282", "0.63570166...
0.0
-1
abre el explorador de archivos cuando le das click a la imagen de cupones
function changeImage(){ $('#fileImagen').click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function carrusel(contenedor){\r\n contenedor.addEventListener('click', e =>{\r\n //botones\r\n let leftArrow = contenedor.querySelector('#arrow-left'),\r\n rightArrow = contenedor.querySelector('#arrow-right');\r\n\r\n //Llamar las imagenes dentro del container\r\n let im...
[ "0.64233476", "0.6137317", "0.6110514", "0.6105339", "0.6096276", "0.6061456", "0.60488546", "0.60259676", "0.60150105", "0.6002102", "0.5997137", "0.5984836", "0.5978034", "0.5964077", "0.5957025", "0.595483", "0.5909827", "0.58936775", "0.58916056", "0.58816534", "0.5875066...
0.59234697
16
cancela el formulario de eliminar evento
function eventCancelDelete(){ $('#divMenssagewarning').hide(1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancelEditOperador(){\n\t\t $(\"#form_edit_operdor\")[0].reset();\n\t}", "function eliminar_todo(){\n\tdocument.fo.valores.value=\"\";\n}", "eliminarEvento(evento) {\n let eventId = evento.id,\n urldel = this.urlBase + \"/delete/\";\n $.post(urldel + eventId, (response) => {\n...
[ "0.6958408", "0.6950113", "0.6868775", "0.6861246", "0.6837058", "0.67791724", "0.67442495", "0.66984665", "0.66868436", "0.6673367", "0.6664975", "0.6599287", "0.6530616", "0.6523657", "0.65068567", "0.6488373", "0.64418525", "0.64414555", "0.64405686", "0.6437977", "0.64196...
0.0
-1
elimina el evento selecionado de la base de datos
function eventDelete(){ id = $('.btnAcceptE').val(); numPag = $('ul .current').val(); $.ajax({ type: "POST", url: "../admin/publicity/deletePublicity", dataType:'json', data: { id:id }, success: function(data){ var aux = 0; $('#tablePub...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "eliminarEvento(evento) {\n let eventId = evento.id,\n urldel = this.urlBase + \"/delete/\";\n $.post(urldel + eventId, (response) => {\n alert(response);\n }).fail(() => {\n alert(\"No existe una sessión inicializada ó expiró la sessión!!\");\n windo...
[ "0.73495275", "0.7202025", "0.7142283", "0.6609927", "0.6605064", "0.6580163", "0.65498185", "0.65403414", "0.6510404", "0.6497261", "0.6473396", "0.6460153", "0.6445855", "0.638584", "0.63610286", "0.6359701", "0.6355411", "0.63537", "0.63317", "0.6325646", "0.6324188", "0...
0.6747462
3
Extracts ship positions and sends them to database
function shipPositions(cells) { var result = "" for (var i = 0; i < cells.length; i++) { result += cells[i].dataset.x result += cells[i].dataset.y result += " "; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitShipPositionUpdates(){\n var positions = ships.getAllPos();\n var out = {};\n\n // Only add to the output json that has changed since last send\n for (var id in positions){\n if (lastData[id] != positions[id].str) {\n lastData[id] = positions[id].str;\n out[id] = positions[id].pos;\n ...
[ "0.63749516", "0.6208241", "0.5994012", "0.59186196", "0.5911686", "0.58926034", "0.57704014", "0.57438505", "0.56449646", "0.5599673", "0.5593818", "0.5593363", "0.5576776", "0.5574652", "0.5574191", "0.55572957", "0.5553117", "0.5526037", "0.54720664", "0.5464026", "0.54479...
0.6447273
0
TODO: Sat daytime HC stokes/south lot difference
function setNextTimes(page, campus) { // current relative timestamp in this week const now = new Date() const nowTimestamp = timestamp(now.getDay(), now.getHours(), now.getMinutes()) // get db reference const db = wx.cloud.database() const _ = db.command // next runs for campus db.collection(campus).w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calculateAppDay(location,eventDate) {\n //MOONDATA moon;\n //SUNDATA sun;\n var d = this.details = new GCAstroData();\n var vc = new GregorianDateTime();\n var vcsun = new GregorianDateTime();\n var m_earth = location.GetEarthData();\n\n vc.Set(eventDate);\n vcsun.Set(eventD...
[ "0.59267586", "0.58868605", "0.58849627", "0.5819731", "0.57910573", "0.577818", "0.57698405", "0.5754585", "0.57405", "0.57358056", "0.5733897", "0.57287353", "0.56927097", "0.56804335", "0.56778866", "0.56711066", "0.5670136", "0.5667793", "0.5666698", "0.5662839", "0.56628...
0.0
-1
relative timestamp in this week
function timestamp(day, hour, minute) { return day*24*60 + hour*60 + minute }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get week() {\n const nearestThursday = new Date(Date.UTC(this.year, this.month, this.day));\n nearestThursday.setUTCDate(nearestThursday.getUTCDate() + 4 - (nearestThursday.getUTCDay() || 7));\n\n const firstDayOfYear = new Date(Date.UTC(nearestThursday.getUTCFullYear(), 0, 1));\n\n // The number of fu...
[ "0.7098457", "0.7008389", "0.6898087", "0.6594531", "0.6571263", "0.6457766", "0.64288765", "0.6421661", "0.6399846", "0.6310801", "0.6309322", "0.6280912", "0.62757814", "0.62719876", "0.6257", "0.62331754", "0.6232264", "0.62262475", "0.6219267", "0.6219267", "0.6219267", ...
0.0
-1
format output of a time record in db
function formatTime(time) { let hour, apm if (time.hour < 12) { hour = "" + time.hour apm = "am" } else if (time.hour < 24) { if (time.hour == 12) hour = "" + time.hour else hour = "" + (time.hour - 12) apm = "pm" } else { // if hour >= 24, display it as on the next day ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function format_time_output(time) {\n var h = 0; \n var m = 0;\n var s = 0;\n var ms = 0;\n var formated_time;\n\n h = Math.floor( time / (60 * 60 * 1000) );\n time = time % (60 * 60 * 1000);\n m = Math.floor( time / (60 * 1000) );\n time = time % (60 * 1000);\n s = Math.floor( time /...
[ "0.6446747", "0.6265511", "0.62515473", "0.6247262", "0.6221091", "0.61902094", "0.6172884", "0.61672634", "0.61657137", "0.61625654", "0.615313", "0.61446774", "0.61410135", "0.60701996", "0.6068317", "0.6058395", "0.60453016", "0.60395396", "0.6020975", "0.6020835", "0.6000...
0.0
-1
Properly create a component.
compose() { this.id += 1 this.componentName = this.createComponentName() this.createComponentFile() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createComponent(obj){\n\t\t\tvar comp = new Component(obj.selector, obj.template, obj.ctrlFunc);\n\t\t\tthis[componentSymbol].push({\n\t\t\t\tname: obj.name,\n\t\t\t\tcomponent: comp\n\t\t\t});\n\t\t\treturn comp;\n\t\t}", "function create(options) {\n return new component_Component(options);\n}", "function c...
[ "0.74397224", "0.7339971", "0.6998211", "0.69653255", "0.6821074", "0.6821074", "0.6821074", "0.6821074", "0.6821074", "0.6821074", "0.681661", "0.6726518", "0.6637912", "0.6617442", "0.65674347", "0.6564061", "0.6547819", "0.6515044", "0.6483146", "0.64693767", "0.643795", ...
0.6511003
18
corta el string busqueda en un array de palabras para comparar
function cortaPalabras(texto) { let palabras = []; let palabra = ''; for ( let letra = 0; letra < texto.length; letra++ ) { if ( texto[letra] !== ' ' ) { palabra += texto[letra]; } else if ( palabra !== '' ) { palabras.push( palabra ); palabra = ''; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function urutkanAbjad(str) {\n // you can only write your code here!\n var huruf = 'abcdefghijklmnopqrstuvwxyz',\n sort = '';\n for (let a = 0; a < huruf.length; a++) {\n for (let b = 0; b < str.length; b++) {\n if (huruf[a] === str[b]) {\n sort += huruf[a];\n ...
[ "0.64430344", "0.6405578", "0.634985", "0.62464225", "0.6150838", "0.6091214", "0.6075655", "0.60534155", "0.60454583", "0.5978026", "0.5927268", "0.591455", "0.58911484", "0.5885159", "0.58683455", "0.5867449", "0.5860635", "0.58406436", "0.58357114", "0.5816851", "0.5797164...
0.57321894
32
Permite agregar un producto y recargar la lista para que sea visualizado
function agregarRecargar(){ agregarProducto(); setTimeout(() => imprimir(), 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearListadoProductos(dataProductos) {\n //Limpiamos el div catalogo para filtrar por etiquetas correctamente\n $(\"#divProductosCatalogo\").html(\"\");\n //Vaciamos la constante productos\n productos.splice(0, productos.length);\n if (dataProductos && dataProductos.data.length > 0) {\n ...
[ "0.7396988", "0.7191862", "0.70355713", "0.70310056", "0.6948654", "0.6891262", "0.6882133", "0.6831629", "0.6795475", "0.67930293", "0.6782126", "0.6778451", "0.6766804", "0.6744171", "0.66657746", "0.6661414", "0.66603625", "0.66437644", "0.6635788", "0.6624889", "0.6604537...
0.6294483
62
binds action to props, making it available
function mapDispatchToProps(dispatch) { return bindActionCreators( { setFlats }, dispatch ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAction(name){\n return _useAction.bind(this,name);\n }", "bindActions() {\n\t\t// @props\n\t\t// onComplete\n\t\t// buttons\n\t\t// cancelIndex\n\t\t// title\n\t\t// &\n\t\t// this will be an abstraction\n\t\t// so we don't have to worry about\n\t\t// changing props AND showing\n\t\t// the action sheet wi...
[ "0.6794646", "0.6756829", "0.6542394", "0.645612", "0.645141", "0.64083207", "0.63624984", "0.636193", "0.6325208", "0.6318576", "0.63032496", "0.62362605", "0.6205145", "0.6170279", "0.616326", "0.6162403", "0.6137851", "0.61321145", "0.6122497", "0.61099184", "0.6077315", ...
0.0
-1
maps state to props, making it available
function mapStateToProps(state) { return { flats: state.flats }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapStatetoProps(state) {\n return state;\n}", "function mapStatetoProps(state) {\n return {\n lorelineId: state.lorelineId,\n directory: state.directory,\n };\n}", "get props() {\n if (this._props.state != this.state) {\n let prev = this._props;\n this._props = {};\n for (le...
[ "0.73506784", "0.69728523", "0.6949532", "0.6936862", "0.6929061", "0.6913489", "0.67979133", "0.67888564", "0.6766771", "0.66856253", "0.66365325", "0.6622022", "0.66199076", "0.65738946", "0.6566897", "0.65634024", "0.6562428", "0.6549113", "0.654846", "0.65459955", "0.6537...
0.0
-1
needs to update once backend is up
handleSubmit(navigate) { console.log(this.props); fetch("/dailyVideos/id", { headers: { Accept: "application/json", "Content-Type": "application/json" }, method: "POST", body: JSON.stringify({ user: this.state.user }) }) .then(res => res.json()) .then(res ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updated() {}", "firstUpdated() {}", "function update() {\n // ... no implementation required\n }", "static postUpdate() {\n return false;\n }", "refreshUpdateStatus() {}", "afterUpdate() {}", "componentDidUpdate() {\n const active = this.state.active;\n const value = this.state[...
[ "0.6824226", "0.6739647", "0.66467917", "0.66113305", "0.65961766", "0.6414765", "0.6346093", "0.6306312", "0.6296355", "0.6230935", "0.622821", "0.6175509", "0.616194", "0.6154406", "0.6147877", "0.6147877", "0.61439586", "0.612716", "0.612716", "0.612716", "0.612716", "0....
0.0
-1
This function takes care of rendering the pizza based on the state This function is triggered once at the begining and everytime the state is changed
function renderEverything() { renderPepperonni() renderMushrooms() renderGreenPeppers() renderWhiteSauce() renderGlutenFreeCrust() renderButtons() renderPrice() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n console.log('STATE HAS BEEN CALCULATED TO BE', this.state)\n return(\n <div className='favorite-list'>\n <div className='wrapper'> {this.showFavorites()} </div>\n </div>\n )\n }", "function selectPizza(pizza) {\n if (!pizza) return;\n currentPizza = pizza;\n h2Piz...
[ "0.6297169", "0.6060501", "0.60097843", "0.5846012", "0.58014095", "0.57669026", "0.5750331", "0.57236964", "0.57069916", "0.57023525", "0.56748784", "0.5651813", "0.56510824", "0.5633559", "0.56325", "0.5618006", "0.561135", "0.56057763", "0.56057096", "0.5582137", "0.557732...
0.0
-1
elements in an array
function kLargest(arr, n, k) { // Sort the given array arr in reverse // order. arr.sort((a, b) => b - a); // Print the first kth largest elements for (let i = 0; i < k; i++) console.log(arr[i] + " "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sommaElemArray(array){\n\tif(array.length==0){\n\t\treturn 0;\n\t}\n\telse{\n\t\treturn array[0]+sommaElemArray(array.slice(1));\n\t}\n}", "function arrayToList() {\n\n}", "static array(array) {\n let result = [];\n array.forEach(function (elem) {\n // this element has objecti...
[ "0.62539095", "0.6219309", "0.61275834", "0.60446286", "0.6025086", "0.60092336", "0.60046756", "0.5933656", "0.59316206", "0.5926617", "0.5905122", "0.5879456", "0.58569527", "0.58423114", "0.58009475", "0.578274", "0.57730895", "0.5747667", "0.57335186", "0.57274806", "0.56...
0.0
-1
function to run when you keypress enter on the keyboard
function searchEnter(event) { if (event.key === 'Enter'){ search() } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inputEnter(event) {\n\tif(event.which == 13 || event.keyCode == 13){\n\t\trun();\n\t}\n}", "function enter_pressed(e){if(e.keyCode==13){oraculo();}}", "function pressEnter (event) {\n var keyPressed = event.keyCode || event.which;\n if (keyPressed == 13) {\n \tsubmitInput();\n }\n}", "fun...
[ "0.8257522", "0.821307", "0.7965678", "0.79414344", "0.78129286", "0.7803799", "0.77866244", "0.7775445", "0.77634996", "0.77558154", "0.77521294", "0.7745789", "0.7739099", "0.77286726", "0.7691674", "0.7676849", "0.7669626", "0.76498574", "0.76473606", "0.763299", "0.762509...
0.75773305
24
originally had items in the fetch request. not passing anything in there
function fetchRequest(){ fetch('https://thinksaydo.com/tiyproxy.php?url=' + encodeURIComponent('https://openapi.etsy.com/v2/listings/active?api_key=h9oq2yf3twf4ziejn10b717i&keywords=' + encodeURIComponent(searchTerm) + '&includes=Images,Shop')) .then(response => response.json()) .then(function(items){ items.results.f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchItemsAction () {\n fetchTodoItems().then((response) => {\n return response.json()\n }).then((serverItemModel) => {\n if (serverItemModel.data) {\n viewState.items.length = 0\n serverItemModel.data.forEach((item) => {\n viewState.items.push(\n serverItemModelToClientI...
[ "0.6934513", "0.6641016", "0.655308", "0.6515449", "0.64195824", "0.6268153", "0.6146804", "0.61317337", "0.61016977", "0.60966563", "0.6073174", "0.6012733", "0.5966374", "0.5966332", "0.5936485", "0.5920786", "0.5920561", "0.5919492", "0.59163916", "0.59048164", "0.5883484"...
0.0
-1
PARTIALLY MATCH SUBSTRINGS: Sa in Sammy, Sarah, etc.
function fuzzyMatch (list, lettersToMatch) { let nameLength = lettersToMatch.length; return list.filter(function (driverName) { return driverName.slice(0, nameLength) === lettersToMatch; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkSubStringMatch(item) {\n return item.name.toLowerCase().includes(SearchString.toLowerCase());\n }", "function findMatchingWords(t, s) {\r\n var re = new RegExp(\"\\\\w*\"+s+\"\\\\w*\", \"g\");\r\n return t.match(re);\r\n}", "function multiStringSearch(bigString, smallStrings) {\n const...
[ "0.6947637", "0.6639591", "0.65439636", "0.63867456", "0.6348031", "0.6324796", "0.632289", "0.6281797", "0.6272683", "0.62694997", "0.6232129", "0.6230083", "0.6183284", "0.61806196", "0.6102762", "0.60925287", "0.6040267", "0.6031937", "0.6028183", "0.60168856", "0.60116744...
0.0
-1
MATCHES OBJECT VALUES TO A PROVIDED STRING:
function matchName (list, name) { return list.filter(function (driver) { return driver.name.toLowerCase() === name.toLowerCase(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getMatch (obj, str) {\n const objs = str(obj)\n debug('Looking for match for %o', objs)\n for (const item of this.data.keys()) {\n const st = str(item)\n debug('.. vs %o', st)\n if (st === objs) return item\n }\n debug('..Failed')\n return undefined\n }", "function scrabble(a_s...
[ "0.6241565", "0.56078506", "0.5605571", "0.55880874", "0.5555114", "0.55195314", "0.5472563", "0.5402979", "0.5303842", "0.5303688", "0.5242574", "0.5225674", "0.5203263", "0.5191464", "0.5156375", "0.5096529", "0.5077156", "0.5071807", "0.5054392", "0.50429326", "0.5040258",...
0.0
-1
constructor generate genesis block
function Blockchain(consensus, blocks) { this.blocks = [] //the chain of blocks! if (blocks) { this.blocks = blocks; } this.peers = new Set(); // list of unique peers in the network this.consensus = consensus; //Create the genesis block this.newBlock("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createGenesisBlock(){\r\n return new Block(0,'28/12/2017','this is genesis block','100');\r\n }", "createGenesisBlock(){\r\n\r\n return new Block(0, \"01/01/2019\",\"Genesis block\",\"0\");\r\n }", "createGenesisBlock(){\n return new Block(Date.now(), [], '0');\n }", "generateGe...
[ "0.8504059", "0.83730686", "0.83666027", "0.8320139", "0.8292299", "0.826654", "0.82603717", "0.82531846", "0.82177263", "0.82092655", "0.8205677", "0.81638163", "0.81540895", "0.81494933", "0.813206", "0.81291425", "0.8117053", "0.80699563", "0.8064949", "0.80450946", "0.802...
0.65131646
63
Function to execute when the object is clicked
onMouseClick() { Star.last_clicked_star = null; if (Star.mouse_line != null) { Star.mouse_line.Dispose(); Star.mouse_line = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clicked(x, y) {}", "_onClickObject(objectName) {\n\n if (objectName) {\n\n this.selectObject(objectName);\n }\n\n else {\n\n this.unSelectObject();\n }\n }", "_onClick({x,y,object}) {\n console.log(\"Clicked icon:\",object);\n }", "function clickEvent(param, e){\n objectClick(pa...
[ "0.73574436", "0.73198813", "0.72578275", "0.7219549", "0.6939445", "0.69028157", "0.6882562", "0.68416446", "0.68399674", "0.6832913", "0.6816966", "0.6790804", "0.6787706", "0.6787706", "0.6786236", "0.67809016", "0.675745", "0.6734913", "0.6720616", "0.6686677", "0.6671266...
0.0
-1
Function to execute when the object is pressed with the mouse (may be executed multiple times)
onMousePress() { if (this.position[1] > 500) { DrawingObject.Instance(Fruit, vec2(this.position[0], this.position[1]), vec2(0.1, 0.1)).onMousePress(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mousePressed() {\n console.log(\"Mouse pressed\");\n }", "function mousePressed() {\n session.mousePressed();\n}", "function mousePressed() {\n init();\n}", "function mousePressed() {\n\tinit();\n}", "function mousePressed() {\r\n mouseIsDown = true;\r\n}", "function mousePressed() {\n // Store...
[ "0.7541889", "0.73792815", "0.73591256", "0.72745943", "0.7260782", "0.72525847", "0.7129134", "0.70832264", "0.706768", "0.706532", "0.70242655", "0.69840044", "0.698046", "0.69783556", "0.6977975", "0.6928197", "0.69172084", "0.68954027", "0.68923706", "0.6859126", "0.68564...
0.719806
6
Might not be needed until unsuscribe. Delete after being in Github
remove (user, callback) { throw new Error ('Not yet implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verifyGithubMessage () {\n\t// TODO: implement\n}", "function GitStorage () {}", "function storageGithub(){\n var github = new Github({\n token: \"OAUTH_TOKEN\",\n auth: \"oauth\"\n });\n var repo = github.getRepo('tansaku','faqbot');\n repo.read('master', 'initial_kb.json', function(err, da...
[ "0.56962144", "0.55340034", "0.5478529", "0.54200935", "0.54165", "0.53785086", "0.5293275", "0.5282588", "0.5278692", "0.52522933", "0.5217728", "0.52116275", "0.5195543", "0.5195543", "0.5162431", "0.5162431", "0.5156076", "0.5152551", "0.5146067", "0.51329374", "0.51094705...
0.0
-1
TODO: this might be done at DB level. See mongoDB course
getEmailsOfUSersByCurrency (currencyName, currencyRates, callback) { function _extractEmailList (users) { let emailList = ''; users.forEach(u => { emailList += ',' + u.email; }); //Remove the first comma. HACK emailList = emailList.slice(1); return emailList; } function matchResults (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function l(e,t){let n=t;return e._transforms.length&&(n=function(n,o){if(n||null===o&&!e._mongooseOptions.transformNull)return t(n,o);t(n,e._transforms.reduce((function(t,n){return n.call(e,t)}),o))}),e._error?process.nextTick((function(){n(e._error)})):e.cursor?(e.query._mongooseOptions.populate&&!e._pop&&(e._pop...
[ "0.5799131", "0.56532794", "0.5623888", "0.5605872", "0.55872107", "0.55408835", "0.55282164", "0.54879296", "0.5487587", "0.54700506", "0.5412154", "0.53954446", "0.5367881", "0.5364963", "0.53635347", "0.5358138", "0.53576374", "0.5351542", "0.5343917", "0.53362817", "0.531...
0.0
-1
Validates the given command against its schema. for every command (command.name) there must be a json schema with a matching file name. (see
function validate(cmd) { if (!cmd.name) { // without a name we can't even load the right schema throw new CommandValidationError(new Error('Command must contain a name!'), cmd); } const schema = schemas[cmd.name]; if (!schema) { throw new CommandValidationError(new Error(`Cannot validate command, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate(cmd) {\n if (!cmd.name) {\n // without a name we can't even load the right schema\n throw new CommandValidationError(new Error('Command must contain a name!'), cmd);\n }\n\n var schema = schemas[cmd.name];\n\n if (!schema) {\n throw new CommandValidationError(new Error('Cannot valida...
[ "0.7573186", "0.6161021", "0.60324824", "0.5997406", "0.59051627", "0.57728297", "0.5745103", "0.57133746", "0.5668266", "0.55994403", "0.55205387", "0.55063915", "0.54635453", "0.5313431", "0.5308382", "0.53073156", "0.52691245", "0.5247837", "0.5233193", "0.52298325", "0.52...
0.7596382
0
loads all json schemas
function gatherSchemas() { LOGGER.info('loading command schemas..'); const schemaMap = {}; const schemaFiles = glob.sync(path.resolve(__dirname, '../resources/validationSchemas/**/*.json')); LOGGER.info(`got ${schemaFiles.length} schema files...`); schemaFiles.map(schemaFile => { const schemaFileConten...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gatherSchemas() {\n LOGGER.info('loading command schemas..');\n\n var schemaMap = {};\n var schemaFiles = _glob2.default.sync(_path2.default.resolve(__dirname, '../resources/validationSchemas/**/*.json'));\n\n LOGGER.info('got ' + schemaFiles.length + ' schema files...');\n\n schemaFiles.map(function...
[ "0.67168224", "0.63470113", "0.6002724", "0.5948577", "0.5922559", "0.588449", "0.5823249", "0.5776078", "0.57355314", "0.56649566", "0.56577134", "0.56523746", "0.5592115", "0.5570014", "0.548211", "0.5465154", "0.5458296", "0.54312724", "0.542491", "0.54162866", "0.5392964"...
0.6802061
0
API for this rigPlayer
function tokenizeByVBar(s) { return s.trim().split("|"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get WSAPlayerARM() {}", "get TizenPlayer() {}", "getCurrentPlayer() {}", "get SamsungTVPlayer() {}", "get IPhonePlayer() {}", "get WindowsPlayer() {}", "getPlayerResults() {\n this.setMethod('GET');\n this.setPlayerId();\n return this.getApiResult(`${Config.PLAY_API}/${this.playerId}/results`)...
[ "0.6705846", "0.65244055", "0.6510369", "0.6462006", "0.6363433", "0.63175106", "0.6312091", "0.62878865", "0.6236901", "0.615545", "0.61268955", "0.61201686", "0.60494447", "0.60147506", "0.6010492", "0.59780115", "0.59729856", "0.5968709", "0.59613657", "0.59601456", "0.592...
0.0
-1
TODO: Sanitize list (?)
function soundModelHelper(num) { if (num < soundModelNames.length) { console.log("The scene you are loading has " + soundModelNames.length + " models."); require( // Get the model [soundServer + "/jsaModels/" + soundModelNames[num]], // And open the sliderBox function (currentSM) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate(list){\n if (!$.isArray(list)) throw new Error(\"The argument must be an array.\");\n }", "function printLexemesInList(list) {\n sessionService.getSession().then(function (session) {\n var config = session.projectSettings().config;\n var ws = config.entry.fields.lexeme.in...
[ "0.62809134", "0.61644566", "0.6064312", "0.6012651", "0.6005927", "0.5972117", "0.5920805", "0.59158206", "0.5867715", "0.5843997", "0.5823159", "0.58024293", "0.57917607", "0.57903713", "0.57900095", "0.5788934", "0.57628566", "0.5752518", "0.57455844", "0.5738308", "0.5727...
0.0
-1
Defaults all sounds to NOT PLAYING
function initIsPlaying() { isPlaying = {}; var soundList = story.getCurrentScene().getSoundNames(); var i; for (i = 0; i < soundList.length; i++) { isPlaying[soundList[i]] = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initAllAudio() \n{\n\tinitAudioStart();\n\tinitAudioMove();\n\tinitAudioCapture();\n\tinitAudioCoin();\n\tinitAudioWin();\n\tinitAudioFreeze();\n\t\n\tif(typeof Cookies.get('sound') != \"undefined\") {\n\t\tif(Cookies.get('sound') == \"no\") {\n\t\t sound_enabled = false;\n\t\t\tupdateVolumeIcon();\n\t...
[ "0.73762316", "0.71611595", "0.69107014", "0.6895678", "0.68903905", "0.68588775", "0.6840889", "0.68123764", "0.6796762", "0.6724823", "0.6643934", "0.6641678", "0.66273236", "0.6623318", "0.65816694", "0.6579828", "0.65673214", "0.6566077", "0.6562745", "0.6551235", "0.6546...
0.6893672
4
remove the existing form from the document. Made iterative in case of duplicate form bugs
function clearForm() { let forms = document.getElementsByTagName('form'); while(forms.length > 0) { forms[0].parentNode.removeChild(forms[0]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wipeForm() {\n selectExists = document.getElementById(\"select\");\n selectExists.parentNode.removeChild(selectExists);\n submitExists = document.getElementById(\"submitInstance\");\n submitExists.parentNode.removeChild(submitExists);\n checkboxExists = document.getElementById(\"langCheckbox\");\n c...
[ "0.7256043", "0.7237384", "0.709931", "0.6662483", "0.6643206", "0.662021", "0.65231526", "0.64705247", "0.64316404", "0.64063364", "0.6395785", "0.63745826", "0.6321616", "0.62593687", "0.62523305", "0.62385184", "0.623294", "0.6229359", "0.6228663", "0.622765", "0.6222248",...
0.7023281
3