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
Iteration 1: Ordering by year Order by year, ascending (in growing order)
function orderByYear(arr) { const newOrderByYear = arr; if (newOrderByYear.length === 0) return null; newOrderByYear.sort(function tata(a, b) { if (a.year === b.year) { if (a.title.toLowerCase() < b.title.toLowerCase()) return -1; if (a.title.toLowerCase() > b.title.toLowerCase()) return 1; return 0; } return a.year - b.year; }); return newOrderByYear; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderByYear(someArr){\n const order = someArr.sort((a, b) => a.year > b.year ? 1 : -1)\n return order;\n}", "function orderByYear(arr) {\n let byYear = [...arr].sort((s1, s2) => {\n if (s1.year > s2.year) return 1;\n else return -1\n })\n return byYear\n}", "function order...
[ "0.72275954", "0.7135998", "0.7133108", "0.71112806", "0.7054949", "0.7049193", "0.7022546", "0.7011991", "0.70116156", "0.6954844", "0.69396275", "0.6934575", "0.69301045", "0.69145787", "0.6911264", "0.6902474", "0.68897897", "0.68856317", "0.6878473", "0.68769145", "0.6869...
0.67406553
29
Iteration 2: Steven Spielberg. The best? How many drama movies did STEVEN SPIELBERG direct
function howManyMovies(arr) { if (arr.length === 0) return 0; let result = arr.reduce(function toto(counter, currentValue) { if (currentValue.director === "Steven Spielberg") { const newArray = currentValue.genre.filter(word => word === "Drama"); if (newArray.length === 1) counter += 1; } return counter; }, 0); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howManyMovies(movies){\n if (movies == 0){}\n else {\n var dramaFilms = [];\n for (var i = 0; i < movies.length; i++){\n for (var j = 0; j < movies[i].genre.length; j++){\n if (movies[i].genre[j] === 'Drama'){\n dramaFilms.push(movies[i])\n }\n }\n}\n var stevenFilms = dramaFilms.filter(...
[ "0.6599791", "0.6452357", "0.6384614", "0.63421434", "0.6332595", "0.63319165", "0.63164216", "0.63152874", "0.6275804", "0.62735355", "0.62440383", "0.6230899", "0.6197044", "0.6191867", "0.618923", "0.6166216", "0.6164496", "0.6154068", "0.61267", "0.6120344", "0.61020464",...
0.0
-1
Iteration 3: Alphabetic Order Order by title and print the first 20 titles
function orderAlphabetically(arr) { const newOrderByTitle = arr.map(function toto(element) { return element.title; }); newOrderByTitle.sort(function tata(a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; }); const printTitle = newOrderByTitle.reduce(function tata( counter, currentValue, i ) { if (i < 20) { counter.push(currentValue); return counter; } return counter; }, []); return printTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function orderAlphabetically(array){\n let titles = array.map(i=>i.title)\n if (array.length <= 20) {\n for (i = 0; i<array.length; i++) {\n console.log(titles.sort()[i]);\n }\n } else {\n for (i = 0; i<20; i++) {\n console.log(titles.sort()[i]);\n }\n }\n}", "fu...
[ "0.7802368", "0.77193654", "0.7522371", "0.7512336", "0.7457542", "0.742906", "0.7409642", "0.7399199", "0.7321033", "0.72911745", "0.7289373", "0.7281388", "0.7260636", "0.7214834", "0.7187485", "0.715737", "0.71364206", "0.71335155", "0.713124", "0.71095073", "0.7099242", ...
0.7455117
5
Iteration 4: All rates average Get the average of all rates with 2 decimals
function ratesAverage(arr) { if (arr.length === 0) return 0; const total = arr.reduce(function (counter, currentValue, i) { if (typeof currentValue.rate === "number") { return (counter += currentValue.rate); } return counter; }, 0); var average = Math.round((total / arr.length) * 100) / 100; return average; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ratesAverage(arr) {\n var allRates = arr.reduce(function(acc, elem) {\n return (acc += Number(elem.rate));\n }, 0);\n return parseFloat((allRates / arr.length).toFixed(2));\n}", "function ratesAverage(allRates) {\n\n if (allRates.length === 0) {\n return 0;\n }\n\n meanRates = allR...
[ "0.81201476", "0.8045915", "0.8008566", "0.79965955", "0.7941593", "0.7932597", "0.7908035", "0.79006124", "0.7883331", "0.78522944", "0.78420365", "0.7804975", "0.7800371", "0.7782459", "0.7768673", "0.77451664", "0.7740817", "0.77304035", "0.7724927", "0.7723992", "0.772089...
0.75693256
35
Iteration 5: Drama movies Get the average of Drama Movies
function dramaMoviesRate(arr) { let result = arr.reduce(function toto(counter, currentValue) { const newArray = currentValue.genre.filter(word => word === "Drama"); if (newArray.length === 1) counter.push(currentValue); return counter; }, []); return ratesAverage(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateMovieAverage() {\n\tfor (let i = 0; i < movies.length; i++) {\n\t\tlet sumOfRatings = movies[i].ratings.reduce((a, b) => a + b, 0);\n\t\tmovies[i].average = sumOfRatings / movies[i].ratings.length;\n\t}\n}", "function dramaMoviesRate(movies) {\n let drama = movies.filter(function(elem){\n ...
[ "0.8198215", "0.8126122", "0.80235314", "0.79801685", "0.7953655", "0.79192615", "0.78840476", "0.78715247", "0.7824512", "0.7768616", "0.77648723", "0.775556", "0.7724957", "0.7711103", "0.7704011", "0.7691488", "0.7689545", "0.76855373", "0.7682447", "0.7660273", "0.763618"...
0.0
-1
.doc application/msword .docx application/vnd.openxmlformatsofficedocument.wordprocessingml.document .rtf application/rtf .xls application/vnd.msexcelapplication/xexcel .xlsx application/vnd.openxmlformatsofficedocument.spreadsheetml.sheet .ppt application/vnd.mspowerpoint .pptx application/vnd.openxmlformatsofficedocument.presentationml.presentation .pps application/vnd.mspowerpoint .ppsx application/vnd.openxmlformatsofficedocument.presentationml.slideshow .pdf application/pdf .swf application/xshockwaveflash .dll application/xmsdownload .exe application/octetstream .msi application/octetstream .chm application/octetstream .cab application/octetstream .ocx application/octetstream .rar application/octetstream .tar application/xtar .tgz application/xcompressed .zip application/xzipcompressed .z application/xcompress .wav audio/wav .wma audio/xmswma .wmv video/xmswmv .mp3 .mp2 .mpe .mpeg .mpg audio/mpeg .rm application/vnd.rnrealmedia .mid .midi .rmi audio/mid .bmp image/bmp .gif image/gif .png image/png .tif .tiff image/tiff .jpe .jpeg .jpg image/jpeg .txt text/plain .xml text/xml .html text/html .css text/css .js text/javascript .mht .mhtml message/rfc822
function _mime_icon(_mime) { var _word = "img/document-word.png", _xls = "img/document-xls.png", _pdf = "img/document-pdf.png", _ppt = "img/document-ppt.png", _plain = "img/document-plain.png", _map = { "application/vnd.openxmlformats-officedocument.wordprocessingml.document": _word, "application/msword": _word, "application/vnd.ms-excel": _xls, "application/x-excel": _xls, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": _xls, "application/vnd.ms-powerpoint": _ppt, "application/vnd.openxmlformats-officedocument.presentationml.presentation": _ppt, "application/vnd.openxmlformats-officedocument.presentationml.slideshow": _ppt, "application/pdf": _pdf }; if (_map.hasOwnProperty(_mime)) { return _map[_mime]; } return _plain; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static isNotDocument(url) {\n return !url.endsWith(\".pdf\") && !url.endsWith(\".jpg\") && !url.endsWith(\".png\") && !url.endsWith(\".gif\") && !url.endsWith(\".xml\") && // content-type might be html but we get xml.\n !url.endsWith(\".docx\") && !url.endsWith(\".doc\");\n }", "get acceptFormat(){\n ...
[ "0.55954695", "0.5444331", "0.5373284", "0.5365708", "0.5356482", "0.535422", "0.53365904", "0.5224851", "0.51749176", "0.51488435", "0.5106854", "0.5063267", "0.5036805", "0.5030029", "0.49933258", "0.49858913", "0.49710798", "0.49445194", "0.49357945", "0.49357945", "0.4935...
0.49499685
17
xiyun logout user session
function logoutSession(url){ window.location.href='http://i.kuwo.cn/US/st/Logout?returnUrl=' + encodeURIComponent(url); return false; // delCookie('userid'); // delCookie('username'); // delCookie('mlogdomain'); // delCookie('uph'); // delCookie('sid'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _logOutUser () {\n \tserverRequestService.serverRequest(PROJET_HEADER_CTRL_API_OBJECT.logout, 'GET');\n }", "function logout() {\n window.Lemonade.Mirror.send('logout', CookieManager.getCookie('loggedIn_user'), CookieManager.getCookie('loggedIn_session'));\n\n Store.AuthStore.dispatch(Auth.L...
[ "0.80764824", "0.7931999", "0.7824316", "0.7813411", "0.7771082", "0.7765492", "0.7762929", "0.77022004", "0.77019215", "0.76997375", "0.76596737", "0.76484156", "0.76423216", "0.7631306", "0.7608301", "0.75981075", "0.7596558", "0.75945014", "0.7593403", "0.7584894", "0.7582...
0.75510335
28
xiyun update user lastaccesstime
function updateSession(){ if(getCookie('userid')!='' && getCookie('sid')!='') { var ss = new Image(); ss.src="http://i.kuwo.cn/US/st/UpdateAccessTime?t="+Math.random(); } else { delCookie('userid'); delCookie('username'); delCookie('uph'); delCookie('sid'); delCookie('mlogdomain'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "authTimeUpdate(uid) {\n return firebase\n .database()\n .ref(`/users/${uid}/lastAuthTime`)\n .set({ \".sv\": \"timestamp\" });\n }", "static async updateLoginTimestamp(username) {\n await db.query(\n `UPDATE users SET last_login_at=current_timestamp\n WHERE username = $1`,\n ...
[ "0.6902315", "0.6872304", "0.6769346", "0.6764141", "0.672392", "0.6563959", "0.65585136", "0.65514416", "0.654173", "0.6432924", "0.6421393", "0.6394496", "0.63927233", "0.63302773", "0.6320249", "0.631359", "0.631006", "0.6180606", "0.6129761", "0.60143065", "0.59815574", ...
0.56602937
29
Constructor Function for Book objects
function Book(title, author, pages, read) { // Book properties this.title = title; this.author = author; this.pages = pages; this.read = read; // Book methods this.info = function () { let readString; if (read === true) { readString = "has been read"; } else { readString = "not yet read"; } return `${title} by ${author}, ${pages} pages, ${readString}`; }; // toggleRead function toggleRead() { this.read.toggle(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Book(title, author){\n this.title = title\n this.author = author\n}", "function Book(title,author,isbn){\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n}", "function NewBook(title, author) {\n this.title = title;\n this.author = author;\n}", "function Book(title, author, i...
[ "0.80558854", "0.7919437", "0.7913169", "0.78587216", "0.78587216", "0.78587216", "0.78587216", "0.78587216", "0.78477687", "0.7831203", "0.7779412", "0.7748203", "0.7695673", "0.7678962", "0.76489854", "0.7648126", "0.76422364", "0.7622592", "0.7615601", "0.7598012", "0.7598...
0.0
-1
addBookToLibrary Function adds a new book to the myLibrary array
function addBookToLibrary(title, author, pages, read) { let newBook = new Book(title, author, pages, read); libraryBooks.push(newBook); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addBookToLibrary(book) {\n myLibrary.push(book);\n}", "function addBookToLibrary(book) {\n myLibrary.push(book)\n}", "function addBookToLibrary(book) {\n library.push(book);\n}", "function addBookToLibrary(book){\n\tmyLibrary.push(book);\n\tdisplayBooks();\n}", "function addToLibrary(book)...
[ "0.91456014", "0.9139765", "0.9083749", "0.90422684", "0.8894151", "0.8832982", "0.8818549", "0.87265706", "0.87205976", "0.85496515", "0.8539258", "0.853406", "0.8525349", "0.8438339", "0.8301854", "0.828325", "0.8273235", "0.82620376", "0.82567316", "0.82456297", "0.8219738...
0.81920874
22
render Function show libraryBooks objects in the browser
function render(books) { libraryBooks.forEach((book) => { renderBook(book); }); body.append(bookList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static displayBooks(){\n let books = Store.getBooks();\n const ui = new UI();\n\n // Add all books to list\n books.forEach(function(book){\n ui.addBookToLib(book);\n });\n }", "function renderBooks(myLibrary) {\n // Build card for each book and add it to the display\n for (let i of myLibra...
[ "0.7930306", "0.78063345", "0.77037954", "0.76526326", "0.764085", "0.762722", "0.7621316", "0.7526694", "0.74789506", "0.7430384", "0.741556", "0.73906434", "0.7233656", "0.71742445", "0.7159441", "0.709995", "0.70596313", "0.7034974", "0.7016732", "0.7016492", "0.70043766",...
0.7662185
3
renderBook Function renders a new book card in the DOM
function renderBook(book) { // Create book card and internal elements in the DOM const bookListItem = document.createElement("div"); bookListItem.classList.add("book-card"); const bookTitle = document.createElement("h2"); const bookAuthor = document.createElement("h3"); const bookPages = document.createElement("span"); const bookRead = document.createElement("p"); const deleteButton = document.createElement("button"); const readButton = document.createElement("button"); // Populate elements with the corresponding data for each book bookTitle.innerText = book.title; bookAuthor.innerText = `By: ${book.author}`; bookPages.innerText = `Pages: ${book.pages}`; bookRead.innerText = "Status: "; if (book.read === true) { bookRead.innerText += "Read"; } else { bookRead.innerText += "Unread"; } deleteButton.innerText = "Delete"; deleteButton.classList.add("btn"); deleteButton.classList.add("btn-delete"); if (book.read) { readButton.innerText = "Mark Unread"; } else { readButton.innerText = "Mark Read"; } readButton.classList.add("btn"); readButton.classList.add("btn-read"); // Append the elements into the book card div bookListItem.appendChild(bookTitle); bookListItem.appendChild(bookAuthor); bookListItem.appendChild(bookPages); bookListItem.appendChild(bookRead); bookListItem.appendChild(deleteButton); bookListItem.appendChild(readButton); bookListItem.style.width = "240px"; bookListItem.style.padding = "2rem"; bookListItem.style.textAlign = "center"; // Appending book card into container, add data attribute, delete and read/unread buttons bookList.appendChild(bookListItem); addDataAttr(bookList); insertDeleteButtons(); insertReadButtons(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderBook(book) {\n // Grab book box where books are displayed\n let bookBox = document.querySelector('.bookBox')\n let bookCard = makeBookCard(book)\n bookBox.appendChild(bookCard)\n}", "function renderBooks(myLibrary) {\n // Build card for each book and add it to the display\n for (let i of myL...
[ "0.9081091", "0.75411963", "0.75398684", "0.7526453", "0.73660827", "0.73289615", "0.73275673", "0.7320302", "0.731644", "0.72912204", "0.724897", "0.7235557", "0.72058374", "0.7202306", "0.71363956", "0.7093451", "0.7077722", "0.70714283", "0.6987089", "0.6953015", "0.693049...
0.8417775
1
deleteBook Function removes the book card div from DOM, the corresponding element from the libraryBooks array, then reassigns dataattributes
function deleteBook(e) { e.target.parentElement.remove(); libraryBooks.splice(e.target.parentElement.getAttribute("data-num"), 1); addDataAttr(bookList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeBook(book_id) {\n let card = document.getElementById(book_id).parentElement.parentElement\n let cardIndexNum = parseInt(card.dataset.index);\n let parentElement = document.getElementById(book_id).parentElement.parentElement.parentElement\n parentElement.removeChild(card);\n for (var i...
[ "0.767918", "0.75735366", "0.74822444", "0.74339855", "0.73620135", "0.7358934", "0.7262954", "0.71863043", "0.71244216", "0.7119809", "0.7023893", "0.6952782", "0.68730843", "0.68515724", "0.6798235", "0.6795393", "0.67573255", "0.67296076", "0.6696681", "0.6646328", "0.6645...
0.77548933
0
deleteAllBooks Function removes all book cards from the DOM and clears the libraryBooks array
function deleteAllBooks() { const bookCards = document.querySelectorAll(".book-card"); bookCards.forEach((card) => { card.remove(); libraryBooks = []; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteAllBooks() {\r\n let allCards = document.querySelectorAll(\".book-container\");\r\n\r\n allCards.forEach(card => {\r\n container.removeChild(card);\r\n })\r\n}", "function clearBooks() {\n while(container.firstChild){\n container.removeChild(container.firstChild);\n}}", "func...
[ "0.80589294", "0.7606715", "0.740013", "0.72639084", "0.7244876", "0.707434", "0.7031705", "0.70301586", "0.69693136", "0.6942057", "0.6876085", "0.6845784", "0.67299527", "0.6706257", "0.6674479", "0.6623867", "0.6615974", "0.6557535", "0.6537585", "0.65062416", "0.64966065"...
0.88785154
0
insertDeleteButtons Function loops through all book cards and wires their delete buttons to the corresponding function
function insertDeleteButtons() { // Event Listener for Delete Button let deleteButtons = document.querySelectorAll(".btn-delete"); let index = 0; deleteButtons.forEach((btn) => { btn.addEventListener("click", deleteBook); btn.setAttribute("data-num", index); index++; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addDeleteEvent() {\r\n let allDeleteBtn = Array.from(document.querySelectorAll(\".delete-btn\"));\r\n\r\n allDeleteBtn.forEach(button => {\r\n button.addEventListener(\"click\", function() {\r\n let allCards = document.querySelectorAll(\".book-container\");\r\n let index...
[ "0.76971805", "0.6941579", "0.689016", "0.66225344", "0.6608881", "0.6592175", "0.6579515", "0.65491295", "0.65130174", "0.65013385", "0.64772284", "0.6433258", "0.6432743", "0.6426828", "0.6410593", "0.6402539", "0.63471675", "0.63435006", "0.6334193", "0.6308494", "0.629817...
0.7282468
1
insertReadButtons Function loops through all book cards and wires their read/unread buttons to the corresponding function
function insertReadButtons() { let readButtons = document.querySelectorAll(".btn-read"); let index = 0; readButtons.forEach((readButton) => { readButton.addEventListener("click", toggleRead); readButton.setAttribute("data-num", index); index++; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeBtnRead(i) {\n let readBtn = document.createElement(\"input\");\n readBtn.style.setProperty(\"grid-column\", 3);\n readBtn.style.setProperty(\"width\", \"100px\");\n readBtn.style.setProperty(\"height\", \"40px\")\n readBtn.style.setProperty(\"margin\", \"5px\");\n readBtn.type = \"b...
[ "0.6868397", "0.66302466", "0.64878666", "0.64871883", "0.6412592", "0.6344706", "0.6342048", "0.63290983", "0.63046956", "0.6269943", "0.62431544", "0.62097526", "0.62023634", "0.61617756", "0.61568373", "0.6138918", "0.61256874", "0.6124631", "0.61170304", "0.61154497", "0....
0.71622574
0
toggleRead Function changes the status from read to unread and viceversa
function toggleRead(e) { let targettedBook = e.target.parentElement; let targettedBookData = targettedBook.getAttribute("data-num"); libraryBooks[targettedBookData].read = !libraryBooks[targettedBookData].read; // Update the read/unread button text if (libraryBooks[targettedBookData].read) { e.target.innerText = "Mark Unread"; } else { e.target.innerText = "Mark Read"; } // Update the book card info to show new read/unread status let readPara = targettedBook.querySelector("p"); console.log(readPara); if (libraryBooks[targettedBookData].read) { readPara.innerText = "Status: Read"; } else { readPara.innerText = "Status: Unread"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleReadStatus() {\n\t\tlet readValueRef = firebaseRef.child(this._firebaseKey).child(\"read\");\n\t\t//Toggles read status on a book\n\t\tif (this._read == true || this._read == \"true\") {\n\t\t\tthis._read = false;\n\t\t\treadValueRef.set(\"false\"); // update on firebase\n\t\t} else {\n\t\t\tthis._read = tru...
[ "0.8323233", "0.7546179", "0.7462142", "0.7443643", "0.7341132", "0.7336088", "0.70276505", "0.6928243", "0.68319553", "0.68297637", "0.67408377", "0.6644547", "0.64119464", "0.63627946", "0.6338123", "0.6312892", "0.62503064", "0.6248308", "0.62447405", "0.62217164", "0.6183...
0.72593856
6
addDataAttr Function loop through each item from nodelist and assign an index number that aligns the book card index with its corresponding libraryBooks array index
function addDataAttr(items) { let index = 0; items = Array.from(items.children); items.forEach((item) => { item.setAttribute("data-num", index); index++; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateIndexAttributes(idx) {\n let nodes = document.querySelectorAll('.bookCard')\n\n if (nodes.length === 0 || idx === library.length - 1) {\n return\n }\n\n for (let node of nodes) {\n if (node.dataset.index > idx) {\n node.dataset.index -= 1\n }\n }\n}", ...
[ "0.6611223", "0.6484007", "0.645741", "0.58525354", "0.5757097", "0.5752311", "0.57273006", "0.57017154", "0.559407", "0.5539958", "0.549337", "0.54505175", "0.53926826", "0.53758585", "0.53660095", "0.53395027", "0.53030974", "0.5279789", "0.5253293", "0.5235448", "0.5235073...
0.593857
3
getting all items from db
function getAllItems () { return Item.find() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAll() {\n\t\treturn this.dao.all(`SELECT * FROM items`);\n\t}", "function getAllItems() {\n return Item.find();\n}", "static fetchAll() {\n return db.execute('SELECT * FROM products');\n }", "static fetchAll() {\n return db.execute('SELECT * FROM products');\n }", "function getItems() {\n...
[ "0.8692467", "0.78449816", "0.76724577", "0.7641058", "0.7507019", "0.736255", "0.73195034", "0.7279238", "0.725874", "0.7185566", "0.7124893", "0.7096547", "0.7064494", "0.7010825", "0.6978205", "0.6950875", "0.69107825", "0.6904908", "0.6896578", "0.6865162", "0.68431026", ...
0.78935176
1
adding item to db
function addItem (newItem) { const item = new Item(newItem) item.save(function (err) { console.log(err) }) console.log("Added item, wahoo") return Promise.resolve("success") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItem(item) {\n let newItem = new Item(item);\n return newItem.save();\n}", "function addItem(data) {\n console.log(` Adding: ${data.lastName} (${data.owner})`);\n Items.insert(data);\n}", "function addItem(data) {\n console.log(` Adding: ${data.lastName} (${data.owner})`);\n Items.insert(da...
[ "0.745072", "0.7233899", "0.7233899", "0.7083303", "0.7052551", "0.7008741", "0.6945236", "0.693302", "0.6862721", "0.68536496", "0.6823718", "0.6769411", "0.674388", "0.6734635", "0.6727233", "0.6726577", "0.6723576", "0.6698406", "0.66941726", "0.6674512", "0.6670454", "0...
0.7217311
3
getting item by ID
function getItemById (itemId) { return Item.findOne({ "_id": itemId }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getItemById (context, id) {\n return itemGetter.getItemById(context, id);\n }", "function getItem(item, id) {\n for( var i = 0; i < item.length; i++){\n\n if(id == item[i].id){\n return item[i];\n }\n }\n}", "function getItemById(data, id){\n return data[id];\n}", "g...
[ "0.8286996", "0.8025763", "0.8022847", "0.80026466", "0.7949424", "0.779007", "0.7788998", "0.76739794", "0.7650474", "0.7644781", "0.755293", "0.75000864", "0.7483305", "0.7482575", "0.74788785", "0.7477105", "0.74759996", "0.74730676", "0.7446105", "0.74416417", "0.7432338"...
0.73230505
25
update item to db
function updateItem (itemId, itemNew) { return Item.findOneAndUpdate({ "_id": itemId}, itemNew, {upsert: false}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async updateItem(item) {\n try {\n await shopdb.poitem.update(item, { where: { id: item.id } });\n } catch (error) {\n throw error;\n }\n }", "static update(request, response) {\r\n\r\n itemsModel.getById(request.body.id)\r\n .then( data => {\r\n if (data.lengt...
[ "0.7618181", "0.72646827", "0.7206523", "0.7206523", "0.7206523", "0.71388406", "0.70673895", "0.7048153", "0.69808596", "0.69604415", "0.6956322", "0.69539136", "0.6833629", "0.67677605", "0.672772", "0.6725992", "0.67102796", "0.66876966", "0.66758996", "0.66663444", "0.666...
0.67211676
16
reeemplazo datos en grilla despues de cargar
function eachrow() { var ids=$("#list2").getDataIDs(); $.each(ids,function(key,val){ //$("#list2").setRowData(val,{clave:"******"}); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargar(or) {\n //console.log(or);\n aguja = or;\n var orden = datosjson.filter(ordenpuntual); //filtra con la orden puntual \n console.log(orden);\n let est = document.getElementById('estado');\n let pro = document.getElementById('producto');\n let com = document.getElementById('comer...
[ "0.72938", "0.7038829", "0.7022713", "0.68176407", "0.6765931", "0.6763894", "0.6752359", "0.67269933", "0.6693825", "0.6693413", "0.66430575", "0.6640299", "0.6631583", "0.6615387", "0.6604796", "0.65949696", "0.6586268", "0.657541", "0.65389293", "0.6532328", "0.6523865", ...
0.0
-1
variables to create raindrop
constructor(){ this.x = (Math.random() * (745 - 51)) + 51; this.y = 25; this.v = 1 + Math.random() * 2; this.color = [16, 37, 66]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createRain() {\n for (i = 1; i < nbDrop; i++) {\n var dropLeft = randRange(0, 400);\n var dropTop = randRange(-1800, 1800);\n mobile1.append('div')\n .attr('class', \"drop\")\n .attr('id',...
[ "0.56887263", "0.5560012", "0.5515391", "0.54482514", "0.54477763", "0.543364", "0.5320676", "0.5250195", "0.52430475", "0.5237361", "0.52185893", "0.5200537", "0.5188498", "0.5180557", "0.5174464", "0.5159155", "0.5147377", "0.5147118", "0.5146342", "0.5117209", "0.5085276",...
0.0
-1
const scheme = require('./auth/scheme');
function appStart(opts) { return new Promise((resolve, reject) => { let server = new Hapi.Server(); server.connection({ port: opts.port, host: opts.host, routes: { files: { relativeTo: config.path.dist } } }); // configure auth strategy, if we have one // server.auth.scheme('my-scheme', scheme); server.register(plugins, err => { if (err) return reject(err); // set up views server.views({ engines: { pug: require('pug') }, path: config.path.template, compileOptions: { pretty: true } }); // apply routes server.route(routes); resolve(server); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get signature () {\n return `make:auth`\n }", "getScheme() {\n return this._scheme;\n }", "getScheme() {\n return this._scheme;\n }", "function Authenticate(){\n var speakeasy = require('speakeasy');\n var key = speakeasy.generateSeceret();\n}", "function MultiFactorAuthMod...
[ "0.6207924", "0.5604736", "0.5604736", "0.55519384", "0.5533575", "0.5533283", "0.55274844", "0.55094355", "0.5481877", "0.54383665", "0.5329077", "0.52809113", "0.52659297", "0.52408344", "0.5222027", "0.52143073", "0.51634425", "0.5136991", "0.5128959", "0.51163465", "0.511...
0.0
-1
This function will most likely get its own .js file since I anticipate we may have additional HTTPServiceXXXXXX Components, but for now it is parked here.
async function sendRequest(APIEndpoint, data, HTTPServiceClient) { //DEBUG //send an http request to the server. return fetch(APIEndpoint, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(data) }).then( //get the response resp => { //process the http response in the HTTPServiceClient object, //if the route does not have a handler assigned to the route. //calling this function has no effect. return HTTPServiceClient.processHTTPresponse(APIEndpoint, resp); }, err => { //I have not written code for handling errors yet. //Most likely, ill add proccesHTTPerror function to the HTTPClientEndPoint class. return false; } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initialize(framework) {\n // event service:up means a new unified service available\n this.socket.on('service:up', service => {\n if (service) {\n // decode/unpack\n service = this._encoder.unpack(service)\n\n // register each method for further call\n for (let i = 0; i < ser...
[ "0.61938334", "0.57197577", "0.5693937", "0.56285924", "0.5564648", "0.5547713", "0.5486118", "0.5478618", "0.547832", "0.54070693", "0.54027486", "0.5390152", "0.53642905", "0.53467864", "0.5333072", "0.53278136", "0.5316421", "0.53091586", "0.52925545", "0.52754843", "0.525...
0.0
-1
This button onClick method sends a request to the server. The server's response is caught by the XMLHTTP request in the send request function. The response is then passed off to the HTTPServiceCLient which will update the apps state accordingly.
function HTTPServiceButton(props) { let history = useHistory(); return ( <button onClick={() => { sendRequest(props.APIEndPoint, props.data, props.HTTPService).then( reRoute => { if (reRoute) { history.push(props.route || "/"); } } ); }} className={TemplateStyles.HTTPServiceButton} > {props.children || "Send Request"} </button> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleClick(e) {\n sendRequest()\n }", "function buttonClicked(){\r\n var httpResponse = new XMLHttpRequest(); //Make a new object to accept return from server\r\n var url = null; \r\n\r\n if(document.getElementById(\"button1\").value == \"Disable\"){ //If the Pi-Hole is currently...
[ "0.6596348", "0.6311869", "0.5970954", "0.576656", "0.57321966", "0.5729255", "0.57112116", "0.5705331", "0.56676257", "0.5661161", "0.5656034", "0.56347996", "0.56160235", "0.56026185", "0.5567076", "0.55179334", "0.5435708", "0.5384075", "0.53771424", "0.5376612", "0.535977...
0.61623967
2
globals drawPersonInTheFloor, ctx, document, coordinates
function floor(number, size, coord) { this.number = number; this.people = []; this.called = false; this.buttonCoordinate = undefined; this.buttonSize = undefined; this.size = size; this.coord = coord; this.addPerson = function (person) { this.clearPeopleInThisFloor(); this.people.push(person); this.drawPeopleInThisFloor(); }; this.removePerson = function (personIndex) { this.clearPeopleInThisFloor(); this.people.splice(personIndex, 1); this.drawPeopleInThisFloor(); }; this.isWithin = function (x, y, diff = 0) { let startX = this.buttonCoordinate.x - (this.buttonSize.width / 2) - diff; let startY = this.buttonCoordinate.y - (this.buttonSize.height / 2); return (x >= startX && x <= startX + this.buttonSize.width) && (y >= startY && y <= startY + this.buttonSize.height); }; this.isWithinFloorButton = function (x, y) { return this.isWithin(x, y); }; this.isWithinAddPersonButton = function (x, y) { return this.isWithin(x, y, 75); }; this.isWithinRemovePersonButton = function (x, y) { return this.isWithin(x, y, 42); }; this.drawButton = function () { let x = this.buttonCoordinate.x; let y = this.buttonCoordinate.y; ctx.save(); ctx.beginPath(); ctx.textAlign = "center"; ctx.fillStyle = "white"; ctx.arc(x, y, 12, 0, Math.PI * 2); ctx.fill(); ctx.fillStyle = "black"; ctx.fillText(number, x, y + 6); ctx.restore(); }; this.displayInfo = function () { let output = ""; if (this.people.length === 0) return "<p>There's no one on this floor!</p>"; output += "<p> <b>Displaying information of people at floor number " + this.number + " </b></p>"; for (let i = 0; i < this.people.length; i++) { output += "<img src=\"\"></img><br>" + this.people[i].displayInfo(); } return output; }; this.displayInfoOutside = function () { let output = document.getElementById("infoPerson"); output.innerHTML = this.displayInfo(); let imgs = output.getElementsByTagName("IMG"); for (let i = 0; i < this.people.length; i++) { imgs[i].src = this.people[i].info.picture; } }; this.drawPeopleInThisFloor = function () { let x = this.coord.x + this.size.width + 2; let y = this.coord.y + 5; for (let i = 0; i < this.people.length; i++) { if (i % 10 === 0 && i !== 0) { y += this.people[i].size.height; // start at the top x = this.coord.x + this.size.width + 2; } this.people[i].coord = new coordinates(x, y); if (i < 20) // limit the people(drawings) on the floor this.people[i].draw(); x += this.people[i].size.width - 5; } }; this.clearPeopleInThisFloor = function () { let x = this.coord.x + this.size.width + 2; let y = this.coord.y + 5; for (let i = 0; i < this.people.length; i++) { if (i % 10 === 0 && i !== 0) { y += this.people[i].size.height; // start at the top x = this.coord.x + this.size.width + 2; } this.people[i].coord = new coordinates(x, y); this.people[i].clear(); x += this.people[i].size.width - 5; } }; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw(){\n drawFloor();\n drawBox();\n}", "function draw() {}", "function draw() {}", "function draw() {\n\n //Call Draw House Function(numbers of walls, type of roof, number windows, number of doors, overall colour)\n\n drawHouse(2,0,3,0,'blue');\n\n //background('green');\n //rect...
[ "0.65682924", "0.6308341", "0.6308341", "0.62910867", "0.6217121", "0.61180985", "0.60763574", "0.60427177", "0.6015972", "0.59922856", "0.59922856", "0.59922856", "0.59922856", "0.5982877", "0.5982877", "0.5982877", "0.59680355", "0.5953574", "0.59389436", "0.59368217", "0.5...
0.6083478
6
functions that will be called on the commands above
function twitter(){ //This will show your last 20 tweets and when they were created at in your terminal/bash window// }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleCommand() {}", "function commands(command) {\n switch (command) {\n case \"concert-this\":\n concertSearch();\n break;\n case \"movie-this\":\n movieSearch();\n break;\n case \"spotify-this-song\":\n songSearch();\n ...
[ "0.68384427", "0.68200576", "0.65002143", "0.64199156", "0.6362572", "0.634168", "0.6317257", "0.62893224", "0.62032086", "0.6180062", "0.61751115", "0.61750257", "0.61748886", "0.6156", "0.61232877", "0.60881925", "0.60730237", "0.606608", "0.6063072", "0.6033028", "0.603275...
0.0
-1
update request for All data
put (url, data) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateToAll() {}", "function updateAll(data) {\n _todos.forEach(function(todo, id, todos) {\n update(id, data);\n });\n}", "static updateAll() {\n let ta = Territory.all()\n fetch('http://localhost:3000/update/territories', {\n method: \"PATCH\",\n headers: {\n \"C...
[ "0.7273901", "0.69231874", "0.6903542", "0.68789476", "0.68663687", "0.68450606", "0.68129677", "0.68129677", "0.68129677", "0.67159927", "0.67151874", "0.6676451", "0.6676451", "0.6676451", "0.6676451", "0.6676451", "0.6676451", "0.6676451", "0.66747963", "0.6642401", "0.664...
0.0
-1
update request path data
patch (url, data) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set path(value) {}", "setPath(path) {\nthis._path = path;\n}", "updatePath(newPath) {\n return this.props.convertPathToUrl(newPath)\n .then(\n url => this.setState({path: url})\n )\n .catch(\n e => this.setState({path: null})\n )\...
[ "0.6225497", "0.6081604", "0.6078128", "0.6032002", "0.5981557", "0.58985704", "0.58947176", "0.58786654", "0.58786654", "0.58784634", "0.58632326", "0.5832011", "0.5746424", "0.57133424", "0.5705832", "0.57053113", "0.57038283", "0.5688693", "0.5666836", "0.56555265", "0.565...
0.5392174
46
primes audio especially for mobile to avoid delay
function prime_audio(subject, callback) { if (p==1) {aud_play_pause();} else { audio1.play(); audio1.pause(); console.log("audio primed"); p=1; callback(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function manipulateaudio(){\n if(cameraaudio){\n cameraaudio = !cameraaudio;\n buttonOff(document.querySelector('.app__system--button.mic'));\n camerastream.getAudioTracks()[0].enabled = cameraaudio;\n //-------------------CREATE NEW PRODUCER------------------------------------------...
[ "0.68014526", "0.67250943", "0.6554879", "0.65442306", "0.65164393", "0.6508045", "0.6507923", "0.6496374", "0.64897776", "0.6428947", "0.6405007", "0.63868874", "0.63488925", "0.6338434", "0.62986", "0.6298475", "0.62824917", "0.627927", "0.6276042", "0.6261233", "0.6260105"...
0.6754363
1
TODO: make a service
function verbsReady() { $scope.loading = false; $scope.setNewTest(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "obtain(){}", "function Service() {\n}", "private public function m246() {}", "function IndexService() {\n }", "getData(){}", "function API(){}", "function API(){}", "constructor(service) {\n this.service = service;\n }", "function factory() {}", "function factory() {}", "AddSer...
[ "0.6374318", "0.59492564", "0.5706181", "0.56330836", "0.55352837", "0.54763144", "0.54763144", "0.54104996", "0.538103", "0.538103", "0.53624", "0.5300217", "0.5284091", "0.5270009", "0.5270009", "0.5270009", "0.5270009", "0.5270009", "0.5270009", "0.5270009", "0.5270009", ...
0.0
-1
Add recipe //// Ingreedient recalculation Ingreedients
function recalculationIngreedient(){ var id = 0; $('.ingredient_block').each(function(){ $(this).attr('data-groupid', id); $(this).children('.ingredient_content').children('.form__group').children('.input-with-icon').attr('name', 'ingredient[' + id + '][]'); id++; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calcTotalDoseIngredient (base_dose, base_unit, base_ing, option) {\n\n var coeff_activity;\n var coeff_branca;\n var coeff_numeri;\n\n //consider activity_type\n if (activity_type === 0) coeff_activity = 1;\n else if (activity_type === 1 || activity_type === ...
[ "0.62699187", "0.60403234", "0.60363585", "0.6013065", "0.59643584", "0.58775496", "0.5855425", "0.58491844", "0.5712915", "0.5611084", "0.5608057", "0.56049424", "0.5602649", "0.5587072", "0.558582", "0.55826974", "0.55807227", "0.5576562", "0.5519602", "0.5517373", "0.54789...
0.6784687
0
Load image and convert to base64 format
function recipeEncodeImageFile(element) { var file = element.files[0]; var reader = new FileReader(); reader.onloadend = function() { $(element).parent().children('input[type="hidden"]').val(reader.result); $(element).parent().attr('style', 'background: url(' + reader.result + ') no-repeat; background-size: cover; background-position: center; border-radius: 3px;'); } reader.readAsDataURL(file); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "base64(pathFile) {\n const fs = require('fs');\n let base64data = null;\n try {\n let buff = fs.readFileSync(pathFile);\n base64data = buff.toString('base64');\n } catch (error) {\n console.log('Image not converted to base 64 :\\n\\n' + error);\n ...
[ "0.779105", "0.76296324", "0.7583191", "0.74014395", "0.7372748", "0.72212243", "0.71666574", "0.7079468", "0.70767576", "0.70436895", "0.704148", "0.6995618", "0.69915557", "0.69765306", "0.6972455", "0.696408", "0.6953183", "0.686981", "0.6822475", "0.68209434", "0.6774113"...
0.59552824
93
Combine start/end times into a single object
function bounds() { return { start: conductor.displayStart(), end: conductor.displayEnd(), domain: conductor.domain().key }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeRangesWithHash(meetings) {\n var startTimes = {};\n for (var i = 1; i < meetings.length; i++) {\n // extend max endTime seen for the startTime\n if (startTimes[meetings[i].startTime] === undefined || meetings[i].endTime > startTimes[meetings[i].startTime]) {\n startTime...
[ "0.64047617", "0.61285293", "0.6103839", "0.59030074", "0.58799595", "0.5828024", "0.57528514", "0.56942964", "0.5689425", "0.563833", "0.5598412", "0.5510268", "0.54934204", "0.5483788", "0.5482487", "0.5480898", "0.54666835", "0.54660493", "0.54442537", "0.5443705", "0.5437...
0.0
-1
telemetry domain metadata > option for a select control
function makeOption(domainOption) { return { name: domainOption.name, value: domainOption.key }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropDown() {\n // Use list of sample names to render the select options\n Plotly.d3.json(\"/names\", function (error, response) {\n if (error) return console.warn(error);\n\n let selection = document.getElementById(\"select-dataset\");\n for (let i = 0; i < response.length; i++) {\n ...
[ "0.6003362", "0.59188515", "0.5900664", "0.58710426", "0.58710426", "0.5858913", "0.5851065", "0.5846495", "0.5840012", "0.58274966", "0.5816125", "0.5810193", "0.5805294", "0.5758885", "0.5709485", "0.57001597", "0.5696745", "0.56940126", "0.566132", "0.56607527", "0.5657095...
0.0
-1
Function to Scramble array, for random cards placement
function shuffleArray(array) { var j, x, i; for (i = array.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)); x = array[i]; array[i] = array[j]; array[j] = x; } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shuffleDeck(array) {\n let c = array.length, a, b;\n console.log(c);\n\n while (c){\n b = Math.floor(Math.random() * c--);\n\n\n a = array[c];\n array[c]= array[b];\n array[b] = a;\n }\n return array;\n }", "function shuffleCards(cardsArray){\n shuffle(car...
[ "0.7158539", "0.7131217", "0.70499635", "0.704505", "0.70138365", "0.699739", "0.69957924", "0.69926625", "0.69857216", "0.69467247", "0.69415677", "0.6938811", "0.69258004", "0.6848842", "0.6838909", "0.6835674", "0.680762", "0.6801474", "0.6791687", "0.6778967", "0.6774918"...
0.0
-1
This funtion build the tab and opens the Iframe that has the page associated with the tab
function openTab(tabId,tabURL,tabName,tabIcon,noScrolling) { var foundExistingDiv = false; var tabNum = 1; for (var i=0; i<tabDataJson.length; i++) { if (tabDataJson[i].status == "open") tabNum = tabNum + 1; if (tabDataJson[i].tabId == tabId) { foundExistingDiv = true; togglePage(tabId); } } if (!foundExistingDiv) { tabIndex = tabDataJson.length; /*Store the pages that are open in an array so that I don't open more than one frame for the same page*/ tabDataJson[tabIndex]={tabId:""+tabId+"",status:"open"}; if (tabIcon.length ==0) { tabIcon = "/images/spacer14.gif"; //this is to maintain equal heights for all tabs. the heigt of the icon image has to be 14 piexels } var list = document.getElementById("mainTabList"); var newNode = document.createElement("li"); newNode.id = tabId +"li"; var newNodeInnerHTML ="<a href=\"#\" id=\""+tabId+"Link\" class=\"selectedTab\" onmouseup=\"togglePage('"+tabId+"'); return false;\">"; newNodeInnerHTML +="<span id=\""+tabId+"LinkSpan\" class=\"selectedSpanTab\"><img src=\""+tabIcon+"\" class=\"iconImage\">"+tabName; newNodeInnerHTML +="<br class=\"brNoHeight\"><img src=\"/images/minwidth.gif\" width=\""+(tabName.length*2)+"\" height=\"0\"></span></a>"; newNode.innerHTML = newNodeInnerHTML; list.appendChild(newNode); togglePage(tabId); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createContent(tabName) {\n let content = document.createElement('div');\n content.id = tabName;\n content.className = 'tab-pane';\n let inputUrl = document.createElement('input')\n inputUrl.id = 'new-tab-url';\n inputUrl.setAttribute('type', 'text');\n inputUrl.setAttribute('placeholder', 'Digite a...
[ "0.7250674", "0.69530046", "0.6921745", "0.6903451", "0.6713104", "0.66498226", "0.6618994", "0.65389246", "0.6467781", "0.6460813", "0.6438481", "0.64078754", "0.63807696", "0.63603514", "0.6359099", "0.63526714", "0.6315547", "0.63116217", "0.6309805", "0.6304771", "0.62912...
0.68116534
4
Function to Store task in local Storage
function storeTasks(task) { let givenTask; let getTasks = localStorage.getItem('givenTask'); if(getTasks === null) { givenTask = []; } else { givenTask = JSON.parse(getTasks); } givenTask.push(task); localStorage.setItem('givenTask', JSON.stringify(givenTask)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeInLS(task) {\n //get Data means tasks\n let tasks = getTasks();\n //set in LS\n tasks.push(task);\n localStorage.setItem('tasks', JSON.stringify(tasks));\n}", "function storeTaslToLocalStorage(task){\n let tasks ;\n if (localStorage.getItem('tasks') === null)\n {\n tasks = [] ;\n ...
[ "0.8197196", "0.8193532", "0.8178147", "0.8172172", "0.8159926", "0.8154733", "0.8153989", "0.8130405", "0.8129766", "0.8115124", "0.8111715", "0.8104735", "0.8102208", "0.80698866", "0.80578387", "0.80397415", "0.80359185", "0.8035841", "0.8026494", "0.80071175", "0.7996609"...
0.79898244
21
Sets or gets the uploadstate of the File. isUploading(true) adds the class "uploading". isUploading(false) removes the class "uploading". isUploading() gets wether the file has (true) the class "uploading" or not (false).
function isUploading(uploading) { if (typeof uploading === "undefined") { return that.hasClass("uploading"); } if (uploading == true) { that.addClass("uploading"); previewImage.css('backgroundImage', 'none'); } else { that.removeClass("uploading"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_updateState() {\n this.setState(() => ({ successfullUploaded: true, uploading: false }));\n }", "handleFileUploadStarted() {\n this.isWorking = true\n }", "function uploadStart(event, file) {\n\t\t\t\tresetUploadUI();\n\t\t\t\tuploadElement.addClass('uploading');\n\t\t\t}", "handleFileUplo...
[ "0.62498903", "0.6230779", "0.61754096", "0.5964586", "0.58479416", "0.58175224", "0.5786211", "0.57514715", "0.5636151", "0.5609595", "0.55947405", "0.55884826", "0.5529699", "0.54317415", "0.54125315", "0.5409709", "0.53526706", "0.535138", "0.53449386", "0.5339701", "0.532...
0.71066517
0
Sets the progress of the uploadprogressbar. The File is set to isUploading(true).
function setUploadProgress(progress) { console.log("Upload-progress: " + progress); var newWidth = progress + "%"; console.log("Neue Breite concat: " + newWidth); progressBar.css('width', newWidth); console.log("Neue Breite: " + $(progressBar).width()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "uploadprogress (file, progress, bytesSent) {\n if (file.previewElement) for (let node of file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\"))node.nodeName === \"PROGRESS\" ? node.value = progress : node.style.width = `${progress}%`;\n }", "function uploadProgress(file, event) {\n ...
[ "0.7196267", "0.71575165", "0.7081707", "0.70769423", "0.6971363", "0.6962098", "0.694759", "0.6895495", "0.68215877", "0.66738623", "0.6656341", "0.66333073", "0.6562271", "0.65487516", "0.6548158", "0.65347606", "0.6488154", "0.6459519", "0.64323986", "0.6428564", "0.639776...
0.79261076
0
Helper function that adds a scanned item to the cart.
function addToCart(toAdd) { var cart = []; // Retrieves the cart from localStorage. var localCart = localStorage.getItem("cart"); // If there are items, parses the items retrieved. if (localCart && localCart != "[]") { console.log("There are items in the cart!"); cart = JSON.parse(localCart); } else { console.log("There are no items in the cart!"); } // Add to the cart if (!inArray(toAdd, cart)) { cart.push([1, toAdd]); } else { cart[indexInArray(toAdd, cart)][0]++; } // Write to localStorage localStorage.setItem("cart", JSON.stringify(cart)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItemToCart() {}", "function addItemToCart() {}", "function addItemToCart(user, item) {}", "function addItem( item ){\n cart.push(item);\n return cart;\n}", "function plusItem() {\n const productId = this.name;\n const cartList = JSON.parse(sessionStorage.getItem(\"shoppingCartItems\"));...
[ "0.7453191", "0.7453191", "0.7179056", "0.71243316", "0.7104478", "0.7067402", "0.69547856", "0.6854733", "0.6847409", "0.6800673", "0.6776797", "0.6718134", "0.67119074", "0.6648005", "0.66122425", "0.65864545", "0.6578587", "0.6575786", "0.65594244", "0.65539837", "0.651365...
0.60656196
74
Save Punch button will fire off the put request on click then route to the home page
updateDate(val){ this.setState({date_punch:val}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function place(e){\n\t\t\t\te.preventDefault();\n\t\t\t\tdocument.getElementById('submitButton').style.opacity=0.3;\n\t\t\t\tcheckoutID=document.getElementById('checkoutID').value;\n\t\t\t\tid=sessionStorage.shopID;\n\t\t\t\tverifyCheckoutID(id,checkoutID)\n\t\t\t\t.then(function(){\n\t\t\t\t\tupdate(id,checkoutID...
[ "0.6267899", "0.6161679", "0.6058857", "0.6030916", "0.59427756", "0.59149706", "0.588223", "0.5826964", "0.5800558", "0.577637", "0.5734099", "0.57314235", "0.5711202", "0.570856", "0.57026553", "0.5700087", "0.5693228", "0.5687588", "0.567401", "0.5669396", "0.5664562", "...
0.0
-1
if current is greatert than max than set current tO max
get health(){ return this._health}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "max(other) {\n return other.pos > this.pos ? other : this;\n }", "function getYMax(values, ucl, goal) {\n \t \t\n \tvar i, value, max = ucl;\n \t\n \tif (goal !== undefined && goal > max) {\n \t\tmax = goal;\n \t}\n \t\n \tfor(i = 0; i < values.l...
[ "0.67227346", "0.6614008", "0.65823466", "0.65823466", "0.65823466", "0.65823466", "0.65823466", "0.65823466", "0.6545", "0.65317595", "0.6530715", "0.6512782", "0.65047294", "0.6480679", "0.6466444", "0.6456526", "0.64488727", "0.6432388", "0.6430202", "0.6429369", "0.642220...
0.0
-1
need to have the protection error
set damage(damage){this._damage = Utils.protectionError("Hero", "damage");}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Protect() {\r\n}", "function priv () {\n\t\t\t\n\t\t}", "transient private protected internal function m182() {}", "function reserved(){}", "function guard(){}", "private public function m246() {}", "transient protected internal function m189() {}", "transient private internal function m185(...
[ "0.6650122", "0.641514", "0.6320867", "0.62667644", "0.6182851", "0.61240864", "0.6084431", "0.60597014", "0.6016553", "0.6004688", "0.59863144", "0.5933407", "0.58990395", "0.5884715", "0.58458203", "0.58257955", "0.58144987", "0.5773941", "0.57657117", "0.5757449", "0.57571...
0.5334932
91
need to have the protection error
set inventory(inventory){this._inventory = Utils.protectionError("Hero", "inventory");}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Protect() {\r\n}", "function priv () {\n\t\t\t\n\t\t}", "transient private protected internal function m182() {}", "function reserved(){}", "function guard(){}", "private public function m246() {}", "transient protected internal function m189() {}", "transient private internal function m185(...
[ "0.6651593", "0.64160997", "0.6320496", "0.62676764", "0.6184313", "0.61229616", "0.6083728", "0.6058874", "0.60148066", "0.6004809", "0.5984367", "0.59348524", "0.5900037", "0.58857656", "0.58462995", "0.58267725", "0.5814257", "0.5774402", "0.57657987", "0.575687", "0.57568...
0.0
-1
Flips cards to reveal front side Checks if card was first or second to be flipped Checks for match Stops the game if all cards are flipped
function flipCard() { if (lockBoard) return; if (this === firstCard) return; this.classList.add('flip'); if (!hasFlippedCard) { //first card clicked hasFlippedCard = true; firstCard = this; return; } //second card clicked hasFlippedCard = false; secondCard = this; checkForMatch(); if (checkWin()){ stopCheck.stop(`/memory-solution-saver/${gameId}`); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flipCard(){\n if(lockBoard) return; \n if(this === firstCard) return; \n \n this.classList.toggle('flip');\n \n if(!hasFlippedCard){\n //First card flip action\n hasFlippedCard = true;\n firstCard = this; \n return;\n }\n // second card flip action\n secondCard = this;\n\n checkForMa...
[ "0.8207633", "0.8090705", "0.8086213", "0.8043814", "0.8043415", "0.8039322", "0.79755455", "0.7957709", "0.7865634", "0.784256", "0.7841172", "0.7788557", "0.7762098", "0.7749902", "0.7705485", "0.7674373", "0.7664609", "0.7637533", "0.7637185", "0.7618055", "0.75988084", ...
0.83795595
0
Check if cards are a match
function checkForMatch() { let isMatch = firstCard.dataset.framework === secondCard.dataset.framework; isMatch ? disableMatchedCards() : unflipCards(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForMatch() {\n let cardsMatch = firstCard.dataset.pokemon === secondCard.dataset.pokemon;\n cardsMatch ? correctMatch() : resetCards();\n}", "function checkMatch() {\n if (app.firstCard.dataset.avenger === app.secondCard.dataset.avenger) {\n disableCards();\n cardMatchSound()...
[ "0.8123611", "0.8046482", "0.8036957", "0.7820388", "0.78080547", "0.7788568", "0.77863896", "0.77837986", "0.77826816", "0.77706414", "0.77390707", "0.7732197", "0.7727497", "0.7688099", "0.7684899", "0.76805687", "0.76785547", "0.76699996", "0.76654434", "0.76370907", "0.76...
0.7741216
10
Disables flipping on matched cards
function disableMatchedCards() { firstCard.removeEventListener('click', flipCard); secondCard.removeEventListener('click', flipCard); resetBoard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableCorrectCards(){\n $(selectedCards[0]).find('.card-front').attr('src','images/done-card-back.png');\n $(selectedCards[1]).find('.card-front').attr('src','images/done-card-back.png');\n $(selectedCards[0]).find('.card-front').removeClass('active');\n $(selectedCards[1]).find('.card-front').remove...
[ "0.72148645", "0.7150109", "0.70988613", "0.70853627", "0.7048701", "0.70476043", "0.70227164", "0.7022413", "0.7020272", "0.7017963", "0.6987559", "0.69849074", "0.69566834", "0.68804777", "0.68493056", "0.6755036", "0.67458504", "0.6742428", "0.6729133", "0.6722918", "0.671...
0.7448693
0
Flips cards back if pair was not a match
function unflipCards() { lockBoard = true; setTimeout(() => { firstCard.classList.remove('flip'); secondCard.classList.remove('flip'); resetBoard(); }, 1500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flipUnmatchedCards(deck, back=''){\n /* Select one of the two decks */\n var deck=document.getElementById(deck);\n /* Select all the cards in the deck */\n var cards = deck.getElementsByClassName('card');\n var currentCard;\n /* Flip all the cards */\n for(i=0;i<cards.length;i++){\n ...
[ "0.7348098", "0.73320574", "0.73105663", "0.73006535", "0.72997636", "0.72752064", "0.725754", "0.7241091", "0.7223608", "0.7188994", "0.7175893", "0.7147717", "0.71448886", "0.71321964", "0.7113836", "0.70984274", "0.7089206", "0.7084046", "0.7055726", "0.7055726", "0.705572...
0.0
-1
Reset board after round
function resetBoard() { [hasFlippedCard, lockBoard] = [false, false]; [firstCard, secondCard] = [null, null]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n\t\t\tclear_board()\n\t\t}", "resetRound() {\n this.moves = 0;\n this.emptyBoard();\n this.result = {status: 'waiting'};\n this.turn = '';\n }", "function resetBoard() {\n\t\"use strict\";\n\t// Mark all cells as empty and give default background.\n\tfor (var i = 0; i < size; i...
[ "0.8156131", "0.81546116", "0.8136187", "0.8048933", "0.8018191", "0.80103064", "0.7955186", "0.79322356", "0.7923511", "0.79158527", "0.79124784", "0.7829414", "0.7814339", "0.7813918", "0.77954173", "0.77954173", "0.77335566", "0.7725455", "0.77097327", "0.77090144", "0.769...
0.75950754
27
Scene generates general URI component from URL instance. Given searchquerystring will be treated as default premise. This protocol based execution can be used from core.recite too.
init(){ this.protocol = this.generate_protocol(this.draft); let p = this.protocol.pathname.replace(/^\/\//, ""); let cmp = p.split(/\.|\//); let pg = []; let sn = []; /* story://foo@baz.bar@doe.lorem/ipsam?some=1&thing=3 * -> cmp=[foo@baz, bar@doe, lorem, ipsam] * -> pg=baz-doe, sn=[foo,bar,lorem,ipsam] */ cmp.map((p) => { let pp = p.split("@"); let l = (pp.length > 1) ? pp.pop() : false; sn = sn.concat(pp); l && pg.push(l); }); this.story_component = sn; this.page = pg.join("-"); this.premise = this.protocol.search ? FM.uri.unserialize(this.protocol.search.replace(/^\?/, "")) : {}; if(FM.vr.is_object(this.draft)){ if(this.draft.retry){ this.retry = parseInt(this.draft.retry); } } this.story_definition = require( this.core.config.path.story + path.sep + this.story_component.join(path.sep) ); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"https\" : \"http\";\n let port = \"\"; // cache busting is forced\n\n if (false !== this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n\n if (!this.supportsBinary && !query.sid) {\n ...
[ "0.56164515", "0.55762017", "0.55762017", "0.54538596", "0.54538596", "0.53982466", "0.53823704", "0.5353385", "0.5239882", "0.523413", "0.5214039", "0.5165784", "0.51498264", "0.51461047", "0.51461047", "0.51272213", "0.5068568", "0.50533503", "0.50131595", "0.49992394", "0....
0.0
-1
Chaining submition Scene > Story
submit(){ this.story = new this.story_definition(this); this.story.submit(this.argument); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createStory() {\n // In this example you need to initialise these in reverse order, so that\n // when you assign a target it already exists. I.e., start at the end!\n lunarEnd4B = new StorySection(\n \"The Escavator explodes, falling backwards into one of the many craters of the moon. It was a brief...
[ "0.6408049", "0.59294325", "0.5898139", "0.58838475", "0.5863654", "0.5849848", "0.5846889", "0.5792795", "0.57803786", "0.57727176", "0.57426834", "0.57383335", "0.5735373", "0.57098377", "0.57017654", "0.569967", "0.5670543", "0.5662133", "0.56508726", "0.5650013", "0.56203...
0.0
-1
Generates URL instance as a protocol. This will be convenience when we need HTTP server as Story trigger. ( Object | String : from draft. ) > URL
generate_protocol(draft){ /* * { * story: "", * page: "", * premise: { * } * } */ let id = ""; let pf = "scene"; let rg = new RegExp("^" + pf + ":"); switch(true){ case typeof draft == "string": if(draft.match(rg)){ id = draft; }else{ id = pf + ":" + draft; } break; case draft === Object(draft): id = pf + ":" + draft.story + (draft.page && draft.page.length > 0 ? "@" + draft.page : "" ) + (draft.premise !== undefined ? "?" + ((o) => { return FM.ob.serialize(o).map((tpl) => { return tpl[0] + "=" + encodeURIComponent(tpl[1]); }).join("&"); })(draft.premise) : ""); break; } return new URL(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeUrl(protocol, host, resource, id) {\n return protocol + \"://\" + host + resource + id;\n}", "function generateURL(host, protocol, resourceType) {\n var url = new URL(\"http://{{host}}:{{ports[https][0]}}/upgrade-insecure-requests/support/\");\n url.protocol = protocol == Protocol.INSECURE ? \"ht...
[ "0.6523636", "0.6246035", "0.62379616", "0.615599", "0.61257267", "0.6035445", "0.6021874", "0.598158", "0.597753", "0.5948689", "0.5937864", "0.5936357", "0.5867868", "0.5867868", "0.58560544", "0.5826489", "0.58113956", "0.5808761", "0.57989013", "0.57872975", "0.57527304",...
0.7167723
0
Opens Puppeteer workspace and assignes generated Page to Story. ( void ) > this
async commence(){ // Set very default of Story space. if(this.space_isolated){ this.space_id = (new Date()).getTime(); this.story.page = await this.core.space.flip(this.space_id); }else{ this.story.page = await this.core.space.flip(); } if(this.space_session){ // Re-apply cookies. for(let ck of this.scenario.session(this.space_session)){ await this.story.page.setCookie(ck); } } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async open (page) {\n browser.url(page);\n browser.maximizeWindow();\n }", "async init () {\n this.browser = await puppeteer.launch({\n headless: this.headless,\n args: this.args,\n ...this.launchOptions\n })\n\n this.page = await this.browser.newPage()\n }", "async se...
[ "0.6399151", "0.6368367", "0.61529475", "0.61363894", "0.60568964", "0.6054619", "0.6054619", "0.6054619", "0.6049032", "0.60475934", "0.60165477", "0.60007936", "0.5918673", "0.58722323", "0.58722323", "0.58648634", "0.58279556", "0.58164763", "0.5780398", "0.5780398", "0.57...
0.56670845
29
async ( void ) > array
async retrieve_session(){ return (await this.story.page.cookies()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function arr(){\n // the await ensures the async code won´t continue forward until the fn quering is done\n // see fn quering in the bottom of code\n const theList = await quering(item_number);\n return theList;\n }", "function extract (arr){\n async.each(a...
[ "0.70298344", "0.68230706", "0.6795361", "0.6795361", "0.6750612", "0.66552114", "0.663191", "0.6609451", "0.6584978", "0.6578511", "0.65327907", "0.65304726", "0.6480604", "0.6462962", "0.6434789", "0.6321279", "0.62562954", "0.6195071", "0.6178904", "0.61554635", "0.6093097...
0.0
-1
Reads up a single Story. ( ) > any = result of Story.read call.
async read(){ this.core.logger.debug("I'm gonna tell you a Story about... " + this.protocol.href); this.info.started_at = new Date(); this.core.logger.debug("started_at: " + this.info.started_at.toString()); /* handles all situations from story. */ this.result = await this.story.read(this.premise, this.argument); return this.result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retrieveStory(storyUrl, callback) {\n if(stories.hasOwnProperty(storyUrl)) {\n return callback(stories[storyUrl]);\n }\n\n retrieve(storyUrl, 'application/json, text/plain',\n function(status, responseText, contentType) {\n if(status !== STATUS_OK) {\n return callback...
[ "0.6026121", "0.5975107", "0.5715183", "0.56956995", "0.5685386", "0.5674273", "0.5597581", "0.5535286", "0.55012", "0.5486686", "0.5403364", "0.53056663", "0.5233125", "0.52115786", "0.52032506", "0.51562303", "0.5005445", "0.49931353", "0.49922156", "0.49524045", "0.4946881...
0.7236712
0
Toggle visibility of modal about us on main page
function toggleAboutUsModal(){ document.getElementById("about-us").classList.toggle("is-active"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAbout() {\n\n\t$('#modal_about').modal();\n\n}", "function toggle() {\r\n setModal(!modal)\r\n }", "function aboutFunction() {\n document.getElementById(\"myAbout\").classList.toggle(\"showabout\");\n }", "function expandInfo() {\n if(aboutContent.style.display === \"block\"){\n ...
[ "0.7092536", "0.70391583", "0.6826842", "0.66884536", "0.6662294", "0.6581758", "0.6568881", "0.6562223", "0.6554879", "0.6541108", "0.6526384", "0.64378166", "0.6419834", "0.6419634", "0.64179105", "0.64148635", "0.6412544", "0.6407893", "0.6391973", "0.63662654", "0.6365623...
0.74685043
0
Mixin common methods to axis model, Inlcude methods `getFormattedLabels() => Array.` `getCategories() => Array.` `getMin(origin: boolean) => number` `getMax(origin: boolean) => number` `getNeedCrossZero() => boolean` `setRange(start: number, end: number)` `resetRange()`
function mixinAxisModelCommonMethods(Model) { zrUtil.mixin(Model, axisModelCommonMixin); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Axis(min, max) {\n this.Min = min;\n this.Max = max;\n }", "function mixinAxisModelCommonMethods(Model) {\n\t mixin(Model, AxisModelCommonMixin);\n\t }", "function _default() {\n\n\tfunction axisX(selection, x) {\n\t\tselection.attr(\"transform\", function (d) {\n\t\t\treturn...
[ "0.64570713", "0.642095", "0.64160544", "0.6310706", "0.62696064", "0.62067837", "0.60220206", "0.5989083", "0.59533113", "0.59265924", "0.5919802", "0.5888769", "0.5866093", "0.5856531", "0.58081436", "0.5806106", "0.57986563", "0.5790203", "0.5777455", "0.57727045", "0.5746...
0.6457561
6
function to make eraser size normal
function eraserNormal(){ eraserWidth=10; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eraserMinus(){\n\tif(eraserWidth>10){\n\t\tearserWidth = eraserWidth - 5;\n\t}\n}", "function eraserPlus(){\n\teraserWidth = eraserWidth + 5;\n}", "limity() { return (this.scale - 1) * this.sizey / 2; }", "_updateSize() {\n this._size = this._bottomRight.$subtract(this._topLeft).abs();\n ...
[ "0.6623153", "0.6468226", "0.61073554", "0.58660936", "0.5856431", "0.5850627", "0.58481884", "0.5835166", "0.5793608", "0.5726383", "0.56951994", "0.5670935", "0.566868", "0.56572926", "0.56455225", "0.5620539", "0.5619325", "0.5598892", "0.55954826", "0.55907893", "0.558102...
0.789092
0
function to increase eraser size
function eraserPlus(){ eraserWidth = eraserWidth + 5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eraserNormal(){\n\teraserWidth=10;\n}", "function eraserMinus(){\n\tif(eraserWidth>10){\n\t\tearserWidth = eraserWidth - 5;\n\t}\n}", "function increaseSize() {\n\tif (selectedShape) {\n\t\tselectedShape.resize(5);\n\t\tdrawShapes();\n\t}\n}", "function toggleSize() {\n if (pencilTool.secondary.a...
[ "0.7921304", "0.7253164", "0.64950216", "0.6471401", "0.6302531", "0.6276033", "0.6176561", "0.611783", "0.59918195", "0.59740216", "0.59183043", "0.589302", "0.5875735", "0.58336663", "0.5825729", "0.5778397", "0.57246304", "0.5717259", "0.570216", "0.5697593", "0.5697397", ...
0.78743905
1
function to decrease eraser size
function eraserMinus(){ if(eraserWidth>10){ earserWidth = eraserWidth - 5; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eraserNormal(){\n\teraserWidth=10;\n}", "function eraserPlus(){\n\teraserWidth = eraserWidth + 5;\n}", "function toggleSize() {\n if (pencilTool.secondary.active) {\n restoreWhiteOutSize();\n } else {\n restoreDrawingSize();\n }\n }", "function resize() {\n getNewSize();\n ...
[ "0.7568393", "0.7266782", "0.6415938", "0.61294216", "0.60846406", "0.6049545", "0.591767", "0.58332235", "0.5828376", "0.5812096", "0.5787851", "0.5779748", "0.57675105", "0.5742317", "0.5713524", "0.56718904", "0.5665902", "0.56263345", "0.55914843", "0.55725104", "0.554776...
0.76207644
0
Function to set pixel size normal
function pixelNormal(){ context.lineWidth=1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setNormalizing(state)\r\n{\r\n gl.uniform1i(shaderProgram.uNormalizing,state);\r\n}", "SetNormalAndPosition() {}", "normalize() {\r\n this.scale(1 / this.norm());\r\n }", "function setScale() {\n\tscale = scale + (direction * halfStep);\n\t\n\tif (scale < 0.1 ) scale = 0.1;\n\tif (scale >...
[ "0.64253336", "0.6262932", "0.6162141", "0.6093016", "0.60649055", "0.59527504", "0.5932776", "0.59003973", "0.58759654", "0.58514994", "0.5799037", "0.5767862", "0.5723046", "0.5722731", "0.57167083", "0.57111764", "0.57095534", "0.56888527", "0.5668525", "0.56607383", "0.56...
0.6646304
0
Function to increase pixel size
function pixelPlus(){ context.lineWidth=context.lineWidth+1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateSize() {\n this.w = this.ent.width + this.wo;\n this.h = this.ent.height + this.ho;\n }", "function resize() {\n getNewSize();\n rmPaint();\n}", "function resize(){\n let style_height = +getComputedStyle(canvas).getPropertyValue(\"height\").slice(0, -2); \n let style_width = +getComput...
[ "0.73669136", "0.72401357", "0.7189624", "0.70856035", "0.70008427", "0.693251", "0.6919914", "0.6888983", "0.6854588", "0.6819223", "0.67845625", "0.6750008", "0.67438775", "0.6730128", "0.6729214", "0.6698982", "0.6676807", "0.66741604", "0.66636765", "0.66575605", "0.66161...
0.0
-1
Function to decrease pixel size
function pixelMinus(){ if(context.lineWidth>1){ context.lineWidth=context.lineWidth-1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resize() {\n getNewSize();\n rmPaint();\n}", "function toggleSize() {\n if (pencilTool.secondary.active) {\n restoreWhiteOutSize();\n } else {\n restoreDrawingSize();\n }\n }", "function circleShrink(){\nxSize = xSize - 30;\nySize = ySize - 30;\n}", "function decreaseCurren...
[ "0.7388289", "0.69723576", "0.6922633", "0.6831532", "0.6722329", "0.6655151", "0.65968347", "0.6592411", "0.65670186", "0.64471257", "0.6435581", "0.64214545", "0.6389629", "0.6357341", "0.6348227", "0.63220125", "0.6314649", "0.6274627", "0.627017", "0.62269664", "0.6213594...
0.5846693
54
funtion for Save save image as png file format
function save() { var imgg=canvas.toDataURL("image/png"); window.location = imgg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function savePNG() {\n var pngOptions = new PNGSaveOptions(); // class for defining save output options\n if(group[0].name === \" \") {\n var str = \"\";\n } else {\n var str = \"-\" + group[0].name;\n }\n var path = File(doc.path + \"/\" + layer.name + str + \".png\");\n doc.saveAs(path, pngOptions, t...
[ "0.80457395", "0.7786456", "0.7584192", "0.75066453", "0.7282537", "0.7182323", "0.71673363", "0.70861363", "0.7055332", "0.7041791", "0.7037105", "0.70220435", "0.69917357", "0.6968986", "0.69366056", "0.6909498", "0.69050735", "0.69009656", "0.69009656", "0.6842263", "0.678...
0.6966143
14
function for clear screen
function clearScreen(){ context.clearRect(0,0,canvas.width,canvas.height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearScreen(){\n\tconsole.log(\"Clear\");\n\tgreen = green+1;\n\tif(green>=3){\n\t\tgreen=0;\n\t}\n\tiScreen();\n\taddScreen();\n}", "function clearScreen() {\n buffer = \"0\";\n total = 0;\n operator = null;\n}", "function clearScreen() {\n currentOperationScreen.textContent = '';\n clearDis...
[ "0.8487968", "0.8421263", "0.8388321", "0.83777905", "0.83173496", "0.82220644", "0.8138818", "0.81028676", "0.8094533", "0.8093241", "0.8018152", "0.801573", "0.800117", "0.799614", "0.7980207", "0.79646903", "0.7933489", "0.7899051", "0.7837635", "0.78364414", "0.7814379", ...
0.8294382
5
functon for Color selection
function selectColor(myColour){ context.strokeStyle=myColour; context.fillStyle=myColour; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "selectColor(x, y, wd, ht){\n this.colorSec = this.colorPromedio(x, y, wd, ht);\n if (this.colorG){\n let tempG = this.colorSec.reduce((a, b) => a+b);\n this.colorSec = this.colorSec.map(t => tempG/3);\n }\n this.ctx.fillStyle = 'rgb('+this.colorSec[0]+\n ...
[ "0.77060646", "0.76408947", "0.76264334", "0.7518707", "0.7479007", "0.73961073", "0.73859376", "0.736904", "0.73576504", "0.7279853", "0.7269594", "0.7269594", "0.7267138", "0.7242104", "0.7223654", "0.7217767", "0.7032908", "0.701716", "0.699867", "0.6992928", "0.6966318", ...
0.68642855
30
functon for draw circle
function circle(){ canvas.onmousedown=circleDown; canvas.onmouseup=circleUp; canvas.onmousemove=circleMove; var draw3=false; function circleDown(e){ imageData=context.getImageData(0,0,canvas.width,canvas.height); startX= e.x - this.offsetLeft; startY=e.y - this.offsetTop; draw3=true; } function circleUp(e){ draw3=false; } function circleMove(e){ if (draw3){ context.putImageData(imageData,0,0); rectWidth=(e.x - this.offsetLeft)-startX; rectHeight=(e.y - this.offsetTop)-startY; var radius=Math.sqrt(rectWidth*rectWidth+rectHeight*rectHeight)/2; context.beginPath(); context.arc(startX,startY,radius,0,2*Math.PI); context.closePath(); context.stroke(); if (fillFlag==1){ context.fill(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawCircle(){\n //ctx.beginPath();\n ctx.arc(100, 75, 50, 0, 2 * Math.PI);\n ctx.stroke();\n }", "function drawCircle(x,y,radius,color)\r\n{\r\n\tdrawArc(x, y, radius, 0, Math.PI * 2, color);\r\n}", "function drawcircle()\n{\n\tctx.fillStyle='#0079B8';\n\tctx.beginPath();\n\tctx.arc(x1,y1,20...
[ "0.8297007", "0.8157914", "0.80537385", "0.80476797", "0.79358745", "0.78701514", "0.78588855", "0.785413", "0.7851388", "0.7847282", "0.78089076", "0.7801553", "0.7782812", "0.77827215", "0.77799904", "0.7779955", "0.77515185", "0.7682462", "0.7648308", "0.7647835", "0.76386...
0.7281964
64
function for spray paint
function spray(){ canvas.onmousedown=sprayDown; canvas.onmouseup=sprayUp; canvas.onmousemove=sprayMove; var draw6=false; function sprayDown(event){ startX=event.clientX - canvas.getBoundingClientRect().left; startY=event.clientY - canvas.getBoundingClientRect().top; draw6=true; } function sprayUp(){ draw6=false; } function sprayMove(event){ if (draw6){ newX=event.clientX - canvas.getBoundingClientRect().left; newY=event.clientY - canvas.getBoundingClientRect().top; widthX=newX-startX; widthY=newY-startY; var len = 5 + ( Math.random() * 5 | 0 ); for( var i = 0; i < len; ++i ) { context.beginPath(); var radius=Math.sqrt(widthX*widthX+widthY*widthY)/2; context.arc( startX + Math.cos( Math.random() * Math.PI * 2 ) * radius * Math.random(), startY + Math.sin( Math.random() * Math.PI * 2 ) * radius * Math.random(), 1,0, Math.PI * 2, false); context.stroke(); context.closePath(); startX=newX; startY=newY; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paint() {\n}", "function paint() {\n\t//clear()\n\tnoFill()\n\tsystem.show();\n}", "paint() {\r\n }", "renderPaints(ctx) {\n let { size } = this;\n _.each(this.paints, ({ start, end, color }) => {\n ctx.save();\n ctx.beginPath();\n let paintStart = r...
[ "0.74739057", "0.6859499", "0.68546724", "0.67831755", "0.6726589", "0.6691611", "0.6655624", "0.6653614", "0.6601874", "0.6597348", "0.6507265", "0.6499517", "0.64852005", "0.6461458", "0.6461458", "0.6461458", "0.64563894", "0.6402032", "0.6400482", "0.6395116", "0.63664484...
0.0
-1
retorna a data atual de acordo com os parametros informados
function getDataAtual(exibeSeparador, exibeHoras){ // ajustando a data atual var fullDate = new Date(); // acrescenta o 0 caso o mes for menor que 10 var mes = ("0" + (fullDate.getMonth() + 1)).slice(-2); // acrescenta o 0 caso o dia for menor que 10 var dia = ("0" + fullDate.getDate()).slice(-2); // acrescenta o 0 caso a hora for menor que 10 var horas = ("0" + fullDate.getHours()).slice(-2); if (exibeHoras){ return fullDate.getFullYear() + mes + dia;// + horas; } if (exibeSeparador){ return fullDate.getFullYear() + '-' + mes + '-' + dia; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function prepareData( param ) {\n\n // get source data\n const source = DataStore.getDataset( param.data_id ),\n cols = source.getColumnMeta(),\n srcData = source.getData(),\n rowCount = source.getRowCount();\n\n // shortcuts\n const namecol = srcData[ param.name...
[ "0.641993", "0.6257019", "0.6113271", "0.6083437", "0.60577893", "0.5972331", "0.5968391", "0.5967209", "0.59598166", "0.5937623", "0.59362555", "0.5924282", "0.5917019", "0.59056795", "0.5901125", "0.582395", "0.5804457", "0.5802098", "0.57897425", "0.5774484", "0.57487816",...
0.0
-1
The Sum of a Range
function range(start, end) { let numArray = []; for (let i = start; i <= end; i++) { numArray.push(i); } return numArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumRange(range){\n var sum= 0 ;\n for(var i=0; i<=range.length-1; i+=1){\n\t sum+= range[i];\n }\n return sum;\n}", "function sumRange(start, end) { \n let myArr = [];\n for (let i = start; i <= end; i++)\n myArr.push(i);\n return myArr.reduce(function(a, b){\n return a + b; \n });\...
[ "0.8179082", "0.8069192", "0.7950863", "0.7645032", "0.7466804", "0.73740274", "0.7323614", "0.732185", "0.7283818", "0.7278186", "0.7271788", "0.7130521", "0.70525825", "0.69326234", "0.69242364", "0.6864392", "0.6843167", "0.68314266", "0.6767915", "0.67578113", "0.6727001"...
0.0
-1
Get an extension that integrates saga with the store
function getSagaExtension(sagaContext, onError) { var sagaMonitor = undefined; //@ts-ignore if (process.env.NODE_ENV === "development" && typeof window !== "undefined") { sagaMonitor = window["__SAGA_MONITOR_EXTENSION__"] || undefined; } // Setup the saga middleware var sagaMiddleware = redux_saga_1["default"]({ context: sagaContext, sagaMonitor: sagaMonitor, onError: onError }); var _sagaManager = redux_dynamic_modules_core_1.getRefCountedManager(SagaManager_1.getSagaManager(sagaMiddleware), SagaComparer_1.sagaEquals); return { middleware: [sagaMiddleware], onModuleManagerCreated: function (moduleManager) { if (sagaContext) { sagaContext["moduleManager"] = moduleManager; } }, onModuleAdded: function (module) { if (module.sagas) { _sagaManager.add(module.sagas); } }, onModuleRemoved: function (module) { if (module.sagas) { _sagaManager.remove(module.sagas); } }, dispose: function () { _sagaManager.dispose(); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get InviteStore() {return WebpackModules.getByProps(\"getInvites\");}", "function extend(extensions) {\n const out = makeEffectAction({\n ...this,\n meta: {\n ...this.meta,\n ...extensions.meta,\n },\n callbacks: {\n onSuccess: extensions.callbacks && extensions.callbacks.onSuccess,\n...
[ "0.5628253", "0.55888045", "0.5454021", "0.53252554", "0.5068546", "0.5057576", "0.50082767", "0.49908838", "0.49598423", "0.49500677", "0.49431202", "0.49151698", "0.48958442", "0.48862466", "0.488318", "0.4878749", "0.4875917", "0.48568282", "0.4833754", "0.48223343", "0.48...
0.74589926
0
Turns a plugin!resource to [plugin, resource] with the plugin being undefined if the name did not have a plugin prefix.
function splitPrefix(name) { var prefix, index = name ? name.indexOf('!') : -1; if (index > -1) { prefix = name.substring(0, index); name = name.substring(index + 1, name.length); } return [prefix, name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function splitPrefix(name){var prefix,index=name?name.indexOf('!'):-1;if(index > -1){prefix = name.substring(0,index);name = name.substring(index + 1,name.length);}return [prefix,name];} //Creates a parts array for a relName where first part is plugin ID,", "function build_plugin_names() {\n const args = Norma(...
[ "0.6090058", "0.55159336", "0.5492749", "0.5432754", "0.53971833", "0.5210302", "0.5210302", "0.5179013", "0.5128188", "0.51118064", "0.500898", "0.49961546", "0.48784962", "0.48774046", "0.48762575", "0.47656962", "0.47428197", "0.47077817", "0.47039485", "0.4699542", "0.468...
0.0
-1
Creates a parts array for a relName where first part is plugin ID, second part is resource ID. Assumes relName has already been normalized.
function makeRelParts(relName) { return relName ? splitPrefix(relName) : []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeRelParts(relName) {\r\n return relName ? splitPrefix(relName) : [];\r\n }", "function makeRelParts(relName) {\n return relName ? splitPrefix(relName) : [];\n }", "function makeRelParts(relName) {\n return relName ? splitPre...
[ "0.7702619", "0.76882404", "0.76882404", "0.75450724", "0.7283985", "0.48902947", "0.48902947", "0.48902947", "0.48902947", "0.4867575", "0.47882268", "0.4759143", "0.47189513", "0.47189513", "0.47189513", "0.47189513", "0.4716062", "0.4711909", "0.4711909", "0.4711909", "0.4...
0.7711722
14
Filter out all items except for the one passed in the argument
function onlyItem (item) { return function () { return $(this).val() == item.id; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function without(items, item) {\n return items.filter(function (i) {\n return i !== item;\n });\n }", "function without(items, item) {\n return items.filter(function (i) { return i !== item; });\n}", "function without(items, item) {\n return items.filter(function (i) { return i !== item; });\...
[ "0.7620843", "0.74576545", "0.74576545", "0.6949059", "0.67931205", "0.6763516", "0.67110926", "0.66278845", "0.6603125", "0.66006714", "0.65639323", "0.6540129", "0.6525952", "0.65198886", "0.6499483", "0.64748067", "0.64748067", "0.6468689", "0.6459403", "0.641476", "0.6413...
0.0
-1
Used 'uni range + named function' from
function match(a) { return DIACRITICS[a] || a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Range() {}", "function f(){return{range:function(e,t,a){void 0===t?(t=e,e=0,a=1):a||(a=1);var n=[];if(a>0)for(var r=e;r<t;r+=a)n.push(r);else for(var f=e;f>t;f+=a)\n // eslint-disable-line for-direction\n n.push(f);return n},cycler:function(){return n(Array.prototype.slice.call(arguments))},joiner...
[ "0.64806694", "0.5936921", "0.591198", "0.5879352", "0.57734346", "0.5752165", "0.5658393", "0.5624848", "0.5595318", "0.5595318", "0.5581137", "0.5573567", "0.5571044", "0.5536358", "0.5502584", "0.5502584", "0.5502584", "0.5494878", "0.5481959", "0.5481959", "0.54792476", ...
0.0
-1
Noop CSS adapter that discards all classes by default
function _containerAdapter (clazz) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCss() {\n\t\tif (element) {\n\t\t\telement.className = Command.css.base + \" \" + definition.css;\n\t\t}\n\t}", "function nbRemoveCssClass(element, cssClass) {\n element.className = element.className.replace(cssClass, '').trim();\n}", "function removeCssClass(el, name) {\n var classes = el....
[ "0.6495747", "0.6073232", "0.5662417", "0.5653637", "0.5634298", "0.5600083", "0.559494", "0.5577604", "0.5558938", "0.5551325", "0.55240315", "0.5514435", "0.5509169", "0.5482942", "0.5455632", "0.542951", "0.542951", "0.54191136", "0.53922725", "0.53688735", "0.53688735", ...
0.0
-1
Noop CSS adapter that discards all classes by default
function _dropdownAdapter (clazz) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetCss() {\n\t\tif (element) {\n\t\t\telement.className = Command.css.base + \" \" + definition.css;\n\t\t}\n\t}", "function nbRemoveCssClass(element, cssClass) {\n element.className = element.className.replace(cssClass, '').trim();\n}", "function removeCssClass(el, name) {\n var classes = el....
[ "0.64959466", "0.60731715", "0.566205", "0.5654277", "0.5634917", "0.55998397", "0.5594978", "0.557723", "0.55577964", "0.55502135", "0.552421", "0.55137134", "0.5509124", "0.54835016", "0.54552174", "0.5428888", "0.5428888", "0.5418393", "0.5392184", "0.53687954", "0.5368795...
0.0
-1
this function routes a model to all other models. all functions that are routed have a property `.conversion` attached to the returned synthetic function. This property is an array of strings, each with the steps in between the 'from' and 'to' color models (inclusive). conversions that are not possible simply are not included.
function buildGraph() { var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3 var models = Object.keys(conversions); for (var len = models.length, i = 0; i < len; i++) { graph[models[i]] = { // http://jsperf.com/1-vs-infinity // micro-opt, but this is simple. distance: -1, parent: null }; } return graph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyModelMethod(listModelMethods, modelName, color){\n\n /// check if model exists\n if( modelName in listModelMethods){\n\n return listModelMethods[modelName]( color );\n\n /// else convert through RGB if possible\n }else{\n\n if ( modelName=='RGB' || 'RGB' in Color.convertModels[modelName] ){...
[ "0.53943527", "0.5018502", "0.49245542", "0.48956913", "0.48724517", "0.48599735", "0.48599735", "0.48429817", "0.4806638", "0.4805221", "0.47499967", "0.46058553", "0.45866397", "0.4573729", "0.45583662", "0.45374277", "0.45293838", "0.45099354", "0.45099354", "0.45082292", ...
0.0
-1
These parameters are named like such in order to support PreLoadJS and the loadfile/loadmanifest methods id: an id used to identify the asset src: path to download the asset
function Asset(id, src) { this.id = id; this.src = src; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LoadAsset() {}", "function loadAsset(target) {\n\t var div = document.getElementById(target.id);\n\t div.innerHTML = \"<label>Loading...</label>\";\n\n\t var type = target.attributes.getNamedItem(\"type\");\n\n\t var item = {\n\t src: target.id,\n\t id: target.id\n\t };\n\n\t if (...
[ "0.70362556", "0.6407183", "0.6367146", "0.63537556", "0.6291649", "0.6103874", "0.60029024", "0.5998736", "0.5998736", "0.5977756", "0.5958627", "0.5888432", "0.5864775", "0.5824091", "0.5760583", "0.57454026", "0.57360643", "0.57351696", "0.57351696", "0.5727828", "0.572327...
0.6557194
1
Try to parse an INLINE() item from the optimization log, returning the length of the parsed code. Returns 0 if it doesn't match and the line may be user output Returns 1 if it doesn't match and the line should be ignored
function tryParseInline (s) { if (/INLINE/.test(s)) { // Use non greedy match so that INLINE and FUNCTION SOURCE items // on the same line don't interfere, else the INLINE function name // would contain everything up to the ) in FUNCTION SOURCE () const [match, inlinedFn] = /INLINE \((.*?)\) id\{/.exec(s) || [false] // shouldn't not match though.. if (match === false) return -1 if (lastOptimizedFrame === null) return -1 const { fn, file } = lastOptimizedFrame // could be a big problem if the fn doesn't match if (fn !== inlinedFn) return -1 const key = `${fn} ${file}` inlined[key] = inlined[key] || [] inlined[key].push(lastOptimizedFrame) return match.length } return 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSourceLineCount(content) {\n if (content.type === \"wasm\") {\n const {\n binary\n } = content.value;\n return binary.length;\n }\n\n let count = 0;\n\n for (let i = 0; i < content.value.length; ++i) {\n if (content.value[i] === \"\\n\") {\n ++count;\n }\n }\n\n return co...
[ "0.5196293", "0.5176588", "0.51513124", "0.47783267", "0.4753157", "0.47322187", "0.4663651", "0.4645261", "0.46257108", "0.4547305", "0.4543424", "0.4537055", "0.45267522", "0.45110816", "0.44870505", "0.44853175", "0.4485113", "0.4478864", "0.4472904", "0.4456527", "0.44565...
0.69400126
0
============================================== ACCORDION > ===============================================
function toggleChevron(e) { $(e.target) .prev('.panel-heading') .find("i.indicator") .toggleClass('fa-minus fa-plus'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initAccordian() {\n \n}", "incapacitate(){\n\t\t//\n\t}", "function setAcc() {\n var acc = g.accChoices[0];\n for ( var i = 1 ; i < g.accChoices.length ; i++ ) {\n if ( location.cells === g.accChoices[i][1].toLowerCase() ) acc = g.accChoices[i];\n ...
[ "0.59241164", "0.5770851", "0.5669886", "0.56034124", "0.5514895", "0.54725045", "0.5463115", "0.53683096", "0.53351116", "0.5331831", "0.52584934", "0.5255812", "0.5233487", "0.5230976", "0.5226209", "0.5182321", "0.5149407", "0.5132901", "0.50900733", "0.49932614", "0.49719...
0.0
-1
Creates new Pilet API extensions for supporting simplified data feed connections.
function createFeedsApi(config) { if (config === void 0) { config = {}; } return function (context) { context.defineActions(actions); context.dispatch(function (state) { return (tslib_1.__assign(tslib_1.__assign({}, state), { feeds: {} })); }); return function (_, target) { var feeds = 0; return { createConnector: function (resolver) { var id = piral_core_1.buildName(target.name, feeds++); var options = utils_1.createFeedOptions(id, resolver); var invalidate = function () { var _a; (_a = options.dispose) === null || _a === void 0 ? void 0 : _a.call(options); context.createFeed(options.id); }; if (options.immediately) { context.loadFeed(options); } else { invalidate(); } var connect = (function (component) { return withFeed_1.withFeed(component, options); }); Object.keys(options.reducers).forEach(function (type) { var reducer = options.reducers[type]; if (typeof reducer === 'function') { connect[type] = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } context.updateFeed(id, args, function (data, item) { return reducer.call.apply(reducer, tslib_1.__spreadArray([connect, data], item)); }); }; } }); connect.invalidate = invalidate; return connect; }, }; }; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DataApi() { }", "function DataApi() { }", "function ExtensionAPI(chartInstance) {\n\t zrUtil.each(echartsAPIList, function (name) {\n\t this[name] = zrUtil.bind(chartInstance[name], chartInstance);\n\t }, this);\n\t}", "function ExtensionAPI(chartInstance) {\n zrUtil.each(echartsAPIL...
[ "0.55650705", "0.55650705", "0.54765755", "0.54196566", "0.5405696", "0.5405696", "0.5405696", "0.5405696", "0.5405696", "0.5405696", "0.5405696", "0.5405696", "0.5403755", "0.5403755", "0.5311928", "0.52788067", "0.5202588", "0.5177968", "0.5177968", "0.5177968", "0.5175075"...
0.598777
0
Adds a roll to the order and sorts it
function addtoinitiativeOrder(initiativeOrder) { initiativeOrder.slots.sort(function(a, b) { var nameA = a.type var nameB = b.type if (nameA < nameB) return -1; if (nameA > nameB) return 1; return 0; }); let order = ["triumph", "advantage", "success"]; order.forEach((symbol)=>{ initiativeOrder.slots.sort(function (a, b) { return a[symbol] - b[symbol]; }); }) initiativeOrder.slots.reverse(); return initiativeOrder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doRoll(results, roll) {\n\tif (isString(roll)) {\n\t\tvar table = findTable(roll);\n\t\tif (table) { rollTable(results, table); }\n\t} else {\n\t\tvar dropped = rollForDrops(roll);\n\t\tif (dropped > 0) { results[roll.item] = results.num(roll.item) + dropped; }\n\t}\n\treturn results;\n}", "function ROL...
[ "0.61749256", "0.6133769", "0.6013713", "0.598872", "0.56884724", "0.5522984", "0.5508083", "0.53887683", "0.5346109", "0.5253506", "0.52119744", "0.5209092", "0.5209092", "0.5206196", "0.515983", "0.51148504", "0.509742", "0.5089866", "0.5089134", "0.50880504", "0.5071738", ...
0.0
-1
Prints out Initiative Order to channel
function printinitiativeOrder(initiativeOrder, message, bot, channelEmoji) { let faces = ""; for (var i = initiativeOrder.turn - 1; i < initiativeOrder.slots.length; i++) { faces += getFace(initiativeOrder.slots[i].type, bot, channelEmoji); } faces += ":repeat:"; for (var i = 0; i < initiativeOrder.turn - 1; i++) { faces += getFace(initiativeOrder.slots[i].type, bot, channelEmoji); } message.channel.send("Round: " + initiativeOrder.round + " Turn: " + initiativeOrder.turn + "\nInitiative Order: "); if (faces == "") return; message.channel.send(faces); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printinitiativeOrder() {\n let faces = \"\";\n for (var i = initiativeOrder[channel].turn - 1; i < initiativeOrder[channel].slots.length; i++) {\n if (initiativeOrder[channel].slots[i].type == \"npc\") {\n faces += \":smiling_imp: \";\n } else if (initiativeOrder[channel].slots[i].t...
[ "0.7412468", "0.71973366", "0.6052489", "0.5862083", "0.5757499", "0.5749295", "0.57148415", "0.56947273", "0.5667125", "0.56657535", "0.5626621", "0.5552356", "0.5468988", "0.5468226", "0.5463571", "0.5433972", "0.5423482", "0.53207445", "0.53206176", "0.530968", "0.52288514...
0.7483886
0
The return integer is already adjusted for position offset (arrays start at 1) If a 1 is returned, then all players are dead
function traverseTheDead(slots, startingTurn, adjustment){ var i = startingTurn-1; // Turns start their arrays at index 1. So we adjust here... var type = slots[i]; do { i += adjustment; // Wrap around to the front if we reach the end if (i >= slots.length) { i = 0; } // Wrap around to the back if we reach the front if(i < 0) { i = slots.length-1; } type = slots[i].type; // If we have not circled around and found our original initative order turn, // assume all characters are dead. Break out of the infinite loop. if(i == startingTurn-1){ return -1; // MAGIC NUMBERS! } // Keep traversing if we encounter dead characters (dnpc or dpc) } while (type.substr(0,1) === "d"); return i+1; // Turns start their arrays at index 1. So we re-adjust here... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update_player(p_array, start_index, card){\n\t\tfor(var i = start_index; i < p_array.length; i++){\n\t\t\tif(card > 0){\n\t\t\t\tcard --;\n\t\t\t\tp_array[i] += 1;\n\t\t\t}else{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\treturn card;\n\t}", "isInActualPlayerBoard(){\n\t\tlet playerBoardLen = Math.trunc(this.boardL...
[ "0.63990015", "0.6205072", "0.61625034", "0.6001968", "0.59296244", "0.59047264", "0.58166564", "0.5788768", "0.5776768", "0.5760101", "0.5745507", "0.5744951", "0.5744047", "0.56956124", "0.5682133", "0.5680647", "0.56549853", "0.5650127", "0.56470925", "0.56086636", "0.5605...
0.0
-1
FUNCTIONS ============================================================================== TO DO: Log all of our car's current stats to the console.
function reWriteStats() { console.log(car.make, car.model, car.color, car.mileage, car.isWorking); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reWriteStats() {\nconsole.log('-----------')\nconsole.log('Make: ' + car.make)\nconsole.log('Model: ' + car.model)\nconsole.log('Color: ' + car.color)\nconsole.log('Mileage: ' + car.mileage)\nconsole.log('Is working: ' + car.isWorking)\nconsole.log('-----------')\n}", "function updateLogs() {\r\n updat...
[ "0.72349834", "0.6501133", "0.64051634", "0.639567", "0.6347613", "0.6315213", "0.631015", "0.62340915", "0.6204382", "0.6204382", "0.6204382", "0.6204382", "0.61642414", "0.61503655", "0.61227643", "0.60892177", "0.6077331", "0.6042317", "0.60362464", "0.600054", "0.5948205"...
0.7578779
0
! The buffer module from node.js, for the browser.
function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function createBuffer() {\n var ptr = exports.hb_buffer_create();\n return {\n ptr: ptr,\n /**\n ...
[ "0.7285147", "0.7285147", "0.7285147", "0.7285147", "0.7285147", "0.7285147", "0.7242391", "0.720157", "0.7109185", "0.70164645", "0.689919", "0.68774897", "0.679956", "0.67716753", "0.675673", "0.675673", "0.675673", "0.675673", "0.675673", "0.675673", "0.675673", "0.67530...
0.0
-1
Setup for media stream init, linking to video source and recorder init
function setupMediaStream() { navigator.mediaDevices .getUserMedia(MediaRecorderConfig.constraints) .then(function(mediaStream) { //Pipe stream to video element connectStreamToVideo(mediaStream); //Create media recorder instance to capture the stream setupMediaRecorder(mediaStream); }) .catch(function(error) { //NotFoundError - This will show up when no video device is detected. //NotAllowedError: The request is denied by the user agent or the platform is insecure in the current context. //NotReadableError: Failed to allocate videosource - User allowed permission but disconnected device. Could also be hardware error. //OverconstrainedError: Constraints could be not satisfied. setStreamError(`${error.name}: ${error.message}`); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_initVideoStream () {\n const getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia ||\n navigator.mozGetUserMedia || navigator.msGetUserMedia\n if (!getUserMedia) {\n throw new Error('Webcam feature not supported! :(')\n }\n\n getUserMedia.call(navigator, { video: true }, (st...
[ "0.7367218", "0.7110404", "0.70961297", "0.6990977", "0.6955605", "0.69109154", "0.6879557", "0.6804236", "0.6753077", "0.6696091", "0.66279376", "0.6619427", "0.65875226", "0.65029657", "0.6493743", "0.6483987", "0.64422655", "0.64414865", "0.6430236", "0.6422545", "0.640523...
0.6908084
6
Adds event handlers for onStop & onDataAvailable to the MediaRecorder
function finalizeMediaRecorderSetup() { //On new data, push to chunks array. mediaRecorder.ondataavailable = (e) => { //If we have new data... if (e.data.size > 0) { //Append chunks.push(e.data); } }; mediaRecorder.onstop = (e) => { //https://developer.mozilla.org/en-US/docs/Web/API/Blob //Generate a blob (Binary Large OBject) - A Blob object represents a file-like object of immutable, raw data; const blob = new Blob(chunks, { type: "video/webm" }); //Update ref to blob in redux updateStreamRaw(chunks); //This creates a url that points to our video in browser memory. //https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL //Update stream obj ref in redux updateStreamObject(window.URL.createObjectURL(blob)); //Clear chunk data. chunks = []; //Clear errors because we are done with the stream setStreamError(false); //Turns off camera and mic e.target.stream.getTracks().forEach(track => track.stop()); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mediaRecorderStopped(mediaObject, ev){\n console.log(\"Recording stopped\");\n stoppedRecordings += 1;\n //All recordings have been stopped\n if(stoppedRecordings === mediaObjects.length){\n allRecordersStopped();\n stoppedRecordings = 0;\n }\n}", "listen() {\n this.media_.addListener(this...
[ "0.6618325", "0.64521515", "0.63483626", "0.6281591", "0.6091848", "0.60625345", "0.60484034", "0.6008015", "0.5948912", "0.59323114", "0.5899897", "0.57915455", "0.57915336", "0.5774272", "0.5740405", "0.5699519", "0.56971747", "0.5673915", "0.5640295", "0.56364894", "0.5604...
0.64805907
1
Connects mediaStream to video DOM element
function connectStreamToVideo(mediaStream) { //Set the video source to be our media stream streamElementHandle.current.srcObject = mediaStream; //When the video element is ready, play video source. streamElementHandle.current.onloadedmetadata = (e) => { streamElementHandle.current.play(); setLoading(false); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receiveStream(stream,elemid){\n\n var video=document.getElementById(elemid);\n\n video.srcObject=stream;\n\n window.peer_stream=stream;\n\n}", "function gotRemoteStream(event) {\n // Associate the remote video element with the retrieved stream\n remoteVideo.srcObject = event.strea...
[ "0.7517438", "0.73793036", "0.7171127", "0.71184", "0.70771", "0.70664346", "0.70602787", "0.70568585", "0.70333874", "0.699793", "0.6991879", "0.69901776", "0.69861615", "0.6978263", "0.69725615", "0.6957085", "0.6957085", "0.6947405", "0.6942177", "0.6937955", "0.69303626",...
0.7879048
0
Creates an instance of MediaRecorder using the passed in mediaStream object.
function setupMediaRecorder(mediaStream) { setMediaRecorder(new MediaRecorder(mediaStream, MediaRecorderConfig.options)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MediaRecorderWrapper(mediaStream) {\n var self = this;\n\n /**\n * This method records MediaStream.\n * @method\n * @memberof MediaStreamRecorder\n * @example\n * recorder.record();\n */\n this.start = function(timeSlice, __disableLogs) {\n if (!self.mimeType) {\n ...
[ "0.6951809", "0.6951809", "0.6817607", "0.6817607", "0.6643296", "0.65139395", "0.62677485", "0.59243184", "0.58204305", "0.57897687", "0.5699604", "0.5667495", "0.5606032", "0.5603932", "0.5599946", "0.5544496", "0.5516496", "0.54859686", "0.54727083", "0.54043305", "0.53944...
0.78765565
0
release 1 0. tangkap event submit dari formItem 1. di dalam event handler, tangkap value dari input keyword 2. filter array items menjadi array baru filteredItems 3. tampilkan lagi card dengan filteredItems cara filter 0. function filter menerima sebuah parameter string keyword 1. bikin penampungan array kosong 2. lakukan looping, di setiap sekali loop cocokkan keyword dengan nama item sedang dalam looping 3. jika cocok keywordnya, masukkan penampung 4. return array tampungan
function filter(kataKunci) { var filteredItems = [] for (var j = 0; j < items.length; j++) { var item = items[j]; var namaItem = item[1] var isMatched = namaItem.toLowerCase().includes(kataKunci.toLowerCase()) if(isMatched == true) { filteredItems.push(item) } } return filteredItems }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter(keyword) {\n var filteredItems = [];\n for (var j = 0; j < items.length; j++) {\n var item = items[j];\n var cocok = item[1].toLowerCase().includes(keyword.toLowerCase()); // cocokan kata dengan function include dengan nilai default bolean || jika ada kata yang sesuai dengan yan...
[ "0.6615316", "0.63837445", "0.62494177", "0.6169226", "0.6167288", "0.6091015", "0.6088728", "0.60797346", "0.6040909", "0.60406995", "0.59862", "0.5977661", "0.5977661", "0.5971257", "0.59338355", "0.5894531", "0.58909714", "0.58883846", "0.5850862", "0.58497447", "0.5823404...
0.6109303
5
Beginning of the Logic Layer
function update() { context2D.clearRect( 0, 0, context2D.canvas.width, context2D.canvas.height ) // Clear canvas /** This const "stars" gives us easy access to the population of stars inside cradleOfStars */ const stars = cradleOfStars.stars for ( const starID in stars ) { /** This const "currentStar" gives us easy access to unique starID inside cradleOfStars */ const currentStar = stars[starID] const currentTimeToFall = currentStar.timeToFall if ( currentTimeToFall >= 0 ) { currentStar.timeToFall = currentTimeToFall - 1 } else { /** * * Here is the rebirth of stars; here we treat what happens whenever each star falls out of the canvas. * */ if ( currentStar.x <= 0 || currentStar.x >= context2D.canvas.width || currentStar.y >= context2D.canvas.height ) { currentStar.x = getRandomIntNumber( 2, context2D.canvas.width ) currentStar.y = getRandomIntNumber( 3, 325 ) currentStar.color = COLOR_PALLETE[getRandomIntNumber( 0, COLOR_PALLETE.length - 1 )] currentStar.timeToFall = getRandomIntNumber( 0, MAX_TIME_TO_FALL ) // See wait = http://bit.ly/2TXHvjy currentStar.velocityToFall = getRandomIntNumber( 4, 5 ) // Changes the Y axis currentStar.angleToFall = getRandomIntNumber( -9, 9 ) // Changes the X axis /** * * If a star didn't reach its max diameter yet, it's incremented; and if it * reaches its max diameter, then is is randomically redefined. * */ if (currentStar.diameter <= 1.25) { currentStar.diameter = currentStar.diameter + 0.05 } else { currentStar.diameter = Math.random() } } const currentVelocityToFall = currentStar.velocityToFall const currentAngleToFall = currentStar.angleToFall const currentPositionX = currentStar.x const currentPositionY = currentStar.y currentStar.x = currentPositionX + 1 * currentAngleToFall currentStar.y = currentPositionY + currentVelocityToFall } } drawSky() drawStars() drawCity() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Main() {\n buildinterface();\n interfaceLogic();\n }", "function createInitialStuff() {\n\n\t//Sniðugt að búa til alla units í Levelinu hér og svoleiðis til \n\t// allt sé loadað áðurenn hann byrjar render/update\n\t//AKA það er betra að hafa þetta sem part af \"loading\" frekar en \n\t...
[ "0.64357656", "0.6085002", "0.6047296", "0.5925407", "0.5906422", "0.5900777", "0.5896394", "0.5866745", "0.5843226", "0.5835797", "0.5798923", "0.579424", "0.5792367", "0.57796705", "0.57613677", "0.57613677", "0.57613677", "0.57613677", "0.57613677", "0.57613677", "0.573931...
0.0
-1
Beginning of the Presentation Layer
function drawSky() { /** * * We can have both linear and radial gradients, * see link https://www.w3schools.com/graphics/canvas_gradients.asp * */ // createLinearGradient( startinX, startingY, endingX, endingY ); var gradientSky = context2D.createLinearGradient( 250, 0, 250, context2D.canvas.height ); /** Values here range from 0 to 1 */ gradientSky.addColorStop( .20, "black" ); gradientSky.addColorStop( .70 ,"DarkSlateGray" ); gradientSky.addColorStop( .95, "lightgray" ); context2D.fillStyle = gradientSky; context2D.fillRect(0, 0, context2D.canvas.width, context2D.canvas.height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startUp () {\n initialize();\n applyClickHandlers();\n modalDisplay();\n}", "function actualRun() {\n\n\t\t//set preloader mode\n\t\tif (g_objPreloader) {\n\t\t\tg_objPreloader.fadeTo(0, 1);\n\t\t\tg_objWrapper.height(g_options.theme_preloading_height);\n\t\t\tg_functions.placeElement(g_objPrel...
[ "0.68800426", "0.6588414", "0.6505535", "0.64949584", "0.6494435", "0.64748", "0.64721805", "0.6456075", "0.6456064", "0.6431826", "0.6401887", "0.6401887", "0.63658506", "0.63627505", "0.6359214", "0.63500804", "0.63483655", "0.6330144", "0.63199854", "0.63186157", "0.630326...
0.0
-1
Creates a random id
function guid() { function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createId(){\n return Math.round(Math.random()*1000000);\n }", "function generateId() {\n\treturn now() + parseInt(Math.random() * 999999);\n}", "function createId() {\n\tvar id = Math.floor( Math.random() * 100000 ) + 1;\n\treturn id;\n}", "function createId(){\n return Math.floor(Math....
[ "0.86692667", "0.86326087", "0.8587367", "0.856825", "0.85395885", "0.85059416", "0.84709364", "0.8461087", "0.8445924", "0.8386211", "0.8374201", "0.83426166", "0.83227676", "0.8314144", "0.829798", "0.828935", "0.82480973", "0.8215588", "0.82114905", "0.82047236", "0.819896...
0.0
-1
fixed dataset type from db
function DatabaseDataset() { // call super BaseDataset.call(this); var dset = this.dset, priv = this.privates; dset.type = function() { return 'database'; }; dset.state = function() { return _.extend(priv.state(), { type: dset.type() }); }; // 'variables' is a list dset.getVariables = function(variables, config) { var defer = $q.defer(), configDefined = !_.isUndefined(config); var samplesEmpty = _.isEmpty(priv.samples), currentVariables = dset.variables(), intersection = lodashEq.intersection(currentVariables, variables), newVariables = lodashEq.difference(variables, intersection); if (samplesEmpty) { // get all variables priv.getVariables(variables, config, defer, dset.name()); } else if (_.isEmpty(newVariables)) { // nothing to done, everything already fetched defer.resolve(priv.getResult(newVariables, config, false)); } else { // fetch new variables priv.getVariables(newVariables, config, defer, dset.name()); } return defer.promise; }; return dset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_dataType(col, passed_options) {\n const options = Object.assign(\n {},\n {\n is_atomic: false,\n },\n passed_options,\n );\n const { is_atomic } = options;\n const props = this.fields[col];\n\n if (this._isKeyCandidate(col)) {\n return 'BIGINT.UNSIGNED';\n } else ...
[ "0.64673865", "0.6416066", "0.6357154", "0.6327716", "0.6186103", "0.61540085", "0.61463594", "0.61275774", "0.6066698", "0.60398036", "0.6003281", "0.5938757", "0.59012234", "0.58709276", "0.5832239", "0.58312273", "0.5828998", "0.58222574", "0.5795931", "0.57766587", "0.573...
0.5268796
67
Creates Tile components out of the raceArray and api data
ClassTiles(props) { const classTiles = props.classArray.map(classs => ( <Tile key={classs.id} image={classs.image} link="/chooseAttributes" name={props.classes[classs.id].name} /> )); return <ul className="tiles-section">{classTiles}</ul>; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "RaceTiles(props) {\n const raceTiles = props.raceArray.map(race => (\n <Tile\n key={race.id}\n image={race.image}\n link=\"/chooseClass\"\n name={props.races[race.id].name}\n />\n ));\n return <ul className=\"tiles-section\">{raceTiles}</ul>;\n }", "function create...
[ "0.70562184", "0.6558147", "0.6385229", "0.63753974", "0.626859", "0.6234361", "0.62211293", "0.6128676", "0.60929924", "0.6082629", "0.60702425", "0.6045761", "0.6020933", "0.60060227", "0.5969112", "0.59471995", "0.593793", "0.5934082", "0.59162825", "0.59128046", "0.591229...
0.578549
33