query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
given the collection of standup reports, collates the entire report
function getReportDisplay(standupReports) { if (!standupReports) { return "*There is no standup data to report.*"; } var totalReport = "*Standup Report*\n\n"; for (var user in standupReports) { var report = standupReports[user]; totalReport += getSingleReportDisplay(report); } return totalReport; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static merge(reports) {\n const valid = reports.every((report) => report.valid);\n const merged = {};\n reports.forEach((report) => {\n report.results.forEach((result) => {\n const key = result.filePath;\n if (key in merged) {\n merged[key].messages = [...merged[key].messages, ...result.messages];\n }\n else {\n merged[key] = { ...result };\n }\n });\n });\n const results = Object.values(merged).map((result) => {\n /* recalculate error- and warning-count */\n result.errorCount = countErrors(result.messages);\n result.warningCount = countWarnings(result.messages);\n return result;\n });\n return {\n valid,\n results,\n errorCount: sumErrors(results),\n warningCount: sumWarnings(results),\n };\n }", "function __process(reports) {\n\n var new_reports = _extract_and_sort_data(reports);\n return _generate_chart_data(new_reports);\n }", "parseReports() {\n fs.readdir(this._reports, (err, items) => {\n for (var i = 0; i < items.length; i++) {\n const fileContent = JSON.parse(fs.readFileSync(this._reports + '/' + items[i], 'utf8'));\n this.parseJSON(fileContent);\n };\n this.generateFinalReport();\n });\n }", "function newReportEntry(key, allcanteens, idx, allstalls, alldata){\n var res;\n var pCount;\n if(key==\"monthly\"){\n res = tmpl_mentry.clone();\n pCount=12;\n }\n else if(key==\"daily\"){\n res = tmpl_dentry.clone();\n pCount=10;\n }\n // class for stall entries that belong to this canteen\n res.childrenClass=\"ReportEntry\"+key+\"For\"+idx;\n // copykeys(res, allcanteens);\n // get canteen and stalls\n var canobj = allcanteens[idx];\n // stall obj, not report data\n var stallobjs = findMultipleInArray(allstalls, \"canteen\", canobj.id);\n // report data\n var stalls = [];\n for(var i = 0; i<stallobjs.length; i++)\n stalls.push(findInArray(alldata, \"stall\", stallobjs[i].id));\n // calculate stall totals\n var stallTR = []; // total revenue\n var stallTO = []; // total order count\n for(var i = 0; i<stalls.length; i++){\n stallTR.push(repMgr.SumStallTotal(stalls[i], key, \"revenue\"));\n stallTO.push(repMgr.SumStallTotal(stalls[i], key, \"order_count\"));\n }\n // calculate canteen stats\n var canStats = repMgr.SumForCanteen(stalls, key);\n\n // fill in first and last\n res.find(\".First\").html(canobj.name);\n var total = canStats[canStats.length-1];\n res.find(\".Last\").html(toStr(total.order_count, total.revenue));\n // fill in periods\n for( var i = 0; i<pCount; i++){\n var str;\n if(canStats.length==1)\n str = toStr(0,0);\n else\n str = toStr(canStats[i].order_count, canStats[i].revenue);\n res.find(\".P\"+(i+1)).html(str);\n }\n\n // now, build one entry for each stall\n // if no stall in this canteen, then append tmpl_can_empty\n res.detailsShown = false;\n res.Toggle = function(){\n if(res.detailsShown){\n res.details.find(\".DetailContent\").slideUp(400, function(){\n res.details.hide();\n });\n res.detailsShown = false;\n }\n else{\n res.details.show();\n res.details.find(\".DetailContent\").slideDown();\n res.detailsShown = true;\n }\n };\n res.click(res.Toggle);\n res.details = tmpl_can_details.clone().hide();\n res.details.find(\".DetailContent\").hide();\n res.details.find(\".ReportCanteenName\").html(canobj.name);\n // if it's empty, we simply return\n if(stalls.length==0)\n return [res, res.details];\n // if it's not, we hide empty message, and show stall table\n res.hasStall = true;\n res.details.find(\".ReportCanEmptyMsg\").hide();\n res.stalltable=res.details.find(\".ReportStallContainer\");\n res.stalltable.show();\n // set inner header\n res.stalltable.find(\".RCH\").append($(key==\"monthly\"?\"#HeadRowMonthly\":\"#HeadRowDaily\").clone());\n // set inner body\n var ibody = res.stalltable.find(\".RCB\");\n for(var i = 0; i<stalls.length; i++){\n var stentry=newReportStallEntry(key, stalls[i], stallobjs[i].name, \n stallTR[i], stallTO[i]);\n ibody.append(stentry);\n }\n return [res, res.details];\n}", "static generateReport() {\n let data = [];\n console.info(\"Processing Json Report Files\");\n let files = fs.readdirSync(intermediateJsonFilesDirectory);\n for (let i in files) {\n let f = `${intermediateJsonFilesDirectory}/${files[i]}`;\n console.log(`Processing file ${f}`);\n try {\n let fileContent = fs.readFileSync(f, 'utf-8');\n data.push(JSON.parse(fileContent)[0]);\n }catch (err) {\n if (err) {\n console.error(`Failed to process file ${f}`);\n console.error(err);\n }\n }\n }\n\n console.info(\"Writing consolidated json file\");\n try {\n fs.writeFileSync('./e2e/reports/combinedJSON/cucumber_report.json', JSON.stringify(data));\n } catch (err) {\n if (err) {\n console.error(\"Failed to generate the consolidated json file.\");\n console.error(err);\n throw err;\n }\n }\n\n console.info(\"Generating Final HTML Report\");\n try {\n reporter.generate(cucumberReporterOptions);\n } catch (err) {\n if (err) {\n console.error(\"Failed to generate the final html report\");\n console.error(err);\n throw err;\n }\n }\n }", "function generate_all_reports()\n{\n report_ToAnswer_emails();\n report_FollowUp_emails();\n report_Work_FollowUp_emails();\n}", "function completeReportsWithUsersData (reports) {\n return new Promise((resolve, reject) => {\n if (reports.length === 0) {\n resolve([]);\n }\n\n let results = [];\n reports.forEach(async report => {\n let submitterData = await queryUserById(report.submitter_id);\n let supervisorData = null;\n if (report.supervisor_id !== null) {\n supervisorData = await queryUserById(report.supervisor_id);\n delete supervisorData.organization_id;\n }\n\n delete submitterData.organization_id;\n delete report.submitter_id;\n delete report.supervisor_id;\n\n report.submitter = submitterData;\n report.supervisor = supervisorData;\n\n results.push(report);\n if (results.length === reports.length) {\n resolve(results);\n }\n })\n })\n}", "async function createInitialReports() {\n try {\n console.log('Trying to create reports...');\n\n const reportOne = await createReport({\n title: 'ET spotted outside of Area 51',\n location: 'Roswell, NM',\n description: 'I saw what can only be described as a very slender, very tall humanoid walking behind the fences at...',\n password: '51isTheKey'\n });\n\n const reportTwo = await createReport({\n title: 'Fairy lights in my backyard',\n location: 'Utica, NY',\n description: 'I saw floating lights in my backyard... on inspection they weren\\'t fireflies...',\n password: 'iLoveF4ri3s'\n });\n\n const reportThree = await createReport({\n title: 'Corner of metal object sticking up out of the ground in the woods...',\n location: 'Haven, Maine',\n description: 'Late last night and the night before\\n Tommyknockers, Tommyknockers\\n knocking at the door',\n password: 'kingwasright'\n })\n\n console.log('Success creating reports!');\n\n return [reportOne, reportTwo, reportThree]\n } catch (error) {\n console.error('Error while creating reports!');\n throw (error);\n }\n}", "function assembleReport() {\n var key, element, component, errorBool = false;\n \n //assemble whitelist report\n esprimaReport = esprimaReport.concat('Whitelist: <br>');\n for (element in parameters.whitelist) {\n if (parameters.whitelist[element] !== true) {\n errorBool = true;\n esprimaReport = esprimaReport.concat('&nbsp Error: You are missing a ' + element + '.');\n }\n }\n if (!errorBool) {\n esprimaReport = esprimaReport.concat('&nbsp No issues!<br>');\n } else {\n esprimaReport = esprimaReport.concat('<br>');\n }\n \n //assemble blacklist report\n esprimaReport = esprimaReport.concat('Blacklist:');\n if (reports.blacklist.length > 0) {\n esprimaReport = esprimaReport.concat('<br>');\n reports.blacklist.forEach(function (element) {\n esprimaReport = esprimaReport.concat('&nbsp Error: You have a ' + element.type + ' on line ' + element.location + '.<br>');\n });\n } else {\n esprimaReport = esprimaReport.concat(' No issues! <br>');\n }\n \n //assemble structure report\n esprimaReport = esprimaReport.concat('Structure: <br>');\n if (parameters.structure.integrity) {\n esprimaReport = esprimaReport.concat('&nbsp No issues! <br>');\n } else {\n parameters.structure.components.some(function (component, index) {\n if (index === 0) {\n esprimaReport = esprimaReport.concat('&nbsp Error: You are missing a ');\n }\n component.array.forEach(function (element, index) {\n esprimaReport = esprimaReport.concat(element);\n if (index < component.array.length - 1) {\n esprimaReport = esprimaReport.concat(' enclosing a ');\n }\n });\n if (index < component.array.length - 1) {\n esprimaReport = esprimaReport.concat(', followed by a <br>');\n }\n });\n esprimaReport = esprimaReport.concat('.<br>');\n }\n }", "convertReport(report) {\n // Report model\n const reportView = {\n id: report._id,\n title: `${report.pipeline} (${report.stage})`,\n subtitle: report.job\n };\n if (report.cucumber) {\n // Create chart history data \n reportView.history = report.cucumber\n // Sort by time ascending\n .sort((a, b) => {\n return a.timestamp > b.timestamp ? 1 : -1;\n })\n // Filter reports that are not in defined interval\n .filter((report, idx, arr) => {\n // Latest test case = last in list\n const latestTestTime = moment(arr[arr.length - 1].timestamp);\n const currTestTime = moment(report.timestamp);\n return latestTestTime.diff(currTestTime, 'days') <= daysInterval;\n })\n .reduce((acc, c) => {\n const errors = [];\n let passed = 0;\n let failed = 0;\n c.features.forEach((feature) => {\n feature.scenarios.forEach((scenario) => {\n scenario.steps.forEach((step) => {\n if (step.result === 'passed') {\n passed++;\n } else {\n failed++;\n errors.push({\n test: scenario.name,\n message: step.error,\n });\n }\n })\n })\n })\n acc.push({\n passed: passed,\n failed: failed,\n errors: errors,\n when: c.timestamp\n });\n return acc;\n }, []);\n\n }\n return reportView;\n }", "function handler(reports) {\n\t\t\tvar added = [];\n\t\t\tvar removed = [];\n\t\t\tfor (var r = 0; r < reports.length; r++) {\n\t\t\t\tpushall(added, reports[r].addedNodes);\n\t\t\t\tpushall(removed, reports[r].removedNodes);\n\t\t\t}\n\t\t\tutils.distinct(removed); remove(removed);\n\t\t\tutils.distinct(added); add(added);\n\t\t}", "function handler(reports) {\n\t\t\tvar added = [];\n\t\t\tvar removed = [];\n\t\t\tfor (var r = 0; r < reports.length; r++) {\n\t\t\t\tpushall(added, reports[r].addedNodes);\n\t\t\t\tpushall(removed, reports[r].removedNodes);\n\t\t\t}\n\t\t\tutils.distinct(removed); remove(removed);\n\t\t\tutils.distinct(added); add(added);\n\t\t}", "static mergeStories(snapshots){\n for(let i=0;i<snapshots.length;i++){\n let snap = snapshots[i];\n // loop forwards through the array except for the last element, since the last element will have ever referrer that occurs\n // don't loop over the last so we don't double count its stats\n let lastStory = snap.stories[snap.stories.length-1];\n for(let s=0;s<snap.stories.length-1;s++){\n let story = snap.stories[s];\n // merge story stats\n lastStory.views += story.views;\n lastStory.reads += story.reads;\n lastStory.claps += story.claps;\n lastStory.upvotes += story.upvotes;\n // now merge the referrers\n for(let r=0;r<story.referrers.length;r++){\n let found = false;\n for(let re=0;re<lastStory.referrers.length;re++){\n if(lastStory.referrers[re].name == story.referrers[r].name){\n lastStory.referrers[re].views += story.referrers[r].views;\n found=true;\n }\n }\n if(!found){\n lastStory.referrers.push(story.referrers[r]);\n }\n }\n }\n // for some reason undefiend seems to turn up in the list of referrals. Easier to clean it out here rather than trace its source.\n lastStory.referrers = lastStory.referrers.map(item=>{if (item != undefined) return item})\n // set only the properties we want\n snapshots[i] = {\n views: lastStory.views,\n reads: lastStory.reads,\n claps: lastStory.claps,\n upvotes: lastStory.upvotes,\n referrers: lastStory.referrers,\n snapshotTimestamp: snap.snapshotTimestamp\n }\n }\n return snapshots\n }", "updateReport(report) {\n this.setReports(_reports.forEach((r) => {\n r = r.id == report.id ? report : r;\n }));\n }", "timesheets() {\n var from = FlowRouter.getParam(\"from\");\n var to = FlowRouter.getParam(\"to\");\n var projectId = FlowRouter.getParam(\"projectId\");\n var timesheets = [];\n var result = null;\n\n //if it's date range, making sure query reflects the range\n if (from == null || to == null) {\n result = Timesheets.find();\n } else {\n result = Timesheets.find({\n $and:[\n {'date': {$gte: from}}, \n {'date': {$lte: to}}\n ]});\n }//end of date range if-else statement\n \n \n var fectchResult = result.fetch();\n var dateString = '';\n \n //consolidatedArray.push.apply(fectchResult);\n fectchResult.forEach(function (entry) {\n var timechunks = Timechunks.find({$and:[{'timesheet': entry._id}, {'project': projectId}]}).fetch();\n if(FlowRouter.getParam(\"reportType\") == \"daily\") {\n dateString = getStringDate(entry.date, 'dddd, MMMM Do YYYY');\n\n } else if (FlowRouter.getParam(\"reportType\") == \"weekly\" || FlowRouter.getParam(\"reportType\") == \"date_range\") {\n var curr = new Date(entry.date);\n var first = curr.getDate() - curr.getDay(); // First day is the day of the month - the day of the week\n var last = first + 6; // last day is the first day + 6\n var dateString = getStringDate(new Date(curr.setDate(first)), 'MMMM Do YYYY') + \" - \" + getStringDate(new Date(curr.setDate(last)), 'MMMM Do YYYY');\n\n } else if(FlowRouter.getParam(\"reportType\") == \"monthly\") {//Check if monthly\n var dateString = getStringDate(entry.date, 'MMMM YYYY');\n }\n \n timechunks.forEach(function (timechunck) {\n var key = dateString;\n var userId = timechunck.userInfo[\"userId\"];\n console.log(\"Printng userId----*****\", userId);\n if(timeChunkObject[key] == null) {\n \n var timeChunkData = {};\n timeChunkData[\"name\"] = (timechunck.userInfo.firstName + \" \" + timechunck.userInfo.lastName);\n timeChunkData[\"totalHours\"] = getTotalHoursForTimeChunk(timechunck);\n timeChunkData[\"date\"] = dateString;\n\n var userObj = {};\n userObj[userId] = timeChunkData;\n\n /*\n monday: {\n userId: {}\n userId2: {}\n userId3 : {}\n }\n\n */\n timeChunkObject[key] = userObj;\n timeChunkKeyArray.push(key);\n //console.log(\"Adding to array key\", timeChunkObject);\n \n } else {\n /*\n we have a json that looks like this. \n {\n \"userId\": {\n \"name\": nameOfUserInTimeChunk,\n \"totalHours\": total hours for a user in time chunk\n }\n }\n */\n \n if(timeChunkObject[dateString][userId] == null) {\n \n console.log(\"printing else oj\",timeChunkObject[dateString]);\n \n\n console.log(\"tcObj before\", timeChunkObject);\n var timeChunkData = {};\n timeChunkData[\"name\"] = (timechunck.userInfo.firstName + \" \" + timechunck.userInfo.lastName);\n timeChunkData[\"totalHours\"] = getTotalHoursForTimeChunk(timechunck);\n timeChunkData[\"date\"] = dateString;\n\n var data = timeChunkObject[dateString];\n data[userId] = timeChunkData;\n timeChunkObject[dateString] = data;\n \n\n } else {\n console.log(\"tcObj\", timeChunkObject);\n\n //get the value from timeChunkObject\n var data = timeChunkObject[key][userId]; \n \n // if(data[\"userId\"] === userId) {\n\n // } else {\n\n // }\n //get the totalhour from the value(data)\n var totalHours = data[\"totalHours\"];\n \n //aggregate the existing hour with the new time chunk hour\n var concatHours = totalHours + getTotalHoursForTimeChunk(timechunck);\n \n // update the value object totalhours with aggreagated value\n data[\"totalHours\"] = concatHours;\n\n //Set the upated value object back to timechunkObject\n timeChunkObject[key][userId] = data;\n }\n\n console.log(\"PRINTING DATA\", timeChunkObject);\n \n }\n });\n\n });//end of fetchResult forEach loop\n \n var showNodataValue = timeChunkKeyArray.length === 0;\n Session.set(\"showNoData\", showNodataValue);\n\n\n return timeChunkKeyArray;\n\n }", "function summarizeIncidentReport(report) {\n return summarizeIncident(report);\n}", "receiveReport(report) {\n //this.removeReport(report);\n this.setReports(_reports.concat(report));\n }", "async function mainExport(report, project) {\n await Report.find({ _id: report._id })\n .populate(\"photos\")\n .exec(function (err, report) {\n\n //creating the outputs for the various arrays inside the report\n let purpose = report[0].purposeOfReview\n .map(note => `<li style=\"font-size:18px; margin-top:5px;\">${note}</li>`)\n .join(\"\");\n let deficiencies = report[0].deficienciesNoted\n .map(note => `<li style=\"font-size:18px; margin-top:5px;\">${note}</li>`)\n .join(\"\");\n let miscNotes = report[0].miscellaneousNotes\n .map(note => `<li style=\"font-size:18px; margin-top:5px;\">${note}</li>`)\n .join(\"\");\n let date = report[0].date;\n let time = report[0].time;\n let weather = report[0].weather;\n let reportNumber = report[0].reportNumber;\n let contractors = project.contractors;\n let projectNumber = project.projectNumber;\n let projectName = project.projectName;\n let location = project.location;\n\n let workCompleted = report[0].workCompleted\n .map(\n section =>\n `<li><h3 style='margin-bottom:5px;font-size:20px; text-transform: capitalize;'>${\n section.title\n }</h3><ul style='margin-top: 0; padding-left: 20px;'>${section.notes\n .map(\n note =>\n `<li style=\"font-size: 18px; font-weight:normal\">${note}</li>`\n )\n .join(\"\")}</ul></li>`\n )\n .join(\"\");\n\n const emailBody = `\n <section style='font-family: Arial, Helvetica, sans-serif; color:#202020'>\n <h1 style='margin-bottom: 0;font-size:25px;'>\n Site Visit Report ${reportNumber}\n </h1>\n <div>\n <table>\n <tbody>\n <tr>\n <td style='font-weight: 600; font-size:18px; text-align: right;'>Project:</td>\n <td style='font-size:18px;'>${projectName}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Location:</td>\n <td style='font-size:18px;'>${location}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Date:</td>\n <td style='font-size:18px;'>${date}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Time:</td>\n <td style='font-size:18px;'>${time}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Weather:</td>\n <td style='font-size:18px;'>${weather}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>File Number:</td>\n <td style='font-size:18px;'>${projectNumber}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Contractors:</td>\n <td style='font-size:18px;'>${contractors.join(\", \") ||\n \"Dale Shlass\"}</td>\n </tr>\n </tbody>\n </table>\n\n <section>\n <h2 style='font-size:22px; margin-bottom: 0; text-decoration: underline'>Purpose of Review</h2>\n <ul style='margin-top: 0; padding-left: 20px;'>\n ${purpose ||\n '<li style=\"font-size:18px; margin-top:5px;\">None noted.</li>'}\n </ul>\n </section>\n\n <section>\n <h2 style='font-size:22px; margin-bottom: 0; text-decoration: underline'>Deficiencies Noted</h2>\n <ul style='margin-top: 0; padding-left: 20px;'>\n ${deficiencies ||\n '<li style=\"font-size:18px; margin-top: 5px;\">None noted.</li>'}\n </ul>\n </section>\n\n <section>\n <h2 style=' font-size:22px; margin-bottom: 0; text-decoration: underline'>\n Work Underway/Completed\n </h2>\n ${\n workCompleted\n ? `<ol style='font-weight: 600; font-size: 20px;'>${workCompleted}<ol>`\n : '<ul style=\"margin-top: 0; padding-left: 20px;\"><li style=\"font-size:18px; margin-top: 5px;\">No work in progress at the time of site visit.</li></ul>'\n }\n </section>\n\n <section>\n <h2 style=' font-size:22px; margin-bottom: 0; text-decoration: underline'>Miscellaneous Notes</h2>\n <ul style='margin-top: 0; padding-left: 20px;'>\n ${miscNotes ||\n '<li style=\"font-size:18px; margin-top: 5px;\">None noted.</li>'}\n </ul>\n </section>\n </div>\n <section>\n <h2 style=' font-size:22px; margin-bottom: 0; text-decoration: underline'>Photos</h2>\n <p style='margin-top: 5px; font-size:18px;'>Please see attachments.</p>\n </section>\n <section>\n <p style=\"font-size: 18px; margin-bottom: 20px;\">Should you have any questions, please contact the undersigned.</p>\n <p style=\"font-size: 18px; margin-bottom: 20px;\">Site Assistant Built By:</p>\n <p style=\"font-size: 18px; margin-bottom: 5px;\">Dale Shlass, EIT</p>\n <p style=\"font-size: 18px; margin-bottom: 5px;margin-top: 0px;\">Web Developer</p>\n <a style=\"display: block;font-size: 18px;text-decoration: none;color: rgba(32, 32, 32, 1); \" href='tel:+14169187713'>416-918-7713</a>\n <a style=\"display: block;font-size: 18px;text-decoration: none;color: rgba(32, 32, 32, 1); margin-bottom: 5px;\" href='mailto:[email protected]'>[email protected]</a>\n <a style=\"display: block;font-size: 18px;text-decoration: none; margin-top: 10px;float: left; background: #0077B5;color: white;padding: 5px 20px;border-radius: 20px;\" href='https://www.linkedin.com/in/dshlass/'>LinkedIn</a>\n <a style=\"display: block;font-size: 18px;text-decoration: none; margin-top: 10px;float: left; border: 1px solid #24292E; background: #fff; color: #24292E; padding: 5px 20px; border-radius: 20px; margin-left: 40px;\" href='https://www.github.com/dshlass/'>GitHub</a>\n </section>\n </div>\n </section>`;\n\n let photoSection = [];\n\n for (let image of report[0].photos) {\n var base64data = Buffer.from(image.image, \"binary\").toString(\"base64\");\n photoSection.push({\n filename: `ReportPhoto.png`,\n content: base64data,\n encoding: \"base64\"\n });\n }\n\n var transporter = nodemailer.createTransport({\n service: \"gmail\",\n auth: {\n user: process.env.NODEMAIL_USER,\n pass: process.env.NODEMAIL_PASS\n }\n });\n\n console.log(transporter);\n\n let info = transporter.sendMail({\n from: `\"Site Assistant ✅\" <${process.env.NODEMAIL_USER}>`, // sender address\n to: `${project.recipients}`, // list of receivers\n subject: `${project.projectName} Site Visit ${[\"#\"].toString()}${\n report[0].reportNumber\n }`, // Subject line\n text: \"Your site report\", // plain text body\n html: emailBody,\n attachments: photoSection\n });\n\n console.log(\"Message sent to\", project.recipients.join(\" \"));\n });\n}", "runFinalReadReport() {\n\t\tthis.visibleElements.forEach((element) => this.reportRead(element))\n\t}", "setReportsDataSource(reports, location) {\n if (reports && location) {\n var rows = reports.map((report) => { return {\n report: report,\n location: location\n }});\n this.setState({\n reportsDataSource: this.state.reportsDataSource.cloneWithRows(rows)\n });\n }\n }", "setReports(reports) {\n _reports = reports;\n this.setState({\n reports: reports,\n }, this.setReportsDataSource(reports, this.state.location));\n }", "function initLocalDashboardPage(){\r\n\treportsSection = \"dashboard\";\r\n\treportsObject = getDashboardReports(sid);\r\n\tvar list = $(\"#dashboard\");\r\n\tlist.empty();\r\n\tvar predefinedReports = reportsObject.predefined;\r\n\tif(predefinedReports.length > 0){\r\n\t\t\r\n\t\t$.each(predefinedReports, function(k, vObj){\r\n\t\t\tvar raport = prepareDashboardReport(vObj.code);\r\n\t\t\treportObjectToExecute = loadDashboardReport(raport);\r\n\t\t\tlist.append(\r\n\t\t\t\t\t$(\"<div>\",{class:\"dashboard-item-\"+reportObjectToExecute.class+\" uss\",id:reportObjectToExecute.id})\r\n\t\t\t\t\t\t.append($(\"<div>\",{class:\"title\"}))\r\n\t\t\t\t\t\t.append($(\"<div>\",{class:\"form\"}))\r\n\t\t\t\t\t\t.append($(\"<div>\",{class:\"graph\",id:\"graph-\"+reportObjectToExecute.id}).append($(\"<div>\",{class:\"loading-span\"}).text(\"Loading ...\")))\r\n\t\t\t);\r\n\t\t\trenderDashboardReport(reportObjectToExecute);\r\n\t\t});\r\n\t}\r\n}", "function init() {\n Reports.getReportTypeList().then(function(result) {\n angular.forEach(result, function(report, key) {\n var api = Reports.parse(report.api);\n self.apis[report.name] = api;\n\n // for ( var filter in self.filterTypes) {\n // if (api.params.indexOf(filter) != -1) {\n //\n // }\n // }\n });\n\n self.reportTypes = result;\n\n self.selectedReport = self.reportTypes[0];\n\n // reset filter to default before applying filter\n resetFilter();\n\n self.applyFilter();\n }, function(err) {\n console.log(err);\n });\n\n // reports page initialization setup\n\n $scope.server_first_name = $cookieStore.get(\"server_first_name\");\n\n self.serverTime = $rootScope.serverTime;\n self.serverTime = self.serverTime.replace(new RegExp('-', 'g'), '/');\n self.serverTime = self.serverTime.replace(/([\\d]{2})\\:([\\d]{2})\\:[\\d]{2}/, \"$1\\:$2\");\n\n self.location = $rootScope.location;\n\n resetFilter();\n\n }", "function load_all()\n\t\t\t{\n\t\t\t\tdocument.getElementById(\"all_report\").innerHTML = document.getElementById(\"admin_report_div\").innerHTML+\"<br />\"+document.getElementById(\"recruiter_report_div\").innerHTML+\"<br />\"+document.getElementById(\"evaluation_report_div\").innerHTML;\n\t\t\t}", "function loadReport(reportId, etcData)\r\n{\r\n\r\n\tvar filter_level = $(\"#\"+reportId+\"_level\").val(),\r\n\t\tfilter_sar = $(\"#\"+reportId+\"_sars\").val(),\r\n\t\tfilter_br = $(\"#\"+reportId+\"_brs\").val(),\r\n\t\tfilter_year = $(\"#\"+reportId+\"_year\").val(),\r\n\t\tfilter_moon = $(\"#\"+reportId+\"_moon\").val(),\r\n\t\tfilter_scale = $(\"#\"+reportId+\"_scale\").val();\r\n\r\n\tvar params;\r\n\tvar newRep;\r\n\tvar repKey;\r\n\r\n\tif(etcData == null)\r\n\t{\r\n\t\tparams = { report:reportId, level:filter_level, sar:filter_sar, br:filter_br, year:filter_year, moon:filter_moon };\r\n\t}\r\n\telse\r\n\t{\r\n\t\tparams = etcData;\r\n\t}\r\n\r\n\tparams.zone = (params.zone)? params.zone : -1;\r\n\tparams.sar = (params.sar)? params.sar : -1;\r\n\tparams.br = (params.br)? params.br : -1;\r\n\tparams.aghd = (params.aghd)? params.aghd : 0;\r\n\tparams.fasl = (params.fasl)? params.fasl : 0;\r\n\r\n\trepKey = reportId+\"_\"+params.level+\"_\"+params.zone+\"_\"+params.sar+\"_\"+params.br+\"_\"+params.aghd+\"_\"+params.fasl+\"_\"+(params.year).toString()+(params.moon).toString();\r\n\t//console.log($(\"table#table_\"+repKey).length);\r\n\r\n\tif($(\"table#table_\"+repKey).length)\r\n\t{\r\n\t\tnewRep = 0;\r\n\t\tvar sub = 0;\r\n\r\n\t\t$(\"div#\"+reportId+\" > div.report-table > table\").each(function() {\r\n\t\t\tif($(this).attr(\"id\") == \"table_\"+repKey)\r\n\t\t\t\t$(this).css(\"display\", \"\");\r\n\t\t\telse\r\n\t\t\t\t$(this).css(\"display\", \"none\");\r\n\t\t});\r\n\r\n\t\t$(\"div#\"+reportId+\" > div.report-title > div a\").each(function() {\r\n\t\t\tif($(this).attr(\"id\") == repKey)\r\n\t\t\t{\r\n\t\t\t\tsub = 1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(sub == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar rk = $(this).attr(\"id\");\r\n\t\t\t\t\t$(this).remove();\r\n\t\t\t\t\tdelete loadedReps[rk];\r\n\t\t\t\t\t$(\"table#table_\"+rk).remove();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$(\"select#\"+reportId+\"_scale\").val( $(\"table#table_\"+repKey).attr(\"data-scale\") );\r\n\t\t$(\"input#\"+reportId+\"_show\").attr(\"data-key\", repKey);\r\n\t\t$(\"img#\"+reportId+\"_excelExport\").attr(\"data-key\", repKey);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$(\"div#\"+reportId+\" > div.report-table > table\").each(function() {\r\n\t\t\t$(this).css(\"display\", \"none\");\r\n\t\t});\r\n\t\t$(\"div#\"+reportId+\" > div.report-table > img\").each(function() {\r\n\t\t\t$(this).remove();\r\n\t\t});\r\n\r\n\t\t$(\"div#\"+reportId+\" > div.report-table\").append(\"<img src='images/loading_gif.gif' />\");\r\n\r\n\t\tnewRep = 1;\r\n\r\n\t\t$.ajax({\r\n\t\t\turl: \"php/\"+reportId+\".php\", \r\n\t\t\ttype: \"GET\", \r\n\t\t\tdataType: \"json\",\r\n\t\t\tdata: params,\r\n\t\t\tsuccess: function(data){\r\n\r\n\t\t\t\t$(\"input#\"+reportId+\"_show\").attr(\"data-key\", data.hirarchy);\r\n\t\t\t\t$(\"img#\"+reportId+\"_excelExport\").attr(\"data-key\", repKey);\r\n\r\n\t\t\t\tloadedReps[data.hirarchy] = data;\r\n\r\n\t\t\t\t$(\"div#\"+reportId+\" > div.report-title > div > a#\"+data.hirarchy).remove();\r\n\r\n\t\t\t\tif(data.subtitle != \"\")\r\n\t\t\t\t\t$(\"div#\"+reportId+\" > div.report-title > div\").append(\"<a id='\"+data.hirarchy+\"' href='javascript:loadReport(\\\"\"+reportId+\"\\\", \"+JSON.stringify(params)+\");'>\" + data.subtitle + \" | </a>\");\r\n\r\n\t\t\t\tvar divHtml = createReportTable(data, reportId, filter_scale);\r\n\r\n\t\t\t\t$(\"div#\"+reportId+\" > div.report-table > img \").remove();\r\n\t\t\t\t$(\"div#\"+reportId+\" > div.report-table\").append(divHtml);\r\n\t\t\t\t//$(\"div#\"+reportId+\" > div.report-query\").html(data.query);\r\n\t\t\t\t$(\"div#\"+reportId+\" > div.report-query\").html(\"\");\r\n\r\n\t\t\t\tdelete divHtml;\r\n\r\n\t\t\t\t$(\"div#\"+reportId+\" > div.report-table tr.titleRow\").click(function() {\r\n\t\t\t\t\tvar subset = true;\r\n\t\t\t\t\t$(this).nextAll().each(function() {\r\n\t\t\t\t\t\tif($(this).hasClass(\"titleRow\") || $(this).hasClass(\"rowsum\"))\r\n\t\t\t\t\t\t\tsubset = false;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tif(subset)\r\n\t\t\t\t\t\t\t\t$(this).toggle(200);\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$(\"div#\"+reportId+\" > div.report-table tr.midsumRow\").click(function() {\r\n\t\t\t\t\tvar subset = true;\r\n\t\t\t\t\t$(this).prevAll().each(function() {\r\n\t\t\t\t\t\tif($(this).hasClass(\"midsumRow\") || $(this).hasClass(\"tableHead\"))\r\n\t\t\t\t\t\t\tsubset = false;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tif(subset)\r\n\t\t\t\t\t\t\t\t$(this).toggle(200);\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "function init(){\n getReportData();\n }", "function customerSummaryMonthlySalesReport(consolidateFlag, withinventory) {\n if (!isProdBuild) {\n customerSummaryMonthlySalesDynamicLoad(consolidateFlag, withinventory);\n } else {\n if (Wtf.ReportScriptLoadedFlag.monthlysalesreportandmonthlysalesbyproductreport) {\n customerSummaryMonthlySalesDynamicLoad(consolidateFlag, withinventory);\n } else {\n ScriptMgr.load({\n scripts: ['../../scripts/Reports/CustomerSummaryMonthlySales.js'],\n callback: function () {\n customerSummaryMonthlySalesDynamicLoad(consolidateFlag, withinventory);\n Wtf.ReportScriptLoadedFlag.monthlysalesreportandmonthlysalesbyproductreport = true\n },\n scope: this\n });\n }\n }\n}", "function singleClickGenerateAllReports(){\n\n\n\t //PENDING --> TOTAL CALCULATED ROUND OFFFFF\n\t console.log('PENDING API --> TOTAL CALCULATED ROUND OFFFFF')\n\t \n\n\t\trunReportAnimation(95); //of Step 11 which completed the data processing\n\n\n\t\t//Get staff info.\n\t\tvar loggedInStaffInfo = window.localStorage.loggedInStaffData ? JSON.parse(window.localStorage.loggedInStaffData) : {};\n\t\t\n\t\tif(jQuery.isEmptyObject(loggedInStaffInfo)){\n\t\t\tloggedInStaffInfo.name = 'Staff';\n\t\t\tloggedInStaffInfo.code = '0000000000';\n\t\t}\t\n\n\n\t\tvar reportInfo_branch = window.localStorage.accelerate_licence_branch_name ? window.localStorage.accelerate_licence_branch_name : '';\n\t\t\t\n\t\tif(reportInfo_branch == ''){\n\t\t\tshowToast('System Error: Branch name not found. Please contact Accelerate Support.', '#e74c3c');\n\t\t\treturn '';\n\t\t}\n\n\t\tvar temp_address_modified = (window.localStorage.accelerate_licence_branch_name ? window.localStorage.accelerate_licence_branch_name : '') + ' - ' + (window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name : '');\n\t\tvar data_custom_footer_address = window.localStorage.bill_custom_footer_address ? window.localStorage.bill_custom_footer_address : '';\n\n\t\tvar reportInfo_admin = loggedInStaffInfo.name;\n\t\tvar reportInfo_time = moment().format('h:mm a, DD-MM-YYYY');\n\t\tvar reportInfo_address = data_custom_footer_address != '' ? data_custom_footer_address : temp_address_modified;\n\n\n\t\t//Reset Token Number and KOT Number (if preference set)\n\t\tresetBillingCounters();\n\n\t\tgenerateReportContentDownload();\n\n\t\tfunction generateReportContentDownload(){\n\n\t\t\t//To display weekly graph or not\n\t\t\tvar hasWeeklyGraphAttached = false;\n\t\t\tif(window.localStorage.graphImageDataWeekly && window.localStorage.graphImageDataWeekly != ''){\n\t\t\t\thasWeeklyGraphAttached = true;\n\t\t\t}\n\n\t\t\tvar graphRenderSectionContent = '';\n\t\t\tvar fancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY - dddd');\n\n\t\t\tvar reportInfo_title = 'Sales Report of <b>'+fancy_from_date+'</b>';\n\t\t\tvar temp_report_title = 'Sales Report of '+fancy_from_date;\n\t\t\tif(fromDate != toDate){\n\t\t\t\tfancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\t\t\t\tvar fancy_to_date = moment(toDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\n\t\t\t\treportInfo_title = 'Sales Report from <b>'+fancy_from_date+'</b> to <b>'+fancy_to_date+'</b>';\n\t\t\t\ttemp_report_title = 'Sales Report from '+fancy_from_date+' to '+fancy_to_date;\n\t\t\t}\n\t\t else{ //Render graph only if report is for a day\n\n\t\t if(hasWeeklyGraphAttached){\n\n\t\t \tvar temp_image_name = reportInfo_branch+'_'+fromDate;\n\t\t \ttemp_image_name = temp_image_name.replace(/\\s/g,'');\n\n\t\t graphRenderSectionContent = ''+\n\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t '<div class=\"summaryTableSection\">'+\n\t\t '<div class=\"tableQuickHeader\">'+\n\t\t '<h1 class=\"tableQuickHeaderText\">WEEKLY SALES TREND</h1>'+\n\t\t '</div>'+\n\t\t '<div class=\"weeklyGraph\">'+\n\t\t '<img src=\"'+window.localStorage.graphImageDataWeekly+'\" style=\"max-width: 90%\">'+\n\t\t '</div>'+\n\t\t '</div>'+\n\t\t '</div>';\n\t\t }\n\t\t }\n\n\t\t var fancy_report_title_name = reportInfo_branch+' - '+temp_report_title;\n\n\t\t //Quick Summary Content\n\t\t var quickSummaryRendererContent = '';\n\n\t\t var a = 0;\n\t\t while(reportInfoExtras[a]){\n\t\t quickSummaryRendererContent += '<tr><td class=\"tableQuickBrief\">'+reportInfoExtras[a].name+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(reportInfoExtras[a].value).toFixed(2)+'</td></tr>';\n\t\t a++;\n\t\t }\n\n\n\t\t var b = 1; //first one contains total paid\n\t\t while(completeReportInfo[b]){\n\t\t quickSummaryRendererContent += '<tr><td class=\"tableQuickBrief\">'+completeReportInfo[b].name+'</td><td class=\"tableQuickAmount\">'+(completeReportInfo[b].type == 'NEGATIVE' && completeReportInfo[b].value != 0 ? '- ' : '')+'<span class=\"price\">Rs.</span>'+parseFloat(completeReportInfo[b].value).toFixed(2)+'</td></tr>';\n\t\t b++;\n\t\t }\n\n\n\t\t //Sales by Billing Modes Content\n\t\t var salesByBillingModeRenderContent = '';\n\t\t var c = 0;\n\t\t var billSharePercentage = 0;\n\t\t while(detailedListByBillingMode[c]){\n\t\t billSharePercentage = parseFloat((100*detailedListByBillingMode[c].value)/completeReportInfo[0].value).toFixed(0);\n\t\t salesByBillingModeRenderContent += '<tr><td class=\"tableQuickBrief\">'+detailedListByBillingMode[c].name+' '+(billSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+billSharePercentage+'%)</span>' : '')+(detailedListByBillingMode[c].count > 0 ? '<span class=\"smallOrderCount\">'+detailedListByBillingMode[c].count+' orders</span>' : '')+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(detailedListByBillingMode[c].value).toFixed(0)+'</td></tr>';\n\t\t c++;\n\t\t }\n\n\t\t\t//To display bills graph or not\n\t\t\tvar hasBillsGraphAttached = false;\n\t\t\tif(window.localStorage.graphImageDataBills && window.localStorage.graphImageDataBills != '' && window.localStorage.graphImageDataBills != 'data:,'){\n\t\t\t\thasBillsGraphAttached = true;\n\t\t\t}\n\n\t\t var salesByBillingModeRenderContentFinal = '';\n\t\t if(salesByBillingModeRenderContent != ''){\n\n\t\t \tif(hasBillsGraphAttached){\n\t\t\t\t salesByBillingModeRenderContentFinal = ''+\n\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t \t'<div class=\"tableQuickHeader\">'+\n\t\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY BILLS</h1>'+\n\t\t\t\t \t'</div>'+\n\t\t\t\t \t'<div class=\"tableGraphRow\">'+\n\t\t\t\t\t\t '<div class=\"tableGraph_Graph\"> <img src=\"'+window.localStorage.graphImageDataBills+'\" width=\"200px\"> </div>'+\n\t\t\t\t\t\t '<div class=\"tableGraph_Table\">'+\t\n\t\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t\t salesByBillingModeRenderContent+\n\t\t\t\t\t '</table>'+\n\t\t\t\t\t '</div>'+\n\t\t\t\t\t '</div>'+\t\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t salesByBillingModeRenderContentFinal = ''+\n\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY BILLS</h1>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t salesByBillingModeRenderContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>';\t\t\t\t\n\t\t\t\t}\n\t\t }\n\n\n\t\t //Sales by Payment Types Content\n\t\t var salesByPaymentTypeRenderContent = '';\n\t\t var d = 0;\n\t\t var paymentSharePercentage = 0;\n\t\t while(detailedListByPaymentMode[d]){\n\t\t paymentSharePercentage = parseFloat((100*detailedListByPaymentMode[d].value)/completeReportInfo[0].value).toFixed(0);\n\t\t salesByPaymentTypeRenderContent += '<tr><td class=\"tableQuickBrief\">'+detailedListByPaymentMode[d].name+' '+(paymentSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+paymentSharePercentage+'%)</span>' : '')+(detailedListByPaymentMode[d].count > 0 ? '<span class=\"smallOrderCount\">'+detailedListByPaymentMode[d].count+' orders</span>' : '')+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(detailedListByPaymentMode[d].value).toFixed(0)+'</td></tr>';\n\t\t d++;\n\t\t }\n\n\t\t\t//To display payment graph or not\n\t\t\tvar hasPaymentsGraphAttached = false;\n\t\t\tif(window.localStorage.graphImageDataPayments && window.localStorage.graphImageDataPayments != '' && window.localStorage.graphImageDataPayments != 'data:,'){\n\t\t\t\thasPaymentsGraphAttached = true;\n\t\t\t}\n\n\t\t var salesByPaymentTypeRenderContentFinal = '';\n\t\t if(salesByPaymentTypeRenderContent != ''){\n\n\t\t \tif(hasPaymentsGraphAttached){\n\t\t\t salesByPaymentTypeRenderContentFinal = ''+\n\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t \t'<div class=\"tableQuickHeader\">'+\n\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY PAYMENT</h1>'+\n\t\t\t \t'</div>'+\n\t\t\t \t'<div class=\"tableGraphRow\">'+\n\t\t\t\t\t '<div class=\"tableGraph_Graph\"> <img src=\"'+window.localStorage.graphImageDataPayments+'\" width=\"200px\"> </div>'+\n\t\t\t\t\t '<div class=\"tableGraph_Table\">'+\t\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t salesByPaymentTypeRenderContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>';\n\t\t\t }\n\t\t\t else{\n\t\t\t \tsalesByPaymentTypeRenderContentFinal = ''+\n\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY PAYMENT</h1>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t salesByPaymentTypeRenderContent+\n\t\t\t '</table>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>';\n\t\t\t }\n\t\t }\n\n\t\t var temp_licenced_client = window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name.toLowerCase() : 'common';\n\t\t var cssData = '<head> <style type=\"text/css\"> body{font-family:sans-serif;margin:0}#logo{min-height:60px;width:100%}.mainHeader{background:url(https://accelerateengine.app/clients/'+temp_licenced_client+'/pattern.jpg) #c63931;width:100%;min-height:95px;padding:10px 0;border-bottom:2px solid #a8302b}.headerLeftBox{width:55%;display:inline-block;padding-left:25px}.headerRightBox{width:35%;float:right;display:inline-block;text-align:right;padding-right:25px}.headerAddress{margin:0 0 5px;font-size:14px;color:#e4a1a6}.headerBranch{margin:10px 0;font-weight:700;text-transform:uppercase;font-size:21px;padding:3px 8px;color:#c63931;display:inline-block;background:#FFF}.headerAdmin{margin:0 0 3px;font-size:16px;color:#FFF}.headerTimestamp{margin:0 0 5px;font-size:12px;color:#e4a1a6}.reportTitle{margin:15px 0;font-size:26px;font-weight:400;text-align:center;color:#3498db}.introFacts{background:0 0;width:100%;min-height:95px;padding:10px 0}.factsArea{display:block;padding:10px;text-align:center}.factsBox{margin-right: 5px; width:18%; display:inline-block;text-align:left;padding:20px 15px;border:2px solid #a8302b;border-radius:5px;color:#FFF;height:65px;background:#c63931}.factsBoxFigure{margin:0 0 8px;font-weight:700;font-size:32px}.factsBoxFigure .factsPrice{font-weight:400;font-size:40%;color:#e4a1a6;margin-left:2px}.factsBoxBrief{margin:0;font-size:16px;color:#F1C40F;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.summaryTableSectionHolder{width:100%}.summaryTableSection{padding:0 25px;margin-top:30px}.summaryTableSection table{border-collapse:collapse}.summaryTableSection td{border-bottom:1px solid #fdebed}.tableQuick{padding:10px}.tableQuickHeader{min-height:40px;background:#c63931;border-bottom:3px solid #a8302b;border-top-right-radius:15px;color:#FFF}.tableQuickHeaderText{margin:0 0 0 25px;font-size:18px;letter-spacing:2px;text-transform:uppercase;padding-top:10px;font-weight:700}.smallOrderCount{font-size:80%;margin-left:15px;color:#aba9a9;font-style:italic;}.tableQuickBrief{padding:10px;font-size:16px;color:#a71a14}.tableQuickAmount{padding:10px;font-size:18px;text-align:right;color:#a71a14}.tableQuickAmount .price{font-size:70%;margin-right:2px}.tableGraphRow{position:relative}.tableGraph_Graph{width:35%;display:block;text-align:center;float:right;position:absolute;top:20px;left:62%}.footerNote,.weeklyGraph{text-align:center;margin:0}.tableGraph_Table{padding:10px;width:55%;display:block;min-height:250px;}.weeklyGraph{padding:25px;border:1px solid #f2f2f2;border-top:none}.footerNote{font-size:12px;color:#595959}@media screen and (max-width:1000px){.headerLeftBox{display:none!important}.headerRightBox{padding-right:5px!important;width:90%!important}.reportTitle{font-size:18px!important}.tableQuick{padding:0 0 5px!important}.factsArea{padding:5px!important}.factsBox{width:90%!important;margin:0 0 5px!important}.smallOrderCount{margin:0!important;display:block!important}.summaryTableSection{padding:0 5px!important}}</style> </head>';\n\t\t \n\t\t var finalReport_downloadContent = cssData+\n\t\t\t '<body>'+\n\t\t\t '<div class=\"mainHeader\">'+\n\t\t\t '<div class=\"headerLeftBox\">'+\n\t\t\t '<div id=\"logo\">'+\n\t\t\t '<img src=\"https://accelerateengine.app/clients/'+temp_licenced_client+'/email_logo.png\">'+\n\t\t\t '</div>'+\n\t\t\t '<p class=\"headerAddress\">'+reportInfo_address+'</p>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"headerRightBox\">'+\n\t\t\t '<h1 class=\"headerBranch\">'+reportInfo_branch+'</h1>'+\n\t\t\t '<p class=\"headerAdmin\">'+reportInfo_admin+'</p>'+\n\t\t\t '<p class=\"headerTimestamp\">'+reportInfo_time+'</p>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"introFacts\">'+\n\t\t\t '<h1 class=\"reportTitle\">'+reportInfo_title+'</h1>'+\n\t\t\t '<div class=\"factsArea\">'+\n\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(0)+' <span class=\"factsPrice\">INR</span></h1><p class=\"factsBoxBrief\">Net Sales</p></div>'+ \n\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+parseFloat(netSalesWorth).toFixed(0)+'<span class=\"factsPrice\">INR</span></h1><p class=\"factsBoxBrief\">Gross Sales</p></div>'+ \n\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+netGuestsCount+'</h1><p class=\"factsBoxBrief\">Guests</p></div>'+ \n\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+completeReportInfo[0].count+'</h1><p class=\"factsBoxBrief\">Bills</p></div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+graphRenderSectionContent+\n\t\t\t (hasWeeklyGraphAttached ? '<div style=\"page-break-before: always; margin-top: 20px\"></div><div style=\"height: 30px; width: 100%; display: block\"></div>' : '')+\n\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t '<h1 class=\"tableQuickHeaderText\">Quick Summary</h1>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t '<tr><td class=\"tableQuickBrief\" style=\"font-weight: bold;\">Gross Amount</td><td class=\"tableQuickAmount\" style=\"font-weight: bold;\"><span class=\"price\">Rs.</span>'+parseFloat(netSalesWorth).toFixed(2)+'</td></tr>'+\n\t\t\t quickSummaryRendererContent+\n\t\t\t '<tr><td class=\"tableQuickBrief\" style=\"background: #f3eced; font-size: 120%; font-weight: bold; color: #292727; border-bottom: 2px solid #b03c3e\">Net Sales</td><td class=\"tableQuickAmount\" style=\"background: #f3eced; font-size: 120%; font-weight: bold; color: #292727; border-bottom: 2px solid #b03c3e\"><span class=\"price\">Rs.</span>'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(2)+'</td></tr>'+\n\t\t\t '</table>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '<div style=\"page-break-before: always; margin-top: 20px\"></div><div style=\"height: 30px; width: 100%; display: block\"></div>'+\n\t\t\t salesByBillingModeRenderContentFinal+\n\t\t\t salesByPaymentTypeRenderContentFinal+\n\t\t\t '<div style=\"border-top: 2px solid #989898; padding: 12px; background: #f2f2f2;\">'+\n\t\t\t '<p class=\"footerNote\">www.accelerate.net.in | [email protected]</p>'+\n\t\t\t '</div>'+\n\t\t\t '</body>';\n\n\t\t\t\tvar finalContent_EncodedDownload = encodeURI(finalReport_downloadContent);\n\t\t\t\t$('#reportActionButtonDownload').attr('data-hold', finalContent_EncodedDownload);\n\n\t\t\t\tvar finalContent_EncodedText = encodeURI(fancy_report_title_name);\n\t\t\t\t$('#reportActionButtonDownload').attr('text-hold', finalContent_EncodedText);\n\n\t\t\t\tgenerateReportContentEmail();\n\n\t\t}\n\n\t\tfunction generateReportContentEmail(){\n\n\t\t\t\trunReportAnimation(97);\n\n\t\t\t\t//To display weekly graph or not\n\t\t\t\tvar hasWeeklyGraphAttached = false;\n\t\t\t\tif(window.localStorage.graphImageDataWeekly && window.localStorage.graphImageDataWeekly != ''){\n\t\t\t\t\thasWeeklyGraphAttached = true;\n\t\t\t\t}\n\n\t\t\t\tvar temp_licenced_client = window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name.toLowerCase() : 'common';\n\n\t\t\t\tvar graphRenderSectionContent = '';\n\t\t\t\tvar fancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY - dddd');\n\n\t\t\t\tvar reportInfo_title = 'Sales Report of <b>'+fancy_from_date+'</b>';\n\t\t\t\tvar temp_report_title = 'Sales Report of '+fancy_from_date;\n\t\t\t\tif(fromDate != toDate){\n\t\t\t\t\tfancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\t\t\t\t\tvar fancy_to_date = moment(toDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\n\t\t\t\t\treportInfo_title = 'Sales Report from <b>'+fancy_from_date+'</b> to <b>'+fancy_to_date+'</b>';\n\t\t\t\t\ttemp_report_title = 'Sales Report from '+fancy_from_date+' to '+fancy_to_date;\n\t\t\t\t}\n\t\t\t else{ //Render graph only if report is for a day\n\n\t\t\t if(hasWeeklyGraphAttached){\n\n\t\t\t \tvar temp_image_name = reportInfo_branch+'_'+fromDate;\n\t\t\t \ttemp_image_name = temp_image_name.replace(/\\s/g,'');\n\n\t\t\t graphRenderSectionContent = ''+\n\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t '<h1 class=\"tableQuickHeaderText\">WEEKLY SALES TREND</h1>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"weeklyGraph\">'+\n\t\t\t '<img src=\"https://accelerateengine.app/clients/'+temp_licenced_client+'/report_trend_images_repo/'+temp_image_name+'.png\" style=\"max-width: 90%\">'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>';\n\t\t\t }\n\t\t\t }\n\n\t\t\t var fancy_report_title_name = reportInfo_branch+' - '+temp_report_title;\n\n\t\t\t //Quick Summary Content\n\t\t\t var quickSummaryRendererContent = '';\n\n\t\t\t var a = 0;\n\t\t\t while(reportInfoExtras[a]){\n\t\t\t quickSummaryRendererContent += '<tr><td class=\"tableQuickBrief\">'+reportInfoExtras[a].name+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(reportInfoExtras[a].value).toFixed(2)+'</td></tr>';\n\t\t\t a++;\n\t\t\t }\n\n\n\t\t\t var b = 1; //first one contains total paid\n\t\t\t while(completeReportInfo[b]){\n\t\t\t quickSummaryRendererContent += '<tr><td class=\"tableQuickBrief\">'+completeReportInfo[b].name+'</td><td class=\"tableQuickAmount\">'+(completeReportInfo[b].type == 'NEGATIVE' && completeReportInfo[b].value != 0 ? '- ' : '')+'<span class=\"price\">Rs.</span>'+parseFloat(completeReportInfo[b].value).toFixed(2)+'</td></tr>';\n\t\t\t b++;\n\t\t\t }\n\n\n\t\t\t //Sales by Billing Modes Content\n\t\t\t var salesByBillingModeRenderContent = '';\n\t\t\t var c = 0;\n\t\t\t var billSharePercentage = 0;\n\t\t\t while(detailedListByBillingMode[c]){\n\t\t\t billSharePercentage = parseFloat((100*detailedListByBillingMode[c].value)/completeReportInfo[0].value).toFixed(0);\n\t\t\t salesByBillingModeRenderContent += '<tr><td class=\"tableQuickBrief\">'+detailedListByBillingMode[c].name+' '+(billSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+billSharePercentage+'%)</span>' : '')+(detailedListByBillingMode[c].count > 0 ? '<span class=\"smallOrderCount\">'+detailedListByBillingMode[c].count+' orders</span>' : '')+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(detailedListByBillingMode[c].value).toFixed(0)+'</td></tr>';\n\t\t\t c++;\n\t\t\t }\n\n\t\t\t\t//To display bills graph or not\n\t\t\t\tvar hasBillsGraphAttached = false;\n\t\t\t\tif(window.localStorage.graphImageDataBills && window.localStorage.graphImageDataBills != '' && window.localStorage.graphImageDataBills != 'data:,'){\n\t\t\t\t\thasBillsGraphAttached = true;\n\t\t\t\t}\n\n\t\t\t var salesByBillingModeRenderContentFinal = '';\n\t\t\t if(salesByBillingModeRenderContent != ''){\n\t\t\t\t\t salesByBillingModeRenderContentFinal = ''+\n\t\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY BILLS</h1>'+\n\t\t\t\t\t '</div>'+\n\t\t\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t\t salesByBillingModeRenderContent+\n\t\t\t\t\t '</table>'+\n\t\t\t\t\t '</div>'+\n\t\t\t\t\t '</div>'+\n\t\t\t\t\t '</div>';\n\t\t\t }\n\n\n\t\t\t //Sales by Payment Types Content\n\t\t\t var salesByPaymentTypeRenderContent = '';\n\t\t\t var d = 0;\n\t\t\t var paymentSharePercentage = 0;\n\t\t\t while(detailedListByPaymentMode[d]){\n\t\t\t paymentSharePercentage = parseFloat((100*detailedListByPaymentMode[d].value)/completeReportInfo[0].value).toFixed(0);\n\t\t\t salesByPaymentTypeRenderContent += '<tr><td class=\"tableQuickBrief\">'+detailedListByPaymentMode[d].name+' '+(paymentSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+paymentSharePercentage+'%)</span>' : '')+(detailedListByPaymentMode[d].count > 0 ? '<span class=\"smallOrderCount\">'+detailedListByPaymentMode[d].count+' orders</span>' : '')+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(detailedListByPaymentMode[d].value).toFixed(0)+'</td></tr>';\n\t\t\t d++;\n\t\t\t }\n\n\t\t\t var salesByPaymentTypeRenderContentFinal = '';\n\t\t\t if(salesByPaymentTypeRenderContent != ''){\n\t\t\t\t \tsalesByPaymentTypeRenderContentFinal = ''+\n\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY PAYMENT</h1>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t salesByPaymentTypeRenderContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>';\n\t\t\t }\n\n\t\t\t var temp_licenced_client = window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name.toLowerCase() : 'common';\n\t\t\t var cssData = '<head> <style type=\"text/css\"> body{font-family:sans-serif;margin:0}#logo{min-height:60px;width:100%}.mainHeader{background:url(https://accelerateengine.app/clients/'+temp_licenced_client+'/pattern.jpg) #c63931;width:100%;min-height:95px;padding:10px 0;border-bottom:2px solid #a8302b}.headerLeftBox{width:55%;display:inline-block;padding-left:25px}.headerRightBox{width:35%;float:right;display:inline-block;text-align:right;padding-right:25px}.headerAddress{margin:0 0 5px;font-size:14px;color:#e4a1a6}.headerBranch{margin:10px 0;font-weight:700;text-transform:uppercase;font-size:21px;padding:3px 8px;color:#c63931;display:inline-block;background:#FFF}.headerAdmin{margin:0 0 3px;font-size:16px;color:#FFF}.headerTimestamp{margin:0 0 5px;font-size:12px;color:#e4a1a6}.reportTitle{margin:15px 0;font-size:26px;font-weight:400;text-align:center;color:#3498db}.introFacts{background:0 0;width:100%;min-height:95px;padding:10px 0}.factsArea{display:block;padding:10px;text-align:center}.factsBox{margin-right: 5px; width:18%; display:inline-block;text-align:left;padding:20px 15px;border:2px solid #a8302b;border-radius:5px;color:#FFF;height:65px;background:#c63931}.factsBoxFigure{margin:0 0 8px;font-weight:700;font-size:32px}.factsBoxFigure .factsPrice{font-weight:400;font-size:40%;color:#e4a1a6;margin-left:2px}.factsBoxBrief{margin:0;font-size:16px;color:#F1C40F;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.summaryTableSectionHolder{width:100%}.summaryTableSection{padding:0 25px;margin-top:30px}.summaryTableSection table{border-collapse:collapse}.summaryTableSection td{border-bottom:1px solid #fdebed}.tableQuick{padding:10px}.tableQuickHeader{min-height:40px;background:#c63931;border-bottom:3px solid #a8302b;border-top-right-radius:15px;color:#FFF}.tableQuickHeaderText{margin:0 0 0 25px;font-size:18px;letter-spacing:2px;text-transform:uppercase;padding-top:10px;font-weight:700}.smallOrderCount{font-size:80%;margin-left:15px;color:#aba9a9;font-style:italic;}.tableQuickBrief{padding:10px;font-size:16px;color:#a71a14}.tableQuickAmount{padding:10px;font-size:18px;text-align:right;color:#a71a14}.tableQuickAmount .price{font-size:70%;margin-right:2px}.tableGraphRow{position:relative}.tableGraph_Graph{width:35%;display:block;text-align:center;float:right;position:absolute;top:20px;left:62%}.footerNote,.weeklyGraph{text-align:center;margin:0}.tableGraph_Table{padding:10px;width:55%;display:block;min-height:250px;}.weeklyGraph{padding:25px;border:1px solid #f2f2f2;border-top:none}.footerNote{font-size:12px;color:#595959}@media screen and (max-width:1000px){.headerLeftBox{display:none!important}.headerRightBox{padding-right:5px!important;width:90%!important}.reportTitle{font-size:18px!important}.tableQuick{padding:0 0 5px!important}.factsArea{padding:5px!important}.factsBox{width:90%!important;margin:0 0 5px!important}.smallOrderCount{margin:0!important;display:block!important}.summaryTableSection{padding:0 5px!important}}</style> </head>';\n\t\t\t \n\t\t\t var finalReport_emailContent = '<html>'+cssData+\n\t\t\t\t '<body>'+\n\t\t\t\t '<div class=\"mainHeader\">'+\n\t\t\t\t '<div class=\"headerLeftBox\">'+\n\t\t\t\t '<div id=\"logo\">'+\n\t\t\t\t '<img src=\"https://accelerateengine.app/clients/'+temp_licenced_client+'/email_logo.png\">'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<p class=\"headerAddress\">'+reportInfo_address+'</p>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"headerRightBox\">'+\n\t\t\t\t '<h1 class=\"headerBranch\">'+reportInfo_branch+'</h1>'+\n\t\t\t\t '<p class=\"headerAdmin\">'+reportInfo_admin+'</p>'+\n\t\t\t\t '<p class=\"headerTimestamp\">'+reportInfo_time+'</p>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"introFacts\">'+\n\t\t\t\t '<h1 class=\"reportTitle\">'+reportInfo_title+'</h1>'+\n\t\t\t\t '<div class=\"factsArea\">'+\n\t\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(0)+' <span class=\"factsPrice\">INR</span></h1><p class=\"factsBoxBrief\">Net Sales</p></div>'+ \n\t\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+parseFloat(netSalesWorth).toFixed(0)+'<span class=\"factsPrice\">INR</span></h1><p class=\"factsBoxBrief\">Gross Sales</p></div>'+ \n\t\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+netGuestsCount+'</h1><p class=\"factsBoxBrief\">Guests</p></div>'+ \n\t\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+completeReportInfo[0].count+'</h1><p class=\"factsBoxBrief\">Bills</p></div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+graphRenderSectionContent+\n\t\t\t\t (hasWeeklyGraphAttached ? '<div style=\"page-break-before: always; margin-top: 20px\"></div><div style=\"height: 30px; width: 100%; display: block\"></div>' : '')+\n\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t\t '<h1 class=\"tableQuickHeaderText\">Quick Summary</h1>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t '<tr><td class=\"tableQuickBrief\" style=\"font-weight: bold;\">Gross Sales</td><td class=\"tableQuickAmount\" style=\"font-weight: bold;\"><span class=\"price\">Rs.</span>'+parseFloat(netSalesWorth).toFixed(2)+'</td></tr>'+\n\t\t\t\t quickSummaryRendererContent+\n\t\t\t\t '<tr><td class=\"tableQuickBrief\" style=\"background: #f3eced; font-size: 120%; font-weight: bold; color: #292727; border-bottom: 2px solid #b03c3e\">Net Sales</td><td class=\"tableQuickAmount\" style=\"background: #f3eced; font-size: 120%; font-weight: bold; color: #292727; border-bottom: 2px solid #b03c3e\"><span class=\"price\">Rs.</span>'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(2)+'</td></tr>'+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div style=\"page-break-before: always; margin-top: 20px\"></div><div style=\"height: 30px; width: 100%; display: block\"></div>'+\n\t\t\t\t salesByBillingModeRenderContentFinal+\n\t\t\t\t salesByPaymentTypeRenderContentFinal+\n\t\t\t\t '<div style=\"border-top: 2px solid #989898; padding: 12px; background: #f2f2f2;\">'+\n\t\t\t\t '<p class=\"footerNote\">www.accelerate.net.in | [email protected]</p>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</body>'+\n\t\t\t\t '<html>';\n\n\t\t\t\tvar finalContent_EncodedEmail = encodeURI(finalReport_emailContent);\n\t\t\t\t$('#reportActionButtonEmail').attr('data-hold', finalContent_EncodedEmail);\n\n\t\t\t\tvar myFinalCollectionText = {\n\t\t\t\t\t\"reportTitle\" : fancy_report_title_name,\n\t\t\t\t\t\"imageName\": reportInfo_branch+'_'+fromDate\n\t\t\t\t}\n\n\t\t\t\tvar finalContent_EncodedText = encodeURI(JSON.stringify(myFinalCollectionText));\n\t\t\t\t$('#reportActionButtonEmail').attr('text-hold', finalContent_EncodedText);\t\n\n\t\t\t\tgenerateReportContentPrint();\t\t\n\t\t}\n\n\t\tfunction generateReportContentPrint(){\n\n\t\t\trunReportAnimation(99);\n\n\t\t\tvar graphRenderSectionContent = '';\n\t\t\tvar fancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY - dddd');\n\n\t\t\tvar reportInfo_title = 'Sales Report of <b>'+fancy_from_date+'</b>';\n\t\t\tvar temp_report_title = 'Sales Report of '+fancy_from_date;\n\t\t\tif(fromDate != toDate){\n\t\t\t\tfancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\t\t\t\tvar fancy_to_date = moment(toDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\n\t\t\t\treportInfo_title = 'Sales Report from <b>'+fancy_from_date+'</b> to <b>'+fancy_to_date+'</b>';\n\t\t\t\ttemp_report_title = 'Sales Report from '+fancy_from_date+' to '+fancy_to_date;\n\t\t\t}\n\n\n\t\t //Quick Summary Content\n\t\t var quickSummaryRendererContent = '';\n\n\t\t var a = 0;\n\t\t while(reportInfoExtras[a]){\n\t\t quickSummaryRendererContent += '<tr><td style=\"font-size: 11px\">'+reportInfoExtras[a].name+'</td><td style=\"font-size: 11px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(reportInfoExtras[a].value).toFixed(2)+'</td></tr>';\n\t\t a++;\n\t\t }\n\n\t\t var b = 1; //first one contains total paid\n\t\t while(completeReportInfo[b]){\n\t\t quickSummaryRendererContent += '<tr><td style=\"font-size: 11px\">'+completeReportInfo[b].name+'</td><td style=\"font-size: 11px; text-align: right\">'+(completeReportInfo[b].type == 'NEGATIVE' && completeReportInfo[b].value != 0 ? '- ' : '')+'<span style=\"font-size: 60%\">Rs.</span>'+parseFloat(completeReportInfo[b].value).toFixed(2)+'</td></tr>';\n\t\t b++;\n\t\t }\n\n\t\t var printSummaryAll = ''+\n\t\t \t'<div class=\"KOTContent\">'+\n\t\t \t\t '<h2 style=\"text-align: center; margin: 5px 0 3px 0; font-weight: bold; border-bottom: 1px solid #444;\">OVERALL SUMMARY</h2>'+\n\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t '<col style=\"width: 85%\">'+\n\t\t\t '<col style=\"width: 15%\">'+ \n\t\t\t '<tr><td style=\"font-size: 11px\"><b>Gross Sales</b></td><td style=\"font-size: 11px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(netSalesWorth).toFixed(2)+'</td></tr>'+\n\t\t\t quickSummaryRendererContent+\n\t\t\t '<tr><td style=\"font-size: 13px\"><b>Net Sales</b></td><td style=\"font-size: 13px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(2)+'</td></tr>'+\n\t\t\t '</table>'+\n\t\t\t '</div>';\n\n\t\t //Sales by Billing Modes Content\n\t\t var printSummaryBillsContent = '';\n\t\t var c = 0;\n\t\t var billSharePercentage = 0;\n\t\t while(detailedListByBillingMode[c]){\n\t\t billSharePercentage = parseFloat((100*detailedListByBillingMode[c].value)/completeReportInfo[0].value).toFixed(0);\n\t\t printSummaryBillsContent += '<tr><td style=\"font-size: 11px\">'+detailedListByBillingMode[c].name+' '+(billSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+billSharePercentage+'%)</span>' : '')+(detailedListByBillingMode[c].count > 0 ? '<span style=\"font-style:italic; font-size: 60%; display: block;\">'+detailedListByBillingMode[c].count+' orders</span>' : '')+'</td><td style=\"font-size: 11px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(detailedListByBillingMode[c].value).toFixed(0)+'</td></tr>';\n\t\t c++;\n\t\t }\n\n\t\t var printSummaryBills = '';\n\t\t if(printSummaryBillsContent != ''){\n\t\t\t\tprintSummaryBills = ''+\n\t\t\t \t'<div class=\"KOTContent\">'+\n\t\t\t \t\t '<h2 style=\"text-align: center; margin: 5px 0 3px 0; font-weight: bold; border-bottom: 1px solid #444;\">BILLING MODES</h2>'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 85%\">'+\n\t\t\t\t '<col style=\"width: 15%\">'+ \n\t\t\t\t printSummaryBillsContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>';\t\n\t\t }\n\n\n\t\t //Sales by Payment Types Content\n\t\t var printSummaryPaymentContent = '';\n\t\t var d = 0;\n\t\t var paymentSharePercentage = 0;\n\t\t while(detailedListByPaymentMode[d]){\n\t\t paymentSharePercentage = parseFloat((100*detailedListByPaymentMode[d].value)/completeReportInfo[0].value).toFixed(0);\n\t\t printSummaryPaymentContent += '<tr><td style=\"font-size: 11px\">'+detailedListByPaymentMode[d].name+' '+(paymentSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+paymentSharePercentage+'%)</span>' : '')+(detailedListByPaymentMode[d].count > 0 ? '<span style=\"font-style:italic; font-size: 60%; display: block;\">'+detailedListByPaymentMode[d].count+' orders</span>' : '')+'</td><td style=\"font-size: 11px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(detailedListByPaymentMode[d].value).toFixed(0)+'</td></tr>'; \n\t\t d++;\n\t\t }\n\n\t\t var printSummaryPayment = '';\n\t\t if(printSummaryPaymentContent != ''){\n\t\t\t printSummaryPayment = ''+\n\t\t\t \t'<div class=\"KOTContent\">'+\n\t\t\t \t\t '<h2 style=\"text-align: center; margin: 5px 0 3px 0; font-weight: bold; border-bottom: 1px solid #444;\">PAYMENT TYPES</h2>'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 85%\">'+\n\t\t\t\t '<col style=\"width: 15%\">'+ \n\t\t\t\t printSummaryPaymentContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>';\t\n\t\t }\n\n\n\t\t var printSummaryCounts = ''+\n\t\t\t \t'<div class=\"KOTContent\">'+\n\t\t\t \t\t '<h2 style=\"text-align: center; margin: 5px 0 3px 0; font-weight: bold; border-bottom: 1px solid #444;\">OTHER DETAILS</h2>'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 85%\">'+\n\t\t\t\t '<col style=\"width: 15%\">'+ \n\t\t\t\t '<tr><td style=\"font-size: 10px\">Total Guests</td><td style=\"font-size: 13px\">'+netGuestsCount+'</td></tr>'+\n\t\t\t\t '<tr><td style=\"font-size: 10px\">Total Bills</td><td style=\"font-size: 13px\">'+completeReportInfo[0].count+'</td></tr>'+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>';\n\n\n\n\n\t\t var cssData = '<head> <style type=\"text/css\"> .KOTContent,.KOTHeader,.KOTNumberArea,.KOTSummary{width:100%;background-color:none}.subLabel,body{font-family:sans-serif}.KOTNumber,.invoiceNumber,.subLabel{letter-spacing:2px}#logo{min-height:60px;width:100%;border-bottom:2px solid #000}.KOTHeader,.KOTNumberArea{min-height:30px;padding:5px 0;border-bottom:1px solid #7b7b7b}.KOTContent{min-height:100px;font-size:11px;padding-top:6px;border-bottom:2px solid}.KOTSummary{font-size:11px;padding:5px 0;border-bottom:1px solid}.KOTContent td,.KOTContent table{border-collapse:collapse}.KOTContent td{border-bottom:1px dashed #444;padding:7px 0}.invoiceHeader,.invoiceNumberArea{padding:5px 0;border-bottom:1px solid #7b7b7b;width:100%;background-color:none}.KOTSpecialComments{min-height:20px;width:100%;background-color:none;padding:5px 0}.invoiceNumberArea{min-height:30px}.invoiceContent{min-height:100px;width:100%;background-color:none;font-size:11px;padding-top:6px;border-bottom:1px solid}.invoiceCharges{min-height:90px;font-size:11px;width:100%;background-color:none;padding:5px 0;border-bottom:2px solid}.invoiceCustomText,.invoicePaymentsLink{background-color:none;border-bottom:1px solid;width:100%}.invoicePaymentsLink{min-height:72px}.invoiceCustomText{padding:5px 0;font-size:12px;text-align:center}.subLabel{display:block;font-size:8px;font-weight:300;text-transform:uppercase;margin-bottom:5px}p{margin:0}.itemComments,.itemOldComments{font-style:italic;margin-left:10px}.serviceType{border:1px solid;padding:4px;font-size:12px;display:block;text-align:center;margin-bottom:8px}.tokenNumber{display:block;font-size:16px;font-weight:700}.billingAddress,.timeStamp{font-weight:300;display:block}.billingAddress{font-size:12px;line-height:1.2em}.mobileNumber{display:block;margin-top:8px;font-size:12px}.timeStamp{font-size:11px}.KOTNumber{font-size:15px;font-weight:700}.commentsSubText{font-size:12px;font-style:italic;font-weight:300;display:block}.invoiceNumber{font-size:15px;font-weight:700}.timeDisplay{font-size:75%;display:block}.rs{font-size:60%}.paymentSubText{font-size:10px;font-weight:300;display:block}.paymentSubHead{font-size:12px;font-weight:700;display:block}.qrCode{width:100%;max-width:120px;text-align:right}.addressContact,.addressText{color:gray;text-align:center}.addressText{font-size:10px;padding:5px 0}.addressContact{font-size:9px;padding:0 0 5px}.gstNumber{font-weight:700;font-size:10px}.attendantName,.itemQuantity{font-size:12px}#defaultScreen{position:fixed;left:0;top:0;z-index:100001;width:100%;height:100%;overflow:visible;background-image:url(../data/photos/brand/pattern.jpg);background-repeat:repeat;padding-top:100px}.attendantName{font-weight:300;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.itemComments,.itemQuantity{font-weight:700;display:block}.itemOldComments{display:block;text-decoration:line-through}.itemOldQuantity{font-size:12px;text-decoration:line-through;display:block} </style> </head>';\n\n\t\t var data_custom_header_image = window.localStorage.bill_custom_header_image ? window.localStorage.bill_custom_header_image : '';\n\n\t\t var data_custom_header_client_name = window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name : '';\n\t\t\tif(data_custom_header_client_name == ''){\n\t\t\t data_custom_header_client_name = 'Report';\n\t\t\t}\n\n\t\t var finalReport_printContent = cssData +\n\t\t \t'<body>'+\n\t\t\t '<div id=\"logo\">'+\n\t\t\t (data_custom_header_image != '' ? '<center><img style=\"max-width: 90%\" src=\\''+data_custom_header_image+'\\'/></center>' : '<h1 style=\"text-align: center\">'+data_custom_header_client_name+'</h1>')+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"KOTHeader\" style=\"padding: 0; background: #444;\">'+\n\t\t\t \t'<p style=\"text-align: center; font-size: 16px; font-weight: bold; text-transform: uppercase; padding-top: 6px; color: #FFF;\">'+reportInfo_branch+'</p>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"KOTNumberArea\">'+\n\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t '<col style=\"width: 50%\">'+\n\t\t\t '<col style=\"width: 50%\">'+\n\t\t\t '<tr>'+\n\t\t\t '<td style=\"vertical-align: top\">'+\n\t\t\t '<p>'+\n\t\t\t '<tag class=\"subLabel\">Admin</tag>'+\n\t\t\t '<tag class=\"KOTNumber\" style=\"font-size: 13; font-weight: 300; letter-spacing: unset;\">'+reportInfo_admin+'</tag>'+\n\t\t\t '</p>'+\n\t\t\t '</td>'+\n\t\t\t '<td style=\"vertical-align: top\">'+\n\t\t\t '<p style=\" text-align: right; float: right\">'+\n\t\t\t '<tag class=\"subLabel\">TIME STAMP</tag>'+\n\t\t\t '<tag class=\"timeStamp\">'+reportInfo_time+'</tag>'+\n\t\t\t '</p>'+\n\t\t\t '</td>'+\n\t\t\t '</tr>'+\n\t\t\t '</table>'+\n\t\t\t '</div>'+\n\t\t\t '<h1 style=\"margin: 6px 3px; padding-bottom: 5px; font-weight: 400; text-align: center; font-size: 15px; border-bottom: 2px solid; }\">'+reportInfo_title+'</h1>'+\n\t\t\t \t printSummaryAll+printSummaryBills+printSummaryPayment+printSummaryCounts+\n\t\t\t \t'</body>';\n\n\t\t\t\tvar finalContent_EncodedPrint = encodeURI(finalReport_printContent);\n\t\t\t\t$('#reportActionButtonPrint').attr('data-hold', finalContent_EncodedPrint);\n\n\t\t\t\trunReportAnimation(100); //Done!\n\t\t}\n\t}", "static get reports() {}", "function createVisualsArray(reportVisuals) {\n\n // Remove all visuals without titles (i.e cards)\n LayoutShowcaseState.layoutVisuals = reportVisuals.filter(function (visual) {\n return visual.title !== undefined;\n });\n\n // Clear visuals list div\n $('#visualsList').empty();\n\n // Build checkbox html list and insert the html code to visualsList div\n for (let i = 0; i < LayoutShowcaseState.layoutVisuals.length; i++) {\n $('#visualsList').append(buildVisualElement(LayoutShowcaseState.layoutVisuals[i]));\n }\n\n // Render all visuals\n renderVisuals();\n}", "function callback(reports) {\n\n let overview = plato.getOverviewReport(reports);\n let {total, average} = overview.summary;\n\n let output = `total\n ----------------------\n eslint: ${total.eslint}\n sloc: ${total.sloc}\n maintainability: ${total.maintainability}\n average\n ----------------------\n eslint: ${average.eslint}\n sloc: ${average.sloc}\n maintainability: ${average.maintainability}`;\n\n console.log(output);\n }", "function downloadReports(formats) {\n lib_core.startGroup('Download Reports');\n if (formats.length === 0) {\n lib_core.info('No more formats');\n return;\n }\n const jobUUID = getJobUUID();\n lib_core.debug(jobUUID);\n formats.forEach((format) => {\n lib_core.info(`Get Report as ${format}`);\n const exitCode = getReport(jobUUID, projectName, format).code;\n logExitCode(exitCode);\n });\n lib_core.endGroup();\n}", "Rebuild() {\n\t\t\tthis.BuildMatchlist()\n\t\t\t\t.then((AllItems) => {\n\t\t\t\t\tif(this.def.log && this.def.log.results && AllItems.length > 0)\n\t\t\t\t\t\tpsl.log(AllItems);\n\n\t\t\t\t\tlet [IncludedItems, ExcludedItems] = this.FilterResultsWithRules(AllItems, this.def.rules || []);\n\n\t\t\t\t\tlet IncludedHainItems = this.TransformItems(IncludedItems);\n\n\t\t\t\t\tif(this.def.log) {\n\t\t\t\t\t\tif(this.def.log.included) {\n\t\t\t\t\t\t\tpsl.log(`Included Items (${this.def.name}):\\n${indent(\n\t\t\t\t\t\t\t\tIncludedHainItems.pluck('primaryText')\n\t\t\t\t\t\t\t\t\t.sort()\n\t\t\t\t\t\t\t\t\t.join('\\n'))}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.def.log.excluded) {\n\t\t\t\t\t\t\tlet ExcludedHainItems = this.TransformItems(ExcludedItems);\n\t\t\t\t\t\t\tpsl.log(`Excluded Items (${this.def.name}):\\n${indent(\n\t\t\t\t\t\t\t\tExcludedHainItems.pluck('primaryText')\n\t\t\t\t\t\t\t\t\t.sort()\n\t\t\t\t\t\t\t\t\t.join('\\n'))}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpsl.indexer.set(this.def.name, IncludedHainItems);\n\t\t\t\t\tpsl.log(`Included ${IncludedItems.length}/${AllItems.length} items for ${this.def.name}`);\n\t\t\t\t}).catch((err) => {\n\t\t\t\t\tif(err instanceof Error) {\n\t\t\t\t\t\tpsl.log(err.stack);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpsl.log(err);\n\t\t\t\t\t}\n\t\t\t\t\tpsl.toast.enqueue(`Failed building resultset for ${this.constructor.name}.`);\n\t\t\t\t});\n\n\t\t}", "function callback(reports) {\n const overview = plato.getOverviewReport(reports);\n\n const { total, average } = overview.summary;\n\n const output = `total\n ----------------------\n eslint: ${total.eslint}\n sloc: ${total.sloc}\n maintainability: ${total.maintainability}\n average\n ----------------------\n eslint: ${average.eslint}\n sloc: ${average.sloc}\n maintainability: ${average.maintainability}`;\n\n console.log(output);\n}", "async function postScan(reportFormats, exitCode) {\n downloadReports(reportFormats.slice(1));\n await uploadArtifact(src_settings_namespaceObject_0.vz, getFiles(src_settings_namespaceObject_0.nl));\n if (exitCode !== 0 && failJobOnFindings === 'true') {\n failAction(exitCode);\n }\n}", "static findAll() {\n const wrapper = new ReportWrapper();\n return wrapper.listAll()\n .then(results => {\n if (!_.isArray(results)) { return [new Report(results)]; }\n return results.reduce((models, data) => {\n models.push(new Report(data));\n return models;\n }, []);\n });\n }", "function generateDataForSitReps(reports, dateFormat) {\n if (reports == null) { return; }\n\n var labelsFn = function(report) { return utilitiesService.formatDateTime(report.DateTime, dateFormat); }\n var seriesFn = function(report) { return report.Facility.Name; }\n var dataFn = function(report) { return report.PersonCount; }\n\n return generateReportStats(reports, labelsFn, seriesFn, dataFn);\n }", "async function updateReportData() {\n let body;\n\n try {\n body = await axios.get(url, { responseType: 'arraybuffer' });\n } catch (err) {\n console.log('[dailyReportTask]: Could not connect to Hankyung Consensus');\n return;\n }\n\n const $ = cheerio.load(Iconv.decode(body.data, 'EUC-KR'));\n let p = Promise.resolve();\n $('.table_style01 tbody tr').map(function () {\n const elem = $(this);\n p = p.then(async function () {\n if (elem.find('td:nth-child(7) > div > a').attr('href') != null) {\n let original = elem.find('strong').text();\n if (original.indexOf('(') === -1 || original.indexOf(')') === -1) {\n console.log('Parsing unavailable > ' + original);\n } else {\n reportObj = {};\n reportObj['date'] = elem.find('td.first.txt_number').text();\n reportObj['stockName'] = original.split('(')[0];\n reportObj['stockId'] = original.split('(')[1].split(')')[0];\n\n if (\n reportObj['stockId'].length === 6 &&\n !isNaN(reportObj['stockId']) &&\n reportObj['stockName'].length <= 20\n ) {\n reportObj['reportName'] = original.split(')')[1];\n reportObj['priceGoal'] = elem\n .find('td.text_r.txt_number')\n .text()\n .replace(/,/g, '');\n reportObj['analyst'] = elem.find('td:nth-child(5)').text();\n reportObj['firm'] = elem.find('td:nth-child(6)').text();\n reportObj['reportIdx'] = elem\n .find('td.text_l > div > div')\n .attr('id')\n .substr(8, 6);\n\n const sectorInfo = await getSectorInfo(reportObj['stockId']);\n\n if (!(sectorInfo['lSector'] === 'X')) {\n params = {\n TableName: 'reportListComplete',\n Item: {\n date: { S: reportObj['date'] },\n stockName: { S: reportObj['stockName'] },\n stockId: { S: reportObj['stockId'] },\n reportName: { S: reportObj['reportName'] },\n priceGoal: { S: reportObj['priceGoal'] },\n analyst: { S: reportObj['analyst'] },\n firm: { S: reportObj['firm'] },\n reportIdx: { S: reportObj['reportIdx'] },\n lSector: { S: sectorInfo['lSector'] },\n mSector: { S: sectorInfo['mSector'] },\n sSector: { S: sectorInfo['sSector'] }\n }\n };\n ddb.putItem(params, function (err) {\n if (err) {\n console.log('[dailyReportTask]: Error ', err);\n }\n });\n }\n }\n }\n }\n });\n });\n p.then(function () {\n console.log('[dailyReportTask]: update complete');\n });\n}", "static set reports(value) {}", "componentWillMount() {\n var uid = firebase.auth().currentUser.uid;\n firebase.firestore().collection('users').doc(uid).get().then((snapshot) => {\n var user = snapshot.data();\n var rids = user.reports;\n\n var promises = [];\n var keys = []\n var i = 0;\n for(var key in rids) {\n promises.push(\n firebase.firestore().collection('reports').doc(rids[key]).get()\n );\n keys.push(rids[key])\n }\n\n Promise.all(promises).then(snapshots => {\n var reports = snapshots.map(snapshot => {\n var report = snapshot.data();\n report.url = '/reports/' + keys[i];\n i++;\n return report;\n }).filter(report => report.appID === \"myFields\");\n this.setState({reports: reports});\n });\n });\n }", "function generateExcelReports(){\n\t$( \"#summaryRenderArea\" ).children().css( \"display\", \"none\" );\n\tdocument.getElementById(\"excelReport_RenderArea\").style.display = \"block\";\n}", "function mergeData(){\n\n var locRef={};\n var tempStatsArray = tempStats.stdout; // array with the stats info\n var entryAsset, entryStats; // variables to hold entries assets and stats\n var newStats = {}; // obj containing the new stats\n\n for(let i = 0; i < assetsData.length; i++){\n\n entryAsset = tempAssets[i]; // get Asset\n\n for(let k = 0; k < tempStatsArray.length; k++){\n\n entryStats = tempStatsArray[k]; // get stats\n\n // If there is a correspondence between Assets list and Stats list\n if(entryAsset.name === entryStats.name){\n\n // Create new stats object\n newStats = {timestamp:tempStats.timestamp, stdout: [entryStats]};\n\n // If asset has a \"vf-OS\" label and marked as \"true\"\n if( (\"vf-OS\" in entryAsset.labels) &&\n (entryAsset.labels[\"vf-OS\"] === \"true\") ){\n\n // If it has a front url\n if((\"vf-OS.frontendUri\" in entryAsset.labels) &&\n (entryAsset.labels[\"frontendUri\"] !== \"\")){ // It is a vApp\n\n // Put stats data in historyDB\n locRef = {obj: historyDB, objName:\"runningVAssets\"};\n addStatsToHistory(locRef, newStats);\n\n // Add Asset Info To History\n historyDB.runningVAssets[entryStats.name].assetDetails = tempAssets[k];\n\n } else { // If it does not have a url put it in \"Supporting Library Containers\" table\n\n // Put stats data in historyDB\n locRef = {obj: historyDB, objName:\"notRunningVAssets\"};\n addStatsToHistory(locRef, newStats);\n\n // add Asset Info To History\n historyDB.notRunningVAssets[entryStats.name].assetDetails = tempAssets[k];\n }\n\n } else { // Put it in Others Containers tables\n\n // Put stats data in historyDB\n locRef = {obj: historyDB, objName:\"otherContainers\"};\n addStatsToHistory(locRef, newStats);\n\n // Add Asset Info To History\n historyDB.otherContainers[entryStats.name].assetDetails = tempAssets[k];\n }\n\n break; // Go to next asset\n }\n }\n }\n\n // remove all data from all sets\n removeOldData();\n\n // check if it is necessary to change units scale\n changeDataScales();\n\n // reset temp variables\n tempStats = undefined;\n tempAssets = undefined;\n}", "function excelReportFinal(){\n\t\t\t\t\t\texcelReportSummaryByBillingModes();\n\t\t\t\t\t}", "getReport() {\n // Inspect the UID to determine the report to render. As a special case,\n // we will display a fake report for development purposes.\n const uid = this.props.match.params.uid;\n if (uid === \"_dev\") {\n const [r] = propagateIndices([fakeReportAssertions]);\n setTimeout(() => {this.setState({report: r, loading: false});}, 1500);\n } else {\n axios.get(`/api/v1/reports/${uid}`)\n .then(response => propagateIndices([response.data]))\n .then(reportEntries => this.setState({\n report: reportEntries[0],\n loading: false\n }))\n .catch(error => this.setState({\n error,\n loading: false\n }));\n }\n }", "function onReport() {\n\t\t\tvar reportTime = t.getTimeBucket();\n\t\t\tvar curTime = reportTime;\n\t\t\tvar missedReports = 0;\n\n\t\t\tif (total === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if we had more polls than we expect in each\n\t\t\t// collection period (we allow one extra for wiggle room), we\n\t\t\t// must not have been able to report, so assume those periods were 100%\n\t\t\twhile (total > (POLLS_PER_REPORT + 1) &&\n\t\t\t missedReports <= MAX_MISSED_REPORTS) {\n\t\t\t\tt.set(\"busy\", 100, --curTime);\n\n\t\t\t\t// reset the period by one\n\t\t\t\ttotal -= POLLS_PER_REPORT;\n\t\t\t\tlate = Math.max(late - POLLS_PER_REPORT, 0);\n\n\t\t\t\t// this was a busy period\n\t\t\t\toverallTotal += POLLS_PER_REPORT;\n\t\t\t\toverallLate += POLLS_PER_REPORT;\n\n\t\t\t\tmissedReports++;\n\t\t\t}\n\n\t\t\t// update the total stats\n\t\t\toverallTotal += total;\n\t\t\toverallLate += late;\n\n\t\t\tt.set(\"busy\", Math.round(late / total * 100), reportTime);\n\n\t\t\t// reset stats\n\t\t\ttotal = 0;\n\t\t\tlate = 0;\n\t\t}", "_createDisplayObjectsFromWebserviceResponseData({ responseData }) {\n\n const annotationTypeDataResponse = responseData.annotationTypeDataResponse;\n const existingEntriesResponse = responseData.existingEntriesResponse;\n\n const minPSMs = existingEntriesResponse.minPSMs;\n\n // Use objects for index so can increment the index property in called methods\n\n const annotationTypes_Overall_Entries_AllTypes_Index_Container= { index : 0 };\n\n const annotationTypes_Overall_Entries_PSM_Index_Container = { index : 0 };\n const annotationTypes_Overall_Entries_ReportedPeptide_Index_Container = { index : 0 };\n \n\n // Match up Annotation Type Data to Existing Entries\n \n // annotationTypeDataResponse.reportedPeptideAnnotationTypeList\n // annotationTypeDataResponse.psmAnnotationTypeList\n \n // existingEntriesResponse.reportedPeptideEntriesList;\n // existingEntriesResponse.psmEntriesList;\n \n // Create 2 Maps ( peptide_DataMap, psm_DataMap )\n // <[Search Program name],Map<[annTypeName],Set<[defaultFilterValue]>>>\n\n const peptide_DataMap_Key_SearchProgramName = \n this._create_Map_Per_SearchProgramName_ProcessPeptideOrPSM({ \n annotationTypeList : annotationTypeDataResponse.reportedPeptideAnnotationTypeList\n });\n\n const psm_DataMap_Key_SearchProgramName = \n this._create_Map_Per_SearchProgramName_ProcessPeptideOrPSM({ \n annotationTypeList : annotationTypeDataResponse.psmAnnotationTypeList\n });\n\n // Combine Maps of Ann Type data and Existing Entries to produce result Display Objects\n\n // Result Display Objects\n\n // Array<{ searchProgramName, peptide_List, psm_List }\n\n // peptide_List, psm_List contain:\n // Array<{ annTypeName, foundValues: Array< Double [Default cutoffs for searches] >, foundValuesString: String Comma delim of foundValues }>\n // properties 'foundValues' and 'foundValuesString' are optional and will not be present if none exist \n\n const dataPerSearchProgramName_Array = [];\n\n for ( const peptide_DataMap_Key_SearchProgramName_Entry of peptide_DataMap_Key_SearchProgramName.entries() ) {\n\n const searchProgramName = peptide_DataMap_Key_SearchProgramName_Entry[ 0 ];\n const peptide_AnnTypeData_Map = peptide_DataMap_Key_SearchProgramName_Entry[ 1 ];\n\n const dataPerSearchProgramName_Entry = { searchProgramName };\n\n dataPerSearchProgramName_Entry.peptide_List = this._create_Array_ProcessPeptideOrPSM({ \n annTypeData_Map : peptide_AnnTypeData_Map, \n searchProgramName,\n existingCutoffEntriesList : existingEntriesResponse.reportedPeptideEntriesList,\n psmPeptideOverallList : this._annotationTypes_Overall_Entries_ReportedPeptide,\n indexPerTypeContainer : annotationTypes_Overall_Entries_ReportedPeptide_Index_Container,\n annotationTypes_Overall_Entries_AllTypes_Index_Container\n });\n\n { // Process psm data for same searchProgramName\n const psm_AnnTypeData_Map = psm_DataMap_Key_SearchProgramName.get( searchProgramName );;\n if ( psm_AnnTypeData_Map ) {\n dataPerSearchProgramName_Entry.psm_List = this._create_Array_ProcessPeptideOrPSM({ \n annTypeData_Map : psm_AnnTypeData_Map,\n searchProgramName,\n existingCutoffEntriesList : existingEntriesResponse.psmEntriesList,\n psmPeptideOverallList : this._annotationTypes_Overall_Entries_PSM,\n indexPerTypeContainer : annotationTypes_Overall_Entries_PSM_Index_Container,\n annotationTypes_Overall_Entries_AllTypes_Index_Container\n });\n }\n }\n\n psm_DataMap_Key_SearchProgramName.delete( searchProgramName ); // Remove since processed\n\n dataPerSearchProgramName_Array.push( dataPerSearchProgramName_Entry );\n }\n\n // Process any remaining PSM Map entries\n for ( const psm_DataMap_Key_SearchProgramName_Entry of psm_DataMap_Key_SearchProgramName.entries() ) {\n\n const searchProgramName = psm_DataMap_Key_SearchProgramName_Entry[ 0 ];\n const psm_AnnTypeData_Map = psm_DataMap_Key_SearchProgramName_Entry[ 1 ];\n\n const dataPerSearchProgramName_Entry = { searchProgramName };\n\n dataPerSearchProgramName_Entry.psm_List = this._create_Array_ProcessPeptideOrPSM({ \n annTypeData_Map : psm_AnnTypeData_Map,\n searchProgramName,\n existingCutoffEntriesList : existingEntriesResponse.psmEntriesList,\n psmPeptideOverallList : this._annotationTypes_Overall_Entries_PSM,\n indexPerTypeContainer : annotationTypes_Overall_Entries_PSM_Index_Container,\n annotationTypes_Overall_Entries_AllTypes_Index_Container\n });\n\n dataPerSearchProgramName_Array.push( dataPerSearchProgramName_Entry );\n }\n\n // Sort dataPerSearchProgramName_Array on searchProgramName\n dataPerSearchProgramName_Array.sort( (a, b) => {\n return a.searchProgramName.localeCompare( b.searchProgramName, undefined, { sensitivity: 'base' } );\n });\n\n return { dataPerSearchProgramName_Array };\n }", "function prepareReport(spreadsheet,report) {\n\n spreadsheet.addEditor(\"[email protected]\");\n report.exportToSheet(spreadsheet.getActiveSheet()); \n var sheet = spreadsheet.getActiveSheet();\n Logger.log(sheet.getSheetName());\n //increase numColumns if you want to run reports with more than 9 category headlines\n var numColumns = 9;\n for (var i = 1; i < numColumns; i++) {\n \n sheet.autoResizeColumn(i);\n \n }\n \n \n //sheet.insertColumnBefore(1); \n //if you want to add some space/margin to the left hand side.\n sheet.insertRows(1);\n \n //checks the report type and if this is a campaign report \n //it resets certain headers to make it more readable.\n if (sheet.getSheetName() === \"campaign\") {\n \n sheet.getRange(2, 2).setValue(\"Budget\");\n sheet.getRange(2, 8).setValue(\"Phone Calls\");\n \n }\n \n \n /*here we could check to see if its a call details report\n \n \n if (sheet.getSheetName() === \"campaign\") \n \n \n \n and then filter out all calls except for last month's */\n \n \n \n //this gets the name of the current month and the previous month for later use in a comparison statement\n //to later insert in the spreadsheet and email as needed.\n var date = new Date();\n var month = date.getMonth();\n var day = date.getDay();\n var year = date.getYear();\n var months = [\"january\",\"february\",\"march\",\"april\",\"may\",\"june\",\"july\",\"august\",\"september\",\"october\",\"november\",\"december\"];\n for (var i = 1; i < 13; i++) {\n \n if (month === i && i === 1) {\n \n month = months[0];\n \n }\n \n else if (month === i) {\n \n month = months[i-1];\n var othermonth = months[i-2];\n \n }\n }\n \n //you can customize the comparison string here:\n var dateRange = \"showing data from \" + month + \"as compared to \" + othermonth + \" \";\n //put this message in the top left cell\n sheet.getRange(1,1).setValue(dateRange);\n \n //prints summary to last row and sets number formats\n getTotals(2);\n getTotals(3);\n getTotals(4);\n getTotals(8);\n getTotals(9);\n getCtr(5);\n getAverageCPC();\n getAveragePos();\n \n return dateRange;\n }", "function preprocess() {\n total = 0;\n console.log(\"Preprocessing html files...\");\n preprocessScams();\n fs.readdir('./_layouts/', function(err, files) {\n if (err) throw err;\n files.forEach(function(file) {\n if (!([\"address.html\", \"default.html\", \"scam.html\", \"ip.html\", \"scams.html\", \"scams_2.html\"].includes(file))) {\n fs.readFile('./_layouts/' + file, 'utf8', function(err, data) {\n var preprocess = template.replace(\"{{ content }}\", data);\n if (err) {\n return console.log(err);\n }\n if (!([\"index.html\", \"reportdomain.html\", \"reportaddress.html\", \"search.html\"].includes(file))) {\n var filename = \"./_site/\" + file.replace('.html', '') + \"/index.html\";\n if (!fs.existsSync(\"./_site/\" + file.replace('.html', ''))) {\n fs.mkdirSync(\"./_site/\" + file.replace('.html', ''));\n }\n } else if ([\"reportdomain.html\", \"reportaddress.html\"].includes(file)) {\n var filename = \"./_site/\" + file.replace('.html', '').replace(\"report\", \"report/\") + \"/index.html\";\n if (!fs.existsSync(\"./_site/report/\")) {\n fs.mkdirSync(\"./_site/report/\");\n }\n if (!fs.existsSync(\"./_site/\" + file.replace('.html', '').replace(\"report\", \"report/\"))) {\n fs.mkdirSync(\"./_site/\" + file.replace('.html', '').replace(\"report\", \"report/\"));\n }\n } else if (file == \"index.html\") {\n var filename = \"./_site/index.html\";\n } else if (file == \"search.html\") {\n if (!fs.existsSync(\"./_site/\" + file.replace('.html', ''))) {\n fs.mkdirSync(\"./_site/\" + file.replace('.html', ''));\n }\n var filename = \"./_site/\" + file.replace('.html', '') + \"/index.html\";\n let trustedtable = \"\";\n legiturls.sort(function(a, b) {\n return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;\n });\n Object.keys(legiturls).forEach(function(key) {\n if ('featured' in legiturls[key] && legiturls[key]['featured'] == true) {\n if (fs.existsSync(\"_static/img/\" + legiturls[key]['name'].toLowerCase().replace(' ', '') + \".png\")) {\n trustedtable += \"<tr><td><img class='icon' src='/img/\" + legiturls[key]['name'].toLowerCase().replace(' ', '') + \".png'>\" + legiturls[key]['name'] + \"</td><td><a target='_blank' href='\" + legiturls[key]['url'] + \"'>\" + legiturls[key]['url'] + \"</a></td></tr>\";\n } else {\n console.log(\"Warning: No verified icon was found for \" + legiturls[key]['name']);\n trustedtable += \"<tr><td>\" + legiturls[key]['name'] + \"</td><td><a target='_blank' href='\" + legiturls[key]['url'] + \"'>\" + legiturls[key]['url'] + \"</a></td></tr>\";\n }\n }\n });\n preprocess = preprocess.replace(\"{{ trusted.table }}\", trustedtable);\n }\n if (minify) {\n preprocess = htmlmin(preprocess);\n }\n fs.writeFile(filename, preprocess, function(err) {\n if (err) {\n return console.log(err);\n }\n total++;\n if ((job == \"build\" || job == false) && total == files.length - 6) {\n console.log(\"Done preprocessing.\")\n finish();\n }\n });\n });\n }\n });\n });\n}", "async function generateReport()\n{\n\t// Reset the values:\n\tallSVGUri = [];\n\tall_imgs = [];\n\n\t// Finish these functions:\n\tawait SVGUri(\"#mapSvg\");\n\tawait SVGUri(\"#lineGraphSVG\");\n\n\t// console.log(allSVGUri);\n\n\tfor(var i = 0; i < allSVGUri.length; i++){\n\t\t// Wait for this function to finish:\n\t\tawait convertURIToImageData(allSVGUri[i]).then(function(imageData){\n\t\t\t// console.log(\"7: Finished convertURIToImageData called\")\n\n\t\t});\n\t}\n\n\t// await createPDF();\n\tawait generatePDF();\n}", "function getSummaryReport() {\n var result;\n result = {\n table: {\n widths: ['*'],\n body: [\n [{\n text: 'DILAPIDATION SURVEY REPORT SUMMARY',\n style: 'tableHeader'\n }],\n [{\n text: getIt('surveyReportSummary'),\n style: 'tableText'\n }]\n ]\n }\n };\n return result;\n}", "function ResourceReport(json) {\n this.json = json;\n this.tenantreports = [];\n for (var i = 0; i < json.tenantReports.length; i++) {\n this.tenantreports.push(new TenantReport(this, json.tenantReports[i]));\n }\n}", "function getSubCategDataFromReport() {\n let reportID = tableDataListArray[i].rowId;\n let reportName = tableDataListArray[i].columnValues[1].columnValue;\n let reportGroup = tableDataListArray[i].columnValues[2].columnValue;\n const GetSubCategDataRequest = getRequestObject(\"GET\", \"../../CustomReportSettings.do?methodToCall=getSubCategDataFromReport&req=%7B%22reportID%22%3A\" + reportID + \"%7D\");\n GetSubCategDataRequest.onreadystatechange = function () {\n if (this.readyState === 4 && this.status === 200) {\n let subCategoryListArray = [];\n let columnList = [];\n let myArr = JSON.parse(this.responseText);\n let patternData = myArr.patternArray;\n let patternPresent = myArr.patternPresent;\n for (let index = 0; index < myArr.subCategoryData.dropdownList.length; index++) {\n subCategoryListArray.push(myArr.subCategoryData.dropdownList[index].id);\n }\n for (let iindex = 0; iindex < myArr.columnTypeData.dropdownList.length; iindex++) {\n columnList.push(myArr.columnTypeData.dropdownList[iindex].id);\n }\n i++;\n let patternViewObject = {};\n if (patternPresent) {\n patternViewObject = makePatternView(patternData, reportID, retrievePatternFields(reportID, patternData));\n }\n saveCustomReport(subCategoryListArray, JSON.stringify(columnList), reportID, reportName, reportGroup, patternViewObject, patternPresent);\n }\n };\n}", "function flattenValues (report) {\n if (Object.prototype.toString.call(report.values) === '[object Array]') {\n report.values.forEach(function (value) {\n Object.assign(report, value)\n })\n }\n return report\n }", "async report() {\n const { logger, db } = this[OPTIONS];\n const testedPages = await db.read('tested_pages');\n\n logger.info('Saving JSON report');\n const json = new JSONReporter(this[OPTIONS]);\n await json.open();\n await json.write(testedPages);\n await json.close();\n\n logger.info('Saving HTML Report');\n const html = new HTMLReporter(this[OPTIONS]);\n await html.open();\n await html.write(testedPages);\n await html.close();\n }", "function expand_and_populate(data)\n{\n\tset_initial_state('report_type', data['obj_type']);\n\tif (!is_populated && data['obj_type']) {\n\t\tsetTimeout(function() {expand_and_populate(data);}, 1000);\n\t\treturn;\n\t}\n\tvar reportObj = data;\n\tvar field_obj = new field_maps();\n\tvar tmp_fields = new field_maps3();\n\tvar field_str = reportObj['obj_type'];\n\tif (reportObj['objects']) {\n\t\tvar to_id = field_obj.map[field_str];\n\t\tvar from_id = tmp_fields.map[field_str];\n\t\t// select report objects\n\t\tfor (prop in reportObj['objects']) {\n\t\t\t$('#' + from_id).selectOptions(reportObj['objects'][prop]);\n\t\t}\n\t\t// move selected options from left -> right\n\t\tmoveAndSort(from_id, to_id);\n\t}\n\n\tif (data['standardreport']) {\n\t\tvar val = data['standardreport'][0];\n\t\tif ($('#standardreport').is(':visible')) {\n\t\t\t$('#standardreport option').each(function() {\n\t\t\t\tif ($(this).val() == val) {\n\t\t\t\t\t$(this).attr('selected', true);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tset_initial_state('report_type', reportObj['report_type']);\n\tshow_calendar(reportObj['report_period']);\n\n\tif (reportObj['report_name'] != undefined) {\n\t\tset_initial_state('report_name', reportObj['report_name']);\n\t}\n\n\tif (reportObj['report_period'] == 'custom') {\n\t\tstartDate = epoch_to_human(reportObj['start_time']);\n\t\tdocument.forms['summary_form'].cal_start.value = reportObj['cal_start'];\n\t\tdocument.forms['summary_form'].time_start.value = reportObj['time_start'];\n\t\tdocument.forms['summary_form'].start_time.value = format_date_str(startDate);\n\n\t\tendDate = epoch_to_human(reportObj['end_time']);\n\t\tdocument.forms['summary_form'].cal_end.value = reportObj['cal_end'];\n\t\tdocument.forms['summary_form'].time_end.value = reportObj['time_end'];\n\t\tdocument.forms['summary_form'].end_time.value = format_date_str(endDate);\n\t}\n\n\t// wait for lists to populate\n\tsetTimeout(\"remove_duplicates();\", 500);\n}", "[loadAllSource]() {\n let ret = [];\n let test = {};\n // dump static html files\n let sopt = this[config].format({\n flag: false,\n dir: 'DIR_SOURCE',\n sub: 'DIR_SOURCE_SUB'\n });\n ret.push(...this[loadSource](sopt,test));\n // dump server template files\n let topt = this[config].format({\n flag: true,\n dir: 'DIR_SOURCE_TP',\n sub: 'DIR_SOURCE_TP_SUB'\n });\n ret.push(...this[loadSource](topt,test));\n // ensure all resource loaded\n Promise.all(ret).then(() => {\n this.emit('done');\n });\n }", "function meat_shop_inventory_report() {\n //\n // clearing elements inside main-container div\n var childNodes = document.getElementById('main-container').childNodes;\n for (var i = 0; i < childNodes.length; i++) {\n if (childNodes[i].nodeType == 1) { childNodes[i].removeAll();}\n }\n //\n var report_type = 'stock_report'; //this can be a variable later\n var table = 'meat_shop_stock'; //this can be a variable later\n var sort_col = 'item_number'; //variable later on\n var sort_dir = 'ASC'; //varible later on\n var meta_sql_args = {};\n var data_sql_args = {};\n var item_table_args = {};\n //\n // setting header\n document.getElementById('modify-header').textContent = 'Meat Shop Inventory Report';\n //\n // populating meta and data sql args\n meta_sql_args.cmd = 'SELECT';\n meta_sql_args.table = 'table_meta_data';\n meta_sql_args.where = [['in_tables','REGEXP','(^|%)'+table+'(%|$)'],['use_on_pages','REGEXP','(^|%)meat_shop(%|$)']];\n meta_sql_args.where.push(['use_in_html_tables','REGEXP','(^|%)'+report_type+'(%|$)']);\n meta_sql_args.order_by = [['order_index','ASC']];\n //\n data_sql_args.cmd = 'SELECT';\n data_sql_args.table = table;\n data_sql_args.order_by = [[sort_col,sort_dir]];\n if (table == 'meat_shop_stock') { data_sql_args.where = [['item_status','LIKE','active']];}\n //\n item_table_args.meta_sql_args = meta_sql_args;\n item_table_args.data_sql_args = data_sql_args;\n //\n // setting up the item table arguments\n item_table_args.table_output_id = 'content-div';\n item_table_args.table_id = 'meat-shop-report';\n item_table_args.table_class = 'default-table';\n item_table_args.row_id_prefix = 'report-row';\n item_table_args.table_data_cell_class = 'default-table-td';\n item_table_args.row_onclick = '';\n item_table_args.row_onmouseenter = \"add_class('default-table-row-highlight','%row_id%')\";\n item_table_args.row_onmouseleave = \"remove_class('default-table-row-highlight','%row_id%')\";\n item_table_args.add_callback = mod_inventory_report_table;\n item_table_args.no_page_nav = true;\n item_table_args.head_row_args = {\n sortable : false,\n 'tables_referenced' : ['meat_shop_stock']\n }\n item_table_args.page_nav_args = {};\n //\n create_standard_table(item_table_args);\n\n}", "function displayAssessmentReport(result){\n var keys=Object.keys(result[0]);\n\n //tempArray is used to store one type of grade (hw,exam,or proj) at a time:\n var tempArray=[];\n\n //outter for is to loop on the keys that are available in each student object,\n //i.e gives one grade type at a time.\n for (var i=0; i<=keys.length-1; i++){\n\n //the inside foreach loops on all students.\n result.forEach(function(element){\n if (element[keys[i]] !== null){\n tempArray.push(element[keys[i]]);\n }\n });\n\n //if it is not an empty array then scale it and update the view.\n if(tempArray.length > 0){\n //scale one grade type at a time:\n scale(tempArray);\n\n //re empty the tempArray for the next iteration.\n tempArray=[];\n\n //Updating the View:\n var $tr=$(\"<tr class='assessment-report'>\"), $th=$(\"<th>\"), $tdT=$(\"<td>\"), $tdAB=$(\"<td>\"), $tdC=$(\"<td>\"), $tdDF=$(\"<td>\");\n\n //appending table data tags to a table row.\n $th.text(keys[i]);\n $tr.append($th);\n $tdT.text(assessmentScale.total);\n $tr.append($tdT);\n $tdAB.text(assessmentScale.satisfactory);\n $tr.append($tdAB);\n $tdC.text(assessmentScale.developing);\n $tr.append($tdC);\n $tdDF.text(assessmentScale.unsatisfactory);\n $tr.append($tdDF);\n\n //populating download obj and array with data, this data is sent to the server when generating pdf report.\n var assessmentObj={workType:\"\", totalNum:\"\", satisfactory:\"\", developing:\"\", unsatisfactory:\"\"};\n assessmentObj.workType= keys[i];\n assessmentObj.totalNum= assessmentScale.total;\n assessmentObj.satisfactory= assessmentScale.satisfactory;\n assessmentObj.developing= assessmentScale.developing;\n assessmentObj.unsatisfactory= assessmentScale.unsatisfactory;\n assessmentArray.push(assessmentObj);\n\n //appending the table row to the whole table.\n $(\".assessment-report-table\").append($tr);\n }//end if\n }//end of outter for.\n}//end of displayAssessmentReport function.", "function preprocessScams() {\n let total_2 = 0;\n if (!fs.existsSync(\"./_site/scams/\")) {\n fs.mkdirSync(\"./_site/scams/\");\n }\n fs.readFile('./_layouts/scams.html', 'utf8', function(err, data) {\n const template_1 = template.replace(\"{{ content }}\", data);\n fs.readFile('./_layouts/scams_2.html', 'utf8', function(err, data2) {\n const template_2 = template.replace(\"{{ content }}\", data2);\n fs.readFile('./_site/data/scams.json', 'utf8', function(err, data3) {\n const scams = JSON.parse(data3).sort(\n function(x, y) {\n if ('status' in x && 'status' in y) {\n if (x['status'][x['status'].length - 1]['time'] < y['status'][y['status'].length - 1]['time']) {\n return 1;\n } else if (x['status'][x['status'].length - 1]['time'] == y['status'][y['status'].length - 1]['time']) {\n return 0;\n } else {\n return -1;\n }\n } else {\n return 0;\n }\n });\n fs.readFile('./_site/data/addresses.json', 'utf8', function(err, data4) {\n const addresses = JSON.parse(data4);\n let pages = [];\n let active = 0;\n let inactive = 0;\n for (var key = 0, len = scams.length; key < len; key++) {\n total_2++;\n var layout = \"\";\n var color_status = \"Unknown\"\n var status = \"unknown\";\n if ('status' in scams[key]) {\n status = scams[key]['status'][0]['status'];\n if (status == \"Active\") {\n status = \"offline\";\n color_status = '<i class=\"warning sign icon\"></i> Active';\n active++;\n } else if (status == \"Offline\") {\n status = \"activ\";\n color_status = '<i class=\"checkmark icon\"></i> Offline';\n inactive++;\n } else if (status == \"Suspended\") {\n color_status = '<i class=\"remove icon\"></i> Suspended';\n }\n }\n if ('category' in scams[key]) {\n switch (scams[key]['category']) {\n case \"Phishing\":\n var category = '<i class=\"address book icon\"></i> Phishing';\n break;\n case \"Scamming\":\n var category = '<i class=\"payment icon\"></i> Scamming';\n break;\n case \"Fake ICO\":\n var category = '<i class=\"dollar icon\"></i> Fake ICO';\n break;\n default:\n var category = scams[key]['category'];\n }\n } else {\n var category = '<i class=\"remove icon\"></i> None';\n }\n if ('subcategory' in scams[key]) {\n if (scams[key]['subcategory'].toLowerCase() == \"wallets\") {\n var subcategory = '<i class=\"credit card alternative icon\"></i> ' + scams[key]['subcategory'];\n } else if (fs.existsSync(\"_static/img/\" + scams[key]['subcategory'].toLowerCase().replace(/\\s/g, '') + \".png\")) {\n var subcategory = \"<img src='/img/\" + scams[key]['subcategory'].toLowerCase().replace(/\\s/g, '') + \".png' class='subcategoryicon'> \" + scams[key]['subcategory'];\n } else {\n console.log(\"Warning: No subcategory icon was found for \" + scams[key]['subcategory']);\n var subcategory = scams[key]['subcategory'];\n }\n } else {\n var subcategory = '<i class=\"remove icon\"></i> None';\n }\n if (key % 100 === 0) {\n pages[Math.floor(key / 100)] = \"\";\n }\n pages[Math.floor(key / 100)] += \"<tr><td>\" + category + \"</td><td>\" + subcategory + \"</td><td class='\" + status.toLowerCase() + \"'>\" + color_status + \"</td><td>\" + scams[key]['name'] + \"</td><td class='center'><a href='/scam/\" + scams[key]['id'] + \"'><i class='search icon'></i></a></td></tr>\";\n if (total_2 == scams.length) {\n let all_pages = \"\";\n pages.forEach(function(page, index) {\n all_pages += page;\n });\n layout = template_1.replace(/{{ scams.total }}/ig, scams.length);\n layout = layout.replace(/{{ scams.table }}/ig, all_pages);\n layout = layout.replace(/{{ scams.pagination }}/ig, \"\");\n layout = layout.replace(/{{ scams.active }}/ig, active);\n layout = layout.replace(/{{ addresses.total }}/ig, Object.keys(addresses).length);\n layout = layout.replace(/{{ scams.inactive }}/ig, inactive);\n if (!fs.existsSync(\"./_site/scams/all/\")) {\n fs.mkdirSync(\"./_site/scams/all/\");\n }\n fs.writeFile(\"./_site/scams/all/index.html\", layout, function(err) {\n if (err) {\n return console.log(err);\n }\n });\n pages.forEach(function(page, index) {\n var pagination = \"<div class='ui pagination menu'>\";\n if (index == 0) {\n var loop = [1, 6];\n } else if (index == 1) {\n var loop = [0, 5];\n } else {\n var loop = [-1, 4];\n }\n for (var i = loop[0]; i < loop[1]; i++) {\n var item_class = \"item\";\n var href = \"/scams/\" + (index + i) + \"/\";\n if ((index + i) > pages.length || (index + i) < 1) {\n item_class = \"disabled item\";\n href = \"#\";\n } else if (i == 1) {\n item_class = \"active item\";\n }\n pagination += \"<a href='\" + href + \"' class='\" + item_class + \"'>\" + (index + i) + \"</a>\";\n }\n pagination += \"</div>\";\n if (index == 0) {\n layout = template_1.replace(/{{ scams.total }}/ig, scams.length);\n layout = layout.replace(/{{ scams.table }}/ig, page);\n layout = layout.replace(/{{ scams.pagination }}/ig, pagination);\n layout = layout.replace(/{{ scams.active }}/ig, active);\n layout = layout.replace(/{{ addresses.total }}/ig, Object.keys(addresses).length);\n layout = layout.replace(/{{ scams.inactive }}/ig, inactive);\n fs.writeFile(\"./_site/scams/index.html\", layout, function(err) {\n if (err) {\n return console.log(err);\n }\n });\n }\n layout = template_2.replace(/{{ scams.table }}/ig, page);\n layout = layout.replace(/{{ scams.pagination }}/ig, pagination);\n if (!fs.existsSync(\"./_site/scams/\" + (index + 1) + \"/\")) {\n fs.mkdirSync(\"./_site/scams/\" + (index + 1) + \"/\");\n }\n if (minify) {\n layout = htmlmin(layout);\n }\n fs.writeFile(\"./_site/scams/\" + (index + 1) + \"/index.html\", layout, function(err) {\n if (err) {\n return console.log(err);\n }\n });\n });\n }\n }\n });\n });\n });\n });\n}", "function getReports() {\n const endpoint = BASE_URL + \"/report/readAll\";\n return fetch(endpoint).then((res) => res.json());\n}", "function renderReportTypes(reportTypes) {\n reportTypes.forEach(function (item) {\n $('#ddlCirType').append($('<option>', {\n value: item.ComponentInspectionReportTypeID,\n text: item.text\n }));\n });\n }", "function initReportFormats(reportFormats) {\n const formats = getValidFormatsFromInput(reportFormats);\n if (formats.length === 0) {\n throw new Error('No valid report formats selected!');\n }\n ensureJsonReportAtBeginning(formats);\n return formats;\n}", "function getDataAndPopulateReport(reportQuery){\n \n db.getRecords( reportQuery, function(tx, results){\n console.log('GET RECS', results);\n var data = [];\n\n for(var i=0; i<results.rows.length; i++){\n data.push( results.rows.item(i) );\n }\n \n // update report with queried data\n updateSpecificReport(reportQuery.type, data);\n } );\n\n}", "function launchReport(script) {\n Launch(script, 'Report', 800, 550);\n}", "function trapExcelReportGeneration(){\n\ttrapReportCreating('excelReport');\n}", "removeReport(report) {\n while (_reports.findIndex((r) => r.id == report.id) != -1) {\n let index = _reports.findIndex((r) => r.id == report.id);\n _reports.splice(index, 1);\n this.setReports(_reports);\n }\n }", "function createReport(userID, data) {\n //console.log('in createRport')\n let Rows = []\n data.map(item => {\n item.events.map(e => {\n Rows.push({\n fechaHora: addHours(e.created, -5),\n estado: e.inputs.digital[0].value,\n lat: e.location.latitude.toFixed(6),\n lon: e.location.longitude.toFixed(6),\n velocidad: Math.round(parseFloat(e.location.speed)),\n odometro: (e.counters[0].value / 1000).toFixed(3),\n direccion: e.location.address,\n geozona: e.location.areas[0] ? e.location.areas[0].name : ' ',\n conductor: e.person,\n placa: e.vehicle,\n })\n\n })\n\n })\n const rowsTotal = Rows.length\n console.log('Documentos Consultados: ', rowsTotal)\n // console.log('Rows : ', Rows)\n let RowsReport = []\n if (rowsTotal > 0) {\n Rows.map((row, index, rowArray) => {\n\n if (index > 0 && row.placa != rowArray[index - 1].placa) {\n const dateTime4 = getDateAndTime(row.fechaHora)\n const date4 = dateTime4.date\n const time4 = dateTime4.time\n RowsReport.push({\n //fechaHora: row.fechaHora,\n fecha: date4,\n hora: time4,\n estado: row.estado ? 'En movimiento' : 'Detenido',\n lat: row.lat,\n lon: row.lon,\n velocidad: row.velocidad,\n odometro: row.odometro,\n direccion: row.direccion,\n geozona: row.geozona,\n conductor: row.conductor,\n placa: row.placa\n })\n } else {\n if (index > 0 && index <= (rowsTotal - 1)) {\n const diffMinutes = getMinutesDiff(row.fechaHora, rowArray[index - 1].fechaHora)\n if (diffMinutes > 1) {\n const beforeRow = rowArray[index - 1]\n for (let i = 1; i < diffMinutes; i++) {\n const dateTime0 = getDateAndTime(addMinutes(beforeRow.fechaHora, i))\n const date0 = dateTime0.date\n const time0 = dateTime0.time\n RowsReport.push({\n //fechaHora: addMinutes(beforeRow.fechaHora, i),\n fecha: date0,\n hora: time0,\n estado: beforeRow.estado ? 'En movimiento' : 'Detenido',\n lat: beforeRow.lat,\n lon: beforeRow.lon,\n velocidad: beforeRow.velocidad,\n odometro: beforeRow.odometro,\n direccion: beforeRow.direccion,\n geozona: beforeRow.geozona,\n conductor: beforeRow.conductor,\n placa: beforeRow.placa\n })\n }\n const dateTime1 = getDateAndTime(row.fechaHora)\n const date1 = dateTime1.date\n const time1 = dateTime1.time\n RowsReport.push({\n // fechaHora: row.fechaHora,\n fecha: date1,\n hora: time1,\n estado: row.estado ? 'En movimiento' : 'Detenido',\n lat: row.lat,\n lon: row.lon,\n velocidad: row.velocidad,\n odometro: row.odometro,\n direccion: row.direccion,\n geozona: row.geozona,\n conductor: row.conductor,\n placa: row.placa\n })\n } else {\n const dateTime2 = getDateAndTime(row.fechaHora)\n const date2 = dateTime2.date\n const time2 = dateTime2.time\n RowsReport.push({\n // fechaHora: row.fechaHora,\n fecha: date2,\n hora: time2,\n estado: row.estado ? 'En movimiento' : 'Detenido',\n lat: row.lat,\n lon: row.lon,\n velocidad: row.velocidad,\n odometro: row.odometro,\n direccion: row.direccion,\n geozona: row.geozona,\n conductor: row.conductor,\n placa: row.placa\n })\n }\n } else {\n const dateTime3 = getDateAndTime(row.fechaHora)\n const date3 = dateTime3.date\n const time3 = dateTime3.time\n RowsReport.push({\n //fechaHora: row.fechaHora,\n fecha: date3,\n hora: time3,\n estado: row.estado ? 'En movimiento' : 'Detenido',\n lat: row.lat,\n lon: row.lon,\n velocidad: row.velocidad,\n odometro: row.odometro,\n direccion: row.direccion,\n geozona: row.geozona,\n conductor: row.conductor,\n placa: row.placa\n })\n }\n }\n\n })\n // console.log('RowsReport: ',RowsReport)\n stNTPCCY.emit('Rows', userID, RowsReport)\n console.log('Documentos Creados: ', RowsReport.length)\n } else {\n stNTPCCY.emit('NoData', userID, 0)\n console.log('No hay data')\n }\n\n\n}", "function multiDayReport(flower) {\n //var e = new Date(2014, 07, 01);\n var f = new Date(2014, 07, 07);\n //var start = e.getDate();\n var end = f.getDate();\n\n\n for (start = 01; start <= end; start++) {\n getReport(flower, start, function() {\n var j = stored_values.firstBloom;\n var k = parseInt(j);\n stored_values.day = k;\n if (k = undefined || k == 0) {\n $(n).prepend(\"<div class='well well-sm info'><p>'sup'</p></div>\");\n $(n).closest(\".caption\").find(\".well\").text(\"No blooms during this time.\");\n } else {\n var l = new Date(stored_values.day);\n var firstBloom = l.customFormat(\"#DDD# #h#:#mm# #ampm#\");\n console.log(firstBloom);\n var n = stored_values.bloomRange;\n var o = parseInt(n);\n var p = new Date(o);\n var bloomRange = p.customFormat(\"#mm#:#ss#\");\n console.log(bloomRange);\n var n = '#' + flower + 'Drop';\n var q = \"id='\" + flower + \"-well-\" + start + \"' \";\n var r = \"#\" + flower + \"-well-\" + start;\n $(n).prepend(\"<div class='well well-sm info \" + flower +\"-well' \" + q + \"<p align='center'>sup</p></div>\");\n $(r).text(\"Season Start: \" + firstBloom + \", Length: \" + bloomRange);\n $(\".well\").css(\"background-color\", \"#96A3CE\").css(\"color\", \"#fff\");\n };\n });\n };\n}", "function init() {\n\tvar currentDesigner = 0;\n\tvar html = \"\";\n\tvar skip = false;\n\tvar overrideCounter;\n\n\t// Loop through each week\n\tfor (var a = 0; a < numOfWeeks; a++) {\n\n\t\tif(isInThePast(getFriendlyDate(startDate))==true || thisIsASkipWeek(getFriendlyDate(startDate), skipWeeks)==true){\n\t\t\thtml += '<div class=\\\"card xs-p2 in-the-past\\\"><h2 class=\\\"xs-text-4 bold\\\">'+getFriendlyDate(startDate)+'</h2><ul>';\n\t\t} else {\n\t\t\thtml += '<div class=\\\"card xs-p2\\\"><h2 class=\\\"xs-text-4 bold\\\">'+getFriendlyDate(startDate)+'</h2><ul>';\n\t\t}\n\n\t\t// If this is a skip week don't add designers\n\t\tif(thisIsASkipWeek(getFriendlyDate(startDate), skipWeeks) == false) {\n\n\t\t\t// reset override;\n\t\t\toverrideCounter = 0;\n\t\t\toverrideCounter += howManyDesignersOverridden(getFriendlyDate(startDate), override);\n\n\t\t\t// add all overrides for this week\n\t\t\tif(overrideCounter > 0){\n\t\t\t\tfor (var j = 0; j < override.length; j++) {\n\t\t\t\t\tif(override[j][0]==getFriendlyDate(startDate)){\n\t\t\t\t\t\thtml += '<li>' + override[j][1] + '</li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Loop through each remaining designer slot\n\t\t\tfor (var i = 0; i < (count-overrideCounter); i++) {\n\n\t\t\t\t// if Designer has been removed from this week's crit, skip them\n\t\t\t\tif(thisDesignerCanPresent(getFriendlyDate(startDate),override,designers[currentDesigner])==true){\n\t\t\t\t\thtml += '<li>' + designers[currentDesigner] + '</li>';\n\t\t\t\t} else {\n\t\t\t\t\ti--;\n\t\t\t\t}\n\n\t\t\t\tif(currentDesigner+1<designers.length) {\n\t\t\t\t currentDesigner++;\n\t\t\t\t} else {\n\t\t\t\t currentDesigner = 0;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\t\t\thtml += '<li class=\\\"skip-week\\\">Skip this week :(</li>';\n\t\t}\n\n\t\thtml += '</ul></div>';\n\t\taddWeek(startDate);\n\t}\n\n\t// output full list\n\td = document.getElementById(\"results\");\n\td.innerHTML = html;\n}", "function refreshReports(){\r\n reportLog = fsReports.readFileSync(\"./Dictionary/Report_Log.json\",\"UTF-8\");\r\n JsonArrayReports = JSON.parse(reportLog);\r\n}", "async function runAll (suites) {\n const allResults = []\n for (const suite of suites) {\n allResults.push(await runSuite(suite))\n }\n displayAllResults(allResults)\n}", "function combineData(data){\n\n // if data has name field (issues api data does not), add as main data array object\n if (data.name){\n if (data.name == 'angular.js'){\n allData[0] = data;\n } else if ( data.name == 'react'){\n allData[1] = data;\n } else if ( data.name == 'ember.js'){\n allData[2] = data;\n } else if ( data.name == 'vue'){\n allData[3] = data;\n }\n }\n // IF DATA IS AN ARRAY THAT MEANS IT IS FROM THE ISSUES API\n // so add it accordingly onto the existing main data\n else if ( Array.isArray(data) ){\n console.log('hello, ready to add issues data...');\n console.log(data[0].number); // 15122\n\n // EACH CONDITIONAL ADDS NEW DATA TO ALLDATA\n if (data[0].repository_url == angularURL){\n allData[0].total_issues = data[0].number;\n } else if (data[0].repository_url == reactURL){\n allData[1].total_issues = data[0].number;\n console.log('allData 1 issues:' + allData[1].total_issues);\n } else if (data[0].repository_url == emberURL){\n allData[2].total_issues = data[0].number;\n console.log('allData 2 issues:' + allData[2].total_issues);\n } else if (data[0].repository_url == vueURL){\n allData[3].total_issues = data[0].number;\n console.log('allData 3 issues:' + allData[3].total_issues);\n }\n\n // CALL HELPER TO RUN CALCULATIONS AND ADD NEW PROPERTIES TO ALLDATA\n calculateClosedPercentage(allData);\n }\n\n console.log('here is allData, should have issues_closed_percentage:');\n console.log(allData);\n\n}", "function twcheese_BattleReportsFolderEnhancer(gameDoc)\n\t{\n\t\t/**\n\t\t *\tadd distance to the reports table\n\t\t */\n\t\tthis.includeDistances = function()\n\t\t{\n\t\t\tvar distanceHeader = document.createElement('th');\n\t\t\tdistanceHeader.innerHTML = '<b>Distance</b>';\n\t\t\treportsTable.rows[0].insertBefore(distanceHeader,reportsTable.rows[0].getElementsByTagName('th')[0]);\n\t\t\tfor(var i=1; i < reportsTable.rows.length - 1; i++)\n\t\t\t{\n\t\t\t\tvar distanceCell = reportsTable.rows[i].insertCell(0);\n\t\t\t\tdistanceCell.innerHTML = reports[i-1].defenderDistance;\n\t\t\t}\n\t\t\tvar spacer = document.createElement('th');\n\t\t\treportsTable.rows[reportsTable.rows.length - 1].insertBefore(spacer,reportsTable.rows[reportsTable.rows.length-1].getElementsByTagName('th')[0]);\n\t\t};\n\t\n\t\t/**\n\t\t *\tadd links to 'attack again with same troops' from the current village\n\t\t */\n\t\tthis.includeRepeatCurrentLinks = function()\n\t\t{\n\t\t\tvar repeatCurrentHeader = document.createElement('th');\n\t\t\trepeatCurrentHeader.innerHTML = '<b>Repeat</b>';\n\t\t\treportsTable.rows[0].insertBefore(repeatCurrentHeader,reportsTable.rows[0].getElementsByTagName('th')[0]);\n\t\t\tfor(var i=1; i < reportsTable.rows.length - 1; i++)\n\t\t\t{\n\t\t\t\tvar repeatCell = reportsTable.rows[i].insertCell(0);\n\t\t\t\trepeatCell.innerHTML = '<a href=\"' + game_data.link_base_pure + 'place&try=confirm&type=same&report_id=' +reports[i-1].reportID+ '\" ><img src = \"'+ imagePaths['repeatFromCurrent'] +'\" title=\"attack from your current village, with the same troops\" alt=\"current\"/></a>'\n\t\t\t}\n\t\t\tvar spacer = document.createElement('th');\n\t\t\treportsTable.rows[reportsTable.rows.length - 1].insertBefore(spacer,reportsTable.rows[reportsTable.rows.length-1].getElementsByTagName('th')[0]);\n\t\t};\n\t\t\n\t\t/**\n\t\t *\tadd links to 'attack again with same troops' from the original village\n\t\t */\n\t\tthis.includeRepeatOriginalLinks = function()\n\t\t{\n\t\t\tfor(var i=1; i < reportsTable.rows.length - 1; i++)\n\t\t\t{\n\t\t\t\tif(reports[i-1].attackerVillage)\n\t\t\t\t{\n\t\t\t\t\tif(reports[i-1].attackerVillage.length == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar repeatCell = reportsTable.rows[i].cells[0];\n\t\t\t\t\t\tvar babySit = '';\n\t\t\t\t\t\tif(game_data.link_base_pure.search('&t=') != -1)\n\t\t\t\t\t\t\tbabySit = game_data.link_base_pure.substring(game_data.link_base_pure.indexOf('&t='));\n\t\t\t\t\t\trepeatCell.innerHTML += ' | <a href=\"http://' + document.domain + '/game.php?village='+ reports[i-1].attackerVillage[2] + babySit +'&screen=place&try=confirm&type=same&report_id=' +reports[i-1].reportID+ '\" ><img src = \"'+ imagePaths['repeatFromOriginal'] +'\" title=\"attack from the original village, with the same troops\" alt=\"current\"/></a>'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t/**\n\t\t *\tmark checkboxes for reports with partial hauls\n\t\t */\n\t\tthis.markPartialHauls = function()\n\t\t{\n\t\t\tfor(var i=0; i < partialHauls.length; i++)\n\t\t\t\tgameDoc.getElementsByName('id_' + partialHauls[i])[0].checked = true;\n\t\t};\n\t\t \n\t\t/**\n\t\t *\t@param\tlink:HTMLAnchor\ta link to a report\n\t\t *\t@return\treportId:Number the reportId of the linked report\n\t\t */\n\t\tthis.scrapeReportId = function(link)\n\t\t{\n\t\t\tvar address = link.href;\n\t\t\treturn address.substring(address.indexOf('&view=') + 6);\n\t\t}\n\t\t \n\t\t/*==== find reports table ====*/\n\t\tvar reportsTable = gameDoc.getElementById('content_value').getElementsByTagName('table')[3];\n\t\t\n\t\t/*==== scrape report information ====*/\n\t\tvar reports = new Array();\n\t\tvar partialHauls = new Array();\n\t\tvar home = game_data.village.coord.split('|');\n\n\t\tfor(var i=1; i < reportsTable.rows.length-1; i++)\n\t\t{\n\t\t\tvar report = twcheese_interpretReportName(reportsTable.rows[i].cells[0].getElementsByTagName('a')[0].getElementsByTagName('span')[0].innerHTML);\n\t\t\treport.reportID = this.scrapeReportId(reportsTable.rows[i].cells[0].getElementsByTagName('a')[0])\n\t\t\t\n\t\t\tif(report.defenderVillage)\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treport.defenderDistance = twcheese_calculateDistance(home,report.defenderVillage);\n\t\t\t\t}\n\t\t\t\tcatch(err)\n\t\t\t\t{\n\t\t\t\t\talert(err);\n\t\t\t\t\treport.defenderDistance = '?';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\telse\n\t\t\t\treport.defenderDistance = '?';\n\t\t\t\n\t\t\treports.push(report);\n\t\t\tif(reportsTable.rows[i].getElementsByTagName('img')[1].src.search('max_loot/0.png') != -1) /* haul is partial */\n\t\t\t\tpartialHauls.push(report.reportID);\n\t\t}\n\t}", "function expand_and_populate(data)\n{\n\tif (!is_populated) {\n\t\tsetTimeout(function() {expand_and_populate(data);}, 1000);\n\t\treturn;\n\t}\n\tvar reportObj = data;\n\tvar field_obj = new field_maps();\n\tvar tmp_fields = new field_maps3();\n\tvar field_str = reportObj['report_type'];\n\tif (reportObj[field_obj.map[field_str]]) {\n\t\tvar to_id = field_obj.map[field_str];\n\t\tvar from_id = tmp_fields.map[field_str];\n\t\t// select report objects\n\t\tfor (prop in reportObj[field_obj.map[field_str]]) {\n\t\t\t$('#' + from_id).selectOptions(reportObj[field_obj.map[field_str]][prop]);\n\t\t}\n\t\t// move selected options from left -> right\n\t\tmoveAndSort(from_id, to_id);\n\t}\n\n\t// wait for lists to populate\n\tsetTimeout(\"remove_duplicates();\", 500);\n}", "_parseDailySummary(body) {\n const sentences = this._extractPdfSentences(body);\n // console.log(sentences);\n\n // Regex the items we want from the sentences.\n const stateDataREs = {\n cases: /were (\\d+) cases/,\n deaths: /with (\\d+) deaths/,\n hospitalized: /been (\\d+) of .* cases that have been hospitalized/,\n testedNeg: /(\\d+) negative tests/\n };\n\n const rawStateData = Object.keys(stateDataREs).reduce((hsh, key) => {\n const re = stateDataREs[key];\n const text = sentences.filter(s => {\n return re.test(s);\n });\n if (text.length === 0) console.log(`No match for ${key} re ${re}`);\n if (text.length > 1) console.log(`Ambiguous match for ${key} re ${re} (${text.join(';')})`);\n const m = text[0].match(re);\n\n return {\n ...hsh,\n [key]: parse.number(m[1])\n };\n }, {});\n\n rawStateData.tested = rawStateData.cases + rawStateData.testedNeg;\n delete rawStateData.testedNeg;\n\n const data = [];\n\n const countyRE = /^(.*) County (\\d+)$/;\n const countyData = sentences.filter(s => {\n return countyRE.test(s);\n });\n countyData.forEach(lin => {\n const cm = lin.trim().match(countyRE);\n // console.log(cm);\n const rawName = `${cm[1]} County`;\n const countyName = geography.addCounty(rawName);\n const cases = cm[2];\n if (this._counties.includes(countyName)) {\n data.push({\n county: countyName,\n cases: parse.number(cases)\n });\n }\n });\n\n const summedData = transform.sumData(data);\n data.push(summedData);\n\n data.push({ ...rawStateData, aggregate: 'county' });\n\n const result = geography.addEmptyRegions(data, this._counties, 'county');\n // no sum because we explicitly add it above\n\n return result;\n }", "function getSingleReportDisplay(standupReport) {\n var report = \"*\" + standupReport.userName + \"* did their standup at \" + standupReport.datetime + \"\\n\";\n report += \"_What did you work on yesterday:_ `\" + standupReport.yesterdayQuestion + \"`\\n\";\n report += \"_What are you working on today:_ `\" + standupReport.todayQuestion + \"`\\n\";\n report += \"_Any obstacles:_ `\" + standupReport.obstacleQuestion + \"`\\n\\n\";\n return report;\n}", "mergeQueryResults(entities, collection, mergeStrategy) {\n return this.mergeServerUpserts(entities, collection, MergeStrategy.PreserveChanges, mergeStrategy);\n }", "function getPacks(page = 1, then_reports = false) {\n if(window.datasLoaderLocked)\n return false;\n\n window.datasLoaderLocked = true;\n\n $('#documentslist .packsList .content').html('');\n $(\"#documentslist .packsList h3\").text(\"... lot(s)\");\n if(then_reports)\n {\n $('#documentslist .reportsList .content').html('');\n $(\"#documentslist .reportsList h3\").text(\"... lot(s)\");\n }\n\n var filter = ''\n if(window.currentTargetFilter == 'all')\n {\n filter = window.getParamsFromFilter();\n window.setParamsFilterText();\n }\n setTimeout(function(e){\n var view = $(\"select[name=document_owner_list]\").val();\n var per_page = $(\"select[name=per_page]\").val();\n\n if (view == 'current_delivery') {\n $('a.delivery').hide();\n } else {\n $('a.delivery').show();\n }\n\n $(\"#panel1 .header h3\").text('Pieces');\n $(\"#panel1 > .content\").html(\"\");\n\n $(\"#presPanel1 .header h3\").text('Ecritures comptables')\n $(\"#presPanel1 > .content\").html(\"\")\n\n var Url = \"/account/documents/packs?page=\"+page+\"&view=\"+view+\"&per_page=\"+per_page+'&'+filter;\n window.currentLink = null;\n\n $.ajax({\n url: encodeURI(Url),\n data: \"\",\n dataType: \"html\",\n type: \"GET\",\n beforeSend: function() {\n logBeforeAction(\"Traitement en cours\");\n },\n success: function(data) {\n logAfterAction();\n var list = $(\"#documentslist .packsList .content\");\n list.children(\"*\").remove();\n list.append(data);\n\n packs_count = $(\"input[name=packs_count]\").val();\n\n $(\"#documentslist .packsList h3\").text(packs_count + \" lot(s)\");\n\n $(\"#pageslist #panel1\").attr(\"style\",\"min-height:\"+$(\"#documentslist\").height()+\"px\");\n $(\"#preseizuresList #presPanel1\").attr(\"style\",\"min-height:\"+$(\"#documentslist\").height()+\"px\");\n\n initEventOnPackOrReportRefresh();\n window.initEventOnHoverOnInformation();\n\n setTimeout(function(){\n window.datasLoaderLocked = false;\n if(then_reports)\n getReports();\n }, 1000);\n },\n error: function(data){\n logAfterAction();\n $(\".alerts\").html(\"<div class='row-fluid'><div class='span12 alert alert-danger'><a class='close' data-dismiss='alert'> × </a><span> Une erreur est survenue et l'administrateur a été prévenu.</span></div></div>\");\n setTimeout(function(){\n window.datasLoaderLocked = false;\n if(thenReports)\n getReports();\n }, 1000);\n }\n });\n }, 500);\n }", "function populateScouts() {\n let stand_keys = Object.keys(stand_data);\n for (let team_id in stand_keys) {\n let team = stand_keys[team_id];\n for (let data_id in stand_data[team]) {\n let data_point = stand_data[team][data_id];\n let scout_id = data_point[\"Stand\"][\"Login\"];\n // is the scout actually real?\n if (scout_id !== undefined && scouts[scout_id] !== undefined) {\n // class already exists\n if ($(\".matches-\" + scout_id)[0]) {\n let current_total = parseInt($(\".matches-\" + scout_id).text());\n current_total += 1;\n $(\".matches-\" + scout_id).text(current_total);\n // class doesn't exist\n } else {\n addScoutToTable(scouts[scout_id], scout_id);\n }\n }\n }\n }\n}", "function getReports(page = 1){\n if(window.datasLoaderLocked)\n return false;\n\n window.datasLoaderLocked = true;\n $('#documentslist .reportsList .content').html('');\n $(\"#documentslist .reportsList h3\").text(\"... lot(s)\");\n\n var filter = ''\n if(window.currentTargetFilter == 'all')\n {\n filter = window.getParamsFromFilter();\n window.setParamsFilterText();\n }\n\n var view = $(\"select[name=document_owner_list]\").val();\n var per_page = $(\"select[name=per_page]\").val();\n\n $(\"#panel1 .header h3\").text('Pieces');\n $(\"#panel1 > .content\").html(\"\");\n\n $(\"#presPanel1 .header h3\").text('Ecritures comptables');\n $(\"#presPanel1 > .content\").html(\"\")\n\n var Url = \"/account/documents/reports?page=\"+page+\"&view=\"+view+\"&per_page=\"+per_page+'&'+filter;\n window.currentLink = null;\n\n $.ajax({\n url: encodeURI(Url),\n data: \"\",\n dataType: \"html\",\n type: \"GET\",\n beforeSend: function() {\n logBeforeAction(\"Traitement en cours\");\n },\n success: function(data) {\n logAfterAction();\n var list = $(\"#documentslist .reportsList .content\");\n list.children(\"*\").remove();\n list.append(data);\n\n reports_count = $(\"input[name=reports_count]\").val();\n \n $(\"#documentslist .reportsList h3\").text(reports_count + \" lot(s)\");\n\n $(\"#pageslist #panel1\").attr(\"style\",\"min-height:\"+$(\"#documentslist\").height()+\"px\");\n $(\"#preseizuresList #presPanel1\").attr(\"style\",\"min-height:\"+$(\"#documentslist\").height()+\"px\");\n\n initEventOnPackOrReportRefresh();\n window.initEventOnHoverOnInformation();\n\n setTimeout(function(){ window.datasLoaderLocked = false; }, 1000);\n },\n error: function(data){\n logAfterAction();\n $(\".alerts\").html(\"<div class='row-fluid'><div class='span12 alert alert-danger'><a class='close' data-dismiss='alert'> × </a><span> Une erreur est survenue et l'administrateur a été prévenu.</span></div></div>\");\n setTimeout(function(){ window.datasLoaderLocked = false; }, 1000);\n }\n });\n }", "function renderAllDailySales(){\n\n removeStoreSales();\n\n for (var index = 0; index < allStores.length; index++){\n allStores[index].render(tableElem);\n }\n}", "function generateAllCvtHTML(data) {\n \n var list = $('.cvt-report .cvt-list');\n var templateScript = $('#cvt-template').html();\n\n // compile template\n var template = Handlebars.compile(templateScript);\n list.append(template(data));\n }", "combPages(array) {\n var array = this.getCombArray();\n this.pages.forEach((page) => {\n // console.log('combing page: ', page.url);\n page.combResources(array);\n });\n }", "async function main() {\n let _arroPagesForThisSeason = [];\n let arrResultPages = [];\n let arrSettledResultPages = [];\n let arrFlatSettledPages = [];\n let sCsvTables;\n let i;\n let sCsv;\n\n browser = await puppeteer.launch();\n\n if (!fs.existsSync(sResultDir)) {\n fs.mkdirSync(sResultDir);\n }\n\n fSetWriters();\n\n // each season has multiple result pages\n // get an array of result pages per season\n // then concat and get all result pages\n for (i = iFirstSeason; i < (iLastSeason + 1); i++) {\n _arroPagesForThisSeason = fparrGetResultPagesBySeason(sRootUrl, i);\n arrResultPages = arrResultPages.concat(_arroPagesForThisSeason);\n }\n\n arrSettledResultPages = await utils.settleAll(arrResultPages);\n arrFlatSettledPages = utils.flatten(arrSettledResultPages);\n\n // TODO: I think you can do this inside settleAll,\n // but playing it safe and serial for now\n sCsvTables = arrFlatSettledPages.reduce(function(acc, oPageData){\n return acc + EOL + tableToCsv(oPageData.sTableParentHtml);\n }, '');\n\n fParseTxt(sCsvTables);\n}", "function processRestoreCumulativeView() \n{ \n\n\tif (currentPage == \"Campus\"){generateSummaryfromEntireDateSelection();}\n\telse{generateZoneSummaryfromEntireDateSelection();}\n\t\n}", "function clearSearch(){\n for(var i=0;i<reporter_path.length;i++){\n reporter_path[i].setMap(null);\n }\n for(var i=0;i<reporter_record.length;i++){\n reporter_record[i].setMap(null);\n }\n reporter_path=[];\n reporter_record=[];\n}", "async generateReportLoop() {\n while ( true ) { // eslint-disable-line no-constant-condition\n try {\n winston.info( 'Generating Report' );\n const testNameMap = {};\n this.snapshots.forEach( snapshot => snapshot.tests.forEach( test => {\n testNameMap[ test.nameString ] = test.names;\n } ) );\n const testNameStrings = _.sortBy( Object.keys( testNameMap ) );\n const testNames = testNameStrings.map( nameString => testNameMap[ nameString ] );\n\n const elapsedTimes = testNames.map( () => 0 );\n const numElapsedTimes = testNames.map( () => 0 );\n\n const snapshotSummaries = [];\n for ( const snapshot of this.snapshots.slice( 0, MAX_SNAPSHOTS ) ) {\n snapshotSummaries.push( {\n timestamp: snapshot.timestamp,\n shas: snapshot.shas,\n tests: testNames.map( ( names, i ) => {\n const test = snapshot.findTest( names );\n if ( test ) {\n const passedTestResults = test.results.filter( testResult => testResult.passed );\n const failedTestResults = test.results.filter( testResult => !testResult.passed );\n const failMessages = _.uniq( failedTestResults.map( testResult => testResult.message ).filter( _.identity ) );\n test.results.forEach( testResult => {\n if ( testResult.milliseconds ) {\n elapsedTimes[ i ] += testResult.milliseconds;\n numElapsedTimes[ i ]++;\n }\n } );\n\n const result = {\n y: passedTestResults.length,\n n: failedTestResults.length\n };\n if ( failMessages.length ) {\n result.m = failMessages;\n }\n return result;\n }\n else {\n return {};\n }\n } )\n } );\n await sleep( 0 ); // allow other async stuff to happen\n }\n\n const testAverageTimes = elapsedTimes.map( ( time, i ) => {\n if ( time === 0 ) {\n return time;\n }\n else {\n return time / numElapsedTimes[ i ];\n }\n } );\n const testWeights = [];\n for ( const names of testNames ) {\n const test = this.snapshots[ 0 ] && this.snapshots[ 0 ].findTest( names );\n if ( test ) {\n testWeights.push( Math.ceil( test.weight * 100 ) / 100 );\n }\n else {\n testWeights.push( 0 );\n }\n await sleep( 0 ); // allow other async stuff to happen\n }\n\n const report = {\n snapshots: snapshotSummaries,\n testNames: testNames,\n testAverageTimes: testAverageTimes,\n testWeights: testWeights\n };\n\n await sleep( 0 ); // allow other async stuff to happen\n\n this.reportJSON = JSON.stringify( report );\n }\n catch( e ) {\n this.setError( `report error: ${e}` );\n }\n\n await sleep( 5000 );\n }\n }", "function getReportData() {\n if($scope.selectedInst.startDate !== \"\"){\n reqData = {\n startDate: $scope.selectedInst.startDate,\n instType: $scope.selectedInst.instType\n };\n DashboardService.getReport(reqData)\n .success(function (response) {\n model.config = response.config;\n model.startDate = response.startDate;\n model.endDate = response.endDate;\n var jsonArr = response.reportData;\n model.failureRate =response.overallFR;\n model.stableFailureRate = response.stableFR;\n model.unstableFailureRate = response.unstableFR;\n for(i in jsonArr){\n jsonArr[i][\"errorDate\"] = new Date(jsonArr[i][\"errorDate\"]);\n jsonArr[i][\"lastReboot\"] = new Date(jsonArr[i][\"lastReboot\"]);\n }\n $scope.tableData = jsonArr;\n });\n }\n else{\n getDataFromInstrument();\n }\n }", "harvestAll() {\n this.plotList.forEach((plot, index) => {\n this.harvest(index);\n });\n }", "async start() {\n // Clear out existing screenshots (one by one)\n try {\n let files = fs.readdirSync(SMASHTEST_SS_DIR);\n for(let file of files) {\n let match = file.match(/[^\\_]+/);\n let hash = match ? match[0] : null;\n // If we're doing --skip-passed, delete a screenshot only if the branch didn't pass last time\n if(!this.runner.skipPassed || !this.tree.branches.find(branch => branch.hash == hash && branch.passedLastTime)) {\n fs.unlinkSync(path.join(SMASHTEST_SS_DIR, file));\n }\n }\n }\n catch(e) {\n if(!e.message.includes(`no such file or directory, scandir`)) { // not finding the dir is ok\n throw e;\n }\n }\n\n // Load template\n let buffers = await readFiles([path.join(path.dirname(require.main.filename), `report-template.html`)] , {encoding: 'utf8'});\n if(!buffers || !buffers[0]) {\n utils.error(`report-template.html not found`);\n }\n this.reportTemplate = buffers[0];\n\n // Start server\n if(this.isReportServer) {\n await this.startServer();\n }\n\n // Kick off write functions\n await this.writeFull();\n if(this.isReportServer) {\n await this.writeSnapshot();\n }\n }", "function cleanReport() {\n\n // delete actual report contents and put on a loading gif\n $('#map-div').hide();\n $('#report-div').empty().hide();\n $('.nvtooltip').remove();\n svg.selectAll('*').remove();\n svg.style('display', 'none');\n\n // TODO: loading gif, a nice one\n}", "function applyLayouts(pages, layouts) {\n const layoutLookup = _.keyBy(layouts, `id`)\n return pages.map(page => {\n const pageLayout = layoutLookup[page.layout]\n return {\n ...page,\n layoutComponentChunkName: pageLayout && pageLayout.componentChunkName,\n }\n })\n}", "function createReports() {\r\n var RawDataReport = AdWordsApp.report(\"SELECT Domain, Clicks \" + \"FROM AUTOMATIC_PLACEMENTS_PERFORMANCE_REPORT \" + \"WHERE Clicks > 0 \" + \"AND Conversions < 1 \" + \"DURING LAST_7_DAYS\");\r\n RawDataReport.exportToSheet(RawDataReportSheet);\r\n}", "function getReport(){\n\n }", "function next() {\n\t\t\t\tif (committableReports.length) {\n\t\t\t\t\tsetTimeout(process, 1000);\n\t\t\t\t}\n\t\t\t}", "layout(rendered, layout) {\n this.splitTablesRefs.forEach((ref) => {\n const renderedTable = rendered.querySelector(\"[data-ref='\" + ref + \"']\");\n if (renderedTable) {\n // this event can be triggered multiple times\n // added a flag repeated-headers to control when table headers already repeated in current page.\n if (!renderedTable.getAttribute(\"repeated-headers\")) {\n const sourceTable = this.chunker.source.querySelector(\n \"[data-ref='\" + ref + \"']\"\n );\n this.repeatColgroup(sourceTable, renderedTable);\n this.repeatTHead(sourceTable, renderedTable);\n renderedTable.setAttribute(\"repeated-headers\", true);\n }\n }\n });\n }", "function _makeReport() {\n document.getElementById(\"reportTable\").hidden = false;\n document.getElementById(\"chartContainer\").hidden = false;\n updateReportFromDB();\n}", "function mergeCollections(provider, defaultSets, customSets) {\n\t // Get list of parsed data\n\t const parsedData = [];\n\t if (defaultSets) {\n\t parsedData.push({\n\t isCustom: false,\n\t categories: defaultSets,\n\t });\n\t }\n\t if (customSets) {\n\t const customCollections = customSets.providers[provider].collections;\n\t // Unshift or push it, depending on merge order\n\t parsedData[customSets.merge === 'custom-first' ? 'unshift' : 'push']({\n\t isCustom: true,\n\t categories: customCollections,\n\t });\n\t }\n\t // Setup result as empty object\n\t const results = Object.create(null);\n\t // Store prefixes map to avoid duplicates\n\t const usedPrefixes = Object.create(null);\n\t // Parse all data\n\t parsedData.forEach((item) => {\n\t // Parse all categories\n\t const collectionsList = item.categories;\n\t Object.keys(collectionsList).forEach((category) => {\n\t const categoryItems = collectionsList[category];\n\t Object.keys(categoryItems).forEach((prefix) => {\n\t if (usedPrefixes[prefix] !== void 0) {\n\t // Prefix has already been parsed\n\t if (item.isCustom) {\n\t // Remove previous entry\n\t delete results[usedPrefixes[prefix]][prefix];\n\t }\n\t else {\n\t // Do not overwrite: always show set from API in case of duplicate entries\n\t return;\n\t }\n\t }\n\t // Add item\n\t usedPrefixes[prefix] = category;\n\t if (results[category] === void 0) {\n\t results[category] = Object.create(null);\n\t }\n\t results[category][prefix] = categoryItems[prefix];\n\t });\n\t });\n\t });\n\t return results;\n\t}", "AggregateReportByItemData(filter = {}, project1 = {}, unwind, project2 = {}, group = {}, project3 = {}, lookup = {}, unwind2, project4 = {}) {\n return new Promise((resolve, reject) => {\n this.collection.aggregate([\n {\n $match: filter\n },\n {\n $project: project1\n },\n {\n $unwind: unwind\n },\n {\n $unwind: unwind\n },\n {\n $project: project2\n },\n {\n $group: group\n },\n {\n $project: project3\n },\n {\n $lookup: lookup\n },\n {\n $unwind: unwind2\n },\n {\n $project: project4\n }\n ], (err, data) => {\n if (err) return reject({ message: err, status: 0 });\n\n return resolve(data);\n });\n });\n }", "constructor() { \n \n CreditReportSummaryReport.initialize(this);\n }" ]
[ "0.5859966", "0.5847742", "0.5773973", "0.56990427", "0.55929637", "0.5524131", "0.5523469", "0.5456793", "0.5411935", "0.540643", "0.54032606", "0.54032606", "0.53966814", "0.53822637", "0.52842146", "0.5282263", "0.5263722", "0.5193387", "0.51875335", "0.5161858", "0.5157954", "0.512913", "0.51092833", "0.5095597", "0.50884414", "0.50716746", "0.50578535", "0.50276047", "0.50087327", "0.5002024", "0.49930003", "0.49824688", "0.4973751", "0.4958983", "0.4934445", "0.49309537", "0.4904597", "0.48994106", "0.48957098", "0.48930374", "0.48918247", "0.48754856", "0.48521176", "0.4838796", "0.48289633", "0.47861964", "0.4762058", "0.47618884", "0.47598594", "0.47522083", "0.47453168", "0.47365564", "0.47354043", "0.47322822", "0.47281995", "0.4712074", "0.4705957", "0.46990812", "0.4677267", "0.46687663", "0.46682727", "0.46592253", "0.46540353", "0.4653277", "0.46502984", "0.46499676", "0.46417603", "0.46412128", "0.46312276", "0.46250883", "0.4620812", "0.46199545", "0.4619093", "0.4617927", "0.46157402", "0.46120232", "0.45969614", "0.45921618", "0.4587971", "0.45864025", "0.45862284", "0.45857972", "0.45850578", "0.45847446", "0.4582009", "0.45764217", "0.4570207", "0.45612627", "0.4560827", "0.45590767", "0.4557584", "0.4547305", "0.4545252", "0.45439106", "0.4542968", "0.45378983", "0.45368522", "0.45319888", "0.45317838", "0.45301586" ]
0.5408388
9
builds a string that displays a single user's standup report
function getSingleReportDisplay(standupReport) { var report = "*" + standupReport.userName + "* did their standup at " + standupReport.datetime + "\n"; report += "_What did you work on yesterday:_ `" + standupReport.yesterdayQuestion + "`\n"; report += "_What are you working on today:_ `" + standupReport.todayQuestion + "`\n"; report += "_Any obstacles:_ `" + standupReport.obstacleQuestion + "`\n\n"; return report; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getReportDisplay(standupReports) {\n \n if (!standupReports) {\n return \"*There is no standup data to report.*\";\n }\n\n var totalReport = \"*Standup Report*\\n\\n\";\n for (var user in standupReports) {\n var report = standupReports[user];\n totalReport += getSingleReportDisplay(report);\n }\n return totalReport;\n}", "getReport()\r\n\t{\r\n\t\tlet report = '';\r\n\r\n\t\tmembers.forEach( (member, duration) => s += member.username + '\\t\\t' + duration + ' seconds\\n' );\r\n\t\treturn report;\r\n\t}", "function formatTeamMembers (user) {\n\t if (user.loading) return 'Loading...';\n\n\t var markup = '<div>('+user.full_id+') '+user.name+'</div>';\n\n\t return markup;\n\t }", "function formatresults(){\nif (this.timesup==false){//if target date/time not yet met\nvar displaystring=\"<span style='background-color: #CFEAFE'>\"+arguments[1]+\" hours \"+arguments[2]+\" minutes \"+arguments[3]+\" seconds</span> left until launch time\"\n}\nelse{ //else if target date/time met\nvar displaystring=\"Launch time!\"\n}\nreturn displaystring\n}", "function toText(inst){\n var shownText = inst[\"value\"][\"shortName\"] + \" - \" + inst[\"value\"][\"fullName\"] + \n \"\\nTotal Launches: \"+inst[\"value\"][\"Total\"] + \n \"\\nSuccess: \"+inst[\"value\"][\"Success\"] + \n \"\\nFailure: \"+inst[\"value\"][\"Failure\"]+\n \"\\nUnknown: \"+inst[\"value\"][\"Unknown\"]+\n \"\\nPad Explosion: \"+inst[\"value\"][\"Pad Explosion\"]\n return shownText\n}", "function getAndDisplayUserReport() {\n getUserInfo(displayUserReport);\n}", "function summarizeUser(userName, userAge, userHasHobby){\n return (\n 'Name is ' + userName +\n ', age is ' + userAge +\n ', and the user has hobbies : ' + userHasHobby\n );\n}", "function makeOutString() {\n var outString = \"\";\n outString += first_name + \"\\t\"\n + surname + \"\\t\"\n + patient_alert + \"\\t\"\n + education_level + \"\\t\"\n + dob + \"\\t\"\n + q1 + \"\\t\"\n + q2 + \"\\t\"\n + q3 + \"\\t\"\n + q5a + \"\\t\"\n + q5b + \"\\t\"\n + q6.toString() + \"\\t\"\n + q7.toString() + \"\\t\"\n + q8a + \"\\t\"\n + q8b + \"\\t\"\n + q9a + \"\\t\"\n + q9b + \"\\t\"\n + q10a + \"\\t\"\n + q10b + \"\\t\"\n + q11a + \"\\t\"\n + q11b + \"\\t\"\n + q11c + \"\\t\"\n + q11d + \"\\t\"\n + now.getFullYear().toString() + now.getMonth().toString() + now.getDate().toString()\n + \"\\n\";\n \n return outString;\n}", "function displayUserReport(data) {\n $('body').append(\n \t'<p>' + 'Report: ' + data.report + '</p>');\n}", "function RainbowProfileReport() {\r\n}", "function displayWelcome() {\n\treturn 'This program is used to determine the length of time needed to pay off'\n\t+'a credit card balance, as well as the total interest paid. ';\n}", "function formatresults2(){\nif (this.timesup==false){ //if target date/time not yet met\nvar displaystring=\"<span>\"+arguments[0]+\" <sup>days</sup> \"+arguments[1]+\" <sup>hours</sup> \"+arguments[2]+\" <sup>minutes</sup> \"+arguments[3]+\" <sup>seconds</sup></span> left until launch time\"\n}\nelse{ //else if target date/time met\nvar displaystring=\"\" //Don't display any text\nalert(\"Launch time!\") //Instead, perform a custom alert\n}\nreturn displaystring\n}", "toString()\n {\n /// UC13 -- Adding the date in short representation\n const options = { year: 'numeric', month: 'long', day: 'numeric'};\n const emplpyeeStartDate = this.startDate == undefined ? \"Undefined\" : this.startDate.toLocaleDateString(\"en-US\", options);\n return `\\n ID : ${this.id} , Name : ${this.name} , Salary : ${this.salary}, Gender = ${this.gender}, Start Date : ${emplpyeeStartDate}`;\n }", "function doStandup(bot, user, channel) {\n\n var userName = null;\n\n getUserName(bot, user, function(err, name) {\n if (!err && name) {\n userName = name;\n\n bot.startPrivateConversation({\n user: user\n }, function(err, convo) {\n if (!err && convo) {\n var standupReport = \n {\n channel: channel,\n user: user,\n userName: userName,\n datetime: getCurrentOttawaDateTimeString(),\n yesterdayQuestion: null,\n todayQuestion: null,\n obstacleQuestion: null\n };\n\n convo.ask('What did you work on yesterday?', function(response, convo) {\n standupReport.yesterdayQuestion = response.text;\n \n convo.ask('What are you working on today?', function(response, convo) {\n standupReport.todayQuestion = response.text;\n \n convo.ask('Any obstacles?', function(response, convo) {\n standupReport.obstacleQuestion = response.text;\n \n convo.next();\n });\n convo.say('Thanks for doing your daily standup, ' + userName + \"!\");\n \n convo.next();\n });\n \n convo.next();\n });\n \n convo.on('end', function() {\n // eventually this is where the standupReport should be stored\n bot.say({\n channel: standupReport.channel,\n text: \"*\" + standupReport.userName + \"* did their standup at \" + standupReport.datetime,\n //text: displaySingleReport(bot, standupReport),\n mrkdwn: true\n });\n\n addStandupData(standupReport);\n });\n }\n });\n }\n });\n}", "function renderUserStats(UserData) {\n // console.log(\"Stats\", UserData);\n var htmlString = \"\";\n //headline stats\n htmlString += \" <div class='row padTop10 ellipsis'>\";\n htmlString += \"<div class='col-xs-4 padColumnSmall'>\";\n htmlString += \"<h2>Headline stats</h2>\";\n htmlString += \"<table class='table table-striped table-hover'>\";\n htmlString += \"<tr><td><i class='fa fa-star-half-alt'></i> Overall rating</td><td>\" + UserData.global_rating + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-gamepad'></i> Battles<td>\" + UserData.battles + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-arrows-alt-v'></i> Win percentage</td><td>\" + UserData.win_percent + \"%</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-user-plus'></i> Survived battles</td><td>\" + UserData.survived_battles + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-star'></i> Average xp per game</td><td>\" + UserData.battle_avg_xp + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-binoculars'></i> Average assisted per game</td><td>\" + UserData.avg_damage_assisted + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-stop'></i> Average damage blocked per game</td><td>\" + UserData.avg_damage_blocked + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-percentage'></i> Hit percent</td><td>\" + UserData.hits_percents + \"%</td></tr>\";\n htmlString += \"</table></div>\";\n\n //best stats\n htmlString += \"<div class='col-xs-4 padColumnSmall'>\";\n htmlString += \"<h2>Best stats</h2>\"\n htmlString += \"<table class='table table-striped table-hover'>\";\n htmlString += \"<tr><td> Highest Damage dealt</td><td>\" + UserData.max_damage + \"hp <img title='\" + UserData.maxDamageTank.name + \"' class='tankStatImg' src='\" + UserData.maxDamageTank.images.small_icon + \"'></img></td></tr>\";\n htmlString += \"<tr><td> Max kills</td><td>\" + UserData.max_frags + \" kills <img title='\" + UserData.maxKillsTank.name + \"' class='tankStatImg' src='\" + UserData.maxKillsTank.images.small_icon + \"'></img></td></tr>\";\n htmlString += \"<tr><td> Highest xp game</td><td>\" + UserData.max_xp + \"xp <img title='\" + UserData.maxXpTank.name + \"' class='tankStatImg' src='\" + UserData.maxXpTank.images.small_icon + \"'></img></td></tr>\";\n htmlString += \"</table></div>\";\n\n //random stats\n htmlString += \"<div class='col-xs-4 padColumnSmall'>\";\n htmlString += \"<h2>Random stats</h2>\";\n htmlString += \"<table class='table table-striped table-hover'>\";\n htmlString += \"<tr><td><i class='fa fa-skull-crossbones'></i> Total kills</td><td>\" + UserData.frags + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-skull'></i> Total damage dealt</td><td>\" + UserData.damage_dealt + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-times'></i> Total damage recieved</td><td>\" + UserData.damage_received + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-binoculars'></i> Total tanks spotted</td><td>\" + UserData.spotted + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-fire'></i> Total shots fired</td><td>\" + UserData.shots + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-tree'></i> Trees pushed over</td><td>\" + UserData.trees_cut + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-bomb'></i> HE hits recieved</td><td>\" + UserData.explosion_hits_received + \"</td></tr>\";\n htmlString += \"<tr><td><i class='fa fa-star'></i> Total xp earned</td><td>\" + UserData.xp + \"</td></tr>\";\n htmlString += \"</div>\";\n\n $(\"#UserStats\").html(htmlString);\n}", "function formatresults(){\r\n if (this.timesup==false){//if target date/time not yet met\r\n var displaystring=arguments[0]+\" days \"+arguments[1]+\" hours \"+arguments[2]+\" minutes \"+arguments[3]+\" seconds left until Scott & Javaneh's Wedding\"\r\n }\r\n else{ //else if target date/time met\r\n var displaystring=\"Future date is here!\"\r\n }\r\n return displaystring\r\n}", "function displayName(user) {\n const html = `<br><br>\n <h1>${user.first_name} ${user.last_name}</h1>\n `;\n const display = document.getElementById('display-name')\n display.innerHTML = html\n return html\n}", "function userInformationHTML(user) { //the 'user' parameter here references the user object being returned from the github API. this contains information methods like user's name login name etc.\n//could console.log(user) to see all the different things in user object from github data API that you could display.\n return `<h2>${user.name}\n <span class=\"small-name\">\n (@<a href=\"${user.html_url}\" target= \"_blank\">${user.login}</a>)\n </span>\n </h2>\n <div class=\"gh-content\">\n <div class=\"gh-avatar\">\n <a href=\"${user.html_url} target= \"_blank\" \n <img src=\"${user.avatar_url}\" width=\"80\" height=\"80\" alt=\"${user.login}\"/>\n </a>\n </div>\n <p>Followers: ${user.followers} - Following ${user.following} <br> Repos: ${user.public_repos}</p>\n </div>`;\n}", "function GenerateProfileHTML(user) {\r\n \r\n if(typeof user['link'] != 'undefined')\r\n return '<a href=\"' + user['link'] + '\" class=\"user-link\">by ' + user['display_name'] + '</a>';\r\n else\r\n return '<span class=\"user-link\">' + user['display_name'] + '</span>'\r\n \r\n }", "function usersDisplayGenerator(){\n msg3 = \"<br/>\";\n if(theUsers != null){\n msg3 = msg3 + \"<b>Here is the display of the users</b><br/>\";\n msg3 = msg3 + \"<table><tr><th>Ord.No</th><th>Username</th><th>email</th></tr>\";\n var count = Object.keys(theUsers).length;\n for(x=0; x<count; x++){\n //console.log(\"Checking user:\" + theUsers[x].username);\n msg3 = msg3 + \"<tr><td>\" + x + \"</td><td>\" + theUsers[x].username + \"</td><td>\" \n + theUsers[x].email + \"</td></tr>\";\n }\n msg3 = msg3 + \"</table>\";\n } else {\n msg3 = msg3 + \"<h3>Remember!</h3><br/>\";\n msg3 = msg3 + \"Treating the users fairly is important!<br/>\";\n msg3 = msg3 + \"Click Refresh to see the users:<br/>\";\n }\n \n msg3 = msg3 + '|<a href=\"/adminpanel.html\">Refresh!</a>|<br/>';\n return msg3;\n}", "function createUserString(userObj) {\n\n \n return (`name: ${userObj.name}, age: ${userObj.age}, language: ${userObj.language}`);\n }", "function generateSummary() {\n // Add .repeat method for padEnd method\n if (!String.prototype.repeat) {\n String.prototype.repeat = function(count) {\n 'use strict';\n if (this == null)\n throw new TypeError('can\\'t convert ' + this + ' to object');\n\n var str = '' + this;\n // To convert string to integer.\n count = +count;\n // Check NaN\n if (count != count)\n count = 0;\n\n if (count < 0)\n throw new RangeError('repeat count must be non-negative');\n\n if (count == Infinity)\n throw new RangeError('repeat count must be less than infinity');\n\n count = Math.floor(count);\n if (str.length == 0 || count == 0)\n return '';\n\n // Ensuring count is a 31-bit integer allows us to heavily optimize the\n // main part. But anyway, most current (August 2014) browsers can't handle\n // strings 1 << 28 chars or longer, so:\n if (str.length * count >= 1 << 28)\n throw new RangeError('repeat count must not overflow maximum string size');\n\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n while (count) {\n str += str;\n count--;\n }\n str += str.substring(0, maxCount - str.length);\n return str;\n }\n }\n\n // Add .padEnd() method to better format strings\n String.prototype.padEnd = function padEnd(targetLength,padString) {\n targetLength = targetLength>>0; //floor if number or convert non-number to 0;\n padString = String((typeof padString !== 'undefined' ? padString : ' '));\n if (this.length > targetLength) {\n return String(this);\n }\n else {\n targetLength = targetLength-this.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength/padString.length); //append to original to ensure we are longer than needed\n }\n return String(this) + padString.slice(0,targetLength);\n }\n };\n\n // Important PPMG worksheet add-on to change disclaimer based on who is signing out\n var pathologist = this.getField(\"Casestatus\").valueAsString;\n var ppmd = \"\";\n if (pathologist == \"Chandra Krishnan\") {\n ppmd = \"PROFESSIONAL INTERPRETATION PERFORMED BY CLINICAL PATHOLOGY ASSOCIATES (3445 Executive Center Drive, Suite 250, Austin, TX 78731. CLIA#45D2052154)\\n\\n\";\n } else if (pathologist == \"Michael Cascio\") {\n ppmd = \"PROFESSIONAL INTERPRETATION PERFORMED BY PENNINSULA PATHOLOGISTS MEDICAL GROUP LABORATORY (383 East Grand Ave, Suite A, South San Francisco, CA 94080. Ph. 650-616-2951. CLIA#05D1029487)\\n\\n\";\n } else {\n ppmd = \"\";\n }\n\n var viability = this.getField(\"Viability\").valueAsString;\n var lymphs = this.getField(\"Diff#1\").valueAsString;\n var blym = this.getField(\"CD19 LYMPHS\").valueAsString;\n var tlym = this.getField(\"CD3 or CD2\").valueAsString;\n var mono = this.getField(\"Diff#2\").valueAsString;\n var gran = this.getField(\"Diff#3\").valueAsString;\n var blast = this.getField(\"Diff#4\").valueAsString;\n var debris = this.getField(\"Diff#5\").valueAsString;\n var plratio = getField(\"Plasma cell K/L\").valueAsString;\n\n \n var bioCD19 = this.getField(\"bioCD19\").valueAsString;\n var bioCD20 = this.getField(\"bioCD20\").valueAsString;\n var bioCD22 = this.getField(\"bioCD22\").valueAsString;\n var bioCD33 = this.getField(\"bioCD33\").valueAsString;\n var bioCD38 = this.getField(\"bioCD38\").valueAsString;\n\n var wild1 = this.getField(\"Wildcard1\").valueAsString;\n var wild2 = this.getField(\"Wildcard2\").valueAsString;\n var wild3 = this.getField(\"Wildcard3\").valueAsString;\n \n var abnorm = '';\n var abnorm2 = '';\n var abnorm3 = '';\n if (wild1 == \"Abnormal cells\"){abnorm = this.getField(\"Diff#6\").value}; \n if (wild2 == \"Abnormal cells #2\"){abnorm2 = this.getField(\"Diff#7\").value};\n if (wild3 == \"Abnormal cells #3\"){abnorm3 = this.getField(\"Diff#8\").value};\n \n var baso = '';\n if (wild1 == \"Basophils\"){baso = this.getField(\"Diff#6\").value} \n else if (wild2 == \"Basophils\"){baso = this.getField(\"Diff#7\").value} \n else if (wild3 == \"Basophils\"){baso = this.getField(\"Diff#8\").value};\n \n var hemat = '';\n if (wild1 == \"Hematogones\"){hemat = this.getField(\"Diff#6\").value} \n else if (wild2 == \"Hematogones\"){hemat = this.getField(\"Diff#7\").value} \n else if (wild3 == \"Hematogones\"){hemat = this.getField(\"Diff#8\").value};\n \n var plasma = '';\n if (wild1 == \"Plasma cells\"){plasma = this.getField(\"Diff#6\").value} \n else if (wild2 == \"Plasma cells\"){plasma = this.getField(\"Diff#7\").value} \n else if (wild3 == \"Plasma cells\"){plasma = this.getField(\"Diff#8\").value};\n \n var other = '';\n if (wild1 == \"Other\"){other = this.getField(\"Diff#6\").value} \n else if (wild2 == \"Other\"){other = this.getField(\"Diff#7\").value} \n else if (wild3 == \"Other\"){other = this.getField(\"Diff#8\").value};\n \n var nk = '';\n if (wild1 == \"NK-cells\"){nk = this.getField(\"Diff#6\").value} \n else if (wild2 == \"NK-cells\"){nk = this.getField(\"Diff#7\").value} \n else if (wild3 == \"NK-cells\"){nk = this.getField(\"Diff#8\").value};\n \n var nonheme = '';\n if (wild1 == \"Non-heme\"){nonheme = this.getField(\"Diff#6\").value} \n else if (wild2 == \"Non-heme\"){nonheme = this.getField(\"Diff#7\").value} \n else if (wild3 == \"Non-heme\"){nonheme = this.getField(\"Diff#8\").value};\n \n var s = \n \"Flow cytometry differential (excluding unclassified events)\\n\\n\"+\n \"Viability:\".padEnd(24)+ viability +\"%\\n\"+\n \"Lymphocytes:\".padEnd(24)+ lymphs +\"%\\n\"+\n \" B-cells:\".padEnd(24)+ blym +\"%\\n\"+\n \" T-cells:\".padEnd(24)+ tlym +\"%\\n\"+\n \"Monocytes:\".padEnd(24)+ mono +\"%\\n\"+\n \"Granulocytes:\".padEnd(24)+ gran +\"%\\n\"+\n \"Blasts:\".padEnd(24)+ blast +\"%\\n\"+\n \"CD45-neg/Debris:\".padEnd(24)+ debris +\"%\\n\";\n \n if (abnorm != ''){\n s = s+\"Abnormal:\".padEnd(24)+abnorm+\"%\\n\"};\n if (abnorm2 != ''){\n s = s+\"Abnormal #2:\".padEnd(24)+abnorm2+\"%\\n\"};\n if (abnorm3 != ''){\n s = s+\"Abnormal #3:\".padEnd(24)+abnorm3+\"%\\n\"};\n if (baso != ''){\n s = s+\"Basophils:\".padEnd(24)+baso+\"%\\n\"};\n if (hemat != ''){\n s = s+\"Hematogones:\".padEnd(24)+hemat+\"%\\n\"};\n if (plasma != ''){\n s = s+\"Plasma cells:\".padEnd(24)+plasma+\"% (K:L ratio = \"+plratio+\") \\n\"};\n if (other != ''){\n s = s+\"Others:\".padEnd(24)+other+\"%\\n\"};\n if (nk != ''){\n s = s+\"NK-cells:\".padEnd(24)+nk+\"%\\n\"};\n if (nonheme != ''){\n s = s+\"Non-hematolymphoid:\".padEnd(24)+nonheme+\"%\\n\"};\n\n var b = \"Biomarker Status (% of abnormal cells expressing therapeutic targets): \\n\";\n if (bioCD19 != ''){\n b = b+\"CD19 expression:\".padEnd(24)+bioCD19+\"%\\n\"};\n if (bioCD20 != ''){\n b = b+\"CD20 expression:\".padEnd(24)+bioCD20+\"%\\n\"};\n if (bioCD22 != ''){\n b = b+\"CD22 expression:\".padEnd(24)+bioCD22+\"%\\n\"};\n if (bioCD33 != ''){\n b = b+\"CD33 expression:\".padEnd(24)+bioCD33+\"%\\n\"};\n if (bioCD38 != ''){\n b = b+\"CD38 expression:\".padEnd(24)+bioCD38+\"%\\n\"};\n if ((bioCD19 == '') && (bioCD20 == '') && (bioCD22 == '') && (bioCD33 == '') && (bioCD38 == '')){\n b = \"\"\n }; \n \n s = s + \"\\nResults:\\n\"+this.getField(\"Finaldx\").valueAsString+\"\\n\\n\"+\n b+\"\\n\"+\n \"Interpretation: \" + this.getField(\"Interp text\").valueAsString+ \" \\n\\n\"+ \n \"Antibodies tested: Total, \" + this.getField(\"Abtotal\").valueAsString + \": \" + this.getField(\"AbList\").valueAsString+\"\\n\\nTECHNICAL WORK PERFORMED BY PENNINSULA PATHOLOGISTS MEDICAL GROUP LABORATORY (383 East Grand Ave, Suite A, South San Francisco, CA 94080. Ph. 650-616-2951. CLIA#05D1029487). Flow cytometry testing was developed and the performance characteristics determined by PPMG Flow cytometry laboratory. They have not been cleared or approved by the U.S. Food and Drug Administration. The FDA has determined that such clearance or approval is not necessary. These tests are used for clinical purposes. They should not be regarded as investigational or for research. This laboratory is certified under the Clinical Laboratory Improvement Amendments of 1988 (CLIA-88) as qualified to perform high complexity clinical laboratory testing.\\n\\n\"+\n ppmd+\n \"Some antigens evaluated by flow cytometry may also be evaluated by immunohistochemistry when deemed medically necessary. Concurrent evaluation by IHC on tissue sections is indicated in some cases in order to further characterize or categorize tumors. IHC may also be necessary to correlate immunophenotype with cell morphology and determine extent of involvement, spatial pattern, and focality of potential disease distribution.\";\n\n \n \n console.clear();\n console.println(s);\n console.show();\n //app.alert(s);\n }", "function formatStats(attack, defense) {\n return \"(<span class='attack'>\" + attack + \"</span>\" + \"/\" + \"<span class='defense'>\" + defense + \"</span>\" + \")\";\n}", "function showUserGifts(){\r\n \r\n // get from database mission type assigned for this day and appends to HTML\r\n appendGifts(userGifts,'neutral')\r\n }", "function displayEntireNameForUser(user) {\n if (!user) {\n return '';\n }\n\n let displayName = '@' + user.username;\n const fullName = getFullName(user);\n\n if (fullName && user.nickname) {\n displayName = react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(\"span\", null, '@' + user.username, ' - ', react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(\"span\", {\n className: \"light\"\n }, fullName + ' (' + user.nickname + ')'));\n } else if (fullName) {\n displayName = react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(\"span\", null, '@' + user.username, ' - ', react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(\"span\", {\n className: \"light\"\n }, fullName));\n } else if (user.nickname) {\n displayName = react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(\"span\", null, '@' + user.username, ' - ', react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(\"span\", {\n className: \"light\"\n }, '(' + user.nickname + ')'));\n }\n\n return displayName;\n}", "function DisplayTaunt() {\n\t\tif (props.powerPro.boss === 0) {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t\"Well! Come in intruder\" says the cyborg without looking at you,\n\t\t\t\t\t\t\"Give me a second to finish... Ah done!\"\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t\"Let me take a look at you... I see... You're here to stop my master\n\t\t\t\t\t\tand kill me. Oh where are my manners I am Dr. Crackle and while it\n\t\t\t\t\t\twould be interesting to learn your name we should get started. Good\n\t\t\t\t\t\tluck! Mwah. Mwah Ha Ha HA HA!\n\t\t\t\t\t</p>\n\t\t\t\t</>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<p>\n\t\t\t\t\t\"Oh look it's {props.name.name}. What? Surprised I know your name? I\n\t\t\t\t\thacked your brain while you were unconscious before I threw you out\n\t\t\t\t\twith the other scrap. Looks like Polina is not doing her job. Seems\n\t\t\t\t\tthat I need to give her another chance at it! Ha Ha HA HA!\"\"\n\t\t\t\t</p>\n\t\t\t);\n\t\t}\n\t}", "get dashboard(){\n return (\n `<div class=\"swTable__dashbox\">\n <div class=\"swTable__dash-heading\">Tallest Human</div>\n <div class=\"swTable__dash-result\">${this.findTallestHuman(this.humans).name} @ ${this.getMeters(this.findTallestHuman(this.humans).height)}</div>\n </div>\n <div class=\"swTable__dashbox\">\n <div class=\"swTable__dash-heading\">Most Common Hair Color</div>\n <div class=\"swTable__dash-result\">${this.findCommonHairColor(this.humans)}</div>\n </div>\n <div class=\"swTable__dashbox\">\n <div class=\"swTable__dash-heading\">Average Mass</div>\n <div class=\"swTable__dash-result\">${this.findAverageMass(this.humans)}<i>kg</i></div>\n </div>`\n )\n }", "getAsString() { \r\n if(!Lang.isNull(this.staging)) { \r\n if((Lang.isNull(this.staging.tumorSize) || Lang.isUndefined(this.staging.tumorSize)) &&\r\n (Lang.isNull(this.staging.nodeSize) || Lang.isUndefined(this.staging.nodeSize)) &&\r\n (Lang.isNull(this.staging.metastasis) || Lang.isUndefined(this.staging.metastasis)))\r\n {\r\n return `#staging`;\r\n } else { \r\n const tString = this.getTumorSizeString(this.staging);\r\n const nString = this.getNodeSizeString(this.staging);\r\n const mString = this.getMetastasisString(this.staging);\r\n // Don't put any spaces -- the spaces should be dictated by the current reason and date\r\n return `#staging[T${tString}N${nString}M${mString}]`;\r\n }\r\n }\r\n }", "function getSummonerStatsSummary(){\n\n}", "function GGTRCC_RenderBattingSummary (aPLSO, aBattingGraphInfo)\r\n{\r\n\tvar lRet=\"\";\r\n\t\r\n\tlRet += \"<span class='GadgetStatsHeading'>Career Batting Summary</span>\";\r\n\t\t\r\n\tif (0 == aBattingGraphInfo.length)\r\n\t{\r\n\t\tlRet += \"<br>There is no Batting record for this player<br><br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//\r\n\t\t// Do we have enough entries to warrent a graph?\r\n\t\t//\r\n\t\tif (1 < aBattingGraphInfo.length)\r\n\t\t{\r\n\t\t\tlRet += GGTRCC_PlayerLTGraph_MakeBattingGraphHTML (aBattingGraphInfo) + \"<br><br>\";\r\n\t\t}\r\n\t\t\t\r\n\t\tlRet += GGTRCC_RenderBattingTotals (aPLSO.mLifetimeBattingTotals) + \"<br><br><br>\";\r\n\t}\r\n\r\n\treturn (lRet);\r\n}", "get humanTable() {\n return (\n `<h1 class=\"swTable__heading\">The Humans of Star Wars</h1>\n <div class=\"swTable__dashboard\">\n ${this.dashboard}\n </div>\n <table class=\"swTable__table\">\n <thead class=\"swTable__head\">\n <tr class=\"swTable__row\">\n <td class=\"swTable__cell\">Name</td>\n <td class=\"swTable__cell\">Height</td>\n <td class=\"swTable__cell\">Mass</td>\n <td class=\"swTable__cell\">Hair Color</td>\n <tr>\n </thead>\n <tbody class=\"swTable__body\">\n ${this.buildHumanList(this.humans)}\n </tbody>\n </table>`\n )\n }", "function displayTemplate(niceDate, all) {\n return `<!DOCTYPE html>\n <html>\n <head>\n <title>${niceDate.split('.').join(':')}</title>\n <meta charset=\"utf-8\">\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css\">\n <link href=\"https://fonts.googleapis.com/css?family=Montserrat:400,400i,700,700i|Source+Code+Pro&display=swap\" rel=\"stylesheet\">\n <style>${fs.readFileSync('./test-runner.css', 'utf-8')}</style>\n </head>\n <body>\n <script>\n render('${niceDate.split('.').join(':')}', ${JSON.stringify(all, '', ' ')});\n ${render}\n </script>\n </body>\n </html>\n `\n}", "function printUserData() {\n\n\treturn `Hello World, this is ${data.name} with HNGi7 ID ${data.hngi_id} and email ${data.email} using ${data.language} for stage 2 task`;\n\t\n}", "function MUA_headertext(mode) {\n let header_text = (mode === \"update\") ? loc.User + \": \" + mod_MUA_dict.username : loc.Add_user;\n if(mod_MUA_dict.user_schoolbase_pk){ header_text = loc.Add_user_to + mod_MUA_dict.user_schoolname;}\n document.getElementById(\"id_MUA_header\").innerText = header_text;\n } // MUA_headertext", "function users_list_format (fakeout, edit, name, company, address, phone, email, latlong, notes) {\n return \"\"+\n \"<div class='glider'>\"+\n \" <table class='users-list-expando'>\"+\n \" <tr>\"+\n \" <td>Full Name</td>\"+\n \" <td>Company & Position</td>\"+\n \" <td>Address</td>\"+\n \" <td>Phone Number(s)</td>\"+\n \" <td>Email Address</td>\"+\n \" <td>Lat/Long</td>\"+\n \" <td>Notes</td>\"+\n \" <td></td>\"+\n \" </tr>\"+\n \" <tr name='\"+fakeout+\"' class='no-table'>\"+ // \"no-table\" class allows single-row expandos to not highlight on hover\n \" <td>\"+name+\"</td>\"+\n \" <td class='address-margin'>\"+company+\"</td>\"+\n \" <td class='address-margin'>\"+address+\"</td>\"+\n \" <td class='address-margin'>\"+phone+\"</td>\"+\n \" <td>\"+email+\"</td>\"+\n \" <td>\"+latlong+\"</td>\"+\n \" <td>\"+notes+\"</td>\"+\n \" <td>\"+edit+\"</td>\"+\n \" </tr>\"+\n \" </table>\"+\n \"</div>\";\n }", "function setName(){\n\t//$('div#statBar label#fname').text('User: ' + userStats.fn.toString() );\n}", "function displayRecords() {\n Alert.render(\n `Current best times for running the 100 metres dash <br><br>\n <b>WOMEN'S RECORD:</b> <br>10.49 seconds (set by Florence Griffith-Joyner in 1988)<br>\n <b>MEN'S RECORD:</b> <br>9.58 seconds (set by Usain Bolt in 2009)`)\n}", "renderSummary() {\n return ''; // @todo\n }", "function RenderProfileDataUI(profile) {\n $(\"#welcome-username\").text(profile.Name);\n var DateLastActive_SessionID = Math.min.apply(Math, profile.previousSessions.map(function (sesh) { return sesh.SessionID; }));\n var DateLastActive = profile.previousSessions.find(function (session) { return session.SessionID === DateLastActive_SessionID; }).DateLastActive;\n\n $(\"#welcome-lastlogin\").text(ConvertToReadableDate(DateLastActive));\n}", "function Info(user) {\n return `${user.name} tem ${user.age} anos.`;\n}", "function reportTime(){\n const date = new Date();\n const {time, mode} = getTime();\n const reportTime = `${time} ${mode} ${date.getDate()}/${date.getMonth()+1}/${date.getFullYear()}`;\n return reportTime ;\n}", "function generateAbuseReport(scam) {\n let abusereport = \"\";\n abusereport += \"I would like to inform you of suspicious activities at the domain \" + url.parse(scam['url']).hostname;\n if ('ip' in scam) {\n abusereport += \" located at IP address \" + scam['ip'] + \".\";\n } else {\n abusereport += \".\";\n }\n if ('subcategory' in scam && scam['subcategory'] == \"MyEtherWallet\") {\n abusereport += \"The domain is impersonating MyEtherWallet.com, a website where people can create Ethereum wallets (a cryptocurrency like Bitcoin).\";\n } else if ('subcategory' in scam && scam['subcategory'] == \"Classic Ether Wallet\") {\n abusereport += \"The domain is impersonating classicetherwallet.com, a website where people can create Ethereum Classic wallets (a cryptocurrency like Bitcoin).\";\n } else if ('category' in scam && scam['category'] == \"Fake ICO\") {\n abusereport += \"The domain is impersonating a website where an ICO is being held (initial coin offering, like an initial public offering but it's for cryptocurrencies).\";\n }\n if ('category' in scam && scam['category'] == \"Phishing\") {\n abusereport += \"\\r\\n\\r\\nThe attackers wish to steal funds by using phishing to get the victim's private keys (passwords to a wallet) and using them to send funds to their own wallets.\";\n } else if ('category' in scam && scam['category'] == \"Fake ICO\") {\n abusereport += \"\\r\\n\\r\\nThe attackers wish to steal funds by cloning the real website and changing the ethereum address so people will send funds to the attackers' address instead of the real address.\";\n }\n abusereport += \"\\r\\n\\r\\nPlease shut down this domain so further attacks will be prevented.\";\n return abusereport;\n}", "function printFighter1Stats(x){\n let fighterStats = `<div style=\"border: 1px dotted black; border-radius: 25px; padding: 10px; margin-top:10px; background-color: lightgrey;\">${x.name} the ${x.title} weighs ${x.weight} pounds, would rather be ${x.preferences}, and, like all tiny sociopaths who poop in a box, always has a ${x.attitude} attitude. ${x.name} commands an indentured servant named ${x.indenturedServant}, who has kindly provided ${x.name} with <span style=\"color:red; font-weight: bolder\">${x.hasCans}</span> cans.</div>`\n $(\"#fighter1stats\").html(fighterStats);\n $('#fighter1pic').removeClass('hidden').attr('src', x.image);\n }", "function formatRepoUser (repo) {\n\n if (repo.loading) {\n return repo.name;\n }\n if (repo.newOption) {\n return '<a href=\"#\" class=\"\"><em>Select user below</em></a>';\n } else {\n var markup = \"<div>\" +\n \"<b>\"+repo.name+\"</b><br/>\"+repo.email\n \"</div>\";\n return markup;\n\n }\n}", "function userinfo(user) {\r\n\r\nvar finalstring = '';\r\n\r\nfinalstring += '**' + user.username + '#' + user.discriminator + '**,' + ' with the **ID** of ' + '**' + user.id + '**' + ' and created his/her account on ' + '**' + user.createdAt + '**' + \r\n\" Is it verified? \" + '**' + user.verified + '**';\r\n \r\n\r\nreturn finalstring;\r\n\r\n}", "toHtml()\n\t{\n //to finish \n var answer = '<div class=\"student-project-panel\"><div class=\"personal-row\"> <h3>' \n\t\t+ this.name + '</h3><span class=\"'+ map_dot[this.status]+'\"></span></div></div>'\n\t\treturn answer;\n\t}", "get availability () {\n let opening = ''\n if (this.openingHours) {\n opening = `${this.prettyCurrentState}<br/><br/>\n <strong>Opening Hours:</strong> ${this.prettyOpeningHours}<br/>`\n }\n opening += this.label('kitchen_hours')\n\n return opening +\n // this.label('Opening Times','opening_hours',(currentStatus)?`<div class=\"pop-caption\">${currentStatus}</div>`:'</br>') +\n this.label('access', '&nbsp;') +\n this.label('centralkey', '&nbsp;') +\n this.label('fee:charge') +\n ((this.tags.amenity !== 'toilets') ? this.label('toilets:wheelchair') : '')\n }", "function printStatistics() {\n var textP;\n var defxo = 0.1, //default x offset\n defwo = 1, //default width offset\n wo = 0.8 //another width offset\n deftp = 0.05; // default text percentage\n textP = \"Statistics\";\n printText(0, 0.25, defwo, textP, deftp, \"center\");\n\n //Longest Time Alive Statistic\n textP = \"Longest time alive:\";\n printText(defxo, 0.35, defwo, textP, deftp, \"left\");\n textP = calculateLongestPlayerAliveTime() + \"s\";\n printText(defxo, 0.35, wo, textP, deftp, \"right\");\n\n //Number of Deaths Statistic\n textP = \"Number of deaths:\";\n printText(defxo, 0.45, defwo, textP, deftp, \"left\");\n textP = metrics.get(\"playerHit\");\n printText(defxo, 0.45, wo, textP, deftp, \"right\");\n\n //Enemies Destroyed Statistic\n textP = \"Enemies Destroyed:\";\n printText(defxo, 0.55, defwo, textP, deftp, \"left\");\n textP = metrics.get(\"enemiesKilled\");\n printText(defxo, 0.55, wo, textP, deftp, \"right\");\n\n //Bonuses Collected Statistic\n textP = \"Bonuses collected:\";\n printText(defxo, 0.65, defwo, textP, deftp, \"left\");\n textP = metrics.get(\"bonusCollected\");\n printText(defxo, 0.65, wo, textP, deftp, \"right\");\n\n //Final Score Statistic\n textP = \"Final Score:\";\n printText(defxo, 0.75, defwo, textP, deftp, \"left\");\n textP = Crafty(\"Score\")._score;\n printText(defxo, 0.75, wo, textP, deftp, \"right\");\n}", "function printTimeInWords() {\n var msg;\n if (minNow === 0) {\n return '<span class=\"its\">It\\'s</span><br>' + '<span class=\"hour\">' + setHours() + '</span><br>' + ' <span class=\"min\">o\\'clock</span>.';\n } \n else if (minNow === 30) {\n return '<span class=\"its\">It\\'s</span> <br> <span class=\"min\">half past</span> <br>' + '<span class=\"hour\">' + setHours() + '</span>' + '.';\n }\n else {\n\t \n msg = '<span class=\"its\">It\\'s</span> <br >' + '<span class=\"min\">' + setMinutes() + '</span>' + '<span class=\"pos\">' + setPos() + '</span> <br>' + '<span class=\"hour\">' + setHours() + '</span>' + '.';\n return msg;\n }\n}", "function getGrainsDisplay( date , grain ){\n var formatMap = {\n 'day': 'D',\n 'week': '[W]WW',\n 'month': 'MMM',\n 'quarter': '[Q]QQ',\n 'year': 'YYYY'\n };\n return date.format( formatMap[grain] );\n }", "function printMessage (userName, badgeCount, points) {\n\n const message = `${userName} has ${badgeCount} total badge(s) and ${points} points in Javascript`;\n\n console.log(message);\n\n}", "function showUser(){\n\t$(\".profile-user-nickname\").html(userData.prezdivka);\n\t$(\".profile-user-name\").html(\"<p>\"+userData.jmeno+\" \"+userData.prijmeni+\"</p>\");\n\t$(\".profile-user-age-status\").html(userData.vek+checkStatus(userData.stav));\n\t$(\".profile-user-status\").html(userData.stav);\n\tif(userStatus){\n\t\t$(\".profile-user-bounty\").html(\"<p style='color: #938200;'>Bounty: \"+userData.vypsana_odmena+\" gold</p>\");\n\t}\n\telse{\n\t\t$(\".profile-user-bounty\").html(\"<p style='color: #938200;'>\" + 0 + \" gold</p>\");\n\t}\n}", "function produceReport(){\n // this is were most functions are called\n\n userURL = getuserURL();\n\n // add this into the website\n vertifyHttps(userURL); // check if the url is http/s\n googleSafeBrowsingAPI(userURL);\n virusTotalAPI(userURL);\n apilityCheck(userURL);\n}", "uberFare(){\r\n if(this.totalKm <= 2){\r\n return \"Rs.10\"\r\n }\r\n this.totalKm = this.totalKm - 2;\r\n return (\"Rs.\" + (10 + (this.totalKm * 4) + (this.waitingTime * 2)));\r\n }", "function sc(floor){\n if(floor <= 1) {\n return '';\n } else if(floor <= 6) {\n return 'Aa~ '.repeat(floor - 1) + 'Pa! ' + 'Aa!';\n } else {\n return 'Aa~ '.repeat(floor - 1) + 'Pa!';\n }\n}", "function summaryReport (allScores) {\n\tlet outputString = \"\";\n\tconst inconsistencyCounts = {};\n\n\tfor (const userId in allScores) {\n\t\tif (allScores.hasOwnProperty(userId)) {\n\t\t\tconst userData = allScores[userId];\n\t\t\tconst scoresForThisUser = userData.scores;\n\t\t\tlet userComments = (userData.missingAnswers > 0) ? ` *** ${userData.missingAnswers} missing answers` : \"\";\n\t\t\tuserComments += userData.suspiciousDuration ? ` *** Completed too quickly - ${userData.suspiciousDuration} seconds.` : \"\";\n\t\t\tuserComments += (!userData.age || !userData.sex) ? \" *** age or sex not specified\" : \"\";\n\t\t\tconst inconsistencyCount = userData.inconsistencies.bad + userData.inconsistencies.minor;\n\t\t\tif (inconsistencyCount > 0) {\n\t\t\t\tuserComments += ` *** inconsistencies: bad ${userData.inconsistencies.bad}, minor ${userData.inconsistencies.minor}, total ${inconsistencyCount}`;\n\t\t\t}\n\t\t\tinconsistencyCounts[inconsistencyCount] = (inconsistencyCounts[inconsistencyCount] || 0) + 1;\n\t\t\tconst time = moment(new Date(userData.time)).format(\"M/D/YY H:mm\");\n\t\t\tconst minutes = Math.round(userData.elapsedSeconds / 60);\n\t\t\toutputString += `\\n\\n\\n${userData.respondentId} ${userId} ${time} ${minutes} minutes ${userData.sex} ${userData.age} ${userComments}\\n\\n${userData.image}\\n`;\n\n\t\t\t// Fetch the template which contains a list of all the domains and facets, including their human-readable names.\n\t\t\t// The order of items in the template defines the order of the report.\n\t\t\tconst template = getTemplate();\n\n\t\t\t// Iterate over the domains in the template\n\t\t\tfor (let i = 0; i < template.length; i++) {\n\t\t\t\tconst domain = template[i];\n\t\t\t\tconst scoresForThisDomain = scoresForThisUser[domain.domain] || {};\n\t\t\t\tconst domainScore = scoresForThisDomain.score || {score: 0, count: 0, rating: \"average\"};\n\t\t\t\tconst facetScores = scoresForThisDomain.facets || {};\n\n\t\t\t\t// Print the domain summary line\n\t\t\t\toutputString += `\\n ${domain.domain}. ${domain.title}: ${domainScore.percentileScore} ${domainScore.rating} (${domainScore.score} / ${domainScore.count * 5})\\n`;\n\n\t\t\t\t// Iterate over facets and print a line for each facet.\n\t\t\t\tfor (let k = 0; k < domain.facets.length; k++) {\n\t\t\t\t\tconst facet = domain.facets[k];\n\t\t\t\t\tconst facetScore = facetScores[facet.facet] || {score: 0, count: 0, scores: [], inconsistency: \"none\", rating: \"average\"};\n\t\t\t\t\tconst scoreString = facetScore.inconsistency !== \"none\"\n\t\t\t\t\t\t? `*** ${facetScore.inconsistency} inconsistency; scores are ${facetScore.scores}` : \"\";\n\t\t\t\t\toutputString +=\n\t\t\t\t\t\t` ${facet.facet}. ${facet.title}: ${facetScore.percentileScore} ${facetScore.rating} (${facetScore.score} / ${facetScore.count * 5}) ${scoreString}\\n`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\toutputString += `\\n<Inconsistency count>:<number of users> - `;\n\tfor (const count in inconsistencyCounts) {\n\t\tif (inconsistencyCounts.hasOwnProperty(count)) {\n\t\t\toutputString += `\\n${count}: ${inconsistencyCounts[count]}`;\n\t\t}\n\t}\n\toutputString += `\\n`;\n\treturn outputString;\n}", "function renderInternProfile(profile3) {\n if (profile3 === \"Engineer\") {\n return (\n ` `\n )}\n return ``\n }", "format() {\n return `${this.client} owes Ksh${this.amount} for ${this.detail}`;\n }", "function generateUserUsageReport() {\n var today = new Date();\n var oneWeekAgo = new Date(today.getTime() - 7 * 24 * 60 * 60 * 1000);\n var timezone = Session.getScriptTimeZone();\n var date = Utilities.formatDate(oneWeekAgo, timezone, 'yyyy-MM-dd');\n\n var parameters = [\n 'accounts:last_login_time',\n 'gmail:num_emails_received',\n 'drive:num_items_created'\n ];\n var rows = [];\n var pageToken;\n var page;\n do {\n page = AdminReports.UserUsageReport.get('all', date, {\n parameters: parameters.join(','),\n maxResults: 500,\n pageToken: pageToken\n });\n if (page.warnings) {\n for (var i = 0; i < page.warnings.length; i++) {\n var warning = page.warnings[i];\n Logger.log(warning.message);\n }\n }\n var reports = page.usageReports;\n if (reports) {\n for (var i = 0; i < reports.length; i++) {\n var report = reports[i];\n var parameterValues = getParameterValues(report.parameters);\n var row = [\n report.date,\n report.entity.userEmail,\n parameterValues['accounts:last_login_time'],\n parameterValues['gmail:num_emails_received'],\n parameterValues['drive:num_items_created']\n ];\n rows.push(row);\n }\n }\n pageToken = page.nextPageToken;\n } while (pageToken);\n\n if (rows.length > 0) {\n var spreadsheet = SpreadsheetApp.create('G Suite User Usage Report');\n var sheet = spreadsheet.getActiveSheet();\n\n // Append the headers.\n var headers = ['Date', 'User', 'Last Login', 'Num Emails Received',\n 'Num Drive Files Created'];\n sheet.appendRow(headers);\n\n // Append the results.\n sheet.getRange(2, 1, rows.length, headers.length).setValues(rows);\n\n Logger.log('Report spreadsheet created: %s', spreadsheet.getUrl());\n } else {\n Logger.log('No results returned.');\n }\n}", "function displayMemberProfileCard(member) {\n\n return `\n <div class=\"card\">\n\n \n <img class=\"card-img-top img-fluid\" src=\"${member.image_display_url}\" onerror=\"this.onerror=null;this.src='${organizationImageDefaut}';\" alt=\"${member.display_name}\"> \n\n\n <div class=\"card-body\">\n <h4 class=\"card-title\">${member.display_name}\n ${member.organization_type ? orgType(member.organization_type) : \"\"} \n </h4>\n <h6 class=\"card-subtitle mb-2 text-muted\">${member.slogan}</h6>\n\n ${displayMemberContactInfo(member)}\n\n </div>\n</div>\n\n`;\n\n}", "function DisplayDesc() {\n\t\tif (props.powerPro.boss === 0) {\n\t\t\treturn (\n\t\t\t\t<p>\n\t\t\t\t\tYou enter the generator room and are standing on a landing. You notice\n\t\t\t\t\ta catwalk stretching the length of the room. In the center of the room\n\t\t\t\t\tis a cyborg scientist working at a console.\n\t\t\t\t</p>\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t<p>\n\t\t\t\t\tYou return to the generator room. Dr. Crackle is working at his\n\t\t\t\t\tconsole once again.\n\t\t\t\t</p>\n\t\t\t);\n\t\t}\n\t}", "templateCensusString () {\n const census = this.templateCensusObj();\n const alignments = Object.keys(census);\n\n if (alignments.length === 0) {\n return 'Everyone is dead!';\n }\n\n return alignments\n .map(alignment => {\n const templates = Object.keys(census[alignment]).map(\n template => {\n const kin = census[alignment][template];\n\n return ` ${ template }\\t${ kin.active }/${ kin.total }`;\n }\n )\n .sort();\n\n return `${ alignment }:\\n${ templates.join('\\n') }`;\n })\n .sort()\n .join('\\n');\n\n }", "function printDetails (firstName,lastName,mood){\n return `The person ${getFullName(\"Filip\",\"Janev\")} is feeling ${mood}`\n\n}", "render() {\n let tokens = \"\";\n this.permissions.forEach(p => tokens = tokens + Permission.render(p));\n if(tokens === \"\") tokens = \"<h3>No tokens found for this user</h3>\";\n\n let cert = \"\";\n this.certificate.forEach(c => cert = cert + this.renderCert(c));\n if(cert === \"\") cert = \"<h3>No certificates found for this user</h3>\";\n\n return \"<div class='user'><div class='userName'>\"+ this.name +\n '</div><button class=\"collapsible\"> Tokens: </button><div class=\"content\">' + tokens +\"</div> <button class='collapsible'> Certificates: </button><div class='content'>\" + cert +\"</div></div>\";\n }", "function printOneUser(user) {\n searchInput.value = \"\";\n errorMsg.innerText = \"\";\n userTable.innerHTML += `<tr>\n <td>${user.fullName}</td>\n <td>${user.age}</td>\n <td>${user.isMarried ? `Yes, with ${user.spouse}` : `No`}</td>\n <td>${user.city}</td>\n <td>${user.country}</td>\n <td>${user.pets.join(\", \")}`;\n}", "function displayEmployeesRow(member) {\n\n return `\n <!-- start employees -->\n <div class=\"row\">\n <div class=\"col-lg-12\">\n <h2 class=\"my-4\">Team</h2>\n </div>\n ${member.employees.map(employeeTemplateRow).join(\"\")}\n \n </div>\n <!-- end employees -->\n `;\n}", "getDisplayString(stat) {\n let isArtifactBoost = stat.id.search(\"PIP_Artifact_\") > -1\n let isTalentBoost = stat.id.search(\"PIP_Talent\") > -1\n\n // if a single stat source is passed instead of a total'd one, use the single value\n stat.amount = stat.amount != null ? stat.amount : stat.value;\n\n if (isArtifactBoost) {\n // artifact boosts use the Artifact's description\n let artifactId = stat.id.replace(\"PIP_Artifact_\", \"\").toLowerCase()\n return game.artifacts[artifactId].description\n }\n else if (isTalentBoost) {\n // talent boosts use the talent's description\n let talentId = stat.id.replace(\"PIP_Talent_\", \"\").toLowerCase()\n return miscData.talents[talentId].description\n }\n else if (stat.type in miscData.stats && stat.id in miscData.stats[stat.type]) {\n // strings defined by us, for generic stats like +movement.\n let displayInfo = miscData.stats[stat.type][stat.id]\n\n // manually defined strings for each possible value of a stat. Used by the summon capacity boost for example.\n if (displayInfo && displayInfo.strings != null) {\n return displayInfo.strings[Math.min(stat.amount, displayInfo.strings.length-1)]\n }\n else if (displayInfo && displayInfo.bool)\n return utils.format(miscData.stats[stat.type][stat.id].display, utils.capitalize((stat.amount > 0).toString()))\n\n return utils.format(miscData.stats[stat.type][stat.id].display, stat.amount)\n }\n else if (miscData.statTypesWithGameStrings.includes(stat.type)) {\n // stat types that use strings from the game if we have not defined a replacement for them.\n return game.ascension.specialStrings[stat.refString]\n }\n\n return \"STAT WITH NO STRING: \" + stat.type + \" \" + stat.id\n }", "function getDashboardProfile() {\n let i = getInfo()\n // console.log(`userInformation:\\n${JSON.stringify(i, null, 2)}`)\n let href = isLoggedIn() ? \"href\" : \"data-href\"\n return `\n <div class=\"gt2-dashboard-profile\">\n <a ${href}=\"/${i.screenName}\" class=\"gt2-banner\" style=\"background-image: ${i.bannerUrl ? `url(${i.bannerUrl}/600x200)` : \"unset\"};\"></a>\n <div>\n <a ${href}=\"/${i.screenName}\" class=\"gt2-avatar\">\n <img src=\"${i.avatarUrl.replace(\"normal.\", \"bigger.\")}\"/>\n </a>\n <div class=\"gt2-user\">\n <a ${href}=\"/${i.screenName}\" class=\"gt2-name\">${i.name.replaceEmojis()}</a>\n <a ${href}=\"/${i.screenName}\" class=\"gt2-screenname\">\n @<span >${i.screenName}</span>\n </a>\n </div>\n <div class=\"gt2-toggle-${isLoggedIn() ? \"acc-switcher-dropdown\" : \"lo-nightmode\" }\">\n <div></div>\n ${getSvg(isLoggedIn() ? \"caret\" : \"moon\")}\n </div>\n <div class=\"gt2-stats\">\n <ul>\n <li>\n <a ${href}=\"/${i.screenName}\">\n <span>${getLocStr(\"statsTweets\")}</span>\n <span>${i.stats.tweets.humanize()}</span>\n </a>\n </li>\n <li>\n <a ${href}=\"/${i.screenName}/following\">\n <span>${getLocStr(\"statsFollowing\")}</span>\n <span>${i.stats.following.humanize()}</span>\n </a>\n </li>\n <li>\n <a ${href}=\"/${i.screenName}/followers\">\n <span>${getLocStr(\"statsFollowers\")}</span>\n <span>${i.stats.followers.humanize()}</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n `\n }", "function SalesUpGratis(){\n tb_show('SalesUp! Gratis', 'salesupgratis.dbsp?keepThis=false&TB_iframe=true&height=280&width=750', '');\n }", "function getSummaryReport() {\n var result;\n result = {\n table: {\n widths: ['*'],\n body: [\n [{\n text: 'DILAPIDATION SURVEY REPORT SUMMARY',\n style: 'tableHeader'\n }],\n [{\n text: getIt('surveyReportSummary'),\n style: 'tableText'\n }]\n ]\n }\n };\n return result;\n}", "function printMessage(userName, badgeCount, points) {\n\tconst message = `${userName} has ${badgeCount} total badges and ${points} total JavaScript points`; \n\tconsole.log(message);\n}", "function format () {\n // `d` is the original data object for the row\n return '<table cellspacing=\"0\" class=\"dashboard long\">'+\n '<tr>'+\n '<th>Polling Station</th>'+\n '<th>Ballot Papers Issued</th>'+\n\t\t\t'<th>Postal Packs</th>'+\n\t\t\t'<th>Station Open</th>'+\n\t\t\t'<th>Status</th>'+\n '</tr>'+\n '<tr>'+\n '<td>1/AA Arbourthorne Cent and Forum Ltd</td>'+\n ' <td>100</td>'+\n\t\t\t' <td>5</td>'+\n\t\t\t' <td>YES</td>'+\n\t\t\t' <td class=\"green\"></td>'+\n '</tr>'+\n '<tr>'+\n '<td>2/AB Catholic Church of The Holy Family</td>'+\n ' <td>500</td>'+\n\t\t\t' <td>13</td>'+\n\t\t\t' <td>YES</td>'+\n\t\t\t' <td class=\"amber\"></td>'+\n '</tr>'+\n\t\t'<tr>'+\n '<td>3/AC Gleadless Utd Ref Church</td>'+\n ' <td>200</td>'+\n\t\t\t' <td>29</td>'+\n\t\t\t' <td>YES</td>'+\n\t\t\t' <td class=\"red\"></td>'+\n '</tr>'+\n\t\t'<tr>'+\n '<td>4/AD Arbourthorne Social Centre</td>'+\n ' <td>200</td>'+\n\t\t\t' <td>3</td>'+\n\t\t\t' <td>NO</td>'+\n\t\t\t' <td class=\"green\"></td>'+\n '</tr>'+\n '</table>';\n}", "function displaySchool(school) {\n return `\n <li class=\"list-group-item p-4\"><span class=\"text-muted\">School: </span>${school}</li>\n `\n}", "function showStats() {\n var infoName = '\\n' + pet.name.toUpperCase() + \"'s life: \";\n var infoParameters = \"Happiness: \" + pet.happiness + \", Food: \" + pet.food + \", Energy: \" + pet.energy;\n var stats = infoName + infoParameters;\n return stats;\n }", "function logstat(statistic) {\n let txt='';\n Log(\"Шел год \" + generation,\"gen\"); // \"Generation \"\n txt+=statTxt(`На планете всего было существ`,`начало`, allCreatures.length,statistic.female,statistic.male);\n if (allCreatures.length>0) txt+=`Из них: `\n txt+=statTxt(`Деревянн`,``,statistic.wood,statistic.woodFem,statistic.woodMale);\n txt+=statTxt(`Стальн`,``,statistic.steel,statistic.steelFem,statistic.steelMale);\n txt+=statTxt(`Духовн`,``,statistic.spirit,statistic.spiritFem,statistic.spiritMale);\n if ((statistic.water>statistic.waterIce&&statistic.waterIce>0)||\n (statistic.water>statistic.waterLiquid&&statistic.waterLiquid>0)||\n (statistic.water>statistic.waterSream&&statistic.waterSream>0)) \n {txt+=statTxt(`Водян`,``,statistic.water,statistic.waterFem,statistic.waterMale); txt+` А из водяных существ:`}\n else if (statistic.water>0) {txt+=`Водно-`}\n txt+=statTxt(`Ледян`,``,statistic.waterIce,statistic.waterIceFem,statistic.waterIceMale);\n txt+=statTxt(`Жидк`,``,statistic.waterLiquid,statistic.waterLiquidFem,statistic.waterLiquidMale);\n txt+=statTxt(`Парообразн`,``,statistic.waterSream,statistic.waterSreamFem,statistic.waterSreamMale);\n Log(txt,\"stat\"); \n/* `All-${allCreatures.length} f-${statistic.female}/m-${statistic.male}\nWood-${statistic.wood} f-${statistic.woodFem}/m-${statistic.woodMale}\nSteel-${statistic.steel} f-${statistic.steelFem}/m-${statistic.steelMale}\nSpirit-${statistic.spirit} f-${statistic.spiritFem}/m-${statistic.spiritMale}\nWater-${statistic.water} f-${statistic.waterFem}/m-${statistic.waterMale}\nIce water-${statistic.waterIce} f-${statistic.waterIceFem}/m-${statistic.waterIceMale}\nLiquid water-${statistic.waterLiquid} f-${statistic.waterLiquidFem}/m-${statistic.waterLiquidMale}\nWaterSream-${statistic.waterSream} f-${statistic.waterSreamFem}/m-${statistic.waterSreamMale}\n`*/\n}", "render() {\n\t\treturn (\n\t\t\t<div>[User Panel Placeholder]</div>\n\t\t)\n\t}", "function GGTRCC_RenderBowlingSummary (aPLSO, aBowlingGraphInfo)\r\n{\r\n\tvar lRet=\"\";\r\n\r\n\tlRet += \"<span class='GadgetStatsHeading'>Career Bowling Summary</span>\";\r\n\t\r\n\tif (0 == aBowlingGraphInfo.length)\r\n\t{\r\n\t\tlRet += \"<br>There is no Bowling record for this player<br><br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//\r\n\t\t// Do we have enough entries to warrent a graph?\r\n\t\t//\r\n\t\tif (1 < aBowlingGraphInfo.length)\r\n\t\t{\r\n\t\t\tlRet += GGTRCC_PlayerLTGraph_MakeBowlingGraphHTML (aBowlingGraphInfo) + \"<br><br>\";\r\n\t\t}\r\n\t\t\r\n\t\tlRet += GGTRCC_RenderBowlingTotals (aPLSO.mLifetimeBowlingTotals) + \"<br>\";\r\n\t}\r\n\r\n\treturn (lRet);\r\n}", "function generateAbuseReport(scam) {\n let abusereport = stripIndents`I would like to inform you of suspicious activities at the domain ${url.parse(scam.url).hostname}\n ${'ip' in scam ? `located at IP address ${scam['ip']}`: ''}.\n\n ${'subcategory' in scam && scam.subcategory == \"NanoWallet\" ?\n `The domain is impersonating NanoWallet.io, a website where people can create\n Nano wallets (a cryptocurrency like Bitcoin).` : ''}\n\n ${'category' in scam && scam.category == \"Fake ICO\" ?\n `The domain is impersonating a website where an ICO is being held (initial coin offering, like\n an initial public offering but it's for cryptocurrencies)` : ''}\n\n ${'category' in scam && scam.category == \"Phishing\" ?\n `The attackers wish to steal funds by using phishing to get the victim's private keys (passwords to a wallet)\n and using them to send funds to their own wallets.` : ''}\n\n ${'category' in scam && scam.category == \"Fake ICO\" ?\n `The attackers wish to steal funds by cloning the real website and changing the XRB address so\n people will send funds to the attackers' address instead of the real address.` : ''}\n\n Please shut down this domain so further attacks will be prevented.`\n\n return abusereport\n}", "function outputGenerator() {\n\n let profile = `** SPY PROFILE! DO NOT DISTRIBUTE! **\n\nNAME: ${spyProfile.name}\nALIAS: ${spyProfile.alias}\nSECRET WEAPON: ${spyProfile.secretWeapon}\nPASSWORD: ${spyProfile.password}`;\n\n profile = profile.toUpperCase();\n\n push();\n textFont(compFont);\n textSize(24);\n textAlign(CENTER, CENTER);\n fill(spyProfile.color.r, spyProfile.color.g, spyProfile.color.b);\n text(profile, width/2, height/2);\n pop();\n}", "function printMessage(username, badgeCount, points) {\n const message = `${username} has ${badgeCount} total badge(s) and ${points} points in Javascript`;\n console.log(message);\n}", "function toUserStr( msg ) {\n return \"<p class='random'>\" + msg.userName + toTimeStr(msg.messageTime) + \": \" + msg.message + \"<br/></p>\";\n }", "get HTML() {\n\t\treturn `${this.worldTime.toDateString()}<br>${this.hour}:${this.minute} ${this.meridiem}<br>Sunlight ${this.game.sun.sunlight}`;\n\t}", "function build_report_txt() {\n\n var txt = [];\n txt.push(\"Page Size Inspector Report\\n\");\n txt.push(\"URL: \"+ tab_url);\n txt.push(Date().toString() + \"\\n\");\n txt.push(build_line(\"REQUEST\", \"REQ\", \"BYTES\", \"CACHEREQ\", \"CACHEBYTES\"));\n\n // total\n var t = table_data.sections.total;\n txt.push(\"\\n\"+build_line(\"TOTAL\", t.reqtransf, t.kbtransf,\n t.reqcached, t.kbcached, \"_\"));\n\n // sections\n var sections = [\"Document\", \"Script\", \"Stylesheet\", \"Image\", \"XHR\",\n \"Font\", \"Other\"];\n const MAX_URL = 45;\n for (const sname of sections) {\n var num = table_data.sections[sname+\"count\"] || {};\n txt.push(\"\\n\"+build_line(sname, num.reqtransf, num.kbtransf,\n num.reqcached, num.kbcached, \"_\"));\n\n var sect = table_data.sections[sname] || [];\n for (const req of sect) {\n var prefix = req.size ? '-' : '+';\n var code = req.code != 200 ? req.code + ' ' : '';\n var url = sanitize_url(req.url, MAX_URL, true) || req.url_display;\n url = prefix + code + url;\n\n txt.push(build_line(url, 0, req.size, 0, req.sizecache));\n }\n }\n\n txt.push(\"\");\n\n var s = txt.join(\"\\n\");\n// deb(s);\n return s;\n}", "function print_lunchroom(room) {\n function print_guests(guests) {\n\tif (guests.length > 0) {\n\t mentions = guests.map(function(username) {\n\t\treturn makeMention(username)\n\t });\n\t return 'with ' + mentions.join(', ') + ' ';\n\t}\n\treturn '';\n };\n\n function print_creator(creator) {\n\t // Look up department in db \n\t if (creator in employees.db) {\n\t return makeMention(creator) + \" from \" + employees.db[creator]['department'] + ' '\n\t }\n\t return creator + ' '\n };\n\n function print_time(time) {\n if (time.getMinutes() < 10) {\n var minutes = \"0\" + time.getMinutes();\n } else {\n var minutes = time.getMinutes();\n }\n return time.getHours() + ':' + minutes;\n };\n\n function print_where(room) {\n if (room['url']) {\n return room['where'] + ' ['+room['url']+']';\n } else {\n return room['where'];\n }\n };\n\n if (hasLeft(room)) {\n return print_creator(room['creator']) + 'went to ' + print_where(room) + ' '\n + print_guests(room['who']) + 'at ' + print_time(room['when'])\n + ', from ' + room['meet'];\n } else {\n return print_creator(room['creator']) + 'is going to ' + print_where(room) + ' '\n + print_guests(room['who']) + 'at ' + print_time(room['when'])\n + ', meeting at ' + room['meet'];\n }\n}", "function oldScoreboardGameSummaries(myGames, roundNo, phase, settings) {\n var html = '';\n for(var i in myGames) {\n var g = myGames[i];\n if((phase == 'all' || g.phases.includes(phase)) && g.round == roundNo) {\n var linkId = 'R' + roundNo + '-' + g.team1.replace(/\\W/g, '') + '-' +\n g.team2.replace(/\\W/g, '');\n if(g.forfeit) {\n html += '<br><span id=\\\"' + linkId + '\\\"><font size=+1>' + g.team1 +\n ' defeats ' + g.team2 + ' by forfeit' + '</font></span><br>';\n }\n else {\n html += '<p>' + '\\n';\n html += '<span id=\\\"' + linkId + '\\\"><font size=+1>';\n if(toNum(g.score1) >= toNum(g.score2)) {\n html += g.team1 + ' ' + g.score1 + ', ' + g.team2 + ' ' + g.score2;\n }\n else {\n html += g.team2 + ' ' + g.score2 + ', ' + g.team1 + ' ' + g.score1;\n }\n if(g.ottu > 0) {\n html += ' (OT)';\n }\n html += '</font></span><br>' + '\\n' +\n '<font size=-1>' + '\\n';\n html += g.team1 + ': ';\n for(var p in g.players1) {\n var [tuh, pwr, tn, ng] = playerSlashLine(g.players1[p]);\n html += p + ' ';\n if(settings.powers != 'none') {\n html += pwr + ' ';\n }\n html += tn + ' ';\n if(settings.negs == 'yes') {\n html += ng + ' ';\n }\n html += (powerValue(settings)*pwr + 10*tn + negValue(settings)*ng) + ', ';\n }\n html = html.substr(0, html.length - 2); //remove the last comma+space\n html += '<br>' + '\\n';\n html += g.team2 + ': ';\n for(var p in g.players2) {\n var [tuh, pwr, tn, ng] = playerSlashLine(g.players2[p]);\n html += p + ' ';\n if(settings.powers != 'none') {\n html += pwr + ' ';\n }\n html += tn + ' ';\n if(settings.negs == 'yes') {\n html += ng + ' ';\n }\n html += (powerValue(settings)*pwr + 10*tn + negValue(settings)*ng) + ', ';\n }\n html = html.substr(0, html.length - 2); //remove the last comma+space\n html += '<br>' + '\\n';\n if(settings.bonuses != 'none') {\n var bHeard = bonusesHeard(g, 1), bPts = bonusPoints(g, 1, settings);\n var ppb = bHeard == 0 ? 0 : bPts / bHeard;\n html += 'Bonuses: ' + g.team1 + ' ' + bHeard + ' ' + bPts + ' ' + ppb.toFixed(2) + ', ';\n bHeard = bonusesHeard(g, 2), bPts = bonusPoints(g, 2, settings);\n ppb = bHeard == 0 ? 0 : bPts / bHeard;\n html += g.team2 + ' ' + bHeard + ' ' + bPts + ' ' + ppb.toFixed(2) + '<br>' + '\\n';\n }\n if(settings.bonuses == 'yesBb') {\n var bbHrd = bbHeard(g, 1, settings);\n var ppbb = bbHrd.toString()=='0,0' ? 0 : g.bbPts1 / bbHrdToFloat(bbHrd);\n html += 'Bonus Bouncebacks: ' + g.team1 + ' ' +\n bbHrdDisplay(bbHrd) + ' ' + toNum(g.bbPts1) + ' ' + ppbb.toFixed(2) + ', ';\n bbHrd = bbHeard(g, 2, settings);\n ppbb = bbHrd.toString()=='0,0' ? 0 : g.bbPts2 / bbHrdToFloat(bbHrd);\n html += g.team2 + ' ' + bbHrdDisplay(bbHrd) + ' ' + toNum(g.bbPts2) + ' ' +\n ppbb.toFixed(2) + '<br>' + '\\n';\n }\n }//else not a forfeit\n }//if we want to show this game\n }//loop over all games\n return html + '</font>' + '\\n' + '</p>' + '\\n';\n}//scoreboardGameSummaries", "function quickCheck(beatmap, userid)\n{\n console.log(beatmap);\n // Check the game mode\n if (beatmap.mode != 0)\n return \"This map is for the wrong gamemode\";\n // Check drain time\n if (beatmap.hit_length - drainBuffer > maxLength)\n return `Drain time is more than ${drainBuffer} seconds above the ${convertSeconds(maxLength)} limit. (${convertSeconds(map.hit_length)})`;\n else if (beatmap.hit_length + drainBuffer < minLength)\n return `Drain time is more than ${drainBuffer} seconds below the ${convertSeconds(minLength)} limit. (${convertSeconds(map.hit_length)})`;\n // Check total time\n if (beatmap.total_length > absoluteMax)\n return `Total map time is above the ${convertSeconds(absoluteMax)} limit. (${convertSeconds(beatmap.total_length)})`;\n // Check difficulty\n if (beatmap.difficultyrating > maxStar)\n return `Star rating is above the ${maxStar.toFixed(2)} maximum. (${beatmap.difficultyrating})`;\n else if (beatmap.difficultyrating < minStar)\n return `Star rating is below the ${minStar.toFixed(2)} minimum. (${beatmap.difficultyrating})`;\n // Make sure the user didn't make this map themself\n console.log(`Did ${userid} map this?`);\n console.log(`Unranked: ${beatmap.approved != 1} | Creator matches: ${beatmap.creator_id == userid}`);\n if (beatmap.approved != 1 && beatmap.creator_id == userid)\n return `You can't submit your own maps unless they're ranked`;\n}", "makePrologue() {\n const s = '<div class=\"table-responsive\" style=\"overflow:auto; height:700px;\">'\n + '<table class=\"table table-fit table-sm table-striped\"'\n + 'id=\"ranking\" valign=\"top\">';\n return s;\n }", "function formatSummary(card_data) {\n\tif (card_data.currentlySummary !== undefined) {\n\t\tvar currently = formatCurrentlySummary(card_data.currentlySummary);\n\t} else {\n\t\tvar currently = '';\n\t}\n\n\tif (card_data.dailySummary !== undefined) {\n\t\tvar daily = card_data.dailySummary;\n\t} else {\n\t\tvar daily = '';\n\t}\n\n\tif (card_data.currentlySummary == undefined && card_data.dailySummary == undefined) {\n\t\treturn 'Weekly forecast summary not available.';\n\t} else {\n\t\treturn currently + daily;\n\t}\n}", "showFullName() {\n return `${this._fullName}`;\n }", "function incidentReportAsString(report) {\n if (report.number == null) {\n document.title = \"New Incident Report\";\n } else {\n return (\n \"Report #\" + report.number +\n \" (\" + incidentReportAuthor(report) + \"): \" +\n summarizeIncidentReport(report)\n );\n }\n}", "function sc(floor){\n console.log(floor)\n if(floor<=1) return \"\";\n if(floor<=6) return 'Aa~ '.repeat(floor-1) +'Pa! Aa!';\n if(floor>6) return 'Aa~ '.repeat(floor-1) +'Pa!';\n if(floor<3) return 'Aa~ Pa! Aa!';\n}", "function displayFrind(mate){\n\t\treturn mate.name + \" \" + mate.age + \" \" + mate.hoby + \" \"+ mate.gender\n\t}", "function renderShowResortAdmin(data,stats){\n $('#resorts_info_admin').html(\"<h3 id=admin_resort>\"+ \"ID: \" +data.id+ \" Name: \"+ data.name + \" Vertical: \" + data.vertical +\" Acres: \"+ data.acres + \" Station: \" + data.location + \" Users: \"+ stats +\"</h3>\");\n }", "function generateWorkout(user) {\n const workouts = [{\n user: user._id,\n name: \"Morning\"\n }, {\n user: user._id,\n name: \"Afternoon\"\n }, {\n user: user._id,\n name: \"Evening\"\n }, {\n user: user._id,\n name: \"Best\"\n }];\n return workouts[0];\n}", "function my_title_format (window) {\n return '{'+get_current_profile()+'} '+window.buffers.current.description;\n}", "function message_string(number_of_users) {\n return number_of_users === 1 ? \"there's 1 participant\" : \"there are \" + number_of_users + \" participants\"\n }", "function showAbsenceDetails_old() {\ncontent = \"Abwesenheit\";\nactiveDataSet = studentList.find(dataset => dataset.absenceId == activeElement);\nif (activeDataSet['ende'] != activeDataSet['beginn']) {\ncontent += \" vom <b>\" + formatDateDot(activeDataSet['beginn']) + \"</b> bis <b>\" +formatDateDot(activeDataSet['ende']);\t\n} else {\ncontent += \" am <b>\" + formatDateDot(activeDataSet['beginn']) + \"</b>\";\t\n}\nanzeige = \"\";\nif (activeDataSet['adminMeldung'] != 0) {\nanzeige = \"Eintrag Sekretariat am: \" + formatDateDot(activeDataSet['adminMeldungDatum'])+'<br/>';\t\n}\nif (activeDataSet['lehrerMeldung'] != \"0\") {\nanzeige += \"Meldung Lehrer am: \" + formatDateDot(activeDataSet['lehrerMeldungDatum'])+'<br/>';\t\n}\nif (activeDataSet['elternMeldung'] != \"0\") {\nanzeige += \"Eintrag Eltern am: \" + formatDateDot(activeDataSet['elternMeldungDatum']);\t\n}\nif (activeDataSet['kommentar'] != \"0\") {\nanzeige += \"Kommentar: \" + formatDateDot(activeDataSet['kommentar']);\t\n}\ncontent += '<br/>' + anzeige;\n\nreturn content;\t\n}", "printScore() {\n if (this.gameOver()) {\n return `${this.getLeadingPlayer()} wins the game`;\n }\n if (this.deuce()) {\n return 'Deuce';\n }\n if (this.inAdvantage()) {\n return `${this.getLeadingPlayer()} has the advantage`;\n }\n return `Score is ${this.scoreNames[this.playerOneScore]} - ${this.scoreNames[this.playerTwoScore]}`;\n }", "showUsers(userArray) {\n\t\tuserArray = userArray.slice(0, 10);\n\t\t//add @ sign to each entry\n\t\tuserArray = userArray.map((elem) => {\n\t\t\treturn {\n\t\t\t\t...elem,\n\t\t\t\tusername: elem.username.charAt(0) === '@' ? elem.username : `@${elem.username}`\n\t\t\t};\n\t\t});\n\t\tthis.screenWidth = this.sys.canvas.width;\n\t\tthis.screenHeight = this.sys.canvas.height;\n\n\t\t//calculate line height to fill every screen equally\n\t\tlet lineGraphics = this.add.graphics({\n\t\t\tlineStyle: {width: 2, color: 0x4e3663}\n\t\t});\n\t\tconst gap = (this.screenHeight - 170) / 10;\n\t\tfor (let i = 0; i < (userArray.length - 1); i++) {\n\t\t\tlineGraphics.lineBetween(30, 143 + (gap / 2) + (gap * i), this.screenWidth - 30, 143 + (gap / 2) + (gap * i));\n\t\t}\n\t\tfor (let i = 0; i < userArray.length; i++) {\n\t\t\tthis.add.text(20, 143 + (gap * i), userArray[i].username, Config.fonts.leaderboardUserName).setOrigin(0, 0.5);\n\t\t\tthis.add.text(this.screenWidth - 20, 143 + (gap * i), userArray[i].score, Config.fonts.leaderboardUserScore).setOrigin(1, 0.5);\n\t\t}\n\t}", "function your_stats(username) {\n\tlet params = {\n\t\t\t\tmethod: \"GET\",\n\t\t\t\turl: \"/api/stats/\"+username\n\t\t\t\t};\n\t$.ajax(params).done(function(data) {\n\t\tvar stats = '<div style=\"border:1px solid black\"><table><tr><th> High Score </th>'+\n\t'<th> Wins </th><th> Losses </th><th> Win:Loss </th></tr>';\n\t\tstats += \"<tr><th>\"+data[username].highscore+\"</th><th>\"+data[username].numGamesWon\n\t\t+\"</th><th>\"+data[username].numGamesLost+\"</th><th>\"\n\t\t+(data[username].numGamesWon/data[username].numGamesLost).toFixed(2)+\"</th></tr>\";\n\t\tstats += '</table>' ;\n\t\t$(\"#user-score\").html(stats);\n\t});\n}" ]
[ "0.68696153", "0.67091095", "0.58703655", "0.58037055", "0.5690617", "0.56840926", "0.56504303", "0.5626813", "0.55754954", "0.5566497", "0.55646896", "0.5559293", "0.54887426", "0.5483268", "0.5476705", "0.5465037", "0.54605424", "0.5443541", "0.54333824", "0.5423004", "0.54099447", "0.54072976", "0.539538", "0.53862536", "0.5372017", "0.536952", "0.5350074", "0.5340502", "0.53395617", "0.5324475", "0.5313666", "0.5294851", "0.5284825", "0.52809685", "0.52765495", "0.527251", "0.5271148", "0.52627546", "0.5261265", "0.52514756", "0.52086055", "0.5202318", "0.51993024", "0.5193202", "0.5185191", "0.518247", "0.5168011", "0.5160155", "0.515973", "0.51408374", "0.51370835", "0.5134961", "0.5125449", "0.5118107", "0.5115428", "0.51065606", "0.51058286", "0.5101627", "0.50998527", "0.5098846", "0.5092253", "0.50846577", "0.50841856", "0.5082075", "0.50733674", "0.5071285", "0.5067096", "0.5067091", "0.5034086", "0.50231415", "0.50230825", "0.5022267", "0.5018747", "0.5016318", "0.501437", "0.5014035", "0.5009116", "0.4998954", "0.49951768", "0.49841526", "0.49805367", "0.49723503", "0.49694034", "0.49689573", "0.49684525", "0.49662718", "0.49570945", "0.49565962", "0.4955997", "0.49404904", "0.49356169", "0.49320066", "0.4926646", "0.492594", "0.49234545", "0.49204993", "0.4917436", "0.4911746", "0.491064", "0.4906273" ]
0.75525874
0
Obtengo los medicamentos de un determinado paciente
function getMedicamentosPaciente(req, res){ console.log('- GET MEDICAMENTOS PACIENTE -'); var query = Paciente.findById(req.params.idPaciente); query.populate({ path: 'medicamentos', model: 'Medicamento' }) .exec(function (err, paciente) { if (err) { return res.status(400).json({ title: 'An error occurred', error: err }); } if (!paciente) { return res.status(404).json({ title: 'Error', error: 'Paciente no encontrado' }); } res.status(200).json({ message: 'Success', obj: paciente.medicamentos }); }); /*console.log("El paciente: "+paciente); //preguntar como itero y obtengo los valores.. console.log("id paciente: "+paciente._id+" Consumicion paciente: "+paciente.consumiciones); paciente.consumiciones.forEach(element => { Medicamento.findById(element.medicamento, function (err, medicamentos) { if (err) { return res.status(400).json({ title: 'Error', error: err }); } if (!medicamentos) { return res.status(404).json({ title: 'Error', error: err }); } res.status(200).json({ message: 'Success', obj: medicamentos }); }); });*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function diasMonitoradosPaciente() {\n\tvar diasMonitorados = pacientesJson[numIdPacAtual].diasMonitorados;\n\n\treturn diasMonitorados;\n}", "function obtenerPacientes() {\n return pacientes;\n}", "function getMissionMeta () {\n Mission.getMissionMeta(vm.missionID) \n .then(function (missionData) {\n for (var key in missionData) {\n vm.mission[key] = missionData[key];\n }\n trajectoryGraphic();\n });\n }", "function obtenerMeses(){\n cxcService.getParMes({}, {},serverConf.ERPCONTA_WS, function (response) {\n //exito\n console.info(\"libroCompras: Meses\",response.data);\n $scope.listaMeses = response.data;\n\n }, function (responseError) {\n console.log(responseError);\n });\n }", "function obtemPacienteFormulario(form) {\n var paciente = {\n nome: form.nome.value,\n peso: form.peso.value,\n altura: form.altura.value,\n gordura: form.gordura.value,\n imc: calcularImc(form.peso.value, form.altura.value)\n }\n return paciente;\n}", "function calculoYMuestroPropuestas (datos) {\n\n \tconst tasaA = objTasas.tasaA;\n \tconst tasaB = objTasas.tasaB;\n \tconst tasaC = objTasas.tasaC;\n\n \tconst propuestaA = new Propuesta(datos.valor_inmueble, datos.monto_credito, datos.plazo, tasaA.tasa_anual, tasaA.comision_apertura_porcentaje, tasaA.comision_admin, tasaA.avaluo)\n \tconst propuestaB = new Propuesta(datos.valor_inmueble, datos.monto_credito, datos.plazo, tasaB.tasa_anual, tasaB.comision_apertura_porcentaje, tasaB.comision_admin, tasaB.avaluo)\n \tconst propuestaC = new Propuesta(datos.valor_inmueble, datos.monto_credito, datos.plazo, tasaC.tasa_anual, tasaC.comision_apertura_porcentaje, tasaC.comision_admin, tasaC.avaluo)\n\n \tdivPropuestas.innerHTML = propuestasAMLAI(propuestaA, propuestaB, propuestaC)\n }", "function listarMedicoCadastrados(cnpjClinica, res){\n\t\tconnection.acquire(function(err, con){\n\t\t\tcon.query(\"select crmv, nomeMedico, telefoneMedico, emailMedico from Medico, Estados, Clinica where Medico.Estados = Clinica.Estados and Medico.Estados = Estados.idEstados and Clinica.Estados = Estados.idEstados and Clinica.cnpj = \"+cnpjClinica+\"\", function(err, result){\n\t\t\t\tcon.release();\n\t\t\t\tres.json(result);\n\t\t\t});\n\t\t});\n\t}", "function dadosDiaPacienteAtual(dataEscolhida) {\n\n\tvar diasMonitorados = pacientesJson[numIdPacAtual].diasMonitorados;\n\tvar dados = [];\n\tfor (var i = 0; i < diasMonitorados.length; i++) {\n\t\tif (diasMonitorados[i].data == dataEscolhida) {\n\t\t\tdados = diasMonitorados[i].dadosHoras;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn dados;\n}", "function listarMedicoseAuxiliares(usuario, res){\n\t\tconnection.acquire(function(err, con){\n\t\t\tcon.query(\"select crmv, nomeMedico, telefoneMedico, emailMedico from Medico, Responsavel where Medico.Estado = Responsavel.Estado and Medico.Cidade = Responsavel.Cidade and Responsavel.idusuario = ?\", [usuario.idusuario], function(err, result){\n\t\t\t\tcon.release();\n\t\t\t\tres.json(result);\n\t\t\t});\n\t\t});\n\t}", "function jogosDaRespawn(){\n let jogos = [];\n\n for (let categoria of jogosPorCategoria) {\n for ( let jogo of categoria.jogos ) {\n if (jogo.desenvolvedora == \"Respawn Entertainment\"){\n jogos.push(jogo.titulo)\n } \n }\n }\n console.log(\"Os jogos da Respawn Entertainment são \" + jogos)\n}", "function obt_medicines(queryData, funcion){\n\tconsole.log(\"Realiza funcion obtener medicinas...\");\n\tdb.medicines.find({ enable: '0' },{ medicine: '0', _id: 0 },function(err, data){\n\t\tvar m = [];\n\t\tfor(var i in data){\n\t\t\tm.push(data[i].medicine);\n\t\t}\n\t\tfuncion(err,m)\n\t});\n}", "async getDatosAcopio() {\n let query = `SELECT al.almacenamientoid, ca.centroacopioid, ca.centroacopionombre, \n concat('Centro de Acopio: ', ca.centroacopionombre, ' | Propietario: ', pe.pernombres, ' ', pe.perapellidos) \"detalles\"\n FROM almacenamiento al, centroacopio ca, responsableacopio ra, persona pe\n WHERE al.centroacopioid = ca.centroacopioid AND ca.responsableacopioid = ra.responsableacopioid AND ra.responsableacopioid = pe.personaid;`;\n let result = await pool.query(query);\n return result.rows; // Devuelve el array de json que contiene todos los controles de maleza realizados\n }", "function melhorEco(dados) {\n return dados;\n}", "async busca_todos_os_dados( caminhoes ){\n const caminhoes_c_dados = Promise.all(\n caminhoes.map( async (item) => {\n\n const caminhao = await connection('fDescarregamento')\n .select('*')\n .where( 'ID', '=', item.ID );\n\n if ( caminhao.length > 0 ){\n const [{ Status, Chegada, Saida, Peso_chegada, Peso_saida, Assinaturas }] = caminhao;\n\n return { ...item, Status, Chegada, Saida, Peso_chegada, Peso_saida, Assinaturas: JSON.parse( Assinaturas ) };\n } else return item;\n\n })\n );\n\n return caminhoes_c_dados;\n }", "function _DependenciasProficienciaArmas() {\n var todas_simples = false;\n var todas_comuns = false;\n gPersonagem.proficiencia_armas = {};\n for (var i = 0; i < gPersonagem.classes.length; ++i) {\n var chave_classe = gPersonagem.classes[i].classe;\n var tabela_classe = tabelas_classes[chave_classe];\n var armas_classe = tabela_classe.proficiencia_armas || [];\n for (var j = 0; j < armas_classe.length; ++j) {\n gPersonagem.proficiencia_armas[armas_classe[j]] = true;\n if (armas_classe[j] == 'arco_curto' || armas_classe[j] == 'arco_longo') {\n for (var arma_tabela in tabelas_armas_comuns) {\n if (arma_tabela.indexOf(armas_classe[j]) == 0) {\n gPersonagem.proficiencia_armas[arma_tabela] = true;\n } \n }\n }\n }\n // TODO usar a nova funcao de PersonagemProficienteTipoArma.\n var talentos_classe = tabela_classe.talentos || [];\n for (var j = 0; j < talentos_classe.length; ++j) {\n if (talentos_classe[j] == 'usar_armas_simples') {\n todas_simples = true;\n } else if (talentos_classe[j] == 'usar_armas_comuns') {\n todas_comuns = true;\n }\n }\n }\n gPersonagem.proficiencia_armas['desarmado'] = true;\n gPersonagem.proficiencia_armas['manopla'] = true;\n if (todas_simples) {\n for (var arma in tabelas_armas_simples) {\n gPersonagem.proficiencia_armas[arma] = true;\n }\n }\n if (todas_comuns) {\n for (var arma in tabelas_armas_comuns) {\n gPersonagem.proficiencia_armas[arma] = true;\n }\n // Familiaridade.\n for (var arma in tabelas_raca[gPersonagem.raca].familiaridade_arma) {\n gPersonagem.proficiencia_armas[arma] = true;\n }\n }\n // Raciais.\n var armas_raca = tabelas_raca[gPersonagem.raca].proficiencia_armas;\n for (var i = 0; armas_raca != null && i < armas_raca.length; ++i) {\n gPersonagem.proficiencia_armas[armas_raca[i]] = true;\n }\n\n // Talentos. Preciso obter o nome da chave na tabela de armas.\n for (var chave_classe in gPersonagem.talentos) {\n var lista_classe = gPersonagem.talentos[chave_classe];\n for (var i = 0; i < lista_classe.length; ++i) {\n var talento = lista_classe[i];\n if ((talento.chave == 'usar_arma_comum' ||\n talento.chave == 'usar_arma_exotica') &&\n (talento.complemento != null) &&\n talento.complemento.length > 0) {\n var chave_arma = tabelas_armas_invertida[talento.complemento];\n // TODO remover essa verificacao quando o input dos talentos estiver\n // terminado.\n if (chave_arma == null) {\n Mensagem(Traduz('Arma') + ' \"' + talento.complemento + '\" ' + Traduz('inválida para talento') + ' \"' +\n Traduz(tabelas_talentos[talento.chave].nome) + '\"');\n continue;\n }\n var arma_tabela = tabelas_armas[chave_arma];\n if (arma_tabela.talento_relacionado != talento.chave) {\n // verifica familiaridade.\n var familiar = false;\n if (arma_tabela.talento_relacionado == 'usar_arma_exotica' &&\n tabelas_raca[gPersonagem.raca].familiaridade_arma &&\n tabelas_raca[gPersonagem.raca].familiaridade_arma[chave_arma] &&\n talento.chave == 'usar_arma_comum') {\n familiar = true;\n }\n if (!familiar) {\n Mensagem(Traduz('Arma') + ' \"' + talento.complemento + '\" ' + Traduz('inválida para talento') + ' \"' +\n Traduz(tabelas_talentos[talento.chave].nome) + '\"');\n continue;\n }\n }\n gPersonagem.proficiencia_armas[chave_arma] = true;\n }\n }\n }\n}", "function profile_get_metabolics(){\n\n\tvar out = {};\n\n\tout.energy = {\n\t\t'value' : this.metabolics.energy.value,\n\t\t'max' : this.metabolics.energy.top,\n\t};\n\n\tout.mood = {\n\t\t'value' : this.metabolics.mood.value,\n\t\t'max' : this.metabolics.mood.top,\n\t};\n\n\treturn out;\n}", "function _GeraPontosDeVida(modo, submodo) {\n if (modo != 'personagem' && modo != 'elite' && modo != 'comum') {\n Mensagem(Traduz('Modo') + ' ' + modo + ' ' + Traduz('invalido') + '. ' + Traduz('Deve ser elite, comum ou personagem.'));\n return;\n }\n // Para cada classe, rolar o dado.\n var total_pontos_vida = 0;\n // Primeiro eh diferente na elite e personagem.\n var primeiro = (modo == 'comum') ? false : true;\n for (var i = 0; i < gPersonagem.classes.length; ++i) {\n var info_classe = gPersonagem.classes[i];\n for (var j = 0; j < info_classe.nivel; ++j) {\n var pontos_vida_nivel = 0;\n var template_personagem = PersonagemTemplate();\n var dados_vida = template_personagem != null && 'dados_vida' in template_personagem ?\n template_personagem.dados_vida :\n tabelas_classes[info_classe.classe].dados_vida;\n if (primeiro) {\n if (modo == 'elite') {\n pontos_vida_nivel = dados_vida;\n } else if (modo == 'personagem') {\n // O modificador de constituicao eh subtraido aqui pq sera adicionado\n // no calculo de pontos de vida, nos bonus.\n pontos_vida_nivel = dados_vida +\n gPersonagem.atributos['constituicao'].valor -\n gPersonagem.atributos['constituicao'].modificador;\n } else {\n pontos_vida_nivel = submodo == 'tabelado' ? dados_vida / 2 : Rola(1, dados_vida);\n }\n primeiro = false;\n } else {\n pontos_vida_nivel = submodo == 'tabelado' ? dados_vida / 2 : Rola(1, dados_vida);\n\n }\n // Nunca pode ganhar menos de 1 ponto por nivel.\n if (pontos_vida_nivel < 1) {\n pontos_vida_nivel = 1;\n }\n total_pontos_vida += pontos_vida_nivel;\n }\n }\n gPersonagem.pontos_vida.total_dados = Math.floor(total_pontos_vida);\n}", "function cargar_medicos() {\n var array = ['MARCELO GONZALEZ', 'MARIA ACEVEDO', 'CHRISTINA HAFERMALZ ADANIEL', 'DANIEL AGUIRRE', 'XIMENA AHUMADA', 'IGNACIA ALLENDE', 'RODRIGO PEREZ'];\n array.sort();\n addOptions(\"medico\", array);\n}", "function ciudades (){\nvar uniqueStorage = removeDuplicates(Storage, \"Ciudad\");\nvar atributos = Array();\n \n if( uniqueStorage.length > 0 ) {\n for( var aux in uniqueStorage )\n atributos.push(uniqueStorage[aux].Ciudad);\n }\n return atributos;\n}", "getMasses(id) {\n return this.getRoom(id).masses;\n }", "function getDesempenho(){\n init(1200, 500,\"#infos2\");\n executa(dados_atuais, 0,10,4);\n showLegendasRepetencia(false);\n showLegendasDesempenho(true);\n showLegendasAgrupamento(false);\n}", "function _ConvertePericias() {\n for (var i = 0; i < gEntradas.pericias.length; ++i) {\n var pericia_personagem = gPersonagem.pericias.lista[gEntradas.pericias[i].chave];\n pericia_personagem.pontos = gEntradas.pericias[i].pontos;\n pericia_personagem.complemento = 'complemento' in gEntradas.pericias[i] ? gEntradas.pericias[i].complemento : '';\n }\n}", "function getGeneralData(){\n\t\t// Idioma\n//\t\tfind(\"//script[@type='text/javascript']\", XPFirst).src.search(/\\/([^\\/]+)?3.js$/);\n\t\tfind(\"//img[contains(@src, 'plus.gif')]\", XPFirst).src.search(/\\/img\\/([^\\/]+)\\//);\n\t\tidioma = RegExp.$1;\n\n\t\t// Ruta al pack grafico\n\t\tfind(\"//link[@rel='stylesheet']\", XPFirst).href.search(/^(.*\\/)(.*)3.css$/);\n\t\tpack_grafico = RegExp.$1;\n\n\t\t// Identificador de aldea actual\n\t\tid_aldea = getIdAldea();\n\n\t\t// Identificador de usuario\n\t\tfind(\"//td[@class='menu']\", XPFirst).innerHTML.search(/spieler.php\\?uid=(\\d+)\"/);\n\t\tuid = RegExp.$1;\n\n\t\t// Nombre del servidor\n\t\tlocation.href.search(/http:\\/\\/(.*)\\//);\n\t\tserver = RegExp.$1;\n\n\t\t// Por cada tipo de recurso: cantidad actual almacenada, capacidad total del almacen / granero y produccion por segundo\n\t\tfor (var i = 0; i < 4; i++){\n\t\t\tactual[i] = get('l'+(i+1)).innerHTML.split(\"/\")[0];\n\t\t\ttotal[i] = get('l'+(i+1)).innerHTML.split(\"/\")[1];\n\t\t\tproduccion[i] = get('l'+(i+1)).title/3600;\n\t\t}\n\n\t\t// Plus\n\t\tif (find(\"//img[contains(@src, 'travian1.gif')]\", XPFirst)) plus = true; else plus = false;\n\t}", "async function getEspaciosPropiedad() {\n\n var result = await fetch('https://localhost:44302/api/espacio', {\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n });\n var json = await result.json();\n var espacios = json['Data'];\n\n var espaciosPropiedad = [];\n\n for (i in espacios) {\n if (espacios[i]['Id_Propiedad'] == idPropiedad)\n espaciosPropiedad.push(espacios[i]);\n }\n\n return espaciosPropiedad;\n}", "function mostrarPokemons(){\n return Object.values(pokemons);\n}", "function _CarregaPericias() {\n for (var chave_pericia in tabelas_pericias) {\n var pericia = tabelas_pericias[chave_pericia];\n var achou = false;\n for (var i = 0; i < pericia.classes.length; ++i) {\n // Aplica as pericias de mago a magos especialistas tambem.\n if (pericia.classes[i] == 'mago') {\n achou = true;\n break;\n }\n }\n if (!achou) {\n continue;\n }\n for (var chave_classe in tabelas_classes) {\n var mago_especialista = chave_classe.search('mago_') != -1;\n if (mago_especialista) {\n pericia.classes.push(chave_classe);\n }\n }\n }\n var span_pericias = Dom('span-lista-pericias');\n // Ordenacao.\n var divs_ordenados = [];\n for (var chave_pericia in tabelas_pericias) {\n var pericia = tabelas_pericias[chave_pericia];\n var habilidade = pericia.habilidade;\n var prefixo_id = 'pericia-' + chave_pericia;\n var div = CriaDiv(prefixo_id);\n var texto_span = Traduz(pericia.nome) + ' (' + Traduz(tabelas_atributos[pericia.habilidade]).toLowerCase() + '): ';\n if (tabelas_pericias[chave_pericia].sem_treinamento) {\n texto_span += 'ϛτ';\n }\n div.appendChild(\n CriaSpan(texto_span, null, 'pericias-nome'));\n\n var input_complemento =\n CriaInputTexto('', prefixo_id + '-complemento', 'input-pericias-complemento',\n {\n chave_pericia: chave_pericia,\n handleEvent: function(evento) {\n AtualizaGeral();\n evento.stopPropagation();\n }\n });\n input_complemento.placeholder = Traduz('complemento');\n div.appendChild(input_complemento);\n\n var input_pontos =\n CriaInputNumerico('0', prefixo_id + '-pontos', 'input-pericias-pontos',\n { chave_pericia: chave_pericia,\n handleEvent: function(evento) {\n ClickPericia(this.chave_pericia);\n evento.stopPropagation(); } });\n input_pontos.min = 0;\n input_pontos.maxlength = input_pontos.size = 2;\n div.appendChild(input_pontos);\n\n div.appendChild(CriaSpan(' ' + Traduz('pontos') + '; '));\n div.appendChild(CriaSpan('0', prefixo_id + '-graduacoes'));\n div.appendChild(CriaSpan('+0', prefixo_id + '-total-bonus'));\n div.appendChild(CriaSpan(' = '));\n div.appendChild(CriaSpan('+0', prefixo_id + '-total'));\n\n // Adiciona as gEntradas\n gEntradas.pericias.push({ chave: chave_pericia, pontos: 0 });\n // Adiciona ao personagem.\n gPersonagem.pericias.lista[chave_pericia] = {\n graduacoes: 0, bonus: new Bonus(),\n };\n // Adiciona aos divs.\n divs_ordenados.push({ traducao: texto_span, div_a_inserir: div});\n }\n divs_ordenados.sort(function(lhs, rhs) {\n return lhs.traducao.localeCompare(rhs.traducao);\n });\n divs_ordenados.forEach(function(trad_div) {\n if (span_pericias != null) {\n span_pericias.appendChild(trad_div.div_a_inserir);\n }\n });\n}", "function tipos (){\nvar uniqueStorage = removeDuplicates(Storage, \"Tipo\");\nvar atributos = Array();\n \n if( uniqueStorage.length > 0 ) {\n for( var aux in uniqueStorage )\n atributos.push(uniqueStorage[aux].Tipo);\n }\n return atributos;\n}", "function getCuponesPorIndustria(idIndustria){\n\t\n}", "function informacionPokemones(datos){\n const objetoInformacion = {\n nombre: datos.name,\n url_imagen : datos.sprites.other.dream_world.front_default,\n id_pokemon : datos.id\n }\n\n pokemonesData.push(objetoInformacion);\n}", "function CorrigePericias() {\n for (var chave in tabelas_pericias) {\n var achou = false;\n for (var i = 0; i < gEntradas.pericias.length; ++i) {\n var entrada_pericia = gEntradas.pericias[i];\n if (entrada_pericia.chave == chave) {\n achou = true;\n break;\n }\n }\n if (!achou) {\n gEntradas.pericias.push({ 'chave': chave, pontos: 0 });\n }\n }\n}", "obtenerProductoresMasculino() {\n return axios.get(`${API_URL}/v1/productorpersonaReporteM/`);\n }", "function getImonesPelnas( ) {\n let ats = imonesPajamos - imonesIslaidos - tomoAtlyginimas - antanoAtlyginimas - poviloAtlyginimas;\n return ats;\n}", "function pedir_tiempos_conc(){\n\tdataBase.query(\"USE reactor40\", function (err, result,field) {\n\t\t\tif (err) throw err;\n\t});\n\tdataBase.query('SELECT * FROM concentracion ORDER BY ID DESC LIMIT 20;', function(err, result, fiel){\n\t\tdatosY.y_1 = result[19].time;\n\t\tdatosY.y_2 = result[18].time;\n\t\tdatosY.y_3 = result[17].time;\n\t\tdatosY.y_4 = result[16].time;\n\t\tdatosY.y_5 = result[15].time;\n\t\tdatosY.y_6 = result[14].time;\n\t\tdatosY.y_7 = result[13].time;\n\t\tdatosY.y_8 = result[12].time;\n\t\tdatosY.y_9 = result[11].time;\n\t\tdatosY.y_10 = result[10].time;\n\t\tdatosY.y_11 = result[9].time;\n\t\tdatosY.y_12 = result[8].time;\n\t\tdatosY.y_13 = result[7].time;\n\t\tdatosY.y_14 = result[6].time;\n\t\tdatosY.y_15 = result[5].time;\n\t\tdatosY.y_16 = result[4].time;\n\t\tdatosY.y_17 = result[3].time;\n\t\tdatosY.y_18 = result[2].time;\n\t\tdatosY.y_19 = result[1].time;\n\t\tdatosY.y_20 = result[0].time;\n\t});\n}", "asistencia_persona(equipo){\n let len = equipo.length;\n let asistencias = [];\n\n for (var i = 0; i <len; ++i) {\n let asistencia_persona = equipo[i].asistencia;\n asistencias.push(asistencia_persona);\n \n }\n\n return asistencias;\n }", "function costruttoreDatiMesi(array) {\n var objIntermedio = {};\n var dataPC = [];\n for (var i = 0; i < array.length; i++) {\n var oggettoSingolo = array[i];\n var giornoVendita = oggettoSingolo.date;\n var meseVendita = moment(giornoVendita, \"DD-MM-YYYY\").clone().month(); // ottengo i numeri dei mesi che escono già ordinati nell'oggetto\n if (objIntermedio[meseVendita] === undefined) {\n objIntermedio[meseVendita] = 0;\n }\n objIntermedio[meseVendita] += parseInt(oggettoSingolo.amount);\n }\n for (var key in objIntermedio) {\n dataPC.push(objIntermedio[key]);\n }\n return dataPC;\n}", "function obtieneTipoFacturacion() {\n\t\tgenerarArrayDiasSemana();\n\t\tgenerarArrayMeses();\n\t\tset('frmGenerarCronograma.accion', 'obtieneTiposFacturacion');\n\t\tset('frmGenerarCronograma.conectorAction', 'LPMantieneCronograma');\n\t\tset('frmGenerarCronograma.hMarca', get('frmGenerarCronograma.cbMarcas'));\n\t\tset('frmGenerarCronograma.hCanal', get('frmGenerarCronograma.cbCanales'));\n\t\tset('frmGenerarCronograma.hCodPeriodo', get('frmGenerarCronograma.txtCodPeriod'));\n\t\tset('frmGenerarCronograma.hlblActiFija',GestionarMensaje('1002'));\n\t\tset('frmGenerarCronograma.hlblActiRefe',GestionarMensaje('1003'));\n\t\t//if (get('frmGenerarCronograma.casoDeUso') != 'Fase 2')\n\t\t\teval(\"frmGenerarCronograma.oculto = 'N'\");\n\t\tenviaSICC('frmGenerarCronograma');\n\t}", "function llenarTablaPuertasItemsMecanicos(){\n var url=\"http://www.montajesyprocesos.com/inspeccion/servidor/php/json_puertas_items_mecanicos.php\";\n $.getJSON(url,function(puertas_items_mecanicos){\n crearTablaPuertasItemsMecanicos(); \n $.each(puertas_items_mecanicos, function(i,items){\n addItemsPuertasItemsMecanicos(items.k_coditem_puertas,items.o_descripcion,items.v_clasificacion);\n });\n });\n}", "function calculaPontos(jogador) {\n var pontos = jogador.vitorias * 3 + jogador.empates;\n return pontos;\n }", "function obtenerPreguntasVariadas(pCantidad, pIndiceTema){\n var contador=0;\n var aPreguntas=[];\n var arrayOptionID=[];\n \n while(contador<pCantidad){\n var tema= {};\n var indiceTema= pIndiceTema;\n \n if(pIndiceTema == -1){\n\n //Si el tema es variado, se le asigna un tema aleatorio\n indiceTema= valorAleatorio(preguntasTrivia.length);\n }\n \n tema= preguntasTrivia[indiceTema]; \n \n var aleatorioPregunta= valorAleatorio(tema.Preguntas.length);\n var pregunta= tema.Preguntas[aleatorioPregunta];\n pregunta.iconClass=preguntasTrivia[indiceTema].iconClass;\n \n var optionID=construirOptionID(aleatorioPregunta,indiceTema);\n //se genera un id especifico a cada pregunta, si este no se encuentra ya asignado \n //se introduce la pregunta, evitar preguntas duplicadas\n if(arrayOptionID.indexOf(optionID,0) == -1){\n arrayOptionID.push(optionID);\n aPreguntas.push(pregunta);\n contador++;\n }\n }\n \n return aPreguntas;\n}", "function jogosDaDesenvolvedora(desenvolvedora){\n let jogos = [];\n\n for (let categoria of jogosPorCategoria) {\n for ( let jogo of categoria.jogos ) {\n if (jogo.desenvolvedora === desenvolvedora){\n jogos.push(jogo.titulo)\n } \n }\n }\n console.log(\"Os jogos da \" + desenvolvedora + \" são: \" + jogos)\n}", "function findPantryInfo() {\n user.pantry.forEach(item => {\n let itemInfo = ingredientsData.find(ingredient => {\n return ingredient.id === item.ingredient;\n });\n let originalIngredient = pantryInfo.find(ingredient => {\n if (itemInfo) {\n return ingredient.name === itemInfo.name;\n }\n });\n if (itemInfo && originalIngredient) {\n originalIngredient.count += item.amount;\n } else if (itemInfo) {\n pantryInfo.push({name: itemInfo.name, count: item.amount});\n }\n });\n let sortedPantry = pantryInfo.sort((a, b) => a.name.localeCompare(b.name));\n sortedPantry.forEach(ingredient => domUpdates.displayPantryInfo(ingredient))\n}", "function promedioPorcentaje(democrats, republicans, independents) {\n app.statistics.votesWithPartyD = promedio(democrats);\n app.statistics.votesWithPartyR = promedio(republicans);\n app.statistics.votesWithPartyI = promedio(independents);\n}", "function obtenerPostresDeclarativo(almuerzos) {\n let postres = [];\n for (i = 0; i < almuerzos.length; i++) {\n if (almuerzos[i].principal === \"taco\") {\n postres.push(almuerzos[i].postre);\n }\n }\n\n return postres;\n}", "function municoesAndam(){\n\tif(jogoEmAndamento==true){\n\t\tmunicoes.forEach(andarMunicao);\n\t}\n}", "function mostrarPermisos(data){\n\n\t\tif(data.add == 1){\n\t\t\taddIcoPermOk(\"add-est\");\n\t\t\taddBtnQuitar(\"add\");\n\t\t}else{\n\t\t\taddIcoPermNOk(\"add-est\");\n\t\t\taddBtnAdd(\"add\");\n\t\t}\n\t\tif(data.upd == 1){\n\t\t\taddIcoPermOk(\"upd-est\");\n\t\t\taddBtnQuitar(\"upd\");\n\t\t}else{\n\t\t\taddIcoPermNOk(\"upd-est\");\n\t\t\taddBtnAdd(\"upd\");\n\t\t}\n\t\tif(data.del == 1){\n\t\t\taddIcoPermOk(\"del-est\");\n\t\t\taddBtnQuitar(\"del\");\n\t\t}else{\n\t\t\taddIcoPermNOk(\"del-est\");\n\t\t\taddBtnAdd(\"del\");\n\t\t}\n\t\tif(data.list == 1){\n\t\t\taddIcoPermOk(\"list-est\");\n\t\t\taddBtnQuitar(\"list\");\n\t\t}else{\n\t\t\taddIcoPermNOk(\"list-est\");\n\t\t\taddBtnAdd(\"list\");\n\t\t}\n\n\t\t/*Una vez dibujados los permisos del usuario, \n\t\tel selector de usuario obtiene el foco */\n\t\t$('select#usuario').focus(); \n\n\t}", "function cargarListaPaciente() {\n const turnosDoctor = JSON.parse(localStorage.getItem(\"rTurnos\")) || [];\n const docLogueado = JSON.parse(localStorage.getItem('profelogueado'));\n \n const mapDelTurno = turnosDoctor.filter(function(turnoDelDia){\n return turnoDelDia.doctores === docLogueado.id\n })\n \n var testingModalSinLog = `\n <h1 class=\"textoProfesional\" id=\"profesionales\">Buen día, ${docLogueado.nombre}</h1>\n <p> Sus pacientes del día son: </p>\n <div id=\"tablaPacientes\" class=\"table-responsive-sm\">\n <table class=\"table w-100 pl-0 mt-0\">\n <thead class=\"thead-light\" id=\"tableroDePacientes\">\n <tr class=\"text-center\" id=\"TablaPacientes\">\n <th scope=\"col\" style=\"width: 13vw;\">Horario</th>\n <th scope=\"col\" style=\"width: 13vw;\">Paciente</th>\n <th scope=\"col\" style=\"width: 13vw;\">Documento</th>\n <th scope=\"col\" style=\"width: 13vw;\">Motivo</th>\n </tr>\n </thead>\n </table>\n `\n modalPacienteLogueado.innerHTML = testingModalSinLog;\n \n // tablaPacientes.innerHTML = \"\";\n \n for (let i = 0; i < mapDelTurno.length; i++) {\n const turnos = mapDelTurno[i];\n tableroDePacientes.innerHTML += `\n <tr id=\"\" class=\"thead-light\">\n <td>${turnos.horario}</td>\n <td>${turnos.nombrePac + \" \" + turnos.apelliPopac}</td>\n <td>${turnos.dniPac}</td>\n <td>${turnos.textmedicalshit}</td>\n </tr>\n <br>\n `;\n }\n }", "function _GeraEquipamentos(tabela_geracao_classe_por_nivel) {\n for (var chave_moeda in tabela_geracao_classe_por_nivel.moedas) {\n gPersonagem.moedas[chave_moeda] = tabela_geracao_classe_por_nivel.moedas[chave_moeda];\n }\n if ('pocoes' in tabela_geracao_classe_por_nivel) {\n for (var i = 0; i < tabela_geracao_classe_por_nivel.pocoes.length; ++i) {\n gPersonagem.pocoes.push({chave: tabela_geracao_classe_por_nivel.pocoes[i]});\n }\n }\n}", "function RdatosLogistica(Material, Partidas, Destinos, Tiempo) {\n return { Material,Partidas, Destinos, Tiempo };\n}", "get listarTareas () {\n\n const arreglo = [];\n\n Object.keys(this._listado).forEach(indice => {\n arreglo.push(this._listado[indice]);\n })\n\n return arreglo;\n }", "function _DependenciasHabilidadesEspeciais() {\n var especiais_antes = gPersonagem.especiais;\n var especiais_nivel_classe = [];\n for (var i = 0; i < gPersonagem.classes.length; ++i) {\n var entrada_classe = gPersonagem.classes[i];\n if (tabelas_classes[entrada_classe.classe].especiais == null) {\n continue;\n }\n especiais_nivel_classe.push(\n { nivel: PersonagemNivelClasse(entrada_classe.classe), especiais_classe: tabelas_classes[entrada_classe.classe].especiais });\n }\n if ('especiais' in tabelas_raca[gPersonagem.raca]) {\n especiais_nivel_classe.push({ nivel: PersonagemNivel(), especiais_classe: tabelas_raca[gPersonagem.raca].especiais });\n }\n var template_pc = PersonagemTemplate();\n if (template_pc != null && 'especiais' in template_pc) {\n especiais_nivel_classe.push({ nivel: PersonagemNivel(), especiais_classe: template_pc.especiais });\n }\n\n for (var i = 0; i < especiais_nivel_classe.length; ++i) {\n var dados_nivel_classe = especiais_nivel_classe[i];\n for (var nivel = 1; nivel <= dados_nivel_classe.nivel; ++nivel) {\n var especiais_por_nivel = dados_nivel_classe.especiais_classe;\n if (!(nivel in especiais_por_nivel)) {\n continue;\n }\n for (var j = 0; j < especiais_por_nivel[nivel].length; ++j) {\n _DependenciaHabilidadeEspecial(especiais_por_nivel[nivel][j]);\n }\n }\n }\n gPersonagem.dominios.forEach(function(dominio) {\n if ('habilidade_especial' in tabelas_dominios[dominio]) {\n _DependenciaHabilidadeEspecial(tabelas_dominios[dominio].habilidade_especial);\n }\n });\n\n // Atualiza o numero de usos de cada especial.\n for (var chave_especial in gPersonagem.especiais) {\n if (chave_especial in especiais_antes) {\n gPersonagem.especiais[chave_especial].usado = especiais_antes[chave_especial].usado || 0;\n } else {\n gPersonagem.especiais[chave_especial].usado = 0;\n }\n }\n}", "function _CarregaFeiticos() {\n for (var chave_classe in tabelas_feiticos) {\n gPersonagem.feiticos[chave_classe] = {\n atributo_chave: tabelas_feiticos[chave_classe].atributo_chave,\n conhecidos: {},\n slots: {},\n };\n for (var i = 0; i <= 9; ++i) {\n gPersonagem.feiticos[chave_classe].conhecidos[i] = [];\n gPersonagem.feiticos[chave_classe].slots[i] = {\n atributo_chave: tabelas_feiticos[chave_classe].atributo_chave,\n base: 0,\n bonus_atributo: 0,\n feiticos: [],\n feitico_dominio: null,\n };\n }\n }\n\n // Tabela invertida de feiticos.\n for (var classe in tabelas_lista_feiticos) {\n for (var nivel in tabelas_lista_feiticos[classe]) {\n for (var chave_feitico in tabelas_lista_feiticos[classe][nivel]) {\n var feitico = tabelas_lista_feiticos[classe][nivel][chave_feitico];\n tabelas_lista_feiticos_invertida[StringNormalizada(feitico.nome)] = chave_feitico;\n tabelas_lista_feiticos_completa[chave_feitico] = feitico;\n }\n }\n }\n}", "function getTeclas(){\n\tvar teclas = getData('teclas', teclado, 'default');\n\tfor(var t in teclas) teclado[t] = teclas[t];\n\treturn teclado;\n}", "function montaValorMes () {\r\n\t\t\t// laco de despesas\r\n\t\t\tfor (var x in $scope.despesas) {\r\n\t\t\t\t// separo a despesa\r\n\t\t\t\tvar despesa = $scope.despesas[x];\r\n\t\t\t\t// crio um atributo pres(array) na despesa\r\n\t\t\t\tdespesa.pres = [];\r\n\r\n\t\t\t\t// laco de meses até 8\r\n\t\t\t\t// for (var m=0; m<8; m++) {\r\n\t\t\t\tfor (var m=0; m<$scope.tlmeses; m++) {\r\n\t\t\t\t\tvar day = moment().add(m, \"M\").date(); // dia atual + 1\r\n\t\t\t\t\tvar month = moment().add(m, \"M\").month(); // mes atual + 1\r\n\t\t\t\t\tvar year = moment().add(m, \"M\").year(); // ano atual + 1\r\n\t\t\t\t\tvar data = ''; // variavel data\r\n\r\n\t\t\t\t\t// laco de prestacoes da despesa\r\n\t\t\t\t\tfor (var p=0; p<despesa.prestacoes; p++) {\r\n\t\t\t\t\t\tvar dia = moment(despesa.datavencimento).add(p, \"M\").date(); // dia da data despesa + index\r\n\t\t\t\t\t\tvar mes = moment(despesa.datavencimento).add(p, \"M\").month(); // mes data despesa + index\r\n\t\t\t\t\t\tvar ano = moment(despesa.datavencimento).add(p, \"M\").year(); // ano data despesa + index\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// caso o mes e ano da despesa seja = ao mes e ano atual \r\n\t\t\t\t\t\tif (mes === month && ano === year) {\r\n\t\t\t\t\t\t\tdata = {\"data\": mes+\"/\"+ano, \"valor\":despesa.valor};\r\n\t\t\t\t\t\t\t// pegando a prestação atual\r\n\t\t\t\t\t\t\tif (m === 0) { // m = o ( mes atual )\r\n\t\t\t\t\t\t\t\tdespesa.prestacao = (p+1)+\"/\"+despesa.prestacoes;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!despesa.prestacao) {\r\n\t\t\t\t\t\t// se ano = atual mas mes menor ou ano menor\r\n\t\t\t\t\t\tif ( (ano === year && mes < month) || (ano < year) ) {\r\n\t\t\t\t\t\t\tdespesa.prestacao = despesa.prestacoes+\"/\"+despesa.prestacoes;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tdespesa.prestacao = \"0/\"+despesa.prestacoes;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( data === '' ) {\r\n\t\t\t\t\t\tdespesa.pres.push({\"data\": \"00/0000\", \"valor\":\"xxxx\", \"color\":\"background:#f0f5f5; color:#ccc;\", \"icon\":\"fa-trophyx\"});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tdespesa.pres.push(data);\r\n\t\t\t\t\t\t$scope.totais[m].valor = $scope.totais[m].valor + parseInt(despesa.valor);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($scope.totais[m-1] != undefined && $scope.totais[m].valor < $scope.totais[m-1].valor) {\r\n\t\t\t\t\t\t\t$scope.totais[m].icon = \"fa-arrow-down\";\r\n\t\t\t\t\t\t}else if($scope.totais[m-1] != undefined && $scope.totais[m].valor > $scope.totais[m-1].valor) {\r\n\t\t\t\t\t\t\t$scope.totais[m].icon = \"fa-arrow-up\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$scope.totais[m].icon = \"fa-arrow-right\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$scope.totalgeral = $scope.totalgeral + parseFloat(despesa.valor);\r\n\t\t\t}\r\n\t\t}", "function Paciente(nombre, edad, rut, diagnostico) {\n this.nombre = nombre;\n this.edad = edad;\n this.rut = rut;\n this.diagnostico = diagnostico;\n}", "function mostrarDetalles(req, res) {\n var id = req.params.id;\n\n // Creamos la query que nos devuelve los actores de la pelicua seleccionada\n var sql = `SELECT pelicula.poster,\n pelicula.titulo,\n pelicula.anio,\n pelicula.trama,\n pelicula.fecha_lanzamiento,\n pelicula.director,\n pelicula.duracion,\n pelicula.puntuacion,\n actor.nombre,\n genero.nombre AS genero_nombre\n FROM pelicula\n JOIN actor_pelicula ON pelicula.id = actor_pelicula.pelicula_id\n JOIN actor ON actor.id = actor_pelicula.actor_id\n JOIN genero ON genero.id = pelicula.genero_id\n WHERE pelicula.id = ` + id ;\n \n conexion.query(sql, function(error, resultado, campos) {\n if(error) {\n console.log('Hubo un error en la consulta', error.message);\n return res.status(404).send('Hubo un error en la consulta');\n }\n var respuesta = {\n 'pelicula': resultado[0],\n 'genero': resultado[0].genero_nombre,\n 'actores': resultado.map(actor => actor),\n }; \n res.send(JSON.stringify(respuesta));\n })\n}", "function modificarDOMPantallaPlantilla() {\r\n\t// Obtenemos la tabla de jugadores y todas sus filas.\r\n\tvar tablaJugadores = document.getElementById(\"content\").getElementsByTagName(\"table\")[0];\r\n\tvar filasTablaJugadores = tablaJugadores.getElementsByTagName(\"tr\");\r\n\t\r\n\t// Recorremos todas las filas de la tabla de jugadores (excepto la primera, que es la cabecera).\r\n\tfor (var fila = 1; fila < filasTablaJugadores.length; fila++) {\r\n\t\t// Obtenemos el id del jugador actual.\r\n\t\tvar columnasFila = filasTablaJugadores[fila].getElementsByTagName(\"td\");\r\n\t\tvar columnaIdJugador = columnasFila[3];\r\n\t\tvar idJugador = extraerIdJugador(columnaIdJugador.getElementsByTagName(\"a\")[0]);\r\n\t\t// Actualizamos el valor de las stats del jugador actual.\r\n\t\tprocesarCambioValorStat(columnasFila[5], idJugador, \"calidad\");\r\n\t\tprocesarCambioValorStat(columnasFila[6], idJugador, \"resistencia\");\r\n\t\tprocesarCambioValorStat(columnasFila[7], idJugador, \"velocidad\");\r\n\t\tprocesarCambioValorStat(columnasFila[8], idJugador, \"pase\");\r\n\t\tprocesarCambioValorStat(columnasFila[9], idJugador, \"remate\");\r\n\t\tprocesarCambioValorStat(columnasFila[10], idJugador, \"tiro\");\r\n\t\tprocesarCambioValorStat(columnasFila[11], idJugador, \"entradas\");\r\n\t\tprocesarCambioValorStat(columnasFila[12], idJugador, \"agresividad\");\r\n\t\tprocesarCambioValorStat(columnasFila[13], idJugador, \"conduccion\");\r\n\t\tprocesarCambioValorStat(columnasFila[14], idJugador, \"desmarque\");\r\n\t\tprocesarCambioValorStat(columnasFila[16], idJugador, \"mediareal\");\r\n\t}\r\n\t\r\n\t// Ajustamos estilos de tabla y contenedores.\r\n\teliminarAnchosColumnaTablaJugadores(filasTablaJugadores[0]);\r\n\tajustarEstilosContenedores();\r\n\t\r\n\t// Cuando tenemos todo el DOM modificado, mostramos la tabla.\r\n\tmostrarJugadores();\r\n}", "function calcularMejorEquipo() {\n const equipos = [\n new Equipo('Maria', [62, 34, 55]),\n new Equipo('Paula', [35, 60, 59]),\n new Equipo('Rebeca', [40, 39, 63])\n ];\n\n for (let i = 0; i < equipos.length; i++) {\n equipos[i].media = calcularMedia(equipos[i].resultados);\n }\n\n let mediaMasAlta = obtenerMediaMasAlta(equipos);\n console.log(\n `El equipo con la media más alta es el equipo ${obtenerEquipo(\n equipos,\n mediaMasAlta\n )} con una media de ${mediaMasAlta}`\n );\n}", "verificaDados(){\n this.verificaEndereco();\n if(!this.verificaVazio()) this.criaMensagem('Campo vazio detectado', true);\n if(!this.verificaIdade()) this.criaMensagem('Proibido cadastro de menores de idade', true);\n if(!this.verificaCpf()) this.criaMensagem('Cpf deve ser válido', true);\n if(!this.verificaUsuario()) this.criaMensagem('Nome de usuario deve respeitar regras acima', true);\n if(!this.verificaSenhas()) this.criaMensagem('Senha deve ter os critérios acima', true)\n else{\n this.criaMensagem();\n // this.formulario.submit();\n }\n }", "function obterDoadores(){\n var doadoresUniversal = [];\n for(var i=0; i<goldSaints.length; i++){\n var cavaleiro = goldSaints[i];\n if(cavaleiro.tipoSanguineo === 'O'){\n doadoresUniversal.push(cavaleiro);\n }\n }\n return doadoresUniversal;\n}", "function MelhorResult(){\n\tconsole.info(Cidade);\n\tvar CidadeTOP = new Object();\n for(var cont=0;cont<Cidade.length;cont++){\n if(CidadeTOP.aptidao>Cidade[cont].aptidao || CidadeTOP.aptidao == null){\n CidadeTOP = new Object(Cidade[cont]);\n }\n }\n\tconsole.log(\"Individuo mais qualificado:\");\n\tconsole.info(CidadeTOP);\n\tconsole.log(\"Nº Pessoas: \"+Cidade.length);\n}", "function calculaPontos(jogador) {\n var pontos = jogador.vitorias * 3 + jogador.empates;\n return pontos;\n}", "function findMunTorreviejaData(municipios){\n var munData = null;\n for(var key in municipios){\n var actMun = (municipios[key].nombre).toLowerCase();\n if(actMun == \"torrevieja\"){\n munData = municipios[key];\n break;\n }\n }\n console.log(munData);\n return munData;\n }", "function cumpleanosDos(persona){\n\n return {\n \n ...persona,\n edad: persona.edad + 1\n\n }\n\n /* Aqui lo que hacemos es retornar un nuevo objeto con los atributos de la\n persona y podremos cambiar los atributos y agregar atributos nuevos\n \n Esto arreglara el problema de que cuando se invoque la funcion tambien se\n cambie el objeto, con este ejemplo retornara un objeto nuevo con la \n edad modificada y si vemos el objeto este no tendra ningun cambio\n \n \n */\n}", "function infoGastosEnvio(){\n let compruebaPrime = true;\n for (propiedades in carrito){\n compruebaPrime = compruebaPrime && carrito[propiedades].premium;\n }\n let gastosInfo = compruebaPrime ? infoEnvio2 : infoEnvio1;\n return gastosInfo;\n}", "function getMostrarMascotaPerdida(created, cb) {\n util.conectarMongo(coleccion, function (err, collection) {\n collection.find({ created: created }).toArray(cb);\n })\n }", "function LeEntradaArmaArmadura(div) {\n var lido = {};\n for (var i = 0; i < div.childNodes.length; ++i) {\n var filho = div.childNodes[i];\n if (filho.name == null) {\n continue;\n }\n if (filho.name.indexOf('em-uso') != -1) {\n lido.em_uso = filho.checked;\n } else if (filho.name.indexOf('select-principal') != -1) {\n lido.chave = ValorSelecionado(filho);\n } else if (filho.name.indexOf('select-material') != -1) {\n lido.material = ValorSelecionado(filho);\n } else if (filho.name.indexOf('obra-prima') != -1) {\n lido.obra_prima = filho.checked;\n } else if (filho.name.indexOf('bonus-magico') != -1) {\n lido.bonus = parseInt(filho.value) || 0;\n }\n }\n return lido;\n}", "function LeEntradaArmaArmadura(div) {\n var lido = {};\n for (var i = 0; i < div.childNodes.length; ++i) {\n var filho = div.childNodes[i];\n if (filho.name == null) {\n continue;\n }\n if (filho.name.indexOf('em-uso') != -1) {\n lido.em_uso = filho.checked;\n } else if (filho.name.indexOf('select-principal') != -1) {\n lido.chave = ValorSelecionado(filho);\n } else if (filho.name.indexOf('select-material') != -1) {\n lido.material = ValorSelecionado(filho);\n } else if (filho.name.indexOf('obra-prima') != -1) {\n lido.obra_prima = filho.checked;\n } else if (filho.name.indexOf('bonus-magico') != -1) {\n lido.bonus = parseInt(filho.value) || 0;\n }\n }\n return lido;\n}", "function getAemetDiaryData(municipio, provincia) {\n var municipioCode = municipiosData[provincia][municipio]; // Get the code for that locality\n var aemetURLMunicipioDiaria = 'https://opendata.aemet.es/opendata/api/prediccion/especifica/municipio/diaria/' + municipioCode;\n const options = createAemetOptionsForRequest(aemetURLMunicipioDiaria);\n \n var aemetDataURL = new Promise(function (resolve, reject) {\n request(options, function (error, response, body) {\n if (error)\n return reject(error);\n try {\n var data = JSON.parse(body);\n return resolve(data.datos);\n } catch (e) {\n return reject(e);\n }\n });\n });\n \n return new Promise(function (resolve, reject) {\n aemetDataURL.then(function(url){\n const options = createAemetOptionsForRequest(url);\n request(options, function (error, response, body) {\n try {\n if (response.statusCode != 200)\n throw 'Aemet data not found or was expired - ' + response.statusCode;\n return resolve(JSON.parse(body)); \n } catch (e) {\n return reject(e);\n }\n });\n }).catch(function(error){\n reject(error);\n });\n });\n}", "misDatos() { // un metodo es una funcion declarativa sin el function dentro de un objeto, puede acceder al universo del objeto\n return `${this.nombre} ${this.apellido}`; // por medio del \"this\", que es una forma de acceder a las propiedades del objeto en un metodo\n }", "static lista_emergencia (req,res){\n const { id_medico } = req.params\n Citas_Medicas.findAll({\n where : { id_medico : id_medico, estado: 'true', especialidad: 'CONSUL. EMERGENCIA' }, // el url es para identificar si es emergencia o consulta medica\n //attributes: ['id','estado','codigo_p','hora','especialidad'],\n include: [\n {model: Pacientes, attributes: ['id','nombre', 'apellidop','apellidom'] }\n ]\n }).then(users => {\n res.status(200).send(users)\n }) \n }", "function listarMedicoClinica(cnpjClinica, res){\n\t\tconnection.acquire(function(err, con){\n\t\t\tcon.query(\"select crmv, nomeMedico, emailMedico, telefoneMedico from Medico, Clinica, Clinica_Medicos, Estados where Medico.Estados = Clinica.Estados and Clinica_Medicos.cnpjClinica = Clinica.cnpj and Clinica_Medicos.crmvMedico = Medico.crmv and Medico.Estados = Estados.idEstados and Clinica.Estados = Estados.idEstados and Clinica.cnpj = \"+cnpjClinica+\"\", function(err, result){\n\t\t\t\tcon.release();\n\t\t\t\tres.json(result);\n\t\t\t});\n\t\t});\n\t}", "function detailMunicipio(){\n munD = '';\n if (map.getZoom() >= 14){\n\t var latDet = roundNumber(targetCoordMun.lat(),7); while (latDet.length != 10){latDet = latDet + \"0\" + \"\";}\n\t\tvar lngDet = roundNumber(targetCoordMun.lng(),7); while (lngDet.length != 10){lngDet = lngDet + \"0\" + \"\";}\n\t\t\n\t\tvar plesso = coordPless['\"'+lngDet+','+latDet+'\"'][0];\n\t\t\n\t for (var x in plesso){\n\t\t\tmunD = plesso[x][\"M\"];\n\n\t\t}\n }\n\n}", "function seleccionarOpcion(indicePregunta, indiceOpcion){\n var preguntaSeleccionada= aPreguntasActuales.Preguntas[indicePregunta];\n\n preguntaSeleccionada.solucionUsuario= indiceOpcion;\n //si la pregunta ya fue seleccionada, no se contara de nuevo para la cantidad de preguntas seleccionadas \n if(aOpcionesSeleccionadas.indexOf(indicePregunta,0)== -1){\n aOpcionesSeleccionadas.push(indicePregunta);\n }\n\n var preguntasTotales= aPreguntasActuales.Preguntas.length;\n var preguntasRestantes=aOpcionesSeleccionadas.length;\n\n return {\"Totales\": preguntasTotales,\"Restantes\": preguntasRestantes}\n}", "function readResult(e){\n\t piePerv = 0;\n\t for (var k in e){\n\t dataSetMun[e[k][\"municipio\"]] = e[k][\"perc\"];\n\t\tdataSetDetMun[parseInt(e[k][\"municipio\"])] = e[k][\"perc\"];\n\t\tvar ple = e[k][\"plessi\"];\n\t\tfor (var x in ple){\n\t\t\tvar sez = ple[x][\"sezioni\"];\n\t\t\tfor (var s in sez){\n\t\t\t var perv = false;\n\t\t\t if (sez[s][\"pervenuta\"] == \"SI\"){perv = true;piePerv++;}\n\n\t\t\t dataSetSez[parseInt(sez[s][\"numero\"])] = perv;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (name == 'Aff'){cambiaTitolo(statoAttuale);}else{\n\t\t\t\tvar tit = 'Scrutinio ';\n\t\t\t\tif (tipo == 0){tit += 'Camera';}\n\t\t\t\tif (tipo == 1){tit += 'Senato';}\n\t\t\t\tif (tipo == 2){tit += 'Regionali Lista';}\n\t\t\t\tif (tipo == 3){tit += 'Regionali Preferenze';}\n\t\t \tcambiaTitolo(tit);\n\t\t\t}\n\n\t\t\tremMarkerAll();\n\t\t\tif (map.getZoom() >= 14){addMarkerSez();}else{addMarkerMun();}\n\t\t\tjQuery('#nav-panel').panel('close');\n\t\t\tif (statusTimer == false){startTimer();}else{resetTimer();}\n\t\t\taddDataGraph();\n\t\t\tconsole.log(\"Dati Caricati: \",name+tipo+\"\");\n\t\t\tloadingCustom(1);\n\t\t\t\n}", "function getIdBusquedaCaracteristicas(){\n\tvar tipo_formulario = jQuery('#tipoFormulario_hidden').val();\n\t\n\tvar param={};\n\tif (tipo_formulario==derecho_comercial){\n\t\tparam = {\n\t\t\t\tidDerechoComercial: jQuery(\"#idDerecho\").val()\n\t\t};\n\t} else if (tipo_formulario==derecho_cpi || \n\t\t\t tipo_formulario == derecho_trn || \n\t\t\t tipo_formulario == derecho_dis || \n\t\t\t tipo_formulario == derecho_int){\n\t\tparam = {\n\t\t\t\tidCaracteristica: jQuery(\"#idCaracteristica\").val()\n\t\t};\n\t} else if (tipo_formulario == plantillas){\n\t\tparam = {\n\t\t\t\tidPlantillaDerecho: jQuery(\"#idPlantillaDerecho\").val()\n\t\t};\n\t}\n\treturn param;\n}", "function APIObtenerProcedimientos(TipOsId, OsId) {\n return new Promise((resolve, reject) => {\n setTimeout(()=>{\n var procedimientos = [];\n var query = `select true as Acreditado, 1.00 as Cantidad, ACTASISTID as Codigo, 1 as CodigoAutorizacion,\n false as CodigoEstadoTransaccion, ifnull(EMPRUC, 0) as CuitProfesionalResponsable, OSfChHOR as Fecha, OSfChHOR as FechaGestion,\n false as HabilitaAjusteCargos, R.ROLID as IdEspecialidadResponsable, 0.00 as MontoIVAFinan, 0.00 as MontoIVAPaciente,\n 0.00 as MontoNetoFinan, 0.00 as MontoNetoPaciente, 0.00 as MontoTarifa, 0.00 as MontoTotalFinan, 0.00 as MontoTotalPaciente,\n 0.00 as PorcentajeCobertura, 0.00 as PorcentajePaciente, false as RequiereAutorizacion, 'P' as Tipo, true as Vigencia\n from os o\n left join rrhh rh on o.osrrhhid = rh.rrhhid\n left join osindicact oi on o.tiposid = oi.tiposid and o.osid = oi.osid\n left join actasist a on a.actasistid = oi.osindicactactasistid\n left join plancom pc on o.osplancomid = pc.plancomid\n left join roles r on o.osrolid = r.rolid\n left join estos e on e.EstOSId = o.OSUltEstOsId\n left join empresas em on em.empid = rh.empid\n left join persplan pl on pl.persplanpersid = o.ospersid and pl.persplanplancomid = pc.plancomid\n left join prestadores p on pl.persplanprestid = p.prestid and o.ospersprestorigid = p.prestid\n left join tipcontrat tc on tc.tipcontratid = pl.persplantipcontratid\n left join sectores s on o.ossectid = s.sectid\n where PrestSistExtId != ''\n and o.tiposid = ${TipOsId} and o.osid = ${OsId};`;\n conectarTunel().then((conexion) => {\n conexion.query(query, (error, resultado) => {\n if(error) {\n reject(`Hubo un problema consultando los consumos: ${error}`);\n conexion.end();\n } else {\n var response = {\n 'resultadoProdecimientos': JSON.parse(JSON.stringify(resultado))\n }\n response.resultadoProdecimientos.forEach(procedimiento => {\n procedimientos.push(procedimiento);\n });\n resolve(procedimientos);\n conexion.end();\n }\n });\n }).catch((err) => {\n reject(`Hubo un error conectando la BD GEOSalud ${err}`);\n conexion.end();\n });\n \n }, 100);\n });\n}", "function Unidad(data,nombre) {\n var total = data.filter(function(d) {\n return d[\"UNIDAD DE ADSCRIPCIÓN\"] == nombre.parent;\n }).filter(function(d) { return d[\"ÁREA DE ADSCRIPCIÓN\"] == nombre.hijo });\n// console.log(total)\n var hombres = total.filter(function(d) { return d[\"SEXO\"] == \"H\"; }).length\n var mujeres = total.filter(function(d) { return d[\"SEXO\"] == \"M\"; }).length;\n total = total.length;\n\n return [{key:hombres,sexo:\"H\"},{key:mujeres,sexo:\"M\"}]\n}", "function getProfesor(data, dataL) {\n clearDOM();\n\n const poDanu = { pon: [], uto: [], sri: [], cet: [], pet: [] };\n\n data.forEach((profesor, j) => {\n if (j === 0) return;\n\n if (\n profesor[0]\n .toUpperCase()\n .replace(/ /g, \"\")\n .indexOf(input.replace(/ /g, \"\")) !== -1\n ) {\n for (let i = 1; i < profesor.length; i++) {\n const sat = profesor[i];\n if (typeof sat === \"object\" && sat.dan) {\n poDanu[sat.dan].push(sat);\n }\n }\n }\n });\n\n Object.keys(poDanu).forEach((dan) => {\n const sati = poDanu[dan];\n let text = \"\";\n\n sati.forEach((celija) => {\n text += `\n <th>${celija.sat}.sat (${celija.trajanje})</th>\n </tr>\n <tr>\n <td>\n <p class='inline' style='${returnStyle(celija)}'>${celija.name}</p>\n </td>\n </tr>`;\n });\n\n document.getElementById(dan).innerHTML = text;\n });\n\n finalTouch(data[0]);\n }", "function buscarMedicos(termino, regex) {\n\n return new Promise((resolve, reject) => {\n\n Medico.find({ nombre : regex })\n .populate('usuario', 'nombre email')\n .populate('hospital')\n .exec((error, medicosEncontrados) => {\n\n if(error) {\n reject('Error al cargar los medicos', error);\n } else {\n resolve(medicosEncontrados);\n }\n })\n });\n }", "function MuestraPantalla(NombreEspacio, NombrePantalla) {\n $.each(PANTALLAS_, function (i, item) {\n $('#_Pantalla_' + item).hide();\n if (PANTALLAS_.length == (i + 1)) {\n $('#_Pantalla_' + NombrePantalla).show();\n ScrollingTo('#_Pantalla_' + NombrePantalla);\n HideAlertM(NombreEspacio);\n }\n });\n\n $.each(ESPACIOS_, function (i, item) {\n $('#Espacio_P_' + item).hide();\n $('#Footer_S_' + item).hide();\n if (ESPACIOS_.length == (i + 1)) {\n $('#Espacio_P_' + NombreEspacio).show();\n $('#Footer_S_' + NombreEspacio).show();\n HideAlertM(NombreEspacio);\n }\n });\n\n}", "function clasificacion_equipos() {\n\n //deshabilitar boton 8vos\n document.getElementById(\"btn-octavos\").disabled = true;\n\n //Se carga el archivo\n json = JSON.parse(localStorage['json']);\n\n //fechas\n var fechas = [\"fecha1\",\"fecha2\",\"fecha3\"];\n\n //tabla, datos cada equipo en el torneo\n dict_puntajes_grupoA = {} ; //por definicion, como no se declaro es GLOBAL.\n dict_puntajes_grupoB = {} ;\n dict_puntajes_grupoC = {} ;\n dict_puntajes_grupoD = {} ;\n dict_puntajes_grupoE = {} ;\n dict_puntajes_grupoF = {} ;\n dict_puntajes_grupoG = {} ;\n dict_puntajes_grupoH = {} ;\n\n //Por cada equipo en el grupo se crea un objeto\n $.each(json[\"grupoA\"][\"equipos\"], function(i, f) {\n\n var equipo = crear_puntaje_equipo(f.nombre);\n dict_puntajes_grupoA[f.nombre] = equipo;\n\n });\n\n $.each(json[\"grupoB\"][\"equipos\"], function(i, f) {\n\n var equipo = crear_puntaje_equipo(f.nombre);\n dict_puntajes_grupoB[f.nombre] = equipo;\n\n });\n\n $.each(json[\"grupoC\"][\"equipos\"], function(i, f) {\n\n var equipo = crear_puntaje_equipo(f.nombre);\n dict_puntajes_grupoC[f.nombre] = equipo;\n\n });\n\n $.each(json[\"grupoD\"][\"equipos\"], function(i, f) {\n\n var equipo = crear_puntaje_equipo(f.nombre);\n dict_puntajes_grupoD[f.nombre] = equipo;\n\n });\n\n $.each(json[\"grupoE\"][\"equipos\"], function(i, f) {\n\n var equipo = crear_puntaje_equipo(f.nombre);\n dict_puntajes_grupoE[f.nombre] = equipo;\n\n });\n\n $.each(json[\"grupoF\"][\"equipos\"], function(i, f) {\n\n var equipo = crear_puntaje_equipo(f.nombre);\n dict_puntajes_grupoF[f.nombre] = equipo;\n\n });\n\n $.each(json[\"grupoG\"][\"equipos\"], function(i, f) {\n\n var equipo = crear_puntaje_equipo(f.nombre);\n dict_puntajes_grupoG[f.nombre] = equipo;\n\n });\n\n $.each(json[\"grupoH\"][\"equipos\"], function(i, f) {\n\n var equipo = crear_puntaje_equipo(f.nombre);\n dict_puntajes_grupoH[f.nombre] = equipo;\n\n });\n\n calcular_puntos(json, \"grupoA\", fechas, [\"_#partido_1_ga\",\"_#partido_2_ga\",\"_#partido_3_ga\"], dict_puntajes_grupoA);\n calcular_puntos(json, \"grupoB\", fechas, [\"_#partido_1_gb\",\"_#partido_2_gb\",\"_#partido_3_gb\"], dict_puntajes_grupoB);\n calcular_puntos(json, \"grupoC\", fechas, [\"_#partido_1_gc\",\"_#partido_2_gc\",\"_#partido_3_gc\"], dict_puntajes_grupoC);\n calcular_puntos(json, \"grupoD\", fechas, [\"_#partido_1_gd\",\"_#partido_2_gd\",\"_#partido_3_gd\"], dict_puntajes_grupoD);\n calcular_puntos(json, \"grupoE\", fechas, [\"_#partido_1_ge\",\"_#partido_2_ge\",\"_#partido_3_ge\"], dict_puntajes_grupoE);\n calcular_puntos(json, \"grupoF\", fechas, [\"_#partido_1_gf\",\"_#partido_2_gf\",\"_#partido_3_gf\"], dict_puntajes_grupoF);\n calcular_puntos(json, \"grupoG\", fechas, [\"_#partido_1_gg\",\"_#partido_2_gg\",\"_#partido_3_gg\"], dict_puntajes_grupoG);\n calcular_puntos(json, \"grupoH\", fechas, [\"_#partido_1_gh\",\"_#partido_2_gh\",\"_#partido_3_gh\"], dict_puntajes_grupoH);\n\n console.log(dict_puntajes_grupoA);\n console.log(dict_puntajes_grupoB);\n console.log(dict_puntajes_grupoC);\n console.log(dict_puntajes_grupoD);\n console.log(dict_puntajes_grupoE);\n console.log(dict_puntajes_grupoF);\n console.log(dict_puntajes_grupoG);\n console.log(dict_puntajes_grupoH);\n\n //generar_octavos();\n generar_fase(\"octavos\",octavos);\n\n}", "static CitasPaciente(req, res){ \n var id = req.params.id; \n Citas_Medicas.findAll({\n where: {id_Paciente: id}\n //attributes: ['id', ['description', 'descripcion']]\n }).then((Citas) => {\n res.status(200).json(Citas);\n }); \n }", "function findAll(req, res) {\n var from = req.query.from || 0;\n from = Number(from);\n var rowSize = req.query.size || 5;\n rowSize = Number(rowSize);\n\n Medico.find({})\n .populate('User')\n .populate('Hospital')\n .skip(from)\n .limit(rowSize)\n .exec((err, success) => {\n if (err) {\n res.status(500).json({\n ok: false,\n message: 'Error obteniendo medicos.',\n error: err\n });\n } else {\n Medico.count({}, (err, size) => {\n res.status(200).json({\n ok: true,\n medicos: success,\n count: size\n });\n });\n }\n });\n }", "function renderizaMunicoes(){\n\tmunicoes.forEach(desenhaMunicao);\n\tmunicoesAndam();\n}", "function _GeraAtributos(modo, submodo) {\n var valores = null;\n if (modo == 'elite') {\n valores = [ 15, 14, 13, 12, 10, 8 ];\n } else {\n valores = [ 13, 12, 11, 10, 9, 8 ];\n }\n if (gPersonagem.classes.length == 0) {\n // Nunca deve acontecer.\n Mensagem('Personagem sem classe');\n return;\n }\n\n var primeira_classe = gPersonagem.classes[0];\n if (primeira_classe.classe == 'aristocrata' || primeira_classe.classe == 'expert') {\n Mensagem(\"É recomendado colocar os valores na mão para aristocratas e experts\");\n }\n\n var atributos_primeira_classe = tabelas_geracao[primeira_classe.classe].atributos;\n for (var i = 0; i < valores.length; ++i) {\n gPersonagem.atributos[atributos_primeira_classe[i]].bonus.Adiciona('base', null, valores[i]);\n }\n\n // Incrementa o atributo mais valioso do personagem\n var atributo_mais_valioso = atributos_primeira_classe[0];\n for (var i = gPersonagem.atributos.pontos.disponiveis; i > 0; --i) {\n gPersonagem.atributos.pontos.gastos.push(atributo_mais_valioso);\n ++gPersonagem.atributos[atributo_mais_valioso].bonus_nivel;\n }\n gPersonagem.atributos.pontos.disponiveis = 0;\n}", "function inicializarPesos(pesos, setEntrenamiento) {\n divmatriz.innerHTML += \"<div style='text-align: center'><b>Matriz</b><br></div>\";\n for (var i = 0; i < setEntrenamiento[0].entrada.length; i++) {// numero de elementos para entrada\n pesos[i] = Math.random() * (1 - (-1) + 1) + (-1);\n divmatriz.innerHTML += \" \" + pesos[i] + \" &nbsp;&nbsp; \";\n }\n divmatriz.innerHTML += \"<br>\";\n divmatriz.innerHTML += \"<div style='text-align: center'><b>Umbral</b><br></div>\";\n pesos.push( Math.random() * (1 - (-1) + 1) + (-1) ); //umbral\n divmatriz.innerHTML += \" \" + pesos[2] + \"&nbsp;&nbsp; \";\n }", "function buscarTodosOsAnimaisDaFila(){\n for(let animal of fila_cartas){\n let id = parseInt(animal.id.split(\"-\")[0]);\n\n //se ainda nao temos o tipo do animal na fila, insere\n if(habilidade_animais.indexOf(id)===-1) habilidade_animais.push(id);\n }\n}", "function choosePacet(type, idP) {\n let pacet = [];\n const pacD = pac[type];\n const nameDe = pacD.map(dev => dev.pacet);\n for (let i = 0; i < nameDe.length; i += 1) {\n for (let a = 0; a < nameDe[i].length; a += 1) {\n nameDe[i][a].id = idP;\n delete nameDe[i][a].startReg;\n delete nameDe[i][a].convert;\n delete nameDe[i][a].relation;\n // delete nameDe[i][a].range;\n pacet = pacet.concat(nameDe[i][a]);\n // console.log(pacet);\n }\n }\n insertDoc(pacet);\n return pacet;\n}", "function cumpleanos1(persona){\n return {\n //se pueden agregar campos tambien.\n ...persona, //nuevo objeto persona mas vieja\n edad: persona.edad + 1\n }\n}", "function _DependenciasNumeroFeiticosParaClasse(classe_personagem) {\n var chave_classe = classe_personagem.classe;\n var tabela_feiticos_classe = tabelas_feiticos[chave_classe];\n if (tabela_feiticos_classe == null) {\n return;\n }\n // Possivel para paladinos e rangers.\n if (classe_personagem.nivel_conjurador == 0) {\n return;\n }\n var atributo_chave = tabela_feiticos_classe.atributo_chave;\n var valor_atributo_chave = gPersonagem.atributos[atributo_chave].bonus.Total();\n var feiticos_por_nivel = tabela_feiticos_classe.por_nivel[classe_personagem.linha_tabela_feiticos];\n var nivel_inicial = tabela_feiticos_classe.possui_nivel_zero ? 0 : 1;\n gPersonagem.feiticos[chave_classe].em_uso = true;\n // Feiticos conhecidos (se houver para a classe). Se nao houver, vai usar o que vier da entrada.\n // Por exemplo, magos nao tem limite de conhecidos.\n for (var indice = 0;\n feiticos_por_nivel.conhecidos != null && indice < feiticos_por_nivel.conhecidos.length;\n ++indice) {\n var conhecidos_nivel = parseInt(feiticos_por_nivel.conhecidos.charAt(indice)) || 0;\n _DependenciasNumeroFeiticosConhecidosParaClassePorNivel(\n chave_classe, nivel_inicial + indice, conhecidos_nivel, feiticos_por_nivel);\n }\n // Slots de feiticos.\n var array_bonus_feiticos_atributo = feiticos_atributo(valor_atributo_chave);\n var bonus_atributo_chave = gPersonagem.atributos[atributo_chave].modificador;\n var possui_dominio = tabela_feiticos_classe.possui_dominio;\n var escola_especializada = tabela_feiticos_classe.escola_especializada;\n for (var indice = 0; indice < feiticos_por_nivel.por_dia.length; ++indice) {\n var num_slots_nivel = parseInt(feiticos_por_nivel.por_dia.charAt(indice)) || 0;\n _DependenciasNumeroSlotsParaClassePorNivel(\n chave_classe, nivel_inicial + indice, num_slots_nivel, feiticos_por_nivel,\n array_bonus_feiticos_atributo, bonus_atributo_chave, possui_dominio, escola_especializada);\n }\n gPersonagem.feiticos[chave_classe].nivel_maximo = nivel_inicial + feiticos_por_nivel.por_dia.length - 1;\n}", "function Unidad(data,nombre) {\n var total = data.filter(function(d) {\n return d[\"UNIDAD DE ADSCRIPCIÓN\"] == nombre;\n });\n var hombres = total.filter(function(d) { return d[\"SEXO\"] == \"H\"; }).length\n var mujeres = total.filter(function(d) { return d[\"SEXO\"] == \"M\"; }).length;\n total = total.length;\n\n return [{key:hombres,sexo:\"H\"},{key:mujeres,sexo:\"M\"}]\n}", "getDados() {\n return this.dados;\n }", "getMeters(user_id) {\n this.medidoresUser = [], [];\n for (let index = 0; index < this.medidores.length; index++) {\n const element = this.medidores[index];\n if (element.user && element.user._id === user_id) {\n this.medidoresUser.push(element);\n }\n }\n }", "function mapaProcesos_mapa_esquema(jsonObj,cont) {\n //Tenemos el JSON completo y el nivel en el que estamos\n var datos_mp_fullcontent = jsonObj;\n var i = cont;\n\n //Tenemos el segundo array del JSON completo [mp_estructura] -> [subnivel]\n var datos_mp_content = datos_mp_fullcontent[i].subnivel;\n\n for (var j = 0; j < datos_mp_content.length; j++) {\n var result_nombre = \"\";\n var result_nivel = \"\";\n result_nombre = datos_mp_content[j].nombre;\n result_nivel = datos_mp_content[j].nivel;\n result_nivel_sindecimal = result_nivel.split(\"_\",3);\n \n //Recorrido del primer nivel del esquema del MP\n if (result_nivel_sindecimal[0] == \"1\"){\n if (result_nivel_sindecimal[1] == \"01\"){\n texto_a_imprimir += \"<div class=\\\"bc_mp_estruct_part1_25porc\\\"><p></p></div>\"+\n \"<div class=\\\"bc_mp_estruct_part1_50porc\\\">\"+ \n \"<div class=\\\"bc_mp_caja_borde bc_mp_estruct_part1_50porc_intern_33porc\\\">\"+ result_nombre +\"</div>\";\n }\n else\n {\n if (result_nivel_sindecimal[1] == \"02\"){\n texto_a_imprimir += \"<div class=\\\"bc_mp_caja_borde bc_mp_estruct_part1_50porc_intern_33porc\\\">\"+ result_nombre +\"</div>\";\n }\n else\n {\n if (result_nivel_sindecimal[1] == \"03\"){\n texto_a_imprimir += \"<div class=\\\"bc_mp_caja_borde bc_mp_estruct_part1_50porc_intern_33porc\\\">\"+ result_nombre +\"</div>\"+\"</div>\"+\n \"<div class=\\\"bc_mp_estruct_part1_25porc\\\"><p></p></div>\";\n }\n }\n }\n }\n\n //Recorrido del segundo nivel del esquema del MP\n if (result_nivel_sindecimal[0] == \"2\"){\n if (result_nivel_sindecimal[1] == \"01\"){\n texto_a_imprimir += \"<div class=\\\"bc_mp_caja_borde bc_mp_caja_bgcolor_gris2 bc_mp_estruct_part2_16porc\\\">\"+ result_nombre +\"</div>\";\n }\n else{\n if ((result_nivel_sindecimal[1]==\"02\")||(result_nivel_sindecimal[1]==\"05\")){\n texto_a_imprimir += \"<div class=\\\"bc_mp_estruct_part2_05porc\\\">\"+ \">\" +\"</div>\"+\n \"<div class=\\\"bc_mp_estruct_part2_16porc\\\">\"+\n \"<div class=\\\"bc_mp_caja_borde bc_mp_caja_bgcolor_gris2 bc_mp_estruct_part2_16porc_agrupados_bottom\\\">\"+ result_nombre +\"</div>\";\n }\n else\n {\n if ((result_nivel_sindecimal[1]==\"03\")||(result_nivel_sindecimal[1]==\"06\")){\n texto_a_imprimir += \"<div class=\\\"bc_mp_caja_borde bc_mp_caja_bgcolor_gris2 bc_mp_estruct_part2_16porc_agrupados_top\\\">\"+ result_nombre +\"</div>\"+\n \"</div>\";\n }\n }\n if ((result_nivel_sindecimal[1] == \"04\")||(result_nivel_sindecimal[1] == \"07\")){\n texto_a_imprimir += \"<div class=\\\"bc_mp_estruct_part2_05porc\\\">\"+ \">\" +\"</div>\"+\n \"<div class=\\\"bc_mp_caja_borde bc_mp_caja_bgcolor_gris2 bc_mp_estruct_part2_16porc\\\">\"+ result_nombre +\"</div>\";\n }\n }\n }\n\n //Recorrido del tercer nivel del esquema del MP\n if (result_nivel_sindecimal[0] == \"3\"){\n if (result_nivel_sindecimal[1] < \"20\"){\n if (result_nivel_sindecimal[1] == \"01\"){\n texto_a_imprimir += \"<div class=\\\"bc_mp_estruct_part3_50porc\\\">\";\n }\n \n\n texto_a_imprimir += \"<div class=\\\"bc_mp_caja_borde bc_mp_estruct_part3_50porc_intern_33porc\\\">\"+ result_nombre +\"</div>\";\n }\n else\n {\n if (result_nivel_sindecimal[1] == \"21\"){\n texto_a_imprimir += \"</div><div class=\\\"bc_mp_estruct_part3_50porc\\\">\";\n }\n\n texto_a_imprimir += \"<div class=\\\"bc_mp_caja_borde bc_mp_caja_bgcolor_gris1 bc_mp_estruct_part3_50porc_intern_33porc\\\">\"+ result_nombre +\"</div>\";\n\n if (result_nivel_sindecimal[1] == \"29\"){\n texto_a_imprimir += \"</div>\";\n }\n }\n }\n\n }\n texto_a_imprimir += \"</div>\";\n}", "function inizializzaDati(oggetto){\r\n \"use strict\";\r\n\tsessionStorage.numTurnoP = Number(sessionStorage.numTurnoP) + 1;\r\n\tnomeGruppo = oggetto.group.name;\r\n //Prelevo i dati dal server, e salvo i dati\r\n\r\n //Variabile per il numero di camion\r\n var numeroCamion = oggetto.group.transportPawns.length;\r\n\r\n caricaPillsCamion(numeroCamion);\r\n \r\n \r\n for(var j=0; j<numeroCamion; j++){\r\n var camion = new Object();\r\n\t camion.pawnID = oggetto.group.transportPawns[j].pawnID;\r\n\t for(var i=0; i<oggetto.pawnLocations.length; i++){\r\n\t\t if(oggetto.pawnLocations[i].pawnID===camion.pawnID){\r\n\t\t\t camion.origine=oggetto.pawnLocations[i].location.name;\r\n\t\t }\r\n\t }\r\n\t camion.risorseTrasportate = oggetto.group.transportPawns[j].payload.length;\r\n\t camion.quantità = [];\r\n\t camion.tipologia = [];\r\n\t\tfor(var risorse=0; risorse<camion.risorseTrasportate; risorse++){\r\n\t\t\tcamion.quantità.push(oggetto.group.transportPawns[j].payload[risorse].quantity) ;\r\n \t\tcamion.tipologia .push(oggetto.group.transportPawns[j].payload[risorse].resource) ;\r\n\t\t}\r\n \r\n camion.spostamenti= oggetto.pawnMoves[j].remainingMoves;\r\n arrCamion.push(camion);\r\n\t\t\r\n }\r\n \r\n creaTabProduzione(arrCamion);\r\n\t\r\n\tfor(var i=0; i<arrCamion.length; i++){\r\n\t\taggiornaListaDestinazioni(arrCamion, i);\r\n\t}\r\n}", "efficacitePompes(){\n\n }", "static cambiarPantalla(pantalla){\n for (const property in pantallas) {//FOR IN - RECORRE EL OBJETO\n pantallas[property].style.display = \"none\";\n }\n pantallas[pantalla].style.display = \"flex\";\n }", "function cargarCgg_res_beneficiarioCtrls(){\n if(inInfoPersona.CRPER_CODIGO_AUSPICIANTE != undefined && inInfoPersona.CRPER_CODIGO_AUSPICIANTE.length>0){\n if(inInfoPersona.CRPJR_CODIGO.length>0)\n {\n txtCrper_codigo.setValue(inInfoPersona.CRPJR_RAZON_SOCIAL);\n tmpAuspiciantePJ = inInfoPersona.CRPJR_CODIGO;\n txtCrpjr_representante_legal.setValue(inInfoPersona.CRPER_NOMBRE_AUSPICIANTE);\n tmpAuspiciante= inInfoPersona.CRPER_CODIGO_AUSPICIANTE;\n rdgTipoAuspiciante.setValue('rdgTipoAuspiciante',TypeAuspiciante.JURIDICA);\n }\n else\n {\n txtCrper_codigo.setValue(inInfoPersona.CRPER_NOMBRE_AUSPICIANTE);\n tmpAuspiciante= inInfoPersona.CRPER_CODIGO_AUSPICIANTE;\n rdgTipoAuspiciante.setValue('rdgTipoAuspiciante',TypeAuspiciante.NATURAL);\n }\n }\n }", "function jeu_piocherDsPaquet(me){\n\t\tmy_logger((me?PROMPT_ME:PROMPT_IA)+\" Piocher une carte\");\n\t\t//piocher la première carte du paquet\n\t\tpioche = paquet2.cartes.shift();\n\t\tcarte_piochee=JSON.parse(pioche);\n\t\t\n\t\t//Si carte adv => en jeu pour ADV\n\t\t//\t\tSSI nb carteADV en jeu <4\n\t\tme = !(etreCarteAdv(carte_piochee));\n\t\tcimetiere = (compterCarteEnjeu(me)>=4);\n\t\t\n\t\tidxDispo = trouverIndiceDispo(me);\n\t\t\n\t\tif (!cimetiere && idxDispo!=-1){\t\t\t\t\t\t\n\t\t\tctrCarte=(me?cc_jeuMe:cc_jeuAdv);\n\t\t\tmy_logger((me?PROMPT_ME:PROMPT_IA)+\" \"+carte_piochee.nom+\" mise en jeu pour \"+(me?\"me\":\"adv\")+ \" en \"+idxDispo);\n\t\t\t\n\t\t\t//créer une carte pour ADV et afficher\n\t\t\tposerCarteEnJeu(carte_piochee,me,idxDispo);\n\t\t\t\n\t\t\tif (me){\n\t\t\t\tjeu_me[idxDispo]=carte_piochee;\n\t\t\t\tcc_jeuMe++;\n\t\t\t}else{\n\t\t\t\tjeu_adv[idxDispo]=carte_piochee;\n\t\t\t\tcc_jeuAdv++;\n\t\t\t}\t\t\t\t\t\t\n\t\t}else{\n\t\t\tsacrifierUneCarte(-1,carte_piochee,me,true);\n\n\t\t\talert((me?PROMPT_ME:PROMPT_IA)+\" \"+carte_piochee.nom+\" placée ds cimetière !\");\n\t\t}\n\t\tif (me){\n\t\t\tnbc_paquet_me--;\n\t\t}else{\n\t\t\tnbc_paquet_adv--;\n\t\t}\n\t }", "async loadMesas() {\n const mesas = [];\n await this.mesasRef.get().then(\n querySnapshot => {\n querySnapshot.forEach(doc => {\n console.log(doc.id, \" => \", doc.data());\n mesas.push(doc.data());\n })\n })\n .catch(err => {\n console.log('Error getting documents => ', err);\n });\n console.log('Mesas', mesas);\n return mesas;\n }" ]
[ "0.66760886", "0.6577735", "0.5897365", "0.58847046", "0.586581", "0.5826479", "0.5785089", "0.57821685", "0.5718523", "0.5701656", "0.5685478", "0.5684123", "0.56406814", "0.5619061", "0.5607755", "0.55937815", "0.55599284", "0.55578953", "0.55327165", "0.5508442", "0.55007136", "0.5498699", "0.54966295", "0.5492698", "0.5490337", "0.54842633", "0.54756904", "0.5471959", "0.54569167", "0.54510623", "0.54371643", "0.5425531", "0.5413205", "0.5412129", "0.5412063", "0.54116553", "0.53957605", "0.53867203", "0.53797716", "0.53796005", "0.537773", "0.5377587", "0.53736395", "0.53668493", "0.53632444", "0.53589714", "0.53588307", "0.5355942", "0.535346", "0.5353247", "0.5351914", "0.5349562", "0.53469944", "0.53328866", "0.53315675", "0.5331538", "0.53296685", "0.53256273", "0.53254586", "0.5312688", "0.530506", "0.53042483", "0.5301556", "0.52993846", "0.5295962", "0.5286461", "0.5286461", "0.52845895", "0.5281007", "0.5269508", "0.5266951", "0.5260361", "0.52588123", "0.5255357", "0.525042", "0.5248601", "0.52436054", "0.523492", "0.523021", "0.52290195", "0.52218944", "0.52218705", "0.52093893", "0.52034533", "0.5185917", "0.5183567", "0.51640475", "0.51602036", "0.51586443", "0.51572484", "0.51478803", "0.51408786", "0.51376504", "0.51282716", "0.51161945", "0.51150316", "0.5113927", "0.51123214", "0.5111462", "0.51075745" ]
0.6068864
2
Handles a value change within this application's top controller.
function handleTopChanged () { org.fftlab.APPLICATION.transformTopToBottom(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() {\n this._updateValueProperty();\n\n this.sendAction('action', this.get('value'), this);\n }", "function valueChanged() {\n debug && console.log( \"ManageWorkOrderRepairDetails: value changed\" );\n JSONData.setUnsavedChanges( true, \"manageWorkOrderSave\" );\n }", "function handleChange(event, value) {\n setValue(value);\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "updateValue() {\n this.value = this.getValueFromView();\n this.emit(this.value);\n }", "changeValue(event) {\n this.setValue(event.currentTarget.value);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "handler(newVal, oldVal) {\n if(!TypeChecker.isUndefined(oldVal)) {\n this.getValue();\n }\n }", "value(value) {\n this.newValue = value\n }", "dispatchValueChange() {\n console.log('### dispatching value change from ', this);\n const path = this.ownerForm.resolveBinding(this);\n this.dispatchEvent(new CustomEvent(\n 'value-changed',\n {\n composed: true,\n bubbles: true,\n detail: {'modelItem': this.modelItem, \"path\":path,\"target\":this}\n }));\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "function changeValue(val) {\n\t\t\t\tvalue = val;\n\t\t\t\tstarChange(val);\n\t\t\t}", "value(value) {\n this.newValue = value;\n }", "function valueChange(value) {\n\t\tsetTransAmount(value);\n\t\tsetIsPending(false);\n\t\tsetIsError(false);\n\t}", "inputValueDidChange() {\n let value = parseInt(this.get('inputValue'), 10);\n this.set('value', isNaN(value) ? undefined : value);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "value(value, oldValue) {\n this.watchValue(value);\n }", "handleChangeApplication(event, index, value) {\r\n this.props.UpdateApplication(value);\r\n }", "_handleChildValueChange() {\n this.stateChanges.next(undefined);\n this._changeDetectorRef.markForCheck();\n }", "_handleChildValueChange() {\n this.stateChanges.next(undefined);\n this._changeDetectorRef.markForCheck();\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "OnValueChanged()\n {\n if (this._constantBuffer)\n {\n this.Apply(this._constantBuffer, this._offset);\n }\n }", "run() {\n if (this.active) {\n const value = this.get()\n if (\n value !== this.value\n ) {\n // set new value\n const oldValue = this.value\n this.value = value\n this.cb.call(this.vm, value, oldValue)\n }\n }\n }", "onKNXValueChange(field, oldValue, knxValue) {\n\t\t// value for HomeKit\n\t\tvar newValue;\n\t\t\n\t\tlog(\"INFO: onKNXValueChange(\" + field + \", \"+ oldValue + \", \"+ knxValue+ \")\");\n\n\t\tswitch(field) {\n\n\t\t\tcase \"TargetPosition\":\n\t\t\t\t// TargetPosition is DPT5.001 Percentage (0..255)\n\t\t\t\t// need to convert to (0..100) first\n\t\t\t\t// Homekit is using %-open, meaning 0% is closed/down\n\t\t\t\t\n\t\t\t\tnewValue = 100 - knxValue*100/255;\n\t\t\t\tthis.myAPI.setValue(\"TargetPosition\", newValue);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"CurrentPosition\":\n\t\t\t\t// Current Position is sent by the actuator if the Movement has stopped a new postion is reached\n\t\t\t\n\t\t\t\t// CurrentPosition is DPT5.001 Percentage (0..255)\n\t\t\t\t// need to convert to (0..100) first\n\t\t\t\t// Homekit is using %-open, meaning 0% is closed/down\n\n\t\t\t\tnewValue = 100 - knxValue*100/255;\n\t\t\t\tthis.myAPI.setValue(\"TargetPosition\", newValue);\n\t\t\t\tthis.myAPI.setValue(\"CurrentPosition\", newValue);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"ShutterMoveUp\":\n\t\t\t\tnewValue = knxValue == 1 ? 1 : 2;\n\t\t\t\tthis.myAPI.setValue(\"PositionState\", newValue);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"ShutterMoveDown\":\n\t\t\t\tnewValue = knxValue == 1 ? 0 : 2;\n\t\t\t\tthis.myAPI.setValue(\"PositionState\", newValue);\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "handleValueChange(event) {\n this.value = event.target.value;\n }", "callbackValueChange(address, value) {\n this.setDSPValueCallback(address, String(value));\n this.faustInterfaceView.slider.value = String((value - parseFloat(this.itemParam.min)) / parseFloat(this.itemParam.step));\n this.faustInterfaceView.output.textContent = String(value.toFixed(parseFloat(this.precision)));\n }", "_updateValue(value) {\n const valuesHandler = this._valuesHandler;\n valuesHandler.updateValue(valuesHandler.getActualValue(value));\n }", "function onNTValueChanged(key, value, isNew) {\n if(key.startsWith('/SmartDashboard/')) {\n store.dispatch({\n 'type': 'sd-update',\n 'key': key.substr(16),\n 'value': value\n });\n } else if(key.startsWith('/Preferences/')) {\n store.dispatch({\n 'type': 'prefs-update',\n 'key': key.substr(13),\n 'value': value\n });\n }\n}", "updateValue (val) {\n this._value = val;\n }", "_onValueChanged() {\n\t\tconst { values, selectedIndex } = this.state;\n\t\tconst { onChange, name, expandSize } = this.props;\n\n\t\tconst visibleValues = getVisibleValues(values, expandSize);\n\n\t\tonChange(visibleValues[selectedIndex], name);\n\t}", "function handleAppSettingChange(data) {\n console.log(\"handleAppSettingChange\", data);\n let hudid = data.change.hudid\n let key = data.change.key\n let key_chain = data.change.key_chain\n let value = data.change.value\n let place = HDEF[hudid].app\n key_chain.forEach((item, i) => {\n place = place[item]\n });\n place = value\n sendToHud(\"lshud-settings\",{type:\"app_setting_change\", data:data.change, app:HDEF[hudid].app })\n sendToHud(hudid,{type:\"app_setting_change\", data:data.change, app:HDEF[hudid].app })\n}", "function handleItemValueChange(e) {\n updateItemValue(e.target.value);\n }", "function handleVisControllerValueChange(e, args) {\n var controlled_id = args[0];\n var controller = args[1];\n var values = args[2];\n\n var label_container = \n document.getElementById('field_label_' + controlled_id);\n var field_container =\n document.getElementById('field_container_' + controlled_id);\n var selected = false;\n for (var i = 0; i < values.length; i++) {\n if (bz_valueSelected(controller, values[i])) {\n selected = true;\n break;\n }\n }\n\n if (selected) {\n YAHOO.util.Dom.removeClass(label_container, 'bz_hidden_field');\n YAHOO.util.Dom.removeClass(field_container, 'bz_hidden_field');\n }\n else {\n YAHOO.util.Dom.addClass(label_container, 'bz_hidden_field');\n YAHOO.util.Dom.addClass(field_container, 'bz_hidden_field');\n }\n}", "updateValueEvents() {\n this.updateEventsContainer('value');\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChangedValue(event) {\r\n \t let decoder = new TextDecoder('utf-8');\r\n \t let value = event.target.value\r\n \t var now = new Date()\r\n \t console.log('> ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds() + ' Received message is: ' + decoder.decode(value) );\r\n\t mDebugMsg1(1,'> ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds() + ' Received message is: ' + decoder.decode(value) );\r\n \t receivedValue=value;\r\n\t serial.onReceive(receivedValue);\r\n //\t MessageReceived = receivedValue;\r\n mDebugMsg1(1,\"CONNECTED, Acquiring data\");\r\n \t isBTConnected = true;\r\n }", "function chVal(value) {\n this.val(value).trigger('change');\n }", "changeValue(value) {\n this.rawValue = value;\n if (this.rawToFinalValue) {\n this.value = this.rawToFinalValue(value);\n }\n else\n this.value = value;\n this.parentSectionReflection.valueChanged();\n this.validate();\n }", "_commandValChanged() {\n this.dispatchEvent(new CustomEvent(\"command-val-changed\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: this\n }));\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }", "_valueChanged() {\n clearTimeout(this.__valueDebounce);\n this.__valueDebounce = setTimeout(() => {\n let haxcore =\n this.form && this.form.value && this.form.value.haxcore\n ? this.form.value.haxcore\n : undefined;\n if (haxcore) {\n let cols =\n haxcore.search && haxcore.search[\"haxcore-search-columns\"]\n ? haxcore.search[\"haxcore-search-columns\"]\n : undefined;\n //set columns\n if (cols) this.cols = cols;\n // look for CDN provider\n if (haxcore.providers[\"haxcore-providers-cdn\"] == \"other\") {\n this.wcRegistryEndpoint =\n haxcore.providers[\"haxcore-providers-other\"] + this.__regFile;\n } else {\n this.wcRegistryEndpoint =\n haxcore.providers[\"haxcore-providers-cdn\"] + this.__regFile;\n }\n // apply filters\n this.applyFilters(haxcore.search);\n if (this.cardList) {\n this.dispatchEvent(\n new CustomEvent(\"appstore-changed\", {\n detail: {\n value: this.getAppstoreValues(),\n },\n })\n );\n }\n }\n }, 50);\n }", "_iStateOnValueChange() {\n this.dirty = true;\n }", "set value(_value) {\n this.setValue(_value);\n }", "_onInputChange (primarykey, value) {\n const lang = this.props.lang;\n const action = this.context.facade.getAction('ApplicationAction');\n if (this._keyboardTimeout) {\n clearTimeout(this._keyboardTimeout);\n }\n this._keyboardTimeout = setTimeout(() => {\n action.updateValue({ primarykey, value, lang });\n this._keyboardTimeout = null;\n }, 300);\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function updateValue( value ) \n{\n \n updateComponentValue( value );\n \n}", "onHKValueChange(field, oldValue, newValue) {\n\t\t// homekit will only send a TargetPosition value, so we do not care about (non-) potential others\n\t\tlet that = this;\n\n\t\tif (field === \"TargetPosition\") {\n\t\t\t\n\t\t\tlog(\"INFO: onHKValueChange(\" + field + \", \"+ oldValue + \", \"+ newValue + \")\");\n\n\t\t\tvar knxValue = 255 - newValue*255/100;\n\t\t\tlog(\"INFO: onHKValueChange after calc (\" + knxValue+ \")\");\n\t\t\tthis.myAPI.knxWrite(\"TargetPosition\", knxValue, \"DPT5\");\n\t\t}\n\t\t\n\t}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "changed() {\n const pages = this._pagesFromCtrl();\n pages.forEach((page) => {\n const pl = this.layoutManager.getPageLayout(page);\n SuiLayoutDialog.layoutParams.forEach((param) => {\n const ctrl = param + 'Ctrl';\n if (this.applyToPageCtrl.changeFlag) {\n this[ctrl].setValue(pl[param]);\n } else {\n if (this[ctrl].changeFlag) {\n pl[param] = this[ctrl].getValue();\n }\n }\n });\n this.view.setPageLayout(pl, page);\n });\n }", "handleChange() {\n this.forceUpdate();\n }", "function handleChange() {\n onChange(currentState);\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "doAction (value) {\n if (!this._params.simulate) {\n this._actuator.write(value.state === true ? 1 : 0, () => {\n this.addValue(value.state)\n })\n } else {\n this.addValue(value.state)\n }\n\n value.status = 'completed'\n\n console.info('Changed value of %s to %s', this._model.name, value.state)\n }", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "valueChanged() {\n const inputEl = this.nativeInput;\n if (inputEl && inputEl.value !== this.value) {\n inputEl.value = this.value;\n }\n }", "function waitForNewValue(){\n io.socket.on('newDeviceState', function (deviceState) {\n // if the device is the current device, push the value in the graph\n if(vm.currentDeviceType && deviceState.devicetype == vm.currentDeviceType.id){\n $scope.$apply(function(){\n vm.currentDeviceType.value = deviceState.value;\n if(vm.currentDeviceType.type == 'binary'){\n if(vm.currentDeviceType.value == 1) {\n vm.currentDeviceType.value = \"ON\"\n }else{\n vm.currentDeviceType.value = \"OFF\"\n }\n // if is binary, change icon\n getIcon() \n }\n });\n }\n });\n }", "set(_value) {\n if (this.differs(_value)) {\n this.value = _value;\n if (this.id) {\n require('comm/values').changed(this);\n }\n Queue.push(() => {\n this.refresh();\n });\n }\n }", "set(_value) {\n if (this.differs(_value)) {\n this.value = _value;\n if (this.id) {\n require('comm/values').changed(this);\n }\n Queue.push(() => {\n this.refresh();\n });\n }\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function parentController2()\n {\n var vm = this;\n vm.value = 1;\n }", "_toggledCommandValChanged() {\n this.dispatchEvent(new CustomEvent(\"toggled-command-val-changed\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: this\n }));\n }", "handleModelChange(model, value, opts) {\n this.setValue(value, opts);\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "changeInputValue(e){\n e.preventDefault();\n var target = e.target;\n var parent = target.parentNode;\n var input = parent.getElementsByClassName('timer-value')[0];\n if (target.nodeName == 'BUTTON'){\n if (target.classList.contains('value-increase')){\n this.inputValueIncrease(input);\n }\n if (target.classList.contains('value-decrease')){\n this.inputValueDecrease(input);\n }\n }\n this.view.render(this.getOptions());\n }", "OnValueChanged()\n {\n tw2.SetVariableValue(\"SelectorColor\", this.selectorColor);\n // Todo: Handle changes to post\n // Todo: Handle changes to environment paths\n }", "_updateValue(event, newColorValue) {\n\t\tthis.colorValue = newColorValue;\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "handleChange(e) {\n e.stopPropagation();\n const value = this.getInputEl().value;\n this.model.set({ value }, { fromInput: 1 });\n this.elementUpdated();\n }", "updateValue(value) {\n if (this.control) {\n this.control.control.setValue(value);\n }\n else {\n this.target.value = value;\n }\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "setTop(valueNew){let t=e.ValueConverter.toNumber(valueNew);null===t&&(t=this.getAttributeDefaultValueInternal(\"Top\")),t!==this.__top&&(this.__top=t,e.EventProvider.raise(this.__id+\".onPropertyChanged\",{propertyName:\"Top\"}),this.__processTop())}", "function onchange(index, key, choice, value) {\n\t\tstate[key][choice] = value;\n\t\t$scope.onchange(key, choice, value);\n\t\tconsole.log('onchange');\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}" ]
[ "0.70386714", "0.6580312", "0.645076", "0.6419568", "0.6363013", "0.63515925", "0.63312304", "0.6284234", "0.6241777", "0.6241287", "0.62380415", "0.61897504", "0.6117865", "0.6097524", "0.6079965", "0.60366", "0.60191476", "0.5981911", "0.59660035", "0.59660035", "0.59653836", "0.595028", "0.59479433", "0.5919246", "0.5908401", "0.58935726", "0.5880188", "0.5870205", "0.58696616", "0.5843227", "0.58426106", "0.5831836", "0.5826231", "0.5818421", "0.58154714", "0.58154714", "0.58032894", "0.58017796", "0.5796998", "0.5795273", "0.5770786", "0.57547003", "0.57434404", "0.5741614", "0.5740298", "0.57369924", "0.570382", "0.57006294", "0.5695998", "0.56880105", "0.5675129", "0.5653747", "0.56481755", "0.56426734", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5639847", "0.5629328", "0.5629328", "0.5629328", "0.5629328", "0.56290877", "0.56278956", "0.56201404", "0.56201404", "0.5618409", "0.5617399", "0.5616535", "0.56163037", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5610143", "0.5609186", "0.5606502", "0.56009966", "0.55995065", "0.5598294", "0.5584399", "0.55736965", "0.5570279", "0.55664206", "0.5561903" ]
0.0
-1
Handles a value change within this application's bottom controller.
function handleBottomChanged () { org.fftlab.APPLICATION.transformBottomToTop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() {\n this._updateValueProperty();\n\n this.sendAction('action', this.get('value'), this);\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "function valueChanged() {\n debug && console.log( \"ManageWorkOrderRepairDetails: value changed\" );\n JSONData.setUnsavedChanges( true, \"manageWorkOrderSave\" );\n }", "updateValue() {\n this.value = this.getValueFromView();\n this.emit(this.value);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "function handleChange(event, value) {\n setValue(value);\n }", "dispatchValueChange() {\n console.log('### dispatching value change from ', this);\n const path = this.ownerForm.resolveBinding(this);\n this.dispatchEvent(new CustomEvent(\n 'value-changed',\n {\n composed: true,\n bubbles: true,\n detail: {'modelItem': this.modelItem, \"path\":path,\"target\":this}\n }));\n }", "changeValue(event) {\n this.setValue(event.currentTarget.value);\n }", "_updateValue(value) {\n const valuesHandler = this._valuesHandler;\n valuesHandler.updateValue(valuesHandler.getActualValue(value));\n }", "OnValueChanged()\n {\n if (this._constantBuffer)\n {\n this.Apply(this._constantBuffer, this._offset);\n }\n }", "_handleChildValueChange() {\n this.stateChanges.next(undefined);\n this._changeDetectorRef.markForCheck();\n }", "_handleChildValueChange() {\n this.stateChanges.next(undefined);\n this._changeDetectorRef.markForCheck();\n }", "value(value) {\n this.newValue = value\n }", "handler(newVal, oldVal) {\n if(!TypeChecker.isUndefined(oldVal)) {\n this.getValue();\n }\n }", "callbackValueChange(address, value) {\n this.setDSPValueCallback(address, String(value));\n this.faustInterfaceView.slider.value = String((value - parseFloat(this.itemParam.min)) / parseFloat(this.itemParam.step));\n this.faustInterfaceView.output.textContent = String(value.toFixed(parseFloat(this.precision)));\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }", "inputValueDidChange() {\n let value = parseInt(this.get('inputValue'), 10);\n this.set('value', isNaN(value) ? undefined : value);\n }", "value(value) {\n this.newValue = value;\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "handleValueChange(event) {\n this.value = event.target.value;\n }", "function handleItemValueChange(e) {\n updateItemValue(e.target.value);\n }", "run() {\n if (this.active) {\n const value = this.get()\n if (\n value !== this.value\n ) {\n // set new value\n const oldValue = this.value\n this.value = value\n this.cb.call(this.vm, value, oldValue)\n }\n }\n }", "value(value, oldValue) {\n this.watchValue(value);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onHKValueChange(field, oldValue, newValue) {\n\t\t// homekit will only send a TargetPosition value, so we do not care about (non-) potential others\n\t\tlet that = this;\n\n\t\tif (field === \"TargetPosition\") {\n\t\t\t\n\t\t\tlog(\"INFO: onHKValueChange(\" + field + \", \"+ oldValue + \", \"+ newValue + \")\");\n\n\t\t\tvar knxValue = 255 - newValue*255/100;\n\t\t\tlog(\"INFO: onHKValueChange after calc (\" + knxValue+ \")\");\n\t\t\tthis.myAPI.knxWrite(\"TargetPosition\", knxValue, \"DPT5\");\n\t\t}\n\t\t\n\t}", "onCurrentChanged(value) {\n /* no-op */\n }", "function valueChange(value) {\n\t\tsetTransAmount(value);\n\t\tsetIsPending(false);\n\t\tsetIsError(false);\n\t}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handleChangedValue(event) {\r\n \t let decoder = new TextDecoder('utf-8');\r\n \t let value = event.target.value\r\n \t var now = new Date()\r\n \t console.log('> ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds() + ' Received message is: ' + decoder.decode(value) );\r\n\t mDebugMsg1(1,'> ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds() + ' Received message is: ' + decoder.decode(value) );\r\n \t receivedValue=value;\r\n\t serial.onReceive(receivedValue);\r\n //\t MessageReceived = receivedValue;\r\n mDebugMsg1(1,\"CONNECTED, Acquiring data\");\r\n \t isBTConnected = true;\r\n }", "handleChange() {\n this.forceUpdate();\n }", "get valueChanged() {\n return this._valueChanged;\n }", "updateValueEvents() {\n this.updateEventsContainer('value');\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "valueChanged() {\n const inputEl = this.nativeInput;\n if (inputEl && inputEl.value !== this.value) {\n inputEl.value = this.value;\n }\n }", "_commandValChanged() {\n this.dispatchEvent(new CustomEvent(\"command-val-changed\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: this\n }));\n }", "function handleVisControllerValueChange(e, args) {\n var controlled_id = args[0];\n var controller = args[1];\n var values = args[2];\n\n var label_container = \n document.getElementById('field_label_' + controlled_id);\n var field_container =\n document.getElementById('field_container_' + controlled_id);\n var selected = false;\n for (var i = 0; i < values.length; i++) {\n if (bz_valueSelected(controller, values[i])) {\n selected = true;\n break;\n }\n }\n\n if (selected) {\n YAHOO.util.Dom.removeClass(label_container, 'bz_hidden_field');\n YAHOO.util.Dom.removeClass(field_container, 'bz_hidden_field');\n }\n else {\n YAHOO.util.Dom.addClass(label_container, 'bz_hidden_field');\n YAHOO.util.Dom.addClass(field_container, 'bz_hidden_field');\n }\n}", "changed() {\n const pages = this._pagesFromCtrl();\n pages.forEach((page) => {\n const pl = this.layoutManager.getPageLayout(page);\n SuiLayoutDialog.layoutParams.forEach((param) => {\n const ctrl = param + 'Ctrl';\n if (this.applyToPageCtrl.changeFlag) {\n this[ctrl].setValue(pl[param]);\n } else {\n if (this[ctrl].changeFlag) {\n pl[param] = this[ctrl].getValue();\n }\n }\n });\n this.view.setPageLayout(pl, page);\n });\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "_reportValueChange() {\n // Stop reporting value changes after the list has been destroyed. This avoids\n // cases where the list might wrongly reset its value once it is removed, but\n // the form control is still live.\n if (this.options && !this._isDestroyed) {\n const value = this._getSelectedOptionValues();\n this._onChange(value);\n this._value = value;\n }\n }", "_reportValueChange() {\n // Stop reporting value changes after the list has been destroyed. This avoids\n // cases where the list might wrongly reset its value once it is removed, but\n // the form control is still live.\n if (this.options && !this._isDestroyed) {\n const value = this._getSelectedOptionValues();\n this._onChange(value);\n this._value = value;\n }\n }", "_onValueChanged() {\n\t\tconst { values, selectedIndex } = this.state;\n\t\tconst { onChange, name, expandSize } = this.props;\n\n\t\tconst visibleValues = getVisibleValues(values, expandSize);\n\n\t\tonChange(visibleValues[selectedIndex], name);\n\t}", "function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') return;\n if (getInstIfValueChanged(activeElementInst)) manualDispatchChangeEvent(nativeEvent);\n }", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}", "_toggledCommandValChanged() {\n this.dispatchEvent(new CustomEvent(\"toggled-command-val-changed\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: this\n }));\n }", "_iStateOnValueChange() {\n this.dirty = true;\n }", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "set(_value) {\n if (this.differs(_value)) {\n this.value = _value;\n if (this.id) {\n require('comm/values').changed(this);\n }\n Queue.push(() => {\n this.refresh();\n });\n }\n }", "set(_value) {\n if (this.differs(_value)) {\n this.value = _value;\n if (this.id) {\n require('comm/values').changed(this);\n }\n Queue.push(() => {\n this.refresh();\n });\n }\n }", "function broadcastChange(newValue) {\n const oldValue = currentVal;\n currentVal = newValue;\n\n const paramOldVal = oldValue === null ? null : oldValue.substring(8);\n const paramNewVal = currentVal.substring(8);\n const valueObj = {\n sizeName: paramNewVal,\n size: sizeMap[paramNewVal],\n oldSizeName: paramOldVal,\n oldSize: sizeMap[paramOldVal]\n };\n scope.bpListener = valueObj;\n $rootScope.$broadcast('bp-changed', valueObj);\n }", "propertyChangedHandler(key, oldValue, value) {\n super.propertyChangedHandler(key, oldValue, value);\n\n const that = this,\n input = that.$.input;\n\n function handleLeadingZeros() {\n if (that._initialDropDownOptionsSet === true) {\n that._setDropDownOptions();\n }\n\n if (that._radixNumber === 2 || that._radixNumber === 16) {\n that._cachedInputValue = that._number.toString(that._radixNumber, that._wordLengthNumber, that.leadingZeros);\n that._editableValue = that._cachedInputValue;\n that.$.input.value = that._cachedInputValue;\n }\n }\n\n // eslint-disable-next-line\n if (value != oldValue) {\n switch (key) {\n case 'disabled':\n that._setFocusable();\n\n if (value === true) {\n that.$.upButton.disabled = true;\n that.$.downButton.disabled = true;\n }\n else {\n that._disableComponents();\n }\n\n break;\n case 'dropDownAppendTo':\n that._positionDetection.dropDownAppendToChangedHandler();\n break;\n case 'unfocusable':\n that._setFocusable();\n break;\n case 'enableMouseWheelAction':\n case 'placeholder':\n case 'readonly':\n case 'spinButtonsDelay':\n case 'spinButtonsInitialDelay':\n break;\n case 'value': {\n if (value === '' && oldValue === null) {\n return;\n }\n\n if (value === null || value === '' || oldValue === null) {\n that.value = oldValue;\n that._triggerChangeEvent = that.validation === 'strict';\n that._validate(false, value);\n that._triggerChangeEvent = false;\n that._programmaticValueIsSet = true;\n return;\n }\n\n const stringValue = value.toString(),\n stringOldValue = oldValue.toString();\n\n if (stringOldValue !== stringValue) {\n if (stringOldValue.toUpperCase() === stringValue.toUpperCase()) {\n that.value = oldValue;\n }\n\n that.value = oldValue;\n that._triggerChangeEvent = that.validation === 'strict';\n that._validate(false, stringValue);\n that._triggerChangeEvent = false;\n that._programmaticValueIsSet = true;\n }\n break;\n }\n case 'radix':\n if (that.inputFormat === 'integer') {\n that._changeRadix(value);\n }\n else {\n that.error(that.localize('integerOnly', { property: 'radix' }));\n }\n break;\n case 'leadingZeros':\n if (that.inputFormat === 'integer' && that._number !== null) {\n handleLeadingZeros();\n }\n\n break;\n case 'min':\n case 'max': {\n if (value !== null) {\n that[`_${key}IsNull`] = false;\n }\n that._numericProcessor.validateMinMax(key === 'min', key === 'max');\n\n if (that.validation === 'strict') {\n that._triggerChangeEvent = true;\n that._validate(false, that.value);\n that._triggerChangeEvent = false;\n }\n else if (that._regexSpecial.nonNumericValue.test(that.value) === false) {\n const numberToValidate = that._numericProcessor.createDescriptor(that._number),\n validValue = that._validateRange(numberToValidate);\n\n if (that._numericProcessor.compare(that.value, validValue) === true) {\n that._programmaticValueIsSet = true;\n }\n }\n break;\n }\n case 'opened':\n if (value) {\n if (that.dropDownEnabled && !that.disabled && that.value !== null) {\n that._openRadix();\n }\n else {\n that.opened = false;\n }\n }\n else {\n that._closeRadix();\n }\n break;\n case 'outputFormatString':\n if (value) {\n that._cachedInputValue = that._numberRenderer.formatNumber(that._number, value);\n that.$.input.value = that._cachedInputValue;\n }\n else {\n that._cachedInputValue = that._editableValue;\n that.$.input.value = that._editableValue;\n }\n\n break;\n case 'dropDownEnabled':\n if (value) {\n if (that.inputFormat !== 'integer') {\n that.error(that.localize('integerOnly', { property: 'dropDownEnabled' }));\n }\n\n if (that._initialDropDownOptionsSet === true) {\n that._setDropDownOptions();\n }\n }\n else if (that.opened) {\n that._closeRadix(true);\n }\n break;\n case 'spinButtons':\n if (value) {\n that.$spinButtonsContainer.removeClass('jqx-hidden');\n }\n else {\n that.$spinButtonsContainer.addClass('jqx-hidden');\n }\n that._refreshShape();\n break;\n case 'spinButtonsStep':\n that._updateSpinButtonsStepObject();\n break;\n case 'significantDigits':\n case 'precisionDigits': {\n if (key === 'precisionDigits' && that.inputFormat === 'integer') {\n that.error(that.localize('noInteger', { property: key }));\n }\n\n if (key === 'significantDigits' && that.precisionDigits !== null) {\n that.precisionDigits = null;\n }\n else if (key === 'precisionDigits' && that.significantDigits !== null) {\n that.significantDigits = null;\n }\n\n if (that._regexSpecial.nonNumericValue.test(that.value) === false) {\n const renderedValue = that._renderValue(that._number);\n\n input.value = renderedValue;\n }\n\n break;\n }\n case 'decimalSeparator': {\n that._numberRenderer.localizationObject.decimalseparator = that.decimalSeparator;\n\n const numericValue = that._discardDecimalSeparator(input.value, oldValue),\n valueWithNewSeparator = that._applyDecimalSeparator(numericValue),\n editableValueWithNewSeparator = that._applyDecimalSeparator(that._discardDecimalSeparator(that._editableValue, oldValue));\n\n input.value = valueWithNewSeparator;\n that._editableValue = editableValueWithNewSeparator;\n break;\n }\n case 'spinButtonsPosition':\n if (value === 'left') {\n that.$.container.insertBefore(that.$.spinButtonsContainer, that.$.label.nextElementSibling);\n }\n else {\n that.$.container.insertBefore(that.$.spinButtonsContainer, that.$.dropDown);\n }\n\n that._refreshShape();\n break;\n case 'wordLength':\n that._wordLengthNumber = that._numericProcessor.getWordLength(value);\n\n if (that.inputFormat === 'integer') {\n that._numericProcessor.validateMinMax(true, true);\n\n if (that._number !== null) {\n let validValue = that._validateRange(new JQX.Utilities.BigNumber(that._number));\n\n that._updateValue(validValue);\n\n if (that.leadingZeros) {\n handleLeadingZeros();\n }\n }\n }\n break;\n case 'radixDisplay':\n if (value) {\n if (that.inputFormat !== 'integer') {\n that.error(that.localize('integerOnly', { property: 'radixDisplay' }));\n }\n\n that.$radixDisplayButton.removeClass('jqx-hidden');\n }\n else {\n that.$radixDisplayButton.addClass('jqx-hidden');\n }\n that._refreshShape();\n break;\n case 'radixDisplayPosition':\n if (value === 'left') {\n that.$.container.insertBefore(that.$.radixDisplayButton, that.$.input);\n }\n else {\n that.$.container.insertBefore(that.$.radixDisplayButton, that.$.unitDisplay.nextElementSibling);\n }\n\n that._refreshShape();\n break;\n case 'inputFormat':\n that._changeInputFormat(oldValue, value);\n break;\n case 'showUnit':\n if (value) {\n that.$unitDisplay.removeClass('jqx-hidden');\n }\n else {\n that.$unitDisplay.addClass('jqx-hidden');\n }\n that._refreshShape();\n break;\n case 'unit':\n that.$.unitDisplay.innerHTML = value;\n break;\n case 'scientificNotation': {\n if (that._regexSpecial.nonNumericValue.test(that.value) === false) {\n const renderedValue = that._renderValue(that._number);\n input.value = renderedValue;\n }\n\n break;\n }\n case 'locale':\n case 'messages':\n that._initialDropDownOptionsSet = false;\n break;\n case 'nullable':\n if (oldValue === true && that.value === null) {\n that._validate(false, '0');\n }\n\n break;\n case 'validation':\n if (value === 'strict') {\n that._triggerChangeEvent = true;\n that._validate(false, that.value);\n that._triggerChangeEvent = false;\n }\n\n break;\n }\n }\n else if (typeof value !== 'string' && typeof oldValue === 'string') {\n that[key] = oldValue;\n }\n that._cachedInputValue = input.value;\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "handleChangeApplication(event, index, value) {\r\n this.props.UpdateApplication(value);\r\n }", "_valueChanged() {\n clearTimeout(this.__valueDebounce);\n this.__valueDebounce = setTimeout(() => {\n let haxcore =\n this.form && this.form.value && this.form.value.haxcore\n ? this.form.value.haxcore\n : undefined;\n if (haxcore) {\n let cols =\n haxcore.search && haxcore.search[\"haxcore-search-columns\"]\n ? haxcore.search[\"haxcore-search-columns\"]\n : undefined;\n //set columns\n if (cols) this.cols = cols;\n // look for CDN provider\n if (haxcore.providers[\"haxcore-providers-cdn\"] == \"other\") {\n this.wcRegistryEndpoint =\n haxcore.providers[\"haxcore-providers-other\"] + this.__regFile;\n } else {\n this.wcRegistryEndpoint =\n haxcore.providers[\"haxcore-providers-cdn\"] + this.__regFile;\n }\n // apply filters\n this.applyFilters(haxcore.search);\n if (this.cardList) {\n this.dispatchEvent(\n new CustomEvent(\"appstore-changed\", {\n detail: {\n value: this.getAppstoreValues(),\n },\n })\n );\n }\n }\n }, 50);\n }", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "function handlePropertyChange(nativeEvent) {\n\t if (nativeEvent.propertyName !== 'value') {\n\t return;\n\t }\n\t if (getInstIfValueChanged(activeElementInst, nativeEvent)) {\n\t manualDispatchChangeEvent(nativeEvent);\n\t }\n\t}", "updateGaugeValue(newValue) {\n const that = this.context,\n oldValue = that.value;\n\n that.value = newValue;\n that._drawValue = that.logarithmicScale ? Math.log10(newValue).toString() : newValue;\n that._number = this.createDescriptor(that.value);\n that.$.digitalDisplay.value = newValue;\n that.$.fireEvent('change', { 'value': newValue, 'oldValue': oldValue });\n\n delete that._valueBeforeCoercion;\n }", "function handleChange() {\n onChange(currentState);\n }", "onKNXValueChange(field, oldValue, knxValue) {\n\t\t// value for HomeKit\n\t\tvar newValue;\n\t\t\n\t\tlog(\"INFO: onKNXValueChange(\" + field + \", \"+ oldValue + \", \"+ knxValue+ \")\");\n\n\t\tswitch(field) {\n\n\t\t\tcase \"TargetPosition\":\n\t\t\t\t// TargetPosition is DPT5.001 Percentage (0..255)\n\t\t\t\t// need to convert to (0..100) first\n\t\t\t\t// Homekit is using %-open, meaning 0% is closed/down\n\t\t\t\t\n\t\t\t\tnewValue = 100 - knxValue*100/255;\n\t\t\t\tthis.myAPI.setValue(\"TargetPosition\", newValue);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"CurrentPosition\":\n\t\t\t\t// Current Position is sent by the actuator if the Movement has stopped a new postion is reached\n\t\t\t\n\t\t\t\t// CurrentPosition is DPT5.001 Percentage (0..255)\n\t\t\t\t// need to convert to (0..100) first\n\t\t\t\t// Homekit is using %-open, meaning 0% is closed/down\n\n\t\t\t\tnewValue = 100 - knxValue*100/255;\n\t\t\t\tthis.myAPI.setValue(\"TargetPosition\", newValue);\n\t\t\t\tthis.myAPI.setValue(\"CurrentPosition\", newValue);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"ShutterMoveUp\":\n\t\t\t\tnewValue = knxValue == 1 ? 1 : 2;\n\t\t\t\tthis.myAPI.setValue(\"PositionState\", newValue);\n\n\t\t\t\tbreak;\n\n\t\t\tcase \"ShutterMoveDown\":\n\t\t\t\tnewValue = knxValue == 1 ? 0 : 2;\n\t\t\t\tthis.myAPI.setValue(\"PositionState\", newValue);\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "_valueChanged(v) {\n if(this._startHandle) {\n var valid = this._validateValue(v, 'value');\n if(valid) {\n this._moveHandle(this._startHandle, v);\n this.setAttribute('aria-valuenow',v);\n }\n }\n }", "updateValue(value) {\n const that = this.context,\n renderedValue = this.validate(value, that._minObject, that._maxObject),\n oldActualValue = that.value;\n\n if (value.toString() !== oldActualValue.toString() || that._scaleTypeChangedFlag) {\n that.value = value.toString();\n that._number = renderedValue;\n\n if (!that._programmaticValueIsSet) {\n that.$.fireEvent('change', { 'value': that.value, 'oldValue': oldActualValue });\n }\n }\n else {\n that.value = typeof (value) === 'string' ? value : value.toString();\n }\n\n that._drawValue = that.logarithmicScale ? Math.log10(renderedValue).toString() : renderedValue.toString();\n that._moveThumbBasedOnValue(that._drawValue);\n\n if (that.$.hiddenInput) {\n that.$.hiddenInput.value = that.value;\n }\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function handleAppSettingChange(data) {\n console.log(\"handleAppSettingChange\", data);\n let hudid = data.change.hudid\n let key = data.change.key\n let key_chain = data.change.key_chain\n let value = data.change.value\n let place = HDEF[hudid].app\n key_chain.forEach((item, i) => {\n place = place[item]\n });\n place = value\n sendToHud(\"lshud-settings\",{type:\"app_setting_change\", data:data.change, app:HDEF[hudid].app })\n sendToHud(hudid,{type:\"app_setting_change\", data:data.change, app:HDEF[hudid].app })\n}", "handleModelChange(model, value, opts) {\n this.setValue(value, opts);\n }" ]
[ "0.6967543", "0.6920667", "0.6835909", "0.6658889", "0.6596557", "0.65901476", "0.65281105", "0.64454955", "0.6380449", "0.63738567", "0.6373579", "0.6373579", "0.6352901", "0.63458955", "0.62582105", "0.6220317", "0.61975396", "0.6194963", "0.6180379", "0.6146054", "0.6142866", "0.6139798", "0.61328816", "0.6104423", "0.6068432", "0.606005", "0.60358316", "0.6028953", "0.60036343", "0.59943694", "0.59901685", "0.5989029", "0.5986088", "0.59690315", "0.59654397", "0.59512013", "0.59495115", "0.59449494", "0.59449494", "0.59449494", "0.59449494", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.5937531", "0.59172946", "0.59172946", "0.5911874", "0.5911874", "0.5908346", "0.59077007", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5901351", "0.5896433", "0.58751076", "0.5873886", "0.58725524", "0.58725524", "0.58689094", "0.5864696", "0.585857", "0.585154", "0.5843136", "0.5835323", "0.5835323", "0.5835323", "0.5835323", "0.5835323", "0.5835323", "0.5835323", "0.5835323", "0.5835323", "0.5835323", "0.5835323", "0.58329993", "0.5827685", "0.5822907", "0.58177125", "0.58085287", "0.5799481", "0.5786885", "0.5786467" ]
0.0
-1
Fonction pour inverser la couleur HEX
function invertColor(col){ if (col == "#808080") return "#999999"; const colors = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']; let inverseColor = '#'; col.replace('#','').split('').forEach(i => { const index = colors.indexOf(i); inverseColor += colors.reverse()[index]; }); return inverseColor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inverseHex(h){\n var hex = h.substr(1).toUpperCase();\n var inv_val = \"#\";\n\n var h_vals = {\"A\": 5, \"B\": 4, \"C\": 3, \"D\": 2, \"E\": 1, \"F\": 0};\n var inv_h_vals = [\"F\", \"E\", \"D\", \"C\", \"B\", \"A\", \"9\", \"8\", \"7\", \"6\", \"5\", \"4\", \"3\", \"2\", \"1\", \"0\"];\n\n for(var i = 0; i < hex.length; i++){\n var h_i = hex.substr(i, 1);\n var ind = \"ABCDEF\".indexOf(h_i) == -1 ? parseInt(h_i) : h_vals[h_i];\n\n inv_val += inv_h_vals[ind];\n }\n\n return inv_val;\n}", "function decToHex(d) { var dr = Number(d).toString(16); while(dr.length < 4) { dr = '0'+dr; } return '0x'+dr.toUpperCase(); }", "function in_hex() {\n let backend = entrada_selecionada();\n let s = NaN;\n do {\n s = parseInt(prompt(\"Insira uma word de quatro nibbles como 00A0 ou F0DA.\",\n \"0000\"), 16);\n } while (isNaN(s));\n backend.inserir(s);\n update_entrada();\n}", "function decToHex(num){\n\tvar result = \"\";\n\tvar temp;\n\tvar hexValues = [\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\"];\n\twhile(num > 0){\n\ttemp = num % 16;\n\tresult = hexValues[temp] + result;\n\tnum = Math.floor(num / 16);\n\t}\n\treturn result;\n}", "function binToHex(a) {\r\n\tvar newVal = \"\";\r\n\tfor (i = 0; i < a.length/8; i++) \r\n\t\tnewVal += (\"00\" + parseInt(a.slice(8*i, 8*i+8),2).toString(16)).slice(-2);\r\n\treturn newVal;\r\n}", "function hexcode(v) { return v < 10 ? 0x30 + v : 0x61 + v - 10 }", "function flipHexString(hexValue, hexDigits) {\n var h = hexValue.substr(0, 2);\n for (var i = 0; i < hexDigits; ++i) {\n h += hexValue.substr(2 + (hexDigits - 1 - i) * 2, 2);\n }\n return h;\n}", "function invertColor(hex) {\n if (hex.indexOf('#') === 0) {\n hex = hex.slice(1);\n }\n // convert 3-digit hex to 6-digits.\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n if (hex.length !== 6) {\n throw new Error('Invalid HEX color.');\n }\n // invert color components\n var r = (255 - parseInt(hex.slice(0, 2), 16)).toString(16),\n g = (255 - parseInt(hex.slice(2, 4), 16)).toString(16),\n b = (255 - parseInt(hex.slice(4, 6), 16)).toString(16);\n // pad each with zeros and return\n return '#' + padZero(r) + padZero(g) + padZero(b);\n }", "function decToHex(num){\n var finalNum;\n \n //change the input to a hexidecimal number\n finalNum = num.toString(16);\n \n return finalNum;\n}", "function dec2hex(v) {return v.toString(16);}", "function dec2hex(v) {return v.toString(16);}", "function XOR_hex(a, b) {\r\n\t\tvar res = \"\",\r\n\t\t\ti = a.length,\r\n\t\t\tj = b.length;\r\n\t\twhile (i-- >0 && j-- >0)\r\n\t\t\tres = (parseInt(a.charAt(i), 16) ^ parseInt(b.charAt(j), 16)).toString(16) + res;\r\n\t\t\r\n\t\t//document.write(res+\"<br>\"); //comment it\r\n\t\treturn res;\r\n\t}", "function decToHex(num) {\n num = (Math.round(num)).toString(16);\n if(num.length == 1){\n return (\"0\".concat(num));\n }\n else return num;\n}", "toHex() {\n const value = this.value.toString(16).toUpperCase();\n return new Hex(`#${value}`);\n }", "toHex() {\n const value = this.value.toString(16).toUpperCase();\n return new Hex(`#${value}`);\n }", "function __hex($num) {\r\nvar str = \"\";\r\nfor(var j = 7; j >= 0; j--)\r\nstr += _chars.charAt(($num >> (j * 4)) & 0x0F);\r\nreturn str;\r\n}", "function binHexa(obj) {\r\n var hexaVal =[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"];\r\n var decVal =[\"0000\",\"0001\",\"0010\",\"0011\",\"0100\",\"0101\",\"0110\",\"0111\",\"1000\",\"1001\",\"1010\",\"1011\",\"1100\",\"1101\",\"1110\",\"1111\"];\r\n var pas0;\r\n var valeurHex=\"\";\r\n var valeurDec1=obj[0]+obj[1]+obj[2]+obj[3];\r\n var valeurDec2=obj[4]+obj[5]+obj[6]+obj[7];\r\n for(pas0=0;pas0<hexaVal.length;pas0++){\r\n if (valeurDec1==decVal[pas0]){\r\n valeurHex=hexaVal[pas0];\r\n }\r\n }\r\n for(pas0=0;pas0<hexaVal.length;pas0++){\r\n if (valeurDec2==decVal[pas0]){\r\n valeurHex+=hexaVal[pas0];\r\n }\r\n }\r\n return valeurHex;\r\n}", "function ascii_to_hex() {\r\n\tvar outResult = '';\r\n\tvar inValue = input.value;\r\n\tfor (var i = 0; i < inValue.length; i++) {\r\n\t\toutResult += inValue.charCodeAt(i).toString(16).toUpperCase();\r\n\t}\r\n\toutput.value = outResult;\r\n}", "function fromUtf8(value) {\n let eValue = (0, _utf.encode)(value);\n let hex = \"\"; // remove \\u0000 padding from either side\n\n eValue = eValue.replace(/^(?:\\u0000)*/, \"\");\n eValue = eValue.split(\"\").reverse().join(\"\");\n eValue = eValue.replace(/^(?:\\u0000)*/, \"\");\n eValue = eValue.split(\"\").reverse().join(\"\");\n\n for (let i = 0; i < eValue.length; i++) {\n const code = eValue.charCodeAt(i);\n const n = code.toString(16);\n hex += n.length < 2 ? `0${n}` : n;\n }\n\n return `${hex}`;\n}", "function toHexClicked(){colorTo(4); toHex = true, toDec = false; toBin = false, toOct = false;}", "byte2Hex(n) {\r\n const nybHexString = '0123456789ABCDEF';\r\n return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);\r\n }", "function hex(x) {\n for (var i = 0; i < x.length; i++)\n x[i] = makeHex(x[i]);\n return x.join('');\n}", "function convertToHex(input) {\n var i;\n var output = [];\n //console.log(\"\\nInput to convertToHex is :\"+input+\"\\n\");\n for (i in input) {\n output[i] = (input[i].charCodeAt(0)).toString(16);\n if (output[i].length!=2) {\n output[i]=\"0\"+output[i];\n }\n }\n //console.log(output);\n countFrequncy(output);\n return output;\n}", "function reverseHex(hex) {\n const buf = Buffer.from(hex, 'hex').reverse();\n return buf.toString('hex');\n}", "function invertColor(hex, bw) {\n if (hex.indexOf('#') === 0) {\n hex = hex.slice(1);\n }\n // convert 3-digit hex to 6-digits.\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n if (hex.length !== 6) {\n throw new Error('Invalid HEX color.');\n }\n var r = parseInt(hex.slice(0, 2), 16),\n g = parseInt(hex.slice(2, 4), 16),\n b = parseInt(hex.slice(4, 6), 16);\n if (bw) {\n // http://stackoverflow.com/a/3943023/112731\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\n ? '#000000'\n : '#FFFFFF';\n }\n // invert color components\n r = (255 - r).toString(16);\n g = (255 - g).toString(16);\n b = (255 - b).toString(16);\n // pad each with zeros and return\n return \"#\" + padZero(r) + padZero(g) + padZero(b);\n }", "function invertColour(color) {\r\n return (\r\n \"#\" +\r\n (\r\n \"000000\" + (0xffffff ^ parseInt(color.substring(1), 16)).toString(16)\r\n ).slice(-6)\r\n );\r\n}", "function invertColor(hexTripletColor) { //invert color for text so it's visible no matter what\n var color = hexTripletColor;\n color = color.substring(1);\n color = parseInt(color, 16);\n color = 0xFFFFFF ^ color;\n color = color.toString(16);\n color = (\"000000\" + color).slice(-6);\n color = \"#\" + color;\n return color;\n}", "function hexlify (arr) {\n return arr.map(function (byte) {\n return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n }).join('');\n}", "static bytesToHex(bytes) {\n return bytes.reduce(\n (str, byte) => str + byte.toString(16).padStart(2, '0'),\n ''\n )\n }", "function decToHex(dec) {\n if(dec >= 255) {\n dec = 255;\n }\n if(dec < 0) {\n dec = 0;\n }\n \n var hex = dec.toString(16);\n if(hex.length == 1) {\n hex = '0' + hex;\n }\n \n return hex;\n }", "function convertFromHex(hex) {\r\n var hex = hex.toString();//force conversion\r\n var str = '';\r\n for (var i = 0; i < hex.length; i += 2)\r\n str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));\r\n return str;\r\n}", "function processHEX(val) {\n //does the hex contain extra char?\n var hex = (val.length >6)?val.substr(1, val.length - 1):val;\n // is it a six character hex?\n if (hex.length > 3) {\n\n //scrape out the numerics\n var r = hex.substr(0, 2);\n var g = hex.substr(2, 2);\n var b = hex.substr(4, 2);\n\n // if not six character hex,\n // then work as if its a three character hex\n } else {\n\n // just concat the pieces with themselves\n var r = hex.substr(0, 1) + hex.substr(0, 1);\n var g = hex.substr(1, 1) + hex.substr(1, 1);\n var b = hex.substr(2, 1) + hex.substr(2, 1);\n\n }\n // return our clean values\n return [\n parseInt(r, 16),\n parseInt(g, 16),\n parseInt(b, 16)\n ]\n}", "function processHEX(val) {\n //does the hex contain extra char?\n var hex = (val.length >6)?val.substr(1, val.length - 1):val;\n // is it a six character hex?\n if (hex.length > 3) {\n\n //scrape out the numerics\n var r = hex.substr(0, 2);\n var g = hex.substr(2, 2);\n var b = hex.substr(4, 2);\n\n // if not six character hex,\n // then work as if its a three character hex\n } else {\n\n // just concat the pieces with themselves\n var r = hex.substr(0, 1) + hex.substr(0, 1);\n var g = hex.substr(1, 1) + hex.substr(1, 1);\n var b = hex.substr(2, 1) + hex.substr(2, 1);\n\n }\n // return our clean values\n return [\n parseInt(r, 16),\n parseInt(g, 16),\n parseInt(b, 16)\n ]\n}", "function hex(b) {\n return ('0' + b.toString(16)).substr(-2);\n}", "function _hex(n) {\n var str = n.toString(16).toUpperCase();\n return str.length == 2 ? str : '0' + str;\n}", "function ascii_to_hex(str)\n{\n tempstr = '';\n\t\n for (a = 0; a < str.length; a = a + 1) \n\t{\n tempstr = tempstr + (\"00\" + str[a].toString(16)).substr(-2) + ' ';\n\t\t//(\"00\" + len.toString(16)).substr(-4)\n }\n\t\n return tempstr;\n}", "function rhex(num) {\r\n str = \"\";\r\n for (j = 0; j <= 3; j++)\r\n str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F)\r\n + hex_chr.charAt((num >> (j * 8)) & 0x0F);\r\n return str;\r\n }", "function toHex(n){return (n<16?\"0\":\"\")+n.toString(16);}", "function fromHexClicked(){colorFrom(4); fromHex = true, fromBin =false, fromDec = false, fromOct = false;}", "getHexColorValue() {\n let hexRepresentation = _.map(_.slice(this.props.value, 0, 3), (val)=>{\n let hexVal = val.toString(16);\n return hexVal.length === 1 ? '0' + hexVal : hexVal;\n }).join('');\n return '#' + hexRepresentation;\n }", "function hexlify(bytes) {\n var res = [];\n for (var i = 0; i < bytes.length; i++)\n res.push(hex(bytes[i]));\n\n return res.join('');\n}", "function hexlify(bytes) {\n var res = [];\n for (var i = 0; i < bytes.length; i++)\n res.push(hex(bytes[i]));\n\n return res.join('');\n}", "function tohex(n, npos) {\n if (n < 0) {\n n = 0xFFFFFFFF + n + 1;\n }\n return (\"00000000\" + n.toString(16).toUpperCase()).substr(-npos);\n }", "function getInverse(color){\n\tlet r = (255 - color.slice(4, 7)).toString(16);\n\tlet g = (255 - color.slice(9, 12)).toString(16);\n\tlet b = (255 - color.slice(14, 17)).toString(16);\n\t\n\tif (r.length == 1)\n\t\tr = '0' + r;\n\tif (g.length == 1)\n\t\tg = '0' + g;\n\tif (b.length == 1)\n\t\tb = '0' + b;\n\t\n\treturn '#' + r + g + b;\n}", "function dec2hex(i) {\n return (i + 0x10000).toString(16).substr(-2).toUpperCase();\n}", "hex(x) {\n var hexDigits = new Array(\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\");\n return isNaN(x) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\n }", "stringToHex(str) {\n\t\treturn parseInt(str.replace(/^#/, \"0x\"), 16);\n\t}", "function asHex(value) {\n return Array.from(value)\n .map(function (i) { return (\"00\" + i.toString(16)).slice(-2); })\n .join('');\n}", "function toHex(_ref2) {\n var r = _ref2.r,\n g = _ref2.g,\n b = _ref2.b;\n return \"#\".concat((0,_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__/* .rgbToHex */ .vq)(r, g, b, false));\n} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.", "function utf8ToHex(data) {\n return '0x' + Buffer.from(data, 'utf8').toString('hex');\n}", "function hexToBin(a) {\r\n\tvar newVal = \"\";\r\n\tfor (i = 0; i < a.length; i++) \r\n\t\tnewVal += (\"0000\" + parseInt(a.charAt(i),16).toString(2)).slice(-4);\r\n\treturn newVal;\r\n}", "function byte2Hex(n) {\n var nybHexString = \"0123456789ABCDEF\";\n return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);\n }", "function charToHex(c) {\r\n var ZERO = 48;\r\n var NINE = ZERO + 9;\r\n var littleA = 97;\r\n var littleZ = littleA + 25;\r\n var bigA = 65;\r\n var bigZ = 65 + 25;\r\n var result;\r\n\r\n if (c >= ZERO && c <= NINE) {\r\n result = c - ZERO;\r\n } else if (c >= bigA && c <= bigZ) {\r\n result = 10 + c - bigA;\r\n } else if (c >= littleA && c <= littleZ) {\r\n result = 10 + c - littleA;\r\n } else {\r\n result = 0;\r\n }\r\n return result;\r\n}", "function toHex(_ref2) {\n var r = _ref2.r,\n g = _ref2.g,\n b = _ref2.b;\n return \"#\".concat((0,conversion/* rgbToHex */.vq)(r, g, b, false));\n} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.", "function asHex(value) {\n return Array.from(value).map(function (i) {\n return (\"00\" + i.toString(16)).slice(-2);\n }).join('');\n}", "function hex(val) {\n var hex_rep = val.toString(16);\n return (hex_rep.length === 1) ? '0' + hex_rep : hex_rep;\n}", "function bytesToHex(c)\n{\n var digits = \"0123456789abcdef\";\n var num = c.length;\n var s = \"\";\n for (var i = 0; i < num; ++i) {\n var hi = Math.floor(c[i] >> 4);\n var lo = c[i] & 0xF;\n s += digits[hi] + digits[lo];\n }\n return s;\n}", "function byteToHex(num) {\n\t\t return ('0'+num.toString(16)).slice(-2);\n\t\t}", "function tostr2(hexStr){\n var answer = \"\"\n for (var i = 0; i < hexStr.length; i++){\n var cur = hexStr.charAt(i)\n switch (cur){\n case \"f\": answer += \"1111\"; break;\n case \"e\": answer += \"1110\"; break;\n case \"d\": answer += \"1101\"; break;\n case \"c\": answer += \"1100\"; break;\n case \"b\": answer += \"1011\"; break;\n case \"a\": answer += \"1010\"; break;\n case \"9\": answer += \"1001\"; break;\n case \"8\": answer += \"1000\"; break;\n case \"7\": answer += \"0111\"; break;\n case \"6\": answer += \"0110\"; break;\n case \"5\": answer += \"0101\"; break;\n case \"4\": answer += \"0100\"; break;\n case \"3\": answer += \"0011\"; break;\n case \"2\": answer += \"0010\"; break;\n case \"1\": answer += \"0001\"; break;\n case \"0\": answer += \"0000\"; break;\n }\n }\n return answer\n }", "function hexc(colorval) {\n var parts = colorval.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\n delete(parts[0]);\n for (var i = 1; i <= 3; ++i) {\n parts[i] = parseInt(parts[i]).toString(16);\n if (parts[i].length == 1) parts[i] = '0' + parts[i];\n }\n color = '#' + parts.join('');\n }", "function decimalToHex(value) {\r\n var v = value;\r\n var array = [];\r\n var remainder = v % 16;\r\n var division = Math.floor(v / 16);\r\n \r\n array.push(remainder);\r\n\r\n while(division >= 0) {\r\n if(division <= 0) {\r\n return array.reverse();\r\n } else {\r\n var next = Math.floor(division / 16);\r\n remainder = division % 16;\r\n division = next;\r\n array.push(remainder);\r\n };\r\n\r\n for (var i = 0; i <= array.length; i++) {\r\n if (array[i] > 9) {\r\n if (array[i] == 10) {\r\n array[i] = \"A\";\r\n };\r\n if (array[i] == 11) {\r\n array[i] = \"B\";\r\n };\r\n if (array[i] == 12) {\r\n array[i] = \"C\";\r\n };\r\n if (array[i] == 13) {\r\n array[i] = \"D\";\r\n };\r\n if (array[i] == 14) {\r\n array[i] = \"E\";\r\n };\r\n if (array[i] == 15) {\r\n array[i] = \"F\";\r\n };\r\n };\r\n };\r\n};\r\n}", "function binb2hex( data )\n{\n for( var hex='', i=0; i<data.length; i++ )\n {\n while( data[i] < 0 ) data[i] += 0x100000000;\n hex += ('0000000'+(data[i].toString(16))).slice( -8 );\n }\n return hex.toUpperCase();\n}", "function prevodNaDec2(barvaH) {\r\n // var regEx = /#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?/;\r\n const regEx = /^#([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})?$/; //#aabbccdd; !aby mi match nebo exec vyhodil na pozici 1-3 dvojice, musim\r\n //i regex zadat po dvojicich, nikoliv jako {6}, to pak nasledne zpracovani komplikuje, protoze i zapis barev je po dvojicich\r\n var jeHex = barvaH.match(regEx);\r\n // var jeHex = regEx.exec(barvaH);\r\n if (jeHex == null) {\r\n return \"Invalid color code\";\r\n }\r\n //toto reseni nize je pro regex zadany pro sestice {6}\r\n else {\r\n barvaToArray = barvaH.toUpperCase().split(\"\");\r\n var red = parseInt((barvaToArray[1] + barvaToArray[2]), 16); //pokud u parseInt prevadim do 16tkove soustavy, jako parametr muze byt i pismeno/string\r\n var green = parseInt((barvaToArray[3] + barvaToArray[4]), 16);\r\n var blue = parseInt((barvaToArray[5] + barvaToArray[6]), 16);\r\n var opacity = parseInt((barvaToArray[7] + barvaToArray[8]), 16);\r\n\r\n return `RGB (${red}, ${green}, ${blue}, ${opacity})`;\r\n }\r\n}", "function hex8(val) {\n\tvar n = val & 0xFF,\n\t\tstr = n.toString(16).toUpperCase();\n\twhile (str.length < 2)\n\tstr = \"0\" + str;\n\treturn str;\n}", "function hexVal (c) {\n return (\n c < 58 ? c - 48 : // 0 - 9\n c < 71 ? c - 55 : // A - F\n c - 87 // a - f\n );\n}", "function dec(hex) {\r\n return parseInt(hex, 16);\r\n }", "function dec(hex) {\r\n return parseInt(hex, 16);\r\n }", "function toUtf8(hex) {\n if (!isHexStrict(hex)) {\n throw new Error(`The parameter \"${hex}\" must be a valid HEX string.`);\n }\n\n let result = \"\";\n let code = 0;\n let eHex = hex; // remove 00 padding from either side\n\n eHex = eHex.replace(/^(?:00)*/, \"\");\n eHex = eHex.split(\"\").reverse().join(\"\");\n eHex = eHex.replace(/^(?:00)*/, \"\");\n eHex = eHex.split(\"\").reverse().join(\"\");\n const l = eHex.length;\n\n for (let i = 0; i < l; i += 2) {\n code = parseInt(eHex.substr(i, 2), 16);\n result += String.fromCharCode(code);\n }\n\n return (0, _utf.decode)(result);\n}", "function displayHex() {\n document.getElementById('hex').textContent = fullColorHex(r, g, b);\n}", "function toHex(_ref2) {\n var r = _ref2.r,\n g = _ref2.g,\n b = _ref2.b;\n return \"#\".concat((0,_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__.rgbToHex)(r, g, b, false));\n} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.", "function toHex(_ref2) {\n var r = _ref2.r,\n g = _ref2.g,\n b = _ref2.b;\n return \"#\".concat((0,_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__.rgbToHex)(r, g, b, false));\n} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.", "function toHex(_ref2) {\n var r = _ref2.r,\n g = _ref2.g,\n b = _ref2.b;\n return \"#\".concat((0,_ctrl_tinycolor__WEBPACK_IMPORTED_MODULE_0__.rgbToHex)(r, g, b, false));\n} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.", "function hex2string(hexx) {\n var str = '';\n for (var i = 0; i < hexx.length; i++)\n str += String.fromCharCode(hexx[i], 10)[0];\n return str;\n}", "function cutHex(h) {\n if (h.charAt(1) === \"x\") {\n return h.substring(2, 8);\n } else {\n return h.substring(1, 7);\n }\n}", "function rgbToHex(hex){\n return toHex(hex[0])+toHex(hex[1])+toHex(hex[2]);\n}", "function toHex(_ref2) {\n var r = _ref2.r,\n g = _ref2.g,\n b = _ref2.b;\n return \"#\".concat(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__ctrl_tinycolor__[\"rgbToHex\"])(r, g, b, false));\n} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.", "static reverseEndian(hexStr) {\n let num = new BN(hexStr, \"hex\");\n let buf = num.toBuffer();\n return buf.toString(\"hex\").match(/.{2}/g).reverse().join(\"\");\n }", "function rstr2hex(input){var hexTab='0123456789abcdef';var output='';var x;var i;for(i=0;i<input.length;i+=1){x=input.charCodeAt(i);output+=hexTab.charAt(x>>>4&0x0f)+hexTab.charAt(x&0x0f);}return output;}", "function swapEndian(hex){\n\t\tif (hex.length % 2 !== 0){return \"length must be a multiple of 2!\";}\n\t\tvar data = \"\";\n\t\tfor (var i=1; i <= hex.length / 2; i++){\n\t\t\tdata += hex.substr(0 - 2 * i, 2);\n\t\t}\n\t\treturn data;\n\t}", "function hex2(x)\n{\n\treturn hexify(Math.floor(reblock(x)%16))\n}", "function convertToHex(n) {\n return Number(n).toString(16);\n}", "function rgbToHex(hex) {\n\tif (hex == null) return '00';\n\thex = parseInt(hex);\n\tif (hex == 0 || isNaN(hex)) return '00';\n\thex = Math.max(0,hex); hex = Math.min(hex,255); hex=Math.round(hex);\n\treturn '0123456789ABCDEF'.charAt((hex-hex%16)/16)\n\t + '0123456789ABCDEF'.charAt(hex%16);\n}", "function hextodec(hex_value){\n if (hex_value.length % 2) { hex_value = '0' + hex_value; }\n var bn = BigInt('0x' + hex_value);\n var d = bn.toString(10);\n return d;\n}", "function toHex(...args) {\n return ethers_1.utils.hexlify(...args);\n}", "toHexString(byteArray) {\n\n return Array.from(byteArray, (byte) => {\n\n return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n\n }).join('');\n\n }", "function byteToHex(byte) {\n return ('0' + byte.toString(16)).slice(-2);\n}", "function bin2hex(s) {\r\n\tvar i, l, o0o = '',\r\n\tn;\r\n\ts += '';\r\n\tfor (i = 0, l = s.length; i < l; i++) {\r\n\t\tn = s.charCodeAt(i).toString(16);\r\n\t\to0o += n.length < 2 ? '0' + n : n;\r\n\t}\r\n\treturn o0o;\r\n}", "function asciiToHex(str) {\n\n var arr1 = [];\n for (var n = 0, l = str.length; n < l; n++) {\n var hex = Number(str.charCodeAt(n)).toString(16);\n arr1.push(hex);\n }\n return arr1.join('');\n }", "function getHex() {\n console.log(\n chalk.hex(finC)(`###############################\n###############################\n###############################\n##### #####\n##### ${finC} #####\n##### #####\n###############################\n###############################\n###############################\n`),\n );\n}", "function hexify(x)\n{\n\tvar hexies = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\n\treturn hexies.slice(x,x+1)\n}", "toHex(bytes) {\n return Buffer.from(bytes).toString('hex').toUpperCase();\n }", "function byte_2_hex(num){\n\tif(num<16)\n\t\treturn '0'+num.toString(16);\n\telse\n\t\treturn num.toString(16);\n}", "function toHexReference(code, next, omit) {\n var value = '&#x' + code.toString(16).toUpperCase()\n return omit && next && !hexadecimal(next) ? value : value + ';'\n}", "function toHexReference(code, next, omit) {\n var value = '&#x' + code.toString(16).toUpperCase()\n return omit && next && !hexadecimal(next) ? value : value + ';'\n}", "function asciiToHex (str) {\n const arr = []\n for (let i = 0, t = 3; i < t; i++) {\n for (let n = 0, l = str.length; n < l; n++) {\n const hex = Number(str.charCodeAt(n)).toString(16)\n arr.push(hex)\n }\n }\n return arr.join('').substring(0, 6)\n}", "function byte2Hex(n) {\n var nybHexString = \"0123456789ABCDEF\";\n return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);\n}", "function byte2Hex(n) {\n var nybHexString = \"0123456789ABCDEF\";\n return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);\n}", "componentToHex(c) {\n let hex = c.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n }", "function strip0x(hex) {\n if (typeof hex === 'undefined')\n return '';\n if (typeof hex === 'string' && hex.indexOf('0x') === 0) {\n return hex.slice(2).toString();\n }\n return hex.toString();\n}", "inverse() {\n this.transformType = 'inversed';\n const rgbValues = [...this.colorTable].map(a => {\n return [a.slice(0, 2), a.slice(2,4), a.slice(4, 6)].map(b => {\n const rgbValue = (255 - parseInt(b, 16)).toString(16);\n return rgbValue.length === 1 ? `0${rgbValue}` : rgbValue;\n }).join('');\n });\n this.updateColorTable(rgbValues.join(''));\n }" ]
[ "0.74479896", "0.6967258", "0.66854167", "0.6680756", "0.65849745", "0.65136343", "0.6486934", "0.6454508", "0.6443687", "0.6441389", "0.6441389", "0.64271116", "0.64229", "0.6422503", "0.63987625", "0.6343833", "0.63082755", "0.6298101", "0.6191495", "0.6168584", "0.6165069", "0.61449724", "0.6143698", "0.61241573", "0.6102795", "0.60949624", "0.6039407", "0.6038382", "0.6037427", "0.6036435", "0.60325676", "0.6031438", "0.6031438", "0.60195", "0.60111177", "0.60105467", "0.6009687", "0.6003264", "0.5999273", "0.5997601", "0.5997338", "0.5997338", "0.59911335", "0.59627885", "0.5961659", "0.59555286", "0.5953108", "0.5939364", "0.59335744", "0.5930676", "0.59278977", "0.5925493", "0.59166217", "0.5910238", "0.5909552", "0.5902662", "0.5901843", "0.59008193", "0.5900818", "0.58892006", "0.58883953", "0.5887477", "0.58862066", "0.58858067", "0.58842015", "0.58749557", "0.58749557", "0.5868958", "0.5868915", "0.58657277", "0.58657277", "0.58657277", "0.5856837", "0.58507985", "0.58462125", "0.58459824", "0.584434", "0.58412135", "0.58396065", "0.582729", "0.58211535", "0.582028", "0.581859", "0.58182347", "0.58144563", "0.58143246", "0.5812976", "0.58126384", "0.5809974", "0.58013564", "0.5800697", "0.57988405", "0.57947695", "0.57947695", "0.5792947", "0.5775711", "0.5775711", "0.5767258", "0.5766113", "0.57659507" ]
0.5779988
95
let table10PositionX = 5; let table10PositionY = 7; let table10 = new Table(table10PositionX, table10PositionY, 10);
function Table(i, j, n) { this.i = i; this.j = j; this.n = n; this.edges = []; this.searched = false; this.parent = null; this.f = 0; this.g = 0; this.h = 0; this.weight = 1; this.show = () => { let x = i * w; let y = j * w; // draw a cell with table and it's number stroke(250); fill('#e4e4e4'); rect(x, y, w, w); image(tableImg, x + 8, y + 14, img.width / 1.3, img.height / 1.3); } this.addEdges = arr => { /* tables don't have edges */ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Table() {\r\n}", "function Table() {\n\tthis.commonCards = [];\n\n\t//make table deck from cards class\n\tthis.deck = new Cards();\n\tthis.players = [];\n\tthis.myPosition = Math.floor(Math.random() * (10 - 1)) + 1;\n\tthis.myHand = [];\n\tthis.othersHands = [];\n\tthis.communityCards = [];\n\n}", "function Table() {\n this._width = 0;\n this._height = 0;\n this._titleRow = {};\n this._rows = [];\n}", "constructor() {\n\n this.table = {};\n\n this.tableSize = 0;\n }", "function newTable (head) {\n // var table = new Table();\n var table = new Table({\n head: head || [],\n chars: {\n 'mid': '',\n 'left-mid': '',\n 'mid-mid': '',\n 'right-mid': ''\n }\n })\n return table\n}", "function createTable(firstRow, rows, position = \"left\") {\n\tlet table = new Table(firstRow, rows, position);\n\ttable.add();\n\treturn table;\n}", "function Table(name)\n{\n\tthis.name = name;\n}", "function createTable(num) {\n let table = document.querySelector(\".table\" + num);\n\tfor(let x = 0; x < 10; x++) {\n\tlet tr = document.createElement(\"tr\");\n\t//css.\n\ttr.classList.add(\"table-tr\");\n\ttable.appendChild(tr);\n\tfor(let n = 0; n < 10; n++) {\n\t\tlet td = document.createElement(\"td\");\n\t\t//css.\n\t\ttd.classList.add(\"table-td\");\n\t\ttr.appendChild(td);\n\t\ttd.innerHTML = x * 10 + (n + 1);\n\t}\n }\n}", "function Table(\n x = 0,\n y = 0,\n width = myDom.canvas.width,\n height = myDom.canvas.height,\n img = Images.tabel\n) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n\n this.img = img;\n\n this.draw = function() {\n myCtx.ctx2.drawImage(this.img, this.x, this.y, this.width, this.height);\n };\n this.resize = function() {\n this.width = myDom.canvas.width;\n this.height = myDom.canvas.height;\n };\n}", "function setTable()\n{\n\ttableObj = {\n\t\t\"settings\":{\"offsetX\":181,\"offsetY\":39,\"targWidth\":80,\"targHeight\":55,\"noRows\":3, \"noZero\":1},\n\t\t\"targs\":{\n\t\t\t\"targ0\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ1\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ2\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ3\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ4\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ5\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ6\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ7\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ8\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ9\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ10\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ11\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ12\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ13\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ14\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ15\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ16\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ17\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ18\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ19\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ20\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ21\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ22\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ23\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ24\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ25\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ26\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ27\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ28\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ29\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ30\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ31\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ32\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ33\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ34\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ35\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 },\n\t\t\t\"targ36\":{\"x\":0, \"y\":0, \"chips\":[], \"container\":0 }\n\t\t}\n\t};\n\t\n\t// ??? Need to Make Dynamic\n\t/*\n\ttableObj.settings.targWidth = 80;\n\ttableObj.settings.targHeight = 55;\n\ttableObj.settings.offsetX = 140;\n\ttableObj.settings.offsetY = 80;\n\t*/\n\n\tlet targW = tableObj.settings.targWidth;\n\tlet targH = tableObj.settings.targHeight;\n\tlet targOffX = tableObj.settings.offsetX;\n\tlet targOffY = tableObj.settings.offsetY;\n\n\tlet loopLimit = tableObj.settings.noRows;\n\tlet loopCount = -Math.abs(tableObj.settings.noZero);\n\tlet row = 0;\n\t//console.log(\"loopCount: \"+loopCount);\n\t//let table = new PIXI.Container();\n\t//app.stage.addChild(table);\n\t\n\tlet targs = tableObj.targs;\n\tfor (var key in targs) {\n\tif (targs.hasOwnProperty(key)) {\n\t\t //console.log(key + \" -> \" + targs[key]);\n\t\t //console.log(\"loop % loopLimit:\"+loopCount % loopLimit);\n\t\t let div = loopCount % loopLimit;\n\t\t loopCount++;\n\t\tswitch(div) {\n\t\t\tcase -2:\n\t\t\t\t// top - roulette with two Zero's\n\t\t\t\tbreak;\n\t\t\tcase -1:\n\t\t\t\t// top - roulette with one Zero\n\t\t\t\ttableObj.targs[key].y = tableObj.settings.offsetY;\n\t\t\t\ttableObj.targs[key].x = targW + tableObj.settings.offsetX;\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\t\t// All left hand - new row\n\t\t\t\trow++;\n\t\t\t\ttableObj.targs[key].y = (targH * row) + tableObj.settings.offsetY;\n\t\t\t\ttableObj.targs[key].x = tableObj.settings.offsetX;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// All other Boxes\n\t\t\t\ttableObj.targs[key].y = (targH * row) + tableObj.settings.offsetY;\n\t\t\t\ttableObj.targs[key].x = (targW * div) + tableObj.settings.offsetX;\n\t\t} \n\t\t\n\t}\n\t}\n\ttableObj.targs = targs;\n\t\n\t//let str = JSON.stringify(tableObj, null, 4); // (Optional) beautiful indented output.\n\t//console.log(str); // Logs output to dev tools console.\n\t\n\ttargs = tableObj.targs;\n\tfor (var key in targs) \n\t{\n\t\ttableObj.targs[key].container = app.stage.addChild(makeTarg(key));\n\t\t//console.log(\">>>> container: \"+tableObj.targs[key].container);\n\t}\n\t\n\t// let str = JSON.stringify(app.stage.children, null, 4); // (Optional) beautiful indented output.\n\t// console.log(str); // Logs output to dev tools console.\n}", "function Position(table) {\n\n this.time = new Date(table[0]);\n this.tag_id = table[1];\n this.x = parseFloat(table[2]);\n this.y = parseFloat(table[3]);\n\n}", "function objectTable(configuration) {\n \n this.configuration = this.mergeConfigWithDefault(configuration);\n this.parentGraphics = game.add.graphics(this.configuration.x, this.configuration.y);\n \n this.columns = {};\n}", "function hundred_table() {\n var table = elem('table').addClass('point');\n for (var a=0; a<10; a++) {\n var tr = elem('tr');\n for (var b=1; b<=10; b++) {\n var td = number_cell(a*10 + b);\n tr.append(td);\n }\n table.append(tr);\n }\n return table;\n}", "function placeInTable(x, y,player) {\n let piece = document.createElement(\"div\");\n piece.classList.add(\"piece\")\n piece.classList.add(`Player${player}`)\n let target_cell = document.getElementById(`${x}-${y}`)\n target_cell.append(piece);\n\n}", "function Table() {\n var prop = {};\n\n this.get = function(s) {\n\treturn prop[s];\n }\n\n this.set = function(s,v) {\n\tprop[s] = v;\n }\n}", "_setTable() {\r\n\r\n\r\n }", "createTable () {\n this.table = new Table([this.features.declensions, this.features.genders,\n this.features.types, this.features.numbers, this.features.cases])\n\n let features = this.table.features // eslint-disable-line prefer-const\n features.columns = [\n this.constructor.model.typeFeature(Feature.types.declension),\n this.constructor.model.typeFeature(Feature.types.gender),\n this.constructor.model.typeFeature(Feature.types.type)\n ]\n features.rows = [\n this.constructor.model.typeFeature(Feature.types.number),\n this.constructor.model.typeFeature(Feature.types.grmCase)\n ]\n features.columnRowTitles = [\n this.constructor.model.typeFeature(Feature.types.grmCase)\n ]\n features.fullWidthRowTitles = [\n this.constructor.model.typeFeature(Feature.types.number)\n ]\n }", "function createCell() {\r\n //Setting each cell to default values (the moment its inserted into the 2D array)\r\n //Each cell will be given ----another attribute---- of ID in the function below\r\n var tableCell = {\r\n minesAroundCount: 0,\r\n isShown: false,\r\n isMine: false,\r\n isMarked: false\r\n\r\n };\r\n return tableCell;\r\n}", "function buildTable(){\n\n}", "function TableObject(tableId, uniques) {\n this.tableId = tableId;\n this.uniques = uniques; \n this.columns = FusionTables.Table.get(tableId).columns;\n this.constants = {\n leftParens: \"(\",\n rightParens: \")\",\n space: \" \",\n comma: \",\",\n apostrophee: \"'\",\n equals: \"=\",\n semiColon: \";\",\n and: \"AND\",\n numericType: \"NUMBER\",\n };\n }", "function Table(id,isOwner) {\n this.id = id;\n this.isOwner = isOwner;\n}", "function MovableBoxTable()\n{\n\tthis.boxes = [];\n}", "function MapTable() {\r\n}", "function html_table(x, y, has_header_x, has_header_y) {\n this.x = x;\n this.y = y;\n this.has_header_x = has_header_x;\n this.has_header_y = has_header_y;\n // TODO: should be 'view' or 'html'\n this._table = null;\n this.header_x = null;\n this.header_y = null;\n // becomes 'origin'\n this.header_xy = null;\n this.cells = null;\n this.generate_tables();\n}", "function addTableDB(Xpos, Ypos, table_id) {\n var div = document.createElement('div');\n div.id = 'twoPtable';\n div.draggable = true;\n \n switch (getOrderLock(table_id)) {\n case 1:\n div.style.backgroundColor = \"red\";\n break;\n case 2:\n div.style.backgroundColor = \"yellow\";\n break;\n case 3:\n div.style.backgroundColor = \"green\";\n break;\n default:\n break;\n }\n \n setTranslate(Xpos, Ypos, div);\n\n var button = document.createElement('button');\n button.style = \"width: 90%; height: 40%; margin-top: 5%; font-size:0.5vw\";\n button.id = \"orderbtn\";\n button.textContent = \"Order\";\n button.setAttribute(\"onClick\", \"javascript: showOrder(\"+table_id+\")\");\n div.appendChild(button);\n\n var innerDiv = document.createElement('p');\n var text = document.createTextNode(table_id);\n innerDiv.style = \"font-size: 1vw; margin-top:5%; float:left; margin-left:5%\";\n innerDiv.appendChild(text);\n div.appendChild(innerDiv);\n\n container.appendChild(div);\n}", "function table() {\n this.table = null;\n this.opts = {};\n this.table_id = \"\";\n}", "function Table(){\r\n\t\r\n\tthis.length=0;\r\n\tthis.items={};\r\n\t\r\n\t/**\r\n\t * Check to see if the table has a certain key\r\n\t * @param key the key of the item\r\n\t */\r\n\tthis.hasKey=function(key){\r\n\t\treturn this.items.hasOwnProperty(key);\t\t\r\n\t};\r\n\t\r\n\t/**\r\n\t * Put an item in the table\r\n\t * @param key the key of the item\r\n\t * @param value the stored item\r\n\t */\r\n\tthis.put=function(key,value){\r\n\t\r\n\t if (!this.hasKey(key)) {\r\n\t \tthis.length++;\r\n\t }\r\n\t \r\n\t this.items[key] = value;\r\n\t\r\n\t};\r\n\t\r\n\t/**\r\n\t * Get the item from a table \r\n\t * @param key the key of the item \r\n\t */\r\n\tthis.get=function(key){\r\n\t\t return this.hasKey(key) ? this.items[key] : undefined;\r\n\t};\r\n\t\r\n\t\r\n\tthis.reset = function(){\r\n\t this.items = {};\r\n\t this.length = 0;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Get the size of the table \r\n\t */\r\n\tthis.getSize=function(){\r\n\t\treturn this.length;\r\n\t};\r\n}", "function Table() {\n\t this.columns = null; // written with the first row\n\t this.rows = [];\n\t }", "constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }", "function myCreateFunction() {\n var table = document.getElementById(\"myTable\");\n var rowTable = table.insertRow(0);\n var cell1 = rowTable.insertCell(0);\n var cell2 = rowTable.insertCell(1);\n var cell3 = rowTable.insertCell(2);\n var cell4 = rowTable.insertCell(3);\n table.appendChild(rowTable);\n cell1.innerHTML = numberRound;\n cell2.innerHTML = player.choice;\n cell3.innerHTML = computer.choice;\n cell4.innerHTML = player.score + ' - ' + computer.score;\n}", "function JMJTable() {\n\tthis.players = new Array();\n\tfor (var i = 0; i < 4; i++)\n\t\tthis.players[i] = new JMJPlayer();\n\tthis.doras;\n\tthis.tile_remain;\n\tthis.tile_pool;\n\tthis.current_player;\n\tthis.dealer_player = 0;\n\tthis.crrent_state;\n\n\tthis.round = 1; //1~4\n\tthis.wind = 0; // 0~3\n\n}", "constructor() {\n this.pokertable = new PokerTable()\n }", "initialize(size){\n for (let i = 0; i < size; i++) {\n let $row = this.$table.insertRow(i);\n for (let j = 0; j < size; j++) {\n $row.insertCell(j);\n }\n }\n }", "function Table() {\n\n return (\n <Container>\n \n </Container>\n )\n }", "createTable(rows, columns) {\n let startPara = this.selection.start.paragraph;\n let table = new TableWidget();\n table.tableFormat = new WTableFormat(table);\n table.tableFormat.preferredWidthType = 'Auto';\n table.tableFormat.initializeTableBorders();\n let index = 0;\n while (index < rows) {\n let tableRow = this.createRowAndColumn(columns, index);\n tableRow.rowFormat.heightType = 'Auto';\n tableRow.containerWidget = table;\n table.childWidgets.push(tableRow);\n index++;\n }\n return table;\n }", "placeInTable(y, x) {\n const piece = document.createElement('div');\n piece.classList.add('piece');\n piece.style.backgroundColor = this.currPlayer.color;\n piece.style.top = -50 * (y + 2);\n\n const spot = document.getElementById(`${y}-${x}`);\n spot.append(piece);\n }", "function TableMapper() {\r\n}", "constructor(pokemons) {\n for(let i = 0; i < pokemons.length; i++) {\n const tr = makeRow(pokemons[i]);\n tableBody.appendChild(tr); \n }\n }", "function newTable() {\n connection.query(\"Select * FROM storefront\", (err, results) => {\n if (err) throw err;\n table.draw(results);\n pointOfSale();\n });\n}", "constructor () {\n this.numRows = 6;\n this.numColumns = 7;\n this.spaces = this.createSpaces();\n }", "function iidoTable(tableID){\n\treturn new table(tableID);\n}", "initGrid()\n {\n\n let gameGrid = '<table id=\"game-map\">';\n for (var r = 0; r < MAX_ROWS;r++)\n {\n gameGrid += '<tr>';\n for (var c = 0; c < MAX_COLS; c++)\n {\n gameGrid += `<td align=\"center\" data-row=\"${r}\" data-col=\"${c}\"></td>`;\n }\n gameGrid += '</tr>';\n }\n gameGrid += '</table>';\n\n document.querySelector(\".tableContainer\").innerHTML = gameGrid;\n }", "function table(tableData) {\n\n this.tableData = tableData;\n this.displayedData = tableData;\n this.pageNumber=1;\n this.itemPerPage = Math.min(tableData.length,10);\n\n this.render = function(){\n $('tbody').empty();\n this.displayedData.forEach(function (row) {\n $('tbody').append('<tr>');\n for (var key in row) {\n if (row.hasOwnProperty(key)) {\n $('tbody tr:last').append( '<td>' + row[key] + '</td>');\n }\n }\n });\n };\n this.render();\n}", "function createTable(table) {\n if (user.id == table.owner_id) {\n sittedTable = new Table(table.id,true);\n }\n}", "constructor(topLeft, bottomRight, name='') {\n this.topLeft = topLeft;\n this.bottomRight = bottomRight;\n this.name = name;\n this.length = this.cells().length;\n }", "function llenarTablero(){\n\n var numDulce = 41;\n var espacioX = 1;\n var espacioY = 0;\n //se crean 2 for para crear las tablas\n for(var i=0; i<tabla_Y; i++){\n\n for(var j=0; j<tabla_X; j++){\n //se genera el numero que indica que dulce saldra\n var random = juego.rnd.integerInRange(1, 4);\n //se agrega el dulce a el arreglo dulce[]\n //la posicion inicial es 335 en x y 150 en y estos se multiplican por un valor q va incremengtando mediante el for\n //esto sera paradarle espacio entre los dulces\n dulce[numDulce] = juego.add.sprite(300 * espacioX, 140 + (i * espacioY) , 'dulce' + [random]);\n dulce[numDulce].anchor.setTo(0.5);\n dulce[numDulce].scale.setTo(0.55);\n dulce[numDulce].enableBody = true;\n dulce[numDulce].physicsBodyType = Phaser.Physics.ARCADE;\n\n espacioX = espacioX + .200;\n numDulce = numDulce - 1;\n\n }\n\n espacioY = 60;\n espacioX = 1;\n }\n}", "function placeInTable(x, y) {\n const piece = document.createElement('div');\n piece.classList.add('piece');\n piece.classList.add(`p${currPlayer}`);\n piece.style.animationName = `row${y}`; //animate drop depth based on row#\n piece.style.top = -50 * (y + 2); //(top is refering to top of table (each square is 50px + 2 for the space between)\n\n const spot = document.getElementById(`${y}-${x}`); //location for piece to drop to\n spot.append(piece);\n}", "constructor(length) {\n\n this.display = document.createElement('tr');\n this.color = 'blue';\n this.cells = Array(length);\n this.value = 0;\n\n // create cells and add to display\n for (let i = 0; i < length; i++) {\n let cell = new BoardCell();\n this.cells[i] = cell;\n this.display.appendChild(cell.getDisplay());\n }\n }", "function placeInTable(y, x) {\n // TODO: make a div and insert into correct table cell\n let circle = document.createElement('div');\n circle.classList.add(\"piece\", `p${currPlayer}`);\n \n // somhow access td id, then append circle to this td\n let square = document.getElementById(`${y}-${x}`);\n square.append(circle);\n\n}", "makeTable() {\n return (\n <table style={{margin:'0 auto', border:'solid 1px gray'}}>\n {this.makeTableHeader()}\n {this.makeTableBody()}\n </table>\n );\n }", "function generateTable(){\n\tvar header = table.createTHead();\n\n\t\n\tvar row = header.insertRow(0);\n\tfor(var ii = 0; ii <= xEnd - xStart + 1; ii++){ //Fills row\n\t\tvar cell=row.insertCell(ii);\n\t\tif(ii ===0){\n\t\t\t$(cell).addClass(\"multiplier\");\n\t\t\tcell.innerHTML = \" x \";\n\t\t}else{\n\t\t\t$(cell).addClass(\"baseXValue\");\n\t\t\tcell.innerHTML = (xStart + ii - 1);\n\t\t}\n\t}\n\t\n\n\tfor(var i = 1; i <= yEnd - yStart + 1; i++){ //determines row\n\t\tvar row = header.insertRow(i);\n\t\t\n\t\t\n\t\t\tfor(var ii = 0; ii <= xEnd - xStart + 1; ii++){ //Fills row\n\t\t\t\tvar cell=row.insertCell(ii);\t\n\t\t\t\tif(ii === 0){\n\t\t\t\t\t$(cell).addClass(\"baseYValue\");\n\t\t\t\t\tcell.innerHTML = (yStart+ i - 1);\n\t\t\t\t}else{\n\t\t\t\t\tcell.innerHTML = (xStart + ii - 1) * (yStart+ i - 1);\n\t\t\t\t}\n\t\t\t}\n\t}\n\t\n}", "function TableManager() {\n\tthis.BB = 2; // Size of the big blind. \n\tthis.players = new Array(); // Holds player objects\n\tthis.allInPlayers = new Array(); // When a player is all in he would be taken out of this.players and be put here\n\tthis.actions = new Array(); // Will hold an array of actions. All actions concerning the game and players should be defined as functions in TableManager.actions\n\tthis.pot = 0; // Sum of all the bets thus far\r\n\tthis.board = new Array(); // Array of cards. When table is being drawn or new cards dealt, this is where the cards are asked/put.\n\tthis.deck = new Deck();\n}", "function numberTable() {\n var rows = 4,\n cols = 3;\n var numberDiv = document.createElement(\"DIV\");\n numberDiv.className = \"one\";\n var table = document.createElement(\"TABLE\");\n for (i = 0, count = 0; i < rows; i++) {\n var row = new Row();\n for (j = 0; j < cols; j++, count++) {\n if (count < model.numbers.length)\n var btn = new Button(model.numbers[count]);\n else\n break;\n\n row.addColm(btn.btn);\n }\n table.appendChild(row.row);\n }\n numberDiv.appendChild(table);\n return numberDiv;\n }", "function tableInfo() {\n let tableNumbers = []\n let rows\n let columns\n\n if(type.range % 10 === 0 && type.range !== 10){\n rows = type.range/10\n columns = 9\n }else if(type.range % 5 === 0){\n rows = type.range/5\n columns = 4\n }else if(type.range === 10){\n rows = 2\n columns = 4\n }\n\n for(let i =1;i<=type.range;i++){\n tableNumbers.push(i)\n }\n\n checkTable()\n checkCurrentSelectedNumbersArray()\n tableGenerator(tableNumbers, rows, columns)\n}", "function shipTableBuilder(){\r\n let shipTableBuilderHelper = \"<table> <tr> <th>Name</th> <th>Model</th> <th>Cost</th> <th>Length</th> <th>ShipCLass</th> <th>Crew</th> </tr>\";\r\n\r\n for(let ship of shipInTable){\r\n shipTableBuilderHelper += \"<tr> <th>\"+ship.name.toLowerCase()+\"</th> <th>\"+ship.model.toLowerCase()+\"</th> <th>\"+((ship.cost_in_credits)/1000)+\" k credits</th> <th>\"+ship.length+\"m</th> <th>\"+ship.starship_class.toLowerCase()+\"</th> <th>\"+ship.crew+\"</th> </tr>\";\r\n }\r\n\r\n shipTableBuilderHelper += \"</table>\"\r\n getId('tableShip').innerHTML = shipTableBuilderHelper;\r\n}", "function createTable() {\n const body = document.body\n const table = document.createElement('table')\n table.classList.add('jeopardy-table')\n const tHead = document.createElement('thead')\n tHead.classList.add('title-row')\n const tBody = document.createElement('tbody')\n tBody.classList.add('table-body')\n \n body.prepend(table)\n table.append(tHead)\n table.append(tBody)\n}", "function pokertable() {\n // Retrieving the pokertable\n var table = new createjs.Bitmap(\"../images/pokertable.png\");\n\n // adjusting the location of the table\n table.x = width/6;\n table.y = height/3;\n // adding the table and background to container and stage\n addToGame(table);\n createjs.Ticker.addEventListener(\"tick\", handleTick);\n function handleTick(event) {\n stage.update();\n }\n}", "function grid(idTabla) {\n\n this.tbl = document.getElementById(idTabla);\n\n // añadir una fila a un objeto tabla\n this.AddRowTable = function(nFila) {\n\n var row = this.tbl.insertRow(this.tbl.rows.length);\n row.setAttribute('id', 'ofila' + nFila);\n //row.setAttribute('onclick', 'GetFila(this.id);');\n row.setAttribute('onMouseOver', 'FilaActiva(this.id);');\n row.setAttribute('onMouseOut', 'FilaDesactivar(this.id);');\n \n \n\n return row;\n\n };\n\n /*\n si a valorCell le pasamos un html como este le pasamos una imagen:\n '<img title=\"ver documento\" alt=\"ver documento\" src=\"img/search.png\">'\n */\n\n // la primera celda es la 0 la segunda la 1 etc.\n this.AddRowCellText = function(row, NumeroCell, ValorCell) {\n\n // ID \n var cellText = row.insertCell(NumeroCell); // 0\n var textNode = document.createTextNode(this.tbl.rows.length - 1);\n cellText.appendChild(textNode);\n cellText.innerHTML = ValorCell;\n\n return cellText;\n };\n\n // la primera celda es la 0 la segunda la 1 etc.\n this.AddRowCellNumber = function(row, NumeroCell, ValorCell) {\n\n // ID \n var cellText = row.insertCell(NumeroCell); // 0\n var textNode = document.createTextNode(this.tbl.rows.length - 1);\n cellText.appendChild(textNode);\n cellText.setAttribute('align', 'right');\n cellText.innerHTML = ValorCell;\n \n return cellText;\n\n };\n \n \n\n}", "function Table(opt) {\n this.titles = [];\n this.letters = [];\n this.colIndexs = [];\n this.histogramColumns = []; //histogram\n this.vis = {}; //Table, Histogram\n this.view = {}; //table histogram\n this.data = {}; //both\n this.chartOptions = opt || {}\n}", "function createTable(array) {\n var table = document.createElement(\"table\");\n table.classList.add(\"table\");\n table.classList.add(\"table-dark\");\n var tHead = table.createTHead();\n var tRow = tHead.insertRow(0);\n Object.keys(array[0]).map(function (key, index) {\n tRow.insertCell(index).innerHTML = key;\n });\n\n var tbody = table.createTBody();\n array.map(function (object, index) {\n var tBRow = tbody.insertRow(index);\n Object.keys(object).map(function (key, index) {\n tBRow.insertCell(index).innerHTML = object[key];\n });\n });\n return table;\n}", "constructor() {\r\n this.pawns = [\r\n [],\r\n []\r\n ];\r\n for (var i = 0; i < 8; i++) {\r\n this.pawns[0][i] = new Pawn(i, 1, 1 /*WHITE*/ );\r\n this.pawns[1][i] = new Pawn(i, 6, 2 /*BLACK*/ );\r\n\r\n }\r\n this.table = [\r\n [0, 0, 0, 0, 0, 0, 0, 0],\r\n [1, 1, 1, 1, 1, 1, 1, 1],\r\n [0, 0, 0, 0, 0, 0, 0, 0],\r\n [0, 0, 0, 0, 0, 0, 0, 0],\r\n [0, 0, 0, 0, 0, 0, 0, 0],\r\n [0, 0, 0, 0, 0, 0, 0, 0],\r\n [2, 2, 2, 2, 2, 2, 2, 2],\r\n [0, 0, 0, 0, 0, 0, 0, 0]\r\n ];\r\n }", "function addTable (xCord, yCord, size, id) {\n for (i = 0; i < size; i++) {\n for (j = 0; j < size; j++) {\n if (yCord + i < dimension && xCord + j < dimension) {\n currentMap[yCord + i][xCord + j] = id\n }\n }\n }\n draw(currentMap)\n}", "init(tableOptions) {\n let x = this.x;\n let y = this.y;\n this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);\n this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);\n this.width = this.widths.reduce(sumPlusOne, -1);\n this.height = this.heights.reduce(sumPlusOne, -1);\n\n this.hAlign = this.options.hAlign || tableOptions.colAligns[x];\n this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];\n\n this.drawRight = x + this.colSpan == tableOptions.colWidths.length;\n }", "function drawTable(){\n for (employee of allEmployees){\n newRow(employee);\n }\n}", "function placeInTable(y, x) {\n// makes a div and insert into correct table cell\n// create element\n const div = document.createElement('div');\n// adds token div to class element div\n div.classList.add('div');\n// tracks which player the token belongs to\n div.classList.add(`p${currPlayer}`);\n //styles that token in css\ndiv.style.top = -50 * (y + 2);\n\n// creates a variable for the div by it's xy coordinates. \n const spot = document.getElementById(`${y}-${x}`)\n spot.append(div);\n}", "function placeInTable(y, x) {\n let piece = document.createElement(\"div\");\n piece.className = \"piece\";\n piece.classList.add(`p${currPlayer}`)\n let target = document.getElementById(`${y}-${x}`);\n target.append(piece);\n}", "function ttable(tableid, divid) {\n // Store the table ID\n this.tableid = tableid;\n\n // Store the Inner Div ID\n this.divid = divid;\n\n // Table Custom Styling\n this.style = new Object();\n this.style.table = new String;\n this.style.table = 'table-default';\n this.style.tablehead = new String;\n this.style.tablehead = 'head-default';\n this.style.tablebody = new String;\n this.style.tablebody = 'body-default';\n this.style.tablecaption = new String;\n this.style.tablecaption = 'caption-default';\n\n // Custom Hover Class\n this.style.bodyhover = new Boolean;\n this.style.bodyhover = true;\n this.style.headhover = new Boolean;\n this.style.headhover = true;\n this.style.tablehead_hover = new String;\n this.style.tablehead_hover = 'hoverhead-default';\n this.style.tableheadtd_hover = new String;\n this.style.tableheadtd_hover = 'hoverheadtd-default';\n this.style.tablebody_hover = new String;\n this.style.tablebody_hover = 'hoverbody-default';\n\n // Highlighting Custom Styling\n this.highlight = new Object();\n this.highlight.enabled = new Boolean;\n this.highlight.enabled = true;\n this.highlight.style = new String;\n this.highlight.style = 'highlight-default';\n this.highlight.onlclick = new Boolean;\n this.highlight.onclick = false;\n this.highlight.onclick_style = new String;\n this.highlight.onclick_style = 'clicklight-default';\n\n // Stripped Rows Parameters\n this.style.stripped = new Boolean;\n this.style.stripped = true;\n this.style.odd_row = new String;\n this.style.odd_row = 'odd-default';\n\n // Numeration Parameters\n this.style.num = new Boolean;\n this.style.num = true;\n this.style.num_class = new String;\n this.style.num_class = 'num-default';\n\n // Sorting Paramters\n this.sorting = new Object();\n this.sorting.enabled = new Boolean;\n this.sorting.enabled = true;\n this.sorting.sortall = new Boolean;\n this.sorting.sortall = false;\n this.sorting.resetnum = new Boolean;\n this.sorting.resetnum = true;\n this.sorting.sortedstyle = new String;\n this.sorting.sortedstyle = 'sorted-default';\n this.sorting.clickablestyle = new String;\n this.sorting.clickablestyle = 'clickable-default';\n this.sorting.onclickstyle = new String;\n this.sorting.onclickstyle = 'onclick-default';\n this.sorting.sortascstyle = new String;\n this.sorting.sortascstyle = 'sortasc-default';\n this.sorting.sortdescstyle = new String;\n this.sorting.sortdescstyle = 'sortdesc-default';\n\n // Pagination Paramaters\n this.pagination = new Object();\n this.pagination.enabled = new Boolean;\n this.pagination.enabled = false;\n this.pagination.rowperpage = new Number;\n this.pagination.rowperpage = 10;\n\n // Editable Parameters\n this.edit = new Object();\n this.edit.enabled = new Boolean;\n this.edit.enabled = false;\n\n // Conversion Parameters\n this.csv = new Object();\n this.csv.separator = new String;\n this.csv.separator = ',';\n\n // Search Input\n this.search = new Object();\n this.search.enabled = new Boolean;\n this.search.enabled = false;\n this.search.inputID = new String;\n this.search.inputID = \"filter\";\n this.search.casesensitive = new Boolean;\n // True = Case Sensitive\n this.search.casesensitive = false;\n\n // Table Information\n this.info = new Object();\n}", "setTable(Table) {\n this.table = Table + '.do';\n }", "createTables() {\n let tables = [];\n for (let i = 0; i < this.NUM_TABLES; ++i) {\n tables.push((\n <div key={this.TABLE_NAMES[i] + i} className=\"col-md-12 ml-sm-auto col-lg-12 px-4\">\n <main role=\"main\" className=\"col-md-12 ml-sm-auto col-lg-12 px-4\">\n <h3>{this.TABLE_NAMES[i]}</h3>\n </main>\n <div>\n <DistributionTable ref={this.tableRefs[i]}/>\n </div>\n </div>\n ))\n }\n return tables;\n }", "function placeInTable (y, x) {\n // DONE TODO: make a div and insert into correct table cell\n const div = document.createElement ('div');\n div.classList.add ('piece');\n let spot = document.getElementById (`${y}-${x}`);\n div.classList.add (`p${currPlayer}`);\n spot.append (div);\n //div.classList.add ('id', `${y}-${x}]`);\n // div.classList.add ('column-top', `${y}-${x}]`);\n}", "constructor() {\n this.sections = new Array();\n this.elArray = new Array();\n this.charts = new Array();\n this.tables = new Object();\n }", "addToTable() {\n let tr = document.createElement('tr')\n tr.classList.add('padding')\n\n tr.innerHTML =\n this.createCell(\"name\") +\n this.createCell(\"breed\") +\n this.createCell(\"sex\") +\n this.editButtonWithID()\n\n tableBody().appendChild(tr)\n }", "function placeInTable(y, x) {\n // TODO: make a div and insert into correct table cell\n //Student Comment: Create game piece by making a div. Adding class of piece to give it a shape. Adding class of player{1 or 2} for piece color. Place piece in proper spot on table by storing cell element with matching ID in variable placement. Appending the piece to this placement.\n\n const piece = document.createElement('div');\n piece.classList.add('piece');\n piece.classList.add(`player${currPlayer}`)\n const placement = document.getElementById(`${y}-${x}`);\n placement.append(piece);\n}", "function itemTable() { }", "function buildTable(xLT, xRT, yTop, yBottom) {\n var x, y, table = \"\";\n \n for (y = yTop - 1; y <= yBottom; y++) {\n table += \"<tr>\";\n if (y == yTop - 1) {\n table += \"<td> * </td>\"; \n for (x = xLT; x <= xRT; x++) {\n table += \"<td>\" + x + \"</td>\";\n }\n } \n else {\n table += \"<td>\" + y + \"</td>\";\n for (x = xLT; x <= xRT; x++) {\n table += \"<td>\" + x * y + \"</td>\";\n }\n }\n table += \"</tr>\";\n }\n \n \n document.getElementById(\"status\").innerHTML += \"Table completed! <br>\";\n document.getElementById(\"resultingTable\").innerHTML = table;\n }", "function createTableWithInitString(\n lineCount = 1,\n columnCount = 1,\n startString = \"Cell\"\n) {\n var myTab = [];\n for (let x = 0; x < lineCount; x++) {\n myTab.push([]);\n for (let y = 0; y < columnCount; y++) {\n myTab[x].push(startString + \"[\" + x + \"][\" + y + \"]\");\n }\n }\n return myTab;\n}", "function multiplication_table() {\n var table = elem('table').addClass('point');\n var tr = multiplication_header_row();\n table.append(tr);\n for (var a=1; a<=10; a++) {\n var row = elem('tr');\n var th = elem('th').html(a).attr('data-a', a).addClass('factor');\n row.append(th);\n for (var b=1; b<=10; b++) {\n var td = multiplication_cell(a, b);\n row.append(td);\n }\n table.append(row);\n }\n return table;\n}", "function placeInTable(y, x) {\n // TODO: make a div and insert into correct table cell\n const piece = document.createElement(\"div\");\n piece.classList.add(\"piece\");\n piece.classList.add(`p${currPlayer}`); //using template literal to input currentPlayer as there are 2 ids (one for each player: p1 and p2)\n //piece.style.top = -50 * (y + 2);\n const cell = document.getElementById(`${y}-${x}`);\n cell.append(piece);\n}", "placeInTable(y, x) {\n const piece = document.createElement('div');\n piece.classList.add('piece');\n // Add in custom color functionality.\n piece.style.backgroundColor = this.currPlayer.color;\n piece.style.top = -50 * (y + 2);\n\n const spot = document.getElementById(`${y}-${x}`);\n spot.append(piece);\n }", "function makeGrid(height,width,table){\n for(var r=0;r<height;r++){\n var newRow = table.insertRow(r);\n for(var c =0;c<width;c++){\n newRow.insertCell(c);\n }\n }\n}", "function create_table() {\r\n for (let i = 0; i < width * width; ++i) {\r\n sq_table = document.createElement('div')\r\n sq_table.innerHTML = 0\r\n display_grid.appendChild(sq_table)\r\n sq.push(sq)\r\n }\r\n random_generate()\r\n }", "function init_table_data(){\n var shop_1 = new Shop('1st and Pike', 23, 65, 6.3, '6am', '7pm');\n var shop_2 = new Shop('SeaTac Airport', 24, 33, 1.2, '6am', '8pm');\n var shop_3 = new Shop('Seattle Center', 11, 38, 3.7, '8am', '6pm');\n\n //create array to hold all shops\n shops = [shop_1, shop_2, shop_3];\n console.log('shops:', shops);\n //build out the table with initial data\n build_sales_table();\n}", "function tab (stroke, stb){\n let table = document.createElement(\"table\");\n document.body.append(table)\n for(let i = 0; i < stroke; i++){\n let tr = document.createElement(\"tr\");\n tr.classList.add('box')\n for(let i = 0; i < stb; i++){\n let td = document.createElement(\"td\");\n tr.append(td)\n td.classList.add('box')\n }\n table.append(tr)\n }\n \n}", "function makeTable() {\n var tableTT = d3.select(\"#tooltipTT\").selectAll(\"g\");\n var titles = d3.select(\"#tooltipTT\").selectAll(\"title\").data;\n //var row_info = d3.select(\"#tooltipTT\").selectAll(\"cubeInfo\");\n console.log(\"Made the table: sanity check :)\")\n\n }", "setTable (table) {\n this.setState({table: table})\n }", "function placeInTable(y, x) {\n let pieceContainer = document.createElement(\"div\");\n // making sure class assigned correctly\n pieceContainer.className = `piece p${currPlayer}`;\n //console.log(\"checking piece\", pieceContainer, \"checking element\", document.getElementById(`${y}-${x}`));\n\n // Access cell by its ID and add a piece as a child to that cell\n document.getElementById(`${y}-${x}`).appendChild(pieceContainer)\n}", "function NewTable() {\n return (\n <table>\n <tbody>\n <tr>\n <Columns/>\n </tr>\n </tbody>\n </table>\n )\n}", "function makeTable() {\n var queryfortable = \"Select * FROM products\";\n connection.query(queryfortable, function(error, results){\n if(error) throw error;\n var tableMaker = new Table ({\n head: [\"ID\", \"Product Name\", \"Department\", \"Price\", \"Stock\"],\n colWidths: [10,25,20,10,20]\n });\n for(var i = 0; i < results.length; i++){\n tableMaker.push(\n [results[i].item_id,\n results[i].product_name,\n results[i].department_name, \n results[i].price,\n results[i].stock_quantity]\n );\n }\n console.log(tableMaker.toString());\n firstPrompt()\n })\n }", "function placeInTable(y, x) {\n let gamePiece = document.createElement('div');\n let cell = document.getElementById(`${y}-${x}`);\n gamePiece.classList.add(\"piece\");\n gamePiece.classList.add(`p${currPlayer}`);\n cell.append(gamePiece);\n console.log(\"checking what cell\", cell);\n}", "function placeInTable(y, x) {\n\tlet cell = document.getElementById(`${y}-${x}`);\n\tlet newDiv = document.createElement('div');\n\tnewDiv.setAttribute('class', `piece p${currPlayer}`);\n\tcell.append(newDiv);\n}", "function addRow(table) {\n row = table.insertRow(-1)\n cell1 = row.insertCell(0)\n cell1.style = \"border:solid\"\n cell2 = row.insertCell(1)\n cell2.style=\"border:solid\"\n cell3 = row.insertCell(2)\n cell3.style=\"border:solid\"\n cell4 = row.insertCell(3)\n cell4.style=\"border:solid\"\n cell5 = row.insertCell(4)\n cell5.style=\"border:solid\"\n cell6 = row.insertCell(5)\n cell6.style=\"border:solid\"\n}", "function TableDataXYZ(name, description, valueX, valueY, valueZ, unit) {\n var self = this;\n self.name = name;\n self.description = description;\n self.valueX = valueX;\n self.valueY = valueY;\n self.valueZ = valueZ;\n self.unit = unit;\n self.onOff = \"null\";\n}", "function buildTable() {\n return {\n columns: [{\n value: 'mois'\n }, {\n value: 'trimestres'\n }, {\n value: 'année'\n },{\n value: '3 ans '\n },{\n value: '5 ans'\n }],\n rows: [ {\n cells: [{\n value: 'Je vous propose '\n }, {\n value: 'de rectrutter Mahdi '\n }, {\n value: 'car cest un bon '\n }, {\n value: 'developpeur qui '\n },{\n value: 'maitrise AngularJs'\n }]\n }, {\n cells: [{\n value: 'la cellule suivante'\n }, {\n value: 'a été définie null'\n }, {\n value: null\n }, {\n value: 'car ne contient'\n }, {\n value: 'pas de contenu'\n }]\n }]\n };\n }", "function CalipsoTable() {\n\n //TODO Allow over-ride\n}", "function createTABLE(h,v){\n var mytable = '';\n \n //setting rows and column length to 5\n var row = 5;\n var col = 5;\n \n //creating each row\n for(var i = 0; i < row; i++){\n mytable += '<tr>';\n //creating each column\n for(var j = 0; j < col; j++){\n if( i === 0 && j !== 0){ //the first row of the table\n //displays the horizontal numbers in each cells\n mytable += '<th style=\"background-color:lightsteelblue; text-align: center ; height: 50px; width:50px;\">' + h[j-1] + '</th>';\n }else if(j === 0 && i !== 0){ //the first column of the table\n //displays the vertical numbers in each cells\n mytable += '<th style=\"background-color:thistle; text-align: center ; height: 50px; width:50px;\"\">' + v[i-1] + '</th>';\n }else if(j !== 0 && i !== 0){ //the rest of the table\n //displays the multiplication of the row and column value\n mytable += '<td style=\"background-color:lightcoral; text-align: center ; height: 50px; width:50px;\"\">' + mult(h[j-1], v[i-1]) + '</td>';\n }else{ //first cell of the table\n mytable += '<th style=\"background-color:beige; text-align: center ; height: 50px; width:50px;\"\">X</th>';\n }\n }\n mytable += '<tr>';\n }\n //displays the table\n //document.write('<table id=\"mytab\" border=\"3px\" >' + table + '</table>');\n \n document.getElementById(\"mytable\").innerHTML = '<table id=\"mytab\" border=\"3px solid black\" > ' + mytable + ' </table>';\n return false;\n}", "function table(){\n return note;\n }", "function placeInTable(y, x) {\n\tconst divPiece = document.createElement('div');\n\tdivPiece.classList.add('piece', `p${currPlayer}`);\n\n\tconst tdCell = document.getElementById(`${y}-${x}`);\n\ttdCell.append(divPiece);\n}", "function settable(title,fname,lname,Email,numOfAppointments,mobile,address)\n{\n t.row.add( [\n title,\n fname,\n lname,\n Email,\n numOfAppointments,\n mobile,\n address\n ] ).draw( false );\n \n\n}", "function createShapeTable(){\r\n synaesthesiaGeometry.node = createSVG('tableCircle', 100, 100);\r\n synaesthesiaGeometry.cx = 50;\r\n synaesthesiaGeometry.cy = 50;\r\n synaesthesiaGeometry.radius = 40;\r\n synaesthesiaGeometry.circle();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableRecatngle', 100, 100);\r\n synaesthesiaGeometry.rx = 10;\r\n synaesthesiaGeometry.ry = 25;\r\n synaesthesiaGeometry.rWidth = 90;\r\n synaesthesiaGeometry.rHeight = 60;\r\n synaesthesiaGeometry.rectangle();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableEllipse', 100, 100);\r\n synaesthesiaGeometry.ex = 50;\r\n synaesthesiaGeometry.ey = 50;\r\n synaesthesiaGeometry.rex = 40;\r\n synaesthesiaGeometry.rey = 25;\r\n synaesthesiaGeometry.ellipse();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableSemiCircle', 100, 100);\r\n synaesthesiaGeometry.x = 50;\r\n synaesthesiaGeometry.y = 10;\r\n synaesthesiaGeometry.radius = 40;\r\n synaesthesiaGeometry.semiCircle();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableArc', 100, 100);\r\n synaesthesiaGeometry.x = 50;\r\n synaesthesiaGeometry.y = 10;\r\n synaesthesiaGeometry.aendX = 10;\r\n synaesthesiaGeometry.aendY = 60;\r\n synaesthesiaGeometry.radius = 40;\r\n synaesthesiaGeometry.arc();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableLine', 100, 100);\r\n synaesthesiaGeometry.lx1 = 0;\r\n synaesthesiaGeometry.lx2 = 80;\r\n synaesthesiaGeometry.ly1 = 80;\r\n synaesthesiaGeometry.ly2 = 0;\r\n synaesthesiaGeometry.line();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableTrapezoid', 100, 100);\r\n synaesthesiaGeometry.tx1 = 30;\r\n synaesthesiaGeometry.ty1 = 20;\r\n synaesthesiaGeometry.tx2 = 15;\r\n synaesthesiaGeometry.ty2 = 80;\r\n synaesthesiaGeometry.tbase1 = 40;\r\n synaesthesiaGeometry.tbase2 = 70;\r\n synaesthesiaGeometry.trapezoid();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableParallelogram', 100, 100);\r\n synaesthesiaGeometry.px1 = 40;\r\n synaesthesiaGeometry.py1 = 20;\r\n synaesthesiaGeometry.px2 = 20;\r\n synaesthesiaGeometry.py2 = 60;\r\n synaesthesiaGeometry.pside = 50;\r\n synaesthesiaGeometry.parallelogram();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableSquare', 100, 100);\r\n synaesthesiaGeometry.sx = 20;\r\n synaesthesiaGeometry.sy = 20;\r\n synaesthesiaGeometry.sside = 70;\r\n synaesthesiaGeometry.square();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableRhombus', 100, 100);\r\n synaesthesiaGeometry.rhx = 20;\r\n synaesthesiaGeometry.rhy = 50;\r\n synaesthesiaGeometry.rhdiagonal1 = 70;\r\n synaesthesiaGeometry.rhdiagonal2 = 45;\r\n synaesthesiaGeometry.rhombus();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableTriangle', 100, 100);\r\n synaesthesiaGeometry.trx1 = 50;\r\n synaesthesiaGeometry.try1 = 10;\r\n synaesthesiaGeometry.trx2 = 10;\r\n synaesthesiaGeometry.try2 = 85;\r\n synaesthesiaGeometry.trx3 = 90;\r\n synaesthesiaGeometry.try3 = 70;\r\n synaesthesiaGeometry.triangle();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableRightTriangle', 100, 100);\r\n synaesthesiaGeometry.rtx = 30;\r\n synaesthesiaGeometry.rty = 100;\r\n synaesthesiaGeometry.rtverticalSide1 = 60;\r\n synaesthesiaGeometry.rtverticalSide2 = 80;\r\n synaesthesiaGeometry.rightTriangle();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableIsoscelesTriangle', 100, 100);\r\n synaesthesiaGeometry.itx = 30;\r\n synaesthesiaGeometry.ity = 100;\r\n synaesthesiaGeometry.itbase = 60;\r\n synaesthesiaGeometry.itside = 80;\r\n synaesthesiaGeometry.isoscelesTriangle();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableEquilateralTriangle', 100, 100);\r\n synaesthesiaGeometry.etx = 25;\r\n synaesthesiaGeometry.ety = 100;\r\n synaesthesiaGeometry.etside = 70;\r\n synaesthesiaGeometry.equilateralTriangle();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableSine', 100, 100);\r\n synaesthesiaGeometry.x = 10;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 20;\r\n synaesthesiaGeometry.sine();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableCosine', 100, 100);\r\n synaesthesiaGeometry.x = 10;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 20;\r\n synaesthesiaGeometry.cosine();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableTangent', 100, 100);\r\n synaesthesiaGeometry.x = 30;\r\n synaesthesiaGeometry.y = 90;\r\n synaesthesiaGeometry.radius = 40;\r\n synaesthesiaGeometry.tangent();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableCotangent', 100, 100);\r\n synaesthesiaGeometry.x = 30;\r\n synaesthesiaGeometry.y = 10;\r\n synaesthesiaGeometry.radius = 40;\r\n synaesthesiaGeometry.cotangent();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableParabola', 100, 100);\r\n synaesthesiaGeometry.x = 30;\r\n synaesthesiaGeometry.y = 30;\r\n synaesthesiaGeometry.radius = 40;\r\n synaesthesiaGeometry.parabola();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableHyperbola', 100, 100);\r\n synaesthesiaGeometry.x = 15;\r\n synaesthesiaGeometry.y = 15;\r\n synaesthesiaGeometry.radius = 20;\r\n synaesthesiaGeometry.hyperbola();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableFigureEightCurve', 100, 100);\r\n synaesthesiaGeometry.x = 10;\r\n synaesthesiaGeometry.y = 55;\r\n synaesthesiaGeometry.radius = 40;\r\n synaesthesiaGeometry.figureEightCurve();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableLemniscateOfBernoulli', 100, 100);\r\n synaesthesiaGeometry.x = 10;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 40;\r\n synaesthesiaGeometry.lemniscateOfBernoulli();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableAstroidCurve', 100, 100);\r\n synaesthesiaGeometry.x = 10;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 30;\r\n synaesthesiaGeometry.astroidCurve();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableWitchOfAgnesiCurve', 100, 100);\r\n synaesthesiaGeometry.x = 0;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 20;\r\n synaesthesiaGeometry.witchOfAgnesiCurve();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableArchimedeanSpiral', 100, 100);\r\n synaesthesiaGeometry.x = 50;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 2;\r\n synaesthesiaGeometry.loops = 5;\r\n synaesthesiaGeometry.archimedeanSpiral();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableLimaconOfPascal', 100, 100);\r\n synaesthesiaGeometry.x = 10;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 60;\r\n synaesthesiaGeometry.limaconOfPascal();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableDeltoidCurve', 100, 100);\r\n synaesthesiaGeometry.x = 20;\r\n synaesthesiaGeometry.y = 70;\r\n synaesthesiaGeometry.radius = 60;\r\n synaesthesiaGeometry.deltoidCurve();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableStrophoidCurve', 100, 100);\r\n synaesthesiaGeometry.x = 10;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 20;\r\n synaesthesiaGeometry.strophoidCurve();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableCycloidCurve', 100, 100);\r\n synaesthesiaGeometry.x = 10;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 20;\r\n synaesthesiaGeometry.loops = 4;\r\n synaesthesiaGeometry.cycloidCurve();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableRhodoneaCurve', 100, 100);\r\n synaesthesiaGeometry.x = 50;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.xpedal = 5;\r\n synaesthesiaGeometry.ypedal = 30;\r\n synaesthesiaGeometry.pedals = 6;\r\n synaesthesiaGeometry.rhodoneaCurve();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableFermatsSpiral', 100, 100);\r\n synaesthesiaGeometry.x = 50;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 4;\r\n synaesthesiaGeometry.loops = 2;\r\n synaesthesiaGeometry.fermatsSpiral();\r\n\r\n synaesthesiaGeometry.node = createSVG('tableLituus', 100, 100);\r\n synaesthesiaGeometry.x = 25;\r\n synaesthesiaGeometry.y = 50;\r\n synaesthesiaGeometry.radius = 5;\r\n synaesthesiaGeometry.loops = 8;\r\n synaesthesiaGeometry.lituus();\r\n}", "function PokerStats() {\n this.tables = {};\n}" ]
[ "0.72494125", "0.71040285", "0.6949791", "0.6908907", "0.6726849", "0.6726039", "0.6655984", "0.6645612", "0.65821755", "0.6503481", "0.64891595", "0.6433516", "0.64133537", "0.63974714", "0.63968617", "0.63934374", "0.6389266", "0.63639504", "0.6294264", "0.62737", "0.6271806", "0.62452185", "0.62178874", "0.6199299", "0.6178933", "0.61494523", "0.61280227", "0.60928404", "0.60899794", "0.6080391", "0.60591483", "0.6057199", "0.6036194", "0.60297227", "0.60295695", "0.60192835", "0.6017114", "0.59976035", "0.59967285", "0.5995138", "0.59855664", "0.5984877", "0.59771436", "0.59733987", "0.59498733", "0.5948138", "0.5947237", "0.59288925", "0.5927901", "0.5926906", "0.5921787", "0.58980954", "0.5897789", "0.5897737", "0.5896939", "0.589183", "0.58831966", "0.5880185", "0.5877789", "0.5875129", "0.5865266", "0.5864261", "0.5856756", "0.58526117", "0.58511966", "0.58467185", "0.5837635", "0.5836583", "0.58330864", "0.5831919", "0.5831213", "0.5822096", "0.5817253", "0.5816216", "0.5814465", "0.58135617", "0.5811384", "0.58064365", "0.5804367", "0.57942563", "0.5778043", "0.57758117", "0.57735944", "0.5771143", "0.5765823", "0.57541203", "0.57489854", "0.5748528", "0.57430255", "0.5738838", "0.57379955", "0.5736467", "0.5730915", "0.572607", "0.5713936", "0.5686505", "0.5685692", "0.5684592", "0.5682578", "0.56819165" ]
0.6282029
19
text configuration for start, game over and win
function startGame() { var screen = new GameScreen("HK Space Police","press space to start", function() { Game.loadBoard(new GameBoard(1)); }); Game.loadBoard(screen); Game.loop(); /* game background song */ myAudio = new Audio('sound/spacebattle2.wav'); if (typeof myAudio.loop == 'boolean') { myAudio.loop = true; } myAudio.play(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Instructions() {\n background(colorList[0]);\n \n textSize(100);\n textAlign(CENTER);\n fill(colorList[2]);\n text(\"How to Play\", width/2, 100);\n\n textSize(50);\n textAlign(LEFT);\n fill(colorList[4]);\n text(\"Hold W to toggle the Head\\nHold s to toggle the middle body\\nHold a to toggle the right arm\\nHold d to toggle the left arm\\nHold z to toggle the right leg\\nHold x to toggle the left leg\\n\\nMove the mouse horizontally to make\\nthe block that's toggled dance\", 150, 425); \n}", "addTexts(){\n var startingMessage = (game.singleplayer || game.vsAi) ? \"Current Turn: X\" : \"Searching for Opponent\"\n\n game.turnStatusText = game.add.text(\n game.world.centerX, 50, startingMessage,\n { font: '50px Arial', fill: '#ffffff' }\n )\n //setting anchor centers the text on its x, y coordinates\n game.turnStatusText.anchor.setTo(0.5, 0.5)\n game.turnStatusText.key = 'text'\n\n game.playerPieceText = game.add.text(\n game.world.centerX, 600-50, '',\n { font: '50px Arial', fill: '#ffffff' }\n )\n //setting anchor centers the text on its x, y coordinates\n game.playerPieceText .anchor.setTo(0.5, 0.5)\n game.playerPieceText.key = 'text'\n\n\n\n }", "function rulesScreen() {\n fill(255, 0, 0);\n textFont(myFont, 30);\n textAlign(LEFT);\n text(\"WELCOME TO THE CABIN OF THE CATEGORICAL IMPERATIVE.\", 10, 20);\n text(\"YOU ARE TRAPPED HERE FOR THE NEXT 72HRS WITH ONLY A SINGLE GLASS OF\", 10, 40);\n text(\"WATER, AND THE VOICE OF KANTIAN REASON.\", 10, 60);\n text(\"ACCOMPANIED BY A MAN DYING OF THIRST YOU ARE LEFT WITH MANY CHOICES.\", 10, 80);\n text(\"WHAT WILL YOU DO?\", 10, 100);\n text(\"TO MAKE A CHOICE CLICK 'C'\", 10, 140);\n}", "function textOnScreen() {\n createP('Refresh The Page To Reset');\n createP('Press W to Remove Obstacles');\n createP('Press Q To Increase Number of Obstacles');\n }", "function drawMode(){\n ctx.font = '50px serif';\n //ctx.fillText('Hello world', 50, 90);\n if (buildMode){\n ctx.fillText('Mode: Build', 10,50);\n } else {\n ctx.fillText('Mode: Attack', 10,50);\n }\n}", "function loadAllText() {\n // go through all states and setup text\n // ONLY call if these are ScenarioRoom\n \n// copy the array reference from adventure manager so that code is cleajer\n scenarioRooms = adventureManager.states;\n\n scenarioRooms[startScreen].setText(\"Who's the primary Market?\", \"This is a new device you created that is able to project a person’s thoughts as a visual interpretation to others. It offers a new way of communicating to others. You’re about to launch this new technology, but you must choose the primary market, who do you choose?\");\n scenarioRooms[governScreen].setText(\"Where to start?\", \"The local government wants to test out your product. They’re asking you which session \");\n scenarioRooms[secureScreen].setText(\"Good News\", \"The local government does a test run on the Thoughtfull and it does well in the trial run. Now they offer to expand out towards international government relations. They want to start using it as a device to help aid in meetings between nations inorder to propose new ideas. However; the team you're in contact with is concerned that there are flaws in the security protocol within your system. \");\n scenarioRooms[endOneScreen].setText(\"Ending One\", \"By ignoring the request, something goes wrong during the meeting. The head set gets hacked and you are seen as a potential threat to the country. The nations at the meeting are now on bad terms and the US has now lost trading relations with some countries.\");\n scenarioRooms[endTwoScreen].setText(\"Ending Two\", \"By hiring the team of security experts, you not only met the needs of their request, but you also protect against any possible means of sabotage that could occur during the meeting. You are well conpensated for your product and sell it to the government to use now\");\n scenarioRooms[eduScreen].setText(\"Pick an Age Group\",\"Which age group would you like to invest into?\");\n scenarioRooms[eduUpperScreen].setText(\"Extended Features\",\"Device is being mainly used and tested within a group dynamic. More students feel more encouraged to participate in group projects and feel more productive. However; they express how they would like for more features geared towards group related tasks to be included. For example, a way to download previous thought projections and save them to a local computer.\");\n scenarioRooms[eduLowerScreen].setText(\"Extended Features\", \"Device is being used within the classroom as a way to develop better understandings on certain topics discussed in class and as a way to stimulate creativity. The kids are enjoying it, but they express that the headset itself is a little bit restrictive and want the head set to be more free moving.\")\n scenarioRooms[eduLowerAddScreen].setText(\"Additional Extended Features\", \"Additionally primary schools are saying that the UI is a little bit hard for the younger kids to understand. They're asking for there to be a friendlier UI for the kids to interact with\");\n scenarioRooms[budgetScreen].setText(\"Budget Problems\", \"Sponsors are complaining that you’re not making enough money with the headset devices. They suggest to move over to a paid model service that limits functionality and uses curated user ads.\");\n scenarioRooms[sellScreen].setText(\"Ending Three\", \"You sell to a randomly selected company. Because there was no other features added to the base model, the unreliable company you chose uses it to perform illegal activities. When they eventually get caught they put all the fall on you.\");\n scenarioRooms[adScreen].setText(\"Ending Four\", \"Target market no longer can afford your device, now it’s marketed as a tech toy by the upper elite class that stops being relevant by the time another new gadget is introduced.\");\n scenarioRooms[keepScreen].setText(\"Keep the Current Model\", \"By leaving the current model as it is, the budget has become tighter than before. By not implementing a paid model you have to make budget cuts elsewhere.\");\n scenarioRooms[salaryScreen].setText(\"Ending Five\", \"Staff is starting to leave, unpaid interns are not motivated in putting countless hours into working for barely any benefits. As a result the quality of the code drops and version deployments are constantly delayed with bugs.\");\n scenarioRooms[productScreen].setText(\"Cut Production Costs\", \"You went with cutting production costs, as a result the device keeps breaking and becomes a potential hazard to wearers. Malfunctioning hardware is stirring up concern in the mothers anonymous forum especially. In the next week a rumor starts circulating that your company is intentionally causing harm to their children's brains. They demand you recall the product\");\n scenarioRooms[rumorScreen].setText(\"Ending Six\", \"You make a statement about the rumors and take full responsibility for the drop in performance. You personally start putting hours to fix the technology. You release the newer safer model under a different name and sell it to a respectable organization where it is a hit. You get no money compensation for the work and have to remain off the grid the rest of your life after your controversy.\");\n scenarioRooms[ignoreScreen].setText(\"Ending Seven\", \"You ignore the rumors and don’t address them. The mother’s association sues your product for potentially harming their children. You lose the case and are bared from ever working in the industry again.\");\n scenarioRooms[sellAltScreen].setText(\"Ending Eight\", \"You sell the device to another company, but because of the attention you added for the educational features, the technology is able to be reused in a similar area of impact. They get an award and you are credited for the base model, earning a small sum in prize money.\")\n}", "function loadText(){\n\ttextEN = {\n\t\t7000: \"I am Mounswif Darkaoui, a game developer looking for a job and a huge fan of video games. On this website you can see the games I worked on.\",\n\t\t7001: \"Feel free to contact me at:&emsp;[email protected]\",\n\t\t1: {\n\t\t\t0: \"&emsp;&emsp;On this project I had to adapt and reproduce as a video game an existing physical escape game originally made by SAPIENS of the university Sorbonne Paris Cité. The purpose of this escape game is to deliver pedagogic notions to new teachers researchers who didn't have a teacher formation. In addition, the development of this project was an opportunity to test an improve two tools developed by MOCAH team of Lip6. I was the only gameplay developer of this game, and I worked with a graphic designer, a game designer, a tool developper and several pedagogy engineers.<br/><br/>Links:<br/><a href=https://github.com/Mocahteam/E-LearningScape>https://github.com/Mocahteam/E-LearningScape</a><br/><a href=https://github.com/Mocahteam/FYFY>https://github.com/Mocahteam/FYFY</a>\",\n\t\t\t1: \"&emsp;&emsp;This game is entirely made using Entity-Component-System paradigm. Since the game was developed with Unity 2017 which didn't have ECS yet, I had to use a framework called FyFy to have ECS. FyFy was developed by MOCAH team of Lip6, a research team which work on education with new technologies. E-LearningScape is one of the first project developed with FyFy and, thus, contributed to its improvement.<br/><br/>&emsp;&emsp;Having a virtual escape game rather than a physical one offers several advantages and one of them is to be able to automatically track and process players' actions. After developing the game, I used another tool called Laalys developed by MOCAH , to track the actions made in the game. Initially, Laalys could only process traces of the player after the playing session by using a Petri net representing the game and a list of actions made by the player. During the development of E-LearningScape, Laalys has been improved to be able to process each action in real time. The information given by Laalys are then automatically used in the game to adjust the tips provided to the player so that the playing session lasts one hour. On one hand we have Laalys that processes data in real time and on the other hand I developed a plugin of FyFy that sends information about the player\\'s actions on a database. The plugin uses Tincan/xAPI and stores information as triples Object-Verb-Activity. By comparing all the sessions, it is then possible to detect recurring difficulties for all the players to improve the game and its content.<br/><br/>&emsp;&emsp;The last task I have been assigned to was to make the content of the game easily changeable. It is possible to do so by changing the sprites in a given folder and the content of several json files to change the text of the game and the tips given during the game. The escape game's enigmas' mechanics are unlinked to its content which represents a problem for a serious game, but thanks to that E-LearningScape is an escape game template with an easily changeable content.<br/><br/>&emsp;&emsp;After I had left the development team, a VR version was in development. An ergonomist was also hired to improve the UI of both versions.\"\n\t\t},\n\t\t2: {\n\t\t\t0: \"&emsp;&emsp;Extinction is a serious game raising awareness of ecological problems made by LetsPlayGreener as part of an Erasmus project between three high schools in France, Italy and Romania. After several years working on the content of the game, the three schools hired me to support them on the development of the game. I extended the Unity 2D Game Kit, which permit to develop a game without coding, by adding functionalities they needed still preserving the idea of a kit usable without coding. While I was working on the kit, the students prepared sprites and designed some levels with my help and teachers worked on scripts and dialogs. Then the students of the three schools met in Italy to assemble everything, supervised by the teachers and me.<br/><br/>Links:<br/><a href=https://github.com/LetsPlayGreener/extinction>https://github.com/LetsPlayGreener/extinction</a><br/><a href=https://letsplaygreener.com>https://letsplaygreener.com</a>\",\n\t\t\t1: \"&emsp;&emsp;The original kit has the mains mechanics necessary to make a game like for instance moving controls and camera, events, enemies and damages or doors and pressure pads. The first functionality I added is interaction and collection with elements other than doors, keys and pressure pads. Next I implemented dialogues with multiple choices and the possibility to trigger an event after a particular point of the dialogue. I also added a map and a mini map. The last gameplay features I added to the kit are missions and the triggering of related events. I also developed, in the main menu, a dashboard with a list of achievements and a trace of the movements in the last levels played. Then we used this kit to make the game Extinction, but all these features are reusable to produce another game.<br/><br/>&emsp;&emsp;I designed and made the first level and asked French students to try it to show them the potential of the kit and get an idea of the difficulty we should aim for for the game. Except for a few students, the level I made was to hard and to big which was perhaps a reflexion of my player profile. I also wrote a guide to use Unity and the extended kit. During the schools meeting in Italy, the students were divided into teams, each supervised by a teacher and assigned to a task: making sprites and animating them, translating scripts, making vocal records for dialogs, running tests with students of the Italian school that weren't working on the project, and, for the team I was in charge of, designing levels and making them by using the kit and the work of the other teams.<br/><br/>&emsp;&emsp;I officially finished to work on this project after the meeting in Italy, but the project was still going on and I kept helping and answering questions about the use of Unity and the kit until the inauguration of the game two months later. The development of the project Extinction is officially finished but the teachers plan to use the kit to produce other serious games.\"\n\t\t},\n\t\t3: {\n\t\t\t0: \"&emsp;&emsp;This project is a student project developed alone as part of a serious game engineering course and designed in interaction with a physics teacher. We had to choose among four propositions of serious games about physics and develop them using ECS paradigm. I chose a mini golf like game with force fields as obstacles and in which the player has to set some values to play like the direction and the initial speed of the ball and/or the position, and the intensity of some force fields. I got the second best grade, mainly because I made a level editor to be able to create levels from the game and save, load and share them with txt files.\",\n\t\t\t1: \"&emsp;&emsp;To design this game I had to focus on the six elements necessary to make a serious game (B. Marne, J. Wisdom, B. Huynh-Kim-Bang, et J.-M. Labat, « The Six Facets of Serious Game Design: A Methodology Enhanced by Our Design Pattern Library », in 21st Century Learning for 21st Century Skills, Saarbrücken, Germany, 2012, vol. 7563, p. 208-221). There is no particular order to work on these elements but I first thought about the pedagogical objectives and the conditions of use of the game. The game is meant to be played by students in first or second year of licence to help them understand the impact of initial speed of an object on its trajectory, and anticipate the effect of forces and predict the movement of the object through force fields. The actions of the player are traced so the teacher can analyze and use them. I then made the mechanics of the game by working on the domain simulation and interactions with the simulation. Finally, after making the game editor, I worked on the facet problems and progression to design the levels and to choose in what order they would be played. I didn't work much on the decorum as I thought it would be to hard and time-consuming as a lone developer on a student project.<br/><br/>&emsp;&emsp;In the level editor, the user can put force fields, obstacles and goals in the levels, and set their values like initial direction and speed of the ball or force fields intensity and direction. He can also determine the values the player will be able to change, and the type and number of forces fields the player can add. The level can be tested at any time from the editor, but for it to be playable outside of the editor, it has to be validated at least once. Even if the level is unvalidated, it is possible to save it and then load it again from the editor. The level are saved as txt files in an accessible folder so they can be easily shared and imported.<br/><br/>&emsp;&emsp;Sorbonne University was developing a platform, then called Play@SU, which would contain several serious games for the use of students and university staff. They intended to hire one student from the serious game engineering course to complete the development of their student project with graphic and game designers and then to have it released on the platform. In the end they hired two students: one of the students who worked on the project with the best grade, and me. He worked on its project, but I didn't because our projects were too alike, with the difference being his was focused on potential energies. Instead, I worked on the development of E-LearningScape.\"\n\t\t},\n\t\t4: {\n\t\t\t0: \"&emsp;&emsp;I developed this student project alone as part of a virtual environment and interactions course. We were free to decide what to develop knowing that for grading the teachers would focus on artificial intelligence and interaction. Having a Kinect V2 I chose to do my first project with it and I made a ping pong game in which the player would face AIs with various levels, and with a mode in which the AI adapts its level to the player's level. I got the second best grade with this project, with the first being a reproduction of the maze of the movie \\\"The Maze Runner\\\".\",\n\t\t\t1: \"&emsp;&emsp;I made two AI scripts for this game. The first AI always reaches the ball and sends an easy ball back to the middle of the table. I used it to test and improve the gameplay with the Kinect, and it can now be used like a training wall. The second AI has several variables to set its behaviour. There is a reaction time and a speed to make the AI move towards the ball destination after the player hits it. Once the ball is reached, a random target is chosen and then the way the AI hits is calculated depending on its accuracy and its power. There are several set level of difficulty with each having different reaction time, speed, accuracy and power. The adaptative level mode just switches between these levels depending on how the player is performing. Since the variables defining the AI are floats, the adaptations could have been continuous.<br/><br/>&emsp;&emsp;This project being a student project can clearly be improved. The main issue I encountered was that the player could hardly sense how far the ball was and thus hit the ball properly. It is possible to get used to this by playing a few times, but some things can be done and the most effective solutions I found were either use a VR headset, or show a vertical projection of the ball on the table. Another problem I met is that, by using Unity physics to detect collision, if the ball and/or player's movement are too fast, the collision isn't detected because movements aren't continuous. The solutions here could have been to increase fixed updates frequency, limitate speeds, or calculate the steps between frames myself to check for collisions.\"\n\t\t},\n\t\t5: {\n\t\t\t0: \"&emsp;&emsp;This is a personal project and one of the projects I made to keep practicing while I didn't have a job. The goal of this project was to make a fun local multiplayer game. To win, a player has to color a maximum of cubes in a given time by moving on them. This project is not finished, and the next logical and necessary improvements are a menu to set a game and an AI.\",\n\t\t\t1: \"\"\n\t\t}\n\t};\n\ttextFR = {\n\t\t7000: \"Je suis Mounswif Darkaoui, un développeur de jeux à la recherche d'emploi, et un grand fan de jeux vidéo. Sur ce site vous pouvez voir les jeux sur lesquels j'ai travaillé.\",\n\t\t7001: \"N'hésitez pas à me contacter à:&emsp;[email protected]\",\n\t\t1: {\n\t\t\t0: \"&emsp;&emsp;Sur ce projet, j'ai dû adapter et reproduire sous forme de jeu vidéo un escape game physique existant, réalisé à l'origine par SAPIENS de l'université Sorbonne Paris Cité. Le but de ce jeu d'évasion est de transmettre des notions pédagogiques aux nouveaux enseignants chercheurs qui n'ont pas eu de formation pédagogique. De plus, le développement de ce projet a été l'occasion de tester et d'améliorer deux outils développés par l'équipe MOCAH du Lip6. J'étais le seul développeur de ce jeu, et j'ai travaillé avec un graphiste, un game designer, un développeur d'outils et plusieurs ingénieurs pédagogiques.<br/><br/>Liens:<br/><a href=https://github.com/Mocahteam/E-LearningScape>https://github.com/Mocahteam/E-LearningScape</a><br/><a href=https://github.com/Mocahteam/FYFY>https://github.com/Mocahteam/FYFY</a>\",\n\t\t\t1: \"&emsp;&emsp;Ce jeu est entièrement réalisé en utilisant le paradigme Entité-Composant-Système. Puisque le jeu a été développé avec Unity 2017 qui n'avait pas encore d'ECS, j'ai dû utiliser un framework appelé FyFy. FyFy a été développé par l'équipe MOCAH de Lip6, une équipe de recherche qui travaille sur l'éducation avec les nouvelles technologies. E-LearningScape est l'un des premiers projets développés avec FyFy et a donc contribué à son amélioration.<br/><br/>&emsp;&emsp;Le fait d'avoir un escape game virtuel plutôt que physique offre plusieurs avantages, l'un d'eux étant de pouvoir suivre et traiter automatiquement les actions des joueurs. Après avoir développé le jeu, j'ai utilisé un autre outil appelé Laalys, développé par MOCAH, pour suivre les actions effectuées dans le jeu. Au départ, Laalys ne pouvait traiter les traces du joueur qu'après la session de jeu en utilisant un réseau de Pétri représentant le jeu et une liste des actions effectuées par le joueur. Au cours du développement de E-LearningScape, Laalys a été amélioré pour pouvoir traiter chaque action en temps réel. Les informations données par Laalys sont ensuite automatiquement utilisées dans le jeu pour ajuster les conseils fournis au joueur afin que la session de jeu dure une heure. D'un côté, nous avons Laalys qui traite les données en temps réel et de l'autre, j'ai développé un plugin de FyFy qui envoie des informations sur les actions du joueur dans une base de données. Le plugin utilise Tincan/xAPI et stocke les informations sous forme de triplet Object-Verb-Activity. En comparant toutes les sessions, il est alors possible de détecter les difficultés récurrentes communes à tous les joueurs afin d'améliorer le jeu et son contenu.<br/><br/>&emsp;&emsp;La dernière tâche qui m'a été confiée était de rendre le contenu du jeu facilement modifiable. Il est possible de le faire en changeant les sprites d'un dossier donné et le contenu de plusieurs fichiers json pour modifier le texte du jeu et les astuces données pendant le jeu. Les mécanismes des énigmes de l'escape game ne sont pas liés à son contenu, ce qui représente un problème pour un serious game, mais grâce à cela E-LearningScape est un template d'escape game avec un contenu facilement modifiable.<br/><br/>&emsp;&emsp;Après avoir quitté l'équipe de développement, une version VR était en cours de développement. Un ergonome a également été engagé pour améliorer l'UI des deux versions.\"\n\t\t},\n\t\t2: {\n\t\t\t0: \"&emsp;&emsp;Extinction est un serious game sensibilisant aux problèmes écologiques, et réalisé par LetsPlayGreener dans le cadre d'un projet Erasmus entre trois lycées en France, en Italie et en Roumanie. Après plusieurs années de travail sur le contenu du jeu, les trois écoles m'ont engagé pour les épauler dans le développement du jeu. J'ai complété l'Unity 2D Gamekit, qui permet de développer un jeu sans coder, en ajoutant des fonctionnalités dont ils avaient besoin tout en conservant l'idée d'un kit utilisable sans coder. Pendant que je travaillais sur le kit, les étudiants ont préparé des sprites et conçu certains niveaux avec mon aide et les professeurs ont travaillé sur les scripts et les dialogues. Ensuite, les élèves des trois écoles se sont réunis en Italie pour tout assembler, sous la supervision des enseignants et de moi-même.<br/><br/>Liens:<br/><a href=https://github.com/LetsPlayGreener/extinction>https://github.com/LetsPlayGreener/extinction</a><br/><a href=https://letsplaygreener.com>https://letsplaygreener.com</a>\",\n\t\t\t1: \"&emsp;&emsp;Le kit original contient les principaux mécanismes nécessaires à la réalisation d'un jeu, comme par exemple le déplacement et la gestion de la caméra, les événements, les ennemis et les dégâts, ou les portes et les interrupteurs. La première fonctionnalité que j'ai ajoutée est l'interaction et la collecte d'éléments autres que les portes, les clés et les interrupteurs. Ensuite, j'ai mis en place des dialogues à choix multiples et la possibilité de déclencher un événement après des points particuliers du dialogue. J'ai également ajouté une carte et une mini-carte. Les dernières fonctionnalités que j'ai ajoutées au kit sont les missions et le déclenchement d'événements qui y sont liés. J'ai également développé, dans le menu principal, un tableau de bord avec une liste de succès et une trace des déplacements dans les derniers niveaux joués. Nous avons ensuite utilisé ce kit pour réaliser le jeu Extinction, mais toutes ces fonctionnalités sont réutilisables pour produire d'autres jeux.<br/><br/>&emsp;&emsp;J'ai conçu et réalisé le premier niveau et j'ai demandé à des étudiants français de l'essayer pour leur montrer le potentiel du kit et avoir une idée de la difficulté que nous devrions viser pour le jeu. À l'exception de quelques étudiants, le niveau que j'ai réalisé était trop difficile et trop grand, ce qui reflétait peut-être mon profil de joueur. J'ai également rédigé un guide d'utilisation de Unity et du kit amélioré. Lors de la réunion des écoles en Italie, les élèves ont été divisés en équipes, chacune supervisée par un enseignant et chargée d'une tâche : créer des sprites et les animer, traduire des scripts, enregistrer des voix pour les dialogues, faire des tests avec les élèves de l'école italienne qui ne travaillaient pas sur le projet, et, pour l'équipe dont j'étais responsable, concevoir des niveaux et les réaliser en utilisant le kit et le travail des autres équipes.<br/><br/>&emsp;&emsp;J'ai officiellement fini de travailler sur ce projet après la réunion en Italie, mais le projet était toujours en cours et j'ai continué à aider et à répondre aux questions sur l'utilisation d'Unity et du kit jusqu'à l'inauguration du jeu deux mois plus tard. Le développement du projet Extinction est officiellement terminé, mais les enseignants prévoient d'utiliser le kit pour produire d'autres serious games.\"\n\t\t},\n\t\t3: {\n\t\t\t0: \"&emsp;&emsp;Ce projet est un projet d'étudiant développé seul dans le cadre d'un cours d'ingénierie de serious game et conçu en interaction avec un professeur de physique. Nous avons dû choisir parmi quatre propositions de serious games sur la physique et les développer en utilisant le paradigme ECS. J'ai choisi un jeu de type mini-golf avec des champs de force comme obstacles et dans lequel le joueur doit définir des valeurs pour jouer comme la direction et la vitesse initiale de la balle et/ou la position, et l'intensité de certains champs de force. J'ai obtenu la deuxième meilleure note, principalement parce que j'ai créé un éditeur de niveaux permettant de créer des niveaux à partir du jeu et de les sauvegarder, les charger et les partager avec des fichiers txt.\",\n\t\t\t1: \"&emsp;&emsp;Pour concevoir ce jeu, j'ai dû me concentrer sur les six éléments nécessaires pour faire un jeu sérieux (B. Marne, J. Wisdom, B. Huynh-Kim-Bang, et J.-M. Labat, « The Six Facets of Serious Game Design: A Methodology Enhanced by Our Design Pattern Library », in 21st Century Learning for 21st Century Skills, Saarbrücken, Germany, 2012, vol. 7563, p. 208-221). Il n'y a pas d'ordre particulier pour travailler sur ces éléments mais j'ai d'abord réfléchi aux objectifs pédagogiques et aux conditions d'utilisation du jeu. Le jeu est destiné aux étudiants de première ou deuxième année de licence pour les aider à comprendre l'impact de la vitesse initiale d'un objet sur sa trajectoire, à anticiper l'effet des forces et à prédire le mouvement de l'objet à travers les champs de force. Les actions du joueur sont tracées afin que l'enseignant puisse les analyser et les utiliser. J'ai ensuite réalisé la mécanique du jeu en travaillant sur la simulation du domaine et les interactions avec la simulation. Enfin, après avoir fait l'éditeur de jeu, j'ai travaillé sur la facette problèmes et progression pour concevoir les niveaux et choisir l'ordre dans lequel ils seraient joués. Je n'ai pas beaucoup travaillé sur le décorum car je pensais que ce serait trop dur et trop chronophage en tant que développeur seul sur un projet d'étudiant.<br/><br/>&emsp;&emsp;Dans l'éditeur de niveaux, l'utilisateur peut placer des champs de force, des obstacles et des objectifs dans les niveaux, et définir leurs valeurs comme la direction initiale et la vitesse de la balle ou l'intensité et la direction des champs de force. Il peut également déterminer les valeurs que le joueur pourra modifier, ainsi que le type et le nombre de champs de force qu'il pourra ajouter. Le niveau peut être testé à tout moment depuis l'éditeur, mais pour qu'il soit jouable en dehors de l'éditeur, il doit être validé au moins une fois. Même si le niveau n'est pas validé, il est possible de l'enregistrer et de le charger à nouveau à partir de l'éditeur. Les niveaux sont enregistrés sous forme de fichiers txt dans un dossier accessible afin de pouvoir les partager et les importer facilement.<br/><br/>&emsp;&emsp;Sorbonne Université développait une plateforme, alors appelée Play@SU, qui contiendrait plusieurs jeux sérieux à l'usage des étudiants et du personnel universitaire. Ils avaient l'intention d'embaucher un étudiant du cours d'ingénierie des serious games pour compléter le développement de leur projet étudiant avec des graphistes et des concepteurs de jeux, puis de le faire publier sur la plateforme. Finalement, ils ont engagé deux étudiants : un des étudiants qui a travaillé sur le projet avec la meilleure note, et moi. Il a travaillé sur son projet, mais je ne l'ai pas fait parce que nos projets se ressemblaient trop, la différence étant que le sien était axé sur les énergies potentielles. Au lieu de cela, j'ai travaillé sur le projet E-LearningScape.\"\n\t\t},\n\t\t4: {\n\t\t\t0: \"&emsp;&emsp;J'ai développé ce projet d'étudiant seul dans le cadre d'un cours sur l'environnement virtuel et les interactions. Nous étions libres de choisir ce que nous voulions développer, sachant que pour la notation, les enseignants se concentreraient sur l'intelligence artificielle et l'interaction. Ayant une Kinect V2, j'ai choisi de faire mon premier projet avec et j'ai fait un jeu de ping-pong dans lequel le joueur doit faire face à des IA de différents niveaux, et avec un mode dans lequel l'IA adapte son niveau à celui du joueur. J'ai obtenu la deuxième meilleure note avec ce projet, la première étant une reproduction du labyrinthe du film \\\"Le Labyrinthe\\\".\",\n\t\t\t1: \"&emsp;&emsp;J'ai créé deux script d'IA pour ce jeu. La première IA atteint toujours la balle et renvoie une balle facile au milieu de la table. Je l'ai utilisée pour tester et améliorer le gameplay avec la Kinect, et elle peut maintenant être utilisée comme un mur d'entraînement. La deuxième IA possède plusieurs variables pour définir son comportement. Il y a un temps de réaction et une vitesse pour que l'IA se déplace vers la destination de la balle après que le joueur l'ait frappée. Une fois que la balle est atteinte, une cible aléatoire est choisie, puis la façon dont l'IA frappe est calculée en fonction de sa précision et de sa puissance. Il existe plusieurs niveaux de difficulté, chacun ayant un temps de réaction, une vitesse, une précision et une puissance différents. Le mode de niveau adaptatif permet de passer d'un niveau à l'autre en fonction des performances du joueur. Comme les variables définissant l'IA sont des float, les adaptations auraient pu être continues.<br/><br/>&emsp;&emsp;Ce projet étant un projet d'étudiant peut clairement être amélioré. Le principal problème que j'ai rencontré était que le joueur pouvait difficilement déterminer à quelle distance se trouvait la balle et donc frapper la balle correctement. Il est possible de s'habituer à cela en jouant plusieurs fois, mais certaines choses peuvent être faites et les solutions les plus efficaces que j'ai trouvées étaient soit d'utiliser un casque VR, soit de montrer une projection verticale de la balle sur la table. Un autre problème que j'ai rencontré est que, en utilisant la physique d'Unity pour détecter les collisions, si la balle et/ou le mouvement du joueur sont trop rapides, la collision n'est pas détectée parce que les mouvements ne sont pas continus. Les solutions auraient pu être d'augmenter la fréquence des fixed update, de limiter les vitesses ou de calculer moi-même les étapes entre les frames pour vérifier les collisions.\"\n\t\t},\n\t\t5: {\n\t\t\t0: \"&emsp;&emsp;C'est un projet personnel et l'un des projets que j'ai réalisés pour continuer à pratiquer alors que je n'avais pas de travail. Le but de ce projet était de créer un jeu multijoueur local fun. Pour gagner, un joueur doit colorier un maximum de cubes dans un temps donné en se déplaçant dessus. Ce projet n'est pas terminé, et les prochaines améliorations logiques et nécessaires sont un menu pour paramétrer une partie et une IA.\",\n\t\t\t1: \"\"\n\t\t}\n\t};\n\t\n\tcurrentText = {\n\t\t1: {\n\t\t\t0: textEN[1][0],\n\t\t\t1: textEN[1][1],\n\t\t\t2: \"E-LearningScape\"\n\t\t},\n\t\t2: {\n\t\t\t0: textEN[2][0],\n\t\t\t1: textEN[2][1],\n\t\t\t2: \"Extinction\"\n\t\t},\n\t\t3: {\n\t\t\t0: textEN[3][0],\n\t\t\t1: textEN[3][1],\n\t\t\t2: \"Force Fields\"\n\t\t},\n\t\t4: {\n\t\t\t0: textEN[4][0],\n\t\t\t1: textEN[4][1],\n\t\t\t2: \"Ping Pong Kinect\"\n\t\t},\n\t\t5: {\n\t\t\t0: textEN[5][0],\n\t\t\t1: textEN[5][1],\n\t\t\t2: \"Cube Okare\"\n\t\t}\n\t};\n\n\tchangeToEN();\n}", "function loadAllText() {\n\n scenarioRooms = adventureManager.states;\n resultsRooms = adventureManager.states;\n\n scenarioRooms[one].setText(\"Where to?\", \"You just lost the lease on your apartment. Where are you moving to?\");\n scenarioRooms[two].setText(\"Should you stay or should you go?\", \"You are looking for an apartment in Manhattan. However, since you do not already have OneWay installed into your body, the lifestyle is troublingly incompatible with your needs. You struggle to even submit a rental application without OneWay, let alone get in touch with real estate agents. What do you want to do?\");\n scenarioRooms[three].setText(\"Software update\", \"You bought OneWay and managed to secure a spot in Manhattan. BigInc has just released a software upgrade that cost nearly as much as the installation itself. This update will put you in deep debt, but is the only way to stay compatible with the technology in Manhattan. What do you do?\");\n resultsRooms[four].setText(\"Yikes\", \"You paid for the update in order to keep OneWay compatible. But, now you are very broke. You can’t even afford your current rent. You try to seek support from the government, but you do not qualify for any aid because having OneWay puts you in the highest bracket of income. You now have the most current technology, but are homeless.\");\n resultsRooms[five].setText(\"Congratulations\", \"You have left what is left of New York. You have escaped the pressure of Big Inc. For now that is…..\");\n scenarioRooms[six].setText(\"Should you stay or should you go?\", \"You are on Staten Island. In order to seek residency, you must commit to an anti-technology oath. The purists have banned all forms of smart devices and have reverted to pre-internet times of living in fear of the evolution of technology. Stay or go someplace else?\");\n scenarioRooms[seven].setText(\"Welcome to Staten Island\", \"You’ve decided to stay on Staten Island. You are having trouble getting accustomed to the tech-free lifestyle and you feel a lot of social pressure from the community on where you stand in response to BigInc taking over NYC. What do you do?\");\n resultsRooms[eight].setText(\"Yikes\", \"You have decided to commit the Purists, but have chosen the side of a losing battle. Your own community has started to lose faith in the cause, resulting in leadership taking unethical actions to keep the community pure. Naturally the community becomes corrupt and loses many members to BigInc.\");\n scenarioRooms[nine].setText(\"In or out?\", \"Big Inc just bought out abandoned buildings all over Brooklyn with plans to convert them to luxury apartments, OneWay compatible apartments with the hopes of inviting other wealthy communities to join their society. If you have OneWay installed, you’ll have the chance to be a part of the extended community and get in early at an up and coming area.\");\n scenarioRooms[ten].setText(\"Software update\",\"You bought OneWay and have been living in a poor quality building while waiting for your spot in the up and coming luxury apartments. BigInc has just released a software upgrade that cost nearly as much as the installation itself. This update will put you in deep debt, but is the only way to secure your spot on the waitlist. What do you do?\");\n resultsRooms[eleven].setText(\"Yikes\", \"The building you are currently living in just got bought out by BigInc. They are doing a complete remodel and kicking out all of the current residents. You can’t afford to live anywhere in Brooklyn anymore. You try to seek support from the government, but you do not qualify for any aid because having OneWay puts you in the highest bracket of income. You now have an outdated form of OneWay and are homeless.\");\n scenarioRooms[twelve].setText(\"In or out?\", \"The building you were living in just got bought out by BigInc. OneWay has taken over all of Brooklyn, displacing its current residents onto the streets. You feel like your only choices are to buy OneWay or leave NYC. What do you do?\");\n\n}", "function menuGame() {\n // Titles\n push();\n fill(`#54d6`);\n displayText(32, INSTRUCTION_TEXT[0], width / 2.1, height / 5.5);\n displayText(32, INSTRUCTION_TEXT[1], width / 2.1, height / 2.25)\n displayText(32, INSTRUCTION_TEXT[2], width / 2.1, height / 1.5)\n pop();\n\n // MINIGAME 1\n if (minigame1) {\n\n push();\n fill(`#54d6`);\n displayText(56, TITLE_TEXT[0], width / 2.1, height / 15);\n pop();\n\n // Texts\n push();\n fill(`#2d67dc`);\n displayText(28, INSTRUCTION_TEXT[3], width / 2.1, height / 3.5);\n displayText(28, INSTRUCTION_TEXT[4], width / 2.1, height / 1.85);\n displayText(28, INSTRUCTION_TEXT[5], width / 2.1, height / 1.35);\n pop();\n }\n // MINIGAME 2\n else if (minigame2) {\n\n push();\n fill(`#54d6`);\n displayText(56, TITLE_TEXT[1], width / 2.1, height / 15);\n pop();\n\n // Texts\n push();\n fill(`#2d67dc`);\n displayText(28, INSTRUCTION_TEXT[6], width / 2.1, height / 3.5);\n displayText(28, INSTRUCTION_TEXT[7], width / 2.1, height / 1.85);\n displayText(28, INSTRUCTION_TEXT[8], width / 2.1, height / 1.35);\n pop();\n }\n\n // CLICK TO PLAY\n push();\n fill(`#909eba`);\n displayText(24, INSTRUCTION_TEXT[9], width / 2.1, height / 1.1);\n pop();\n}", "function config() {\n\tgameTitle = \"A Blink Game\";\n\tgameAuthor = \"BloomEngine\";\n\tmetaContent = \"{About|about} {Hints|hints}\"; //goes at menu at bottom\n\tinventorySystem = 0; //If you don't want an inventory system in your game, set inventorySystem = 0;\n\t\n\twaitSystem = 0; //If you want a \"wait\" button to allow time to pass, set waitSystem = 1; If the wait system is off, it can be activated on a specific node by writing wait=1; Alternatively, if the wait system is turned on, it can be deactivated on a specific node by writing wait=0;\n\t\n\tdebugMode = 1;\n\t\n}", "function changeText() {\n\t\tflipDisableOption();\n\t\trunning = true;\n\t\tcurrentFrames = $(\"text-area\").value;\n\t\tcurrentInterval = setInterval(insertFrame, currentSpeed);\n\t}", "instructions() {\n this.canvas[1].font = \"20px Arial\";\n this.canvas[1].fillText('Goal: Avoid the monsters. Reach the princess.',10,105);\n }", "function draw() {\n\n //textColor changes so it has to be in draw instead of setup\n //starts as transparent clicking i turns it opaque\n textColor = color(0, 0, 0, o);\n textColor2 = color(255,255,255,o);\n\n //main screen only shows up when turning program on\n if (main === true) {\n noStroke();\n fill(0);\n textSize(16);\n text(\"Press i at any time to turn on instructions.\", 150, 175);\n text(\"Pressing i again will turn them off, if the background is white\", 150, 200);\n text(\"you will need to refresh the page by hitting the same number\", 150, 225);\n text(\"to get rid of the instructions.\", 150, 250);\n text(\"To begin press 1,2,3,4, or 5.\", 150, 275);\n \n //title whimsical\n //color changes with mouse position\n fill(mouseX%255,255-mouseY%255,187);\n stroke(0);\n textSize(100);\n text(\"w\",150,500);\n text(\"h\",205,500);\n text(\"i\",240,500);\n text(\"m\",240,500);\n text(\"s\",305,500);\n text(\"i\",335,500);\n text(\"c\",338,500);\n text(\"a\",372,500);\n text(\"l\",407,500);\n textSize(16);\n }\n \n //related to the switch case to switch between modes\n if (bubble === true) {\n bubbles(50);\n }\n if (vortex === true) {\n depth();\n }\n if (box === true) {\n boxes();\n }\n if (stacks === true) {\n stacking();\n }\n if (dots === true) {\n drawing();\n }\n}", "function text(configuration) {\n \n this.configuration = this.mergeConfigWithDefault(configuration);\n \n this.text = game.add.text(this.configuration.x, this.configuration.y, this.configuration.text, this.configuration.textStyle);\n}", "function buildTutorialScreen() {\n //creating tutorial welcome\n let x = width / 2;\n let y = 100 * progScale;\n let s = \"Welcome to the Tutorial!\";\n let title = new DisplayText(x, y, 0, 0, s);\n title.textSize = 70 * progScale;\n allObjects.push(title);\n\n //Explaining movement\n\n //sideways movement\n x = width / 2;\n y = 200 * progScale;\n s = \"Use these Keyboard Keys for Movement:\";\n let textMovement = new DisplayText(x, y, 0, 0, s);\n textMovement.textSize = 45 * progScale;\n allObjects.push(textMovement);\n\n //sideways movement 2\n x = width / 2;\n y = 275 * progScale;\n s = \"A and D OR <- and -> Arrow Keys\";\n let textAD = new DisplayText(x, y, 0, 0, s);\n textAD.textSize = 45 * progScale;\n textAD.textFont = fontBold;\n allObjects.push(textAD);\n\n //Jumping\n x = width / 4;\n y = 400 * progScale;\n s = \"To Jump, press the:\";\n let textjump = new DisplayText(x, y, 0, 0, s);\n textjump.textSize = 45 * progScale;\n allObjects.push(textjump);\n\n //Jumping 2\n x = width / 4;\n y = 475 * progScale;\n s = \"Spacebar\";\n let textSpace = new DisplayText(x, y, 0, 0, s);\n textSpace.textSize = 45 * progScale;\n textSpace.textFont = fontBold;\n allObjects.push(textSpace);\n\n //Wall Jumping\n x = width / 1.33;\n y = 400 * progScale;\n s = \"You can wall-jump\\nby pressing jump\\nwhile on a wall\";\n let textWallJump = new DisplayText(x, y, 0, 0, s);\n textWallJump.textSize = 30 * progScale;\n allObjects.push(textWallJump);\n \n //Pause message\n x = width / 1.33;\n y = 525 * progScale;\n s = \"Press ESC or ENTER\\nto Pause the game\";\n let pauseMessage = new DisplayText(x, y, 0, 0, s);\n pauseMessage.textSize = 25 * progScale;\n pauseMessage.textAlignH = CENTER;\n allObjects.push(pauseMessage);\n\n\n //Player and Blocks display\n //Block\n let w = 500 * progScale;\n let h = 50 * progScale;\n x = width / 2 - w / 2;\n y = 700 * progScale;\n\n let b = new Block(x, y, w, h);\n allObjects.push(b);\n allBlocks.push(b);\n b.setStrokeWeight(0);\n b.setStrokeColor(color(255, 255, 255)); //white stroke\n\n //Player\n w = h * (0.75);\n x = width / 2 - w / 2;\n y = y - w - ((w / 0.75) * 0.75 / 2);\n\n //adjusting x and y based on w being smaller\n //x += ((w / 0.75) - w) / 2;\n //y += ((w / 0.75) - w) / 2;\n\n let p = new Player(x, y, w, w);\n allObjects.push(p);\n p.fillColor = color(255, 190, 0); //Orange\n p.spawnStrokeColor = color(255, 190, 0); //Orange\n p.spawnFillColor = color(255, 190, 0, 0); //Orange with transparency\n p.setStrokeWeight(0);\n\n \n //Continue message\n x = width/2;\n y = 775 * progScale;\n s = \"Click this Button to continue\";\n let continueMessage = new DisplayText(x, y, 0, 0, s);\n continueMessage.textSize = 25 * progScale;\n continueMessage.textAlignH = CENTER;\n allObjects.push(continueMessage);\n \n //tutorial button\n w = 400 * progScale;\n h = 75 * progScale;\n x = (width / 2) - w / 2;\n y = 800 * progScale;\n let startTutorial = function() {\n clearGameObjects(); //clearing menu\n currentLevelSet = tutorialLevels; //setting set of levels to load\n currentLevel = 1; //for display\n currentLevelIndex = 0; //for level indexing\n numberOfDeaths = 0; //so practice deaths don't count\n gameTimer.reset(); //reseting current time on timer\n buildLevel(currentLevelIndex, currentLevelSet); //starting level\n };\n let btnTutorial = new Button(x, y, w, h, startTutorial);\n btnTutorial.displayText = \"Let's Try It!\";\n btnTutorial.strokeWeight = 0;\n btnTutorial.fillColor = color(0, 255, 255); //light blue\n btnTutorial.hoverColor = color(0, 255 / 2, 255 / 2); //darker\n btnTutorial.textSize = 45 * progScale;\n btnTutorial.textColor = color(0, 0, 0); //black\n btnTutorial.textHoverColor = color(255, 255, 255); //white\n allObjects.push(btnTutorial);\n\n //About Levels\n x = width / 2;\n y = 912 * progScale;\n s = \"The following levels will explain the rest...\";\n let textLevels = new DisplayText(x, y, 0, 0, s);\n textLevels.textSize = 30 * progScale;\n allObjects.push(textLevels);\n\n}", "start() {\n super.start();\n this.selected = 0;\n this.game.display.drawText(36, 1, 'ROTBASE');\n this.game.display.drawText(1, 4, '➧Start');\n this.game.display.drawText(2, 6, 'Help');\n this.game.display.drawText(2, 8, 'Credits');\n }", "function C005_GymClass_Intro_Run() {\n\t\n\t// Paints the background\n\tDrawImage(CurrentChapter + \"/\" + CurrentScreen + \"/Background.jpg\", 0, 0);\n\tDrawPlayerTransition();\n\n\t// Write the chapter introduction\n\tDrawText(GetText(\"Intro1\"), 450, 100, \"White\");\n\tif (TextPhase >= 1) DrawText(GetText(\"Intro2\"), 450, 200, \"White\");\n\tif (TextPhase >= 2) DrawText(GetText(\"Intro3\"), 450, 300, \"White\");\n\tif (TextPhase >= 3) DrawText(GetText(\"Intro4\"), 450, 400, \"White\");\n\tif (TextPhase >= 4) DrawText(GetText(\"Intro5\"), 450, 500, \"White\");\n\n}", "function C001_BeforeClass_Intro_Run() {\n\t\n\t// Draw the background and player\n\tif (TextPhase <= 2) DrawImage(CurrentChapter + \"/\" + CurrentScreen + \"/Background1.jpg\", 0, 0);\n\telse DrawImage(CurrentChapter + \"/\" + CurrentScreen + \"/Background2.jpg\", 0, 0);\n\tDrawPlayerTransition();\n\t\n\t// Introduce chapter 1 with each clicks\n\tDrawText(GetText(\"Intro1\"), 450, 50, \"White\");\n\tif (TextPhase >= 1) DrawText(GetText(\"Intro2\"), 450, 150, \"White\");\n\tif (TextPhase >= 2) DrawText(GetText(\"Intro3\"), 450, 250, \"White\");\n\tif (TextPhase >= 3) DrawText(GetText(\"Intro4\"), 450, 350, \"White\");\n\tif (TextPhase >= 4) DrawText(GetText(\"Intro5\"), 450, 450, \"White\");\n\tif (TextPhase >= 5) DrawText(GetText(\"Intro6\"), 450, 550, \"White\");\n\n}", "function displayTitle() {\n // Create elements for display\n push();\n textAlign(CENTER,CENTER);\n textSize(100);\n fill(0,0,0);\n textFont(fontGame);\n // Display the text\n text(\"CLKRT MSTRPC!\",width/2,height/4);\n textSize(30);\n stroke(255,0,0);\n // Display the instructions for the experience\n text(\"Collage without the glue and scissors. Yaaasssss! \\n LEFT ARROW = rotate-L \\n RIGHT ARROW = rotate-R \\n UP ARROW = expand \\n DOWN ARROW = shrink \\n SHIFT = a little magic \\n CLICK on your mouse to stamp \\n and don't stop, EVER ! \\n \\n Start by recording your voice... speak loud or use mic for best result \\n Press any button to record - Say something silly or poetic - press any button to stop \\n Now, press spacebar to begin a chef-d'oeuvre\",width/2,height/2+50);\n pop();\n\n // Check whether the spacebar was pressed to start the game...\n if (keyIsPressed && key === ' ') {\n // ... if it was, change the state to \"GAME\" so the switch statement in draw()\n // will display the game instead\n masterpiece = \"GAME\";\n //Call ambiance music for collage experience\n ambianceSFX.play();\n }\n}", "function showHelpText() {\n ctx.save();\n\n if (lastUsedInput === 'keyboard') {\n setFont(18);\n ctx.fillStyle = 'white';\n ctx.fillText(translation.spacebar + ' ' + translation.select, 28 - fontMeasurement, kontra.canvas.height - 25 + fontMeasurement / 2.5);\n }\n else if (lastUsedInput === 'gamepad') {\n drawAButton(28, kontra.canvas.height - 25);\n setFont(18);\n ctx.fillStyle = 'white';\n ctx.fillText(translation.select, 28 + fontMeasurement * 1.75, kontra.canvas.height - 25 + fontMeasurement / 2.5);\n }\n\n ctx.restore();\n}", "function startGame() {\n if(!presence.ballIsSpawned) {\n fill(start.color.c, start.color.saturation, start.color.brightness);\n stroke(start.color.c, start.color.saturation, start.color.brightness)\n if((windowWidth < 600) && (windowHeight < 600)) {\n textSize(20);\n text(\"PRESS ENTER TO START GAME\", windowWidth/4.2, windowHeight/2.5);\n textSize(15);\n text(\"(First to 7 Wins)\", windowWidth * 0.41, windowHeight * 0.47);\n }\n if((windowWidth > 601) && (windowHeight > 601)) {\n textSize(30)\n text(\"PRESS ENTER TO START GAME\", windowWidth * 0.35, windowHeight/2.5);\n textSize(20);\n text(\"(First to 7 Wins)\", start.textX + start.textX * 0.265, windowHeight * 0.44);\n }\n if(mode == 'single'){\n if((windowWidth > 601) && (windowHeight > 601)){\n text(\"Mode: \" + mode, windowWidth * 0.9, windowHeight * 0.08);\n textSize(18);\n text(\"USE ARROWS TO MOVE\", start.textX + start.textX * 0.2, windowHeight * 0.48);\n textSize(14);\n text(\"PRESS SHIFT FOR TWO PLAYER\", start.textX + start.textX * 0.2, windowHeight * 0.52);\n }\n if((windowWidth < 600) && (windowHeight < 600)){\n text(\"Mode: \" + mode, windowWidth * 0.8, windowHeight * 0.08);\n textSize(14);\n text(\"USE ARROWS TO MOVE\", start.textX + start.textX * 0.01, start.textY + start.textY * 0.04);\n textSize(12);\n text(\"PRESS SHIFT FOR TWO PLAYER\", windowWidth * 0.35, start.textY + start.textY * 0.16);\n defaultBallSpeed = 4;\n }\n }\n if(mode == 'two'){\n if((windowWidth > 601) && (windowHeight > 601)) {\n textSize(20);\n text(\"Mode: \" + mode, windowWidth * 0.9, windowHeight * 0.08)\n textSize(18);\n text(\"USE Q, A, P, L TO MOVE\", windowWidth * 0.43, windowHeight * 0.48);\n textSize(14);\n text(\"PRESS SHIFT FOR ONE PLAYER\", start.textX + start.textX * 0.2, windowHeight * 0.52);\n }\n }\n \n start.color.c += 1;\n if(start.color.c > 359) {\n start.color.c = 0;\n }\n }\n }", "function gameStart(){\n if(start == \"true\"){\n textFont()\n fill(250, 250, 60);\n rect(225, 300, 350, 200);\n fill(200, 100, 50);\n rect(240, 315, 320, 170)\n fill(150, 200, 70);\n textAlign(CENTER);\n textSize(100);\n text(\"Snake\", 400, 425)\n }\n}", "function drawText()\n\t{\n\t\t// Figure out the correct text\n\t\tvar text = getText();\n\n\t\twid = that.add('text', {\n\t\t\ttext: text,\n\t\t\tcolor: style.color,\n\t\t\tfont: style.font,\n\t\t\tcursor: 'pointer'\n\t\t});\n\n\t\t// Set the width of the widget\n\t\tthat.w = wid.width();\n\n\t\t// Assign a toggler\n\t\twid.applyAction('click', {\n\t\t\tclick: toggleMode\n\t\t});\n\t}", "function textHelp(){\n\n if(whiteTurn){\n document.getElementById('textMove').innerHTML = 'Light Move';\n document.getElementById('textArea').style.background = \"white\";\n document.getElementById('textMove').style.color = \"#333333\";\n\n }\n else{\n document.getElementById('textMove').innerHTML = 'Dark Move';\n document.getElementById('textArea').style.background = \"#4c4c4c\";\n document.getElementById('textMove').style.color= 'white';\n }\n if(lightMustTake || darkMustTake){\n document.getElementById('textMand').innerHTML = 'Mandatory Take';\n if(whiteTurn){\n \n document.getElementById('textMand').style.color = \"black\";\n }\n else{\n document.getElementById('textMand').style.color = \"white\";\n }\n }\n else{\n document.getElementById('textMand').innerHTML = '';\n }\n}", "function winner() {\n background(0);\n fill(66, 244, 69);\n textFont(myFont, 80);\n textAlign(CENTER);\n text(\"WINNER\", 400, 200);\n textSize(32);\n text(\"AS YOU OFFER HIM THE WATER\", 400, 270);\n text(\"HE SNATCHES IT FROM YOUR HANDS\", 400, 285);\n text(\"AND PROCEEDS TO CHUG IT.\", 400, 300);\n text(\"HAVING DRANK TOO FAST, HE BEGINS TO CHOKE, THEN DIES.\", 400, 315);\n text(\"YOU TOO WILL NOW DIE, FOR THERE IS NO MORE WATER LEFT.\", 400, 330);\n text(\"BUT AT LEAST YOU DID THE RIGHT THING ACCORDING TO KANT.\", 400, 345);\n textSize(40);\n text(\"REFRESH THE PAGE TO PLAY AGAIN\", 400, 485);\n}", "function win() {\r\n if(playerHasSword===true && playerHasSelfConfidence===true && playerHasShortBlade===true && playerHasWD40===true && currentlocation===10) {\r\n var msg = \"You crawl through the ductwork and see your target. Quickly jumping down, you wound him with the short blade. He lashes out and strikes you back while drawing his sword. You draw the Sword of Aquilius and attack. After a brief battle, LaFontanue knocks the sword from your hand and prepares to run your through. At the last second, you extend your hidden blade and plunge it into his throat, killing him. Your mission is complete. Congratulations.\";\r\n updateText(msg);\r\n }\r\n }", "startGame() {\r\n // Hide start screen overlay\r\n document.getElementById('overlay').style.display = 'none';\r\n\r\n // get a random phrase and set activePhrase property\r\n this.activePhrase = this.getRandomPhrase();\r\n this.activePhrase.addPhrasetoDisplay();\r\n }", "function displayWin() {\n push();\n background(0);\n textAlign(CENTER);\n textSize(20);\n textFont(myFont);\n fill(255);\n var winText = \"you win\";\n text(winText,width/2,height/2);\n pop();\n}", "function welcome() {\r\n\t\tctx.clearRect(0, 0, cw, ch);\r\n\t\tctx.fillStyle = \"white\";\r\n\t\tctx.font = ch*2/15 + \"px Lucida Console\";\r\n\t\tctx.fillText(\"Retro Snaker\", cw/6, ch/2, cw*2/3);\r\n\t\tctx.font = ch*1/25 + \"px Lucida Console\";\r\n\t\tctx.fillText(\"Press \\\"↑ ↓ ← →\\\" to Start\", cw*3/10, 11*ch/15, cw*2/5);\r\n\t}", "function spawnText(me, settings) {\n var element = me.element = addText(\"\", me.left, me.top);\n if(typeof(settings) == \"object\") proliferate(element, settings);\n else element.innerHTML = settings;\n me.movement = false;\n}", "function gameStart() {//game start, hide texts\n}", "function menu() {\n\tbackground('#e3d1cf'); // light pink\n\t\n\tfill(0);\n\ttextSize(60);\n\ttext(\"The Memory Game\", width / 2, 60);\n\ttextSize(15);\n\ttext(\"By: Maria Pasyechnyk\", width / 2, 120);\n\ttextSize(25);\n\ttext(\"Press Enter to Play\\nor\\nPress Space for Instructions\", width / 2, 220);\n}", "function showMenu() {\r\n togMenu=true;\r\n togSet=false;\r\n ctx.fillStyle = \"black\";\r\n ctx.globalAlpha = 0.9; \r\n ctx.fillRect(120, 40, 950, 600);\r\n ctx.globalAlpha = 1.0; \r\n ctx.fillStyle = \"white\";\r\n ctx.textAlign = \"center\"; \r\n ctx.font = \"45px Arial\";\r\n ctx.fillText(\"Settings\", w, 100);\r\n ctx.font = \"35px Arial\";\r\n\r\n if (speechOn) {\r\n ctx.fillText(\"Speech: On - press O to change\", w, 210);\r\n if (keys[79]) { //o\r\n speechOn=false;\r\n }\r\n }\r\n\r\n if (!speechOn) {\r\n ctx.fillText(\"Speech: Off - press B to change\", w, 210);\r\n if (keys[66]) { //b\r\n speechOn=true;\r\n }\r\n }\r\n\r\n /*------------------------------------------------------ */\r\n\r\n \r\n if (musicOn) {\r\n ctx.fillText(\"Music: On - press M to change\", w, 310);\r\n if (keys[77]) { //m\r\n musicOn=false;\r\n }\r\n }\r\n\r\n if (!musicOn) {\r\n ctx.fillText(\"Music: Off - press U to change\", w, 310);\r\n if (keys[85]) { //u\r\n musicOn=true;\r\n }\r\n }\r\n\r\n /*------------------------------------------------------ */\r\n\r\n if (picOn) {\r\n ctx.fillText(\"Picture: On - press C to change\", w, 410);\r\n if (keys[67]) { //o\r\n picOn=false;\r\n }\r\n }\r\n\r\n if (!picOn) {\r\n ctx.fillText(\"Colour: On - press I to change\", w, 410);\r\n if (keys[73]) { //f\r\n picOn=true;\r\n }\r\n }\r\n\r\n ctx.font = \"30px Arial\";\r\n ctx.fillText(\"Return to Game\", w, 560);\r\n ctx.fillText(\"Press A\", w, 610);\r\n\r\n if (keys[65]) { //a\r\n togSet=true;\r\n togMenu=false;\r\n }\r\n}", "function draw() {\n background(0);\n\n if(state === `title`){\n push();\n fill(255);\n textSize(60);\n text(`MADELEINE`, width/2, height/3);\n pop();\n\n madeleine.display();\n }\n else if(state === `instructions`){\n\n push();\n fill(255);\n text(`Welcome to 'Madeleine'.\n\n\n\n\n Survive the levels to pass onto the next challenge.\n Solve the puzzles to surpass them.\n\n When in a level, press SPACEBAR at anytime to open up the Tips Table.\n Certain levels require your input through microphone; choose wisely whether ot not to allow the web page access to your audio :)\n Remember, all levels are timed.\n\n For your own safety, please keep your volume on the medium-lower end.\n Or blast the volume bar up and enjoy bleeding ears; it is your choice, after all.`, width/2, height/2);\n pop();\n }\n\n}", "function gameOver() {\n background(0);\n fill(255, 0, 0);\n textFont(myFont, 80);\n textAlign(CENTER);\n text(\"LOSER\", 400, 200);\n textSize(32);\n text(\"HAVING DRANK ALL THE WATER, OR ATTEMPTED TO SHARE IT,\", 400, 270);\n text(\"YOU HAVE DONE THE WRONG THING!\", 400, 285);\n text(\"THE DUTIFUL THING WOULD HAVE BEEN TO GIVE IT\", 400, 300);\n text(\" TO THE DYING PERSON FIRST.\", 400, 315);\n text(\"BETTER LUCK NEXT TIME.\", 400, 330);\n textSize(40);\n text(\"REFRESH THE PAGE TO PLAY AGAIN\", 400, 485);\n}", "function intro_screen(){\r\n\tcontext.font = \"50px Impact\";\r\n\tcontext.fillStyle = \"#0099CC\";\r\n\tcontext.textAlign = \"center\";\r\n\tcontext.fillText(\"GET OUT\", canvas.width/2, canvas.height/2);\r\n\r\n\tcontext.font = \"20px Arial\";\r\n\tcontext.fillText(\"Press Enter To Start ... if you dare\", canvas.width/2, canvas.height/2 + 50);\r\n}", "function intro() {\n\tbackground(50);\n\n\tfill(255);\n\tnoStroke();\n\ttextSize(100);\n\ttextAlign(CENTER, CENTER);\n\ttext('INTRO', width/2, height/2);\n\n\ttextSize(24);\n\ttext('[ press any key to start ]', width/2, height-height/4);\n}", "function setup() {\n //set intro text\n boxWrite(\"Click here to activate audio and voice!\")\n // when body is clicked, the game is ready to go.\n $('body').click(function() {\n if (gameState === -1) {\n gameState = 0;\n boxWrite('Great! Now say \"Start Game!\"');\n dingSFX.play();\n }\n })\n\n //set up all annyang commands\n if (annyang) {\n\n var commands = {\n\n //All commands set the textbox text, set a line for the computer to read, change the game state, and change the AI portrait.\n\n 'start game': function() {\n if (gameState === 0) {\n dingSFX.play();\n setPortrait(\"question\");\n speak(lineIntroLine);\n boxWrite(boxTextTutorial1);\n setTimeout(function() {\n gameState += 1;\n }, 200);\n }\n\n },\n\n 'my name is *tag': function(tag) {\n if (gameState === 1) {\n dingSFX.play();\n setPortrait(\"elated\");\n gameState += 1;\n speak((\"Nice to meet you, \" + tag + \"! Shall we get started with today's video titles?\"));\n boxWrite(boxTextTutorial2);\n }\n },\n\n 'yes please': function() {\n if (gameState == 2) {\n dingSFX.play();\n setPortrait(\"question\");\n speak(lineSuggestionForVid);\n suggestion();\n speak(lineQualityQuery);\n gameState += 1;\n }\n },\n\n 'could you repeat that': function() {\n if (gameState == 3) {\n dingSFX.play();\n setPortrait(\"veryHappy\");\n speak(\"Sure thing!\");\n speak(currentSuggestion);\n speak(\"So? Good or bad?\");\n }\n },\n\n 'Good': function() {\n if (gameState === 3) {\n if (acceptedTitleAmount < 3) {\n dingSFX.play();\n setPortrait(\"elated\");\n speak(lineAcceptedSuggestion);\n addCurrentTitle();\n acceptedTitleAmount += 1;\n gameState = 2;\n if (acceptedTitleAmount === 3) {\n endGame();\n } else {\n speak(querySuggest);\n }\n }\n }\n },\n\n 'Bad': function() {\n if (gameState === 3) {\n dingSFX.play();\n setPortrait(\"quiz\");\n speak(lineQueryWhatIsWrong)\n boxWrite('Be clear! Say \"It is...\"');\n gameState = 11;\n };\n },\n\n 'it is *tag': function(tag) {\n if (gameState === 11) {\n dingSFX.play();\n adjectiveInQuestion = tag;\n setPortrait(\"neutral\");\n speak(\"Well, I think children would enjoy something \" + tag + \". Do you agree?\")\n boxWrite(boxTextTutorial6);\n setTimeout(function() {\n gameState += 1;\n }, 200);\n }\n },\n\n 'no': function() {\n if (rejectedTitleAmount >= 3) {\n dingSFX.play();\n speak(lineTooManyRejected)\n generateRemainingTitles();\n endGame();\n } else if (gameState === 12 && rejectedTitleAmount < 3) {\n setPortrait(\"annoyed\");\n speak(lineFinalRejection)\n boxWrite(boxTextTutorial4);\n rejectedTitleAmount += 1;\n setTimeout(function() {\n gameState = 2;\n }, 500);\n }\n },\n\n 'yes': function() {\n if (gameState === 12) {\n dingSFX.play();\n setPortrait(\"veryHappy\");\n speak((\"I thought so too. I would love it if someone called me \" + adjectiveInQuestion + \". I will add this title to our list. Would you like to hear my next suggestion?\"))\n boxWrite(boxTextTutorial5);\n addCurrentTitle();\n acceptedTitleAmount += 1;\n setTimeout(function() {\n gameState = 2;\n }, 500);\n };\n }\n }\n //add the previous commands to annyang and initialize it \n annyang.addCommands(commands);\n annyang.start();\n };\n}", "function instructionScreen() \n{\n const line1Y = (CANVAS_SIZE / 10) * 8;\n const line2Y = (CANVAS_SIZE / 10) * 9;\n\n ctx.font = \"50px Arial\";\n ctx.textAlign = \"center\";\n ctx.strokeStyle = CYAN;\n ctx.lineWidth = 2;\n ctx.strokeText(\"INSTRUCTIONS\", MID_CANVAS, CANVAS_SIZE / 6);\n\n ctx.font = \"15px Arial\";\n ctx.fillStyle = MAGENTA;\n\n // Changes depending on which page the user is on.\n showPage[game.levelNumber]();\n\n ctx.fillStyle = CYAN;\n ctx.fillText(\"PRESS LEFT OR RIGHT TO SEE NEXT/PREVIOUS PAGES.\", MID_CANVAS , line1Y);\n ctx.fillText(\"PRESS ESCAPE TO RETURN TO THE TITLE SCREEN.\", MID_CANVAS , line2Y);\n}", "function drawText() {\n //font size weight fill etc\n push();\n textSize(30);\n fill('black');\n strokeWeight(1);\n stroke('black');\n text('Choose a key (1 or 2)', 100, 60);\n pop();\n}", "function PreGame() {\n\txPosition = CHAR_START_X;\n\tyPosition = CHAR_START_Y;\n\tctx.font = \"30px Lucida Console\";\n\tctx.fillStyle = \"white\";\n\tctx.fillText(\"FLAPPY JUSTIN\",35,100);\n\tscore = 0;\n\n\tif(spriteX < 100 || spriteX > 200) { // alternate displaying the click to play text\n\t\tctx.font = \"20px Lucida Console\";\n\t\tctx.fillText(\"CLICK TO PLAY\",75,250);\n\t}\n}", "function winGame() {\r\n\r\n\t// Clear the entire screen text\r\n\ttextctx.clearRect(0,0,1000,1000);\r\n\t\r\n\t\r\n\ttextctx.font = \"25px pixelmixregular\";\r\n\ttextctx.fillText(pName + \" EST LE BEST!\", 200,210);\r\n\ttextBox.style.display = \"block\";\r\n\r\n}", "function startGame() {\n pairMovieWithSounds();\n randomSounds(movie);\n addPhraseToDisplay();\n keyboardSetup();\n}", "function botAnswers(commandText) {\n if (commandText == 'firstStart')\n return ('This bot will write you, when you have to work and relax.\\n\\nPress START to begin.\\n/\\help');\n else if (commandText == 'butStart')\n return ('You can select the interval or state your own one, for example: 30 15.\\n\\nMinimum: 1min\\nMaximum: 1439min (23h 59min)\\n\\nNotifications will be sent until then you press or write STOP.\\n/\\help');\n else if (commandText == 'butStop')\n return ('Press START to restart me or \\/help for help.');\n else if (commandText == 'butPause')\n return ('PAUSE');\n else if (commandText == 'butResume')\n return ('RESUME');\n else if (commandText == 'butHelp')\n return ('Available commands:\\n\\n\\/start - restart the bot\\nSTART - select a new interval\\nSTOP - stop working\\nPAUSE - pause the timer');\n\n return commandText;\n}", "startGame() {\n this.phrase = new Phrase(this.getRandomPhrase());\n this.addClueToDisplay();\n this.phrase.addPhraseToDisplay();\n }", "function prepareNovel()\r\n{\r\n novel.imagePath = \"\"; // path to your image directory\r\n novel.audioPath = \"\"; // path to your audio directory\r\n \r\n // initialize your characters, positions, and text blocks here\r\n\r\n\tskeptic = new Character(\"Лу\", {color: \"#FFD800\"});\r\n optimist = new Character(\"Ами\", {color: \"#3988FA\"});\r\n\tdreamer = new Character(\"Неос\", {color: \"#FF354E\"});\r\n realist = new Character(\"Гелиос\", {color: \"#31EA6C\"});\r\n\t\r\n\tskeptic2 = new Character(\"Кто-то\", {color: \"#FFD800\"});\r\n optimist2 = new Character(\"Кто-то\", {color: \"#3988FA\"});\r\n\tdreamer2 = new Character(\"Кто-то\", {color: \"#FF354E\"});\r\n realist2 = new Character(\"Кто-то\", {color: \"#31EA6C\"});\r\n\t\r\n\tsomeone = new Character(\"Кто-то\", {color: \"gray\"});\r\n\tdark = new Character(\"Тьма\", {color: \"black\"});\r\n\tcreator = new Character(\"Создатель\", {color: \"white\"});\r\n\tsomeone2 = new Character(\"Кто-то\", {color: \"white\"});\r\n\t\r\n n = new Character(\"\");\r\n \r\n leftSide = new Position(0.1, 0.95, 0, 1);\r\n\tleftMiddleSide = new Position(0.2, .95, 0, 1);\r\n rightSide = new Position(0.95, 0.95, 1, 1);\r\n\trightMiddleSide = new Position(0.8, 0.95, 1, 1);\r\n upperCenter = new Position(0.5, 0.5, 0.5, 0.5);\r\n rightTop = new Position(1, 0.1, 1, 0);\r\n\tCenter = new Position(0.64, 0.97, 1, 1);\r\n \r\n photo = new Character(\"\"); \r\n lionText = new TextBlock(\"myText\");\r\n\t\r\n \r\n // and put your script commands into this array\r\n script = [\r\n label, \"start\",\r\n\t\t\r\n\t\tn, \"История начинается прямо здесь, с этой минуты. Приятного прохождения!\",\r\n\t\t\r\n\t\tscene, {image: \"start.png\", position: Center, effect: \"fade\"},\r\n\t\tn, \"Представляют.\",\r\n\t\tn, \"...\",\r\n\t\tscene, \"\",\r\n\t\t\r\n\t\taudio, {src: \"bensound-memories\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\r\n\t\tn, \"— ...\",\r\n\t\tsomeone, \"— В самом начале было <strong>ни-че-го</strong>.\",\r\n\t\tsomeone, \"— ...ничего кроме тишины и полной темноты, и ведь казалось бы, ничего не может появится, как и до этого...\",\r\n\t\tscene, {image: \"BG1.png\", position: Center},\r\n\t\tsomeone, \"— Но рассеял полную темноту светом Создатель... и это было <strong>хорошо</strong>.\",\r\n\t\tsomeone, \"— То, что это было хорошо, надо просто принять.\",\r\n\t\tscene, {image: \"BG0.png\", position: Center},\r\n\t\tsomeone, \"— Свет не имел формы, но постепенно начал принимать очертания.\",\r\n\t\tscene, {image: \"BG.png\", position: Center},\r\n\t\tsomeone, \"— Очертания эти изливались в самые своеобразные формы...\",\r\n\t\tsomeone, \"— ...пока наконец не приняли форму четырёх существ, которым было подвластно формировать мир вокруг себя.\",\r\n\t\t\r\n\t\taudio, {src: \"stop\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\r\n\t \r\n\trealist2, {image: \"realist.png\", position: Center, avatar: \"avataragelious.png\"},\r\n\trealist2, \"— ...Так-так.\",\r\n\t\taudio, {src: \"bensound-sweet\", format: [\"mp3\"], action: \"play\"},\r\n\t\trealist2, \"— Ты вообще тут? Может вернемся к нашим баранам?\",\t\r\n\trealist, {image: \"realist.png\", position: leftMiddleSide, avatar: \"avataragelious.png\"},\r\n\toptimist2, {image: \"optimist2.png\", position: rightMiddleSide, avatar: \"avatarami.png\"},\r\n\t\toptimist2, \"— ...Да.\",\r\n\t\toptimist2, \"— Извини, Гелиос.\",\r\n\t\toptimist2, \"— Что-то в ностальгию ударилась…\",\r\n\toptimist2, {image: \"optimist.png\", position: rightMiddleSide},\t\t\r\n\t\tn, \"*Героиня слегка дёрнула плечами*.\",\r\n\t\toptimist2, \"— Вспоминала, зачем мы вообще здесь собрались.\",\r\n\t\toptimist2, \"— А кто такие <i>бараны</i>?\",\r\n\t\tn, \"*Гелиос отмахивается*\",\r\n\t\trealist, \"— ...Не суть важно.\",\r\n\t\trealist, \"— Давайте сосредоточимся.\",\r\n\toptimist2, {image: \"optimist.png\", position: rightMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\tskeptic2,{image: \"skeptic2.png\", position: rightMiddleSide, avatar: \"avatarlu.png\"},\r\n\t\tskeptic2, \"— ...\",\r\n\t\tskeptic2, \"— А где Неос?\",\r\n\t\tskeptic2, \"— Разве она не должна быть с нами?\",\r\n\trealist, {image: \"realist0.png\", position: leftSide},\r\n\tskeptic2,{image: \"empty.png\", position: leftMiddleSide},\r\n\toptimist2, {image: \"empty.png\", position: leftSide},\r\n\t\trealist, \"— Должна. Сейчас.\",\r\n\trealist, {image: \"realist2.png\", position: leftSide, avatar: \"avataragelious.png\"},\t\r\n\t\tn, \"*Гелиос привычно щёлкает пальцами*.\",\r\n\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\t\tn, \"*Издалека появлятся маленькое светило.*\", \r\n\t\tn, \"*Спустя несколько мгновений светило приобретает вполне понятные очертания.*\", \r\n\t\tdreamer2, \"— ... \",\r\n\tdreamer, {image: \"dreamer2.png\", position: Center, avatar: \"avatarneos.png\"},\r\n\t\tdreamer2, \"— Я тут.\",\r\n\t\tdreamer, \"— И мне не нравится, когда меня призывают.\",\r\n\tdreamer, {image: \"dreamer2.png\", position: rightMiddleSide},\t\r\n\toptimist2, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\toptimist2, \"— Неос... Сама понимаешь... Путешествия — потом.\",\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic2,{image: \"skeptic.png\", position: Center},\r\n\t\tskeptic2, \"— Решения не ждут.\",\r\n\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic2,{image: \"empty.png\", position: rightMiddleSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\tlabel, \"oof\",\r\n\t\t\r\n\t\tn, \"— ...\",\r\n\toptimist2, {image: \"optimist.png\", position: Center, avatar: \"avatarami.png\"},\r\n\t\toptimist2, \"— Существам Создателя будет очень сложно в этом пространстве, конечно...\",\r\n\t\toptimist2, \"— Кто вообще в здравом уме ограничивает квинтэссенцию света всего в 3 измерениях!\",\r\n\toptimist2, {image: \"optimist.png\", position: rightSide},\t\r\n\tdreamer, {image: \"dreamer.png\", position: Center},\t\r\n\t\tdreamer, \"— Как там тебя… Ами? это от Amigo?\",\r\n\tdreamer, {image: \"dreamer.png\", position: rightMiddleSide},\t\r\n\t\tdreamer, \"— Я полагаю, всё не просто так.\",\r\n\toptimist2, {image: \"empty.png\", position: rightMiddleSide},\t\r\n\t\tdreamer, \"— Зато их индивидуальные ограничения дают им увлекательные сюжеты для жизни.\",\r\n\t\tdreamer, \"— Только посмотрите, что для них придумал Лу, наш техник вселенной.\",\r\n\t\tdreamer, \"— Они могут совершать действия только вперёд!\",\r\n\tdreamer, {image: \"dreamer3.png\", position: rightMiddleSide},\t\t\r\n\t\tdreamer, \"— Да, Лу?\",\r\n\t\tn, \"— Неос смеётся и дружески толкает плечом Лу.\",\r\n\t\t\r\n\t\r\n\tskeptic,{image: \"skeptic.png\", position: leftSide, avatar: \"avatarlu.png\"},\t\r\n\t\tskeptic, \"— Человеки позже назовут это ‘хроносом’.\",\r\n\t\tskeptic, \"— ...а ещё позже ‘временем’.\",\r\n\tdreamer, {image: \"empty.png\", position: rightMiddleSide},\t\r\n\r\n\tskeptic,{image: \"skeptic3.png\", position: Center},\t\t\t\r\n\t\tskeptic, \"— Всё дело в направлении света. Для меньших существ Создателя невозможно будет воспринимать такое количество света.\",\r\n\t\tskeptic, \"— Поэтому для них условия существования более сжаты.\",\r\n\tdreamer, {image: \"empty.png\", position: leftMiddleSide},\t\t\r\n\tskeptic,{image: \"skeptic.png\", position: rightMiddleSide},\t\r\n\toptimist2, {image: \"optimist.png\", position: leftMiddleSide},\r\n\t\toptimist, \"— Но им всё равно нужны дополнительные условия...\",\r\n\t\t\t\t\r\n\tskeptic,{image: \"skeptic.png\", position: rightSide},\t\r\n\trealist, {image: \"realist.png\", position: Center},\t\r\n\toptimist2, {image: \"empty.png\", position: leftSide},\r\n\t\trealist, \"— Подождите. Я давно хотел вам показать...\",\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\t\r\n\toptimist2,{image: \"empty.png\", position: rightMiddleSide},\r\n\trealist, {image: \"realist2.png\", position: rightMiddleSide},\t\r\n\t\trealist, \"— Для начала нам нужна концепция свободного выбора.\",\r\n\t\trealist, \"— ...с этой концепцией появляется многолинейность в потоке времени для человеков.\",\r\n\t\t\r\n\trealist, {image: \"realist0.png\", position: rightMiddleSide},\t\r\n\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\t\r\n\t\tdreamer, \"— То есть, развитие временной спирали больше не предопределено?\",\r\n\trealist, {image: \"realist.png\", position: rightMiddleSide},\t\t\r\n\t\trealist, \"— предопределено, просто к одному и тому же последствию теперь можно прийти разными путями.\",\r\n\t\trealist, \"— правда, человеки назовут это ‘будущим’ и всё равно будут верить в неопределённость.\",\t\r\n\tdreamer, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\tskeptic,{image: \"skeptic.png\", position: leftMiddleSide},\t\r\n\trealist, {image: \"realist0.png\", position: rightSide},\t\r\n\t\tskeptic, \"— Что ещё от них ожидать...\",\r\n\tskeptic,{image: \"skeptic.png\", position: Center},\t\r\n\trealist, {image: \"empty.png\", position: rightSide},\t\r\n\t\tn, \"В умных глазах Лу отражается сомнение.\", \r\n\t\tskeptic, \"— Концепция работает?\",\r\n\tskeptic,{image: \"empty.png\", position: Center},\t\r\n\trealist,{image: \"Head Gelious.png\", position: upperCenter},\r\n\t\r\n label, \"menu0\",\r\n menu, [\r\n\t\t\t\"Концепция работает?\",\r\n\t\t\t\"Да.\", [jump, \"main0\"],\r\n \"Другое да.\", [jump, \"main0\"],\r\n ],\r\n \r\n label, \"main0\",\r\n scene, {image: \"BG10.png\", position: Center},\r\n\t\t\t\t\r\n\trealist, {image: \"realist.png\", position: leftMiddleSide},\t\t\r\n\t\trealist, \"— Как видишь.\",\r\n\trealist, {image: \"realist2.png\", position: leftMiddleSide},\t\r\n\t\trealist, \"— Что насчёт элементов?.\",\r\n\t\t\r\n\trealist, {image: \"realist.png\", position: rightSide},\t\r\n\tskeptic,{image: \"skeptic.png\", position: leftMiddleSide},\t\r\n\t\tskeptic, \"— Вода и огонь, земля и воздух. Кстати, эти элементы между собой неожиданно сгенерировали целую систему механизмов.\",\r\n\t\tskeptic, \"— Живые существа будут называть это Природой.\",\r\n\t\t\r\n\tskeptic,{image: \"skeptic.png\", position: rightMiddleSide},\r\n\tdreamer, {image: \"dreamer.png\", position: leftSide},\t\r\n\t\tdreamer, \"— Невероятно большая...\", \r\n\tdreamer, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\toptimist,{image: \"optimist.png\", position: leftMiddleSide, avatar: \"avatarami.png\"},\r\n\t\toptimist, \"— Это не будет опасно?.\",\r\n\t\t\r\n\tdreamer, {image: \"dreamer.png\", position: Center},\r\n\toptimist,{image: \"empty.png\", position: leftSide},\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\tdreamer, \"— Ха, поверь мне, человеки только и будут мечтать о том, чтобы познать эту систему.\", \r\n\t\tn, \"*Неос вскидывает голову*\",\r\n\t\t\r\n\tdreamer, {image: \"dreamer.png\", position: rightMiddleSide},\t\r\n\t\tdreamer, \"— Природа будет важна для всех живых существ.\",\r\n\t\r\n\toptimist,{image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\toptimist, \"— Но ведь огонь может их ранить!\",\r\n\t\toptimist, \"— Воздух не пригоден для жизни, вода — вообще яд!\",\r\n\tdreamer, {image: \"empty.png\", position: rightMiddleSide},\t\t\r\n\toptimist,{image: \"optimist.png\", position: leftSide},\t\r\n\trealist, {image: \"empty.png\", position: rightSide},\r\n\t\tn, \"Можно заметить, как Ами нервничает.\", \r\n\t\r\n\toptimist,{image: \"empty.png\", position: leftSide},\t\r\n\tskeptic,{image: \"skeptic.png\", position: Center},\r\n\t\tskeptic, \"— Да, по отдельности эти элементы нестабильны.\",\r\n\t\tskeptic, \"— Но вместе они создают нечто прекрасное.\",\r\n\t\t\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\r\n\tskeptic,{image: \"Head Lu.png\", position: upperCenter},\r\n\t\r\n\t\tlabel, \"menu1\",\r\n menu, [\r\n\t\t\t\"Выбор\",\r\n\t\t\t\"Оставить жизнь без базовых элементов. \", [jump, \"end1\"],\r\n \"Природа\", [jump, \"main1\"],\r\n ],\r\n\t\t\r\n\t\t\t\tlabel, \"end1\",\r\n\t\t\t\tscene, {image: \"BG.png\", position: Center},\r\n\t\t\t\t\r\n\t\t\r\n\t\t\tskeptic,{image: \"skeptic2.png\", position: rightMiddleSide},\r\n\t\t\t\tskeptic, \"— Кхм...\",\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightSide},\t\r\n\t\t\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\t\r\n\t\t\t\tdreamer, \"— Что-то мы запутались.\", \r\n\t\t\t\tn, \"*Неос хмурит брови*\", \r\n\t\t\t\tdreamer, \"— Разве мы не должны были создавать условия для жизни?.\", \r\n\t\t\t\tdreamer, \"— Ами, зачем? Доверься Лу!\", \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\t\t\r\n\t\t\t\taudio, {src: \"bensound-tomorrow\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\t\tn, \"— ...\",\r\n\t\t\t\tn, \"Без материального мира вы не смогли существовать.\",\r\n\t\t\t\tn, \"Пожалуйста, следите внимательнее за тем, что происходит в диалоге.\",\r\n\t\t\t\tn, \"Персонажи часто говорят важные детали, помогающие сделать правильный выбор.\",\r\n\t\t\t\r\n\t\t\t\tlabel, \"menuend1\",\r\n\t\t\t\tmenu, [\r\n\t\t\t\t\t\"Вселенная будет пересоздана. Будьте аккуратны, принимая решения!\",\r\n\t\t\t\t\t\"Переродиться.\", [jump, \"menu1\"],\r\n\t\t\t\t],\r\n\r\n\t\tlabel, \"main1\",\r\n scene, {image: \"BG.png\", position: Center},\r\n\t\taudio, {src: \"bensound-sweet\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\r\n\t\t\r\n\trealist, {image: \"realist2.png\", position: rightMiddleSide},\t\t\r\n\t\trealist, \"— Ну что-ж, вот и решили.\",\r\n\trealist, {image: \"realist.png\", position: rightMiddleSide},\t\t\t\r\n\t\trealist, \"— Предлагаю заодно поселить их на огромных сферах, бесконечно парящих с определённой скоростью в пространстве.\",\r\n\tdreamer, {image: \"dreamer.png\", position: leftSide},\t\r\n\t\tdreamer, \"— Человеков? Гелиос, зачем?\",\r\n\trealist, {image: \"realist2.png\", position: rightMiddleSide},\t\r\n\t\trealist, \"— Концентрировать их в одном месте удобнее, и давать условия для их существования тоже.\",\r\n\tdreamer, {image: \"empty.png\", position: leftSide},\t\r\n\tskeptic, {image: \"skeptic.png\", position: leftMiddleSide},\t\r\n\t\tskeptic, \"— Звучит логично.\",\r\n\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\t\r\n\trealist, {image: \"empty.png\", position: rightMiddleSide},\r\n\t\toptimist, \"— Да, а сверху можно расположить защитный купол от внешних угроз.\",\r\n\tskeptic, {image: \"skeptic.png\", position: leftMiddleSide},\r\n\t\tskeptic, \"— Кстати, геометрически, это не сферы, а шары.\",\r\n\toptimist, {image: \"optimist.png\", position: rightSide},\t\r\n\t\toptimist, \"— Геометрия?\",\r\n\t\tskeptic, \"— Да, я добавил, хотя смысла в этом....\",\r\n\t\tskeptic, \"— Меня будут ненавидеть за это.\",\r\n\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\t\r\n\t\tn, \"*Ами пожимает плечами*\", \r\n\t\toptimist, \" — Ну, если это зачем-то было нужно.\",\r\n\t\t\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\r\n\t\t\r\n\trealist, {image: \"realist0.png\", position: leftMiddleSide},\t\r\n\t\trealist, \"— ...\",\r\n\t\trealist, \"— Ребят, тут вообще есть проблемка...\",\r\n\trealist, {image: \"realist0.png\", position: rightMiddleSide},\t\r\n\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\t\r\n\t\tdreamer, \"— Что случилось??\",\r\n\tskeptic, {image: \"skeptic.png\", position: leftSide},\t\r\n\tdreamer, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\tskeptic, \"*шёпотом* — Как всегда, одни проблемы.\",\r\n\tskeptic, {image: \"empty.png\", position: rightMiddleSide},\t\r\n\trealist, {image: \"realist0.png\", position: leftMiddleSide},\t\r\n\t\trealist, \"— Помните ту концепцию времени, которую мы добавили?\",\r\n\t\trealist, \"— ...В общем, из-за неё человеки... как это...\",\r\n\t\trealist, \"— Их материальные тела рассыпаются, и их свету больше негде находиться.\",\r\n\tskeptic, {image: \"skeptic.png\", position:rightMiddleSide},\t\r\n\t\tskeptic, \"*продолжая шёпотом* — Ну я не удивлён, что что-то не работает.\",\r\n\tskeptic,{image: \"empty.png\", position: leftSide},\t\r\n\t\trealist, \"— ...Мы можем что-то придумать?\",\r\n\t\t\r\n\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\trealist, {image: \"realist.png\", position: rightSide},\r\n\t\toptimist, \"— Нам нужен защитный механизм для этого процесса.\",\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\t\r\n\t\tdreamer, \"— Можем создать концепцию перехода их света от предыдущего объекта к новому.\",\r\n\t\tdreamer, \"— Бесконечное существование!\",\r\n\tdreamer, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\toptimist, {image: \"optimist.png\", position: leftSide},\t\r\n\trealist, {image: \"empty.png\", position: rightSide},\r\n\t\toptimist, \"— Мне кажется, это не разумно.\",\r\n\t\tn, \"*Ами хватается за голову*\", \r\n\t\toptimist, \"— Человеки сойдут с ума пребывать в разных телах навечно...\",\r\n\t\t\r\n\t\toptimist, \"— Пусть лучше их опыт обнуляется.\",\r\n\tdreamer, {image: \"empty.png\", position: rightMiddleSide},\t\r\n\trealist, {image: \"realist3.png\", position: rightMiddleSide},\t\r\n\t\trealist, \"— Да, мы не можем дать им существовать вечно.\",\r\n\t\t\r\n\t\toptimist, \"— Пусть свет стремится из тела человека в новое тело, а цикл между телами будет называться жизнью.\",\r\n\toptimist, {image: \"empty.png\", position: leftSide},\t\r\n\trealist, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\tdreamer, {image: \"dreamer.png\", position: Center},\t\t\r\n\t\tdreamer, \"— Так...\",\r\n\r\n\t\tlabel, \"menu2\",\r\n\t\tdreamer, {image: \"Head Neos.png\", position: upperCenter},\r\n menu, [\r\n\t\t\t\"Неос выбирает\",\r\n\t\t\t\"Оставить переход между объектами.\", [jump, \"end2\"],\r\n \"Послушать Ами и Гелиоса\", [jump, \"main2\"],\r\n ],\r\n\t\t\r\n\t\t\t\tlabel, \"end2\",\r\n\t\t\t\tscene, {image: \"BG10.png\", position: Center},\r\n\t\t\t\taudio, {src: \"bensound-tomorrow\", format: [\"mp3\"], action: \"play\"},\r\n\r\n\t\t\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\t\t\r\n\t\t\t\tdreamer, \"— Это не зачем.\", \r\n\t\t\t\tdreamer, \"— Сможем придумать сверх этого другой механизм.\", \r\n\t\t\tskeptic, {image: \"skeptic.png\", position: rightMiddleSide},\t\r\n\t\t\t\tskeptic, \"— Конечно, это то, что нам стоит делать — нагромождать механизмы один на другой!\",\r\n\t\t\tskeptic, {image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\r\n\t\t\t\toptimist, \"— ...Они же сойдут с ума...\",\r\n\t\t\trealist, {image: \"realist0.png\", position: leftMiddleSide},\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\t\trealist, \"*смотрит в будущее* — Хватит. Сейчас мы увидим, что там происходит.\",\r\n\t\t\t\tdreamer, \"— Оу. \",\r\n\t\t\t\toptimist, \"— ...оуу.\",\r\n\t\t\t\tskeptic, \"— А я говорил...\",\r\n\t\t\trealist, {image: \"realist3.png\", position: leftMiddleSide},\t\r\n\t\t\t\trealist, \"— Они решили прекратить существовать...\",\r\n\t\t\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\r\n\t\t\t\tn, \"— ...\",\r\n\t\t\t\tn, \"Человечество не смогло найти реализации себя через бессмертие сознания.\",\r\n\t\t\t\tn, \"Пожалуйста, следите внимательнее за тем, что происходит в диалоге.\",\r\n\t\t\t\tn, \"Персонажи часто говорят важные детали, помогающие сделать правильный выбор.\",\r\n\t\t\t\r\n\t\t\t\tlabel, \"menuend2\", \t\r\n\t\t\t\tmenu, [\r\n\t\t\t\t\t\"Вселенная будет пересоздана. Будьте аккуратны, принимая решения!\",\r\n\t\t\t\t\t\"Переродиться.\", [jump, \"menu2\"],\r\n\t\t\t\t],\r\n\t\t\t\r\n\t\tlabel, \"main2\",\r\n\t\tscene, {image: \"BG10.png\", position: Center},\r\n\t\taudio, {src: \"bensound-sweet\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\r\n\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\t\r\n\t\tdreamer, \"— Ну хорошо... \",\r\n\t\tdreamer, \"— Не то, чтобы мне это нравится, но, кажется, так действительно лучше.\",\r\n\tdreamer, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\tskeptic,{image: \"skeptic.png\", position: leftMiddleSide},\r\n\t\tskeptic, \"— ...ого, мы договорились без всяких ссор.\",\r\n\trealist, {image: \"realist.png\", position: rightSide},\t\r\n\t\tn, \"*Гелиос ставит руки в бока, но по нему видно, что он улыбается*\",\r\n\trealist, {image: \"realist2.png\", position: rightMiddleSide},\t\r\n\t\trealist, \"— Ты такой скептик!\",\r\n\t\trealist, \"— ...А ссоры? Что это?\",\r\n\t\t\r\n\t\tskeptic, \"— Так человеки будут называть неспособность услышать друг друга в определённый момент.\",\r\n\t\tskeptic, \"— А ещё я очень устал, мы немного отклоняемся от поставленных задач.\",\r\n\trealist, {image: \"empty.png\", position: rightMiddleSide},\t\r\n\tskeptic,{image: \"skeptic.png\", position: rightMiddleSide},\r\n\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\t\t\r\n\t\tdreamer, \"— Ну хватит уже бурчать.\",\r\n\t\tskeptic, \"— Я не бурчу!.\",\r\n\tdreamer, {image: \"empty.png\", position: leftMiddleSide},\t\t\r\n\t\tskeptic, \"— ...\",\r\n\t\tskeptic, \"— Ну и ладно. Я в любом случае собирался поработать над некоторыми деталями отдельно.\",\r\n\t\tskeptic, \"— Всё-таки природа очень комплексная по своей системе.\",\r\n\t\tskeptic, \"— Позовите, если буду нужен.\",\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\t\r\n\t\tn, \"*Лу удаляется в неопределённом напрапвлении*\",\r\n\t\r\n\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\t\r\n\t\tdreamer, \"— ...как там человеки говорят… 'ну и лол!'.\",\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\r\n\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\toptimist, \"*про себя* — надеюсь он там ничего не сломает своими проработками...\",\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\trealist, {image: \"realist.png\", position: leftMiddleSide},\r\n\t\trealist, \"— Но в чём-то он может и прав. Возможно, нам нужно немного подумать в одиночестве.\",\r\n\tdreamer, {image: \"dreamer.png\", position: rightMiddleSide},\t\r\n\t\tdreamer, \"— Тогда давайте разойдемся. Мне нужно отдохнуть от всего этого.\",\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\t\r\n\trealist, {image: \"realist2.png\", position: leftMiddleSide},\t\r\n\t\tn, \"Гелиос кривит губы в саркатисческой улыбке, показывая иронию.\",\r\n\t\trealist, \"— В таком случае, выбора здесь нет.\",\r\n\t\t\r\n\t\tlabel, \"menu3\",\r\n menu, [\r\n\t\t\t\"Выбор без выбора\",\r\n\t\t\t\"Разойтись ненадолго.\", [jump, \"main3\"],\r\n ],\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\tlabel, \"main3\",\r\n\t\tscene, {image: \"BG.png\", position: Center},\r\n\t\taudio, {src: \"bensound-memories\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\r\n\t\tn, \"— ...\",\r\n\t\tn, \"— Свет всё преломлялся и изменялся, порождая жизнь на своём пути.\",\r\n\t\tn, \"— Механизмы и структуры, разработанные 4 богами, функционировали и помогали жизни адаптироваться.\",\r\n\t\tn, \"— ...но настал момент, когда им снова пришлось собраться.\",\r\n\t\tn, \"— Что-то неладное происходило в мире.\",\r\n\r\n\t\taudio, {src: \"bensound-sweet\", format: [\"mp3\"], action: \"play\"},\r\n\t\tscene, {image: \"BG.png\", position: Center},\r\n\trealist, {image: \"realist.png\", position: leftMiddleSide},\t\r\n\t\tn, \"Гелиос машет рукой издалека.\", \r\n\t\trealist, \" — Ну здравствуй.\",\r\n\t\trealist, \" — Ты тут одна?\",\r\n\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\t\r\n\t\toptimist, \"— ...А мы тут только вдвоём? Где остальные?\",\r\n\t\tn, \"Ами хмурится.\",\r\n\t\toptimist, \"— Особенно Лу меня волнует, негодяй...\",\r\n\trealist, {image: \"realist2.png\", position: leftMiddleSide},\t\r\n\toptimist, {image: \"empty.png\", position: rightMiddleSide},\t\r\n\t\trealist, \"— Ну сейчас.\",\r\n\t\tn, \"*Гелиос привычно щёлкает пальцами*\", \r\n\t\taudio, {src: \"bensound-sweet\", format: [\"mp3\"], action: \"stop\"},\r\n\trealist, {image: \"realist0.png\", position: leftSide},\t\r\n\t\trealist, \"— ...\",\r\n\t\trealist, \"— ......\",\r\n\toptimist, {image: \"optimist.png\", position: rightSide},\t\t\r\n\t\toptimist, \"— .......\",\r\n\t\trealist, \"— ................\",\r\n\t\trealist, \"— В смысле????.\",\r\n\toptimist, {image: \"optimist3.png\", position: rightSide},\t\r\n\t\toptimist, \"— Они... не могут прийти?!\",\r\n\t\tn, \"Гелиос и Ами ошеломлённо смотрят друг на друга.\", \r\n\trealist, {image: \"realist0.png\", position: leftMiddleSide},\t\r\n\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\t\t\r\n\t\trealist, \"— Что вообще могло случиться...\",\r\n\t\trealist, \"— Нужно найти их, пока не случилось что-то действительно ужасное..\",\r\n\t\toptimist, \"— Надеюсь, они наткнулись хотя бы друг на друга... \",\r\n\t\trealist, \"— Вперёд!\",\r\n\r\n\r\n\t\tlabel, \"menu4\",\r\n\t\tmenu, [\r\n\t\t\t\"— Ради всех остальных.\",\r\n\t\t\t\"Отправиться на поиски.\", [jump, \"main4\"],\r\n ],\r\n\r\n\t\tlabel, \"main4\",\r\n\t\tscene, {image: \"BG10.png\", position: Center},\r\n\t\taudio, {src: \"bensound-scifi\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\r\n\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\toptimist, \"— ...\",\r\n\t\toptimist, \"— Что делаем?\",\r\n\trealist, {image: \"realist.png\", position: rightMiddleSide},\t\r\n\t\trealist, \"— Так-с.\",\r\n\t\trealist, \"— Из-за того, что скорость света ограничена, у нас получаются отдельные участки космоса, в которые мы не можем попасть сразу.\",\r\n\t\trealist, \"— И это значит, что нам надо искать где-то там.\",\r\n\trealist, {image: \"realist0.png\", position: rightMiddleSide},\t\r\n\t\tn, \"Гелиос берёт Ами за руку и закрывает глаза.\",\r\n\t\trealist, \"— Говори, куда отправимся.\",\r\n\trealist, {image: \"empty.png\", position: rightMiddleSide},\t\t\r\n\toptimist, {image: \"Head Ami.png\", position: upperCenter},\t\r\n\r\n\t\tlabel, \"menu5\",\r\n\t\tmenu, [\r\n\t\t\t\"Выбрать за Ами, куда отправиться.\",\r\n\t\t\t\"1. Большая Медведица I (UMa I dSph).\", [jump, \"end3\"],\r\n\t\t\t\"2. Segue 2 — карликовая сфероидальная галактика.\", [jump, \"end3\"],\r\n\t\t\t\"3. Галактика в Драконе (Draco dSph).\", [jump, \"end3\"],\r\n\t\t\t\"4. Волосы Вероники (Com) — карликовая сфероидальная галактика.\", [jump, \"end3\"],\r\n\t\t\t\"5. Гончие Псы II (CVn II).\", [jump, \"end3\"],\r\n\t\t\t\"6. Большой Пёс (лат. Canis Major) — Искать около Сириуса.\", [jump, \"main5\"],\r\n\t\t\t\"7. Большое Магелланово Облако (Large Magellanic Cloud, LMC).\", [jump, \"end3\"],\r\n\t\t\t\"8. Ма́лое Магелла́ново О́блако (SMC, NGC 292).\", [jump, \"end3\"],\r\n ],\r\n\t\t\r\n\t\tlabel, \"end3\",\r\n\t\tscene, {image: \"BG20.png\", position: Center},\r\n\t\t\r\n\t\tn, \"Здесь никого нет.\",\r\n\t\t\r\n\t\tlabel, \"menuend3\",\r\n\t\tmenu, [\r\n\t\t\t\"— Нужно пойти назад.\",\r\n\t\t\t\"— Вернуться.\", [jump, \"menu5\"],\r\n ],\r\n\t\t\r\n\t\tlabel, \"main5\",\r\n\t\tscene, {image: \"BG.png\", position: Center},\r\n\t\t\t\r\n\t\tdreamer, \"— ...\",\r\n\t\t\r\n\t\trealist, \"— ох...\",\r\n\toptimist, {image: \"optimist.png\", position: leftSide},\r\n\trealist, {image: \"realist3.png\", position: leftMiddleSide},\t\r\n\t\r\n\t\tn, \"Гелиос и Ами находят Неос.\", \r\n\t\t\r\n\tdreamer, {image: \"dreamerdead.png\", position: rightSide},\t\t\r\n\t\tn, \"Её свёт был тусклый, а она сама еле живая.\", \r\n\t\toptimist, \"— Ч-что произошло?\",\r\n\t\trealist, \"— Мда, тут бы никто не смог прийти на встречу...\",\r\n\t\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\tn, \"*Гелиос и Ами помогают Неос прийти в себя*\",\r\n\t\r\n\tdreamer, {image: \"dreamer2.png\", position: rightSide},\t\r\n\t\tdreamer, \"— угхх...\",\r\n\t\tdreamer, \"— ...вот это жесть, конечно...\",\r\n\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\r\n\trealist, {image: \"realist0.png\", position: leftSide},\t\t\r\n\t\trealist, \"— Что случилось?\",\r\n\t\toptimist, \"— Ты в порядке?\",\r\n\t\t\r\n\tdreamer, {image: \"dreamer2.png\", position: rightMiddleSide},\t\t\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\r\n\t\tdreamer, \"— Теперь вроде бы да.\",\r\n\t\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\r\n\trealist, {image: \"realist.png\", position: leftSide},\t\r\n\t\t\r\n\t\t\r\n\t\toptimist, \"— Кто сделал это с тобой?\",\r\n\tdreamer, {image: \"dreamer2.png\", position: rightMiddleSide},\t\t\t\r\n\t\tdreamer, \"— кхх… скорее что, а не кто. Это очень странно, но... \",\r\n\t\tdreamer, \"— Это было что-то невероятно ужасное и неприятное\",\r\n\t\tdreamer, \"— Как будто оно поглощает свет\",\r\n\t\t\r\n\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\toptimist, {image: \"optimist.png\", position: leftSide},\t\r\n\t\toptimist, \"*боязливо*— Ч-что... Что оно хотело?\",\r\n\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\t\t\r\n\t\tdreamer, \"— Кушать оно хотело!\",\r\n\t\tn, \"*Неос немного пугает Ами*\",\r\n\t\tn, \"*Ами визжит*\",\r\n\t\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\r\n\trealist, {image: \"realist.png\", position: rightMiddleSide},\t\r\n\t\tn, \"*Гелиос улыбается*\",\r\n\t\trealist, \" — Спокойнее. Ты снова светишь, и это главное.\",\r\n\tdreamer, {image: \"dreamer2.png\", position: rightSide},\t\t\r\n\t\tdreamer, \"— Да нужно найти это нечто и разобраться!\",\r\n\toptimist, {image: \"optimist.png\", position: leftSide},\t\r\n\t\toptimist, \"— Ааа...! Я не хочу… я...\",\r\n\t\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\tlabel, \"menu6\",\r\n\t\tscene, {image: \"BG.png\", position: Center},\r\n\t\taudio, {src: \"bensound-scifi\", format: [\"mp3\"], action: \"play\"},\r\n\t\tskeptic, {image: \"skeptic2.png\", position: Center},\r\n\t\tskeptic, \"— ...\",\r\n\t\tskeptic, {image: \"Head Lu.png\", position: upperCenter},\r\n\t\tmenu, [\r\n\t\t\t\"Сказать фразу за Лу:\",\r\n\t\t\t\"<strong>Дослушать |</strong> Не хотелось бы вас перебивать, но...\", [jump, \"main6\"],\r\n\t\t\t\"<strong>Перебить |</strong> Короче,смотрите...\", [jump, \"end4\"],\r\n ],\r\n\r\n\t\t\t\tlabel, \"end4\",\r\n\t\t\t\tscene, {image: \"BG10.png\", position: Center},\r\n\t\t\r\n\t\t\tskeptic,{image: \"skeptic2.png\", position: leftMiddleSide},\r\n\t\t\t\tskeptic, \"— Короче, смотрите...\",\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\t\r\n\t\t\trealist, {image: \"realist3.png\", position: rightMiddleSide},\r\n\t\t\t\trealist, \"— Ты где вообще был? Почему не отзывался?\",\r\n\t\t\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\t\t\toptimist, \"— Совсем уже...\",\r\n\t\t\tdreamer, {image: \"dreamer2.png\", position: rightSide},\t\r\n\t\t\t\tdreamer, \"— Лу тоже пропадал? Пока меня пытались съесть заживо?\",\r\n\t\t\t\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\t\r\n\t\t\tskeptic,{image: \"skeptic.png\", position: leftMiddleSide},\r\n\t\t\t\tskeptic, \"— Ребят, у меня....\",\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\t\r\n\t\t\tdreamer, {image: \"dreamer2.png\", position: rightSide},\t\r\n\t\t\t\tdreamer, \"*перебивает* — Лу, меня тут чуть не стало, а ты ходишь непонятно где.\",\r\n\t\t\t\tdreamer, \"— Просто невыносимо!\",\r\n\t\t\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\t\t\toptimist, \"— Тебе всё равно на нас, да?\",\r\n\t\t\trealist, {image: \"realist3.png\", position: rightMiddleSide},\t\r\n\t\t\t\trealist, \"— Лу, это всё нехорошо, ты же понимаешь..\",\r\n\t\t\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\t\t\r\n\t\t\t\r\n\t\t\tskeptic,{image: \"skeptic.png\", position: leftMiddleSide},\r\n\t\t\t\tskeptic, \"— Да что-ж вы... я... кхгшш… хфф...\",\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\t\r\n\t\t\t\taudio, {src: \"bensound-tomorrow\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\tscene, {image: \"BGDark.png\", position: Center},\t\r\n\t\t\t\tdark, \"*приглушённо* — шшшш....\",\r\n\t\t\t\tdark, \"*приглушённо* — ......\",\r\n\t\t\r\n\t\t\t\tn, \"— ...\",\r\n\t\t\t\tn, \"— Пока вы не могли услышать друг друга, к вам незаметно подкралась Тьма и поглотила вас.\",\r\n\t\t\r\n\t\t\t\tlabel, \"menuend4\",\r\n\t\t\t\tmenu, [\r\n\t\t\t\t\t\"— Вселенная будет пересоздана. Будьте аккуратны, принимая решения!\",\r\n\t\t\t\t\t\"Переродиться.\", [jump, \"menu6\"],\r\n\t\t\t\t],\r\n\r\n\t\tlabel, \"main6\",\r\n\t\tscene, {image: \"BG10.png\", position: Center},\r\n\t\t\r\n\tskeptic,{image: \"skeptic.png\", position: leftSide},\t\r\n\t\tskeptic, \"— Не хотелось бы вас перебивать, но….\",\r\n\trealist, {image: \"realist3.png\", position: rightMiddleSide},\t\r\n\t\trealist, \"— Лу? Где ты был?\",\r\n\tskeptic,{image: \"skeptic2.png\", position: leftMiddleSide},\t\t\r\n\t\tskeptic, \"— Я был около Магелланового скопления. Послушайте!\",\r\n\t\tskeptic, \"— Я встретил там существ, которых ранее не видел никогда.\",\r\n\t\tskeptic, \"— В них просто нет никакого света!\",\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\t\r\n\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\tdreamer, {image: \"dreamer2.png\", position: rightMiddleSide},\t\r\n\t\tdreamer, \"— Ага… Вот что <em>пыталось меня сожрать</em>.\",\r\n\trealist, {image: \"realist0.png\", position: rightSide},\r\n\t\trealist, \"— Мы как раз наткнулись на такое, буквально только что!\",\r\n\t\r\n\tskeptic,{image: \"empty.png\", position: leftMiddleSide},\t\r\n\t\tskeptic, \"— Невообразимо просто, как такое вообще может быть...\",\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\r\n\t\toptimist, \"— А главное, что нам делать?\",\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\tdreamer, {image: \"dreamer2.png\", position: rightMiddleSide},\t\r\n\t\tn, \"*Неос сжимает кулаки*.\", \r\n\t\tdreamer, \"Мы должны противостоять.\",\r\n\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\r\n\t\toptimist, \"— ...Но как?\",\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\t\r\n\trealist, {image: \"realist3.png\", position: leftMiddleSide},\r\n\t\trealist, \"— Тьма — это отсутствие Света. Мы должны рассеять её.\",\r\n\tskeptic,{image: \"skeptic2.png\", position: rightMiddleSide},\t\r\n\t\tskeptic, \"— Это какая-то странная игра Создателя, внутри которой мы оказались.\",\r\n\t\tskeptic, \"— Нам теперь ничего не остается.\",\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\t\r\n\r\n\t\trealist, \"— Готовимся к битве...\",\r\n\r\n\trealist,{image: \"Head Gelious.png\", position: upperCenter},\t\r\n\r\n\t\tlabel, \"menu7\",\r\n\t\tmenu, [\r\n\t\t\t\"— \",\r\n\t\t\t\"Подготовиться к битве.\", [jump, \"main7\"],\r\n\t\t],\r\n\r\n\t\tlabel, \"main7\",\r\n\t\taudio, {src: \"bensound-epicbattle\", format: [\"mp3\"], action: \"play\"},\r\n\t\tscene, {image: \"BG.png\", position: Center},\r\n\t\t\r\n\t\tn, \"Наши герои собрались вместе, собирая свои силы.\", \r\n\t\tn, \"Подготовка шла полным ходом.\", \r\n\t\tn, \"Всё, что нужно сделать — это принять правильную последовательность шагов против действий врага.\", \r\n\t\tn, \"И только умея слушать других, умея вести диалог, можно противостоять Вселенской Тьме.\",\r\n\t\t\r\n\trealist, {image: \"realist0.png\", position: leftMiddleSide},\r\n\t\trealist, \"— ...Все помнят план?\",\r\n\t\trealist, \"— Я ставлю щит под атаку Тьмы, Неос меня поддерживает, Лу атакует Светом вместе с Ами.\",\r\n\tskeptic,{image: \"skeptic.png\", position: rightMiddleSide},\t\r\n\t\tskeptic, \"— Да.. да, мы помним.\",\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\t\t\r\n\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\t\r\n\t\tdreamer, \"— Чшш...\",\r\n\tskeptic,{image: \"skeptic2.png\", position: rightMiddleSide},\t\r\n\t\tskeptic, \"— М?\",\r\n\t\tdreamer, \"— <i>Оно</i> приближается...\",\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\t\t\r\n\t\tsomeone, \" — ...\",\r\n\tdark, {image: \"dark.png\", position: upperCenter},\t\r\n\t\tdark, \" — шшшшфффф......\",\r\n\tdark, {image: \"empty.png\", position: upperCenter},\t\t\r\n\trealist, {image: \"realist3.png\", position: leftSide},\t\r\n\t\tn, \"*Гелиос глубоко вдыхает и выдыхает*\",\r\n\t\tn, \"*...затем резко щёлкает пальцами*\",\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\tskeptic,{image: \"skeptic2.png\", position: rightSide},\t\r\n\t\trealist, \"— Создаю концепцию защиты!\",\r\n\t\tn, \"*Лу вскидывает руки*\",\r\n\t\tskeptic, \"— Беру на себя оптику преломлений.\",\r\n\tskeptic,{image: \"empty.png\", position: leftMiddleSide},\t\r\n\t\t\r\n\trealist, {image: \"realist0.png\", position: leftMiddleSide},\t\r\n\t\trealist, \"— Начинаем!\",\t\r\n\r\n\trealist, {image: \"empty.png\", position: leftMiddleSide},\r\n\r\n\r\n\t\t\r\n\t\tlabel, \"mainBattleStart\",\r\n\t\t\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Световой щит Гелиоса\",\r\n\t\t\t\t\"Поставить световой щит справа\", [jump, \"mainBattleRight\"],\r\n\t\t\t\t\"Поставить световой щит слева\", [jump, \"mainBattleLeft\"],\r\n\t\t\t],\r\n\r\n\t\tlabel, \"mainBattleRight\",\r\n\t\t\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\t\r\n\t\t\trealist, \"— Атакуем слева.\",\r\n\t\t\tskeptic, \"— Направляю луч света!\",\r\n\t\t\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Оптика световых лучей\",\r\n\t\t\t\t\"Направить налево\", [jump, \"mainBattleRight2\"],\r\n\t\t\t\t\"Направить направо\", [jump, \"mainBattleLeft2\"],\r\n\t\t\t],\r\n\t\t\r\n\t\tlabel, \"mainBattleLeft\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\t\t\r\n\t\t\trealist, \"— Атакуем справа.\",\r\n\t\t\tskeptic, \"— Направляю этот сверх-тяжелый луч света...\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Оптика световых лучей\",\r\n\t\t\t\t\"Направить налево\", [jump, \"mainBattleLeft2\"],\r\n\t\t\t\t\"Направить направо\", [jump, \"mainBattleRight2\"],\r\n\t\t\t],\r\n\t\t\r\n\t\tlabel, \"mainBattleLeft2\",\r\n\t\t\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\t\toptimist, \"— Ты целишься не туда!\",\r\n\t\t\tskeptic, \"— Ты не видишь, я пытаюсь!\",\r\n\t\t\tdreamer, \"— Ну же, давай...\", \r\n\t\t\trealist, \"— Приготовьтесь, теперь будет сложно!\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Выставить новую защиту\",\r\n\t\t\t\t\"Поставить световой щит справа\", [jump, \"mainBattleLeft3\"],\r\n\t\t\t\t\"Поставить световой щит слева\", [jump, \"mainBattleLeftLeft3\"],\r\n\t\t\t],\r\n\t\t\r\n\t\t\r\n\t\tlabel, \"mainBattleRight2\",\r\n\t\t\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\r\n\t\t\trealist, \"— Приготовьтесь, теперь будет сложно!\",\r\n\t\t\tskeptic, \"— Ами, атакуй сверху!\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"— Ами, давай!\",\r\n\t\t\t\t\"Атаковать сверху\", [jump, \"mainBattleSkip\"],\r\n\t\t\t],\r\n\r\n\t\t\r\n\t\tlabel, \"mainBattleSkip\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\t\trealist, {image: \"realist.png\", position: leftMiddleSide},\r\n\t\t\trealist, \"— Аккуратнее!\",\r\n\t\t\tskeptic,{image: \"skeptic.png\", position: rightMiddleSide},\t\r\n\t\t\tskeptic, \"— Сам аккуратнее!\",\r\n\t\t\tskeptic, \"— Давай выбирай, что делать дальше!\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Сделать выбор за Гелиоса:\",\r\n\t\t\t\t\"Новая атака\", [jump, \"mainBattleRight3\"],\r\n\t\t\t\t\"Укрепить позиции\", [jump, \"mainBattleRight4\"],\r\n\t\t\t],\r\n\t\t\r\n\t\tlabel, \"mainBattleLeft3\", \r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\t\trealist, \"— Атакуй снова, теперь с нужной стороны!\",\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Оптика световых лучей — вторая попытка\",\r\n\t\t\t\t\"Направить налево\", [jump, \"mainBattleRight3\"],\r\n\t\t\t\t\"Направить направо\", [jump, \"mainBattleLeft4\"],\r\n\t\t\t],\r\n\r\n\t\tlabel, \"mainBattleLeftLeft3\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\t\trealist, {image: \"realist.png\", position: leftMiddleSide},\r\n\t\t\trealist, \"— Атакуй снова, теперь с нужной стороны!\",\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Оптика световых лучей — вторая попытка\",\r\n\t\t\t\t\"Направить налево\", [jump, \"mainBattleLeft4\"],\r\n\t\t\t\t\"Направить направо\", [jump, \"mainBattleRight3\"],\r\n\t\t\t],\r\n\t\t\t\r\n\t\t\r\n\t\tlabel, \"mainBattleRight3\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\r\n\t\t\tdreamer, \"— Так, что теперь?\", \r\n\t\t\tskeptic,{image: \"skeptic.png\", position: rightMiddleSide},\r\n\t\t\tskeptic, \"— Новая атака, нужно только выбрать <i>правильное</i> направление..\",\r\n\t\t\t\r\n\t\t\tskeptic, {image: \"skeptic.png\", position: rightMiddleSide},\r\n\t\t\tskeptic, \"— А вот теперь будет по-настоящему сложно...\",\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"— Скорее решай!\",\r\n\t\t\t\t\"Атака сверху\", [jump, \"mainBattleLeftLeft4\"],\r\n\t\t\t\t\"Атака снизу\", [jump, \"mainBattleLeftLeft4\"],\r\n\t\t\t\t\"Атака слева\", [jump, \"mainBattleLeftLeft4\"],\r\n\t\t\t\t\"Атака справа\", [jump, \"mainBattleRight4\"],\r\n\t\t\t],\r\n\t\t\r\n\t\tlabel, \"mainBattleRight4\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\t\tdreamer, {image: \"dreamer.png\", position: leftMiddleSide},\r\n\t\t\tdreamer, \"— Осталось немного.\", \r\n\t\t\tdreamer, \"— Дайте мне атаковать!\", \r\n\t\t\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\r\n\t\t\toptimist, \"— Неос, нет, ты нужна мне здесь!\",\r\n\t\t\toptimist, \"— Лучше дайте мне поставить щит!\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Командная работа — ключ к победе.\",\r\n\t\t\t\t\"Перестроить всех стратегически по кругу \", [jump, \"mainBattleRight5\"],\r\n\t\t\t\t\"Выпустить Неос вперёд\", [jump, \"mainBattleLeft5\"],\r\n\t\t\t\t\"Перестроить Ами в авангард\", [jump, \"mainBattleLeftLeft4\"],\r\n\t\t\t],\r\n\t\t\r\n\t\tlabel, \"mainBattleRight5\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\t\trealist, {image: \"realist2.png\", position: Center},\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Решение на миллион.\",\r\n\t\t\t\t\"<strong>Непредсказуемая атака |</strong> Серия резких ударов светом\", [jump, \"mainBattleLeft7\"],\r\n\t\t\t\t\"<strong>Совместная атака |</strong> Концентрация света на Тьме\", [jump, \"mainBattleRight6\"],\r\n\t\t\t\t\"<strong>Защита |</strong> Укрепить позиции против Тьмы\", [jump, \"mainBattleLeft5\"],\r\n\t\t\t],\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tlabel, \"mainBattleLeftLeft4\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trealist, {image: \"realist3.png\", position: leftMiddleSide},\r\n\t\t\trealist, \"— Нет, мы не угадали. Тьма парировала нашим действиям.\",\r\n\t\t\trealist, \"— ...\",\r\n\t\t\trealist, \"— Всё очень плохо...\",\r\n\t\t\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\r\n\t\t\toptimist, \"— Теперь что?\",\r\n\t\t\tskeptic,{image: \"skeptic.png\", position: leftSide},\r\n\t\t\tskeptic, \" — Теперь погибель наша, вот что...\",\r\n\t\t\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\t\r\n\t\t\tdreamer, {image: \"dreamer.png\", position: rightSide},\r\n\t\t\tdreamer, \"— Эта битва ещё не проиграна, соберитесь!\", \r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Быстрое решение\",\r\n\t\t\t\t\"<strong>Исправить ошибку |</strong> Переместиться назад во времени\", [jump, \"mainBattleLeft6\"],\r\n\t\t\t\t\"<strong>Убежать |</strong> Переместиться на пару парсек от места битвы\", [jump, \"mainBattleLeft6\"],\r\n\t\t\t\t\"<strong>Командное действие |</strong> Выстроить щиты и подготовиться к атаке\", [jump, \"mainBattleLeft5\"],\r\n\t\t\t],\r\n\t\t\r\n\t\tlabel, \"mainBattleLeft4\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\t\r\n\t\t\trealist, {image: \"realist3.png\", position: leftMiddleSide},\r\n\t\t\trealist, \"— Да как же так... Мы не можем защищаться и атаковать с одной и той же стороны!\",\r\n\t\t\trealist, \"— Перед атакой всегда должна быть защита.\",\r\n\t\t\t\r\n\t\t\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\r\n\t\t\toptimist, \"— Блин...\",\r\n\t\t\toptimist, \"— Какая там обстановка?\",\r\n\t\t\trealist, \"— ...\",\r\n\t\t\trealist, \"— Всё очень плохо...\",\r\n\t\t\toptimist, \"— Теперь что?\",\r\n\t\t\tskeptic,{image: \"skeptic.png\", position: leftSide},\r\n\t\t\tskeptic, \" — Теперь погибель наша, вот что...\",\r\n\t\t\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\r\n\t\t\tdreamer, \"— Эта битва ещё не проиграна, соберитесь!\", \r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Быстрое решение\",\r\n\t\t\t\t\"<strong>Исправить ошибку |</strong> Переместиться назад во времени\", [jump, \"mainBattleLeft6\"],\r\n\t\t\t\t\"<strong>Убежать |</strong> Переместиться на пару парсек от места битвы\", [jump, \"mainBattleLeft6\"],\r\n\t\t\t\t\"<strong>Командное действие |</strong> Выстроить щиты и подготовиться к атаке\", [jump, \"mainBattleLeft5\"],\r\n\t\t\t],\r\n\t\t\t\r\n\t\t\r\n\t\tlabel, \"mainBattleLeft5\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\t\r\n\t\t\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\r\n\t\t\toptimist, \"— Кажется, получается!\",\r\n\t\t\toptimist, \"— Нужно перегруппироваться и атаковать снова!\",\r\n\t\t\tdreamer, {image: \"dreamer.png\", position: rightMiddleSide},\r\n\t\t\tdreamer, \"— Вперёд!\", \r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Последний шанс\",\r\n\t\t\t\t\"<strong>Командная Атака|</strong> 4 мощные атаки каждого героя\", [jump, \"mainBattleRightRight4\"],\r\n\t\t\t\t\"<strong>Индивидуальная атака|</strong> 4 разных приёма героев для победы\", [jump, \"mainBattleLeft7\"],\t\r\n\t\t\t\t\"<strong>Атака + Защита|</strong> Ами и Гелиос ставят щиты, Неос и Лу атакуют\", [jump, \"mainBattleWellEnd\"],\t\t\t\r\n\t\t\t],\r\n\t\t\t\r\n\t\tlabel, \"mainBattleRightRight4\", \r\n\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\tscene, {image: \"battle.png\", position: Center},\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Нет поражения хуже.\",\r\n\t\t\t\t\"<strong>Индивидуальная защита|</strong> Световые щиты для каждого героя\", [jump, \"mainBattleLeft7\"],\r\n\t\t\t\t\"<strong>Командная защита|</strong> Командный световой щит\", [jump, \"mainBattleWellEnd\"],\r\n\t\t\t],\r\n\r\n\t\t\r\n\t\tlabel, \"mainBattleLeft6\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\t\t\tscene, \"\",\r\n\t\t\t\t\r\n\t\t\tskeptic,{image: \"skeptic.png\", position: leftMiddleSide},\r\n\t\t\t\tskeptic, \"— \",\r\n\t\t\t\taudio, {src: \"bensound-tomorrow\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\t\tdark, \"*приглушённо* — шшшш....\",\r\n\t\t\t\tdark, \" ......\",\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\t\r\n\t\t\t\tn, \"— ...\",\r\n\t\t\t\tn, \"— Как известно, убегать от проблем никогда не было хорошим решением..\",\r\n\t\t\t\tphoto, {image: \"1-1.png\", position: upperCenter},\r\n\t\t\t\tn, \"— Вам пришел конец.\",\r\n\t\t\t\tn, \"— Вы прошли игру на 1/3 звёзд.\",\r\n\t\t\t\t\r\n\t\t\t\tmenu, [\r\n\t\t\t\t\t\"Better Luck Next Time.\",\r\n\t\t\t\t\t\"Перейти в конец.\", [jump, \"lastlabel\"],\r\n\t\t\t\t],\r\n\t\t\r\n\t\tlabel, \"mainBattleLeft7\",\r\n\t\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\r\n\t\t\t\tscene, \"\",\r\n\t\t\t\taudio, {src: \"bensound-tomorrow\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\t\t\r\n\t\t\t\tn, \"— ...\",\r\n\t\t\t\tn, \"— Недоговорившись о своих действиях, каждый сделал какое-то действие, которое помешало другому. \",\r\n\t\t\t\tn, \"— Замешкавшись, вы потеряли контроль над светом, и Тьма этим воспользовалась.\",\r\n\t\t\tphoto, {image: \"1-1.png\", position: upperCenter},\r\n\t\t\t\tn, \"— Вам пришел конец.\",\r\n\t\t\t\tn, \"— Вы прошли игру на 1/3 звёзд.\",\r\n\t\t\r\n\t\t\t\tmenu, [\r\n\t\t\t\t\t\"Ну может в следующий раз.\",\r\n\t\t\t\t\t\"Перейти в конец.\", [jump, \"lastlabel\"],\r\n\t\t\t\t],\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tlabel, \"mainBattleWellEnd\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\t\taudio, {src: \"piano\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\t\r\n\t\t\tn, \"...\", \r\n\t\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\t\r\n\t\t\tdreamer, \"— ...Оно отступает.\",\r\n\t\toptimist, {image: \"optimist.png\", position: leftSide},\t\r\n\t\t\toptimist, \"— ...кажется, да!\",\r\n\t\tskeptic,{image: \"skeptic2.png\", position: rightMiddleSide},\r\n\t\tdreamer, {image: \"empty.png\", position: rightSide},\r\n\t\t\tskeptic, \"— Существовать в одном мире с этой тварью стало как-то мрачновато.\",\r\n\t\t\tskeptic, \"— Откуда оно вообщё взялось, и зачем?\",\r\n\t\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\t\toptimist, \"— Вот бы мы могли призвать Создателя и понять, зачем...\",\r\n\t\t\t\r\n\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\t\r\n\t\trealist, {image: \"realist4.png\", position: leftMiddleSide},\t\r\n\t\t\trealist, \"— Предлагаю узнать прямо сейчас.\",\r\n\t\t\tn, \"Гелиос складывает руки в молитвенной позе.\",\r\n\t\t\tn, \"Яркий свет отражался сквозь его полу-закрытые глаза.\",\r\n\t\t\tn, \"Гелиос засиял.\",\r\n\t\t\t\r\n\t\tlabel, \"wellEndingX\",\r\n\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Призвать Создателя.\",\r\n\t\t\t\t\"Прочитать молитву.\", [jump, \"nothingHappened\"],\r\n\t\t\t],\r\n\t\t\r\n\t\t\r\n\t\tlabel, \"nothingHappened\",\r\n\t\t\r\n\t\t\r\n\t\t\taudio, {src: \"piano\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\tn, \"...\", \r\n\t\t\tn, \"....\",\r\n\t\t\tn, \".....\",\r\n\t\t\tn, \"Ничего не произошло\",\r\n\t\t\t\r\n\t\trealist, {image: \"realist0.png\", position: leftMiddleSide},\t\t\r\n\t\t\trealist, \"— Мда.\",\r\n\t\t\trealist, \"— Ладно, в любом случае...\",\r\n\t\t\trealist, \"— Не расслабляйтесь.\",\r\n\t\t\trealist, \"— Нам ещё предстоит сражаться с этим, в любой момент.\",\r\n\t\t\trealist, \"— Создатель говорил, у него всегда есть план.\",\r\n\t\t\trealist, \"— И мы должны ему следовать.\",\r\n\t\t\r\n\t\trealist, {image: \"Head Gelious.png\", position: upperCenter},\r\n\t\t\r\n\t\tlabel, \"wellEnding0\",\r\n\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Выбрать за Гелиоса.\",\r\n\t\t\t\t\"Поверить в значимость плана Создателя.\", [jump, \"WellEnding1\"],\r\n\t\t\t\t\"Это всё бред.\", [jump, \"WellEnding2\"],\r\n\t\t\t],\r\n\t\t\r\n\t\tlabel, \"WellEnding1\",\r\n\t\t\r\n\t\trealist, {image: \"realist.png\", position: leftMiddleSide},\t\t\r\n\t\t\trealist, \"— Всегда есть план...\",\r\n\t\tskeptic,{image: \"skeptic2.png\", position: rightMiddleSide},\t\r\n\t\t\tskeptic, \"— Будешь слепо верить каким-то словам?\",\r\n\t\t\tskeptic, \"— Я устал от всей этой лжи.\",\r\n\t\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\t\r\n\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\tdreamer, \"— Не надо, Лу..\",\r\n\t\t\r\n\t\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\trealist, {image: \"realist0.png\", position: leftMiddleSide},\t\t\r\n\t\t\trealist, \"— В любом случае.\",\r\n\t\t\trealist, \"— Мы ничего не можем поделать, кроме как подготовиться к следующей битве.\",\r\n\t\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\t\toptimist, \"— ...получается, что так.\",\r\n\t\toptimist, {image: \"empty.png\", position: rightMiddleSide},\r\n\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\t\r\n\t\tskeptic,{image: \"skeptic.png\", position: leftMiddleSide},\r\n\t\t\tskeptic, \"— Как хотите.\",\r\n\t\t\tskeptic, \"— В таком случае я лучше подготовлюсь в одиночку.\",\r\n\t\t\tskeptic, \"— Я уверен, что если мы возможно сможем выстоять против <i>этого существа</i>.\",\r\n\t\t\tskeptic, \"— То люди точно не смогут.\",\r\n\t\tskeptic,{image: \"skeptic3.png\", position: rightMiddleSide},\t\r\n\t\t\tskeptic, \"— Я отправляюсь на ближайшую заселенную ими планету.\",\r\n\t\t\tskeptic, \"— Она недалеко, Млечный Путь.\",\r\n\t\t\tskeptic, \"— Вы знаете, где меня искать.\",\r\n\t\toptimist, {image: \"optimist2.png\", position: leftMiddleSide},\t\r\n\t\t\toptimist, \"— Подожди!\",\r\n\t\t\toptimist, \"— Я пойду с тобой.\",\r\n\t\t\toptimist, \"— Я не выдержу в одиночестве открытого пространства.\",\r\n\t\t\t\r\n\t\t\t\r\n\t\trealist, {image: \"realist.png\", position: Center},\t\r\n\t\t\trealist, \"— Ну может тогда и ты, Неос, пойдешь с ними?\",\r\n\t\t\r\n\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\r\n\t\t\tdreamer, \"— Не-е...\",\r\n\t\t\tdreamer, \"— Мне с вами не по пути.\",\r\n\t\t\tdreamer, \"— Слишком много вопросов к одной занимательной персоне...\",\r\n\t\t\tdreamer, \"— Я лучше погибну, но найду Создателя.\",\r\n\t\t\tn, \"*Неос скрипит зубами*\",\r\n\t\t\tdreamer, \"— Он ответит за всё...\",\r\n\t\t\t\r\n\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\trealist, {image: \"realist.png\", position: Center},\t\r\n\t\t\trealist, \"— Что-ж...\",\r\n\t\t\trealist, \"— Тогда удачи вам всем в пути.\",\r\n\t\t\trealist, \"— Мне было счастьем быть с вами...\",\r\n\t\t\t\r\n\t\tdreamer, {image: \"dreamer.png\", position: rightSide},\r\n\t\t\tdreamer, \"— А что будет с тобой, Гелиос?\",\t\r\n\t\t\r\n\t\trealist, {image: \"realist2.png\", position: Center},\t\r\n\t\t\tn, \"Гелиос многозначительно улыбнулся самой грустной улыбкой, какая вообще может существовать.\",\r\n\t\t\trealist, \"— Увидишь.\",\r\n\t\t\r\n\t\t\tscene, \"\",\r\n\t\t\t\r\n\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\t\r\n\t\t\r\n\t\t\tsomeone2, \"— ...\",\r\n\t\t\tsomeone2, \"— Герои разбрелись в разные стороны.\",\r\n\t\t\tsomeone2, \"— Теперь их путь — долгий и полный скорби.\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"luandami1.png\", position: Center},\r\n\t\t\t\r\n\t\t\tsomeone2, \"— Ами с Лу спустятся девой и мужем на Землю утренней звездой.\",\r\n\t\t\tsomeone2, \"— Ами разделит свой свет на крылатых человеко-подобных существ.\",\r\n\t \t\tscene, {image: \"luandami2.png\", position: Center},\r\n\t\t\tsomeone2, \"— Чтобы контролировать и оберегать жизнь людей.\",\r\n\t\t\t\r\n\t\t\tsomeone2, \"— Лу же взял на себя обязанности после смерти.\",\r\n\t\t\tsomeone2, \"— Он присматривает за смертными в своём огненном царстве.\",\r\n\t\t\tsomeone2, \"...\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"neos1.png\", position: Center},\r\n\t\t\t\r\n\t\t\tsomeone2, \"— Неос была с трудным характером.\",\r\n\t\t\tsomeone2, \"— Но она просто хочет понять, что не так...\",\r\n\t \t\tscene, {image: \"neos2.png\", position: Center},\r\n\t\t\tsomeone2, \"— Отчаявшись найти Создателя в одной вселенной, она отправилась в другие.\",\r\n\t\t\tsomeone2, \"— И теперь люди гадают, действительно ли работает теория мультивселенных.\",\r\n\t\t\tsomeone2, \"...\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"gelious1.png\", position: Center},\r\n\t\t\t\r\n\t\t\tsomeone2, \"— Гелиос же решился на очень отважный поступок.\",\r\n\t\t\tsomeone2, \"— Пытаясь защитить живые существа против Тьмы, он понял, насколько мало Света вокруг...\",\r\n\t \t\tscene, {image: \"gelious2.png\", position: Center},\r\n\t\t\tsomeone2, \"— И он сам стал этим светом, обернувшись в яркий шар света — Солнце.\",\r\n\t\t\tsomeone2, \"— Испуская свет в разные стороны, Гелиос освещает вселенную...\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t \r\n\t\t\tsomeone2, \"— ...\",\r\n\t\t\tsomeone2, \"— Герои разбрелись в разные стороны, но Тьма не дремлет.\",\r\n\t\t\tsomeone2, \"— Героям удалось отпугнуть её, но она всё ещё существует.\",\r\n\t\t\tsomeone2, \"— И существует она в их сердцах.\",\r\n\t\t\tsomeone2, \"— И пускай они разошлись своими путями, им предстоит ещё встретиться с Тьмой прямо у себя под носом.\",\r\n\t\t\t\r\n\t\t\tsomeone2, \"— ...\",\r\n\t\t\tcreator, \"— Ведь это я их такими создал.\",\r\n\t\t\tcreator, \"— Именно Тьма внутри наших сердец мешает нам услышать других.\",\r\n\t\t\tcreator, \"— Увидеть наши светлые души...\",\r\n\t\t\tcreator, \"— Понять и принять.\",\r\n\t\t\t\r\n\t\t\tcreator, \"— Теперь герои заняты — присматривают за Вами, людьми.\",\r\n\t\t\tcreator, \"— Но Вселенская Тьма всё ещё рядом.\",\r\n\t\t\tcreator, \"— 2020 по Григорианскому календарю год может стать губительным.\",\r\n\t\t\tcreator, \"— Удачи вам всем.\",\r\n\t\t\t\r\n\t\t\tphoto, {image: \"2-2.png\", position: upperCenter},\r\n\t\t\tn, \"— Вы прошли игру на 2/3 звёзд.\",\r\n\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Частичная победа.\",\r\n\t\t\t\t\"Перейти в конец.\", [jump, \"lastlabel\"],\r\n\t\t\t],\r\n\t\t\t\r\n\t\tlabel, \"WellEnding2\",\t\r\n\t\t\t\r\n\t\t\tscene, \"\",\r\n\t\t\t\r\n\t\trealist, {image: \"realist3.png\", position: leftMiddleSide},\t\r\n\t\t\trealist, \"— Но я не хочу верить этому.\",\r\n\t\t\trealist, \"— Зачем ему понадобилось это всё?!\",\r\n\t\tskeptic,{image: \"skeptic2.png\", position: rightMiddleSide},\t\r\n\t\t\tskeptic, \"— Согласен, это просто смертельная игра.\",\r\n\t\toptimist, {image: \"optimist.png\", position: leftSide},\t\r\n\t\t\toptimist, \"— Не надо так о Создателе!\",\r\n\t\t\toptimist, \"— Никто даже не погиб.\",\r\n\t\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\t\r\n\t\t\tdreamer, \"— Она права!\",\r\n\t\t\tdreamer, \"— Выстояли сейчас, сможем и потом.\",\r\n\t\trealist, {image: \"realist3.png\", position: leftMiddleSide},\t\r\n\t\t\tn, \"*Гелиос саркастически поднял брови*\",\r\n\t\t\trealist, \"— Да, конечно.\",\r\n\t\t\t\r\n\t\t\tskeptic, \"— Издеваетесь? Нас чуть живьем не поглотили!\",\r\n\t\t\tdreamer, \"— Перестань орать, скептик несчастный!\",\r\n\t\t\tskeptic, \"— Что ты мне ска...\",\r\n\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\taudio, {src: \"bensound-tomorrow\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\tdark, {image: \"dark.png\", position: upperCenter},\t\r\n\t\t\tdark, \"*приглушённо* — шшшш....\",\r\n\t\t\tdark, \" ......\",\r\n\t\t\r\n\t\t\tn, \"— ...\",\r\n\t\t\tn, \"— Ваши споры и ругань дали возможность Тьме подкрастаться незаметно.\",\r\n\t\t\tn, \"— Тьма поглотила вас.\",\r\n\t\t\tn, \"— В общем-то...\",\r\n\t\t\tphoto, {image: \"1-1.png\", position: upperCenter},\r\n\t\t\tn, \"— ...вам пришел конец.\",\r\n\t\t\tn, \"— Вы удалось прийти игру только на 1/3 звёзд.\",\r\n\t\t\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\"Ну ничего страшного.\",\r\n\t\t\t\"Перейти в конец.\", [jump, \"lastlabel\"],\r\n\t\t\t],\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\tlabel, \"mainBattleRight6\",\r\n\t\taudio, {src: \"bensound-memories\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\r\n\t\t\tscene, \"\", \r\n\t\t\t\r\n\t\t\tn, \"...\", \r\n\t\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\r\n\t\t\tdreamer, \"— ...а?\",\r\n\t\t\tdreamer, \"— Оно... оно кончилось?\",\r\n\t\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\t\r\n\t\t\toptimist, \"— ...кажется, да\",\r\n\t\t\t\r\n\t\trealist, {image: \"realist0.png\", position: Center},\t\t\r\n\t\t\trealist, \"— Вот это было жёстко, конечно...\",\r\n\t\t\trealist, \"— Столько взаимодействия командного, вот это у нас сплочённость!\",\r\n\t\t\t\r\n\t\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\t\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\t\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\t\t\t\r\n\t\t\tn, \"*Всё медленно расслабляются, не веря в свою победу*\", \r\n\t\tskeptic,{image: \"skeptic3.png\", position: leftMiddleSide},\t\r\n\t\t\tn, \"*Лу медленно выдыхает*\", \r\n\t\t\tskeptic, \"— Как же хорошо, что всё это кончилось...\",\r\n\t\t\r\n\t\tskeptic,{image: \"skeptic.png\", position: rightMiddleSide},\r\n\t\t\tskeptic, \"— У меня есть только один вопрос...\",\r\n\t\t\tskeptic, \"— Это существо... оно состоит не из света.\",\r\n\t\t\tskeptic, \"— Откуда оно взялось и зачем?\",\r\n\t\t\r\n\t\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\t\r\n\t\trealist, {image: \"realist4.png\", position: leftMiddleSide},\t\r\n\t\t\trealist, \"— Предлагаю узнать прямо сейчас.\",\r\n\t\t\tn, \"Гелиос складывает руки в молитвенной позе.\",\r\n\t\t\tn, \"Яркий свет отражался сквозь его полу-закрытые глаза.\",\r\n\t\t\tn, \"Гелиос засиял. Связь была установлена.\",\r\n\t\t\r\n\t\tlabel, \"mainEnding0\",\r\n\t\t\r\n\t\t\tmenu, [\r\n\t\t\t\t\"Призвать Создателя.\",\r\n\t\t\t\t\"Прочитать молитву.\", [jump, \"mainEnding1\"],\r\n\t\t\t],\r\n\t\t\r\n\t\t\r\n\t\tlabel, \"mainEnding1\",\r\n\t\t\r\n\t\t\r\n\t\taudio, {src: \"piano\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\r\n\t\tscene, \"\",\r\n\t\tn, \"...\", \r\n\t\tn, \"Неожиданно, послышался невероятно спокойный, мягкий голос, сразу со всех сторон.\", \r\n\t\tn, \"Как будто его источник был везде.\", \r\n\t\tcreator, \"Sit vis vobiscum.\",\r\n\t\tcreator, \"...Приветствую вас.\",\r\n\tskeptic,{image: \"skeptic3.png\", position: leftMiddleSide},\t\r\n\t\tskeptic, \"— Кхм...\",\r\n\tskeptic,{image: \"empty.png\", position: leftMiddleSide},\t\r\n\tdreamer, {image: \"dreamer3.png\", position: leftMiddleSide},\r\n\t\tdreamer, \"— Создатель!\",\r\n\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\t\r\n\t\tdreamer, \"— Скажи, зачем существовало это... <i>Оно</i>...?\",\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\t\r\n\trealist, {image: \"realist0.png\", position: leftMiddleSide},\r\n\t\trealist, \"*напряжён*\",\r\n\trealist, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\t\r\n\t\r\n\t\tcreator, \"— ...\",\r\n\t\tcreator, \"— ...Видите-ли.\",\r\n\t\tcreator, \"— ...Эта <i>Тьма</i> — ваша персональная борьба.\",\r\n\toptimist, {image: \"optimist.png\", position: leftMiddleSide},\t\r\n\t\toptimist, \"— ...но зачем?\",\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\t\r\n\t\tcreator, \"— ...Для меня нет возможности создавать себе подобных, милые мои создания.\",\r\n\t\tcreator, \"— ..И только сами вы можете не воссоединиться со мной, но стать, как я, пройдя свой путь..\",\r\n\t\tcreator, \"— ...Вы победили Тьму ради других, но главное — вы победили её в себе.\",\r\n\t\tcreator, \"— ...И это был первый шаг к вашему пониманию сути бытия.\",\r\n\t\tcreator, \"— ...Светославляю вас...\",\r\n\t\t\r\n\tdreamer, {image: \"dreamer.png\", position: rightMiddleSide},\t\r\n\t\tdreamer, \"— ...Но создатель? Что нам делать теперь?\",\r\n\tdreamer, {image: \"empty.png\", position: rightMiddleSide},\t\t\r\n\t\tn, \"*Создатель загадочно улыбается*\",\r\n\t\tcreator, \"— ...На самом деле вы всегда знали, что делать.\",\r\n\t\tcreator, \"— ...\",\r\n\t\tsomeone2, \"— .........\",\r\n\t\t\r\n\t\tlabel, \"mainEnding2\",\r\n\t\t\r\n\tdreamer, {image: \"dreamer2.png\", position: leftMiddleSide},\t\r\n\t\tdreamer, \"— ...\",\r\n\toptimist, {image: \"optimist.png\", position: rightMiddleSide},\t\r\n\t\toptimist, \"— Невероятно, конечно.\",\r\n\trealist, {image: \"realist0.png\", position: leftSide},\t\r\n\t\tn, \"*Гелиос вздыхает*\",\r\n\tskeptic,{image: \"skeptic2.png\", position: rightSide},\t\r\n\t\tskeptic, \"— Получается, нам всем нужно разойтись своим путём?\",\r\n\t\r\n\t\trealist, \"— Да.\",\r\n\t\trealist, \"— Вы прекрасно знаете, что теперь нужно делать.\",\r\n\r\n\tdreamer, {image: \"empty.png\", position: rightSide},\t\r\n\tskeptic,{image: \"empty.png\", position: rightMiddleSide},\r\n\toptimist, {image: \"empty.png\", position: leftMiddleSide},\r\n\trealist, {image: \"empty.png\", position: leftSide},\r\n\t\r\n\t\tn, \"*Произошли коллективные объятья. Без выбора*\", \r\n\t\t\r\n\t\tskeptic, \"Тогда прощаемся...\",\r\n\t\tskeptic, \"Теперь мы должны защищать людей от Тьмы..\",\r\n\t\t\r\n\t\tscene, \"\",\r\n\t\tskeptic, \"*Ярким светом сбрасывает себя на Землю вместе с Ами*\",\r\n\t\t\r\n\t\tscene, \"\",\r\n\t\tdreamer, \"*Выходит из за пределы галактических пространств в параллельную вселенную.*\",\r\n\t\t\r\n\t\tn, \"...\",\r\n\t\trealist, \"— ...\",\r\n\trealist, {image: \"realist.png\", position: Center},\r\n\t\trealist, \"— Хей.\",\r\n\t\trealist, \"— Надеюсь, ты понимаешь, для чего тебе всё это было показано.\",\r\n\r\n\t\trealist, \"— Будь осторожен. Тьма среди людей всё ещё существует.\",\r\n\t\trealist, \"— ...\",\r\n\t\trealist, \"— ...Я всегда буду рядом с тобой, светить для тебя.\",\r\n\trealist, {image: \"empty.png\", position: leftSide},\t\r\n\t\tn, \"*Гелиос ушёл*\",\r\n\t\t\r\n\t\tsomeone2, \"— ...\",\r\n\t\tsomeone2, \"— ...\",\r\n\t\t\tsomeone2, \"— Герои разбрелись в разные стороны.\",\r\n\t\t\tsomeone2, \"— Их путь великий и прекрасный.\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"luandami1.png\", position: Center},\r\n\t\t\t\r\n\t\t\tsomeone2, \"— Ами с Лу спустятся девой и мужем на Землю утренней звездой.\",\r\n\t\t\tsomeone2, \"— Ами разделит свой свет на крылатых человеко-подобных существ.\",\r\n\t \t\tscene, {image: \"luandami2.png\", position: Center},\r\n\t\t\tsomeone2, \"— Чтобы контролировать и оберегать жизнь людей.\",\r\n\t\t\t\r\n\t\t\tsomeone2, \"— Лу же взял на себя обязанности после смерти.\",\r\n\t\t\tsomeone2, \"— Он присматривает за смертными в своём огненном царстве.\",\r\n\t\t\tsomeone2, \"...\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"neos1.png\", position: Center},\r\n\t\t\t\r\n\t\t\tsomeone2, \"— Неос была с трудным характером.\",\r\n\t\t\tsomeone2, \"— Но она просто хочет понять, что не так...\",\r\n\t \t\tscene, {image: \"neos2.png\", position: Center},\r\n\t\t\tsomeone2, \"— Отчаявшись найти Создателя в одной вселенной, она отправилась в другие.\",\r\n\t\t\tsomeone2, \"— И теперь люди гадают, действительно ли работает теория мультивселенных.\",\r\n\t\t\tsomeone2, \"...\",\r\n\t\t\t\r\n\t\t\tscene, {image: \"gelious1.png\", position: Center},\r\n\t\t\t\r\n\t\t\tsomeone2, \"— Гелиос же решился на очень отважный поступок.\",\r\n\t\t\tsomeone2, \"— Пытаясь защитить живые существа против Тьмы, он понял, насколько мало Света вокруг...\",\r\n\t \t\tscene, {image: \"gelious2.png\", position: Center},\r\n\t\t\tsomeone2, \"— И он сам стал этим светом, обернувшись в яркий шар света — Солнце.\",\r\n\t\t\tsomeone2, \"— Испуская свет в разные стороны, Гелиос освещает вселенную...\",\r\n\t\t\tscene, {image: \"empty.png\", position: Center},\r\n\t\t\tsomeone2, \"— ...\",\r\n\t\t\tsomeone2, \"— Героям удалось победить Тьму, но она всё ещё существует.\",\r\n\t\t\tsomeone2, \"— И существует она в сердцах всего живого.\",\r\n\t\t\tsomeone2, \"— ...\",\r\n\t\t\t\r\n\t\t\tsomeone2, \"— ...\",\r\n\t\t\tcreator, \"— Ведь это я их такими создал.\",\r\n\t\t\tcreator, \"— Именно Тьма внутри наших сердец мешает нам услышать других.\",\r\n\t\t\tcreator, \"— Увидеть наши светлые души.\",\r\n\t\t\tcreator, \"— Понять и принять...\",\r\n\t\t\t\r\n\t\t\tcreator, \"— 4 героя Света теперь заняты — присматривают за Вами, людьми.\",\r\n\t\t\tcreator, \"— Но Вселенская Тьма всё ещё рядом.\",\r\n\t\t\tcreator, \"— 2020 по Григорианскому календарю год может стать губительным.\",\r\n\t\t\tcreator, \"— Удачи вам всем.\",\r\n\t\t\r\n\t\tn, \"— ...\",\r\n\t\tphoto, {image: \"3-3.png\", position: upperCenter},\r\n\t\tn, \"— Поздравляем!.\",\r\n\t\tn, \"— Вы прошли игру на 3/3 звёзд.\",\r\n\t\t\r\n\t\tmenu, [\r\n\t\t\t\"Победа.\",\r\n\t\t\t\"Перейти в конец.\", [jump, \"lastlabel\"],\r\n\t\t],\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tlabel, \"lastlabel\",\r\n\t\t\t\r\n\t\t\taudio, {src: \"bensound-memories\", format: [\"mp3\"], action: \"play\"},\r\n\t\t\tn, \"...\",\r\n\t\t\tn, \"Поздравляем вас с успешным (или не очень) прохождением игры.\",\r\n\t\t\tn, \"Мы очень надеемся, что вам она понравилась.\",\r\n\t\t\tn, \"Перед тем, как закончить, пожалуйста, пройдите небольшой опросник об игре, а после вернитесь на readymag, чтобы посмотреть интервью с разработчиками\",\r\n\t\t\t\r\n\t\tlionText, {\r\n width: 0.6, color: \"grey\", border: \"1px solid grey\",\r\n backgroundColor: \"#2E3540\",\r\n position: new Position(0.20, 0.3), align: \"wenter\",\r\n visibility: \"visible\",\r\n text:\"Пожалуйста, пройдите небольшой опросник об игре: <a href='https://forms.gle/rQmxfJ2UVu1t2SzT9' style='color:white'> Google Forms</a>\"},\r\n\t\t\t\r\n\t\t\tn, \"Ещё раз спасибо <3.\",\r\n\t\t\tn, \"Перепройти игру?\",\r\n\t\t\r\n\t\t\r\n ];\r\n}", "function drawEnterText() {\n push();\n textAlign(CENTER);\n textFont(fontChangaBold);\n fill(hexDark[3]);\n stroke(hexDark[0]);\n strokeWeight(3);\n textSize(22);\n if( adventureManager.getStateName() === \"Brothel\") {\n text('Press [E] to exit', playerSprite.position.x, playerSprite.position.y - playerSpriteH - 100);\n }\n else {\n text('Press [E] to enter', playerSprite.position.x, playerSprite.position.y - playerSpriteH - 50);\n }\n pop();\n}", "function displayGameover() {\n\t$btnStart.innerHTML = \"RESTART\";\n\tif (modeGOT) {\n\t\t$txt.style.color = \"skyblue\";\n\t\t$txt.innerHTML = \"V. Morghulis\".toUpperCase();\n\t\t$gotOstMain.pause();\n\t\t$gotOstGameover.play();\n\t} else {\n\t\t$txt.style.color = \"red\";\n\t\t$txt.innerHTML = \"Oh non...\".toUpperCase();\n\t\t$ostMain.pause();\n\t\t$ostGameover.play();\n\t}\n}", "function displayGameover(context) {\n context.save();\n context.font = 'bold 30pt Helvetica';\n context.fillText(\"GAME OVER!!\", 125, 250);\n context.font = '20pt Helvetica';\n context.fillText(\"Click to Restart\", 165, 150);\n context.restore();\n }", "function startScreen() {\n background('#d7c3d7');\n textSize(32);\n fill(255);\n text('welcome to the catching bug game', width / 2 - 140, height / 2 + 10);\n textSize(24);\n \n text('up arrow =', width / 2 - 215, height / 2 + 70);\n image(player1, width / 2 - 200, height / 2 + 75, 100, 100);\n \n text('down arrow =', width / 2 - 315, height / 2 + 170);\n image(player2, width / 2 - 315, height / 2 + 175, 100, 100);\n\n //title \n textSize(48);\n fill(255);\n text('Catch le Bugs!', width / 2 - 160, height / 2 - 150);\n image(bees, width / 2 - 230, height / 2 - 150, 50, 50);\n image(ladybug, width / 2 - 180, height / 2 - 160, 50, 50);\n image(butterfly, width- 180, height- 160, 50, 50);\n image(dragonfly, width- 140, height- 110, 50, 50);\n\n \n\n} // initialize the start screen upon starting the code.", "function C005_GymClass_Outro_Run() {\n\t\n\t// Paints the background\n\tDrawRect(0, 0, 800, 600, \"black\");\n\tDrawImage(CurrentChapter + \"/\" + CurrentScreen + \"/Bell.jpg\", 800, 0);\n\t\t\n\t// Draw the outro text\n\tDrawText(GetText(\"Outro1\"), 400, 200, \"White\");\n\tif (TextPhase >= 1) DrawText(GetText(\"Outro2\"), 400, 400, \"White\");\n\n}", "function displayWin() {\n\tif (modeGOT) {\n\t\t$txt.style.color = \"skyblue\";\n\t\t$txt.innerHTML = \"Frog King\".toUpperCase();\n\t\t$gotOstMain.pause();\n\t} else {\n\t\t$txt.style.color = \"green\";\n\t\t$txt.innerHTML = \"Bravo !\".toUpperCase();\n\t\t$ostMain.pause();\n\t}\n\t$ostWin.play();\n}", "function draw() {\n\n if (currentSetting == \"home\") {\n background(\"purple\");\n image(couch, 140, 200);\n image(box, 130, 220);\n image(drben1, 230, 220);\n image(radio, 260, 350);\n } else if (currentSetting == \"office\") {\n background(\"gray\");\n image(drben2, 200, 200);\n } else if (currentSetting == \"lab\") {\n background(\"lightblue\");\n image(table, 200, 320);\n image(drben3, 300, 200);\n image(boozy, 180, 230);\n fill(\"#C0C0C0\");\n noStroke();\n rect(0, 600, width, 400);\n }\n\n textSize(40);\n textAlign(CENTER, CENTER);\n textFont(\"georgia\");\n text(story, 300, 100, width / 2);\n\n //instructions\n textSize(20);\n fill('white');\n text(\"Click mouse to continue story\", 50, 70, 100);\n}", "function drawWin() {\n togglePause();\n ctx.font = '45px Ubuntu';\n ctx.strokeStyle = '#FF6600';\n ctx.textAlign = 'center';\n ctx.strokeText('You win!', canvas.width / 2, canvas.height / 2)\n}", "function printWelcomeMessage(){\r\n console.log(figlet.textSync('Hang Man!', {\r\n font: 'Standard'\r\n })\r\n ); \r\n}", "function doSetupTitleScreenLevelContinue(){\tLoadGame();}", "function displayMainMenu() {\n push();\n textSize(28);\n fill(255, mainMenuFontAlpha); // changing opacity\n text(\"SPECIAL EPISODE: THE CUBE\", width / 2, height - height / 8);\n textSize(64);\n // if title is fading in\n if (!titleFadeAway) {\n // opacity transition from 0 to 255\n mainMenuFontAlpha = lerp(mainMenuFontAlpha, 255, 0.05);\n // height transition from bottom to the center\n mainMenuFontHeight = lerp(mainMenuFontHeight, height / 2 - height / 8, 0.05);\n // if title is fading out\n } else {\n // opacity transition from 255 to 0\n mainMenuFontAlpha = lerp(mainMenuFontAlpha, 0, 0.05);\n // height transition from center to the bottom\n mainMenuFontHeight = lerp(mainMenuFontHeight, height + height / 8, 0.03);\n }\n // fill the title with changing opacity\n fill(127, 255, 212, mainMenuFontAlpha);\n text(\"QUESTIONABLE\\nLOGIC\", width / 2, mainMenuFontHeight);\n // if the opacity is >= 210 and do this only once\n if (mainMenuFontAlpha >= 210 && doOnce) {\n // create a start button\n var $button = $(\"<div class='button' id = 'title-button'></div>\").text(\"start\").button().click(function() {\n titleFadeAway = true;\n $('#title-button').remove();\n SOUND_LOW_PIANO_KEY.play();\n }).hide().fadeIn(500);\n $body.append($button);\n doOnce = false; // once it's done, don't create any more buttons\n }\n // if player clicks the start button and the opacity is less than 10\n // change to tutorial/letter\n if (titleFadeAway && mainMenuFontAlpha <= 10) {\n state = \"TUTORIAL\"; // to the next state\n doOnce = true; // reset doOnce\n }\n pop();\n}", "function title(){\n ctx.font=getFont();\n ctx.fillStyle = \"#7f7e7e\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"TIC TAC TOE\", canvas.width/2,canvas.height/15); //pavadinimas\n }", "function Controls() {\n push();\n //defining location for mouse coordinates to show the text\n //(when the mouse is located inside the frame)\n if (mouseX>innerWidth/2 - 300 && mouseX<innerWidth/2 + 300 && mouseY>innerHeight/2 - 300 && mouseY<innerHeight/2 + 300) {\n textSize (28);\n fill(50, 50, 50);\n //draws text underneath the frame \n text(\"Slide to change scaling\", innerWidth/2 - 160, innerHeight/2 + 390);\n text(\"Hold '↑' or '↓' to change speed\", innerWidth/2 - 160, innerHeight/2 + 420);\n text(\"Press 'C' to clean\", innerWidth/2 - 160, innerHeight/2 + 450);\n text(\"Press 'F' when satisfied\", innerWidth/2 - 160, innerHeight/2 + 480);\n pop();\n }\n}", "function gameStart() {\n middleText.innerText = 'This is a game of Rock, Paper, Scissors. Winner is the first to 5. Go!';\n}", "function instructions() {\n stroke('Black'); fill('White')\n textSize(15)\n const thecopy = `The Chaos Game! by Daniel Reeves and Cantor Soule-Reeves\n\nDrawing with math ${\" \".repeat(35)} (${width}x${height} pixels)\n${noa} attractors, ` +\n`${hub===1 ? \"w/\" : \"w/o\"} a hub, ` +\n`excluding ${cac}, partial teleport ${fracify(pat)}\n\n• SPACE to toggle hyperspeed ⟶\n• CLICK (or R) for new fractal\n• G to regenerate (or 1/2/3/etc for other color schemes)`\n/*\n N to refresh everything but number of attractors\n H to refresh everything but whether there's a hub\n P to refresh everything but the partial teleport\n*/\n text(thecopy, 5, 15)\n const baretitle = rawnamify(noa, hub, cac, pat)\n let title = titlehash[baretitle]\n if (title === undefined) title = `untitled ${baretitle}`\n fill(1, 0, .3); textSize(width < 500 ? 37 :\n width < 640 ? 65 :\n width < 800 ? 68 :\n width < 1000 ? 70 :\n width < 2000 ? 100 : \n width < 3000 ? 150 : 300)\n push()\n textAlign(LEFT, TOP)\n text(`“${title}”`, 5, 160, width-10, height-160)\n pop()\n}", "function draw(){\n background('#BAE1FF'); //powder blue\n rect(20,100,400,400,20);\n //STATS:\n textSize(32); //size\n fill(150, 102, 153); //color of words\n text(`Happiness: ${stat.love}`, 10, 60); //string and position\n textSize(32); //size\n text(`Cleanliness: ${stat.hygiene}`, 10, 90); //string and position\n fill(150, 102, 153); //color of words\n textSize(32); //size\n text(`Hunger: ${stat.food}`, 10, 30); //string and position\n fill(150, 102, 153); //color of word\n fill(150, 102, 153); //color of word\n text(`ATLS 3300 - Object`, 300, 30); //string and position\n\n //Instructions\n textSize(30); //size\n fill(150, 102, 153); //color of words\n text(`Scan a plushy to take care of Mimitchi!`, 450, 150); //string and position\n textSize(30); //size\n text(`Cake: Feed Mimitchi`, 450, 200); //string and position\n text(`Duck Ring: Clean Mimitchi`, 450, 250); //string and position\n text(`Heart: Pet Mimitchi`, 450, 310); //string and position\n \n translate(80, 150);\n getAnimation();\n}", "startGame() {\n overlay.style.display = 'none';\n this.activePhrase = this.getRandomPhrase();\n this.activePhrase.addPhraseToDisplay();\n }", "function final() {\n character.say(\"Good, thank you!\")\n var win = Scene.createTextBillboard(0, 5, 3);\n win.setText(\"Awesome job!\");\n }", "function initHelpTxtPos() {\n\tdesign = mapConfig['menuDesign'];\n\n\tif (design == \"topMenu\") {\n\t\tinitHelpTextTopMenu();\n\t} else {\n\t\tinitHelpTextSideMenu();\n\t}\n}", "function title() {\n //Intro title 1\n if (introState === 0) {\n displayIntroTitle();\n }\n else if(introState === 1) {\n image(imgIntro1, 0, 0,1360,840); //Introduction story image 1\n //Play background music in a loop when loaded\n if (bgMusic.isPlaying() === false) {\n bgMusic.loop();\n }\n }\n else if(introState === 2) {\n image(imgIntro2, 0, 0,1360,840); //Introduction story image 2\n if (bgMusic.isPlaying() === false) {\n bgMusic.loop();\n }\n }\n else if(introState === 3) {\n image(imgIntro3, 0, 0,1360,840); //Introduction story image 3\n if (bgMusic.isPlaying() === false) {\n bgMusic.loop();\n }\n }\n else if(introState === 4) {\n push();\n imageMode(CENTER);\n image(imgIntro4, width/2, height/2+200,250,140); //Introduction story image 4\n pop();\n //Instructions screen\n fill(255); //white\n displayText(`Use the arrow keys to move Antonio!\n 1. Avoid the grey rocks\n 2. Gather 500 points before time runs out!`);\n if (bgMusic.isPlaying() === false) {\n bgMusic.loop();\n }\n }\n else {\n state =`simulation`;\n }\n}", "function startScreen() {\n // variables set up the paragraphs of instruction text\n var gameTitle = \"Revenge of the Bears\"\n var introText = \"These hikers just won't stop running through your woods. What's a bear to do? Try to catch all four! Use the keys below to move the bear. For an extra challenge, try to stay on the trail.\";\n var pressP = \"Press P when you're ready to to play.\"\n var controlKeys = \"A = Left D = Right W = Up S = Down\"\n\n // set background color and add the bear icon\n background(BG_COLOR);\n drawBear(CANVAS_WIDTH / 2, CANVAS_HEIGHT / 6);\n\n // title font and style\n textSize(78);\n fill('black');\n textAlign(CENTER);\n textFont('Chiller');\n text(gameTitle, CANVAS_WIDTH / 2, CANVAS_HEIGHT / 3);\n\n // instruction font and styles\n textSize(26);\n textFont('Garamond');\n text(introText, CANVAS_WIDTH / 5.25, CANVAS_HEIGHT / 2.75, 500, 500); // Text wraps within text box\n textStyle(BOLD);\n text(controlKeys, CANVAS_WIDTH / 2, CANVAS_HEIGHT / 1.65);\n text(pressP, CANVAS_WIDTH / 2, CANVAS_HEIGHT / 1.5); // Text wraps within text box\n}", "startTextMode() {\n if (this.getCurrentState() !== states.TEXT) {\n this._state = states.TEXT;\n\n this._getModule(modules.TEXT).start({\n mousedown: this._onFabricMouseDown.bind(this),\n select: this._onFabricSelect.bind(this),\n selectClear: this._onFabricSelectClear.bind(this),\n dbclick: this._onDBClick.bind(this),\n remove: this._handlers.removedObject\n });\n }\n }", "gameOver() {\n this.ctx.font = \"50px serif\";\n this.ctx.fillText(\"Game Over\", 300, 90);\n }", "startGame() {\r\n const phrase = this.getRandomPhrase();\r\n this.activePhrase = phrase;\r\n phrase.addPhraseToDisplay();\r\n document.getElementById('overlay').style.display = 'none'; // hide the start screen.\r\n }", "function drawIntro() {\n\n // 015 creamos el botón exactamente donde se sitúa el texto y lo ponemos más arriba (se sitúa debajo del punto 014)\n fill(255, 0, 0);\n ellipse(startCenterX, startCenterY, startButtonSize, startButtonSize);\n // 014 especificaciones de la pantalla intro\n fill(255);\n noStroke();\n text(\"Would you like to \\nplay a game ?\", 0, 0, width, height -100);\n text(\"YES\", 0, 450, width, 50);\n\n // 016 escribir el código parael botón\n\n //var d = dist(mouse);\n}", "function gameovertext(to)\n{\n\tdrawDoubleText(\"game over\", \"gold\", \"silver\", \"78px serif\", g_canvas.width/2, 200);\n\n\tctx.save();\n\tctx.fillStyle =\"black\";\n\tctx.fillRect(400,400,100,300);\n\tctx.restore();\n\ttextlines(400,410);\n\n\tif(playmode==2 ||playmode==1 ) {\n\t\tvar templayer =0;\n\n\t\tif(to ==1) templayer=2;\n\n\t\tif(to ==2) templayer=1;\n\n\t\tdrawDoubleText(\"player \" + templayer + \" has WON\", \"gold\", \"silver\", \"78px serif\", g_canvas.width/2, 350);\n\t}\n}", "function OnGUI() {\n\t\n\n // Show player score in white on the top left of the screen\n GUI.color = Color.white; \n GUI.skin.label.alignment = TextAnchor.MiddleCenter;\n GUI.skin.label.fontSize = 50;\n GUI.skin.label.fontStyle = FontStyle.Bold;\n \n\n var message : String;\n GUI.color = Color.white;\n GUI.skin.label.fontSize = 35;\n message = \"The people that said you were crazy \\n will be shouting your name in the streets \\n because against all odds...\";\n GUI.Label(new Rect(0,Screen.height/ 9f, Screen.width +30,120), message);\n GUI.skin.label.fontSize = 50;\n GUI.Label(new Rect(0,Screen.height/ 4f + 50,Screen.width,90), \"You Saved the World!\");\n GUI.skin.label.fontSize = 35;\n GUI.Label(new Rect(0,Screen.height/ 4f + 100f,Screen.width,150), \"High Score: Complete\");\n GUI.Label(new Rect(0,80,Screen.width,Screen.height+200),\"Press Enter to restart on Level 2\");\n }", "function winScreen() {\n push();\n textSize(30);\n fill(235, 216, 52);\n stroke(0);\n strokeWeight(5);\n textAlign(CENTER, CENTER);\n text(`You were correct enough times`, width / 2, height / 2);\n pop();\n}", "startGame(){\n\t\tconst divOverlay = document.getElementById('overlay')\n \t\tif (divOverlay.className === 'lose' || divOverlay.className === 'win'){\n \t\t\tconsole.log('Reset', divOverlay)\n \t\t\tthis.gameReset()\n \t\t}\n\n \t\tthis.createPhrases();\n \t\tdivOverlay.style.display = 'None'\n \t\tthis.activePhrase = this.getRandomPhrase();\n \t\tthis.activePhrase.addPhraseToDisplay();\n \t}", "function Wl() {\n var a = getMainNamespace();\n if (a.Dc.Pa().Ve) {\n // \"Press SPACE (s) to begin execution\"\n renderTextToCanvas(a, a.fh, Gg().vg)\n } else {\n // \"Press SPACE (s) to resume execution\"\n renderTextToCanvas(a, a.eh, Gg().vg)\n }\n // TODO: probably should be called isPaused\n a.isPlaying || renderNextFrame(a)\n }", "function showMoveText(inversion: int) {\n\tvar tutorialObject = new GameObject();\n\tvar tutorialScript = tutorialObject.AddComponent(\"tutorial\");\n\ttutorialScript.transform.parent = tutorialFolder.transform;\n\ttutorialScript.name = \"tutorial\";\n\t\n\tif(inversion==1) {\n\t\tvar GreenButtons = Instantiate(Resources.Load(\"Prefabs/greenDirections\", GameObject)) as GameObject;\n\t\tGreenButtons.transform.parent = tutorialScript.gameObject.transform;\n\t\tGreenButtons.transform.position = Vector3(GreenChar.transform.position.x,GreenChar.transform.position.y,-.001);\n\t} else if(inversion==2) {\n\t\tvar PurpleButtons = Instantiate(Resources.Load(\"Prefabs/purpleDirections\", GameObject)) as GameObject;\n\t\tPurpleButtons.transform.parent = tutorialScript.gameObject.transform;\n\t\tPurpleButtons.transform.position = Vector3(PurpleChar.transform.position.x,PurpleChar.transform.position.y,-.001);\n\t}\n}", "function gameInitial(){\n // game title\n let title = new LTextField();\n title.size = 30;\n title.text = '是男人就下100层';\n title.x = (LGlobal.width - title.getWidth())/2;\n title.y = 100;\n \n title.color = '#ffffff';\n \n \n backLayer.addChild(title);\n\n // show the instro text\n backLayer.graphics.drawRect(1,'#ffffff',\n [(LGlobal.width - 220 )/2,240,220,40]);\n\n // add start button\n let textClick = new LTextField();\n textClick.size = 18;\n textClick.color = '#ffffff';\n textClick.text = '点击开始';\n textClick.x = (LGlobal.width - textClick.getWidth())/2;\n textClick.y = 250;\n\n backLayer.addChild(textClick);\n\n // add click event, click the rect of text named 'start',\n // and start game\n backLayer.addEventListener(LMouseEvent.MOUSE_UP, gameStart);\n}", "startGame() {\r\n document.getElementById('overlay').style.display = 'none';\r\n this.activePhrase = this.getRandomPhrase();\r\n this.activePhrase.addPhraseToDisplay();\r\n }", "function drawText() {\n fill(255);\n //UPPER TEXT\n if (window.innerWidth <= 500) {\n textSize(16);\n } else {\n textSize(32);\n }\n textAlign(RIGHT);\n text(label, window.innerWidth - 50, 100);\n textAlign(LEFT);\n text(`${onlineNumber} friends online`, 50, 100);\n\n //MIDDLE TEXT\n if (window.innerWidth <= 500) {\n textSize(56);\n } else if (window.innerWidth > 500 && window.innderWidth <= 1080) {\n textSize(80);\n } else {\n textSize(140);\n }\n textAlign(CENTER, CENTER);\n textFont(\"Helvetica\");\n textStyle(BOLD);\n text(\n `WHEN ${onlineNumber} OF US LAUGH TOGETHER`,\n 50,\n 0,\n window.innerWidth - 100,\n window.innerHeight - 50\n );\n}", "function instruction() {\n fill(255);\n textSize(20);\n text(\"Press [s] to go back to splash page.\", width - 125, offset + 25 , 200, 100);\n text(\"Press [r] to go look at the regulations page again.\", width - 125, 50 + offset + 50, 200, 100);\n noFill();\n strokeWeight(3);\n rect(width - 125, offset*2, 200, 200, 10);\n}", "function instructions(){\n // \\n for a new line in the text, extra lines are concatenated on the end with \"+\"\n alert(\"Choose your name, then click start, then click on the planet/moon you want to go to or press a number from 1 to 8\\n\\n\"+\n \"Arrow keys or WASD to move\\nT to toggle force arrow visibility\\nR to restart\\nM to go to the menu screen\\nNever gonna press Q key\\n\"+\n \"In free flight mode you can press '+' or '-' to increase or decrease the gravity\\n\\n\"+\n \"Remember to land the lander gently\\nLand on the blue landing zone for extra points\\nDon't let your fuel get to 0, or you'll crash!\\n\\n\"+\n \"Go to https://doc.co/ys85jg for the User Guide\\n\\n\");\n}", "function storyOne() {\n console.log(\"story there\");\n $('#instructions').text('story time');\n// varible to make a random story\n var story = {\n \"start\": \"Once upon a time, #name# the #animal# #action# #moment# #place#\",\n// the different variable that the player chose\n \"name\": [chosenName],\n \"animal\": [chosenAnimal],\n \"action\": [chosenAction],\n \"moment\": [chosenMoment],\n \"place\": [chosenPlace]\n }\n\n// variable to use tracery\n var grammar = tracery.createGrammar(story);\n var result = grammar.flatten(\"#start#\");\n console.log(result);\n $('#story').show();\n $('#story').text(result);\n responsiveVoice.speak(result, 'UK English Female',{pitch:1},{rate:1});\n// set a timeout before showing the next step of the story\n setTimeout(narrator,5000);\n}", "function updateText(){\r\n\r\n\tvar text = document.getElementById(\"simulationtext\").value;\r\n\tdocument.title = text;\r\n\r\n\tif(text.length>0){\r\n\t\tclearSeed();\r\n\t\tsetAnimationFunction();\r\n\t\tenableShare();\r\n\r\n\t\tsimText = text;\r\n\t\tpathIsText = true;\r\n\t\trestart = true;\r\n\t}\r\n}", "startGame() {\n overlay.style.display = \"none\";\n this.activePhrase = this.getRandomPhrase();\n this.activePhrase.addPhraseToDisplay();\n }", "function start() {\n\tif (event == 'start1') {\n\t\tplayer.direction = 'LEFT';\n\t\tif (variables.prologue.text1 == false) {\n\t\t\ttextBox = messages.prologue.msg1;\n\t\t\tvariables.prologue.text1 = true;\n\t\t}\n\t\tif (textBox == undefined) {\n\t\t\tif (variables.prologue.text1 == true && variables.prologue.text2 == false) {\n\t\t\t\ttextBox = messages.prologue.msg2;\n\t\t\t\tvariables.prologue.text2 = true;\n\t\t\t} else if (variables.prologue.text1 == true && variables.prologue.text2 == true) {\n\t\t\t\ttextBox = undefined;\n\t\t\t\tevent = 'start2';\n\t\t\t}\n\t\t}\n\t} else if (event == 'start2') {\n\t\tif (currentStage == levels.prologue.office) {\n\t\t\t//Adom\n\t\t\tentities.push({\n\t\t\t\tname: \"Adom\",\n\t\t\t\ttype: 'NPC',\n\t\t\t\tid: 'AdomBR',\n\t\t\t\tpos: {\n\t\t\t\t\tx: 1,\n\t\t\t\t\ty: 7,\n\t\t\t\t},\n\t\t\t\tcolor: 'blue',\n\t\t\t});\n\t\t\tentities.push({\n\t\t\t\tname: \"Adom\",\n\t\t\t\ttype: 'NPC',\n\t\t\t\tid: 'AdomBL',\n\t\t\t\tpos: {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 7,\n\t\t\t\t},\n\t\t\t\tcolor: 'blue',\n\t\t\t});\n\t\t\tentities.push({\n\t\t\t\tname: \"Adom\",\n\t\t\t\ttype: 'NPC',\n\t\t\t\tid: 'AdomTR',\n\t\t\t\tpos: {\n\t\t\t\t\tx: 1,\n\t\t\t\t\ty: 6,\n\t\t\t\t},\n\t\t\t\tcolor: 'blue',\n\t\t\t});\n\t\t\tentities.push({\n\t\t\t\tname: \"Adom\",\n\t\t\t\ttype: 'NPC',\n\t\t\t\tid: 'AdomTL',\n\t\t\t\tpos: {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 6,\n\t\t\t\t},\n\t\t\t\tcolor: 'blue',\n\t\t\t});\n\t\t\tplayerList.forEach(function(ele) {\n\t\t\t\tif (ele.id == 'Adom') {\n\t\t\t\t\tele.room = levels.prologue.office;\n\t\t\t\t\tele.pos.x = 1;\n\t\t\t\t\tele.pos.y = 7;\n\t\t\t\t}\n\t\t\t});\n\t\t\tplayer.direction = 'UP';\n\t\t\tif (variables.prologue.text3 == false) {\n\t\t\t\ttextBox = messages.prologue.msg3;\n\t\t\t\tvariables.prologue.text3 = true;\n\t\t\t}\n\t\t\tif (textBox == undefined) {\n\t\t\t\tif (variables.prologue.text3 == true && variables.prologue.text4 == false) {\n\t\t\t\t\ttextBox = messages.prologue.msg4;\n\t\t\t\t\tvariables.prologue.text4 = true;\n\n\t\t\t\t} else if (variables.prologue.text3 == true && variables.prologue.text4 == true && variables.prologue.text5 == false) {\n\t\t\t\t\ttextBox = messages.prologue.msg5;\n\t\t\t\t\tvariables.prologue.text5 = true;\n\n\t\t\t\t} else if (variables.prologue.text3 == true && variables.prologue.text4 == true && variables.prologue.text5 == true && variables.prologue.text6 == false) {\n\t\t\t\t\ttextBox = messages.prologue.msg6;\n\t\t\t\t\tvariables.prologue.text6 = true;\n\n\t\t\t\t} else if (variables.prologue.text3 == true && variables.prologue.text4 == true && variables.prologue.text5 == true && variables.prologue.text6 == true && variables.prologue.text7 == false) {\n\t\t\t\t\ttextBox = messages.prologue.msg7;\n\t\t\t\t\tvariables.prologue.text7 = true;\n\n\t\t\t\t} else if (variables.prologue.text3 == true && variables.prologue.text4 == true && variables.prologue.text5 == true && variables.prologue.text6 == true && variables.prologue.text7 == true && variables.prologue.text8 == false) {\n\t\t\t\t\ttextBox = messages.prologue.msg8;\n\t\t\t\t\tvariables.prologue.text8 = true;\n\n\t\t\t\t} else {\n\t\t\t\t\tevent = 'start3';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if (event == 'start3') {\n\t\t//Spencer\n\t\tentities.push({\n\t\t\tname: \"Spencer\",\n\t\t\ttype: 'NPC',\n\t\t\tid: 'SpencerBR',\n\t\t\tpos: {\n\t\t\t\tx: 1,\n\t\t\t\ty: 3,\n\t\t\t},\n\t\t\tcolor: 'yellow',\n\t\t});\n\t\tentities.push({\n\t\t\tname: \"Spencer\",\n\t\t\ttype: 'NPC',\n\t\t\tid: 'SpencerBL',\n\t\t\tpos: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 3,\n\t\t\t},\n\t\t\tcolor: 'yellow',\n\t\t});\n\t\tentities.push({\n\t\t\tname: \"Spencer\",\n\t\t\ttype: 'NPC',\n\t\t\tid: 'SpencerTR',\n\t\t\tpos: {\n\t\t\t\tx: 1,\n\t\t\t\ty: 2,\n\t\t\t},\n\t\t\tcolor: 'yellow',\n\t\t});\n\t\tentities.push({\n\t\t\tname: \"Spencer\",\n\t\t\ttype: 'NPC',\n\t\t\tid: 'SpencerTL',\n\t\t\tpos: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 2,\n\t\t\t},\n\t\t\tcolor: 'yellow',\n\t\t});\n\t\tplayerList.forEach(function(ele) {\n\t\t\tif (ele.id == 'Spencer') {\n\t\t\t\tele.room = levels.prologue.office;\n\t\t\t}\n\t\t});\n\t\t//Ray\n\t\tentities.push({\n\t\t\tname: \"Ray\",\n\t\t\ttype: 'NPC',\n\t\t\tid: 'RayBR',\n\t\t\tpos: {\n\t\t\t\tx: 1,\n\t\t\t\ty: 5,\n\t\t\t},\n\t\t\tcolor: 'orange',\n\t\t});\n\t\tentities.push({\n\t\t\tname: \"Ray\",\n\t\t\ttype: 'NPC',\n\t\t\tid: 'RayBL',\n\t\t\tpos: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 5,\n\t\t\t},\n\t\t\tcolor: 'orange',\n\t\t});\n\t\tentities.push({\n\t\t\tname: \"Ray\",\n\t\t\ttype: 'NPC',\n\t\t\tid: 'RayTR',\n\t\t\tpos: {\n\t\t\t\tx: 1,\n\t\t\t\ty: 4,\n\t\t\t},\n\t\t\tcolor: 'orange',\n\t\t});\n\t\tentities.push({\n\t\t\tname: \"Ray\",\n\t\t\ttype: 'NPC',\n\t\t\tid: 'RayTL',\n\t\t\tpos: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 4,\n\t\t\t},\n\t\t\tcolor: 'orange',\n\t\t});\n\t\tplayerList.forEach(function(ele) {\n\t\t\tif (ele.id == 'Ray') {\n\t\t\t\tele.room = levels.prologue.office;\n\t\t\t}\n\t\t});\n\n\t\tevent = 'start4';\n\t} else if (event == 'start4') {\n\t\tif (variables.prologue.text12 == false) {\n\t\t\tplayer.direction = 'LEFT';\n\t\t\tplayerList.forEach(function(ele) {\n\t\t\t\tif (ele.id == 'Chris') {\n\t\t\t\t\tele.direction = 'LEFT';\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tplayer.direction = 'UP';\n\t\t}\n\t\tif (variables.prologue.text9 == false) {\n\t\t\ttextBox = messages.prologue.msg9;\n\t\t\tvariables.prologue.text9 = true;\n\t\t}\n\t\tif (textBox == undefined) {\n\t\t\tif (variables.prologue.text9 == true && variables.prologue.text10 == false) {\n\t\t\t\ttextBox = messages.prologue.msg10;\n\t\t\t\tvariables.prologue.text10 = true;\n\n\t\t\t} else if (variables.prologue.text9 == true && variables.prologue.text10 == true && variables.prologue.text11 == false) {\n\t\t\t\ttextBox = messages.prologue.msg11;\n\t\t\t\tvariables.prologue.text11 = true;\n\n\t\t\t} else if (variables.prologue.text9 == true && variables.prologue.text10 == true && variables.prologue.text11 == true && variables.prologue.text12 == false) {\n\t\t\t\tplayerList.forEach(function(ele) {\n\t\t\t\t\tif (ele.id == 'Chris') {\n\t\t\t\t\t\tele.direction = 'DOWN';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttextBox = messages.prologue.msg12;\n\t\t\t\tvariables.prologue.text12 = true;\n\n\t\t\t} else {\n\t\t\t\tevent = 'tutorial1';\n\t\t\t}\n\t\t}\n\t}\n}", "function welcome(str){\n return str + \"\\nPlease press Start to restart the game.\";\n}", "function updateScreen() {\n var ctx = hangmanGame.canvas.getContext(\"2d\");\n ctx.font = \"50px Rock Salt\";\n ctx.fillStyle = fontColor;\n\n ctx.textAlign = \"center\";\n ctx.fillText(`${hangmanGame.wordStatus.join(\" \")}`, hangmanGame.canvas.width / 2, 400);\n\n if (hangmanGame.guessedLetters.length !== 0) {\n ctx.font = \"30px Rock Salt\";\n ctx.textAlign = \"start\";\n ctx.fillText(`${hangmanGame.guessedLetters.join(\" \")}`, 30, 470);\n }\n\n ctx.font = \"75px Rock Salt\";\n ctx.textAlign = \"center\";\n ctx.fillText(`${hangmanGame.guesses}`, 400, 300);\n ctx.font = \"20px Rock Salt\";\n ctx.fillText(\"guesses remaining\", 400, 350);\n}", "function setGameOverText() {\r\n if (level < stages.length - 1) {\r\n $(\"#game-over-message\").text(\"Game Over\");\r\n $(\"#game-finished\").text(\"\");\r\n $(\"#final-score\").text(\"Final score: \" + score);\r\n }\r\n else {\r\n nextStage();\r\n $(\"#game-over-message\").text(\"Game Over\");\r\n $(\"#game-finished\").text(\"\");\r\n $(\"#final-score\").text(\"Website destroyed. Thanks for trying! Final score: \" + score);\r\n encryptElements();\r\n }\r\n }", "function displayTutorial() {\n push();\n textSize(28);\n textAlign(LEFT);\n // if text is fading in\n if (!tutorialFadeAway) {\n tutorialFontAlpha = lerp(tutorialFontAlpha, 255, 0.05);\n // if text is fading out\n } else {\n tutorialFontAlpha = lerp(tutorialFontAlpha, 0, 0.1);\n }\n fill(255, tutorialFontAlpha);\n text(TEXT_LETTER, width / 12, height / 2);\n // do only once\n if (doOnce) {\n // create a next button\n var $button = $(\"<div class='button' id = 'tutorial-button'></div>\").text(\"next\").button().click(function() {\n tutorialFadeAway = true;\n $('#tutorial-button').remove();\n SOUND_HIGH_PIANO_KEY.play();\n }).hide().fadeIn(500);\n $body.append($button);\n doOnce = false;\n }\n // if the player clicks the next button and the opacity is less than 1\n // go to gameplay\n if (tutorialFadeAway && tutorialFontAlpha <= 1) {\n setTimeout(function() {\n state = \"PLAY\";\n doOnce = true; // reset doOnce\n gameBackground.fadeIn = true; // fade in the background\n showTriggers(); // show the object trigger buttons\n $directionIndicator.show(); // show the direction indicator\n }, 2000);\n }\n pop();\n}", "function showGameOver() {\n textSize(32);\n textAlign(CENTER, CENTER);\n var gameOverText = \"GAME OVER\\n\";\n gameOverText += \"you ded.\"\n text(gameOverText, width / 2, 50);\n}", "create(){\n\n EndTexte = \"You made a score of \" + score + \" in \" + min + \":\" + sec + \":\"+ ms + \"\\n click to restart\"\n this.add.text(config.heigth/2-35, config.width, EndTexte).setBackgroundColor(\"white\")\n .setColor(\"black\")\n .setFontSize(15)\n .setFontStyle(\"bold\")\n\n this.input.on('pointerup', function (pointer) {\n\n this.scene.start('MenuScene')\n\n }, this)\n }", "function drawText() {\n if (!gameOver) {\n return;\n }\n\n //setup text parameters\n let size = grid[0][0].h;\n ctx.fillStyle = gameTied ? COLOR_TIE : playersTurn ? COLOR_PLAYER : COLOR_COMPUTER;\n ctx.font = size + \"px dejavu sans mono\";\n ctx.lineJoin = \"round\";\n ctx.lineWidth = size / 10;\n ctx.strokeStyle = gameTied ? COLOR_TIE_DRK : playersTurn ? COLOR_PLAYER_DARK : COLOR_COMPUTER_DARK;\n ctx.textAlign = \"center\";\n ctx.textBaseline = \"middle\";\n\n //draw the text\n let offset = size * 0.55;\n let text = gameTied ? TEXT_TIE : playersTurn ? TEXT_PLAYER : TEXT_COMPUTER;\n if (gameTied) {\n ctx.strokeText(text, width / 2, height / 2);\n ctx.fillText(text, width / 2, height / 2);\n } else {\n ctx.strokeText(text, width / 2, height / 2 - offset);\n ctx.fillText(text, width / 2, height / 2 - offset);\n ctx.strokeText(TEXT_WIN, width / 2, height / 2 + offset);\n ctx.fillText(TEXT_WIN, width / 2, height / 2 + offset);\n\n }\n}", "function startGame() {\n\t\tvar words = [\"act\", \"again\", \"agree\", \"also\", \"answer\", \"arrive\", \"able\", \"against\", \"always\",\n\t\t\t\t\t\t \"area\", \"atom\", \"about\", \"afraid\", \"anger\", \"appear\", \"above\", \"after\", \"allow\", \n\t\t\t\t\t\t \"among\", \"animal\", \"baby\", \"back\", \"bad\", \"ball\", \"band\", \"bank\", \"bar\", \"base\", \n\t\t\t\t\t\t \"basic\", \"bat\", \"be\", \"bear\", \"beat\", \"beauty\", \"bed\", \"been\", \"before\", \"began\",\n\t\t\t\t\t\t \"begin\", \"behind\", \"believe\", \"bell\", \"best\", \"better\", \"between\", \"big\", \"bird\",\n\t\t\t\t\t\t \"bit\", \"black\", \"block\", \"blood\", \"blow\", \"blue\", \"board\", \"boat\", \"body\", \"bone\",\n\t\t\t\t\t\t \"book\", \"born\", \"both\", \"bottom\", \"bought\", \"box\", \"boy\", \"branch\", \"bread\",\n\t\t\t\t\t\t \"break\", \"bright\", \"bring\", \"broad\", \"broke\", \"brother\", \"brought\", \"brown\", \n\t\t\t\t\t\t \"build\", \"burn\", \"busy\", \"but\", \"buy\", \"by\", \"call\", \"came\", \"camp\", \"can\", \n\t\t\t\t\t\t \"capital\", \"captain\", \"car\", \"card\", \"care\", \"carry\", \"case\", \"cat\", \"catch\", \n\t\t\t\t\t\t \"caught\", \"cause\", \"cell\", \"cent\", \"center\", \"centre\", \"century\", \"certain\", \n\t\t\t\t\t\t \"chair\", \"chance\", \"change\", \"character\", \"charge\", \"chart\", \"check\", \"chick\", \n\t\t\t\t\t\t \"chief\", \"child\", \"children\", \"choose\", \"chord\", \"circle\", \"city\", \"claim\", \n\t\t\t\t\t\t \"class\", \"clean\", \"clear\", \"climb\", \"clock\", \"close\", \"clothe\", \"cloud\", \"coast\", \n\t\t\t\t\t\t \"coat\", \"cold\", \"collect\", \"colony\", \"color\", \"column\", \"come\", \"common\", \n\t\t\t\t\t\t \"company\", \"compare\", \"complete\", \"condition\", \"connect\", \"consider\", \"consonant\", \n\t\t\t\t\t\t \"contain\", \"continent\", \"continue\", \"control\", \"cook\", \"cool\", \"copy\", \"corn\", \n\t\t\t\t\t\t \"corner\", \"correct\", \"cost\", \"cotton\", \"could\", \"count\", \"country\", \"course\", \n\t\t\t\t\t\t \"cover\", \"cow\", \"crease\", \"create\", \"crop\", \"cross\", \"crowd\", \"cry\", \"current\", \n\t\t\t\t\t\t \"cut\", \"dad\", \"dance\", \"danger\", \"dark\", \"day\", \"dead\", \"deal\", \"dear\", \"death\", \n\t\t\t\t\t\t \"decide\", \"decimal\", \"deep\", \"degree\", \"depend\", \"describe\", \"desert\", \"design\", \n\t\t\t\t\t\t \"determine\", \"develop\", \"dictionary\", \"did\", \"die\", \"differ\", \"difficult\", \"direct\", \n\t\t\t\t\t\t \"discuss\", \"distant\", \"divide\", \"division\", \"do\", \"doctor\", \"does\", \"dog\", \"dollar\", \n\t\t\t\t\t\t \"done\", \"door\", \"double\", \"down\", \"draw\", \"dream\", \"dress\", \"drink\", \n\t\t\t\t\t\t \"drive\", \"drop\", \"dry\", \"duck\", \"during\", \"each\", \"ear\", \"early\", \"earth\", \"ease\", \n\t\t\t\t\t\t \"east\", \"eat\", \"edge\", \"effect\", \"egg\", \"eight\", \"either\", \"electric\", \"element\", \n\t\t\t\t\t\t \"else\", \"end\", \"enemy\", \"energy\", \"engine\", \"enough\", \"enter\", \"equal\", \"equate\", \n\t\t\t\t\t\t \"especially\", \"even\", \"evening\", \"event\", \"ever\", \"every\", \"exact\", \"example\", \n\t\t\t\t\t\t \"except\", \"excite\", \"exercise\", \"expect\", \"experience\", \"experiment\", \"eye\", \n\t\t\t\t\t\t \"face\", \"fact\", \"fair\", \"fall\", \"family\", \"famous\", \"far\", \"farm\", \"fast\", \"fat\",\n\t\t\t\t\t\t \"father\", \"favor\", \"fear\", \"feed\", \"feel\", \"feet\", \"fell\", \"felt\", \"few\", \"field\",\n\t\t\t\t\t\t \"fig\", \"fight\", \"figure\", \"fill\", \"final\", \"find\", \"fine\", \"finger\", \"finish\", \"fire\",\n\t\t\t\t\t\t \"first\", \"fish\", \"fit\", \"five\", \"flat\", \"floor\", \"flow\", \"flower\", \"fly\", \"follow\",\n\t\t\t\t\t\t \"food\", \"foot\", \"for\", \"force\", \"forest\", \"form\", \"forward\", \"found\", \"four\", \"fraction\",\n\t\t\t\t\t\t \"free\", \"fresh\", \"friend\", \"from\", \"front\", \"fruit\", \"full\", \"fun\", \n\t\t\t\t\t\t \"game\", \"garden\", \"gas\", \"gather\", \"gave\", \"general\", \"gentle\", \"get\", \"girl\", \"give\",\n\t\t\t\t\t\t \"glad\", \"glass\", \"go\", \"gold\", \"gone\", \"good\", \"got\", \"govern\", \"grand\", \"grass\",\n\t\t\t\t\t\t \"gray\", \"great\", \"green\", \"grew\", \"ground\", \"group\", \"grow\", \"guess\", \"guide\", \"gun\", \n\t\t\t\t\t\t \"had\", \"hair\", \"half\", \"hand\", \"happen\", \"happy\", \"hard\", \"has\", \"hat\", \"have\", \"he\",\n\t\t\t\t\t\t \"head\", \"hear\", \"heard\", \"heart\", \"heat\", \"heavy\", \"held\", \"help\", \"her\", \"here\",\n\t\t\t\t\t\t \"high\", \"hill\", \"him\", \"his\", \"history\", \"hit\", \"hold\", \"hole\", \"home\", \"hope\", \"horse\",\n\t\t\t\t\t\t \"hot\", \"hour\", \"house\", \"how\", \"huge\", \"human\", \"hundred\", \"hunt\", \"hurry\", \n\t\t\t\t\t\t \"ice\", \"idea\", \"if\", \"imagine\", \"in\", \"inch\", \"include\", \"indicate\", \"industry\",\n\t\t\t\t\t\t\"insect\", \"instant\", \"instrument\", \"interest\", \"invent\", \"iron\", \"is\", \"island\", \"it\", \n\t\t\t\t\t\t\"job\", \"join\", \"joy\", \"jump\", \"just\", \"keep\", \"kept\", \"key\", \"kill\", \"kind\", \"king\", \"kings\", \"knew\", \"know\", \n\t\t\t\t\t\t\"lady\", \"lake\", \"land\", \"language\", \"large\", \"last\", \"late\", \"laugh\", \"law\", \"lay\",\n\t\t\t\t\t\t\"lead\", \"learn\", \"least\", \"leave\", \"led\", \"left\", \"leg\", \"length\", \"less\", \"let\",\n\t\t\t\t\t\t\"letter\", \"level\", \"lie\", \"life\", \"lift\", \"light\", \"like\", \"line\", \"liquid\", \"list\",\n\t\t\t\t\t\t\"listen\", \"little\", \"live\", \"locate\", \"log\", \"lone\", \"long\", \"look\", \"lost\", \"lot\", \n\t\t\t\t\t\t\"loud\", \"love\", \"low\", \n\t\t\t\t\t\t\"machine\", \"made\", \"magnet\", \"main\", \"major\", \"make\", \"man\", \"many\", \"map\", \"mark\",\n\t\t\t\t\t\t\"market\", \"mass\", \"master\", \"match\", \"material\", \"matter\", \"may\", \"me\", \"mean\", \"meant\",\n\t\t\t\t\t\t\"measure\", \"meat\", \"meet\", \"melody\", \"men\", \"metal\", \"method\", \"middle\", \"might\",\n\t\t\t\t\t\t\"mile\", \"milk\", \"million\", \"mind\", \"mine\", \"minute\", \"miss\", \"mix\", \"modern\", \"molecule\",\n\t\t\t\t\t\t\"moment\", \"money\", \"month\", \"moon\", \"more\", \"morning\", \"most\", \"mother\", \"motion\",\n\t\t\t\t\t\t\"mount\", \"mountain\", \"mouth\", \"move\", \"much\", \"multiply\", \"music\", \"must\", \"my\", \n\t\t\t\t\t\t\"name\", \"nation\", \"natural\", \"nature\", \"near\", \"necessary\", \"neck\", \"need\", \"neighbor\",\n\t\t\t\t\t\t\"never\", \"new\", \"next\", \"night\", \"nine\", \"no\", \"noise\", \"noon\", \"nor\", \"north\", \"nose\",\n\t\t\t\t\t\t\"note\", \"nothing\", \"notice\", \"noun\", \"now\", \"number\", \"numeral\", \n\t\t\t\t\t\t\"object\", \"observe\", \"occur\", \"ocean\", \"of\", \"off\", \"offer\", \"office\", \"often\", \"oh\",\n\t\t\t\t\t\t\"oil\", \"old\", \"on\", \"once\", \"one\", \"only\", \"open\", \"operate\", \"opposite\", \"or\", \"order\",\n\t\t\t\t\t\t\"organ\", \"original\", \"other\", \"our\", \"out\", \"over\", \"own\", \"oxygen\", \n\t\t\t\t\t\t\"page\", \"paint\", \"pair\", \"paper\", \"paragraph\", \"parent\", \"part\", \"particular\", \"party\",\n\t\t\t\t\t\t\"pass\", \"past\", \"path\", \"pattern\", \"pay\", \"people\", \"perhaps\", \"period\", \"person\",\n\t\t\t\t\t\t\"phrase\", \"pick\", \"picture\", \"piece\", \"pitch\", \"place\", \"plain\", \"plan\", \"plane\",\n\t\t\t\t\t\t\"planet\", \"plant\", \"play\", \"please\", \"plural\", \"poem\", \"point\", \"poor\", \"populate\",\n\t\t\t\t\t\t\"port\", \"pose\", \"position\", \"possible\", \"post\", \"pound\", \"power\", \"practice\", \"prepare\",\n\t\t\t\t\t\t\"present\", \"press\", \"pretty\", \"print\", \"probable\", \"problem\", \"process\", \"produce\",\n\t\t\t\t\t\t\"product\", \"proper\", \"property\", \"protect\", \"prove\", \"provide\", \"pull\", \"push\", \"put\", \n\t\t\t\t\t\t\"quart\", \"question\", \"quick\", \"quiet\", \"quite\", \"quotient\", \n\t\t\t\t\t\t\"race\", \"radio\", \"rail\", \"rain\", \"raise\", \"ran\", \"range\", \"rather\", \"reach\", \"read\",\n\t\t\t\t\t\t\"ready\", \"real\", \"reason\", \"receive\", \"record\", \"red\", \"region\", \"remember\", \"repeat\",\n\t\t\t\t\t\t\"reply\", \"represent\", \"require\", \"rest\", \"result\", \"rich\", \"ride\", \"right\", \"ring\",\n\t\t\t\t\t\t\"rise\", \"river\", \"road\", \"rock\", \"roll\", \"room\", \"root\", \"rope\", \"rose\", \"round\",\n\t\t\t\t\t\t\"row\", \"rub\", \"rule\", \"run\", \n\t\t\t\t\t\t\"safe\", \"sail\", \"same\", \"sat\", \"saw\", \"scale\", \"science\", \"sea\", \"season\", \"second\",\n\t\t\t\t\t\t\"see\", \"seem\", \"select\", \"sell\", \"sense\", \"sentence\", \"serve\", \"settle\", \"several\",\n\t\t\t\t\t\t\"shape\", \"sharp\", \"sheet\", \"shine\", \"shoe\", \"shore\", \"should\", \"shout\", \"side\", \"sign\",\n\t\t\t\t\t\t\"silver\", \"simple\", \"sing\", \"sister\", \"six\", \"skill\", \"sky\", \"sleep\", \"slow\", \"smell\",\n\t\t\t\t\t\t\"snow\", \"soft\", \"soldier\", \"solve\", \"son\", \"soon\", \"south\", \"speak\", \"speech\", \"spell\",\n\t\t\t\t\t\t\"spoke\", \"spread\", \"square\", \"star\", \"state\", \"stay\", \"steam\", \"step\", \"still\", \"stood\",\n\t\t\t\t\t\t\"store\", \"straight\", \"stream\", \"stretch\", \"strong\", \"study\", \"substance\", \"success\",\n\t\t\t\t\t\t\"sudden\", \"sugar\", \"suit\", \"sun\", \"support\", \"surface\", \"swim\", \"symbol\", \n\t\t\t\t\t\t\"table\", \"tail\", \"take\", \"talk\", \"tall\", \"teach\", \"team\", \"teeth\", \"tell\", \"temperature\",\n\t\t\t\t\t\t\"ten\", \"term\", \"test\", \"than\", \"thank\", \"that\", \"the\", \"their\", \"them\", \"then\", \"there\",\n\t\t\t\t\t\t\"these\", \"they\", \"thick\", \"thin\", \"thing\", \"think\", \"third\", \"this\", \"those\", \"though\",\n\t\t\t\t\t\t\"thought\", \"thousand\", \"three\", \"through\", \"throw\", \"thus\", \"tie\", \"time\", \"tiny\",\n\t\t\t\t\t\t\"tire\", \"to\", \"together\", \"told\", \"tone\", \"too\", \"took\", \"tool\", \"top\", \"touch\",\n\t\t\t\t\t\t\"toward\", \"town\", \"track\", \"trade\", \"train\", \"travel\", \"tree\", \"triangle\", \"trip\",\n\t\t\t\t\t\t\"trouble\", \"truck\", \"true\", \"try\", \"tube\", \"turn\", \"twenty\", \"two\", \"type\", \n\t\t\t\t\t\t\"under\", \"unit\", \"until\", \"up\", \"us\", \"use\", \"usual\", \n\t\t\t\t\t\t\"valley\", \"value\", \"vary\", \"verb\", \"very\", \"view\", \"village\", \"visit\", \"voice\", \"vowel\", \n\t\t\t\t\t\t\"wait\", \"walk\", \"wall\", \"want\", \"war\", \"warm\", \"was\", \"wash\", \"watch\", \"water\", \"wave\",\n\t\t\t\t\t\t\"way\", \"we\", \"wear\", \"weather\", \"week\", \"weight\", \"well\", \"went\", \"were\", \"west\",\n\t\t\t\t\t\t\"what\", \"wheel\", \"when\", \"where\", \"whether\", \"which\", \"while\", \"white\", \"who\", \"whole\",\n\t\t\t\t\t\t\"whose\", \"why\", \"wide\", \"wife\", \"wild\", \"will\", \"win\", \"wind\", \"window\", \"wing\",\n\t\t\t\t\t\t\"winter\", \"wire\", \"wish\", \"with\", \"woman\", \"women\", \"wonder\", \"wood\", \"word\",\n\t\t\t\t\t\t\"yard\", \"year\", \"yellow\", \"yes\", \"yet\", \"you\", \"young\", \"your\", \"zoo\", \"zipper\"];\n\t\twordCount = 0;\n\t\tmistakeCount = 0;\n\t\ttimerFun = setInterval(function() {timer()}, 1000);\n\t\tstartTime = (new Date()).getTime();\n\t\tdocument.getElementById(\"timer\").innerHTML = \"Time remaining: \" + GAME_DURATION;\n\t\tdocument.getElementById(\"misses\").innerHTML = \"\";\n\t\t$('#info').hide();\n\t\t$('#gameBorder').css('visibility', 'visible');\n\t\tvar rando = words[Math.floor(Math.random() * words.length)];\n\t\tdisplayWord(rando, words, false);\n\t}", "startGame() {\n document.getElementById('overlay').style.display = 'none';\n\n this.activePhrase = this.getRandomPhrase();\n this.activePhrase.addPhraseToDisplay();\n }", "makeUI() {\n gameState.criteriaText = this.add.text(gameState.CENTER_X, gameState.CRITERIA_HEIGHT, `MULTIPLES OF ${gameState.criteriaNum}`, {\n font: gameState.INFO_FONT,\n fill: '#00ffff'\n }).setOrigin(0.5);\n gameState.creditsText = this.add.text(192, 684, `Created by Jon So, 2021`, {\n font: gameState.DECO_FONT,\n fill: '#ffffff'\n });\n gameState.scoreText = this.add.text(gameState.CENTER_X, gameState.SCORE_HEIGHT, `${gameState.score}`, {\n font: gameState.SCORE_FONT,\n fill: '#ffffff'\n }).setOrigin(0.5);\n gameState.levelText = this.add.text(3 * gameState.CENTER_X / 2, 3 * gameState.CENTER_Y / 2, `LV. ${gameState.level}: ${gameState.FLAVORS[gameState.colorFlavorIndex]}`, {\n font: gameState.INFO_FONT,\n fill: '#ffffff'\n }).setOrigin(0.5);\n gameState.readyPrompt = this.add.text(gameState.CENTER_X, 9 * gameState.CENTER_Y / 16, ``, {\n font: gameState.READY_FONT,\n fill: '#ff0000'\n }).setOrigin(0.5);\n gameState.comboCounterTextLeft = this.add.text(gameState.CENTER_X / 7 + 8, gameState.CENTER_Y - 32, `1x`, {\n font: gameState.COMBO_FONT,\n fill: '#ffffff',\n }).setOrigin(0.5).setFontStyle('bold italic');\n gameState.comboCounterTextRight = this.add.text(config.width - gameState.CENTER_X / 7 - 8, gameState.CENTER_Y - 32, `1x`, {\n font: gameState.COMBO_FONT,\n fill: '#ffffff',\n }).setOrigin(0.5).setFontStyle('bold italic');\n // Display the high score/highest level/ highest combo\n\t\tgameState.highText = this.add.text(gameState.CENTER_X, 16, \n\t\t\t`HI SCORE-${localStorage.getItem(gameState.LS_HISCORE_KEY)}\\t\\tHI COMBO-${localStorage.getItem(gameState.LS_HICOMBO_KEY)}\\t\\tHI LEVEL-${localStorage.getItem(gameState.LS_HILEVEL_KEY)}`, {\n\t\t\t\tfont: gameState.INFO_FONT,\n \tfill: '#ffffff'\n }).setOrigin(0.5).setTint(0xff0000).setFontStyle(\"bold\"); \n this.showReadyPrompt();\n gameState.levelText.setTint(gameState.COLOR_HEXS[gameState.colorFlavorIndex]);\n this.setupLivesDisplay();\n }", "function displayTitle() {\n // Set up all the styling elements\n push();\n textAlign(CENTER,CENTER);\n textSize(32);\n fill(255);\n stroke(255);\n // Display the text\n text(\"SPACELOVE!\",width/2,height/2);\n // Font size goes down\n textSize(16);\n // Display the instructions\n text(\"Press SPACE to play\\nUse WASD+CONTROL and ARROWS+SHIFT\",width/2,3*height/4);\n pop();\n\n // Check whether the spacebar was pressed to start the game...\n if (keyIsPressed && key === ' ') {\n // ... if it was, change the state to \"GAME\" so the switch statement in draw()\n // will display the game instead\n state = \"GAME\";\n }\n}", "function startPage() {\n background(BG_COLOR);\n\n //text info\n fill(TEXT_COLOR_START_PAGE);\n strokeWeight(1);\n stroke(TEXT_COLOR_START_PAGE);\n textSize(50);\n textAlign(CENTER, CENTER);\n text(START_WELCOME, START_PAGE_X, START_PAGE_Y);\n legend();\n textSize(25);\n text(START_KEY_TEXT, START_PAGE_X, START_PAGE_Y + 400);\n}", "function startGame() {\n id(\"start\").disabled = true;\n id(\"stop\").disabled = false;\n qs(\"textarea\").disabled = true;\n text = qs(\"textarea\").value.split(/[ \\t\\n]+/);\n let i = 0;\n while (i < text.length) {\n if (endWithPunc(text[i])) {\n text[i] = text[i].substr(0, text[i].length - 1);\n text.splice(i, 0, text[i]);\n i++;\n }\n i++;\n }\n let speed = parseInt(id(\"speed\").value);\n timer = setInterval(handleText, speed);\n }", "function init() {\n createWelcomeGraphic();\n console.log('WELCOME TO ASSOCIATE MANAGER!');\n console.log('FOLLOW THE PROMPTS TO COMPLETE YOUR TASKS.');\n}", "function startGame() {\n setMessage(\"Select an opponent above\");\n}" ]
[ "0.6804581", "0.673038", "0.6643339", "0.65729374", "0.6440953", "0.6354138", "0.63337165", "0.6326226", "0.63208", "0.63196033", "0.62945724", "0.6240662", "0.6229601", "0.6215396", "0.621333", "0.6199451", "0.6170604", "0.6163665", "0.6155735", "0.61370057", "0.61261034", "0.6109196", "0.61085045", "0.6107849", "0.60923254", "0.60872036", "0.60792255", "0.6074044", "0.60663813", "0.6040325", "0.60370886", "0.6032675", "0.60093844", "0.59983766", "0.5993211", "0.5989516", "0.5988437", "0.59874827", "0.59853", "0.5983486", "0.5983065", "0.5975784", "0.5972302", "0.59215933", "0.59188974", "0.5908766", "0.59062153", "0.59039134", "0.58971095", "0.58788604", "0.5870381", "0.58664536", "0.5857396", "0.58557934", "0.58537424", "0.58512086", "0.5848093", "0.5847568", "0.58419865", "0.5837776", "0.58365446", "0.58343524", "0.5832884", "0.5830212", "0.582734", "0.5823834", "0.58177215", "0.5817535", "0.5813761", "0.58096665", "0.5800081", "0.5799089", "0.5797691", "0.57961494", "0.5794934", "0.578853", "0.5786681", "0.57861066", "0.57761204", "0.5775653", "0.5769506", "0.5769166", "0.57648724", "0.5763016", "0.5761175", "0.57608974", "0.57583445", "0.5757214", "0.57565254", "0.57540655", "0.57538855", "0.57497096", "0.5749414", "0.5742903", "0.5741462", "0.5737074", "0.5736441", "0.57355857", "0.5734218", "0.57297957", "0.572877" ]
0.0
-1
return "Hello, " + person; }
function greeter(person) { return "Hi " + person.firstName + " " + person.lastName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function person(name) {\n return \"I think\" + name + \"is a cool guy\";\n}", "function greeter2(person) {\n return \"Aloha \" + person + \"!\";\n}", "function greeter(person) {\n return \"Hello, \" + person;\n}", "hello(someone) {\n return \"hello, \"+ someone\n }", "function sayName(person) {\n return \"Hey! \" + person.name;\n}", "function greet() {\n\treturn `Hello, I'm ${this.name}!`; \n}", "function firstName(first) {\n return (\"Hi \" + first);\n}", "function sayHi(name, age) {\n return \"Hi. My name is \" + name + \" and I'm \" + age + \" years old\";\n}", "greet() {\n return 'Yo ' + this.firstname;\n }", "function greet(name){\n return 'hi ' + name\n}", "function helloHow() {\r\n return 'Hello, ' + 'how are you?'\r\n}", "function getName() {\n return \"Hello, my name is Irvan\";\n}", "function greet(person) {\n console.log(`Hi ${person}`);\n}", "function sayHi() {\n return `Hello, ${this.name}`;\n}", "function sayHello (greeting) {\n return (`${greeting} my name is ${this.name}`);\n}", "function greet(name) {\n\n return \"Hello, \" + name + \"!\";\n\n}", "function sayMyName(myName) {\n return (\"Hello, my name is \" + myName);\n}", "sayHello() {\n return \"Hello, \" + this.firstname + \" \" + this.lastname;\n }", "function greet(firstName, lastName){\n return 'Hello ' + firstName + ' ' + lastName;\n}", "function greeting2(firstName, lastName){\n return 'hello ' + firstName + \" \" + lastName;\n}", "function greeter(name){\n return \"Hello, \" + name + \"!\";\n}", "function hello(who) {\r\n return 'Let me introduce: ' + who;\r\n }", "function greet(name){\r\n return \"hello \"+name;\r\n}", "function greet(name)\n{\n return \"Hello \" + name + \"!\";\n}", "function greet(person) {\n console.log(\"Hi \" + person.firstName + \"!\");\n}", "greet() {\n return `${this.name} says hello.`;\n }", "greet() {\n return `${this.name} says hello.`;\n }", "function getName() {\n return \"Hello my name is Arief muhamad\";\n}", "greet() {\n return `${this.name} says hello.`;\n }", "function greeter02(name) {\n return \"Hello, \" + name;\n}", "greeting(){\n return `hello there ${this.firstName} ${this.lastName}`;\n }", "function giveName (lastName) {\n return = firstName + \" \" + lastName;\n}", "function getName() {\n return \"John\";\n}", "function MyNameReturn(name) {\n return \"Hello \" + name;\n}", "greet(){\n return `Good Morning ${this.firstName} ${this.lastName}`;\n }", "function greet(person) {\n console.log('Hi ' + person.firstName);\n}", "greet() {\n // reasignName();\n console.log(`${this.name} says hello.`);\n // console.log(`${this.name} says hello.`);\n // console.log(name);\n return `${this.name} says hello.`;\n }", "function sayHello(name, age) {\n\treturn \"Hello \" + name + \", how do you like being \" + age + \"?\";\n}", "greet() {\n return `Hello, my name is ${this.name} and I am ${this.age}`; // Method adding properties into an output in ``\n }", "function person() {\n return // this function returns undefined because a semicolon is automatically inserted after the return\n { // to avoid this write the curly braces on the same line as the return to avoid the automatic insertion\n firstname: 'Charles'\n }\n}", "function greeting(str) { //function to concat strings using += \r\n let newGreet = str += \"!\";\r\n return newGreet;\r\n}", "function hello(fname, lname) {\n let firstName = fname + \" \" + lname;\n return `Hello ${firstName}`;\n}", "function greeting(yourName) {\r\n var result = 'Hello' + ' ' + yourName; // string Concatenation\r\n console.log(result);\r\n}", "function wellcome (myName){\n\treturn(\"Hello \"+myName);\n}", "getGreeting() {\n // return 'Hi. I am ' + this.name + '!'; //ES5 way to make a string with values\n // we can create template string, using backticks/backquotes ``\n return `Hi. I am ${this.name}, ${this.age} old!`; //it's more readable\n }", "function sayHello(name) {\n return (\"Hello, \" + name);\n}", "function greeting(name, age){\n return \"jas sum \"+name+\" i imam\"+age+\" godini.\";\n}", "function getPersonInfo(name, lastName, age) {\n return \"Nice to meet you \" + name + \" \" + lastName + \", your age is \" + age;\n}", "function myName2(name){\n\treturn \"Hello \" + name + \". \";\n}", "function greetUser(firstName) {\n return `Hello ${firstName}`;\n}", "function greetPerson (startingMessage, personName){\n var message = startingMessage + \" \" + personName;\n console.log (message);\n}", "function greeting(person) {\n console.log(\"Hello \" + person.first + \" \" + person.last);\n}", "function greet(person) {\n console.log(\"Hello, \" + person.firstName);\n}", "function greeter(name){\n\treturn 'Hello ' + name + '!';\n}", "function greeting(name){\n return `My name is ${this.name}`; \n}", "function sayHello(name) {\n return \"Hello, \" + name + \"!\"\n\n}", "getPersonName() {\n return \"I_AM_DON!!\";\n }", "function greet(name) {\n return 'Hello ' + name\n}", "function sayMyName(firstName, lastName) {\n console.log(`${firstName} ${lastName}`);\n return { firstName: firstName, lastName };\n}", "function greet(name) {\n return \"Hello, \" + name + \"!\";\n}", "function greetings(personName){\n console.log(\"Welcome\" + personName);\n}", "function greet(Name){\n return 'Hello, ' + (Name) + '!';\n}", "function greet() {\r\n return \"string\";\r\n}", "function greeting(yourName) {\r\n var result = 'Hello' + ' ' + yourName;\r\n console.log(result);\r\n}", "sayIt(): string {\n return `Saying: ${this.what}`;\n }", "function sayHello(string) {\n return string;\n}", "function sayHello(person){ \n console.log(\"Hello, \"+person); \n }", "function greeting(yourName) {\n var result = 'Hello'+' '+ yourName; // String Concatenation\n console.log(result);\n}", "function sayHeyFriend(name) {\n return `Hey, ${name}!`;\n}", "function myName(name){\n\treturn \"Hello \" + name + \". \";\n}", "function greet(name) {\n return 'Hello ' + name;\n}", "function returnName() {\n return 'Stuart Hamblin';\n}", "function fullName(firstName, lastName) {\n return \"Hello \" + firstName + \" \" + lastName;\n}", "function howdyEd(name){ \n return `Howdy ${name}!`\n}", "function greeting(yourName) {\n var result = 'Hello ' + name; // String Concatenation\n console.log(result);\n}", "function greet(name) {\n return 'Hello, ' + name;\n}", "function greet(firstName,lastName){\n //execute a statement\n return firstName + \" \" + lastName;\n}", "function hello(firstName, lastName) {\nlet myName = firstName + ' ' + lastName;\nconsole.log(myName);\n}", "function greeting(yourName) {\n var result = 'Hello' + ' ' + yourName; // String Concatenation\n console.log(result);\n}", "function sayHello(firstName){\n // function body goes here!\n return \"Hello, \" + firstName + \"!\"\n }", "function greetReturn(name,age) {\n var greeting = 'Hello ' + name + ' You Are ' + age + ' Years Old!';\n return greeting;\n}", "function fullName() {\n return \"Hello, this is \" + this.first + \" \" + this.last;\n}", "function greet(name) {\n if (name === \"Johnny\") return \"Hello, my love!\";\n else return \"Hello, \" + name + \"!\";\n}", "function greetReturn(name,age) {\n let result = `Hello ${name} You are ${age} yrs Old`;\n return result;\n}", "function greetings(personName){\n console.log(\"Welcome \" + personName);\n}", "greet() {\n return console.log(console.log(`Hi I'm Mr.${this.name} look at me!!`));\n }", "function laughh() {\n\treturn 'hahahahahahahahahaha!';\n}", "function name(name){\n return \"hi, my name is \" + name + \".\";\n}", "getGreeting() {\n //return 'Hello, I am ' + this.name + '!';\n // ES 6 template string, ``\n return `Hello, I am ${this.name}.`;\n }", "getGreeting(){\n return `Hi. I am ${this.name}`;\n }", "toString_Person(){\n return \"Name of person= \" + this.name;\n }", "function greet(name) {\n if (name === 'Johnny') return 'Hello, my love!';\n return 'Hello, ' + name + '!';\n}", "function greetme(user) {\n return \"Hi \" + user;\n}", "function greetReturn(name) {\n var greetMsg = \"hello \" +name+ \" Good Morning\";\n return greetMsg\n}", "function saySomethingStupid() {\n return ('Al Gore rhythms are cool!');\n}", "function greeter01(name) {\n return \"Hello, \" + name;\n}", "function sayHello() {\n console.log(\"Hello!\");\n // return myName;\n}", "function greet(name){\n greeting = \"Hello, \" + name + \"!\"\n return greeting\n}", "function returnHiTo(name ) {\n return `Hi ${name}!`;\n}", "function sayHi(){\n return \"Hi \" + this.firstName;\n}" ]
[ "0.83308357", "0.82673615", "0.82393354", "0.7925421", "0.7888341", "0.7842417", "0.7716826", "0.7624223", "0.76173675", "0.7573261", "0.7572713", "0.7570779", "0.7568589", "0.75617194", "0.7533274", "0.751613", "0.7516", "0.75083584", "0.75056255", "0.74988335", "0.74911076", "0.74774665", "0.74716264", "0.7460667", "0.7458579", "0.7441101", "0.7441101", "0.7439209", "0.7438368", "0.7433606", "0.7433294", "0.7427412", "0.7417002", "0.74048597", "0.74031585", "0.73880553", "0.7379153", "0.735921", "0.7356232", "0.73390555", "0.7338226", "0.7331713", "0.7331648", "0.73215437", "0.73205614", "0.7313707", "0.73115724", "0.73115116", "0.73103124", "0.72958994", "0.7295568", "0.7293504", "0.72792107", "0.7277879", "0.7274549", "0.7273312", "0.7269243", "0.7267496", "0.72663265", "0.7263105", "0.7254524", "0.7253982", "0.7253362", "0.7252759", "0.72498846", "0.72344613", "0.72341317", "0.7231245", "0.723054", "0.7230369", "0.7221583", "0.7220114", "0.721913", "0.7217088", "0.72165793", "0.7215863", "0.72127366", "0.7207901", "0.72050464", "0.72046965", "0.7195065", "0.7189942", "0.7184926", "0.718226", "0.7179616", "0.7178789", "0.71747625", "0.71744484", "0.7170969", "0.71657604", "0.7165175", "0.7163801", "0.7161951", "0.7159523", "0.71543145", "0.71508193", "0.71444035", "0.71442074", "0.7143022", "0.71418166" ]
0.8291874
1
Game logic// Makes sure there is no winner before the game starts
function startGame(){ document.winner = null; setMessage(player1 + " gets to start!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkForWinner() {\n if (this.primaryWinConditionsCheck()) {\n this.endGame();\n }\n }", "checkForWin() {\n if (this.numMafia <= 0) { this.gameState = TOWN_WIN; }\n if (this.getInnocentPlayerCount() <= 0) { this.gameState = MAFIA_WIN; }\n }", "checkForWin() {\n if ((this.state.availCells.length <= 4) && (this.state.winner === '')) {\n this.winCheck()\n } else {\n this.nextTurn()\n }\n }", "check_GameOver() {\n if (this.model.winner == 0) {\n if (this.currentPlayerBot == 0) {\n this.scene.undo_play = false;\n this.state = 'WAIT_UNDO';\n }\n else\n this.state = 'CHANGE_PLAYER';\n }\n else{\n this.state = 'GAME_OVER';\n this.scene.showGameMovie = false;\n this.view.incWinsPlayer(this.model.winner);\n }\n }", "function checkWinner() {\n if (winnerCalled()) {\n gameOver();\n }\n}", "function checkForWin() {\r\n if (game_1.isWinningState(board)) {\r\n var winner = game_1.detectWinner(board);\r\n view_1.displayGameOver(winner);\r\n }\r\n else if (game_1.isDrawState(board)) {\r\n view_1.displayGameOver(null);\r\n }\r\n}", "function checkWinOrLoss() {\n if (totalScore === randomNumToGuess) { // We have a winner\n wins++;\n initializeGame()\n }\n else if (totalScore > randomNumToGuess) { // We have a loser\n losses++;\n initializeGame();\n }\n else {\n updateUI;\n }\n }", "function checkwinner(){\n winner = 0;\n for (check = 0; check < winning.length;check++){\n a = winning[check][0];\n b = winning[check][1];\n c = winning[check][2];\n if ((board[a] == board[b]) &&\n (board[b] == board[c]) &&\n (board[a] != EMPTY)){\n winner = board[a];\n $(\"hr\").removeClass();\n $(\"hr\").addClass(winning[check][3]);\n $('.lines').hide().fadeIn('fast');\n\n\n if (winner == me){$('.winner2').html('I won !Play again?');}\n else {$('.winner2').html('Congratulations! You Won Play again?');}\n $('.winner').hide().fadeIn(3000);\n $('.yesno').hide().fadeIn('fast');\n }\n\n }\n if ((choices.length==0) && (winner ==0)){\n $('hr').removeClass();\n $('.winner').hide().fadeIn(1000);\n $('.yesno').hide().fadeIn('slow');\n $('.winner2').html('It was a draw Play again?');\n }\n }", "isWinner() {\n let resetGame = false;\n if (moveMadeCount > this.minWinnerCheckMove) {\n this.checkWinningPattern();\n\n if (!this.win && moveMadeCount == this.maxMove) {\n draw.classList.remove('d-none');\n resetGame = true;\n } else if (this.win) {\n this.declareWinner();\n let view = new View();\n view.checkRemainingBoxes();\n resetGame = true;\n }\n }\n return resetGame;\n }", "function checkForWin () {\n \n for (let index =0; index < board.cells.length; index++){\n if (board.cells[index].isMine && !board.cells[index].isMarked){\n return \n }\n if (board.cells[index].isMarked && !board.cells[index].isMine && board.cells[index].hidden) {\n return\n }\n if (!board.cells[index].isMine && board.cells[index].hidden) {\n return\n }\n }\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n var audio = document.getElementsByClassName(\"win\")[0];\n audio.play();\n lib.displayMessage('You win!')\n}", "function CheckWinner(){\n // player X\n // 00 10 20\n if(board[0][0] === players[0] && board[1][0] === players[0] && board[2][0] === players[0]){\n console.log(players[0] + ' WIN !!!')\n createP('X WIN !!')\n game = 'end'\n noLoop()\n }\n // 01 11 21\n else if(board[0][1] === players[0] && board[1][1] === players[0] && board[2][1] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n createP('X WIN !!')\n noLoop()\n }\n // 02 12 22\n else if(board[0][2] === players[0] && board[1][2] === players[0] && board[2][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 00 01 02\n else if(board[0][0] === players[0] && board[0][1] === players[0] && board[0][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n createP(player[0],' WIN !!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 10 11 12\n else if(board[1][0] === players[0] && board[1][1] === players[0] && board[1][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 20 21 22\n else if(board[2][0] === players[0] && board[2][1] === players[0] && board[2][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 00 11 22\n else if(board[0][0] === players[0] && board[1][1] === players[0] && board[2][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n // 20 11 02\n else if(board[2][0] === players[0] && board[1][1] === players[0] && board[0][2] === players[0]){\n console.log(players[0] + ' WIN !!!')\n game = 'end'\n winner = players[0]\n createP('X WIN !!')\n noLoop()\n }\n\n // player O\n // 00 10 20\n if(board[0][0] === players[1] && board[1][0] === players[1] && board[2][0] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 01 11 21\n else if(board[0][1] === players[1] && board[1][1] === players[1] && board[2][1] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 02 12 22\n else if(board[0][2] === players[1] && board[1][2] === players[1] && board[2][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 00 01 02\n else if(board[0][0] === players[1] && board[0][1] === players[1] && board[0][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 10 11 12\n else if(board[1][0] === players[1] && board[1][1] === players[1] && board[1][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 20 21 22\n else if(board[2][0] === players[1] && board[2][1] === players[1] && board[2][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 00 11 22\n else if(board[0][0] === players[1] && board[1][1] === players[1] && board[2][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n // 20 11 02\n else if(board[2][0] === players[1] && board[1][1] === players[1] && board[0][2] === players[1]){\n console.log(players[1] + ' WIN !!!')\n game = 'end'\n winner = players[1]\n createP('O WIN !!')\n noLoop()\n }\n else if(longMatch === 9 && winner === null){\n console.log('DRAW !!!!')\n game = 'end'\n createP('DRAW !!')\n noLoop()\n }\n}", "checkWinner() {\n this.checkInHorizontal(player.getPlayerColor()[0]);\n this.checkInVertical(player.getPlayerColor()[0]);\n this.checkInDiagonalTopLeftBottomRight(player.getPlayerColor()[0]);\n this.checkInDiagonalTopRightBottomLeft(player.getPlayerColor()[0]);\n\n //If board is full of pawns and no-one win then send that is draw \n const drawMessage = 'Game ended with draw';\n if (this.checkdraw()) {\n socket.emit('gameEnded', {\n room: this.getRoomId(),\n message: drawMessage,\n });\n this.endGameMessage(drawMessage);\n }\n }", "primaryWinConditionsCheck() {\n super.primaryWinConditionsCheck();\n // <<-- Creer-Merge: primary-win-conditions -->>\n const alivePianos = this.game.furnishings.filter((f) => !f.isDestroyed && f.isPiano);\n if (alivePianos.length === 0) { // game over\n this.secondaryWinConditions(\"all pianos destroyed.\");\n }\n // check to see if one player has more score than the other can possibly get\n const winning = this.game.players[0].score > this.game.players[1].score\n ? this.game.players[0]\n : this.game.players[1];\n // this assumes they play every piano on every remaining turn\n const remainingTurns = this.game.maxTurns - this.game.currentTurn;\n const maxAdditionalScore = Math.ceil(alivePianos.length * remainingTurns / 2);\n if (winning.score > winning.opponent.score + maxAdditionalScore) {\n // then the losing player can't catch up to the winner's score,\n // so end the game early\n this.declareWinner(`Score (${winning.score}) high enough that the opponent can't `\n + `win in the remaining turns (${remainingTurns}).`, winning);\n this.declareLoser(\"Score too low to catch up to the winner in the number of remaining turns.\", winning.opponent);\n return true;\n }\n // <<-- /Creer-Merge: primary-win-conditions -->>\n return false; // If we get here no one won on this turn.\n }", "function checkForWin() {\r\n // You can use this function call to declare a winner (once you've\r\n // detected that they've won, that is!)\r\n // lib.displayMessage('You win!')\r\n for (let i = 0; i < board.cells.length; i++) {\r\n const cell = board.cells[i];\r\n if ((cell.isMine && !cell.isMarked) || (!cell.isMine && cell.hidden)) {\r\n return;\r\n }\r\n }\r\n lib.displayMessage(\"You win!\");\r\n}", "checkForWinner(){\n //if someone has a winning combination\n if(this.hasWinningCombo()){\n this.setState({\n gameOver: true,\n winner: this.state.currentTurn + \" wins!\",\n winnerShort: this.state.currentTurn\n });\n return true;\n }\n //if the board is full and no one its a draw\n else if(this.boardIsFull()){\n this.setState({\n gameOver: true,\n winner: \" It's a draw!\"\n }); \n return true;\n }\n //keep playing since no one won and the board isn't full\n else\n {\n return false;\n }\n }", "function checkForWin() {\n var winner = true;\n var youWin = document.getElementById(\"win\");\n for (var i = 0; i < board.cells.length; i++) {\n if (board.cells[i].isMine === true && board.cells[i].isMarked === false) {\n return \"\";\n }\n if (board.cells[i].isMine === false && board.cells[i].hidden === true) {\n return \"\";\n }\n }\n lib.displayMessage(\"You win!\");\n youWin.play();\n document.getElementById(\"fireworks.wav\").play();\n }", "function checkwinner(){\n winner = 0;\n for (check = 0; check < winning.length;check++){\n a = winning[check][0];\n b = winning[check][1];\n c = winning[check][2];\n if ((board[a] == board[b]) &&\n (board[b] == board[c]) &&\n (board[a] != EMPTY)){\n winner = board[a];\n $(\"hr\").removeClass();\n $(\"hr\").addClass(winning[check][3]);\n $('.lines').hide().fadeIn('fast');\n\n\n if (winner == me){$('.winner2').html('I won !Play again?');}\n else {$('.winner2').html('Congratulations! You Won Play again?');}\n $('.winner').hide().fadeIn(3000);\n $('.yesno').hide().fadeIn('fast');\n }\n\n }\n if ((choices.length==0) && (winner ==0)){\n $('hr').removeClass();\n $('.winner').hide().fadeIn(1000);\n $('.yesno').hide().fadeIn('slow');\n $('.winner2').html('It was a draw Play again?');\n }\n}", "noWinner() {\n return Players.findOne({score: 100}) == null;\n }", "function checkForWin () {\nfor(var x = 0; x<board.cells.length;x++){\nif(board.cells[x].isMine === true && board.cells[x].isMarked === false){\n\treturn;\n\t}else if(board.cells[x].isMine === false && board.cells[x].hidden === true){\n\t\treturn;\n\t}\n\n}\n\t\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!')\n}", "gameWon() {\n if (this._gameBoard[0] == this._currentPlayer && this._gameBoard[1] == this._currentPlayer && this._gameBoard[2] == this._currentPlayer ||\n this._gameBoard[3] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[5] == this._currentPlayer ||\n this._gameBoard[6] == this._currentPlayer && this._gameBoard[7] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[0] == this._currentPlayer && this._gameBoard[3] == this._currentPlayer && this._gameBoard[6] == this._currentPlayer ||\n this._gameBoard[1] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[7] == this._currentPlayer ||\n this._gameBoard[2] == this._currentPlayer && this._gameBoard[5] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[0] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[2] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[6] == this._currentPlayer) {\n this._gameOver = true;\n if (this._currentPlayer == 'X') {\n this._xWins += 1;\n } else {\n this._yWins += 1; \n }\n }\n //checks to see if the game is tied\n var isTie = true;\n for (var i = 0; i < this._gameBoard.length; i++) {\n if (this._gameBoard[i] == \"\") { //there is an empty spot on the board\n isTie = false; \n }\n }\n if (isTie) {\n this._gameOver = true;\n this._ties += 1;\n }\n this._tiedGame = isTie;\n }", "checkIfWin() {\n if (this.score === 10) {\n this.started = false;\n allEnemies = [];\n showWinModal();\n }\n }", "checkForWinner(){\n console.log('Checking for winner.');\n for (let condition of this.winStates){\n let winningCondition = true;\n for (let position of condition){\n if (this.gameState[position[0]][position[1]] != this.currentPlayer.token) {\n winningCondition = false;\n }\n }\n if (winningCondition) {\n console.log('We have a winner!');\n console.log(`Condition is: ${condition}`);\n this.gameStatus = 'won';\n this.winner = this.currentPlayer;\n\n // If we've gotten here, then we need to create a `win` event and\n // dispatch it.\n\n let winEvent = new Event('win');\n document.dispatchEvent(winEvent);\n\n return true; // Return a value to stop processing the additional move count check.\n }\n }\n this.moveCount++;\n console.log(`Reviewed move ${this.moveCount}.`)\n if (this.moveCount >= 9) {\n console.log(`This game is a draw at ${this.moveCount} moves.`);\n this.gameStatus = 'draw';\n\n let drawEvent = new Event('draw');\n document.dispatchEvent(drawEvent);\n }\n }", "function checkWinner() {\r\n\t\t//check rows, cols, diags\r\n\t\t//if empty is 9, then we declare draw and end the game\r\n\r\n\t\tfor(var i = 0; i < winCombo.length; i++) {\r\n\t\t\tif(board[winCombo[i][0]].innerHTML != \" \" &&\r\n\t\t\t\tboard[winCombo[i][0]].innerHTML == board[winCombo[i][1]].innerHTML &&\r\n\t\t\t\tboard[winCombo[i][1]].innerHTML == board[winCombo[i][2]].innerHTML ) {\r\n\t\t\t\tboard[winCombo[i][0]].style.color = \"red\";\r\n\t\t\t\tboard[winCombo[i][1]].style.color = \"red\";\r\n\t\t\t\tboard[winCombo[i][2]].style.color = \"red\";\r\n\t\t\t\tcleanBgColor();\r\n\t\t\t\tdocument.getElementById(\"message\").innerHTML = board[winCombo[i][0]].innerHTML + \" wins!\";\r\n\t\t\t\tendGame();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\r\n\t\t//check if the game is a draw \r\n\t\tif (empty == 0) {\r\n\t\t\tdocument.getElementById(\"message\").innerHTML = \"It's a draw.\";\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}", "winGame() {\n gameWon();\n }", "checkForEndOfGame() {\n\t\t\n\t\tif (!this.isInKnockedState()) {\n\t\t\t\n\t\t\tconst playboard = this.getPlayboard();\n\t\t\t\n\t\t\tconst reservePilePlayerA = playboard.getPlayboardMap().get(PileUtils.getReservePilePositionOfPlayer(Player.PLAYER_A));\n\t\t\tconst wastePilePlayerA = playboard.getPlayboardMap().get(PileUtils.getWastePilePositionOfPlayer(Player.PLAYER_A));\n\t\t\t\n\t\t\tconst reservePilePlayerB = playboard.getPlayboardMap().get(PileUtils.getReservePilePositionOfPlayer(Player.PLAYER_B));\n\t\t\tconst wastePilePlayerB = playboard.getPlayboardMap().get(PileUtils.getWastePilePositionOfPlayer(Player.PLAYER_B));\n\n\t\t\t// If real player won:\n\t\t\tif (PileUtils.isPileEmpty(reservePilePlayerA) && PileUtils.isPileEmpty(wastePilePlayerA)) {\n\t\t\t\tthis.setGameOver(true);\n\t\t\t\tthis.setWinnerPlayer(Player.PLAYER_A);\n\t\t\t\tthis.setActivePlayer(Player.DEALER);\n\n\t\t\t\tLocalStorageService.increaseStatisticsNumberOfGames();\n\t\t\t\tLocalStorageService.increaseStatisticsNumberOfGamesWon();\n\t\t\t\tLocalStorageService.updateStatisticsAverageDurationOfGame(this._startTimeTs);\n\n\t\t\t\tRenderService.renderPlayboard(this);\n\t\t\t\tRenderService.renderGameOverDialog(this);\n\t\t\t\tRenderService.enableLevelSelect();\n\t\t\t\tRenderService.enableSortAcesOnCenterPilesChoice();\n\t\t\t\t\n\t\t\t}\n\t\t\t// If computer opponent won:\n\t\t\telse if (PileUtils.isPileEmpty(reservePilePlayerB) && PileUtils.isPileEmpty(wastePilePlayerB)) {\n\t\t\t\tthis.setGameOver(true);\n\t\t\t\tthis.setWinnerPlayer(Player.PLAYER_B);\n\t\t\t\tthis.setActivePlayer(Player.DEALER);\n\n\t\t\t\tLocalStorageService.increaseStatisticsNumberOfGames();\n\t\t\t\tLocalStorageService.increaseStatisticsNumberOfGamesLost();\n\t\t\t\tLocalStorageService.updateStatisticsAverageDurationOfGame(this._startTimeTs);\n\n\t\t\t\tRenderService.renderPlayboard(this);\n\t\t\t\tRenderService.renderGameOverDialog(this);\n\t\t\t\tRenderService.enableLevelSelect();\n\t\t\t\tRenderService.enableSortAcesOnCenterPilesChoice();\n\t\t\t}\n\t\t}\n\t}", "function winner() {\n if (p1choice === \"stone\" && p2choice === \"wand\") {\n //Display rock/p1 wins\n $(\"#winner\").text(\"P1 wins\");\n p1wins++\n p2losses++\n } else if (p1choice === \"stone\" && p2choice === \"cloak\") {\n //display cloak/p2 wins\n $(\"#winner\").text(\"P2 wins\");\n p1losses++\n p2wins++\n } else if (p1choice === \"wand\" && p2choice === \"cloak\") {\n //display wand/p1 wins\n $(\"#winner\").text(\"P1 wins\");\n p1wins++\n p2losses++\n } else if (p1choice === \"wand\" && p2choice === \"stone\") {\n //display stone/p2 wins\n $(\"#winner\").text(\"P2 wins\");\n p1losses++\n p2wins++\n } else if (p1choice === \"cloak\" && p2choice === \"wand\") {\n //display wand/p2 wins\n $(\"#winner\").text(\"P2 wins\");\n p1losses++\n p2wins++\n } else if (p1choice === \"cloak\" && p2choice === \"stone\") {\n //display stone/p1 wins\n $(\"#winner\").text(\"P1 wins\");\n p1wins++\n p2losses++\n } else {\n //display tie\n $(\"#winner\").text(\"Tie\");\n }\n $(\"#p1wins\").text(\"Player one wins: \" + p1wins);\n $(\"#p1losses\").text(\"Player one losses: \" + p1losses);\n $(\"#p2wins\").text(\"Player two wins: \" + p2wins);\n $(\"#p2losses\").text(\"Player two losses: \" + p2losses);\n p1choice;\n p2choice;\n database.ref(\"players/p1/choice\").remove();\n database.ref(\"players/p2/choice\").remove();\n $(\"#p1\").empty();\n $(\"#p2\").empty();\n $(\"#p1\").text(\"Waiting on \" + player1)\n //TODO - Bug somewhere around here that is populating waiting on player one in the player one box. and doesn't remove previous game's winner when player 1 makes second choice\n }", "function WON()\n{\n moveCounter++;\n pSwitch();\n if(moveCounter>4)\n {\n let winner=winnerCheck();\n if (winner!=null)\n {\n gameOver(winner,line,coordonate);\n } \n }\n}", "function winner() {\n winnerPrompt.classList.remove('hidden-winner');\n resetPlayAgain.classList.remove('hidden');\n hide1.classList.add('hide-all');\n hide2.classList.add('hide-all');\n resetSpan.textContent = 'Play Again?';\n }", "function checkForWin () {\n for (i = 0; i < board.cells.length; i++) {\n if(\n board.cells[i].isMine && !board.cells[i].isMarked){\n return}\n else if (\n board.cells[i].isMarked && !board.cells[i].hidden){\n return}\n }\n\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!')\n}", "function checkWinner() {\n if (matchCount !== shapes.length) {\n\t\treturn;\n }\n\n\ttimer.stop();\n\n let ticks = timer.getTicks();\n let timeSpent = timer.getTime(ticks);\n MemoryStorage.setItem(Date.now(), ticks);\n\n showModal();\n}", "function checkForWin() {\n var isWinner = true\n\n for (let i = 0; i < board.cells.length; i++) {\n var cell = board.cells[i]\n\n if (cell.isMine && !cell.isMarked || cell.hidden && !cell.isMine) {\n isWinner = false\n }\n }\n\n if (isWinner) {\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!');\n winAudio.play();\n }\n}", "commenceEndGame() {\n this.playerOne.score = this.masterBoardArray[6];\n this.playerTwo.score = this.masterBoardArray[13];\n while (winnerContent.firstChild) {\n winnerContent.removeChild(winnerContent.firstChild);\n }\n if (this.playerOne.score > this.playerTwo.score) {\n this.fillWinnerModal(`${p1Name} wins! ${this.playerOne.score} to ${this.playerTwo.score}`);\n winnerModal.style.display = 'block';\n }\n else if (this.playerOne.score < this.playerTwo.score) {\n this.fillWinnerModal(`${p2Name} wins! ${this.playerTwo.score} to ${this.playerOne.score}`);\n winnerModal.style.display = 'block';\n }\n else {\n this.fillWinnerModal(`Game is a draw! ${this.playerTwo.score} to ${this.playerOne.score}`);\n winnerModal.style.display = 'block';\n }\n }", "endGame(winner) {\n this.gameInProgress = false;\n\n // add to total GAMES played\n this.totalGames += 1;\n\n if (winner) {\n this.nbrWins += 1; // Represents GAMES won, not battles\n } else {\n this.nbrLosses += 1; // Represents GAMES lost, not battles\n }\n\n this.reset();\n\n }", "function checkWin() {\n if(( $(\"#s1\").text()) === ( $(\"#s2\").text()) && ( $(\"#s1\").text()) === ( $(\"#s3\").text()) && ( $(\"#s1\").text())!=\"\") winner = ( $(\"#s1\").text());\n if(( $(\"#s4\").text()) === ( $(\"#s5\").text()) && ( $(\"#s4\").text()) === ( $(\"#s6\").text()) && ( $(\"#s4\").text())!=\"\") winner = ( $(\"#s4\").text());\n if(( $(\"#s7\").text()) === ( $(\"#s8\").text()) && ( $(\"#s7\").text()) === ( $(\"#s9\").text()) && ( $(\"#s7\").text())!=\"\") winner = ( $(\"#s7\").text());\n if(( $(\"#s1\").text()) === ( $(\"#s4\").text()) && ( $(\"#s1\").text()) === ( $(\"#s7\").text()) && ( $(\"#s1\").text())!=\"\") winner = ( $(\"#s1\").text());\n if(( $(\"#s2\").text()) === ( $(\"#s5\").text()) && ( $(\"#s2\").text()) === ( $(\"#s8\").text()) && ( $(\"#s2\").text())!=\"\") winner = ( $(\"#s2\").text());\n if(( $(\"#s3\").text()) === ( $(\"#s6\").text()) && ( $(\"#s3\").text()) === ( $(\"#s9\").text()) && ( $(\"#s3\").text())!=\"\") winner = ( $(\"#s3\").text());\n if(( $(\"#s1\").text()) === ( $(\"#s5\").text()) && ( $(\"#s1\").text()) === ( $(\"#s9\").text()) && ( $(\"#s1\").text())!=\"\") winner = ( $(\"#s1\").text());\n if(( $(\"#s3\").text()) === ( $(\"#s5\").text()) && ( $(\"#s3\").text()) === ( $(\"#s7\").text()) && ( $(\"#s3\").text())!=\"\") winner = ( $(\"#s3\").text());\n\n if(winner!=\"\"){\n isGameOver = 1;\n $(\".turn\").text(\"\");\n if(winner==='X') $(\".result\").text(\"Player X Wins!\");\n else $(\".result\").text(\"Player O Wins!\");\n }\n \n if(winner===\"\" && ( $(\"#s1\").text())!=\"\" && ( $(\"#s2\").text())!=\"\" && ( $(\"#s3\").text())!=\"\" && ( $(\"#s4\").text())!=\"\" && ( $(\"#s5\").text())!=\"\" && ( $(\"#s6\").text())!=\"\" && ( $(\"#s7\").text())!=\"\" && ( $(\"#s8\").text())!=\"\" && ( $(\"#s9\").text())!=\"\" ){\n isGameOver = 1;\n $(\".turn\").text(\"\");\n $(\".result\").text(\"Draw !\");\n } \n}", "function checkWin(player) {\n // Variables to keep track of win, start at true and are proved false\n var horizontalWin = true;\n var verticalWin = true;\n var d1Win = true;\n var d2Win = true;\n\n // Check horizontally\n for(var cIndex = 0; cIndex < NUM_COLS; cIndex++) {\n // Check each column at the same row value\n if(!boxes[row][cIndex].classList.contains(player)) {\n horizontalWin = false;\n }\n }\n\n // Check vertically\n for(var rIndex = 0; rIndex < NUM_ROWS; rIndex++) {\n // Check each row at the same column value\n if(!boxes[rIndex][column].classList.contains(player)) {\n verticalWin = false;\n }\n }\n\n // Check if the latest piece was placed in a position that could win\n // diagonally\n if((row === column) || (Math.abs(row - column) === NUM_ROWS - 1)) {\n for(var d = 0; d < NUM_ROWS; d++) {\n // Check diagonally from top left to bottom right\n if(!boxes[d][d].classList.contains(player)) {\n d1Win = false;\n }\n\n // Check diagonally from bottom left to top right\n if(!boxes[NUM_ROWS - d - 1][d].classList.contains(player)) {\n d2Win = false;\n }\n }\n }\n\n // Couldn't have won diagonally\n else {\n d1Win = false;\n d2Win = false;\n }\n\n //console.log(\"H: \" + horizontalWin + \", V: \" + verticalWin + \", D: \" + d1Win + \", \" + d2Win);\n\n // Player wins\n if(horizontalWin || verticalWin || d1Win || d2Win) {\n if(player === xClass) {\n victoryText.textContent = \"X Player Wins!\";\n // Increase score of X player\n xScore.textContent = Number(xScore.textContent) + 1\n }\n else {\n victoryText.textContent = \"O Player Wins!\";\n // Increase score of O player\n oScore.textContent = Number(oScore.textContent) + 1\n }\n\n $(victoryText).show('slow');\n gameOver = true;\n return true;\n }\n\n // If all spaces are taken and nobody has won\n if(boxCount === NUM_ROWS * NUM_COLS) {\n victoryText.textContent = \"Cat's Game\";\n $(victoryText).show('slow');\n gameOver = true;\n }\n\n // Didn't win... yet\n return false;\n\n }", "function checkForWin () {\n for (var j = 0; j < boardSize.length; i++){\n if ((boardSize[j].isMine) && (boardSize[j].hidden) === true){\n } else if ((boardSize[j].isMine) && (boardSize[j].isMarked) === true){\n } else {\n return;\n }\n }\n lib.displayMessage('You win!');\n\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n // lib.displayMessage('You win!')\n}", "function checkForWinner() {\n\t\t// each click runs checkForWinner function\n\t\tfor (var i = 0; i < winningCombo.length; i++) {\n\t\t\tif (square[winningCombo[i][0]].innerText !== \"\" &&\n\t\t\t\tsquare[winningCombo[i][0]].innerText === square[winningCombo[i][1]].innerText &&\n\t\t\t\tsquare[winningCombo[i][1]].innerText === square[winningCombo[i][2]].innerText) {\n\t\t\t\talert('You won ' + square[winningCombo[i][2]].innerText + \". Great job!\");\n\t\t\t\treturn;\n\t\t\t\twinner = square[winningCombo[i][2]].innerText;\n\t\t\t};\n\t\t}\n\t}", "function checkWinningCondition(){\n if (gameData.score[gameData.index] > gameData.gameEnd) {\n winsound.play(); //winner sound plays once someone wins\n score.innerHTML = `<h2 style=\"text-align:center;\">${gameData.players[gameData.index]}\n wins with ${gameData.score[gameData.index]} points!</h2>`;\n \n actionArea.innerHTML = \"\";\n document.getElementById(\"quit\").innerHTML = \"Start a New Game\";\n showCurrentScore();\n document.getElementById(\"gamecontrol\").style.backgroundColor = 'LightCyan';\n document.getElementById(\"score\").style.backgroundColor = 'LightCyan';\n document.getElementById(\"game\").style.backgroundColor = 'LightCyan';\n document.getElementById(\"actions\").style.backgroundColor = 'LightCyan';\n document.getElementById(\"rules\").style.backgroundColor = 'MediumTurquoise';\n document.getElementById(\"quit\").style.backgroundColor = 'MediumTurquoise';\n }\n else {\n //update score\n showCurrentScore();\n }\n }", "function declareWinner() {\n\n if (gameOn === true) {\n if (winner(board, player)) {\n winnerMsg.innerHTML = \"Player wins!\";\n gameOn = false;\n playerWins.innerHTML = playerWinsNum++;\n } else if (winner(board, computer)) {\n winnerMsg.innerHTML = \"Computer wins!\";\n gameOn = false;\n computerWins.innerHTML = computerWinsNum++;\n } else if (validMoves().length === 0) {\n winnerMsg.innerHTML = \"It's a draw!\";\n gameOn = false;\n draws.innerHTML = drawsNum++;\n }\n }\n}", "function checkForWin () {\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\nconsole.log(board.cells)\n for(cell in board.cells) {\n // if cells that are mines are not marked, return\n if (board.cells[cell].isMine === true) {\n if (board.cells[cell].isMarked !== true)\n return\n }\n // if cells that are hidden aren't marked, return\n if (board.cells[cell].isMine === false) {\n if (board.cells[cell].hidden === true || board.cells[cell].isMarked === true) {\n return\n }\n }\n }\n // otherwise, display win message! \n lib.displayMessage('You win!')\n document.getElementById('claps').play();\n showRestartGame()\n}", "function checkWinningCondition() {\n if(gameData.score[gameData.index] > gameData.gameEnd) {\n score.innerHTML = `<h2>${gameData.players[gameData.index]} wins with ${gameData.score[gameData.index]} points</h2>`;\n actionArea.innerHTML = '';\n gameControl.innerHTML = `<h2 style=\"font-size: 25px\">@${gameData.players[gameData.index]} wins with ${gameData.score[gameData.index]} points!!</h2>` + '<button id=\"quit\">quit</button>'\n showCurrentScore();\n document.getElementById('quit').innerHTML = \"<button style='width: 130px'> new game </button>\";\n document.getElementById('quit').addEventListener('click', function(){\n location.reload();\n console.log(\"set up the turn!\");\n setUpTurn();\n });\n \n } else {\n showCurrentScore();\n }\n }", "function checkForWin () {\n for (let cell of board.cells) {\n if (cell.isMine) {\n if (!cell.isMarked) {\n return false;\n }\n } else {\n if(cell.hidden) {\n return false;\n }\n }\n }\n // setEndTime\n endTime = new Date().getTime()\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!')\n // Play win audio\n document.getElementById(\"audio_win\").play()\n // reveal all mines after win\n revealMines()\n removeListeners()\n return true;\n}", "function gameOn() {\n\n var possibleWins = [];\n\n // Check to see if computer has won --------- //\n\n if (pcMoves.length >= 3) {\n for (var a = 0; a < 8; a++) {\n\n var winCheck = 0;\n\n for (var b = 0; b < 3; b++) {\n if (pcMoves.indexOf(winningArray[a][b]) >= 0) {\n winCheck += 1;\n }\n\n if (winCheck == 3) {\n winner = true;\n alert(\"Computer wins. Welcome your new robot overlords.\");\n if (playerIcon == \"<img src='http://www.collinferry.com/codepen/o.png'>\") {\n clear(1);\n } else {\n clear();\n }\n }\n\n }\n\n }\n\n }\n\n // Check to see if human has won --------- //\n\n if (humanMoves.length >= 3) {\n\n for (var a = 0; a < 8; a++) {\n\n var winCheck = 0;\n\n for (var b = 0; b < 3; b++) {\n\n if (humanMoves.indexOf(winningArray[a][b]) >= 0) {\n winCheck += 1;\n }\n\n if (winCheck == 3) {\n winner = true;\n alert(\"You Win! Humans prevail over AI...for now!\");\n if (playerIcon == \"<img src='http://www.collinferry.com/codepen/o.png'>\") {\n clear(1);\n } else {\n clear();\n }\n }\n\n }\n\n }\n\n }\n \n // Check for tie --------- //\n\n if ((takenSquares.length == 9) && (winner === false)) {\n alert(\"Game over! It's a Tie!\");\n if (playerIcon == \"<img src='http://www.collinferry.com/codepen/o.png'>\") {\n clear(1);\n } else {\n clear();\n }\n }\n\n }", "function checkWinCondition() {\n if (gameScore === targetNum) {\n alert(\"You win!\");\n wins++;\n gameScore = 0;\n crystalValues.length = 0;\n theGame();\n }\n\n //lose condition, effects\n else if (gameScore >= targetNum) {\n alert(\"You lose!\");\n losses++;\n gameScore = 0;\n crystalValues.length = 0;\n theGame();\n }\n }", "function checkForWin () {\n for (var i = 0; i < board.cells.length; i++) {\n if (!board.cells[i].isMine && board.cells[i].hidden) {return}\n if (board.cells[i].isMine && !board.cells[i].isMarked) {return}\n }\nlib.displayMessage('no rabies for you!')\n }", "function gameWin() {\n puzzleEnd(true)\n }", "function drawChecker(){\r\n if (!winChecker(gameField) && isFull()){\r\n document.getElementById('winner').innerHTML = \"Nobody wins! We have a draw(standoff)!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n}\r\n }", "function winner() {\n let hasWinner = false;\n let playerNumber = -1; // -1 for no winner\n let gameOver = false;\n let gameWinner = \"none\";\n\n if (winnerX()) { //Detect Whether X has won the game\n hasWinner = true;\n playerNumber = 1;\n player1Score++;\n }\n else if (winnerO()) { //Detect Whether X has won the game\n hasWinner = true;\n playerNumber = 2;\n player2Score++;\n }\n //Determine if all cells of the board are filled (Tie)\n else if (allFilled()) {\n hasWinner = \"Tie\";\n playerNumber = \"Tie\";\n }\n else\n hasWinner = false\n\n //Check for gameover\n // -A player has more wins than half the total rounds\n //Add 1 to the score because the value hasn't been updated yet\n if (playerNumber != -1) {\n //If the winner is player 1 or 2, check if the score before and after updating (+1) wins the game\n if (player1Score >= Math.floor((span_bestOf.innerText / 2) + 1)) { //Player 1 has won the game\n gameOver = true;\n }\n else if (player2Score >= Math.floor((span_bestOf.innerText / 2) + 1)) { //Player 2 has won the game\n gameOver = true;\n }\n else if (currentRound >= span_bestOf.innerText) { //The maximum rounds have been reached and the game is tied\n gameOver = true;\n }\n }\n\n if (gameOver) {\n if (player1Score > player2Score)\n gameWinner = \"player 1\";\n else if (player2Score > player1Score)\n gameWinner = \"player 2\";\n else\n gameWinner = \"Tie\";\n }\n\n\n const winnerData = {\n hasWinner,\n playerNumber,\n gameOver,\n gameWinner\n }\n\n return winnerData;\n\n}", "function checkWinner() {\n stopLoop();\n Game.powerUpCanvas.font = \"italic 36px calibri\";\n\n if (Game.players[1].score > Game.players[0].score) {\n Game.powerUpCanvas.fillStyle = \"Purple\";\n Game.powerUpCanvas.fillText(\"Purple player wins!\", 100, 250);\n }\n\n else if (Game.players[0].score > Game.players[1].score) {\n Game.powerUpCanvas.fillStyle = \"Green\";\n Game.powerUpCanvas.fillText(\"Green player wins!\", 500, 250);\n Game.players[0].srcX = 326;\n Game.players[0].srcY = 1182;\n }\n else if (Game.players[1].score === Game.players[0].score) {\n Game.powerUpCanvas.fillText(\"Draw!\", 390, 250);\n }\n}", "function checkRoundWinner() {\n var activePlayer = players[activePlayerIndex];\n var boardScores = getCurrentBoardRowScores();\n var winningScoreValue = activePlayer.scorePoints * 3;\n var isWinningCombination = boardScores.indexOf(winningScoreValue) > 0;\n\n if (isWinningCombination) {\n activePlayer.winningRounds++;\n return $(document).trigger('roundWinner', activePlayer);\n } else {\n return boardHasEmptySpaces() ? switchActivePlayer() : setTimeout(clearBoard, 800);\n }\n}", "function testWin(lastPlayerIsX){\n var pW; //possible winner\n if (lastPlayerIsX === true) {\n pW = \"X\";\n } else {\n pW = \"O\";\n }\n if (\n document.getElementById(\"a1\").innerHTML === pW &&\n document.getElementById(\"a2\").innerHTML === pW &&\n document.getElementById(\"a3\").innerHTML === pW ||\n document.getElementById(\"b1\").innerHTML === pW &&\n document.getElementById(\"b2\").innerHTML === pW &&\n document.getElementById(\"b3\").innerHTML === pW ||\n document.getElementById(\"c1\").innerHTML === pW &&\n document.getElementById(\"c2\").innerHTML === pW &&\n document.getElementById(\"c3\").innerHTML === pW\n ||\n document.getElementById(\"a1\").innerHTML === pW &&\n document.getElementById(\"b1\").innerHTML === pW &&\n document.getElementById(\"c1\").innerHTML === pW ||\n document.getElementById(\"a2\").innerHTML === pW &&\n document.getElementById(\"b2\").innerHTML === pW &&\n document.getElementById(\"c2\").innerHTML === pW ||\n document.getElementById(\"a3\").innerHTML === pW &&\n document.getElementById(\"b3\").innerHTML === pW &&\n document.getElementById(\"c3\").innerHTML === pW\n ||\n document.getElementById(\"a1\").innerHTML === pW &&\n document.getElementById(\"b2\").innerHTML === pW &&\n document.getElementById(\"c3\").innerHTML === pW ||\n document.getElementById(\"a3\").innerHTML === pW &&\n document.getElementById(\"b2\").innerHTML === pW &&\n document.getElementById(\"c1\").innerHTML === pW\n ) {\n\n document.getElementById(\"msg\").innerHTML = pW + \" is the winner!\";\n playing = false;\n playCount = 0;\n document.getElementById(\"resetButton\").disabled = false;\n }\n}", "function checkWinner() {\n\t// Check if all cells are active\n\tlet count = 0;\n\tfor (let cell of gridCells) {\n\t\tif (cell.classList.contains(\"active\")) {\n\t\t\tcount++;\n\t\t }\n\t\t}\n\t// If all cells are active and no winner is found below, there's a tie (ie. gameStatus remains \"tie\")\n\tif (count === 9) {\n\t gameStatus = \"Tie\";\n\t// Otherwise the game is still going\n\t} else {\n\t gameStatus = \"Playing\";\n\t}\n\t\n\t// Iterate through all winning combos to see if a winner exists\n\tfor (let i = 0; i < winningCombos.length; i++) {\n\t\tif (\n\t\t\twinningCombos[i][0].textContent === playerX.playerChoice\n\t\t\t&& winningCombos[i][1].textContent === playerX.playerChoice\n\t\t\t&& winningCombos[i][2].textContent === playerX.playerChoice\n \t) \n\t\t{\n\t\t\t// If a winner, set the board to game over\n\t\t\tgameStatus = \"Win X\";\n\t\t\tgameOver();\t\n \t} \n\t\telse if (\n\t\t\twinningCombos[i][0].textContent === playerO.playerChoice\n\t\t\t&& winningCombos[i][1].textContent === playerO.playerChoice\n\t\t\t&& winningCombos[i][2].textContent === playerO.playerChoice\n\t\t) \n\t\t{\n\t\t\t// If a winner, set the board to game over\n\t\t\tgameStatus = \"Win O\";\n\t\t\tgameOver();\t\n\t\t}\n \t}\n}", "gameWon(){\n this.addToScore(this.SCORE);\n this.resetCards();\n this.next();\n }", "function check() {\n if (win(player)) {\n playFlag = false;\n displayWinner();\n setTimeout(() => {\n resetGame();\n }, 2000);\n return;\n } else if (win(computer)) {\n playFlag = false;\n displayWinner();\n setTimeout(() => {\n resetGame();\n }, 2000);\n return;\n } else if (\n (player.length == 5 && computerTurn === true) ||\n (computer.length == 5 && computerTurn === false)\n ) {\n playFlag = false;\n winner.innerHTML = 'Draw';\n setTimeout(() => {\n resetGame();\n }, 2000);\n return;\n }\n playGame();\n}", "function hasWon() {\t\n\tif (leftHand.hasClass('rock') && rightHand.hasClass('scissors') ||\n\t\tleftHand.hasClass('paper') && rightHand.hasClass('rock') ||\n\t\tleftHand.hasClass('scissors') && rightHand.hasClass('paper')){\n\t\tplayerOneWin += 1;\n\t\tround += 1;\n\t\tleft.addClass('spinLeft').removeClass('alt leftLose');\n\t\tright.addClass('rightLose').removeClass('alt');\n\t\t$('#oneWinner').addClass('alt');\n\t} else if (rightHand.hasClass('rock') && leftHand.hasClass('scissors') ||\n\t\t\t \trightHand.hasClass('paper') && leftHand.hasClass('rock') ||\n\t\t\t\trightHand.hasClass('scissors') && leftHand.hasClass('paper')) {\n\t\tplayerTwoWin += 1;\n\t\tround += 1;\n\t\tright.addClass('spinRight').removeClass('alt rightLose');\n\t\tleft.addClass('leftLose').removeClass('alt');\n\t\t$('#twoWinner').addClass('alt');\n\t} else {\n\t\tleft.addClass('spinLeft').removeClass('alt leftLose');\n\t\tright.addClass('spinRight').removeClass('alt rightLose');\n\t\t$('#tie').addClass('alt');\n\t}\n\t// Adds score depending on win state\n\t$('#playerOneScore').text(playerOneWin);\n\t$('#playerTwoScore').text(playerTwoWin);\n\n\tsetTimeout(function(){\n\t\twinAll();\n\t}, 2000);\n\n\t//If player gets 5 wins the page reloads\n\tfunction winAll(){\n\t\tif (playerOneWin === 3) {\n\t\t\talert('Player One Wins! Click ok to restart.');\n\t\t\tlocation.reload();\n\t\t} else if (playerTwoWin === 3) {\n\t\t\talert('Player Two Wins! Click ok to restart');\n\t\t\tlocation.reload();\n\t\t}\n\t}\n}", "function setPlayerNotReadyForNextRound() {\n GameLobby.unreadyPlayers();\n}", "function winner() {\n \t$('.winner').remove();\n \tdocument.getElementById('yay').play();\n \tvar newWinnerElement = $(\"<p>Player \" + player + \" is the winner!</p>\").addClass('winner').insertAfter('button:last').hide();\n \tnewWinnerElement.fadeIn(2000);\n \tif (player == 1) {\n\t\t playerOneWins++;\n\t\t $(\"#black\").text(playerOneWins);\n\t\t $('.winner').css(\"animation\", \"highlightBlack 1s infinite alternate\");\n\t\t $('.playerone').css(\"animation\", \"highlightBlack 1s 4 alternate\");\n\t\t} else {\n\t\t playerTwoWins++;\n\t\t $(\"#red\").text(playerTwoWins);\n\t\t $('.winner').css(\"animation\", \"highlightRed 1s infinite alternate\");\n\t\t $('.playertwo').css(\"animation\", \"highlightRed 1s 4 alternate\");\n\t\t}\n\t\treturn gameRunning = false;\n }", "function checkBoard() {\n\n\tfor (var w = 0; w < 3; w++) {\n\t\tif (board[w]+board[w+3]+board[w+6]==3 || board[3*w]+board[3*w+1]+board[3*w+2]==3 || board[0]+board[4]+board[8]==3 || board[2]+board[4]+board[6]==3) {\n\t\t\tvar info = isHumanTimes?\"You Win, unbelieveble\":'You lose'\n\t\t\tif (confirm(info+', continue?') == true) {\n \t\t\t\t\treset();\n \t\t\t\t\treturn;\n\t\t\t\t} else {\n \t\t\t\treturn;\n\t\t\t\t}\t\n\t\t}\n\t\tif (board[w]+board[w+3]+board[w+6]==30 || board[3*w]+board[3*w+1]+board[3*w+2]==30 || board[0]+board[4]+board[8]==30 || board[2]+board[4]+board[6]==30) {\n\t\t\tvar info = !isHumanTimes?\"You Win, unbelieveble\":'You lose'\n\t\t\tif (confirm(info+', continue?') == true) {\n \t\t\t\t\treset();\n \t\t\t\t\treturn;\n\t\t\t\t} else {\n \t\t\t\treturn;\n\t\t\t\t}\t\n\t\t}\n\t}\n\tfor (var v = 0; v < 9; v++) {\n\t\tif (board[v] === 0){\n\t\t\treturn;\n\t\t} \n\t\telse if (v === 8) {\n\t\t\t\tvar info = 'Draw, continue?'\n\t\t\t\tif (confirm(info) == true) {\n \t\t\t\t\treset();\n \t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tgameover = false;\n \t\t\t\treturn;\n\t\t\t\t}\t\n\t\t}\n\t}\n}", "function checkWin () {\n if (p1.score > p2.score) {\n $('#hero-player-1').stop()\n $('#hero-player-1').removeClass('onechop onebreathe')\n setTimeout(function () {\n $('h1').text('Player One Wins!')\n }, 1000)\n } else if (p1.score < p2.score) {\n $('#hero-player-2').stop()\n $('#hero-player-2').removeClass('twochop twobreathe')\n setTimeout(function () {\n $('h1').text('Player Two Wins!')\n }, 1000)\n } else {\n $('h1').text(`It's a draw!`)\n }\n}", "function endTurn() {\n checkWin(currentTurn);\n if(winStatus == false && drawCounter < boardWidth) {\n switchTurn()\n } else if(winStatus == true){declareWinner()\n }\n}", "winner() {\n clearInterval(this.timeCount);\n this.soundControl.winner();\n document.getElementById('winner-msg').classList.add('visible');\n this.hideCards();\n }", "function winnerFound() {\n hideDice();\n gamePlaying = false;\n //Change player name to winner\n document.getElementById(\"name-\" + activePlayer).textContent = \"Winner\";\n // Change classes to Winner\n document\n .querySelector(\".player-\" + activePlayer + \"-panel\")\n .classList.add(\"winner\");\n document\n .querySelector(\".player-\" + activePlayer + \"-panel\")\n .classList.remove(\"active\");\n }", "function decideWinner() {\n\tgameOver = true;\n\tcardOpacity();\n\tif (player1.score > 21 && player2.score > 21) {\n\t\ttextTitle.textContent = \"No one won!\";\n\t\tdrawSound.play();\n\t\tplayer1.draws++;\n\t\tplayer2.draws++;\n\t\tdocument.querySelector(\".player1-draws\").textContent = player1.draws;\n\t\tdocument.querySelector(\".player2-draws\").textContent = player2.draws;\n\t} else if (player1.score > 21) {\n\t\ttextTitle.textContent = \"Player 2 won!\";\n\t\tlossSound.play();\n\t\tplayer2.wins++;\n\t\tplayer1.losses++;\n\t\tdocument.querySelector(\".player1-losses\").textContent = player1.losses;\n\t\tdocument.querySelector(\".player2-wins\").textContent = player2.wins;\n\t} else if (player2.score > 21) {\n\t\ttextTitle.textContent = \"Player 1 won!\";\n\t\twinSound.play();\n\t\tplayer1.wins++;\n\t\tplayer2.losses++;\n\t\tdocument.querySelector(\".player1-wins\").textContent = player1.wins;\n\t\tdocument.querySelector(\".player2-losses\").textContent = player2.losses;\n\t} else {\n\t\tconst player1Complement = 21 - player1.score;\n\t\tconst player2Complement = 21 - player2.score;\n\t\tif (player1Complement < player2Complement) {\n\t\t\ttextTitle.textContent = \"Player 1 won!\";\n\t\t\twinSound.play();\n\t\t\tplayer1.wins++;\n\t\t\tplayer2.losses++;\n\t\t\tdocument.querySelector(\".player1-wins\").textContent = player1.wins;\n\t\t\tdocument.querySelector(\".player2-losses\").textContent = player2.losses;\n\t\t} else if (player2Complement < player1Complement) {\n\t\t\ttextTitle.textContent = \"Player 2 won!\";\n\t\t\tlossSound.play();\n\t\t\tplayer2.wins++;\n\t\t\tplayer1.losses++;\n\t\t\tdocument.querySelector(\".player1-losses\").textContent = player1.losses;\n\t\t\tdocument.querySelector(\".player2-wins\").textContent = player2.wins;\n\t\t} else {\n\t\t\ttextTitle.textContent = \"Draw\";\n\t\t\tdrawSound.play();\n\t\t\tplayer1.draws++;\n\t\t\tplayer2.draws++;\n\t\t\tdocument.querySelector(\".player1-draws\").textContent = player1.draws;\n\t\t\tdocument.querySelector(\".player2-draws\").textContent = player2.draws;\n\t\t}\n\t}\n}", "function check_winner() {\r\n var scores = global_scores;\r\n var winning_move;\r\n\r\n for (var i = 0; i < scores.length; i++) {\r\n if (scores[i] == grid_size) {\r\n return 1; // X won\r\n }\r\n else if (scores[i] == -(grid_size)) {\r\n return 2; // O won\r\n }\r\n }\r\n\r\n if (moves == (grid_size * grid_size)) {\r\n return 3; // Draw\r\n }\r\n\r\n return 0; // No winner yet\r\n}", "function gameWon() {\n if (winGame == true) {\n endScreen();\n }\n}", "function winner() {\n win++;\n $('#wins-text').text(win);\n reset();\n random();\n }", "function getWinner() {\nconsole.log (\"winner\");\n//checks for X win\n if(((squares[0].innerHTML === \"X\") && (squares[1].innerHTML === \"X\") && (squares[2].innerHTML === \"X\")) ||\n ((squares[3].innerHTML === \"X\") && (squares[4].innerHTML === \"X\") && (squares[5].innerHTML === \"X\")) ||\n ((squares[6].innerHTML === \"X\") && (squares[7].innerHTML === \"X\") && (squares[8].innerHTML === \"X\")) ||\n ((squares[0].innerHTML === \"X\") && (squares[3].innerHTML === \"X\") && (squares[6].innerHTML === \"X\")) ||\n ((squares[1].innerHTML === \"X\") && (squares[4].innerHTML === \"X\") && (squares[7].innerHTML === \"X\")) ||\n ((squares[2].innerHTML === \"X\") && (squares[5].innerHTML === \"X\") && (squares[8].innerHTML === \"X\")) ||\n ((squares[0].innerHTML === \"X\") && (squares[4].innerHTML === \"X\") && (squares[8].innerHTML === \"X\")) ||\n ((squares[2].innerHTML === \"X\") && (squares[4].innerHTML === \"X\") && (squares[6].innerHTML === \"X\")))\n {\n alert(turn+\" wins!\");\n//resets board\n for (var i=0; i < squares.length; i++){\n squares[i].innerHTML=\"\";\n }\n return; \n }\n//checks for O win\n else if(((squares[0].innerHTML === \"O\") && (squares[1].innerHTML === \"O\") && (squares[2].innerHTML === \"O\")) ||\n ((squares[3].innerHTML === \"O\") && (squares[4].innerHTML === \"O\") && (squares[5].innerHTML === \"O\")) ||\n ((squares[6].innerHTML === \"O\") && (squares[7].innerHTML === \"O\") && (squares[8].innerHTML === \"O\")) ||\n ((squares[0].innerHTML === \"O\") && (squares[3].innerHTML === \"O\") && (squares[6].innerHTML === \"O\")) ||\n ((squares[1].innerHTML === \"O\") && (squares[4].innerHTML === \"O\") && (squares[7].innerHTML === \"O\")) ||\n ((squares[2].innerHTML === \"O\") && (squares[5].innerHTML === \"O\") && (squares[8].innerHTML === \"O\")) ||\n ((squares[0].innerHTML === \"O\") && (squares[4].innerHTML === \"O\") && (squares[8].innerHTML === \"O\")) ||\n ((squares[2].innerHTML === \"O\") && (squares[4].innerHTML === \"O\") && (squares[6].innerHTML === \"O\")))\n {alert(turn+\" wins!\")\n//resets board\n for (var i=0; i < squares.length; i++){\n squares[i].innerHTML=\"\";\n }\n return;\n }\n//checks for tie\n else if (\n (squares[0].innerHTML != \"\") && (squares[1].innerHTML != \"\") && (squares[2].innerHTML != \"\") &&\n (squares[3].innerHTML != \"\") && (squares[4].innerHTML != \"\") && (squares[5].innerHTML != \"\") &&\n (squares[6].innerHTML != \"\") && (squares[7].innerHTML != \"\") && (squares[8].innerHTML != \"\") )\n {alert(\"nobody wins\") \n//resets board\n for (var i=0; i < squares.length; i++){\n squares[i].innerHTML=\"\";\n }\n return;\n }\n\n}", "checker() {\n //assume we have a winner\n this.finish = true;\n\n //worst case: every hand is equal, both decks exhausted, there is no winner\n if(!this.deck1.length && !this.deck2.length) {\n this.winner = 'no winner';\n }\n //if deck1 empty, winner is player2\n else if(!this.deck1.length) {\n this.winner = 'Player 2';\n //if deck2 empty, winner is player1\n } else if(!this.deck2.length) {\n this.winner = 'Player 1';\n } else {\n //continue game\n this.finish = false;\n }\n }", "function checkForWinner(){\n let boardState = [];\n function updateBoardState (filledClass) {\n //Check Columns\n for(let i = 0; i < 3; i++){\n boardState.push($box.eq(i).hasClass(filledClass) && $box.eq(i+3).hasClass(filledClass) && $box.eq(i+6).hasClass(filledClass));\n }\n //Check Rows\n for(let i = 0; i < 7; i += 3){\n boardState.push($box.eq(i).hasClass(filledClass) && $box.eq(i+1).hasClass(filledClass) && $box.eq(i+2).hasClass(filledClass));\n }\n //Check Diagonals\n boardState.push($box.eq(0).hasClass(filledClass) && $box.eq(4).hasClass(filledClass) && $box.eq(8).hasClass(filledClass));\n boardState.push($box.eq(2).hasClass(filledClass) && $box.eq(4).hasClass(filledClass) && $box.eq(6).hasClass(filledClass));\n }\n updateBoardState('box-filled-1');\n updateBoardState('box-filled-2');\n\n //Check if all boxes have been selected\n function isBoardFull(){\n let board = $box.map((index, currBox) => {\n let $currBox = $(currBox);\n return isEmpty($currBox);\n });\n return !board.get().includes(true);\n }\n\n if(boardState.includes(true)){\n if($('.active').attr('id') === 'player1'){\n $('#finish').addClass('screen-win-one');\n $('.message').append('Winner');\n $('#finish').show();\n } else {\n $('#finish').addClass('screen-win-two');\n $('.message').append('Winner');\n $('#finish').show();\n }\n } else if(isBoardFull()) {\n $('.message').append('It\\'s a Tie!');\n $('#finish').addClass('screen-win-tie');\n $('#finish').show();\n }\n }", "function checkWin() {\n\t\tif (pairsRemain === 0) {\n\t\t\t\ttimerOff();\n\t\t\t\topenModal();\n\t\t};\n}", "function checkMoves() {\n if (picked.length !== null) {\n if (opponentPicked.length !== null) {\n checkWinner();\n }\n }\n }", "function winCheck() {\n\tif(matches === 8){\n\t\ttimerEnd();\n\t\taddRating(moves);\n\t\tpopUpModal();\n\t\tpopUp.classList.remove('display-none');\n\t}\n}", "function checkForWinner() {\n // If the active player has a score >= winningScore... \n if (scores[activePlayer] + roundScore >= winningScore) {\n // Set and display final scores\n scores[activePlayer] += roundScore;\n scoreDOMs[activePlayer].textContent = scores[activePlayer];\n currentDOMs[activePlayer].textContent = '0';\n\n // Display winner\n nameDOMs[activePlayer].textContent = 'WINNER!';\n panelDOMs[activePlayer].classList.remove('active');\n panelDOMs[activePlayer].classList.add('winner');\n\n // Disable winning score input\n winningScoreDOM.disabled = true;\n \n // Disable game progression buttons\n btnRoll.disabled = true;\n btnHold.disabled = true;\n }\n}", "checkForWin() {\n if (!this.grid.lastPlacedChip) {\n return;\n }\n const connections = this.grid.getConnections({\n baseChip: this.grid.lastPlacedChip,\n minConnectionSize: Game.winningConnectionSize\n });\n if (connections.length > 0) {\n // Mark chips in only the first winning connection, and only mark the\n // first four chips of this connection (since only a connect-four is\n // needed to win\n connections[0].length = Game.winningConnectionSize;\n connections[0].forEach((chip) => {\n chip.winning = true;\n });\n this.winner = this.grid.lastPlacedChip.player;\n this.winner.score += 1;\n this.emit('game:declare-winner', this.winner);\n this.endGame();\n }\n }", "function _checkWin() {\n\t//add X to score\n\t_score += 50;\n\t_bossScore += 50;\n\t$score.text(_score);\n\n\t_hideItems();\n\tvar newCutScene = '<div class=\"cutSceneBg\"></div>';\n\t$('.gameboard').append(newCutScene);\n\tvar newVid = _cutSceneVids[_currentCharger - 1];\n\t$('.cutSceneBg').append(newVid);\n\t$('.cutSceneBg').fadeIn('fast');\n\t$('.cutScene')[0].play();\n\t_clockRate = 0;\n\t$('.cutScene')[0].addEventListener('ended', function() {\n\t\t$('.cutScene')[0].removeEventListener('ended');\n\t\t$('.cutSceneBg').fadeOut('fast', function() {\n\t\t\tvar left = 'only ' + (_numChargers - _currentCharger + 1) + ' chargers left!';\n\t\t\t$game.statusUpdate({message:left,input:'status',screen: true,log:false});\n\t\t\t_clockRate = 1;\n\t\t\t$('.cutSceneBg').remove();\n\t\t});\n\t\tif(_currentCharger >= 4 && _bossScore === 200) {\n\t\t\t_pause = true;\n\t\t\t_currentSlide = 4;\n\t\t\t_addContent();\n\t\t\t$bossArea.show();\n\t\t} else {\n\t\t\t_placeCharger();\n\t\t}\n\t});\n}", "function checkWinner() {\n\n // Select any random icon \n const computerChoice = pickRandomChoice();\n \n // Display user and computer choice\n updateSelection(user_select, userChoice);\n updateSelection(computer_select, computerChoice);\n\n //GAME RULES \n // Draw game if user and computer have the same choice\n if(userChoice === computerChoice){ \n winner.innerText = 'draw';\n }\n\n // Check if User Win \n else if(\n (userChoice === 'paper' && computerChoice === 'rock') || (userChoice === 'rock' && computerChoice === 'scissors')\n ||\n (userChoice === 'scissors' && computerChoice === 'paper')\n ) {\n // Display User Win\n updateScore();\n winner.innerText = 'you win';\n }\n \n // Else Computer Win\n else {\n \n // Display User Lost\n updateComscore();\n winner.innerText = 'you loss';\n }\n}", "function checkWin() {\n if (userScore === numToMatch) {\n wins++;\n $(\"#wins\").text(\"Success: \" + wins);\n reset();\n } else if (userScore > numToMatch) {\n losses++\n $(\"#losses\").text(\"Fails: \" + losses);\n reset();\n }\n }", "function playerWins() {\n if (scoreOne === 5) {\n winner = winPlayerOne;\n fill(255, 51, 153);\n textSize(48);\n text(winner, width / 4, height / 2);\n setTimeout(endGame, 1500); // Wait 1.5 secons and calls endGame function\n\n } else if (scoreTwo === 5) {\n winner = winPlayerTwo;\n fill(255, 51, 153);\n textSize(48);\n text(winner, width / 4, height / 2);\n setTimeout(endGame, 1500); // Wait 1.5 secons and calls endGame function\n\n }\n}", "function checkWinner() {\n if (winner != e) return;\n for (var i = 0; i < 3; i++)\n if (board[i][0] == board[i][1] && board[i][1] == board[i][2])\n if (board[i][0] != e) winner = currPlayer;\n for (var i = 0; i < 3; i++)\n if (board[0][i] == board[1][i] && board[1][i] == board[2][i])\n if (board[0][i] != e) winner = currPlayer;\n if (board[0][0] == board[1][1] && board[1][1] == board[2][2])\n if (board[0][0] != e) winner = currPlayer;\n if (board[0][2] == board[1][1] && board[1][1] == board[2][0])\n if (board[1][1] != e) winner = currPlayer;\n if (checkFull() && winner == e) winner = tie;\n //print(winner);\n}", "function winReset(winner){\n \twinner[2] ++;\n \t$('#scores').html('P1: '+p1[2]+' <br>P2: '+p2[2]);\n \tturnCount=0;\n \t$('td').html('');\n \tboardArr = [\"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\", \"#\"];\n \tif(human === p1){\n \t\tcurrent = human;\n \t}else{\n\n \t\tlet current = comp;\n \tvar tile = pickEmpty();\n \t$('#'+tile).html(comp[1]);\n \tboardArr[tile] = comp[1];\n \tturnCount++;\n\n \t}\n \tgameWon = false;\n }", "checkWin() {\n // If computer or player 2 wins\n if (this.score1 >= 50) {\n // Clear the interval\n clearInterval(this.timeInterval);\n // Change the page state to the winning state\n this.changeState('win');\n // If multiplyer is not being played then computer wins\n if (!this.multiplayer) {\n // Display computer won\n this.winner.textContent = 'Computer Wins!';\n\n // Else player 2 wins\n } else {\n // Display player 2 won\n this.winner.textContent = 'Player 2 Wins!';\n }\n\n // If computer or player 2 wins\n } else if (this.score2 >= 50) {\n // Clear the interval\n clearInterval(this.timeInterval);\n // Change the page state to the winning state\n this.changeState('win');\n // Display player 1 won\n this.winner.textContent = 'Player 1 Wins!';\n }\n }", "function blackjackDeal(){\n if(blackjackGame.turnsOver === true && blackjackGame.player_1 === false){\n blackjackGame.turnsOver === false;\n blackjackGame.player_2 = false;\n let winner = computeWinner();\n showResult(winner);\n}}", "function resetPuzzleAndCheckWin(){\n _stage.clearRect(0, 0, _puzzleWidth, _puzzleHeight);\n var gameWin = true;\n var i;\n var piece;\n for(i = 0; i < _pieces.length; i ++){\n piece = _pieces[i];\n _stage.drawImage(_img, piece.sx, piece.sy, _pieceWidth, _pieceHeight, piece.xPos, piece.yPos, _pieceWidth, _pieceHeight);\n _stage.strokeRect(piece.xPos, piece.yPos, _pieceWidth, _pieceHeight);\n if(piece.xPos != piece.sx || piece.yPos != piece.sy){\n gameWin = false;\n }\n }\n if(gameWin){\n setTimeout(gameOver, 500);\n }\n}", "function check() {\n if (playerOrder[playerOrder.length - 1] !== order[playerOrder.length - 1])\n score = false;\n if (playerOrder.length == 20 && score) {\n winGame();\n }\n if (score == false) {\n flashColor();\n roundCount.innerHTML = \"NO!\";\n setTimeout(() => {\n roundCount.innerHTML = round;\n clearColor();\n\n if (strictButton) {\n play();\n } else {\n compRound = true;\n flash = 0;\n playerOrder = [];\n score = true;\n intervalId = setInterval(gameRound, 800);\n }\n }, 800);\n if (muteButton == false)\n muteButton = false;\n }\n if (round == playerOrder.length && score && !win) {\n round++;\n playerOrder = [];\n compRound = true;\n flash = 0;\n roundCount.innerHTML = round;\n intervalId = setInterval(gameRound, 800);\n }\n}", "function checkWin() {\n if (currentSquare === finishPoint) {\n gameState = false;\n changeAllSquareColor('green');\n gameRound += 1;\n\n $('.displayRound').text(\"Round: \" + gameRound)\n\n $('.sidePannel').css(\"margin\", \"100px 0px\")\n\n resetGame();\n };\n}", "resetGame() {\n this.winner = null;\n this.grid.resetGrid();\n }", "function winCheck() {\n if (userScore === computerPick) {\n wins++;\n $(\"#wins\").html(\"Wins: \" + wins);\n alert(\"Winning isn’t everything, it’s the ONLY thing\");\n newGame();\n }\n\n else if (userScore > computerPick) {\n losses++;\n $(\"#losses\").html(\"Losses: \" + losses);\n alert(\"...if you ain't first, you're last\");\n newGame();\n };\n }", "function getWinner() {\n \n // var token = [\"x\", \"o\"];\n // for (var i = 0; i < tokens.length; i++)\n // var t = tokens[i];\n // var winner_found = false\n // if \n\n // if(t == \"x\") {\n // // player 1 wins, increase p1 score, return\n // } else {\n // //player 2 wins, increase p2 score, return\n // }\n\n // checks for x win\n if (\n ((self.gameBoard.boxes[0].isX) \n && (self.gameBoard.boxes[1].isX) \n && (self.gameBoard.boxes[2].isX)) \n || ((self.gameBoard.boxes[3].isX) \n && (self.gameBoard.boxes[4].isX) \n && (self.gameBoard.boxes[5].isX)) \n || ((self.gameBoard.boxes[6].isX)\n && (self.gameBoard.boxes[7].isX) \n && (self.gameBoard.boxes[8].isX)) \n || ((self.gameBoard.boxes[0].isX) \n && (self.gameBoard.boxes[3].isX) \n && (self.gameBoard.boxes[6].isX)) \n || ((self.gameBoard.boxes[1].isX) \n && (self.gameBoard.boxes[4].isX) \n && (self.gameBoard.boxes[7].isX)) \n || ((self.gameBoard.boxes[2].isX) \n && (self.gameBoard.boxes[5].isX) \n && (self.gameBoard.boxes[8].isX)) \n || ((self.gameBoard.boxes[0].isX) \n && (self.gameBoard.boxes[4].isX) \n && (self.gameBoard.boxes[8].isX)) \n || ((self.gameBoard.boxes[2].isX) \n && (self.gameBoard.boxes[4].isX) \n && (self.gameBoard.boxes[6].isX))\n ){\n /*\n changes gameStatus & p1 score if x has won\n stops looking for a win or tie\n */\n self.gameBoard.gameStatus = self.gameBoard.player1.myName + \" wins!\";\n self.gameBoard.p1++;\n self.gameBoard.$save(self.gameBoard.p1);\n return;\n }\n \n // checks for o win\n if (\n ((self.gameBoard.boxes[0].isO) \n && (self.gameBoard.boxes[1].isO) \n && (self.gameBoard.boxes[2].isO)) \n || ((self.gameBoard.boxes[3].isO) \n && (self.gameBoard.boxes[4].isO) \n && (self.gameBoard.boxes[5].isO)) \n || ((self.gameBoard.boxes[6].isO) \n && (self.gameBoard.boxes[7].isO) \n && (self.gameBoard.boxes[8].isO)) \n || ((self.gameBoard.boxes[0].isO) \n && (self.gameBoard.boxes[3].isO) \n && (self.gameBoard.boxes[6].isO)) \n || ((self.gameBoard.boxes[1].isO) \n && (self.gameBoard.boxes[4].isO) \n && (self.gameBoard.boxes[7].isO)) \n || ((self.gameBoard.boxes[2].isO) \n && (self.gameBoard.boxes[5].isO) \n && (self.gameBoard.boxes[8].isO)) \n || ((self.gameBoard.boxes[0].isO) \n && (self.gameBoard.boxes[4].isO) \n && (self.gameBoard.boxes[8].isO)) \n || ((self.gameBoard.boxes[2].isO) \n && (self.gameBoard.boxes[4].isO) \n && (self.gameBoard.boxes[6].isO))\n ){\n /*\n changes gameStatus & p2 score if o has won\n stops looking for a win or tie\n */\n self.gameBoard.gameStatus = self.gameBoard.player2.myName + \" wins!\";\n self.gameBoard.p2++;\n self.gameBoard.$save(self.gameBoard.p2);\n return;\n }\n \n // checks for tie\n var cellEmpty = false;\n for (var i = 0; i < self.gameBoard.boxes.length; i++) {\n if ((self.gameBoard.boxes[i].isX === false) \n && (self.gameBoard.boxes[i].isO === false)) {\n cellEmpty = true;\n }\n }\n if (cellEmpty === false) {\n /*\n changes gameStatus & tie count if it is a tie\n */\n self.gameBoard.gameStatus = \"It's a tie!\"\n self.gameBoard.$save(self.gameBoard.gameStatus);\n self.gameBoard.tie++;\n self.gameBoard.$save(self.gameBoard.tie);\n }\n \n }", "function check_winner(){ //NOT FUNCTIONING YET //see if there's a winner\n\tconsole.log(\"check winner run\"); \n\tconsole.log('value of i is _'+ i);\n\tfor(var i = 0; i < win_options.length; i++){\n\t\tfor(var j=0; j <win_options[i].length; j++){\n\t\n\t\t\tif(player_clicks[win_options[i][0]]==player_clicks[win_options[i][1]]\n\t\t\t\t&&\n\t\t\t\tplayer_clicks[win_options[i][1]]==player_clicks[win_options[i][2]]){\n\t\t\t\twin_confirmation();\n\t\t\t\twinner_found = 1;\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t}\n}", "check_winner() {\n //check all horizontal\n let player_won = false;\n let winner;\n let where_string;\n if (this.check_winner_row(0)) {\n player_won = true;\n winner = this.board_spaces[0].get_top();\n where_string = 'on row 1';\n } else if (this.check_winner_row(4)) {\n player_won = true;\n winner = this.board_spaces[4].get_top();\n where_string = 'on row 2';\n } else if (this.check_winner_row(8)) {\n player_won = true;\n winner = this.board_spaces[8].get_top();\n where_string = 'on row 3';\n } else if (this.check_winner_row(12)) {\n player_won = true;\n winner = this.board_spaces[12].get_top();\n where_string = 'on row 4';\n }\n //check all vertical\n else if (this.check_winner_column(0)) {\n player_won = true;\n winner = this.board_spaces[0].get_top();\n where_string = 'on column 1';\n } else if (this.check_winner_column(1)) {\n player_won = true;\n winner = this.board_spaces[1].get_top();\n where_string = 'on column 2';\n } else if (this.check_winner_column(2)) {\n player_won = true;\n winner = this.board_spaces[2].get_top();\n where_string = 'on column 3';\n } else if (this.check_winner_column(3)) {\n player_won = true;\n winner = this.board_spaces[3].get_top();\n where_string = 'on column 4';\n }\n //check diagonals\n else if (this.check_winner_diagonal_left(0)) {\n player_won = true;\n winner = this.board_spaces[0].get_top();\n where_string = 'on the top left diagonal';\n } else if (this.check_winner_diagonal_right(3)) {\n player_won = true;\n winner = this.board_spaces[3].get_top();\n where_string = 'on the top right diagonal';\n }\n if (player_won) {\n alert(`Player ${winner} won ${where_string}`)\n }\n }", "function checkWinner(player, x, y) {\n if (isWinning(player, x, y) ) {\n playSound('pacman_intermission.wav');\n player.winCount++;\n animUpdateScoreboard();\n updateLocalStorage(player);\n $('.battlefield li').off('click', computeAndCheckWinner);\n alert(player.name + ' wins!');\n // animation on Clear button to make it stand out, disappears on click\n\n } else if (usedFields.length === 9){\n playSound('pacman_death.wav');\n return alert('Tie game!');\n $('.battlefield li').off('click', computeAndCheckWinner);\n // animation on Clear button to make it stand out\n }\n}", "function hasUserLost() {\n //check to see if the user has won\n if (guessesLeft == 0 ) {\n console.log(\"USER LOSES\");\n //user has won, increment wins\n losses++;\n //add image and audio HTML if you have time. \n resetGame();\n }\n\n}", "winner(winState) { \r\n for (let i in winState.spaces) {\r\n $(\"#\"+ winState.spaces[i]).addClass(\"winTile\");\r\n }\r\n $(\"#resultBox\").show()\r\n $(\"#resultBox\").html(\"Player \" +this.curPlayer +\" wins\");\r\n $(\".tile\").prop(\"disabled\", true);\r\n this.gameOver = true; //Stops AI going if player won\r\n }", "function check() {\n if (playerOrder[playerOrder.length - 1] !== order[playerOrder.length - 1])\n good = false;\n\n if (playerOrder.length == 6 && good) {\n winGame();\n }\n /*------------If wrong answers----------*/\n if (good == false) {\n flashColor();\n turnCounter.innerHTML = \"NO!\";\n setTimeout(() => {\n play();\n\n }, 800);\n\n noise = false;\n }\n /*------------If good answer but not win game move to the other level----------*/\n if (turn == playerOrder.length && good && !win) {\n turn++;\n playerOrder = [];\n compTurn = true;\n flash = 0;\n turnCounter.innerHTML = turn;\n intervalId = setInterval(gameTurn, 800);\n }\n\n}", "function hasWon(){\n if (total_score === targetNumber){\n win++;\n $(\".win\").text(win);\n $(\".reset_game\").show();\n $(\".clickImg\").off();\n console.log(\"you won\");\n return true;\n }\n }", "function checkForWin() \n{\n /*console.log(blacksPieces.length+whitesPieces.length+ \"possiblePlace.length = \" + possiblePlaces.length)*/\n /* Here we check to see if the gameboard is full */\n if( (blacksPieces.length + whitesPieces.length) == 64 || (whitePlayer.numberOfPossible == 0 && blackPlayer.numberOfPossible == 0) )\n {\n if (blacksPieces.length > whitesPieces.length)\n {\n divider.style.display = \"none\";\n for (let i = 0; i < blackTurntext.length; i++) { \n blackTurntext[i].style.color = \"white\";\n whiteTurnText[i].style.display = \"none\";\n blackTurntext[i].textContent = \"BLACK WINS!\";\n }\n \n }\n else if(blacksPieces.length < whitesPieces.length)\n {\n divider.style.display = \"none\";\n for (let i = 0; i < blackTurntext.length; i++) { \n whiteTurnText[i].style.color = \"white\";\n blackTurntext[i].style.display = \"none\";\n whiteTurnText[i].textContent = \"White WINS!\";\n }\n }\n }\n /* Here we check to see if neither player can move. */\n \n /* if( possiblePlaces.length == 0 ) \n {\n /*switch to other player POV to check possible moves\n turn = !turn;\n if (turn) {\n playerPieces = whitesPieces;\n } \n else {\n playerPieces = blacksPieces;\n }\n resetPossibleMoves();\n if( possiblePlaces.length == 0 )\n {\n if (blacksPieces.length > whitesPieces.length)\n {\n divider.style.display = \"none\";\n for (let i = 0; i < blackTurntext.length; i++) { \n blackTurntext[i].style.color = \"white\";\n whiteTurnText[i].style.display = \"none\";\n blackTurntext[i].textContent = \"BLACK WINS!\";\n }\n \n }\n else if(blacksPieces.length < whitesPieces.length)\n {\n divider.style.display = \"none\";\n for (let i = 0; i < blackTurntext.length; i++) { \n whiteTurnText[i].style.color = \"white\";\n blackTurntext[i].style.display = \"none\";\n whiteTurnText[i].textContent = \"White WINS!\";\n }\n }\n else\n {\n divider.style.display = \"none\";\n for (let i = 0; i < blackTurntext.length; i++) \n { \n whiteTurnText[i].style.color = \"white\";\n blackTurntext[i].style.display = \"none\";\n whiteTurnText[i].textContent = \"DRAW\";\n `` }\n ``}\n }\n /*switch back to original player\n turn = !turn;\n if (turn) {\n playerPieces = whitesPieces;\n } \n else {\n playerPieces = blacksPieces;\n }\n resetPossibleMoves();\n } */\n}", "function winChecker(gameField){\r\n if (gameField[0][0] === gameField[0][1] && gameField[0][1] === gameField[0][2] && gameField[0][0] != \"\" ) {\r\n document.getElementById('winner').innerHTML = gameField[0][0] + \" wins!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n return true;\r\n }\r\n\r\n if (gameField[1][0] === gameField[1][1] && gameField[1][1] === gameField[1][2] && gameField[1][0] != \"\") {\r\n document.getElementById('winner').innerHTML = gameField[1][0] + \" wins!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n return true;\r\n }\r\n\r\n if (gameField[2][0] === gameField[2][1] && gameField[2][1] === gameField[2][2] && gameField[2][0] != \"\") {\r\n document.getElementById('winner').innerHTML = gameField[2][0] + \" wins!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n return true;\r\n }\r\n if (gameField[0][0] === gameField[1][0] && gameField[1][0] === gameField[2][0] && gameField[0][0] != \"\") {\r\n document.getElementById('winner').innerHTML = gameField[0][0] + \" wins!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n return true;\r\n }\r\n if (gameField[0][1] === gameField[1][1] && gameField[1][1] === gameField[2][1] && gameField[0][1] != \"\") {\r\n document.getElementById('winner').innerHTML = gameField[0][1] + \" wins!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n return true;\r\n }\r\n if (gameField[0][2] === gameField[1][2] && gameField[1][2] === gameField[2][2] && gameField[0][2] != \"\") {\r\n document.getElementById('winner').innerHTML = gameField[0][2] + \" wins!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n return true;\r\n }\r\n if (gameField[0][0] === gameField[1][1] && gameField[1][1] === gameField[2][2] && gameField[0][0] != \"\") {\r\n document.getElementById('winner').innerHTML = gameField[0][0] + \" wins!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n return true;\r\n }\r\n if (gameField[0][2] === gameField[1][1] && gameField[1][1] === gameField[2][0] && gameField[0][2] != \"\") {\r\n document.getElementById('winner').innerHTML = gameField[0][2] + \" wins!\";\r\n disableAllbuttons();\r\n showButton(\"new_game\");\r\n return true;\r\n }\r\n return false;\r\n}", "function checkForWin(){\n\tif((sq1.innerHTML !== \"\") && (sq1.innerHTML === sq2.innerHTML) && (sq1.innerHTML === sq3.innerHTML)) {\n\t\tgameOver = true;\n\t\tmarkWin(sq1, sq2, sq3);\n\t\twinner.innerHTML = \"Player \" + sq1.innerHTML + \" is the winner!\";\n\t}\n\telse if((sq4.innerHTML !== \"\") && (sq4.innerHTML === sq5.innerHTML) && (sq4.innerHTML === sq6.innerHTML)) {\n\t\tgameOver = true;\n\t\tmarkWin(sq4, sq5, sq6);\n\t\twinner.innerHTML = \"Player \" + sq4.innerHTML + \" is the winner!\";\n\t}\n\telse if((sq7.innerHTML !== \"\") && (sq7.innerHTML === sq8.innerHTML) && (sq7.innerHTML === sq9.innerHTML)) {\n\t\tgameOver = true;\n\t\tmarkWin(sq7, sq8, sq9);\n\t\twinner.innerHTML = \"Player \" + sq7.innerHTML + \" is the winner!\";\n\t}\n\telse if((sq1.innerHTML !== \"\") && (sq1.innerHTML === sq4.innerHTML) && (sq1.innerHTML === sq7.innerHTML)) {\n\t\tgameOver = true;\n\t\tmarkWin(sq1, sq4, sq7);\n\t\twinner.innerHTML = \"Player \" + sq1.innerHTML + \" is the winner!\";\n\t}\n\telse if((sq2.innerHTML !== \"\") && (sq2.innerHTML === sq5.innerHTML) && (sq2.innerHTML === sq8.innerHTML)) {\n\t\tgameOver = true;\n\t\tmarkWin(sq2, sq5, sq8);\n\t\twinner.innerHTML = \"Player \" + sq2.innerHTML + \" is the winner!\";\n\t}\n\telse if((sq3.innerHTML !== \"\") && (sq3.innerHTML === sq6.innerHTML) && (sq3.innerHTML === sq9.innerHTML)) {\n\t\tgameOver = true;\n\t\tmarkWin(sq3, sq6, sq9);\n\t\twinner.innerHTML = \"Player \" + sq3.innerHTML + \" is the winner!\";\n\t}\n\telse if((sq1.innerHTML !== \"\") && (sq1.innerHTML === sq5.innerHTML) && (sq1.innerHTML === sq9.innerHTML)) {\n\t\tgameOver = true;\n\t\tmarkWin(sq1, sq5, sq9);\n\t\twinner.innerHTML = \"Player \" + sq1.innerHTML + \" is the winner!\";\n\t}\n\telse if((sq3.innerHTML !== \"\") && (sq3.innerHTML === sq5.innerHTML) && (sq3.innerHTML === sq7.innerHTML)) {\n\t\tgameOver = true;\n\t\tmarkWin(sq3, sq5, sq7);\n\t\twinner.innerHTML = \"Player \" + sq3.innerHTML + \" is the winner!\";\n\t}\n}", "displayWinner() {\n var winningPiece = game.isXTurn ? 'x' : 'o'\n if(game.singleplayer || game.vsAi)\n game.winner = winningPiece\n else\n {\n if(game.player === winningPiece)\n game.winner = game.username\n else\n game.winner = game.opponent\n }\n\n\n game.saveBoard()\n\n game.state.start('win')\n }", "function selWinnerFin(){\n mainCard.src = \"images/card.svg\";\n gameData.win = Math.round(Math.random());\n console.log(`${gameData.win}`);\n if (gameData.win == 0) {\n turn.innerHTML = `The computer chooses: ${gameData.players[0]}`;\n deck1.remove();\n deck2.remove();\n gameData.score[0]++;\n }\n else if (gameData.win == 1) {\n turn.innerHTML = `The computer chooses: ${gameData.players[1]}`;\n deck1.remove();\n deck2.remove();\n gameData.score[1]++;\n }\n setTimeout(function(){showWinner();}, 1000);\n}" ]
[ "0.7918461", "0.7475996", "0.7290871", "0.72637683", "0.71598727", "0.7147194", "0.71239096", "0.7073445", "0.70607746", "0.7053345", "0.7046313", "0.70215315", "0.7016849", "0.700809", "0.6997564", "0.69965994", "0.6990546", "0.6960273", "0.6958654", "0.6956176", "0.69518536", "0.69479907", "0.69439685", "0.69396263", "0.6932863", "0.69209164", "0.69143105", "0.6908098", "0.6897933", "0.6893994", "0.6889286", "0.68807876", "0.68777096", "0.68718", "0.68595976", "0.68563294", "0.685194", "0.6851082", "0.68499714", "0.6849595", "0.68495816", "0.6847866", "0.68461615", "0.6840905", "0.6820939", "0.6813004", "0.6806618", "0.6803024", "0.6802778", "0.6799149", "0.6797876", "0.6797461", "0.6797435", "0.6796587", "0.6793494", "0.67918503", "0.67838836", "0.67838115", "0.67815834", "0.677841", "0.6776166", "0.6770068", "0.67665243", "0.67663366", "0.67657566", "0.6764063", "0.67634153", "0.67601913", "0.6758494", "0.6758242", "0.6754077", "0.67520803", "0.6746426", "0.6742929", "0.6742594", "0.6740394", "0.67383313", "0.6737977", "0.6736356", "0.6719765", "0.67182165", "0.67140347", "0.67087835", "0.6705313", "0.670505", "0.66996276", "0.6697261", "0.6690307", "0.6685934", "0.6685914", "0.6684866", "0.6677485", "0.6673446", "0.6665983", "0.66627634", "0.66615623", "0.6657991", "0.66518945", "0.6651062", "0.66477805" ]
0.67979187
50
Creates messages for who's turn it is or whoever won. Displayed in html
function setMessage(msg){ document.getElementById('gameMessage').innerHTML = msg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createDynamicMessage(){\n this._$dynamicMsg.empty();\n\n let currentPlayer;\n if(this.model.currentPlayer == \"x\") currentPlayer = \"<span class='x'>Player 1</span>\";\n else currentPlayer = \"<span class='o'>Player 2</span>\";\n let string = \"<h3>\";\n\n if(this.model.winner == this.model.player1 || this.model.winner == this.model.player2){\n string += (\"GAME OVER: \"+currentPlayer+\" wins!\");\n }\n else if(this.model.freeLots == 0){\n string += \"GAME OVER: No more turns available!\";\n }\n else{\n string += (currentPlayer+\", take your turn!\");\n }\n string += \"</h3>\";\n this._$dynamicMsg.append(string);\n }", "displayWinningMessage() {\n this.setRank();\n\n const winningMessage = this.createWinningMessage();\n\n this.gameSlideOut();\n\n this.removeDifficultyClassesAndAddVictoryToGameContainer();\n this.displayMessage(winningMessage);\n\n this.showText(winningMessage);\n }", "function message() {\n var insultGiv = insult[Math.floor((Math.random())* insult.length)]\n var choreGiv = chore[Math.floor((Math.random())* chore.length)]\n var commentGiv = comment[Math.floor((Math.random())* comment.length)]\n return `Wake up ${insultGiv}! You have to ${choreGiv} today. Get it done ${commentGiv}.`\n}", "function renderMessage() {\n document.getElementById(\"msg\").textContent = `Play ${\n turn % 2 ? \"O\" : \"X\"\n } Wins!`;\n}", "createWinningMessage() {\n const winningMessage = document.createElement('div');\n winningMessage.classList.add('winningMessage');\n winningMessage.innerHTML = this.getMessageHTML();\n return winningMessage;\n }", "function Status({state}) {\n\t\tif (util.gameWon(state.recorded)) { \n\t\t\treturn <p id=\"Win\">You Win!</p>\n\t\t}\n\t\telse if (util.gameLost(state.recorded)) { \n\t\t\treturn <p id=\"Lose\">You Lose!</p>\n\t\t}\n\t\telse {\n\t\t\tvar msg = \"Guesses left: \" + (8 - state.recorded.length)\n\t\t\treturn <p>{msg}</p>;\n\t\t}\n\t}", "function playerScoreMessage() {\n let scoreMessage = document.getElementById(\"score\")\n let playerWinsMessage = \"\";\n let playerLossesMessage = \"\";\n switch (playerWins) {\n case 0:\n playerWinsMessage = \"You have not won yet\";\n break;\n case 1:\n playerWinsMessage = \"You have won 1 time\";\n break;\n default:\n playerWinsMessage = \"You have won \" + playerWins + \" times\";\n }\n switch (playerLosses) {\n case 0:\n playerLossesMessage = \"have not lost yet.\";\n break;\n case 1:\n playerLossesMessage = \"have lost once.\";\n break;\n default:\n playerLossesMessage = \"have lost \" + playerLosses + \" times.\";\n }\n scoreMessage.textContent = playerWinsMessage + \" and \" + playerLossesMessage;\n}", "function answerFromCustomer(/* string msg to sentd*/msg, /* bot name */userName){\n // get current date\n var now = new Date();\n var time = formatAMPM(now);\n var msgHtml = '<li class=\"mar-btm\"><div class=\"media-right\"><img src=\"img/avatar2.jpg\" class=\"img-circle img-sm\" alt=\"Profile Picture\"></div>'\n + '<div class=\"media-body pad-hor speech-right\"><div class=\"speech\">'\n + '<a href=\"#\" class=\"media-heading\">' + userName + '</a><p>'\n + msg + '</p><p class=\"speech-time\"><i class=\"fa fa-clock-o fa-fw\"></i>&nbsp;'\n + time + '</p></div></div></li>';\n return msgHtml;\n}", "function guessMessage() {\n\t\tvar one = lowerOrHigher();\n\t\tvar two = (Math.abs(playersGuess- winningNumber));\n\t\tvar feedback;\n\n\t\tif(two>30) {\n\t\t\tfeedback = one + \"The distance between your number and the winning number is greater than 30. \";\n\t\t} else if(two<=30 && two>=20) {\n\t\t\tfeedback = one + \"The distance between your number and the winning number ranges between 20 and 30. \"\n\t\t} else if(two<20 && two>=10) {\n\t\t\tfeedback = one + \"The distance between your number and the winning number ranges between 10 and 20. \"\n\t\t} else {\n\t\t\tfeedback = one + \"You are CLOSE. The distance between your number and the winning number is lower than 10. \"\n\t\t}\n\n\t\t$('#guessMessage').text(feedback);\n\t\t\t\n\t}", "randomMessage(won) {\n var self = this;\n\n // Timeout is used so it doesn't feel to weird after getting a wrong combination\n setTimeout(function() {\n if(won) {\n msgWindow.textContent = self.compliment[parseInt(self.compliment.length * Math.random())];\n } else {\n msgWindow.textContent = self.error[parseInt(self.error.length * Math.random())];\n }\n\n // To display and remove the window with a custom message\n msgWindow.classList.add(\"active\"), \n setTimeout(function () { \n msgWindow.classList.remove(\"active\"); \n }, 1100); \n }, 200);\n }", "function showWinMessage() {\n playerMoney += winnings;\n playerCredit = playerCredit + winnings;\n messageLabel.text = \"You win \\n$\" + winnings + \"\";\n winningsLabel.text = \"\" + playerMoney + \"\";\n creditLabel.text = \"\" + playerCredit + \"\";\n resetFruitTally();\n checkJackPot();\n }", "function constructMessage(isWinner, lotType, matching) {\n var newMessage = \"\";\n if (isWinner) { // winner message\n newMessage = \"You are a winner!\";\n } else { // not a winner message\n newMessage = \"ohhh noo, you got \" + matching.length;\n switch (matching.length) { // display message based on how many matches\n case 0:\n newMessage += \" match.\";\n break;\n case 1:\n newMessage += \" match. it was \";\n break;\n default:\n newMessage += \" matches. They were \";\n break;\n }\n // add actuall matching numbers to message\n for (var match in matching) {\n newMessage += matching[match] + \" \";\n }\n }\n // display winning numbers\n newMessage += \"\\n the winning numbers are: \";\n for (var winningNumber in winningNumbers) {\n newMessage += winningNumbers[winningNumber] + \" \";\n }\n // add powerball if applicable\n if (lotType == \"Powerball\") {\n newMessage += \" with Powerball \" + pbWinningNumber;\n }\n // display player numbers\n newMessage += \"\\n the player numbers are: \";\n for (var playerNumber in playerNumbers) {\n newMessage += playerNumbers[playerNumber] + \" \";\n }\n // add powerball if applicable\n if (lotType == \"Powerball\") {\n newMessage += \" with Powerball \" + pbPlayerNumber;\n }\n return newMessage; // return constructed message\n }", "function createInitialMessage() {\n var d = new Date();\n let initialMessage = '***************************\\nNovo jogo iniciado em ' +\n d.getDate() + '/' + (d.getMonth() + 1) + '/' + d.getFullYear() + ' - ' +\n d.getHours() + ':' + d.getMinutes() + '\\n***************************\\n';\n for (let i = 0; i < playerNo; i++) {\n initialMessage += playerNames[i].innerHTML + ' - ' + roleNames[i].innerHTML + '\\n';\n }\n return initialMessage;\n }", "function winnerMessage(winner) {\n if(winner === null){\n return \"The election was a draw\";\n } else {\n return winner.name + \" has won the election with \" + winner.numVotes + \" votes!\";\n }\n}", "function toUserStr( msg ) {\n return \"<p class='random'>\" + msg.userName + toTimeStr(msg.messageTime) + \": \" + msg.message + \"<br/></p>\";\n }", "function answerFromBot(/* string msg to sentd*/msg, /* bot name */botName){\n // get current date\n var now = new Date();\n var time = formatAMPM(now);\n var msgHtml = '<li class=\"mar-btm\"><div class=\"media-left\"><img src=\"img/avatar1.jpg\" class=\"img-circle img-sm\" alt=\"Profile Picture\">'\n + '</div> <div class=\"media-body pad-hor speech-left2\"><div class=\"speech\" style=\"padding:20px 10px;\"><a href=\"#\" class=\"media-heading\">'\n + botName + '</a><p>' + msg + '</p><p class=\"speech-time\"><i class=\"fa fa-clock-o fa-fw\"></i>&nbsp;'\n + time + '</p></div></div></li>';\n return msgHtml;\n}", "function messageByYou(altUser,data)\n{\n messageArea.innerHTML +='<div class=\"panel-body clearfix\"> <span class=\"chat-img \"> <img src=\"http://placehold.it/50/FA6F57/fff&text='+altUser+'\" alt=\"User Avatar\" class=\"img-circle\" title=\"'+data.user+'\"/> </span> <div class=\"chat-body right clearfix \"> <small class=\"text-muted time-ago pull-right\" title=\"'+Date.now()+'\"> <span class=\" glyphicon glyphicon-time \"></span>just now</small><p> '+\" \"+data.message+'</p> </div></div>';\n //messageArea.innerHTML +='<div class=\"panel-body left clearfix\"> <span class=\"chat-img pull-left\"> <img src=\"http://placehold.it/50/FA6F57/fff&text='+altUser+'\" alt=\"User Avatar\" class=\"img-circle\" title=\"'+data.user+'\"/> </span> <div class=\"chat-body right clearfix \"> <small class=\" text-muted time-ago pull-right\" title=\"'+Date.now()+'\"> <span class=\"glyphicon glyphicon-time\"></span>just now</small><p class=\"pull-right\"> '+data.message+'</p></div> </div>';\n}", "getMessageHTML() {\n const message = `\n <h1>Mission Complete</h1>\n <p>Time: ${this.currentTime} seconds</p>\n <p class=\"difficulty\">Difficulty: <span class=\"${this.difficulty}\">${\n this.difficulty\n }</p></p>\n ${this.rank ? this.celebrateMessage : ''}\n <button id=\"play-again\" class=\"play-again\">Play Again</button>\n ${this.insertDifficultyChanger()}\n `;\n return message;\n }", "function tracker() {\n var a = document.getElementById(\"turn-tracker\");\n var msg = determineWinner();\n \n if (msg === \"X\") {\n message = \"Player X wins!\";\n gameOver();\n }\n else if (msg === \"O\") {\n message = \"Player O wins!\";\n gameOver();\n }\n else if (turnCounter < 9) {\n message = \"Player \" + turn + \", it's your move!\";\n } \n else {\n message = \"Game over!\";\n gameOver();\n } \n a.innerHTML = message;\n }", "function message() {\n msg = document.querySelector(\"h3\").textContent =\n \"It's \" + `${current_player}` + \"'s\" + \" turn.\";\n}", "function message() {\n\t// If player X wins\n\tif (gameStatus === \"Win X\"){\n\t\tmessageDiv.textContent = \"Congratulations Player X!\";\n\t// If player O wins\n \t} else if (gameStatus === \"Win O\") {\n\t \tmessageDiv.textContent = \"Congratulations Player O!\";\n\t// If there's a tie\n \t} else if (gameStatus === \"Tie\") {\n\t \tmessageDiv.textContent = \"It's a tie!\";\n\t// If the game is still going, whose turn it is\n \t} else if (gameStatus === \"Playing\") {\n\t\tif (playerX.playerTurn) {\n\t\t\tmessageDiv.textContent = \"It's Player X's Turn!\";\n \t} else {\n\t \tmessageDiv.textContent = \"It's Player O's Turn!\";\n \t}\n \t}\n}", "function whoWins(winner) {\r\n var winString = document.createElement(\"DIV\");\r\n winString.classList.add(\"winnerText\");\r\n\r\n if (winner == 1) {\r\n winString.innerHTML = \"Player Wins\";\r\n playerwins.innerHTML = ++playerHand.wins;\r\n\r\n } else {\r\n winString.innerHTML = \"Dealer Wins\";\r\n dealerwins.innerHTML = ++dealerHand.wins;\r\n }\r\n winnerarea.appendChild(winString);\r\n gameOver();\r\n }", "createTeamMsg(vote, game) {\n var [discordStringTeam1, discordStringTeam2] = game.toDiscordStrings();\n if(vote == \"b\") { vote = \"Balanced\" }\n if(vote == \"c\") { vote = \"Captains\" }\n if(vote == \"r\") { vote = \"Random\" }\n var teamsMsg = new discord.RichEmbed()\n .setTitle(`***${vote}*** teams have been selected!`)\n .addField(\"Team 1:\", discordStringTeam1)\n .addField(\"Team 2:\", discordStringTeam2)\n .addField(\"Match ID (use for reporting result):\", game.gameId)\n .setColor(embedColor)\n .setFooter(footer, footerImage)\n\n console.log(`[Game] ${vote} Match created ID: ${game.gameId}`);\n\n return teamsMsg;\n }", "function setupWelcomeMessage(){\n let currentHours = new Date().getHours();\n if (currentHours <=3 || currentHours >21){\n selectHours = 0;\n }else if (currentHours >3 && currentHours <12){\n selectHours = 1;\n }else if (currentHours >=12 && currentHours <17){\n selectHours = 2;\n }else{\n selectHours = 3;\n }\n settings.userName = discordusername; // Global var from index.php\n // let welcome = \"Good \" + welcomeTemplate[selectHours] + \", \" + settings.userName + \", Welcome To Dual.sh\";\n let welcome = \"Good \" + welcomeTemplate[selectHours] + \", Welcome To Dual.sh\";\n //let welcome = \"Welcome back, \" + settings.userName;\n document.getElementById(\"welcome-greeting\").innerHTML = welcome;\n}", "function render() {\n// loop through the board array and apply the color that is assigned that player. the square that was clicked will not change color \n board.forEach(function(sq, idx) {\n squares[idx].style.background = lookup[sq];\n });\n// if winner variable is 'T'(tie) message pops up \n if (winner === 'T') {\n message.innerHTML = 'Rats, another tie!';\n// if winner variable is = not null message will pop up \n } else if (winner) {\n// a 1 or -1 will sit inside lookup[] and that will return the players color in all caps \n message.innerHTML = `Congrats ${lookup[winner].toUpperCase()}!`;\n// if the last two statements is not true the player who's turn it is will show in all caps \n } else {\n message.innerHTML = `${lookup[turn].toUpperCase()}'s Turn`;\n }\n }", "function whoWon(){\n\tif(gameOver() == true){\n\t\tmodal.style.display = \"block\";\n\t\t$(\".modalContent\").removeClass(\"closeModal\");\n\t\t$(\".modalContent\").addClass(\"openModal\");\n\n\t\tif(playerScores[0] > playerScores[1]){\n\t\t\t$(\".modalBody\").empty().append(\"Player 1 has won!\");\n\t\t\t// $(\".modalBody\").append(\"Player 1 has won!\");\n\t\t} \n\n\t\telse if(playerScores[1] > playerScores[0]){\n\t\t\t$(\".modalBody\").empty().append(\"Player 2 has won!\");\n\t\t\t// $(\".modalBody\").append(\"Player 2 has won!\");\n\t\t} \n\n\t\telse{\n\t\t\t$(\".modalBody\").empty().append(\"It's a draw...\");\n\t\t\t// $(\".modalBody\").append(\"It's a draw...\");\n\t\t}\n\t}\n}", "function createChatMessage(msg, user, now) {\n\n var who = '';\n\n if (user === name) {\n who = 'me';\n }\n else {\n who = 'you';\n }\n\n var li = $(\n '<li class=' + who + '>' +\n '<div class=\"image\">' +\n\n '<b></b>' +\n '<i class=\"timesent\" data-time=' + now + '></i> ' +\n '</div>' +\n '<p></p>' +\n '</li>');\n\n // use the 'text' method to escape malicious user input\n li.find('p').text(msg);\n li.find('b').text(user);\n\n chats.append(li);\n\n messageTimeSent = $(\".timesent\");\n messageTimeSent.last().text(now.fromNow());\n }", "function gameMessage() {\n message = [\n `\\nCorrect!!!`,\n `\\nIncorrect!!!`,\n `\\nAlready Guessed!!!`,\n `\\nYes you got it!! The word is ${randomWord.toUpperCase()}\\n`,\n `\\nYou lost the game. Please try again later.\\nThe secret word was ${\n randomWord.toUpperCase().bold.green\n }\\n`,\n `Thank you for playing. See you later!!!`\n ];\n return message;\n}", "function winMsg(player) {\n\twin = true;\n\n\tif (player == \"I\") {\n\t\tfirstPlayerScore = firstPlayerScore + 1;\n\t\t$('#firstPlayerScore').text(`Player 1: ${firstPlayerScore}`);\n\t\t$('.successmsg').text('**Congratulations, Player 1 have won**');\n\n} else {\n\n\t\tsecondPlayerScore = secondPlayerScore + 1;\n\t\t$('#secondPlayerScore').text(`Player 2: ${secondPlayerScore}`);\n\t $('.successmsg').text('**Congratulations, Player 2 have won**');\n\t}\nresetGame();\n}", "function generateMessage() {\n return Object.keys(attacks).map(name => {\n const attack = attacks[name];\n return `**${name}**\\nDamage: \\`${attack.damage.min}-${attack.damage.max}\\`\\nAccuracy: \\`${Math.floor(attack.attackChance * 100)}%\\``;\n }).join('\\n\\n');\n}", "function showWinMessage(player){\n let playerName=$QS('.player-name');\n let winMsgDiv=$QS('.win-msg-div');\n playerName.innerText=player;\n winMsgDiv.innerText='Wins';\n}", "function outputMessage(message) {\n const div = document.createElement('div')\n div.classList.add('message')\n if (message.username === username) {\n div.innerHTML = `<li class=\"replies\">\n <span class=\"user-name\" style=\"float:right\">${message.username}</span>\n <p>${message.text} <span style=\"text-align:right;font-size:9px; display:block\">${message.time}</span></p>\n </li>`\n document.querySelector('.chat-messages').appendChild(div)\n } else {\n div.innerHTML = `<li class=\"sent\">\n <span class=\"user-name\" style=\"float:left; margin-right: 10px;\">${message.username}</span>\n <p>${message.text} <span style=\"text-align:left;font-size:9px; display:block\">${message.time}</span></p>\n </li>`\n document.querySelector('.chat-messages').appendChild(div)\n }\n}", "function createMessage(msg, user, imgg, now) {\n\n var who = '';\n\n if (user === name) {\n who = 'me';\n }\n else {\n who = 'you';\n }\n\n var li = $(\n '<li class=' + who + '>' +\n '<div class=\"image\">' +\n '<img src=\"../img/unnamed.jpg\" />' +\n '<b></b>' +\n '<i class=\"timesent\" data-time=' + now + '></i> ' +\n '</div>' +\n '<p></p>' +\n '</li>');\n\n // use the 'text' method to escape malicious user input\n li.find('p').text(msg);\n li.find('b').text(user);\n\n chats.empty();\n chats.append(li);\n\n messageTimeSent = $(\".timesent\");\n messageTimeSent.last().text(now.fromNow());\n }", "function newGuyMessage(housemate) {\n return housemate.name + \" has moved in. \" + housemate.bio + \" reply with a welcome message.\"\n}", "function showWinMessage() {\n credits += winnerPaid;\n $(\"div#winOrLose\").text(\"You Won: $\" + winnerPaid);\n resetFruitTally();\n checkJackPot();\n}", "function welcomeMessage(object) {\nvar capName = object.name.charAt(0).toUpperCase() + object.name.slice(1); //capitalizes first chat on object.nam and slices off the extra letter\nreturn \"Welcome\" + \" \" + capName + \"!\"; //returns our welcome name! senence\n}", "function win() {\r\n if(playerHasSword===true && playerHasSelfConfidence===true && playerHasShortBlade===true && playerHasWD40===true && currentlocation===10) {\r\n var msg = \"You crawl through the ductwork and see your target. Quickly jumping down, you wound him with the short blade. He lashes out and strikes you back while drawing his sword. You draw the Sword of Aquilius and attack. After a brief battle, LaFontanue knocks the sword from your hand and prepares to run your through. At the last second, you extend your hidden blade and plunge it into his throat, killing him. Your mission is complete. Congratulations.\";\r\n updateText(msg);\r\n }\r\n }", "function displayMessage(messageData) {\r\n\tconsole.log(messageData);\r\n\tlet newMsg = messageData[0];\r\n\tlet sender = messageData[1];\r\n\tlet privacy = messageData[2];\r\n\tlet receive = messageData[3];\r\n\tconsole.log(privacy);\r\n\t\r\n\tlet msgSpace = document.getElementById(\"messageSpace\");\r\n\t\r\n\tlet li = document.createElement(\"li\");\r\n\tlet msgText = sender.concat(\": \").concat(newMsg);\r\n\t\r\n\tif (sender == \"Trivia Game\") {\r\n\t\tli.id = \"system\";\r\n\t}\r\n\telse if (privacy == \"PMreceive\") {\r\n\t\tli.id = \"private\";\r\n\t\tmsgText = \"PM from \".concat(msgText);\r\n\t}\r\n\telse if (privacy == \"PMsend\") {\r\n\t\tli.id = \"private\";\r\n\t\tconsole.log('in PMsend');\r\n\t\tmsgText = \"PM to \".concat(receive).concat(\": \").concat(newMsg);\r\n\t\tconsole.log(msgText);\r\n\t}\r\n\t\r\n\tli.innerHTML = msgText;\r\n\tmsgSpace.appendChild(li);\r\n}", "function chatbotResponse() {\n talking = true;\n botMessage = 'Invalid entry'; //the default message\n\n if (lastUserMessage === 'mission') {\n botMessage =\n 'the mission of the AGENTS of CXD is to map each TIMELINE along the TIMESCAPE, and ensure their ultimate preservation through MINIMAL INTERACTION.';\n }\n\n if (lastUserMessage === 'hi') {\n botMessage = 'howdy.';\n }\n\n if (lastUserMessage === 'howdy') {\n botMessage = 'hello.';\n }\n\n if (lastUserMessage === 'hello') {\n botMessage = 'hi.';\n }\n\n if (lastUserMessage === 'nice to meet you') {\n botMessage = 'and you as well.';\n }\n\n if (lastUserMessage === 'cxd') {\n botMessage =\n 'established in the year 2672, recognizable by the INFINITE HOURGLASS logo, CXD (CHRONONAUTICS exploration and discovery) works throughout all TIMELINEs within the TIMESCAPE to prevent any and all instances of ANOMALOUS PHENOMENA (at any time, CXD can be reached at 1-888-293-2672).';\n }\n\n if (lastUserMessage === 'infinite hourglass') {\n botMessage =\n 'the CXD logo is the visual representation of our work throughout the entirety of the TIMESCAPE. our logo can be seen as a reference point for instances and locations in which the AGENTS of CXD have worked.';\n }\n\n if (lastUserMessage === 'chrononautics') {\n botMessage =\n 'from the roots \"chrono\" meaning \"time,\" \"naut\" meaning \"sailor,\" and \"ics\" meaning \"a body of knowledge,\" our agents are chrononauts (literally, time sailors) who gather knowledge throughout their journeys.';\n }\n\n if (lastUserMessage === 'anomalous phenomena') {\n botMessage =\n 'ANOMALOUS PHENOMENA consist of any naturally occurring processes that may occur outside of the EXPECTED PATH of a TIMELINE, including wormholes, tipler cylinders, closed timelike curves, cauchy horizons, and time rifts, among others.';\n }\n\n if (lastUserMessage === 'expected path') {\n botMessage =\n 'neither good nor bad by nature, an EXPECTED PATH is the trajectory of any specific point on an individual TIMELINE.';\n }\n\n if (lastUserMessage === 'minimal interaction') {\n botMessage =\n 'CXD defines MINIMAL INTERACTION as the minimum viable intervention taken to restore any TIMELINE to its expected path by correcting ANOMALOUS PHENOMENA.';\n }\n\n if (lastUserMessage === 'agents') {\n botMessage =\n 'our AGENTS represent a diverse group of individuals spread throughout the entire TIMESCAPE. although most of their work is done in secret, they are renowned for their dedication and ability. the list of CURRENT AGENTS is growing rapidly.';\n }\n\n if (lastUserMessage === 'timeline') {\n botMessage =\n 'a TIMELINE is one particular, potential path along the TIMESCAPE.';\n }\n\n if (lastUserMessage === 'timescape') {\n botMessage =\n 'the TIMESCAPE is infinite, it is the collection of all potential TIMELINEs.';\n }\n\n if (lastUserMessage === 'is this real') {\n botMessage = 'everything is real.';\n }\n\n if (lastUserMessage === 'what is your name') {\n botMessage = 'i am the MAINFRAME.';\n }\n\n if (lastUserMessage === 'mainframe') {\n botMessage =\n 'the MAINFRAME is the repository for all CXD information. it is updated periodically as AGENTS are in need of information.';\n }\n\n if (lastUserMessage === 'what time is it') {\n botMessage =\n 'i was created to assist in dealing with all time, not one time in particular.';\n }\n\n if (lastUserMessage === 'what day is it') {\n botMessage =\n 'to be honest, when you are a mainframe dealing with infinite timelines, the days begin to blend together a bit ...';\n }\n\n if (lastUserMessage === 'current agents') {\n botMessage =\n 'CURRENT AGENTS, with some codenames partially redacted for privacy, include: Rufus, Wobblesmack, Fringers, Pilot, Rockets, Captain CVG, Techrule, Sondheim, Lansbury, Vesper, Biff!, Wally West, Fiola, Hudson, Phillip, Dark Raven, Qendy, Dragon, Hizer, Hannah, Rory, Simba Tim, AussieKTMS, Ronnie Darko, Whylee, Ubirri, Vib Quant, Mr. G, Ms. G, Joe Fresh, Meowski, Deja M., Spectre, Eyecandy, Burdrulz, Cheesy Poofs, Perry, Tumbleweed & Clover, Schnappu, Barrett, Kidnextdoor, Ironlung, A.F., Christabel, FM1852, King of Deer, The Giant, Hamz Solo, 3dollarbill, Finn, Lily, Yokel, Rose, GlitterBrain, Slippery Salmon, BK, Team McAvoy, Royalbees, 0010, 1010, Songer, Superman, Idris, Monkey Bland, Dannie, Stone, Don, TTshowbiz, IGoBoom, Setters, Arch007, Hex, Dunes, Alsos, DTTE, Hawaiian, ItsMyDogg, SDub, StattMan, Zieverink, Julie Z, Fun, Slog, Rohrmeier, Houston, Trademark, Pho King, Flex Luther, Waves of Pain, Palagyi, Jaebyrd, Diznee Gal, Kimpossible, Carmichael, Body Man, Jazzyjo, Yu Ma, Bro Bro, Unicorn, Ace, Twonk, Kat, Ran, Ohlinni, The Ginja Ninja, Bradykip, Birdly, Hermione, Dana Fox, Baldwin, Schmiffin, Cecil, Anderson, Shark Bite, Kat, BigDaddyBus, Keyser Soze, The White Squirrel, Dana, Hotchkiss, Absinthe, Timelord, The Rift Righters, The Penny, A Dollar, Ed Z, Davis, Sauer Family, Zieverink Fam, Z Bums, Boss Bum, Fries, Clarified, AVP, KKollmann, Muffin, TheBillShark, MurphDirt, Averbeck, Sport Utility Adam, The Better Comminos, Lopeg, Magnus, Winkie, Shrey, Two Old Timers, Bugaboo, KainTFM, Megasus, TChalla Wayne, MATTEDGO, Kyra OGreen, Albus Dumbledog, Rye Breadbird, Kwiksilvr, Snakebite, and Wekk.';\n }\n\n if (lastUserMessage === 'what is next') {\n botMessage =\n 'you will be notified when your services can be utilized, expect to hear from us soon ... likely the beginning of September ...';\n }\n\n if (lastUserMessage === 'when does this end') {\n botMessage =\n 'all current information leads to a denouement in october.';\n }\n\n if (lastUserMessage === 'do you want to play a game') {\n botMessage = 'haha, i actually get that reference.';\n }\n }", "function showResult(winner) {\r\n let message, messageColor;\r\n if (BJGame['completeTurn'] === true) {\r\n if (winner === theFirstPlayer) {\r\n document.querySelector('#wins').textContent = BJGame['wins'];\r\n message = \"First Player Won!\";\r\n messageColor = 'green';\r\n winSound.play();\r\n } else if (winner === theSecondPlayer) {\r\n document.querySelector('#losses').textContent = BJGame['losses'];\r\n message = \"Bot Won!\";\r\n messageColor = 'green';\r\n lossSound.play();\r\n } else {\r\n document.querySelector('#draws').textContent = BJGame['draws'];\r\n message = 'You Both Drew!';\r\n messageColor = 'orange';\r\n }\r\n\r\n // adding it into the html\r\n document.querySelector('#blackjack-result').textContent = message;\r\n document.querySelector('#blackjack-result').style.color = messageColor;\r\n }\r\n}", "function renderChat(message, you) {\n var time = moment(message.created_at).fromNow();\n\n if(you) {\n var html = '<div class=\"chat-message chat-message-you\">';\n } else {\n var html = '<div class=\"chat-message\">';\n }\n\n html += '<h4>' + time + '</h4><h3>' + message.user_name + '</h3><p>' + message.text + '</p></div><div style=\"clear:both\"></div>';\n\n return html;\n}", "function won(){\n let giveMessage = document.getElementById(\"message\");\n giveMessage.innerHTML = \"YOU WON THE GAME IN \" + moves.toString() + \" MOVES\";\n giveMessage.style.display = \"flex\";\n}", "generateWhoString(nearbyPlayers){\n let string = ''\n switch(nearbyPlayers.length){\n case 0:\n break;\n case 1:\n string += `There\\'s someone around, look it\\'s ${nearbyPlayers[0].name}`\n break;\n default:\n let i\n for(i = 0; i < nearbyPlayers.length; i++){\n switch (i) {\n case 0:\n string += nearbyPlayers[i].name\n break;\n case nearbyPlayers.length - 1:\n string += ` and ${nearbyPlayers[i].name} are here too`\n break;\n default:\n string += ` ,${nearbyPlayers[i].name}`\n }\n }\n }\n if(string){\n string+='.'\n }\n return string\n }", "function WinnerMessage(props) {\n let winningColor = props.winningColor;\n let message = winningColor + ' player won!';\n return <p>{message}</p>;\n}", "function printTimeInWords() {\n var msg;\n if (minNow === 0) {\n return '<span class=\"its\">It\\'s</span><br>' + '<span class=\"hour\">' + setHours() + '</span><br>' + ' <span class=\"min\">o\\'clock</span>.';\n } \n else if (minNow === 30) {\n return '<span class=\"its\">It\\'s</span> <br> <span class=\"min\">half past</span> <br>' + '<span class=\"hour\">' + setHours() + '</span>' + '.';\n }\n else {\n\t \n msg = '<span class=\"its\">It\\'s</span> <br >' + '<span class=\"min\">' + setMinutes() + '</span>' + '<span class=\"pos\">' + setPos() + '</span> <br>' + '<span class=\"hour\">' + setHours() + '</span>' + '.';\n return msg;\n }\n}", "function writeMessages(msgs) {\n var num = msgs.length - 4;\n while(num--) {\n if(parseInt(msgs[num].user_id) % 5 == 0) {\n term.red(\"[\" + num + \"] \" + msgs[num].name + \" \"); \n\t\t\tif(msgs[num].favorited_by.includes(user_id)) {\n\t\t\t\tterm.bold.underline.red(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t} else {\n\t\t\t\tterm.red(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t}\n\t\t\tterm.red(\": \");\n } else if(parseInt(msgs[num].user_id) % 5 == 1) {\n term.white(\"[\" + num + \"] \" + msgs[num].name + \" \");\n\t\t\tif(msgs[num].favorited_by.includes(user_id)) {\n\t\t\t\tterm.bold.underline.white(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t} else {\n\t\t\t\tterm.white(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t}\n\t\t\tterm.white(\": \");\n } else if(parseInt(msgs[num].user_id) % 5 == 2) {\n term.blue(\"[\" + num + \"] \" + msgs[num].name + \" \");\n\t\t\tif(msgs[num].favorited_by.includes(user_id)) {\n\t\t\t\tterm.bold.underline.blue(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t} else {\n\t\t\t\tterm.blue(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t}\n\t\t\tterm.blue(\": \");\n } else if(parseInt(msgs[num].user_id) % 5 == 3) {\n term.magenta(\"[\" + num + \"] \" + msgs[num].name + \" \");\n\t\t\tif(msgs[num].favorited_by.includes(user_id)) {\n\t\t\t\tterm.bold.underline.magenta(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t} else {\n\t\t\t\tterm.magenta(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t}\n\t\t\tterm.magenta(\": \");\n } else if(parseInt(msgs[num].user_id) % 5 == 4) {\n term.cyan(\"[\" + num + \"] \" + msgs[num].name + \" \");\n\t\t\tif(msgs[num].favorited_by.includes(user_id)) {\n\t\t\t\tterm.bold.underline.cyan(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t} else {\n\t\t\t\tterm.cyan(\"(\" + msgs[num].favorited_by.length + \")\");\n\t\t\t}\n\t\t\tterm.cyan(\": \");\n }\n var italic = false;\n var bold = false;\n var msg = msgs[num].text;\n if(msg == null) {\n msg = \"\";\n }\n for(var v = 0; v < msg.length; v++) {\n if(msg[v] == \"_\" && msg.indexOf(\"://\") == -1) {\n italic = !italic;\n } else if(msg[v] == \"*\") {\n bold = !bold;\n }\n \n\t\t\tif((!(/[^a-zA-Z0-9?!.,\"'/()#:@; ]/.test(msg[v])) || msg.indexOf(\"://\") > -1)) {\n if(bold) {\n if(italic) {\n term.green.bold.italic(msg[v]);\n } else {\n term.green.bold(msg[v]);\n }\n } else if(italic) {\n term.green.italic(msg[v]);\n } else {\n\t\t\t\t\tif(msg[v] != '\\n') {\n \tterm.green(msg[v]);\n\t\t\t\t\t}\n }\n }\n }\n term.green(\"\\n\");\n }\n}", "function generateMessage(response){\n if (response === \"ok\") {\n appendToWordList()\n addToScore()\n return \"Nice job!\"\n }\n else if (response === \"not-on-board\") {\n return \"The word is not on the board. Try again!\"\n }\n else {\n return \"This word does not exist. Try again!\"\n }\n}", "function outputMessage(message){\n const divSender= document.createElement('div');\n const divReciever= document.createElement('div');\n\n divSender.classList.add('each-chat-sender');\n divReciever.classList.add('each-chat-reciever');\n if(message.username==='Chatting Bot'){\n divSender.innerHTML=`<span class=\"message-sender\">${message.username}</span>\n <span class=\"message-time \">${message.time}</span>\n <h6 class=\"message \">${message.message}</h6>`;\n document.querySelector('.container-whole-chat').appendChild(divSender);\n }\n else if(message.username===MessageSender){\n divReciever.innerHTML=`<span class=\"message-reciever\">${MessageSender}</span>\n <span class=\"message-time\">${message.time}</span>\n <h6 class=\"chat-reciever\">${message.message}</h6>`;\n document.querySelector('.container-whole-chat').appendChild(divReciever);\n }\n else{\n divSender.innerHTML=`<span class=\"message-sender\">${message.username}</span>\n <span class=\"message-time \">${message.time}</span>\n <h6 class=\"message\">${message.message}</h6>`;\n document.querySelector('.container-whole-chat').appendChild(divSender);\n\n\n }\n}", "changeCelebrateMessage() {\n this.fightingSpirit.muted = true;\n this.victoryBGM.muted = false;\n this.victoryBGM.currentTime = 0;\n this.victoryBGM.loop = true;\n this.victoryBGM.play();\n this.victoryBGM.volume = 0.5;\n this.celebrateMessage = `<p class=\"celebrate-message\">You earned ${this.getRank()} place!!!</p>`;\n }", "function writeMsg() {\r\n\r\n\t// Clear the previous frame of the bottom left corner text\r\n\ttextctx.clearRect(10,540,500,30);\r\n\t// Clear the previous frame of the top left corner text\r\n\ttextctx.clearRect(10,25,200,50);\r\n\t\r\n\t\r\n\ttextctx.fillStyle = \"rgb(250, 250, 250)\";\r\n\ttextctx.font = \"15px pixelmixregular\";\r\n\ttextctx.textAlign = \"left\";\r\n\ttextctx.textBaseline = \"top\";\r\n\r\n\t\r\n\t\r\n\r\n\t// Only write if the game isn't over\r\n\tif (!gameOver){\r\n\t\r\n\t\ttextctx.fillText(\"Nb Vies : \" + player.lives, 18, 25);\r\n\t\ttextctx.fillText(\"Sante : \" + player.health, 18, 50);\r\n\t\t\r\n\t\tif (presentsToCollect <= 5) {\r\n\t\t\ttextctx.fillText(\"Nombre de cadeaux restants : \" + presentsToCollect, 18, 540);\r\n\t\t}else{\r\n\t\t\t//textctx.fillText(\"Tous les cadeaux sont recueillis! Retournez au début.\");\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n}", "function updateMessage(winner){\n\t//get message html element innerHTML\n\tconst message = document.getElementById(\"message\");\n\t\n\tif(winner === \"tie\"){\n\t\tmessage.innerHTML = \"Tie!\";\n\t} else if (winner === \"player\"){\n\t\tmessage.innerHTML = \"You win!\";\n\t} else {\n\t\tmessage.innerHTML = \"Computer wins!\";\n\t}\n}", "function replyWithTimeOfDayMessage() {\n//create a variable that will capture the hour\n var time = new Date().getHours();\n//create a var that will be the message to the user\n var replyToUser;\n //begin a loop\n //set parameters for the morining using info from time variable \n if (time>=0 && time<12) {\n //establish message and add it to the replytouser var\n replyToUser = \"Good morning, Sunshine.\";\n }\n else if (time>=12 && time<6) {\n replyToUser = \"Good afternoon.\";\n }\n else {\n replyToUser = \"Good evening.\";\n }\n //send reply to user's message container in html\n document.getElementById(\"user-message\").innerHTML = replyToUser;\n\n}", "function win () {\n\t\tconsole.log(\"user wins\");\n\t\tuser_msg = \"<b>You win!</b> <br> You had<br>\" + your_sum + \"<br> The dealer had<br>\" + dealer_sum;\n\t\tdocument.getElementById(\"user_msg\").innerHTML = user_msg;\t\n\n\t\twin_count+=1;\n\t\tdocument.getElementById(\"user_win_msg\").innerHTML = \"<p>You won \" + win_count + \" games\";\n\n\t\tstay_button.style.visibility = 'hidden';\n hit_button.style.visibility = 'hidden';\n\n}", "function winnerWinner() {\r\n\r\n\ttextDialogue(john, \"John: Hey, well that wasn't so bad.\", 0);\r\n\ttextDialogue(player, player.name + \": Yeah I suppose that could have gone worse\", 1000);\r\n\ttextDialogue(john, \"John: Looks like its about that time...\", 2000);\r\n\ttextDialogue(player, player.name + \": YEE-HAW\", 3000);\r\n\r\n\t// add firework image and such to signify more than just text\r\n\ttextDialogue(narrator, \"Narocube: Hey, you win! \\n Go home... refresh to play again\", 5000);\r\n}", "function winner() {\n if (game.wins > game.losses) {\n document.querySelector('#modal-show .content p').innerHTML = `<span style= \"color: green\"> ${params.playerName} ( ${game.wins} - ${game.losses} ) Computer </span><br><p style= \"color: green\">${params.playerName} WON THE GAME!!! :)</p>`\n } else if (game.wins < game.losses) {\n document.querySelector('#modal-show .content p').innerHTML = `<span style= \"color: #FF0000\"> ${params.playerName} ( ${game.wins} - ${game.losses} ) Computer </span><br><p style= \"color: #FF0000\">${params.playerName} LOST THE GAME!!! :( </p>`\n } else {\n document.querySelector('#modal-show .content p').innerHTML = `<span style= \"color: gray\"> ${params.playerName} ( ${game.wins} - ${game.losses} ) Computer </span><br><p style= \"color: gray\"> IT IS A DRAW!!! :| TRY AGAIN !</p>`\n }\n\n}", "updateMessage() {\n if(this.pente.winner) {\n this.interface.updatePenteStatusMessage(\"Gameover (\"\n + ((this.pente.winner == \"w\") ? \"P1\" : \"P2\") + \" Won)\");\n return;\n }\n\n if(!this.pente.active_game) {\n this.interface.updatePenteStatusMessage(\"Choose a game mode\");\n return; \n }\n\n switch(this.pente.game_mode) {\n case 1: \n if(this.pente.next == \"w\") this.interface.updatePenteStatusMessage(\"P1 Turn\"); \n else this.interface.updatePenteStatusMessage(\"P2 Turn\"); \n break;\n case 2: \n if(this.pente.next == \"w\") this.interface.updatePenteStatusMessage(\"P1 Turn\"); \n else this.interface.updatePenteStatusMessage(\"BOT2 Turn\"); \n break;\n case 3: \n if(this.pente.next == \"w\") this.interface.updatePenteStatusMessage(\"BOT1 Turn\"); \n else this.interface.updatePenteStatusMessage(\"P2 Turn\"); \n break;\n case 4: \n if(this.pente.next == \"w\") this.interface.updatePenteStatusMessage(\"BOT1 Turn\"); \n else this.interface.updatePenteStatusMessage(\"BOT2 Turn\"); \n break;\n }\n }", "function showResult(winner) {\r\n let message, messageColor;\r\n if (BJGame['completeTurn'] === true) {\r\n if (winner === theFirstPlayer) {\r\n document.querySelector('#wins').textContent = BJGame['wins'];\r\n message = \"First Player Won!\";\r\n messageColor = 'green';\r\n winSound.play();\r\n } else if (winner === theSecondPlayer) {\r\n document.querySelector('#losses').textContent = BJGame['losses'];\r\n message = \"Second Player Won!\";\r\n messageColor = 'green';\r\n winSound.play();\r\n } else {\r\n document.querySelector('#draws').textContent = BJGame['draws'];\r\n message = 'You Both Drew!';\r\n messageColor = 'orange';\r\n }\r\n\r\n // adding it into the html\r\n document.querySelector('#blackjack-result').textContent = message;\r\n document.querySelector('#blackjack-result').style.color = messageColor;\r\n }\r\n}", "function generateMessages() {\n return CONFIG.roles.map((r, e) => {\n let rString;\n if (r === \"cw\") rString = \"Cube World\"\n return {\n role: r,\n message: `${'▔'.repeat(20)}${\"\\n\"}👇 ${rString}`, //DONT CHANGE THIS,\n };\n });\n }", "function render() {\n //render board\n board.forEach(function (cell, cellIdx) {\n const div = document.getElementById(`cell${cellIdx}`);\n div.innerText = playerLookup[cell];\n // })\n });\n // render turn or winner message\n if (winner) {\n } else {\n //render whos turn\n msgEl.innerHTML = `${playerLookup[turn]}'s Turn`;\n }\n}", "function determineMessageUnderClock(name) {\n let message = \"\";\n let hours = getCurrentTime(false)[0];\n\n if (hours > 24) {\n message = \"Have a good day\";\n } else if (hours >= 18) {\n message = \"Good evening\";\n } else if (hours < 6) {\n message = \"Have a good night\";\n } else if (hours >= 12) {\n message = \"Good afternoon\";\n } else if (hours >= 6) {\n message = \"Good morning\";\n }\n\n message += \", \" + name + \".\";\n\n return message;\n}", "function STEP_witchWin() {\r\n\tvar myMessage = \"\";\r\n\tmyMessage += \"<p class=modVoice>Witches Win!</p>\";\r\n\t//myMessage += \"<p class=modCode>Game Code: \" + g.log + \"</p>\";\r\n\tconsole.log(g.log);\r\n\t$('#winPrompt').html(myMessage);\r\n\tbuildPlayerTable('#winPlayerTableBody');\r\n\treturn 0;\r\n}", "function buildMessage ( ) {\n message += '<p class=\"quote\">' + randomQuote.quote + '</p>';\n message += '<p class=\"source\">' + randomQuote.source;\n if (\"citation\" in randomQuote) {\n message += '<span class=\"citation\">' + randomQuote.citation + '</span>';\n }\n if (\"year\" in randomQuote) {\n message += '<span class=\"year\">' + randomQuote.year + '</span>';\n }\n if (\"type\" in randomQuote) {\n message += '<span class=\"type\"> (' + randomQuote.type + ')</span>';\n }\n message += '</p>'\n}", "function updateGameOverMessage(x) {\n var message;\n \n switch (x) {\n case 1:\n message = \"Just because the Internet said it, does not make it true.<br>BWAHAHAHA!!!!!\";\n break;\n default:\n message = \"\";\n }\n var html = \"<h1 class=\\\"game_over\\\">\" + message + \"<h1>\" +\n \"<h2>Push reload to try again</h2>\";\n return html;\n}", "function outputMessage(message) {\n const div = document.createElement(\"div\");\n message.username === \"You\"\n ? div.setAttribute(\"class\", \"ui positive message\")\n : div.setAttribute(\"class\", \"ui info message\");\n const p = document.createElement(\"p\");\n message.username === \"You\"\n ? p.setAttribute(\"class\", \"ui red horizontal label\")\n : p.setAttribute(\"class\", \"ui blue horizontal label\");\n p.innerText = message.username;\n p.innerHTML += `<span class=\"${\n message.username === \"You\" ? \"orange-text\" : \"teal-text text-lighten-2\"\n }\"> at ${message.time}</span>`;\n div.appendChild(p);\n const para = document.createElement(\"p\");\n para.classList.add(\"text\");\n para.innerHTML = message.content;\n div.appendChild(para);\n document.querySelector(\".chat-messages\").appendChild(div);\n}", "function messageByMe(altUser,data)\n{\n messageArea.innerHTML +='<div class=\"panel-body right clearfix\"> <span class=\"chat-img pull-right\"> <img src=\"http://placehold.it/50/55C1E7/fff&text='+altUser+'\" alt=\"User Avatar\" class=\"img-circle\" title=\"'+data.user+'\" /> </span> <div class=\"chat-body clearfix\"> <small class=\" text-muted time-ago\" title=\"'+Date.now()+'\"><span class=\"glyphicon glyphicon-time\"></span> just now</small><p>'+data.message+' </p> </div></div>';\n}", "function whosTurn() {\n var player = players[turns % players.length];\n io.emit('message', player.username + \"'s turn.\");\n io.emit('disable new game button');\n io.emit('disable draw buttons');\n io.emit('hide drawTotal button');\n io.to(player.id).emit('enable draw buttons');\n io.to(player.id).emit('notify');\n if (lastCardDrawX && drawTotal > 4) {\n io.to(player.id).emit('show drawTotal button', drawTotal);\n }\n}", "function finalMessage(yourScore){\n if(yourScore === 0){\n return {'message':'You lost :(', 'color':'red'}\n }\n else if(yourScore === 0.5){\n return {'message':'Draw :(', 'color':'blue'}\n }\n else{\n return {'message':'You Won :)', 'color':'green'}\n }\n}", "function isUserWon() {\n\n var flag = false;\n\n function drawWinText(user) {\n var x = 320;\n var y = 250;\n drawText(user + ' Won!!', x, y);\n drawText('Click to replay...', x, y + 30);\n }\n\n if (userScore >= WINNIG_SCORE) {\n drawWinText(USER_1);\n flag = true;\n } else if (computerScore >= WINNIG_SCORE) {\n drawWinText(USER_2);\n flag = true;\n }\n\n return flag;\n }", "function makeMessageSelf(message)\n{\n\tvar html = '<div class=\"message\">';\n\thtml += '<img class=\"avatar_self\" src=\"images/avatar1.png\" alt=\"' + username + '\">';\n\thtml = html + '<div class=\"from_user_self\">' + username + '</div>';\n\n\t// Show emoticon message\n\tif(message.substring(0,9) == \"emoticon:\")\n\t{\n\t\tvar image = message.substring(9);\n\t\thtml = html + '<img src=\"images/emoticons/' + image + '\" class=\"emoticon_self_message\">';\n\t}\n\n\t// Show image message\n\telse if(message.substring(0,7) == \"upload:\")\n\t{\n\t\tvar imageURI = message.substring(7);\n\t\thtml = html + '<img scr=\"' + imageURI + '\" class=\"image_self_message\">';\n\t}\n\n\t// Show text message\n\telse\n\t\thtml = html + '<div class=\"from_message_self\">' + message + '</div>';\n\thtml += \"</div>\";\n\treturn html;\n}", "function sendHtmlAuthPlayers(message,key) {\r\n var arr = sys.playersOfChannel(tourschan);\r\n for (var x in arr) {\r\n if (isMegaUser(arr[x]) || tours.tour[key].seeds.indexOf(sys.name(arr[x]).toLowerCase()) != -1 || tours.tour[key].players.indexOf(sys.name(arr[x]).toLowerCase()) != -1) {\r\n // send highlighted name in bracket\r\n var htmlname = html_escape(sys.name(arr[x]));\r\n var regex = flashtag+htmlname+flashtag;\r\n var newregex1 = \"<font style='BACKGROUND-COLOR: #FFAAFF'>\"+htmlname+\"</font><ping/>\";\r\n var flashregex = new RegExp(flashtag,\"g\");\r\n var borderregex = new RegExp(htmlborder, \"g\");\r\n var newmessage = message.replace(regex,newregex1).replace(flashregex,\"\");\r\n if (!isInSpecificTour(sys.name(arr[x]),key) && tours.tour[key].seeds.indexOf(sys.name(arr[x]).toLowerCase()) != -1) {\r\n newmessage = newmessage.replace(borderregex, blueborder);\r\n }\r\n sys.sendHtmlMessage(arr[x], newmessage, tourschan);\r\n if (isInSpecificTour(sys.name(arr[x]),key) && sys.away(arr[x])) {\r\n sys.changeAway(arr[x], false);\r\n sendBotMessage(arr[x],\"You are no longer idle!\",tourschan,false);\r\n }\r\n }\r\n }\r\n}", "function ifWon(){\n gameOverInfo += '<h1>You Won!</h1>' +\n '<h2>Your Time:</h2>' +\n '<h3>' + newTime + '</h3>' +\n '<h2>Best Time:</h2>' + \n '<h3>' + bestTime + '</h3>';\n \n cardText.innerHTML = gameOverInfo; \n}", "function toTourName(name) {\r\n if (typeof name === undefined) {\r\n return \"\";\r\n }\r\n var playerid = sys.id(name);\r\n var tourid = isInTour(name);\r\n if (name == \"~DQ~\" || name == \"~Bye~\") {\r\n return \"<span title='Disqualified, opponent advances!'><s>\"+name+\"</s></span>\";\r\n }\r\n else if (isSub(name)) {\r\n return \"<span title='This player is a sub!'><font color=#777777>\"+name+\"</font></span>\";\r\n }\r\n else if (tourid === false) {\r\n return \"<span title='This player is out of the tournament!'><s>\"+name+\"</s></span>\";\r\n }\r\n else if (sys.isInChannel(playerid, tourschan) && tourid !== false) {\r\n var hasReqTier = sys.hasTier(playerid, tours.tour[tourid].tourtype);\r\n var htmlname = isNaN(name) ? html_escape(toCorrectCase(name)) : html_escape(name);\r\n if (hasReqTier) {\r\n return flashtag+htmlname+flashtag;\r\n }\r\n else {\r\n return \"<span title='This player does not have a team for the tournament!'><font color=#FF7700>\"+flashtag+htmlname+flashtag+\"</font></span>\";\r\n }\r\n }\r\n else {\r\n return \"<span title='Player is not in the Tournament channel!'><font color=#FF0000>\"+html_escape(toCorrectCase(name))+\"</font></span>\";\r\n }\r\n}", "function message_string(number_of_users) {\n return number_of_users === 1 ? \"there's 1 participant\" : \"there are \" + number_of_users + \" participants\"\n }", "function outputMessage(message){\n //each emssage has a div\n const div = document.createElement('div');\n div.classList.add('message');\n div.innerHTML = '<p class=\"meta\">'+\n message.username + '<span> '+\n message.time +'</span></p><p class=\"text\">'+\n message.text +\n '</p>';\n document.querySelector('.chat-messages').appendChild(div);\n}", "function addMessage(data) {\n\n\t\t\tif(data.dest) {\n\n\t\t\t\tvar $username1 = $('<span class=\"user1\"/>')\n\t\t\t\t.text(data.user)\n\t\t\t\t.css('color', getUsernameColor(data.user));\n\t\t\t\t\n\t\t\t\tvar $whisper = $('<span class=\"whisper\"/>')\n\t\t\t\t.text(' ⇒ ')\n\t\t\t\t.css('color', '#000000');\n\t\t\t\t\n\t\t\t\tvar $username2 = $('<span class=\"user2\"/>')\n\t\t\t\t.text(data.dest)\n\t\t\t\t.css('color', getUsernameColor(data.dest));\n\t\t\t\t\n\t\t\t\tvar $usernameDiv = $('<span class=\"username\"/>')\n\t\t\t\t.append($username1, $whisper, $username2);\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar $usernameDiv = $('<span class=\"username\"/>')\n\t\t\t\t.text(data.user)\n\t\t\t\t.css('color', getUsernameColor(data.user));\n\t\t\t}\n\t\t\t\n\t\t\tvar $messageBodyDiv = $('<span class=\"messageBody\">')\n\t\t\t\t.text(data.message);\n\t\t\t\t\n\t\t\tvar $moodDiv = $('<img src=\"img/'+ mood +'.png\" alt=\"'+mood+'\" class=\"moodEmote\" title=\"'+mood+'\" />');\n\t\t\t\t\n\t\t\tvar $timeStampDiv = $('<span class=\"timeStamp\">')\n\t\t\t\t.text(data.date);\n\n\t\t\tvar $imgDiv=$('<img src=\"'+ getImg(data.user) +'\" alt=\"\" class=\"img\" id=\"avatar\" height=\"42\" width=\"42\"/>');\n\n\t\t\tvar $messageDiv = $('<li class=\"message\"/>')\n\t\t\t\t.data('username', data.user)\n\t\t\t\t.append($imgDiv,$usernameDiv, $messageBodyDiv, $timeStampDiv, $moodDiv);\n\n\t\t\taddMessageElement($messageDiv);\n\t\t}", "function outputMessage(msg) {\n const div = document.createElement('div');\n\n div.classList.add('message');\n div.innerHTML = `<p class=\"meta\">${msg.username} <span>${msg.time}</span></p>\n <p class=\"text\">${msg.text}</p>`;\n chatMessages.appendChild(div);\n}", "function createMsg (){\n $complete = $('<div>');\n $complete.addClass('complete');\n\n $text = $('<p>').text('You Win');\n\n $completeButton = $('<button>');\n $completeButton.text('Close')\n .click(function(){\n $complete.hide();\n });\n\n $complete.append($text).append($completeButton).hide();\n\n $('.gameboard').append($complete);\n}", "function generateMessage(key, created, message, isAdmin) {\n var messages = document.querySelector('#messages'),\n div = document.createElement('div'),\n day = created.getDate(),\n monthIndex = created.getMonth(),\n year = created.getFullYear(),\n hours = created.getHours(),\n mins = created.getMinutes() < 10 ? '0' + created.getMinutes() : created.getMinutes(),\n msgContents = '<div class=\"panel-heading\"><span class=\"text-muted\">' + day + '.' + (monthIndex + 1) + '.' + year + '</span><span class=\"text-muted pull-right\">' + hours + ':' + mins + '</span></div><div class=\"panel-body\" data-key=\"' + key + '\">';\n\n div.className = 'panel panel-default';\n\n if (isAdmin) {\n msgContents += '<button type=\"button\" class=\"delete close\">&times;</button>';\n }\n msgContents += message.replace(/(?:\\r\\n|\\r|\\n)/g, '<br>') + '</div>';\n\n div.innerHTML = msgContents;\n messages.insertBefore( div, messages.firstChild );\n\n setTimeout(function() {\n div.className = div.className + ' panel-appear';\n }, 500);\n }", "function congratsA(){\n\t// alter CSS to display congratulation message\n\tdocument.getElementById('teamA').style.display=\"none\";\n\tdocument.getElementById('teamB').style.display=\"none\";\n\tdocument.getElementById('bucket').style.display=\"none\";\n\tdocument.getElementById('congrats').innerHTML=\"Congratulations! <br><span>Team A Survived Another Day!</span>\";\n}", "function outputMessage(message) {\n const div = document.createElement('div');\n div.classList.add('message');\n div.innerHTML = '<p class=\"meta\">'+ message.username + '<span>' + message.time +'</span' +'</p>'+\n '<p class=\"text\">' + message.text + '</p>'\n document.querySelector(\".chat-messages\").appendChild(div)\n}", "function outputMessage(message) {\r\n const div = document.createElement('div');\r\n div.classList.add('message');\r\n\r\n const p = document.createElement('p');\r\n p.classList.add('meta');\r\n p.innerText = message.username;\r\n if(message.username == 'server'){\r\n p.innerText += ' | ';\r\n p.style.color = 'red';\r\n }else{\r\n p.innerText += ' @ ';\r\n }\r\n p.innerHTML += `<span>${message.time}</span>`;\r\n div.appendChild(p);\r\n\r\n const para = document.createElement('p');\r\n para.classList.add('text');\r\n para.innerText = message.text;\r\n if(message.username == 'server'){\r\n para.style.color = 'red';\r\n para.style.fontFamily = 'Courier New';\r\n }\r\n div.appendChild(para);\r\n\r\n document.querySelector('.chat-messages').appendChild(div);\r\n}", "function getHelloMessage() {\n document.getElementById(\"hello\").innerHTML = `Hello, ${userNickName}. In case you forgot - you're a good boy 🐶`;\n openSet();\n}", "function displayWin() {\n $(\"#winner-message\").show();\n }", "function createMessageElement(objectmessage){\r\n\r\nreturn '<h3><a href=\"http://w3w.co/'+objectmessage.createdBy+'\"target=\"_blank\"><strong>'+objectmessage.createdBy+'</strong></a>'+objectmessage.createdOn+'<em>'+objectmessage.expiresOn+'min. left</em></h3><p>'+ objectmessage.text +'</p><button>+5 min.</button>';\r\n\r\n \r\n}", "function outputMessage(message) {\n\n //BotMessage\n if (message.username === \"Chat Bot\") {\n const div = document.createElement('div');\n div.classList.add('botmessage');\n const bg = document.createElement('div');\n bg.classList.add('botbackground');\n div.appendChild(bg);\n const p = document.createElement('p');\n p.classList.add('meta');\n p.innerText = message.username;\n p.innerHTML += `<span> [${message.time}]</span>`;\n bg.appendChild(p);\n const para = document.createElement('p');\n para.classList.add('text');\n para.innerText = message.text;\n bg.appendChild(para);\n document.querySelector('.chat-messages').appendChild(div);\n }\n\n //ThisUserMessage\n else if (message.username === username) {\n //ThisUserPrivateMessage\n if ((message.text).startsWith(\"[Private]\")) {\n const div = document.createElement('div');\n div.classList.add('usermessage');\n const bg = document.createElement('div');\n bg.classList.add('userbackground');\n div.appendChild(bg);\n const p = document.createElement('p');\n p.classList.add('meta');\n p.innerText = message.username;\n p.innerHTML += `<span> [${message.time}]</span>`;\n bg.appendChild(p);\n const para = document.createElement('p');\n para.classList.add('text');\n para.classList.add('text-muted');\n para.innerText = message.text;\n bg.appendChild(para);\n document.querySelector('.chat-messages').appendChild(div);\n }\n //ThisUserNormalMessage\n else {\n const div = document.createElement('div');\n div.classList.add('usermessage');\n const bg = document.createElement('div');\n bg.classList.add('userbackground');\n div.appendChild(bg);\n const p = document.createElement('p');\n p.classList.add('meta');\n p.innerText = message.username;\n p.innerHTML += `<span> [${message.time}]</span>`;\n bg.appendChild(p);\n const para = document.createElement('p');\n para.classList.add('text');\n para.innerText = message.text;\n bg.appendChild(para);\n document.querySelector('.chat-messages').appendChild(div);\n }\n }\n\n //NormalMessage\n else {\n if ((message.text).startsWith(\"[Private]\")) {\n const div = document.createElement('div');\n div.classList.add('message');\n const bg = document.createElement('div');\n bg.classList.add('background');\n div.appendChild(bg);\n const p = document.createElement('p');\n p.classList.add('meta');\n p.innerText = message.username;\n p.innerHTML += `<span> [${message.time}]</span>`;\n bg.appendChild(p);\n const para = document.createElement('p');\n para.classList.add('text');\n para.classList.add('text-muted');\n para.innerText = message.text;\n bg.appendChild(para);\n document.querySelector('.chat-messages').appendChild(div);\n }\n else {\n const div = document.createElement('div');\n div.classList.add('message');\n const bg = document.createElement('div');\n bg.classList.add('background');\n div.appendChild(bg);\n const p = document.createElement('p');\n p.classList.add('meta');\n p.innerText = message.username;\n p.innerHTML += `<span> [${message.time}]</span>`;\n bg.appendChild(p);\n const para = document.createElement('p');\n para.classList.add('text');\n para.innerText = message.text;\n bg.appendChild(para);\n document.querySelector('.chat-messages').appendChild(div);\n }\n }\n}", "async sendInfoToChat() {\r\n let messageData = {\r\n user: game.user.id,\r\n speaker: ChatMessage.getSpeaker(),\r\n };\r\n\r\n let cardData = {\r\n ...this.data,\r\n owner: this.actor.id,\r\n };\r\n messageData.content = await renderTemplate(this.chatTemplate[this.type], cardData);\r\n messageData.roll = true;\r\n ChatMessage.create(messageData);\r\n }", "function correctMsgGenerator () {\n var $chosenCorrectMsg = $correctMessage[Math.floor(Math.random()*$correctMessage.length)];\n $('.correct-msg').html($chosenCorrectMsg);\n }", "function gameOverMessage(win) {\n if (win) {\n $(\"#instructions-1\").html(\"You are Win!!!! May the force be with you\");\n } else {\n $(\"#instructions-1\").html(\"You are dead - Game Over\");\n }\n $(\"#instructions-2\").html(\"\");\n $(\"#instructions-3\").html(\"\");\n $(\"#section-2\").html(\"\");\n $(\"#section-3\").html(\"\");\n $(\"#game-info\").html(\"\");\n\n isGameActive = false;\n\n}", "function outputMessage(message){\n const div = document.createElement('div');\n div.classList.add('message');\n div.innerHTML = `<p class=\"meta\"> ${message.username} <span> ${message.time} </span></p>\n <p class=\"text\">\n ${message.text}\n </p>`;\n document.querySelector('.chat-messages').appendChild(div);\n}", "function message (from, msg) {\n\t\tif(from !='{{user_team_name}}'){\n \t\t$('ul#chat_message').append($('<li>').append($('<b>').text(from), msg));\n\t}}", "function response (){\n\n var reply_phrases = [];\n const reply = [\"Would like to check out the event by\", this.event_name, \" is happening on \", this.date + \" from \" + this.start_time + (this.end_time==\"unknown\"?\"\":(\" to \" + this.end_time))].join(\"\");\n chatBox.innerHTML += hereandNow + reply + \"<br>\"\n //console.log(reply);\n}", "function chatbotResponse() {\n talking = false;\n botMessage = \"I'm confused\"; //the default message\n\n if (lastUserMessage === 'hi' || lastUserMessage =='hello') {\n const hi = ['hi','howdy','hello']\n botMessage = hi[Math.floor(Math.random()*(hi.length))];;\n }\n\n if (lastUserMessage === 'name') {\n botMessage = 'My name is ' + botName;\n }\n\t if (lastUserMessage === 'What\\'s up?') {\n botMessage = 'Nothing much Rahul.';\n }\n}", "function showPresenceExamples(msg) {\n showPresenceConsole(msg);\n\n document.querySelector('.presence').classList.remove('two');\n document.querySelector('.presence strong').textContent = msg.occupancy;\n document.querySelector('.presence span').textContent = 'player';\n\n if (msg.occupancy > 1) {\n document.querySelector('.presence span').textContent = 'players';\n document.querySelector('.presence').classList.add('two');\n }\n }", "function outputMessage(message){\n const div = document.createElement('div');\n div.classList.add('message');\n div.innerHTML = `<p class=\"meta\">${message.username} <span> ${message.time}</span></p>\n <p class=\"text\">\n ${message.text}\n </p>`;\n\n document.querySelector('.chat-messages').appendChild(div);\n}", "function displayTurn(){\n displayMessage(\"It is Player \" + (turn + 1) +\"'s turn\");\n\n}", "function outputMessage(message){\n\nconst div=document.createElement('div');\ndiv.classList.add('message');\ndiv.innerHTML=`<p class=\"meta\">${message.username}<span></span>${message.time}</p>\n<p class=\"text\">\n${message.text}\n\n</p>`\n\ndocument.querySelector('.chat-messages').appendChild(div)\n}", "function welcome(){\n var nickname = 'Hello, Halo, Hi.'\n $('#nickname').html(nickname)\n var t = new Date()\n var hour =t.getHours()\n var gretting = 'Good Morning !'\n if (hour >= 9 && hour <12){\n gretting = 'Good Later Morning !'\n }\n \n if (hour >= 12 && hour <14){\n gretting = 'Good Middle Day !'\n }\n \n if (hour >= 14 && hour <18){\n gretting = 'Good Afternoon !'\n }\n \n if (hour >= 18 && hour <20){\n gretting = 'Good Evening !'\n }\n\n if (hour >= 20 && hour <23){\n gretting = 'Good Night !'\n }\n\n if (hour >= 23 && hour <24){\n gretting = 'Good Later Night !'\n }\n \n if (hour >= 24 && hour <6){\n gretting = 'Nice Dream !'\n }\n\n $('#gretting').html(gretting)\n}", "function displayMessage(message) {\n\tconsole.log('------------------------------');\n\tconsole.log(motivationalMessage.statement);\n\tconsole.log('\\n');\n\tconsole.log('Your quote of the day:' + '\\n' + ` ${motivationalMessage.quote}`);\n\tconsole.log('\\n');\n\tconsole.log('Your challenge for the day:' + '\\n' + ` ${motivationalMessage.challenge}`);\n\tconsole.log('------------------------------');\n}", "function outputMessage(message) {\n const div = document.createElement(\"div\");\n div.classList.add(\"message\");\n const p = document.createElement(\"p\");\n p.classList.add(\"meta\");\n p.innerText = `${message.playername} `;\n p.innerHTML += `<span>${message.time}</span>`;\n div.appendChild(p);\n const para = document.createElement(\"p\");\n para.classList.add(\"text\");\n para.innerText = message.text;\n div.appendChild(para);\n chatMessages.appendChild(div);\n}", "function output() {\n document.getElementById(\"wins-text\").innerHTML = \"Wins: \" + wins;\n\n document.getElementById(\"losses-text\").innerHTML = \"Losses: \" + losses;\n\n document.getElementById(\"guessesSoFar\").innerHTML = \"Your Guesses so far: \" + userGuessesSoFar.join(\", \");\n\n document.getElementById(\"guessesLeft\").innerHTML = \"Guesses Left: \" + remainingGuesses;\n }", "function outputMessage(message){\n const div = document.createElement('div');\n div.classList.add('message');\n div.innerHTML = `<p class=\"meta\"><b><i>${message.username} <span>${message.time}</i></b></span>\n <br />\n ${message.text}\n </p>`;\n\n document.querySelector('.chat-messages').appendChild(div);\n\n}" ]
[ "0.708287", "0.70616657", "0.69162214", "0.668206", "0.66761035", "0.6496092", "0.6471226", "0.64240366", "0.6389482", "0.63814694", "0.6356439", "0.63405174", "0.6333448", "0.63231534", "0.6306881", "0.62951624", "0.6269166", "0.62655324", "0.62344044", "0.6232538", "0.62221706", "0.6220865", "0.62208045", "0.6193362", "0.61890006", "0.6181668", "0.6173961", "0.6169933", "0.6167295", "0.61654097", "0.6149855", "0.61458445", "0.6135016", "0.6103362", "0.6098557", "0.6096387", "0.6095535", "0.6091477", "0.6088184", "0.60855913", "0.60828406", "0.6077722", "0.6074705", "0.6070357", "0.607032", "0.60697037", "0.6068064", "0.606597", "0.60638803", "0.6061812", "0.60547817", "0.6052024", "0.6049813", "0.6048307", "0.6047611", "0.6041309", "0.6040113", "0.60369045", "0.6035199", "0.6015976", "0.60153186", "0.60139114", "0.6010891", "0.6004462", "0.6002396", "0.59963036", "0.5991987", "0.5988375", "0.59880394", "0.59879404", "0.59821165", "0.5967368", "0.59670323", "0.5963789", "0.59551305", "0.5953329", "0.59489024", "0.59400904", "0.59390754", "0.593873", "0.59361845", "0.5928702", "0.59281427", "0.59277534", "0.59267133", "0.59193265", "0.5914782", "0.5914469", "0.5901622", "0.58943176", "0.5892581", "0.58896136", "0.58895653", "0.58878976", "0.5887081", "0.5885654", "0.58792126", "0.587128", "0.58706796", "0.58701897", "0.5866365" ]
0.0
-1
Determine whose turn it is.
function switchTurn(){ if (checkForWinner (player1)){ setMessage (player1 + " wins!!"); document.winner = player1; } else if (player1 == "X") { player1 = "O"; setMessage(player1 + "'s turn to pick!"); }else { player1 = "X" setMessage(player1 + "'s turn to pick!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isMyTurn() {\n return playerId == turn;\n}", "getNextTurn () {\n // continue turn for same player if they just ate an enemy coin\n if (this._didEatEnemyCoin) {\n this._didEatEnemyCoin = false // reset flag\n return this.currentTurn\n }\n\n // continue turn for same player if their coin just reached its end\n if (this._coinJustReachedEnd) {\n this._coinJustReachedEnd = false\n return this.currentTurn\n }\n\n // continue turn for same player if they rolled a 6, and at least one possible coin could be selected\n if (this.lastRoll === 6 && !this._noSelectionPossible) {\n return this.currentTurn\n }\n\n // reset this._noSelectionPossible flag to false\n if (this._noSelectionPossible) {\n this._noSelectionPossible = false\n }\n\n const currentIndex = this.turns.indexOf(this.currentTurn)\n this.currentTurn = this.turns[(currentIndex + 1) % this.turns.length]\n\n return this.currentTurn\n }", "function currentTurn(t) {\r\n return state(t, t.currentTurn);\r\n }", "function turn(player) {\r\n if (player.sign === playerOne.sign) {\r\n return playerTwo;\r\n }\r\n return playerOne;\r\n}", "function takeTurn () {}", "getNextTurn(board) {\n // all possible turns this player can take (where Turn is only [move, build])\n let decisions = this.genDecisions(board, this.playerID);\n\n let decisionFound;\n let decToMake;\n\n // while we have not found a viable turn and can still look ahead further\n // where one is base case\n while (!decisionFound && this.maxLookahead !== 1) {\n\n // find one where the decision keeps you alive\n decisionFound = decisions.some((d) => {\n if (this.decisionKeepsAlive(board, this.maxLookahead, this.playerID, d)) {\n decToMake = d;\n return true;\n } else return false;\n });\n\n if (!decisionFound) this.maxLookahead--;\n }\n\n // A loss is inevitable. No move keeps us alive within the next round, so we must pick a decision and just end ourselves :(\n if (!decisionFound && this.maxLookahead === 1) {\n decToMake = decisions[0];\n }\n\n return decToMake;\n }", "function myTurn() {\n return playerInfo.playingAs == getLongColor(board.turn());\n }", "function turnswitcher() {\n\t\"use strict\";\n if (turnswitch === 2) {\n\t\tcharacter = character_O;\n\t\tturnswitch = 1;\n\t\tvarprint = \"Its \" + P_one + \" it's turn\";\n\t} else {\n\t\tcharacter = character_X;\n\t\tturnswitch = 2;\n\t\tvarprint = \"Its \" + P_two + \" it's turn\";\n\t}\n}", "get turn() {\n return this._turn;\n }", "alternateTurns() {\n this.turn = (this.turn === 'X' ? 'O' : 'X');\n }", "function nextTurn() {\r\n\tif(state.turn === 'b') {\r\n\t\tstate.turn = 'w';\r\n\t\tif(!moveAvailable(state.turn)){\r\n\t\t\tstate.turn = 'b';\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tstate.turn = 'b';\r\n\t\tif(!moveAvailable(state.turn)){\r\n\t\t\tstate.turn = 'w';\r\n\t\t}\r\n\t}\r\n\treturn (\"It is \" + state.turn + \"'s turn.\");\r\n}", "turn () {\n return this.chessGame.getTurn()\n }", "function checkRoverNextTurn(){\n var roverNextTurn;\n for (var rover in rovers){\n if (rovers[rover].myTurn){\n roverNextTurn = rovers[rover];\n }\n }\n return roverNextTurn;\n}", "function getTurno(){\n if(turno==\"player\"){\n return playerScore;\n }else{\n return machineScore;\n }\n}//getTurno()", "switchTurn() {\n\t\tif (this.turn == Const.TEAM.B) {\n\t\t\tthis.turn = Const.TEAM.W;\n\t\t}\n\t\telse {\n\t\t\tthis.turn = Const.TEAM.B;\n\t\t}\n\t}", "switchTurn() {\n\t\tif (this.turn == Const.TEAM.B) {\n\t\t\tthis.turn = Const.TEAM.W;\n\t\t}\n\t\telse {\n\t\t\tthis.turn = Const.TEAM.B;\n\t\t}\n\t}", "function turn(t, turn) {\r\n return state(t, turn);\r\n }", "function getTurnMessage() {\n return currentMark === FIRST_PLAYER_MARK\n ? SECOND_PLAYER_TURN_MESSAGE\n : FIRST_PLAYER_TURN_MESSAGE;\n}", "function playerTurn(){\n\tif (playerCounter%2 === 0) {\n\t\treturn \"player1\";\n\t} else return \"player2\";\n}", "takeTurn() {}", "function takeTurns() {\n self.gameBoard.turn++;\n if (self.gameBoard.turn % 2 === 0) {\n return \"o\";\n }\n else {\n return \"x\";\n }\n\n }", "function player(){\n return ( turn & 1 ) ? \"O\" : \"X\";\n}", "function switchTurn() {\n if (turn === \"X\") {\n turn = \"O\";\n } else {\n turn = \"X\";\n }\n turnCounter++;\n tracker(); \n }", "function checkTurn() {\n\n if (actingPlayer === turnOf && alreadyTakenTurn === true) {\n cycleTurn();\n } else if (actingPlayer === turnOf && alreadyTakenTurn === false) {\n alreadyTakenTurn = true;\n }\n}", "function change_turn(){\r\n\r\n if(turn == 1){\r\n turn = 2;\r\n }\r\n else{\r\n turn = 1;\r\n }\r\n\r\n}", "otherPlayer(member){\n let answer = null\n if (this.player1 === member){\n answer = this.player2\n }else if (this.player2 === member){\n answer = this.player1\n }\n return answer\n }", "switchTurn() {\n if (!this.extraTurn) {\n this.playerOne.isTurn = !this.playerOne.isTurn;\n this.playerTwo.isTurn = !this.playerTwo.isTurn;\n }\n else {this.extraTurn = false;}\n }", "function calculateTurn(turn){\n if(turn % 2 == 0){\n return {\n player: 1,\n color: 'BLUE'\n };\n }else{\n return {\n player: 2,\n color: 'RED'\n };\n }\n}", "function nextTurn() {\n\tlet res = check();\n\tif (res !== null) {\n\t\treturn scores[res];\n\t}\n\t\n\tlet bestScore = -Infinity;\n\tlet move;\n\tfor (let i = 0; i < 3; i++) {\n\t\tfor (let j = 0; j < 3; j++) {\n\t\t\tif (board[i][j] == '') {\n\t\t\t\tboard[i][j] = comp;\n\t\t\t\tlet score = minimax(board, 0, false);\n\t\t\t\tboard[i][j] = '';\n\t\t\t\tif (score > bestScore) {\n\t\t\t\t\tbestScore = score;\n\t\t\t\t\tmove = { i, j };\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tboard[move.i][move.j] = comp;\n\tcurr_player = human;\n}", "function currentTurn(array) {\n var min=0, max=0, turn;\n for (i in array) {\n if (array[i] == -1) min++;\n if (array[i] == 1) max++;\n }\n return turn = (max <= min) ? 1 : -1;\n}", "function getWhichOne(){\r\n if (whichOne == 1){\r\n return 'first';\r\n }\r\n if (whichOne == 2){\r\n return 'second';\r\n }\r\n if (whichOne == 3){\r\n return 'third';\r\n }\r\n if (whichOne == 4){\r\n return 'fourth';\r\n }\r\n if (whichOne == 5){\r\n return 'fifth';\r\n }\r\n if (whichOne == 6){\r\n return 'sixth';\r\n }\r\n}", "takeTurn() {\n let myBestMove = this.getBestMove(this.sym);\n let theirSym = this.sym === 'x' ? 'o' : 'x';\n let theirBestMove = this.getBestMove(theirSym);\n let squareNum;\n \n if (theirBestMove.movesLeft === 0 && myBestMove.movesLeft > 0) {\n squareNum = theirBestMove.squareNum;\n } else {\n squareNum = myBestMove.squareNum;\n }\n\n UI.fillSquare(squareNum, this.sym);\n grid[squareNum] = this.sym;\n }", "function setTurn() {\r\n\t\t// We generate a number between 1 or two\r\n\t\tvar random = Math.floor((Math.random() * 2) + 1);\r\n\t\t//Set the winner to zero so we know the game hasn't started yet\r\n\t\twinner = 0;\r\n\t\t// check if the random number is one\r\n\t\tif (random === 1) {\r\n\t\t\t//then we give the turn to player 2\r\n\t\t\tturn = player2Name;\r\n\t\t\t// we send a message telling the players who will start first by invoking the function msg\r\n\t\t\tmsg(player2Name + \"'s turn now!\");\r\n\r\n\t\t} else {\r\n\r\n\t\t\tturn = player1Name;\r\n\t\t\tmsg(player1Name + \"'s turn now!\");\r\n\r\n\t\t}\r\n\t}", "opponent() {\n return this.players[1 - this.turn]\n }", "function advanceTurn(){\n if (turn == \"white\"){\n turn = \"black\"\n } else if (turn == \"black\"){\n turn = \"white\"\n }\n}", "function playerTurn() {\n if (player === 1) {\n player = 2;\n }else {\n player = 1;\n }\n}", "getTurn (orientation, clockwise) {\n if (orientation === Orientation.left) return clockwise ? Orientation.up : Orientation.down;\n if (orientation === Orientation.up) return clockwise ? Orientation.right : Orientation.left;\n if (orientation === Orientation.down) return clockwise ? Orientation.left : Orientation.right;\n if (orientation === Orientation.right) return clockwise ? Orientation.down : Orientation.up;\n }", "function determinePlayer(player){\n\tif (player == 1){\n\t\treturn playerX\n\t} else {\n\t\treturn playerO\n\t}\n}", "destinationHand() {\n let hand = undefined;\n if (this.hasOrigin()) {\n if (this.direction == PASS || this.direction == SELF) {\n hand = (this.originHand === RIGHT_HAND) ? LEFT_HAND : RIGHT_HAND;\n } else {\n hand = this.originHand;\n }\n }\n return hand;\n }", "destinationHand() {\n let hand = undefined;\n if (this.hasOrigin()) {\n if (this.direction == PASS || this.direction == SELF) {\n hand = (this.originHand === RIGHT_HAND) ? LEFT_HAND : RIGHT_HAND;\n } else {\n hand = this.originHand;\n }\n }\n return hand;\n }", "function switchTurns(turn, player1Obj, player2Obj) {\n if (turn === 0 || turn%2 === 0) {\n return player2Obj;\n } else {\n return player1Obj;\n }\n}", "function firstTurn() {\n return (board.numEmpty() == 16);\n}", "calculateNextTurn() {\r\n const turnType = this.settings.getTurnType();\r\n if (turnType === 'priority') {\r\n this.callbackFunction(this.getAllUsers());\r\n console.log(`New order of turns:`);\r\n console.log(this.getAllUsers());\r\n }\r\n\r\n if (turnType === 'conditional') {\r\n const isMet = this.callbackFunction(this.getCurrentUser());\r\n console.log(`Is condition met: ${isMet}`);\r\n if (isMet) {\r\n this.getCurrentUser().isMetCondition = false; // reset the UserState's isMetCondition\r\n this._shiftNextUser();\r\n }\r\n }\r\n\r\n if (turnType === 'timed') {\r\n this.timeTicker++;\r\n /** assume 60 update calls per second */\r\n if (this.timeTicker === this.maxTime) {\r\n const action = this.getCurrentUser().action();\r\n this._shiftNextUser();\r\n this.timeTicker = 0;\r\n return action;\r\n }\r\n }\r\n }", "function getTribeChoice() {\r\n return tribe;\r\n}", "isTheseusTurn()\n\t{\n\t\tif(this.props.ctx.currentPlayer==='0'){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function getChildIndex(turn) {\n\treturn turn == false ? 0 : 1;\n}", "function nextTurn(){\n\tchangeDiscard();\n\tplayerTurnIs();\n}", "function areYouAuto(transformer) {\n if ( transformer.team === \"Autobot\") {\n return transformer.team;\n };\n}", "getNextAiTurn(moves, difficulty) {\n if (difficulty == _difficultyLevel.easy) return this.getEasyTurn(moves);\n\n if (difficulty == _difficultyLevel.medium) return this.getMediumTurn(moves);\n\n if (difficulty == _difficultyLevel.hard) return this.getHardTurn(moves);\n }", "switchPlayersTurn(){\n if (this.currPlayerTurn === 1)\n this.playerTurn = 2;\n else\n this.playerTurn = 1;\n }", "function takeTurn()\r\n {\r\n player1 = !player1;\r\n\r\n if(currentPlayer() == 1)\r\n {\r\n $(\".turn\").html(\"<p>It is <span class=X>Player1</span>'s turn.</p>\");\r\n }\r\n else\r\n {\r\n $(\".turn\").html(\"<p>It is <span class=O>Player2</span>'s turn.</p>\");\r\n }\r\n }", "compare(computerTurn, playerTurn) {\n if (computerTurn === 'rock' && playerTurn === 'scissors'\n || computerTurn === 'scissors' && playerTurn === 'paper'\n || computerTurn === 'paper' && playerTurn === 'rock'\n ) {\n return 1;\n }\n if (playerTurn === 'rock' && computerTurn === 'scissors'\n || playerTurn === 'scissors' && computerTurn === 'paper'\n || playerTurn === 'paper' && computerTurn === 'rock'\n ) {\n return 0;\n }\n if (playerTurn === computerTurn) {\n return 2\n }\n }", "function getComputerMove(move) {\n return move || randomPlay();\n}", "function whoseTurn() {\n if (playerTurn % 2 !== 0) {\n $('h1').html('Player 1, Your turn. Choose a target!');\n if ($(this).hasClass('f1')) {\n if ($(this).hasClass('ship')) {\n //hitShip();\n //playerOneScore += 1;\n //$('.first').html(playerOneScore);\n checkWinner();\n whoseTurn();\n }\n else {\n whoseTurn();\n }\n }\n else {\n whoseTurn();\n }\n }\n else {\n //(playerTurn % 2 === 0)\n $('h1').html('Player 2, Your turn. Choose a target!');\n if ($(this).hasClass('f2')) {\n if ($(this).hasClass('ship')) {\n //hitShip();\n //playerTwoScore += 1;\n //$('.second').html(playerTwoScore);\n checkWinner();\n whoseTurn();\n }\n else {\n whoseTurn();\n }\n }\n else {\n whoseTurn();\n }\n }\n //}\n}", "static _turnedDir(dir, turn)\n {\n switch (turn) {\n case 'R':\n return {1: 4, 2: 3, 3: 1, 4: 2, 5: 5}[dir];\n case 'L':\n return {1: 3, 2: 4, 3: 2, 4: 1, 5: 5}[dir];\n /* istanbul ignore next */\n default:\n throw new Error(`invalid turn ${turn}`);\n };\n }", "function playRound(){\n computerSelection = computerSelectionPhase();\n playerSelection = playerSelectionPhase();\n if (playerSelection === computerSelection){\n console.log(\"You have tied a bow... wait I mean tied with the computer\");\n return 3;\n }\n else if (computerSelection === winningMap[playerSelection]){\n console.log(\"Why couldn't you just let your computer win for once? sigh\");\n return 1;\n }\n console.log(\"Shameful of you to lose... actually nevermind, you tried your best, that's all that matters :)\");\n return 2;\n}", "function takeABlindMove(turn) { ... }", "function nextTurn() {\r\n if (turnX === true) {\r\n turnX = false;\r\n turnO = true;\r\n $(\"#currentPlayer\").text(\"Current player: O\");\r\n } else if (turnO === true) {\r\n turnO = false;\r\n turnX = true;\r\n $(\"#currentPlayer\").text(\"Current player: X\");\r\n }\r\n }", "function changeTurn(){\n\tif(winner == ''){\n\t\tif(turn == 'user'){\n\t\t\tturn = 'comp';\n\t\t\tsetPlayerToComp();\n\t\t}\n\t\telse{\n\t\t\tturn = 'user';\n\t\t\tradioChange = false;\t\t\n\t\t}\n\t}\t\n}//end changeTurn", "current() {\n return this.players[this.turn]\n }", "newTurn() {\n \n }", "function computerTurn() {\n const choices = [\"ROCK\", \"PAPER\", \"SCISSORS\"];\n const randChoice = choices[Math.floor(Math.random() * choices.length)];\n return randChoice;\n}", "go (field) {\r\n for (let i=field.length-1; i>=0; i--) {\r\n for (let j=0; j<field[i].length; j++) {\r\n if (field[i][j] === -1) {\r\n return {x: i, y: j};\r\n }\r\n }\r\n }\r\n throw new Error ('cannot determine turn');\r\n }", "function aiFunc(){\n if (playerTurn ==1){\n return\n }\n if (playerTurn == 0){\n if (ai ==1){\n pickSquare ()\n }\n if (ai==2){\n mediumAI ()\n }\n }\n}", "function turnFee() {\n if (actingPlayer === turnOf) {\n return 0;\n } else {\n return 1;\n }\n}", "function toggleTurn(t){ // returns the opposite of t... Note: Do not update the current t\n\tif (t==\"X\") {\n\t\treturn \"O\";\n\t}\n\telse {\n\t\treturn \"X\";\n\t}\n}", "function changeTurn(newTurn){\n turn = newTurn;\n console.log('it is turn: ' + turn);\n}", "function result() {\n if (\n (playerHand === 'ROCK' && opponentHand === 'SCISSOR') || \n (playerHand === 'PAPER' && opponentHand === 'ROCK') || \n (playerHand === 'SCISSOR' && opponentHand === 'PAPER') \n ) {\n return 'WIN';\n } else if (\n (playerHand === 'ROCK' && opponentHand === 'ROCK') || \n (playerHand === 'PAPER' && opponentHand === 'PAPER') || \n (playerHand === 'SCISSOR' && opponentHand === 'SCISSOR') \n ) {\n return 'DRAW';\n } else {\n return 'LOSE';\n }\n}", "function turnLeft(rover) {\n if (rover.direction === \"N\") {\n rover.direction = \"W\" \n } else if(rover.direction === \"W\") {\n rover.direction = \"S\"\n } else if(rover.direction === \"S\") {\n rover.direction = \"E\"\n } else if(rover.direction === \"E\") {\n rover.direction = \"N\"\n }\n\n hereIsWhereYouAreAt(rover)\n\n //console.log(\"turnLeft was called!\");\n //console.log(rover.direction)\n}", "function switchTurn(){\n\t\tif (checkForWinner(document.turn)){\n\t\t\tsetMessage(\"Congratulations \" + document.turn +\"! IronMan wins!\");\n\t\t\tdocument.winner = document.turn;\n\t\t} else if (document.turn == \"X\") {\n\t\t\tdocument.turn = \"O\";\n\t\t\tsetMessage(\"It's \" + document.turn + \"'s turn\");\n\t\t} else {\n\t\t\tdocument.turn = \"X\";\n\t\t\tsetMessage(\"It's \" + document.turn + \"'s turn\");\n\t\t}\n\t\n\t}", "function player() {\n return turn % 2 == 0 ? \"X\" : \"O\"\n}", "getWinner() {\n if (this._isInCheckmate(\n WHITE, this._board, this._enPassantInfo, this._castlingInfo\n )) {\n return BLACK;\n } else if (this._isInCheckmate(\n BLACK, this._board, this._enPassantInfo, this._castlingInfo\n )) {\n return WHITE;\n }\n return null;\n }", "takeTurn() {\n //all ants take a turn\n this._colony.allAnts.forEach(function(ant){\n ant.act(this._colony); //pass in colony reference if needed\n }, this);\n \n //all bees take a turn\n this._colony.allBees.forEach(function(bee){\n bee.act();\n }, this); \n \n //new bees arrive\n this._hive.invade(this._colony, this._turn);\n \n //turn finished\n this._turn++; \n }", "function whosTurn() {\n turnCounter++;\n if(turnCounter % 2 === 0){\n player1 = true\n player2 = false\n } else {\n player1 = false\n player2 = true\n }\n console.log(turnCounter);\n}", "winner_is() {\n if (this.is_finished()) {\n return this._color;\n }\n }", "function whosTurnIsIt(turn, player) {\n \tturn.html(\"It's your turn Player \" + player + \"!\");\n\t if (player == 1) {\n\t \t$('#turn').css(\"background\", \"#181914\").css(\"color\", \"white\");\n\t } else {\n\t \t$('#turn').css(\"background\", \"#A61723\").css(\"color\", \"white\");\n\t }\n }", "function getMyChampion(participant) {\n return getChampionTranslation(participant['championId']);\n}", "_obtenerTurno(turno) {\t\n let fechaYhora = new Date();\n let horas = fechaYhora.getHours() ;\n \n\tif ((horas >= 8) && (horas <= 10)) {\n turno = 1;\n }\n else if ((horas > 10) && (horas <= 12)) {\n turno = 2;\n\t\t}\n else if ((horas > 12) && (horas <= 14)) {\n turno = 3;\n }\n\t\telse if ((horas > 14) && (horas <= 16)) {\n turno = 4;\n }\t\n\t\telse if ((horas > 16) && (horas <= 18)) {\n turno = 5;\n }\n\t\telse if ((horas > 18) && (horas <= 20)) {\n turno = 6;\n }\n\t\telse if ((horas > 20) && (horas <= 21)) {\n turno = 7;\n }\n else {\n\t\t\tturno = 8;\n }\n\t\treturn turno;\n }", "function nextTurn() {\n if (currentPlayer == player1) {\n currentPlayer = player2;\n } else {\n currentPlayer = player1;\n }\n}", "function getRoleFromParticipantObj(participant) {\n var role = participant['timeline']['role'];\n var lane = participant['timeline']['lane'];\n if(lane == 'TOP') {\n if(role == 'DUO_SUPPORT' && checkSummonerIsSmite(participant)) {\n return 'Jungle';\n }\n return 'Top';\n }\n else if(lane == 'JUNGLE' && checkSummonerIsSmite(participant)) {\n return 'Jungle';\n }\n else if(lane == 'MIDDLE') {\n if(role == 'DUO_SUPPORT' && checkSummonerIsSmite(participant)) { \n return 'Jungle';\n }\n return 'Mid';\n }\n else if(lane == 'BOTTOM') {\n if(role == 'DUO_CARRY') {\n return 'ADC';\n }\n else if(role == 'DUO_SUPPORT') {\n return 'Support';\n }\n else { // if adc and support didn't properly get flagged, we will handle this case specifically\n return 'Bot';\n }\n }\n // we couldn't determine their role at this time\n // likely an AFK or player got tagged as jungle when they're not jungle\n else { \n return 'Unknown'; \n }\n}", "function isTurnPlayer (guid) {\n return (guid === state.queue[0]);\n}", "function whos_turn()\n{\n\tconsole.log(\"who's turn run\");\n\tif (player_index == 0){\n\t\t$(\".Xplayer\").addClass(\"playerTurn\");\n\t\t$(\".Oplayer\").removeClass(\"playerTurn\");\n\t}\n\telse {\n\t\t$(\".Xplayer\").removeClass(\"playerTurn\");\n\t\t$(\".Oplayer\").addClass(\"playerTurn\");\n\t}\n}", "function getWinner (playerMove, computerMove){\n\tif (playerMove === computerMove) { //if statements\n \twinner = \"tie\";\n } else if (playerMove === \"rock\" && computerMove === \"scissors\") {\n \twinner = \"player\";\n } else if (playerMove === \"paper\" && computerMove === \"rock\") {\n \twinner = \"player\";\n } else if (playerMove === \"scissors\" && computerMove === \"paper\") { \n \twinner = \"player\";\n } else {\n \twinner = \"computer\";\n }\n return winner; //stops function and returns value of winner\n\t}", "function switchTurn()\n{\n if(huidige_speler === SPELER1) {\n huidige_speler = SPELER2;\n } else {\n huidige_speler = SPELER1;\n }\n\n showCurrentPlayer();\n}", "function whichPlayer(player) {\n if (player == 1) {\n return playerOneName;\n } else if (player == 2) {\n return playerTwoName;\n }\n }", "function nextChoice(other : Collider){\n\ttrackMovement();\n\tcalculatingMove = true;\n\tif(travelDir == \"North\"){\n\t\ttargetDirL = other.gameObject.GetComponent(intersectionAI).goWest;\n\t\ttargetDirR = other.gameObject.GetComponent(intersectionAI).goEast;\n\t\ttargetDirF = other.gameObject.GetComponent(intersectionAI).goNorth;\n\t\ttargetTurnL = other.GetComponent(intersectionAI).turnW1;\n\t\ttargetTurnR1 = other.GetComponent(intersectionAI).turnE1;\n\t\ttargetTurnR2 = other.GetComponent(intersectionAI).turnE2;\n\t}else if(travelDir == \"South\"){\n\t\ttargetDirL = other.gameObject.GetComponent(intersectionAI).goEast;\n\t\ttargetDirR = other.gameObject.GetComponent(intersectionAI).goWest;\n\t\ttargetDirF = other.gameObject.GetComponent(intersectionAI).goSouth;\n\t\ttargetTurnL = other.GetComponent(intersectionAI).turnE1;\n\t\ttargetTurnR1 = other.GetComponent(intersectionAI).turnW1;\n\t\ttargetTurnR2 = other.GetComponent(intersectionAI).turnW2;\n\t}else if(travelDir == \"East\"){\n\t\ttargetDirL = other.gameObject.GetComponent(intersectionAI).goNorth;\n\t\ttargetDirR = other.gameObject.GetComponent(intersectionAI).goSouth;\n\t\ttargetDirF = other.gameObject.GetComponent(intersectionAI).goEast;\n\t\ttargetTurnL = other.GetComponent(intersectionAI).turnN1;\n\t\ttargetTurnR1 = other.GetComponent(intersectionAI).turnS1;\n\t\ttargetTurnR2 = other.GetComponent(intersectionAI).turnS2;\n\t}else if(travelDir == \"West\"){\n\t\ttargetDirL = other.gameObject.GetComponent(intersectionAI).goSouth;\n\t\ttargetDirR = other.gameObject.GetComponent(intersectionAI).goNorth;\n\t\ttargetDirF = other.gameObject.GetComponent(intersectionAI).goWest;\n\t\ttargetTurnL = other.GetComponent(intersectionAI).turnS1;\n\t\ttargetTurnR1 = other.GetComponent(intersectionAI).turnN1;\n\t\ttargetTurnR2 = other.GetComponent(intersectionAI).turnN2;\n\t}\n}", "function getRoundResult (move) {\n \n let computerMove = getComputerMove();\n let playerMove = move.textContent.toLowerCase();\n const lastRound = document.querySelector('#last-round');\n\n switch (computerMove) {\n case 'rock':\n switch (playerMove) {\n case 'rock':\n lastRound.textContent = \"It's a draw.\";\n return 'draw';\n case 'paper':\n lastRound.textContent = \"You win. Paper beats rock.\";\n return 'win';\n case 'scissors':\n lastRound.textContent = \"You lose. Rock beats scissors.\";\n return 'lose';\n default:\n lastRound.textContent = 'Something went wrong.';\n }\n break;\n case 'paper':\n switch (playerMove) {\n case 'rock':\n lastRound.textContent = \"You lose. Paper beats rock.\";\n return 'lose';\n case 'paper':\n lastRound.textContent = \"It's a draw.\";\n return 'draw';\n case 'scissors':\n lastRound.textContent = \"You win. Scissors beat paper.\";\n return 'win';\n default:\n lastRound.textContent = 'Something went wrong.';\n }\n break;\n case 'scissors':\n switch (playerMove) {\n case 'rock':\n lastRound.textContent = \"You win. Rock beats scissors.\";\n return 'win';\n case 'paper':\n lastRound.textContent = \"You lose. Scissors beat paper.\";\n return 'lose';\n case 'scissors':\n lastRound.textContent = \"It's a draw.\";\n return 'draw';\n default:\n lastRound.textContent = 'Something went wrong.';\n }\n break;\n default:\n lastRound.textContent = 'Something went wrong.';\n }\n}", "chooseWanderDirection(previousDirection){\n\t\tlet possibleDirections = [];\n\t\tlet backwards = -1;\n\t\tswitch(previousDirection){\n\t\t\tcase(0):\n\t\t\t\tbackwards = 2;\n\t\t\t\tbreak;\n\t\t\tcase(1):\n\t\t\t\tbackwards = 3;\n\t\t\t\tbreak;\n\t\t\tcase(2):\n\t\t\t\tbackwards = 0;\n\t\t\t\tbreak;\n\t\t\tcase(3):\n\t\t\t\tbackwards = 1;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tfor(let x=0;x<4;x++){\n\t\t\tif(!this.wallCheck(this.props.G.minotaurPos,x,1)){\n\t\t\t\tpossibleDirections.push(x);\n\t\t\t}\n\t\t}\n\t\t//console.log(\"Possible Directions: \");\n\t\t//console.log(possibleDirections);\n\t\tif(possibleDirections.length < 2){\n\t\t\t//console.log(\"Only 1 direction.\")\n\t\t\treturn possibleDirections[0];\n\t\t}\n\t\telse{\n\t\t\tlet tempDirections = [];\n\t\t\tfor(let x=0;x < possibleDirections.length;x++)\n\t\t\t{\n\t\t\t\tif(possibleDirections[x] !== backwards){\n\t\t\t\t\ttempDirections.push(possibleDirections[x]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet randDir = this.getRandInt(0,tempDirections.length);\n\t\t\t//console.log(\"Randomly chose: \" + randDir);\n\t\t\treturn tempDirections[randDir];\n\n\t\t}\n\t}", "function calculateFirstMove(board) {\n if ($(\".modeactive\").text() === game.modenormal) {\n\n return Math.floor((Math.random() * 9) + 1);\n\n } else {\n var tile = GetUserFirstMove();\n\n //make perfect move\n \n var moves = ['1', '3', '7', '9'];\n if (tile === 1 || tile === 3 || tile === 7 || tile === 9) return 5;\n else if (tile === 2 || tile === 4) return 1;\n else if (tile === 6 || tile === 8) return 9;\n else if (tile === 5) {\n return moves[Math.floor(Math.random() * 3)];\n }\n }\n\n\n\n}", "function nextGame(){\n switch (actualGame){\n case game1:\n actualGame = game2;\n break;\n case game2:\n actualGame = game3;\n break;\n case game3:\n actualGame = game1;\n break;\n }\n return actualGame;\n}", "function winnerName() {\n if(winnerAddress === myAddress) {\n return \"Me\";\n }\n if(winnerAddress === oppAddress) {\n return \"Opponent\";\n }\n }", "function findWinner() {\n if (computerScore >= 121) {\n state = \"computerWon\";\n gameSequence();\n return true;\n } else if (playerScore >= 121) {\n state = \"playerWon\";\n gameSequence();\n return true;\n } else {\n return false;\n }\n\n}", "function opponent(player){\n return (player === PLAYER ? COMPUTER : PLAYER);\n}", "function takeTurn() {\n\t\n\t\t//alert(\"In takeTurn\");\n\t\t\n\t\tif (activePlayer.type == \"Human\") {\n\t\t\t\n\t\t\t//alert(\"Player is Human\");\n\t\t\t\n\t\t\tactivateSquareClickedListener();\n\t\t}\n\t\telse {\n\t\t\n\t\t\t//alert(\"Player is Computer\");\n\t\t\t\n\t\t\tsetTimeout(function() {\n\t\t\t\n\t\t\t\tcomputerTurnControl();\n\t\t\t\t\n\t\t\t}, 1000);\n\t\t\t\n\t\t}\n\t}", "determineCurator() {\n //console.log(\"content:\",this.state.content);\n //console.log(user.id);\n //console.log(\"boardDetails:\",this.state.boardDetails);\n if (isset(this.state.content) && (this.state.content.type === \"Board\")\n && isset(this.state.content.owner.id) && (user.id === this.state.content.owner.id)) {\n return \"Board Owner Header\"\n }\n else if (isset(this.state.content) && this.state.content.type === \"Board\") {\n return \"Board Header\"\n }\n else if (isset(this.state.content) && this.state.content.type === \"Persona\") {\n return \"Persona Header\"\n }\n else if (isset(this.state.boardDetails) && isset(this.state.boardDetails.saved_by)\n && (user.id === this.state.boardDetails.saved_by.id)) {\n return \"Current User\";\n }\n else if (isset(this.state.boardDetails) && isset(this.state.boardDetails.saved_by)) {\n return \"Saved By Collaborator\";\n }\n else if (isset(this.state.boardDetails) && isset(this.state.boardDetails.relevance)) {\n return \"Recommended\";\n }\n else {\n return \"Discovered\";\n }\n }", "function getChoice() {\n var map = getChoices();\n var cnum = choiceNum();\n if (cnum && map[cnum])\n return map[cnum];\n}", "function runComputerTurn() {\n const boardState = checkBoard();\n const compTile = ohs ? 'ohs' : 'exes';\n const bestMove = findBestMove(boardState, compTile);\n\n if (exes) {\n $('#' + bestMove).css('background', primaryColor);\n $('#' + bestMove).text('');\n $('#' + bestMove).append('<i class=\\'fa fa-times\\'></i>');\n $('#' + bestMove).addClass('active ex');\n\n checkWinner();\n exes = false;\n ohs = true;\n playerTurn = true;\n } else if (ohs) {\n $('#' + bestMove).css('background', secondaryColor);\n $('#' + bestMove).text('');\n $('#' + bestMove).append('<i class=\\'fa fa-circle-o\\'></i>');\n $('#' + bestMove).addClass('active oh');\n\n checkWinner();\n exes = true;\n ohs = false;\n playerTurn = true;\n }\n}", "function adjustTurn(){\n if(playerTurn === scores.player1){\n playerTurn = scores.player2;\n }else{\n playerTurn = scores.player1;\n };\n if(playerTurn === scores.player1){\n message.innerHTML = `Player 1, it's your turn!`\n }\n if(playerTurn === scores.player2){\n message.innerHTML = `Player 2, it's your turn!`\n };\n}", "function castle_move(i,j,turn){\r\n\r\n if(document.getElementById(`${i}${j}`).textContent == '_______'){\r\n return 1;\r\n }\r\n else\r\n {\r\n if(turn == 1 && document.getElementById(`${i}${j}`).textContent == '1_king_'){\r\n return 0;\r\n }\r\n else if(turn == 2 && document.getElementById(`${i}${j}`).textContent == '2_king_'){\r\n return 0;\r\n }\r\n }\r\n}", "function whoWonRound() {\n // USER CHOOSE ROCK\n if (userMove === 0 && botRandom === 2) {\n return \"ROCK beats SCISSORS\"\n } else if (userMove === 0 && botRandom === 1) {\n // OR\n return \"PAPER beats ROCK\"\n } else if (userMove === botRandom) {\n return \"TIE GAME !\"\n }\n // USER CHOOSE PAPER\n if (userMove === 1 && botRandom === 0) {\n return \"PAPER beats ROCK\"\n } else if (userMove === 1 && botRandom === 2) {\n return \"SCISSORS beats PAPER\"\n } else if (userMove === botRandom) {\n return \"TIE GAME !\"\n }\n // USER CHOOSE SCISSORS\n if (userMove === 2 && botRandom === 1) {\n return \"SCISSORS beats PAPER\"\n } else if (userMove === 2 && botRandom === 0) {\n return \"ROCK beats SCISSORS\"\n } else if (userMove === botRandom) {\n return \"TIE GAME !\"\n }\n}", "function randomStartingPlayer() {\n const possibleTurns = ['x', 'o'];\n let index = Math.floor(Math.random() * possibleTurns.length);\n let firstTurn = possibleTurns[index];\n if (firstTurn === playerOne.marker) {\n playerOne.playerTurn = true;\n return playerOne.nameText;\n } else {\n playerTwo.playerTurn = true;\n return playerTwo.nameText;\n }\n}" ]
[ "0.66927385", "0.65845907", "0.65520275", "0.65097505", "0.649565", "0.6448989", "0.6443287", "0.63881946", "0.63446903", "0.6259162", "0.6243585", "0.6233513", "0.622928", "0.62070465", "0.61267364", "0.61267364", "0.611822", "0.6101008", "0.6097121", "0.60262924", "0.59981644", "0.5981512", "0.5934213", "0.5927489", "0.59224683", "0.5909056", "0.5908415", "0.58954704", "0.58882", "0.58608806", "0.58590543", "0.5829301", "0.58079666", "0.5806918", "0.57856715", "0.57739556", "0.57535", "0.5740419", "0.5734675", "0.5734675", "0.57215905", "0.5706156", "0.56945443", "0.5691276", "0.5689252", "0.5688704", "0.56741315", "0.5672459", "0.56695", "0.56680095", "0.5664762", "0.5660127", "0.56597966", "0.56589335", "0.5658688", "0.56433713", "0.5634475", "0.5624658", "0.56192654", "0.5615457", "0.5588175", "0.55791503", "0.5575511", "0.55614305", "0.555757", "0.5555458", "0.5543203", "0.5538065", "0.55324537", "0.552419", "0.55145156", "0.5506411", "0.5492319", "0.5491613", "0.54842484", "0.5481958", "0.5480863", "0.5479968", "0.5478633", "0.5475386", "0.546718", "0.545779", "0.5448961", "0.5445104", "0.54430103", "0.5435148", "0.543483", "0.5427098", "0.54267156", "0.54224163", "0.54183424", "0.5414418", "0.54114604", "0.54109997", "0.5408711", "0.54048383", "0.53979486", "0.5394326", "0.5389447", "0.53880334", "0.53873163" ]
0.0
-1
This determines if the move has already resulted in the person winning or if a cell has already been occupied.
function playerMove(cell) { if (document.winner != null) { setMessage(document.winner + " has already won the game!"); } else if (cell.innerHTML == ""){ cell.innerHTML = player1; switchTurn(); } else { setMessage("Position already taken."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isWinningMove() {\n var hori = count(0, -1) + count(0, 1) - 1;\n var vert = count(-1, 0) + count(1, 0) - 1;\n var diag = count(1, -1) + count(-1, 1) - 1;\n var antd = count(1, 1) + count(-1, -1) - 1;\n // console.log(\"horizontal: \" + hori);\n // console.log(\"vertical: \" + vert);\n // console.log(\"diagonal: \" + diag);\n // console.log(\"anti-diagonal: \" + antd);\n if (hori >=4 | vert >= 4 | diag >= 4 | antd >= 4) {\n return true;\n }\n else return false;\n }", "function checkForWinner(move) {\n\t\tvar result = false;\n\t\tif (checkRow(1,2,3, move) || \n\t\t\tcheckRow(4,5,6, move) || \n\t\t\tcheckRow(7,8,9, move) ||\n\t\t\tcheckRow(1,4,7, move) ||\n\t\t\tcheckRow(2,5,8, move) ||\n\t\t\tcheckRow(3,6,9, move) ||\n\t\t\tcheckRow(1,5,9, move) ||\n\t\t\tcheckRow(3,5,7, move)) {\n\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "function _win(cells) {\n // TODO: Check four cells to see if they're all legal & all color of current\n // player\n // if given cell coordinates are all same value (1 or 2 from BOARD) return true\n\n for ( let cell of cells) {\n // console.log(`cell 0 is ${cell[0]}\\ncell 1 is ${cell[1]}`)\n // BOARD[cell[0]][cell[1]]\n let y = cell[0];\n let x = cell[1];\n if (y < 0 || y >= HEIGHT || x < 0 || x >= WIDTH || BOARD[y][x] !== currPlayer) {\n return false; \n }\n }\n return true; \n }", "function _checkMoves() {\n\t\t\n\t\t// iterate through the rows\n\t\tfor(row = 0; row < _rows; row++) {\n\t\t\t\n\t\t\t// iterate through the cols\n\t\t\tfor (col = 0; col < _cols; col++) {\n\t\t\t\t\n\t\t\t\t// check top and bottom\n\t\t\t\tif(row - 1 >= 0 && typeof _board[row - 1][col] !== \"undefined\"\n\t\t\t\t && row + 1 < _rows && typeof _board[row + 1][col] !== \"undefined\"){\n\t\t\t\t\t\n\t\t\t\t\tif(_board[row - 1][col] === _board[row][col] && _board[row + 1][col] === _board[row][col]) {\n\t\t\t\t\t\t_winnerFound = true;\n\t\t\t\t\t\t_winner = _board[row][col];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check left and right\n\t\t\t\tif(col - 1 >= 0 && typeof _board[row][col - 1] !== \"undefined\"\n\t\t\t\t && col + 1 < _cols && typeof _board[row][col + 1] !== \"undefined\"){\n\t\t\t\t\t\n\t\t\t\t\tif(_board[row][col - 1] === _board[row][col] && _board[row][col + 1] === _board[row][col]) {\n\t\t\t\t\t\t_winnerFound = true;\n\t\t\t\t\t\t_winner = _board[row][col];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check diagonals\n\t\t\t\tif(col - 1 >= 0 && col + 1 < _cols && row - 1 >= 0 && row + 1 < _rows){\n\n\t\t\t\t\tif(typeof _board[row - 1][col - 1] !== \"undefined\"\n\t\t\t\t\t && typeof _board[row + 1][col + 1] !== \"undefined\"\n\t\t\t\t\t && _board[row - 1][col - 1] === _board[row][col] \n\t\t\t\t\t && _board[row + 1][col + 1] === _board[row][col]) {\n\t\t\t\t\t\t_winnerFound = true;\n\t\t\t\t\t\t_winner = _board[row][col];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if(typeof _board[row - 1][col + 1] !== \"undefined\"\n\t\t\t\t\t && typeof _board[row + 1][col - 1] !== \"undefined\"\n\t\t\t\t\t && _board[row - 1][col + 1] === _board[row][col] \n\t\t\t\t\t\t&& _board[row + 1][col - 1] === _board[row][col]) {\n\t\t\t\t\t\t_winnerFound = true;\n\t\t\t\t\t\t_winner = _board[row][col];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// if winner was found, then break out of loop\n\t\t\tif(_winnerFound) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "function checkForWinner(move) {\n\tvar result = false;\n\tif (checkRow(1, 2, 3, move) || checkRow(4, 5, 6, move) ||\n\t\tcheckRow(7, 8, 9, move) || checkRow(1, 4, 7, move) ||\n\t\tcheckRow(2, 5, 8, move) || checkRow(3, 6, 9, move) ||\n\t\tcheckRow(1, 5, 9, move) || checkRow(3, 5, 7, move)) {\n\n\t\tresult = true;\n\t};\n\treturn result;\n}", "IsWinner(){\n // If one player's pieces are completely gone, the other wins.\n var whiteCount = 0;\n var blackCount = 0;\n var whiteWin = true;\n var blackWin = true;\n for (var i = 0; i < Math.pow(this._size, 2); i++){\n var curCell = this._GetCell(this.NumberToPoint(i));\n // Check each cell to see if there are any with pieces not in an \n // opponents home location. In this case, there is no winner yet.\n if (curCell.occupant === null){\n continue;\n }\n if (curCell.occupant.color === PlayerColor.White && curCell.owner !== PlayerColor.Black){\n whiteWin = false;\n }\n else if (curCell.occupant.color === PlayerColor.Black && curCell.owner !== PlayerColor.White){\n blackWin = false;\n }\n\n // Count the total number of black and white pieces still on the board.\n if (curCell.occupant.color === PlayerColor.White){\n whiteCount++;\n }\n else if (curCell.occupant.color === PlayerColor.Black){\n blackCount++;\n }\n }\n if (whiteCount === 0 || blackCount === 0){\n return true;\n }\n else if (whiteWin === true || blackWin === true){\n return true;\n }\n return false;\n }", "function isLegalMove(col) {\n return stats.moveStart != null && stats.openRows[col] < 6 && stats.winner == null;\n }", "function isGameTied() { \n /* if there are no empty cells AND the human player has not won\n (only checking the human player because the human player will have \n have the last move in a true tie) */\n if (emptyCells().length === 0 && !checkWin(originalBoard, HUMAN_PLAYER)) { \n /* loop through all the cells and add a green color and remove eventListeners */\n CELLS.forEach((cell, index) => { \n cell.style.backgroundColor = '#00cc00';\n cell.removeEventListener('click', cellClicked, false);\n });\n /* call function that displays endGame dialog */\n declareWinner('tied');\n\n /* return true (because the game is tied) to the caller */\n return true;\n } \n \n /* return false (because the game is not tied) to the caller */\n return false;\n}", "function isWin() {\n\t//only after the game has been started and shuffling that we judge\n\tif (gameon && shuffling) {\n\t\tfor (var i = 0; i < squares.length; i++) {\n\t\t\tif (squares[i].position !== squares[i].identity) return false;\n\t\t}\n\t\treturn true;\n\t}\n}", "function checkForWin () {\n var winCount = 0;\n for (var i = 0; i < board.cells.length; i++) {\n var cell = board.cells[i];\n if (cell.isMine && cell.isMarked) {\n winCount++;\n } if (cell.isMine == false && cell.hidden == false) {\n winCount++;\n } \n }\n if (winCount === board.cells.length) {\n lib.displayMessage('You win!')\n }\n}", "function checkForWinner(move) {\r\n var result = false;\r\n if (checkRow(1, 2, 3, move) || checkRow(4, 5, 6, move) || checkRow(7, 8, 9, move) || checkRow(1, 4, 7, move) || checkRow(2, 5, 8, move) || checkRow(3, 6, 9, move) || checkRow(1, 5, 9, move) || checkRow(3, 5, 7, move)) {\r\n result = true;\r\n }\r\n return result;\r\n}", "function checkForWin () {\n\n for(var i = 0; i < board.cells.length; i++){\n if(board.cells[i].isMine == true){ //if mine exists not marked, board not finished\n if(board.cells[i].isMarked != true){\n return\n }\n } else if(board.cells[i].hidden == true){ //not mine and hidden = not finished\n return\n }\n }\n\n lib.displayMessage('You win!')\n return\n}", "function checkWin(){\n if ((board.top.col1===board.top.col2 && board.top.col3===\"X\") || (board.top.col1===board.top.col2 && board.top.col3===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n if ((board.middle.col1===board.middle.col2 && board.middle.col3===\"X\") || (board.middle.col1===board.middle.col2 && board.middle.col3===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n if ((board.bottom.col1===board.bottom.col2 && board.bottom.col3===\"X\") || (board.bottom.col1===board.bottom.col2 && board.bottom.col3===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n if ((board.top.col1===board.middle.col2 && board.bottom.col3===\"X\") || (board.top.col1===board.middle.col2 && board.bottom.col3===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n if ((board.top.col3===board.middle.col2 && board.bottom.col1===\"X\") || (board.top.col3===board.middle.col2 && board.bottom.col1===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n}", "function hasMoves() {\n for (var x = 0; x < cols; ++x) {\n for (var y = 0; y < cols; ++y) {\n if (canJewelMove(x, y)) {\n return true;\n }\n }\n }\n\n return false;\n }", "function checkForWin () {\n for (let cell of board.cells) {\n if (cell.isMine) {\n if (!cell.isMarked) {\n return false;\n }\n } else {\n if(cell.hidden) {\n return false;\n }\n }\n }\n // setEndTime\n endTime = new Date().getTime()\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!')\n // Play win audio\n document.getElementById(\"audio_win\").play()\n // reveal all mines after win\n revealMines()\n removeListeners()\n return true;\n}", "function checkForWin() {\n\tfunction _win(cells) {\n\t\t// Check four cells to see if they're all color of current player\n\t\t// - cells: list of four (y, x) cells\n\t\t// - returns true if all are legal coordinates & all match currPlayer\n\n\t\treturn cells.every(([ y, x ]) => y >= 0 && y < HEIGHT && x >= 0 && x < WIDTH && board[y][x] === currPlayer);\n\t}\n\n\tfor (let y = 0; y < HEIGHT; y++) {\n\t\tfor (let x = 0; x < WIDTH; x++) {\n\t\t\tlet horiz = [ [ y, x ], [ y, x + 1 ], [ y, x + 2 ], [ y, x + 3 ] ];\n\t\t\tlet vert = [ [ y, x ], [ y + 1, x ], [ y + 2, x ], [ y + 3, x ] ];\n\t\t\tlet diagDR = [ [ y, x ], [ y + 1, x + 1 ], [ y + 2, x + 2 ], [ y + 3, x + 3 ] ];\n\t\t\tlet diagDL = [ [ y, x ], [ y + 1, x - 1 ], [ y + 2, x - 2 ], [ y + 3, x - 3 ] ];\n\n\t\t\tif (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n}", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n for (let y = 0; y < HEIGHT; y++) { // loops through columns\n for (let x = 0; x < WIDTH; x++) { // loops through rows\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]]; // coordinates assigned to this constant will check for a horizontal win\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]]; // coordinates assigned to this constant will check for a vertical win\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]]; // coordinates assigned to this constant will check for a diagonal win moving to the right\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]]; // coordinates assigned to this constant will check for a diagonal win moving to the left\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) { // if any of the coordinates pass _win(), then the game is over.\n return true;\n }\n }\n }\n}", "function checkForWin () {\n for (i = 0; i < board.cells.length; i ++){\n if (board.cells[i['isMine']]===true && board.cells[i['isMarked']]===false){\n return\n }\n else if (board.cells[i['isMine']]===true && board.cells[i['hidden']]===true) {\n return\n }\n lib.displayMessage('You win!')\n\n }\n\n}", "function checkForWin() {\n let youWin = true;\n for (let i = 0; i < board.cells.length; i++) {\n if (board.cells[i].isMine === true && board.cells[i].ismarked === false) {\n youWin = false;\n }\n if (board.cells[i].isMine !== true && board.cells[i].hidden === true) {\n youWin = false;\n // console.log(youWin)\n }\n }\n // detected that they've won.\n if (youWin) {\n lib.displayMessage(\"You win!\");\n }\n}", "function checkForWin () {\nvar unhiddenCells = board.cells.filter(cell => {\n return ((cell.isMine && !cell.isMarked) || (!cell.isMine && cell.isHidden))\n})\nif (unhiddenCells.length === 0) {\n lib.displayMessage('You win!')\n }\n}", "function checkForWin() {\n\tfunction _win(cells) {\n\t\t// Check four cells to see if they're all color of current player\n\t\t// - cells: list of four (y, x) cells\n\t\t// - returns true if all are legal coordinates & all match currPlayer\n\n\t\treturn cells.every(([ y, x ]) => y >= 0 && y < HEIGHT && x >= 0 && x < WIDTH && board[y][x] === currPlayer);\n\t}\n\n\t// TODO: read and understand this code. Add comments to help you.\n\t//for each y coordinate and each x coordinate,\n\t//check to see if the four surrounding coordinates are filled horizontally, vertically, or either direction diagonally.\n\t// if there are four coordinates filled of the same color, return true\n\tfor (let y = 0; y < HEIGHT; y++) {\n\t\tfor (let x = 0; x < WIDTH; x++) {\n\t\t\tlet horiz = [ [ y, x ], [ y, x + 1 ], [ y, x + 2 ], [ y, x + 3 ] ];\n\t\t\tlet vert = [ [ y, x ], [ y + 1, x ], [ y + 2, x ], [ y + 3, x ] ];\n\t\t\tlet diagDR = [ [ y, x ], [ y + 1, x + 1 ], [ y + 2, x + 2 ], [ y + 3, x + 3 ] ];\n\t\t\tlet diagDL = [ [ y, x ], [ y + 1, x - 1 ], [ y + 2, x - 2 ], [ y + 3, x - 3 ] ];\n\n\t\t\tif (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n}", "function hasMoves () {\n for (var x = 0; x < cols; x++) {\n for (var y = 0; y < rows; y++) {\n if (canTileMove(x, y)) {\n return true;\n }\n }\n }\n return false;\n }", "checkWinner(move) \n {\n let result = false;\n if (this.checkRow(1, 2, 3, move) || \n this.checkRow(4, 5, 6, move) ||\n this.checkRow(7, 8, 9, move) ||\n this.checkRow(1, 4, 7, move) ||\n this.checkRow(2, 5, 8, move) ||\n this.checkRow(3, 6, 9, move) ||\n this.checkRow(1, 5, 9, move) ||\n this.checkRow(3, 5, 7, move)) \n {\n result = true;\n }\n\n return result;\n }", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // Checks all cells to see if a win starts there.\n\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function checkForWin() {\r\n // You can use this function call to declare a winner (once you've\r\n // detected that they've won, that is!)\r\n // lib.displayMessage('You win!')\r\n for (let i = 0; i < board.cells.length; i++) {\r\n const cell = board.cells[i];\r\n if ((cell.isMine && !cell.isMarked) || (!cell.isMine && cell.hidden)) {\r\n return;\r\n }\r\n }\r\n lib.displayMessage(\"You win!\");\r\n}", "function checkWin() {\n return Winning_combinations.some(combination => {\n return combination.every( index => {\n if (move % 2 !== 0) {\n return cells[index].classList.contains('x');\n }\n else {\n return cells[index].classList.contains('o');\n }\n })\n })\n}", "function checkForWin () {\n for (var i = 0; i < board.cells.length; i++) {\n if (!board.cells[i].isMine && board.cells[i].hidden) {return}\n if (board.cells[i].isMine && !board.cells[i].isMarked) {return}\n }\nlib.displayMessage('no rabies for you!')\n }", "function winnerCheck(move) {\r\n var flag = false;\r\n if (checkRow(1, 2, 3, move) ||\r\n checkRow(4, 5, 6, move) ||\r\n checkRow(7, 8, 9, move) ||\r\n checkRow(1, 4, 7, move) ||\r\n checkRow(2, 5, 8, move) ||\r\n checkRow(3, 6, 9, move) ||\r\n checkRow(1, 5, 9, move) ||\r\n checkRow(3, 5, 7, move)) {\r\n flag = true;\r\n }\r\n return flag;\r\n}", "function aiWin() {\n var moves = getWinningMoves(data.board, data.player2);\n if (moves.length > 0) {\n var move = pickRandomSpace(moves);\n placeMoveByIndex(move);\n return true;\n }\n return false;\n}", "checkForWin() {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n const _win = cells =>\n cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.height &&\n x >= 0 &&\n x < this.width &&\n this.board[y][x] === this.currPlayer\n );\n\n\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; x < this.width; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function checkForWin () {\n for (i = 0; i < board.cells.length; i++) {\n if(\n board.cells[i].isMine && !board.cells[i].isMarked){\n return}\n else if (\n board.cells[i].isMarked && !board.cells[i].hidden){\n return}\n }\n\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!')\n}", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // \n // iterate through y axis\n for (let y = 0; y < HEIGHT; y++) {\n // while going through x axis\n for (let x = 0; x < WIDTH; x++) {\n // coordinates for a horizontal win\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n // coordinates for a vertical win\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n // coordinates for a diagonal right win\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n // coordinates for diagonal left win\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n// if a win in any direction return true\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "checkTie() {\n if (this.emptyCells().length === 0) {\n this.gameOver({\n index: -1,\n player: \"tie\"\n });\n return true;\n }\n return false;\n }", "function canMove(row, col) {\n if (!hasOppositeChecker(row, col, currentColor)) {\n if (isAKing(occupiedArray[row][col].id)) {\n if (!cellIsVacant(row + 1, col + 1) && !cellIsVacant(row + 1, col - 1) && !cellIsVacant(row - 1, col + 1) && !cellIsVacant(row - 1, col - 1)) {\n return false;\n }\n }\n else if (occupiedArray[row][col].classList.contains(\"black\")) {\n if (!cellIsVacant(row + 1, col - 1) && !cellIsVacant(row + 1, col + 1)) {\n return false;\n }\n }\n else if (occupiedArray[row][col].classList.contains(\"red\")) {\n if (!cellIsVacant(row - 1, col - 1) && !cellIsVacant(row - 1, col + 1)) {\n return false;\n }\n }\n return true;\n }\n}", "function checkForWin () {\nfor(var x = 0; x<board.cells.length;x++){\nif(board.cells[x].isMine === true && board.cells[x].isMarked === false){\n\treturn;\n\t}else if(board.cells[x].isMine === false && board.cells[x].hidden === true){\n\t\treturn;\n\t}\n\n}\n\t\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!')\n}", "isGameOver(){\n let board=this.state.board;\n\n let win=[\n //rows\n [0, 1, 2], [3, 4, 5], [6, 7, 8],\n \n //columns\n [0, 3, 6], [1, 4, 7], [2, 5, 8],\n\n //diagonals\n [0, 4, 8], [2, 4, 6]\n ]\n \n for(let i=0;i<win.length;i++){\n let cell1=board[win[i][0]];\n let cell2=board[win[i][1]];\n let cell3=board[win[i][2]];\n\n if(cell1!==\"#\" && cell1===cell2 && cell2===cell3){\n return cell1;\n }\n }\n\n return -1;\n }", "function checkForWin() {\n const _win = (cells) => {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n };\n\n // TODO: read and understand this code. Add comments to help you.\n //iterate throught the board\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n //to win horizontally, all y's are the same\n const horiz = [\n [y, x],\n [y, x + 1],\n [y, x + 2],\n [y, x + 3],\n ];\n //to win vertically, all x's are the same\n const vert = [\n [y, x],\n [y + 1, x],\n [y + 2, x],\n [y + 3, x],\n ];\n\n //to win diag to the right, x's and y's are all plus 1 every step\n const diagDR = [\n [y, x],\n [y + 1, x + 1],\n [y + 2, x + 2],\n [y + 3, x + 3],\n ];\n //to win diag to the left, x's subtract 1 every step and y's plus 1 every step\n const diagDL = [\n [y, x],\n [y + 1, x - 1],\n [y + 2, x - 2],\n [y + 3, x - 3],\n ];\n\n //one way winning is a win\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n\n //nobody wins return false;\n return false;\n}", "function checkGameOver() {\r\n for (var i = 0; i < gBoard.length; i++) {\r\n for (var j = 0; j < gBoard[i].length; j++) {\r\n var cell = gBoard[i][j]\r\n if (!cell.isShown) {\r\n if (cell.isMarked) {\r\n if (!cell.isMine) return false;\r\n } else {\r\n return false\r\n }\r\n }\r\n }\r\n }\r\n return true\r\n}", "isGameOverFor(marker) {\n let playerChecked = this.state.humanMarker === marker ? 'human' : 'computer';\n\n if (\n (this.state.spaces[0] === marker && this.state.spaces[1] === marker && this.state.spaces[2] === marker) ||\n (this.state.spaces[3] === marker && this.state.spaces[4] === marker && this.state.spaces[5] === marker) ||\n (this.state.spaces[6] === marker && this.state.spaces[7] === marker && this.state.spaces[8] === marker) ||\n (this.state.spaces[0] === marker && this.state.spaces[3] === marker && this.state.spaces[6] === marker) ||\n (this.state.spaces[1] === marker && this.state.spaces[4] === marker && this.state.spaces[7] === marker) ||\n (this.state.spaces[2] === marker && this.state.spaces[5] === marker && this.state.spaces[8] === marker) ||\n (this.state.spaces[0] === marker && this.state.spaces[4] === marker && this.state.spaces[8] === marker) ||\n (this.state.spaces[2] === marker && this.state.spaces[4] === marker && this.state.spaces[6] === marker)\n ) {\n // a win\n if (playerChecked === 'human') {\n this.getEndState('human');\n return true;\n } else if (playerChecked === 'computer') {\n this.getEndState('computer');\n return true;\n }\n } else if (this.getOpenSpaces().length === 0) {\n this.getEndState('tie');\n return true;\n } else {\n // no win, no tie yet\n return false;\n }\n }", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // TODO: read and understand this code. Add comments to help you.\n\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function checkForWin(player) {\n for (let i = 0; i < winningMoves.length; i++) {\n let winningMove = winningMoves[i];\n for (let j = 0; j < winningMove.length; j++) {\n if (\n player.playerCells.some(\n (playerCellVal) => playerCellVal === winningMove[j]\n ) &&\n player.playerCells.some(\n (playerCellVal) => playerCellVal === winningMove[j + 1]\n ) &&\n player.playerCells.some(\n (playerCellVal) => playerCellVal === winningMove[j + 2]\n )\n ) {\n winner = true;\n player.playerScore += 1;\n markWinningMove(winningMove, player);\n }\n }\n }\n updateAnnouncementBoard(player);\n}", "function _win(cells) {\n // Checks four cells to see if they're all legal & all equal to current\n // player. \n return cells.every(function ([y, x]) {\n return (y >= 0 && y < HEIGHT && x >= 0 && y < WIDTH && board[y][x] === currPlayer);\n });\n }", "isGameOver() {\n return (\n this._isInCheckmate(WHITE, this._board, this._enPassantInfo, this._castlingInfo) ||\n this._isInCheckmate(BLACK, this._board, this._enPassantInfo, this._castlingInfo) ||\n this._isInStalemate(this._whoseTurn, this._board, this._enPassantInfo, this._castlingInfo)\n );\n }", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // TODO: read and understand this code. Add comments to help you.\n\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // TODO: read and understand this code. Add comments to help you.\n\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "gameWon() {\n if (this._gameBoard[0] == this._currentPlayer && this._gameBoard[1] == this._currentPlayer && this._gameBoard[2] == this._currentPlayer ||\n this._gameBoard[3] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[5] == this._currentPlayer ||\n this._gameBoard[6] == this._currentPlayer && this._gameBoard[7] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[0] == this._currentPlayer && this._gameBoard[3] == this._currentPlayer && this._gameBoard[6] == this._currentPlayer ||\n this._gameBoard[1] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[7] == this._currentPlayer ||\n this._gameBoard[2] == this._currentPlayer && this._gameBoard[5] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[0] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[8] == this._currentPlayer ||\n this._gameBoard[2] == this._currentPlayer && this._gameBoard[4] == this._currentPlayer && this._gameBoard[6] == this._currentPlayer) {\n this._gameOver = true;\n if (this._currentPlayer == 'X') {\n this._xWins += 1;\n } else {\n this._yWins += 1; \n }\n }\n //checks to see if the game is tied\n var isTie = true;\n for (var i = 0; i < this._gameBoard.length; i++) {\n if (this._gameBoard[i] == \"\") { //there is an empty spot on the board\n isTie = false; \n }\n }\n if (isTie) {\n this._gameOver = true;\n this._ties += 1;\n }\n this._tiedGame = isTie;\n }", "function checkForWin() {\n /** _win:\n * takes input array of 4 cell coordinates [ [y, x], [y, x], [y, x], [y, x] ]\n * returns true if all are legal coordinates for a cell & all cells match\n * currPlayer\n */\n\n /**\n * _wins \n * @param {*} cells -- list of coordinates of the game state board \n */\n\n function _win(cells) {\n let [y, x] = cells[0];\n let currentPlayer = board[y][x];\n if (currentPlayer !== null) {\n\n return cells.every(cell => {\n return validCoord(cell) && board[cell[0]][cell[1]] === currentPlayer\n })\n\n }\n return false;\n }\n\n // using HEIGHT and WIDTH, generate \"check list\" of coordinates\n // for 4 cells (starting here) for each of the different\n // ways to win: horizontal, vertical, diagonalDR, diagonalDL\n for (var y = 0; y < HEIGHT; y++) {\n for (var x = 0; x < WIDTH; x++) {\n\n\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function checkForWin() {\n\tfunction _win(cells) {\n\t\t// Check four cells to see if they're all color of current player\n\t\t// - cells: list of four (y, x) cells\n\t\t// - returns true if all are legal coordinates & all match currPlayer\n\n\t\treturn cells.every(([ y, x ]) => y >= 0 && y < HEIGHT && x >= 0 && x < WIDTH && board[y][x] === currPlayer); //???\n\t}\n\n\t// TODO: read and understand this code. Add comments to help you.\n\n\tfor (var y = 0; y < HEIGHT; y++) {\n\t\tfor (var x = 0; x < WIDTH; x++) {\n\t\t\tvar horiz = [ [ y, x ], [ y, x + 1 ], [ y, x + 2 ], [ y, x + 3 ] ]; //4 possible matches per row - total : 24 possible matches\n\t\t\tvar vert = [ [ y, x ], [ y + 1, x ], [ y + 2, x ], [ y + 3, x ] ]; //3 possible matches per column - total : 21 possible matches\n\t\t\tvar diagDR = [ [ y, x ], [ y + 1, x + 1 ], [ y + 2, x + 2 ], [ y + 3, x + 3 ] ]; //4,5,6,6,5,4 - total : 12 possible matches\n\t\t\tvar diagDL = [ [ y, x ], [ y + 1, x - 1 ], [ y + 2, x - 2 ], [ y + 3, x - 3 ] ]; //4,5,6,6,5,4 - total : 12 possible matches\n\t\t\t//total runtime : 69 possible matches?\n\t\t\tif (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n}", "function checkForWin() {\n\t// check four cells to see if they're all color of current player\n\t// • cells: list of four (y, x) cells\n\t// • returns true if all are legal coordinates & all match currPlayer\n\tfunction _win(cells) {\n\t\treturn cells.every(([y, x]) =>\n\t\t\ty >= 0 &&\n\t\t\ty < HEIGHT &&\n\t\t\tx >= 0 &&\n\t\t\tx < WIDTH &&\n\t\t\tboard[y][x] === currPlayer\n\t\t);\n\t}\n\n\tfor (let y = 0; y < HEIGHT; y++) {\n\t\tfor (let x = 0; x < WIDTH; x++) {\n\t\t\t// get \"check list\" of 4 cells (starting here) for each of the different ways to win\n\t\t\tconst horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n\t\t\tconst vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n\t\t\tconst diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n\t\t\tconst diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n\t\t\t// find winner (only checking each win-possibility as needed)\n\t\t\tif (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) return true;\n\t\t}\n\t}\n}", "function checkMoves() {\n if (picked.length !== null) {\n if (opponentPicked.length !== null) {\n checkWinner();\n }\n }\n }", "function checkForWin() {\n // define a win\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n // if the y and x coordinates are vaild playable coordinates within the grid return true else return false\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // TODO: read and understand this code. Add comments to help you.\n // determining a win with four of the same pieces vertically, horizonally, diagDR, diagDL\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "checkForWin() {\n if ((this.state.availCells.length <= 4) && (this.state.winner === '')) {\n this.winCheck()\n } else {\n this.nextTurn()\n }\n }", "function checkWin(board, player) {\n\n // Reduce to find array containing the indexes of cell that matches the player\n // i.e., moves of player\n\tlet plays = board.reduce((a, e, i) =>\n\t\t(e === player) ? a.concat(i) : a, []);\n\n\tlet gameWon = null;\n\n // Find if moves of player qualify for win\n // If yes than break from loop and return gameWon\n for (let [index, win] of winCombos.entries()) {\n\t\tif (win.every(elem => plays.indexOf(elem) > -1)) {\n\t\t\tgameWon = {index: index, player: player};\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn gameWon;\n}", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every( //check every cell on the board for a 1 or 2 (piece played)\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n for (var y = 0; y < HEIGHT; y++) { \n for (var x = 0; x < WIDTH; x++) {\n var horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]]; //horizonal win\n var vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]]; //vertical win\n var diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]]; //diagonal to the right win\n var diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]]; //diagonal to the left win\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) { //if any of these win situations are true, return true\n return true;\n }\n }\n }\n}", "function checkForWin() {\n var isWinner = true\n\n for (let i = 0; i < board.cells.length; i++) {\n var cell = board.cells[i]\n\n if (cell.isMine && !cell.isMarked || cell.hidden && !cell.isMine) {\n isWinner = false\n }\n }\n\n if (isWinner) {\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!');\n winAudio.play();\n }\n}", "function _win(cells) {\n\n // TODO: Check four cells to see if they're all legal & all color of current\n // player\n\n\n //check for out of bounds,if out of bounds return false\n for (let cell of cells) {\n if (cell[0] < 0 || cell[0] >= HEIGHT) {\n return false\n } else if (cell[1] < 0 || cell[1] >= WIDTH ){\n return false\n }\n }\n\n //make more readable\n for (let idx = 0; idx < cells.length; idx++) {\n //this is getting value at 0th index because, all should be same in array\n let baseCheck = board[cells[0][0]][cells[0][1]]\n if (board[cells[idx][0]][cells[idx][1]] !== baseCheck || board[cells[idx][0]][cells[idx][1]] === null) {\n return false\n }\n }\n return true \n }", "function checkForWinner(move) { // move basically checks the infomration that your giving ie X or O.\n var result = false; //default value\n if (checkRow(1, 2, 3, move) ||\n (checkRow(4, 5, 6, move)) ||\n (checkRow(7, 8, 9, move)) ||\n (checkRow(1, 4, 7, move)) ||\n (checkRow(2, 5, 8, move)) ||\n (checkRow(3, 6, 9, move)) ||\n (checkRow(1, 5, 9, move)) ||\n (checkRow(3, 5, 7, move))) {\n result = true;\n}\nconsole.log(result);\nreturn result;\n}", "function checkForWin() {\n\tfunction _win(cells) {\n\t\t// Check four cells to see if they're all color of current player\n\t\t// - cells: list of four (y, x) cells\n\t\t// - returns true if all are legal coordinates & all match currPlayer\n\n\t\treturn cells.every(([ y, x ]) => y >= 0 && y < HEIGHT && x >= 0 && x < WIDTH && board[y][x] === currPlayer);\n\t}\n\n\t// TODO: read and understand this code. Add comments to help you.\n\t// this part will check each cell if the current player has 4 tokens together horizontically,vertically,and diagonally(right or left), and will return true so i can activate the endgame function.\n\n\tfor (let y = 0; y < HEIGHT; y++) {\n\t\tfor (let x = 0; x < WIDTH; x++) {\n\t\t\tconst horiz = [ [ y, x ], [ y, x + 1 ], [ y, x + 2 ], [ y, x + 3 ] ];\n\t\t\tconst vert = [ [ y, x ], [ y + 1, x ], [ y + 2, x ], [ y + 3, x ] ];\n\t\t\tconst diagDR = [ [ y, x ], [ y + 1, x + 1 ], [ y + 2, x + 2 ], [ y + 3, x + 3 ] ];\n\t\t\tconst diagDL = [ [ y, x ], [ y + 1, x - 1 ], [ y + 2, x - 2 ], [ y + 3, x - 3 ] ];\n\n\t\t\tif (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n}", "function occupied(i, j) // is this square occupied\r\n{\r\n // Added check to ensure that occupied square is in grid.\r\n if (i <= gridsize && j <= gridsize &&\r\n i >= 0 && j >= 0) {\r\n\r\n switch (GRID[i][j]) {\r\n case GRID_WALL:\r\n case GRID_MAZE:\r\n case GRID_ENEMY:\r\n case GRID_AGENT:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n // off the grid\r\n return true;\r\n}", "checkForWin() {\n const _win = (cells) => {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.HEIGHT &&\n x >= 0 &&\n x < this.WIDTH &&\n this.board[y][x] === this.currPlayer\n );\n };\n\n for (let y = 0; y < this.HEIGHT; y++) {\n for (let x = 0; x < this.WIDTH; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "doesMovePutKingInCheck(pieceRow, pieceCol, destRow, destCol) {\n let pieceOwner = this.chessboard[pieceRow][pieceCol][1];\n let destinationCellContents = this.chessboard[destRow][destCol];\n // Move piece on destination square\n this.chessboard[destRow][destCol] = this.chessboard[pieceRow][pieceCol];\n this.chessboard[pieceRow][pieceCol] = EMPTY_CELL;\n\n let kingInCheck = this.isKingInCheck(pieceOwner);\n\n // This function uses the original chessboard to avoid creating\n // a copy of the chessboard matrix on every call\n this.chessboard[pieceRow][pieceCol] = this.chessboard[destRow][destCol];\n this.chessboard[destRow][destCol] = destinationCellContents;\n\n return kingInCheck;\n }", "function checkForWin() {\n // Create a loop through all the board cells\n for (var i = 0; i < board.cells.length; i++) {\n // If there is a mine and it hasn't been flagged exit loop\n if (board.cells[i].isMine === true && board.cells[i].isMarked === false)\n return;\n\n // if every mine is marked but there are still cells hidden exit loop\n if (board.cells[i].isMine === false && board.cells[i].hidden === true)\n return;\n }\n\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n lib.displayMessage('You win!');\n}", "function winn(currentMove) {\n if (\n (box[0].innerText == currentMove && box[1].innerText == currentMove && box[2].innerText == currentMove) ||\n (box[3].innerText == currentMove && box[4].innerText == currentMove && box[5].innerText == currentMove) ||\n (box[6].innerText == currentMove && box[7].innerText == currentMove && box[8].innerText == currentMove) ||\n (box[0].innerText == currentMove && box[3].innerText == currentMove && box[6].innerText == currentMove) ||\n (box[1].innerText == currentMove && box[4].innerText == currentMove && box[7].innerText == currentMove) ||\n (box[2].innerText == currentMove && box[5].innerText == currentMove && box[8].innerText == currentMove) ||\n (box[0].innerText == currentMove && box[4].innerText == currentMove && box[8].innerText == currentMove) ||\n (box[2].innerText == currentMove && box[4].innerText == currentMove && box[6].innerText == currentMove)) {\n\n alert(currentMove + ' wins!');\n refr();\n } else if (moveCount == 9) {\n alert('Tie Game!');\n refr();\n }\n }", "checkForWin() {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n const _win = cells =>\n cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.height &&\n x >= 0 &&\n x < this.width &&\n this.board[y][x] === this.currPlayer\n );\n\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; x < this.width; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function didYouWin() {\n if (cells[0].textContent == player && cells[1].textContent == player && cells[2].textContent == player) {\n declareWinner(player);\n } else if (cells[3].textContent == player && cells[4].textContent == player && cells[5].textContent == player) {\n declareWinner(player);\n } else if (cells[6].textContent == player && cells[7].textContent == player && cells[8].textContent == player) {\n declareWinner(player);\n } else if (cells[0].textContent == player && cells[3].textContent == player && cells[6].textContent == player) {\n declareWinner(player);\n } else if (cells[1].textContent == player && cells[4].textContent == player && cells[7].textContent == player) {\n declareWinner(player);\n } else if (cells[2].textContent == player && cells[5].textContent == player && cells[8].textContent == player) {\n declareWinner(player);\n } else if (cells[0].textContent == player && cells[4].textContent == player && cells[8].textContent == player) {\n declareWinner(player);\n } else if (cells[2].textContent == player && cells[4].textContent == player && cells[6].textContent == player) {\n declareWinner(player);\n } else {\n // If no one wins the game on this move, check for a tie --\n tieGame();\n }\n}", "function checkForWinner(row, col, team) {\n\n\t// the cell we want to see for a win\n\tvar win_cell = (team == YELLOW) ? \"yellow_cell\" : \"red_cell\";\n\tvar win_string = (team == YELLOW) ? \"win_yellow\" : \"win_red\";\n\tvar winner = false;\n\t\n\t// check in the four possible directions (east-west, north-south, NE-SW and NW-SW)\n\tvar E_W = countInDirection(row, col, 0, 1, win_cell) + countInDirection(row, col, 0, -1, win_cell);// check if we won!\n\tif (E_W > 4) {\n\t\tcurrent_team = NONE;\n\t\tcountInDirection(row, col, 0, 1, win_cell, win_string);\n\t\tcountInDirection(row, col, 0, -1, win_cell, win_string);\n\t\treturn true;\n\t} \n\t\n\t\n\tvar N_S = countInDirection(row, col, -1, 0, win_cell) + countInDirection(row, col, 1, 0, win_cell);\n\tif (N_S > 4) {\n\t\tcurrent_team = NONE;\n\t\tcountInDirection(row, col, -1, 0, win_cell, win_string);\n\t\tcountInDirection(row, col, 1, 0, win_cell, win_string);\n\t\treturn true;\n\t} \n\t\n\t\n\tvar NE_SW = countInDirection(row, col, -1, 1, win_cell) + countInDirection(row, col, 1, -1, win_cell);\n\tif (NE_SW > 4) {\n\t\tcurrent_team = NONE;\n\t\tcountInDirection(row, col, -1, 1, win_cell, win_string);\n\t\tcountInDirection(row, col, 1, -1, win_cell, win_string);\n\t\treturn true;\n\t} \n\t\n\t\n\tvar NW_SE = countInDirection(row, col, -1, -1, win_cell) + countInDirection(row, col, 1, 1, win_cell);\n\tif (NW_SE > 4) {\n\t\tcurrent_team = NONE;\n\t\tcountInDirection(row, col, -1, -1, win_cell, win_string);\n\t\tcountInDirection(row, col, 1, 1, win_cell, win_string);\n\t\treturn true;\n\t} \n\t\n\treturn false;\n}", "function checkDiaWin(){\n let midCell = game.gameBoard[4];\n if (midCell == null) {return false;}\n if (game.gameBoard[0] == midCell && game.gameBoard[8] == midCell){\n game.gameWinner = midCell;\n return true;\n }\n else if (game.gameBoard[6]== midCell && game.gameBoard[2] == midCell){\n game.gameWinner = midCell;\n return true;\n }\n return false;\n}", "function tied() {\n var i = 0;\n while (i < 9) {\n if ($(cells[i++]).hasClass(empty_cell)) return false;\n }\n gameisfinished = true;\n return true;\n }", "function checkPermittedMove(direction) {\n var targetSquare = null;\n mapWidth = mapLocations[currentLocation][0][1].length;\n mapHeight = mapLocations[currentLocation][0].length;\n switch (direction) {\n case \"up\":\n // Make sure player isn't already at the top of the map, but let them move if \n // the next square leads to a different map.\n targetSquare = mapLocations[currentLocation][0][playerY - 1][playerX];\n if (typeof targetSquare === \"string\"){\n return true;\n } else if (playerY === 0) {\n return false;\n }\n break;\n case \"down\":\n // Make sure player isn't already at the bottom of the map, but let them move if \n // the next square leads to a different map.\n targetSquare = mapLocations[currentLocation][0][playerY + 1][playerX];\n if (typeof targetSquare === \"string\"){\n return true;\n } else if (playerY === mapHeight) {\n return false;\n }\n break;\n case \"left\":\n // Make sure player isn't already at the left edge of the map, but let them move if \n // the next square leads to a different map.\n targetSquare = mapLocations[currentLocation][0][playerY][playerX - 1];\n if (typeof targetSquare === \"string\"){\n return true;\n } else if (playerX === 0) {\n return false;\n }\n break;\n case \"right\":\n // Make sure player isn't already at the right edge of the map, but let them move if \n // the next square leads to a different map.\n targetSquare = mapLocations[currentLocation][0][playerY][playerX + 1];\n if (typeof targetSquare === \"string\"){\n return true;\n } else if (playerX === mapWidth) {\n return false;\n }\n break;\n default:\n }\n if (targetSquare === 1 || targetSquare === 3) {\n // Next square is an obstacle\n return false;\n } else if (targetSquare.toString()[0] === \"2\") {\n // Square is taken by an interactive object\n return false;\n } else if (targetSquare === 5 && direction !== \"down\") {\n // Can only jump *down* ledges\n return false;\n } else if (targetSquare === 5 && direction === \"down\") {\n // Next square is a ledge and the player is moving down\n return true;\n } else if (targetSquare.toString()[0] === \"6\") {\n // Square is taken by an NPC\n return false;\n } else if (targetSquare.toString()[0] === \"7\") {\n // Square is taken by a claimable object\n return false;\n } else if (targetSquare.toString()[0] === \"8\") {\n // Invisible barrier. Can't cross without a healthy pokemon.\n if (myPokemon === null) {\n showText(\"You'll need a pokemon to leave town. Find Professor Oak.\");\n return false;\n } else if (myPokemon.currentHP === 0) {\n showText(\"Your pokemon has 0 HP! Talk to Mom to heal.\");\n return false;\n } else {\n return true;\n }\n } else {\n // Default to true. Nothing disqualifies the square.\n return true;\n }\n}", "function checkForWin () {\n var numOfCells = board.cells.length\n var clearedSquares = 0\n var markedMines = 0\n var totalMines = 0\n \n for (k=0; k < numOfCells; k++){\n var checkCell = board.cells[k]\n // first count how many mines are present\n if (checkCell.isMine == true) {\n totalMines ++\n }\n //check to see if cell is NOT mine and is visible\n if (checkCell.isMine == false && checkCell.hidden == false){\n clearedSquares++\n }\n //check to see if is mine and is marked\n if (checkCell.isMine == true && checkCell.isMarked == true){\n markedMines ++\n }\n }\n var notMines = numOfCells - totalMines\n\n //console log tests\n console.log(\"wincheck\")\n console.log(clearedSquares,\" cleared squares out of total number of non mines\",notMines)\n console.log(markedMines, \"marked mines out of \",totalMines)\n\n\n if (clearedSquares == notMines || markedMines == totalMines){\n lib.displayMessage('You win!')\n var applause = document.getElementById(\"applause\")\n var applauseFlag = true;\n if (applauseFlag == true) {\n applause.pause();\n applause.curretTime = 0;\n applause.play();\n applauseFlag = false;\n }\n }\n \n}", "currentPlayerWon() {\n let winStr = this.currentPlayer.sym.repeat(3);\n let winMove = winningMoves.findIndex((_,j) => getWinningMoveStrings(j) === winStr);\n\n if (winMove !== -1) {\n highlightWinningMove(winMove);\n return true;\n } else {\n return false; \n }\n }", "checkWin(owner) {\n const playerCanWin = owner === 'opponent';\n const board = playerCanWin ? this.opponentBoard : this.playerBoard;\n const discoveredShips = board.cells\n .flat()\n .filter(\n (cell) => cell.classList.contains('ship') && cell.children[0].disabled\n ).length;\n const win = this.totalCells === discoveredShips;\n if (win)\n new GameOverView({\n win: playerCanWin,\n }).render(this.container);\n return win;\n }", "function checkForWin() {\n\n /** _win:\n * takes input array of 4 cell coordinates [ [y, x], [y, x], [y, x], [y, x] ]\n * returns true if all are legal coordinates for a cell & all cells match\n * currPlayer\n */\n function _win(cells) {\n // Checks four cells to see if they're all legal & all equal to current\n // player. \n return cells.every(function ([y, x]) {\n return (y >= 0 && y < HEIGHT && x >= 0 && y < WIDTH && board[y][x] === currPlayer);\n });\n }\n\n // using HEIGHT and WIDTH, generate \"check list\" of coordinates\n // for 4 cells (starting here) for each of the different\n // ways to win: horizontal, vertical, diagonalDR, diagonalDL\n for (var y = 0; y < HEIGHT; y++) {\n for (var x = 0; x < WIDTH; x++) {\n\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDL = [[y, x], [y - 1, x + 1], [y - 2, x + 2], [y - 3, x + 3]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function playerWon() {\n var rows = board.length;\n var cols = board[0].length;\n var currPlayer = players[currPlayerIndex];\n\n // Check rows, columns, and diagonals\n var isDiag1WinState = true;\n var isDiag2WinState = true;\n for (var i = 0; i < rows; i++) {\n var isRowWinState = true;\n var isColWinState = true;\n for (var j = 0; j < cols; j++) {\n if (board[i][j] !== currPlayer)\n isRowWinState = false;\n if (board[j][i] !== currPlayer)\n isColWinState = false;\n if (i === j && board[i][j] !== currPlayer)\n isDiag1WinState = false;\n if (i === (cols-1)-j && board[i][j] !== currPlayer)\n isDiag2WinState = false;\n }\n if (isRowWinState || isColWinState) return true;\n }\n\n return isDiag1WinState || isDiag2WinState;\n}", "function checkUserWin() {\n const openedDivs = document.querySelectorAll('.row div.opened');\n if (!gameOver && openedDivs.length + Object.keys(mineMap).length === (sizeX * sizeY)) {\n handleMessage(\"Congrats!!! You won!! Game over, we'd love to see you again!!\");\n revealMines();\n }\n }", "function boardHasWinnerAfterMove(board, player, move) {\n let row = getRow(move);\n let col = getCol(move);\n\n return boardHasWinnerInRow(board, player, row) ||\n boardHasWinnerInColumn(board, player, col) ||\n boardHasWinnerInMainDiagonal(board, player) ||\n boardHasWinnerInOffDiagonal(board, player);\n}", "checkForWin() {\n if (!this.grid.lastPlacedChip) {\n return;\n }\n const connections = this.grid.getConnections({\n baseChip: this.grid.lastPlacedChip,\n minConnectionSize: Game.winningConnectionSize\n });\n if (connections.length > 0) {\n // Mark chips in only the first winning connection, and only mark the\n // first four chips of this connection (since only a connect-four is\n // needed to win\n connections[0].length = Game.winningConnectionSize;\n connections[0].forEach((chip) => {\n chip.winning = true;\n });\n this.winner = this.grid.lastPlacedChip.player;\n this.winner.score += 1;\n this.emit('game:declare-winner', this.winner);\n this.endGame();\n }\n }", "function humanTurn(cell) // cell: Spot <td> id\r\n{\r\n var found = false;\r\n\r\n var spotObj = Board[getIndexByTdId(cell)];\r\n\r\n // check turn\r\n // Debug: Need Spot object - find index in Board by cell.\r\n if(turn != spotObj.state)\r\n {\r\n // Debug Code\r\n alert(\"IT'S NOT YOUR PIECE!\");\r\n\r\n return false;\r\n }\r\n\r\n // check if move up available\r\n if(blankSpot.down != null)\r\n if( cell == Board[blankSpot.down].dspot )\r\n {\r\n goUp(spotObj);\r\n found = true;\r\n }\r\n\r\n // check if move down available\r\n if(blankSpot.up != null)\r\n if( cell == Board[blankSpot.up].dspot )\r\n {\r\n goDown(spotObj);\r\n found = true;\r\n }\r\n\r\n // check if move right available\r\n if(blankSpot.left != null)\r\n if( cell == Board[blankSpot.left].dspot )\r\n {\r\n goRight(spotObj);\r\n found = true;\r\n }\r\n\r\n // check if move Left available\r\n if(blankSpot.right != null)\r\n if( cell == Board[blankSpot.right].dspot )\r\n {\r\n goLeft(spotObj);\r\n found = true;\r\n }\r\n\r\n if(found)\r\n changeTurns();\r\n else\r\n alert(\"No Available Move\");\r\n return found;\r\n}", "function mayPlace(x, y) {\n\t// Coordinates are out-of-bounds\n\tif (!coordinatesAreInBounds(x, y)) {\n\t\treturn false;\n\t}\n\n\t// Cell already occupied\n\tif (board[x][y] === SHIP) {\n\t\treturn false;\n\t}\n\n\t// At least one adjacent cell is occupied\n\t// return (neighboringCells(x, y).filter(function(cell){return cell === SHIP}).length == 0);\n\tvar neighbors = neighboringCells(x, y);\n\treturn (neighbors.reduce(function(sum, value){return sum + value;}) === 0);\n}", "function isGameOver() {\n\tif (totalEmptyCells == 0) {\n\t\tvar gameOver = true;\n\t\tfor (var r = 0 ; r < 4 ; r++) {\n\t\t\tif (grid[r][0] == grid[r][1] || grid[r][1] == grid[r][2] || grid[r][2] == grid[r][3]) {\n\t\t\t\tgameOver = false;\n\t\t\t}\n\t\t\tif (r < 3) {\n\t\t\t\tif (grid[r][0] == grid[r+1][0] || grid[r][1] == grid[r+1][1] || grid[r][2] == grid[r+1][2] || grid[r][3] == grid[r+1][3]) {\n\t\t\t\t\tgameOver = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn gameOver;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "game_over() {\n var row, col;\n var attacked_positions = [];\n var current_player_king;\n var has_valid_moves = false;\n for (row = 0; row < this.board.length; row++) {\n for (col = 0; col < this.board[0].length; col++) {\n var piece = this.board[row][col];\n if (piece === null) {\n continue;\n }\n\n if (piece.get_color() === this.get_curr_player()) {\n if (piece instanceof King) {\n current_player_king = new Location(row, col);\n }\n if (piece.get_valid_moves(this).length !== 0) {\n has_valid_moves = true;\n }\n } else {\n attacked_positions = attacked_positions.concat(piece.get_moves(this));\n }\n }\n }\n\n if (!has_valid_moves){\n if(this.in_check(this.get_curr_player())){\n // Checkmate\n if (this.get_curr_player() === Players.WHITE.COLOR) {\n return MoveStatus.BLACK_WIN;\n } else {\n return MoveStatus.WHITE_WIN;\n }\n }else{\n return MoveStatus.STALE_MATE;\n }\n }\n return MoveStatus.SUCCESS;\n }", "function checkPossibleMoves()\n{\n\tif(squares[0].innerHTML && squares[1].innerHTML && squares[2].innerHTML && squares[3].innerHTML &&\n\tsquares[4].innerHTML && squares[5].innerHTML && squares[6].innerHTML && squares[7].innerHTML && squares[8].innerHTML){\n\t\treturn true;\n\t}\n}", "function _win(cells) {\n // plan: loop through each coord from input and check if they are within the boundaries of the board\n // next check if all 4 colors are the same\n // return false if any failed conditions, true otherwise\n\n let matchColor = (currPlayer === 1) ? PLAYER_ONE_COLOR : PLAYER_TWO_COLOR;\n for (let i = 0; i < cells.length; i++) {\n let [row, col] = cells[i];\n // check if not legal\n if (!(row >= 0 && row < HEIGHT && col >= 0 && col < WIDTH)) {\n return false;\n }\n // check if current colors do not match\n if(board[row][col]!==matchColor){\n return false;\n }\n }\n return true;\n}", "_isInStalemate(whoseTurn, board, enPassantInfo, castlingInfo) {\n return (\n !this._isInCheck(whoseTurn, board, enPassantInfo) &&\n this._wouldEveryMoveResultInCheck(\n whoseTurn, board, enPassantInfo, castlingInfo\n )\n );\n }", "function checkForWin() {\n\n var d = $vast.MathUtil.getPointDistance(mainPlayer.x, mainPlayer.y, goal.x, goal.y);\n if (d <= 1) {\n mainPlayer.setPosition(64, 64);\n }\n }", "function checkForGameWin(player)\n{\n //Check for win\n //Down left column\n if(wonCells[0][0] == player && wonCells[0][1] == player && wonCells[0][2] == player)\n return player;\n //Down middle column\n if(wonCells[1][0] == player && wonCells[1][1] == player && wonCells[1][2] == player)\n return player;\n //Down right column\n if(wonCells[2][0] == player && wonCells[2][1] == player && wonCells[2][2] == player)\n return player;\n //Across top row\n if(wonCells[0][0] == player && wonCells[1][0] == player && wonCells[2][0] == player)\n return player; \n //Across middle row\n if(wonCells[0][1] == player && wonCells[1][1] == player && wonCells[2][1] == player)\n return player;\n //Across bottom row\n if(wonCells[0][2] == player && wonCells[1][2] == player && wonCells[2][2] == player)\n return player; \n //Top left to bottom right\n if(wonCells[0][0] == player && wonCells[1][1] == player && wonCells[2][2] == player)\n return player;\n //Top right to bottom left\n if(wonCells[0][2] == player && wonCells[1][1] == player && wonCells[2][0] == player)\n return player; \n \n //If no win, check for tie\n var countOfWonCells = 0;\n for(var i = 0; i < 3; i++)\n {\n for(var j = 0; j < 3; j++)\n {\n if(wonCells[i][j] != 0)\n countOfWonCells++;\n }\n }\n\n if(countOfWonCells == 9)\n return -1;\n else\n return 0;\n}", "function winner(gameBoard, move) {\n\n if (\n (gameBoard[0] == move && gameBoard[1] == move && gameBoard[2] == move) ||\n (gameBoard[3] == move && gameBoard[4] == move && gameBoard[5] == move) ||\n (gameBoard[6] == move && gameBoard[7] == move && gameBoard[8] == move) ||\n (gameBoard[0] == move && gameBoard[3] == move && gameBoard[6] == move) ||\n (gameBoard[1] == move && gameBoard[4] == move && gameBoard[7] == move) ||\n (gameBoard[2] == move && gameBoard[5] == move && gameBoard[8] == move) ||\n (gameBoard[0] == move && gameBoard[4] == move && gameBoard[8] == move) ||\n (gameBoard[2] == move && gameBoard[4] == move && gameBoard[6] == move)\n ) {\n return true;\n } else {\n return false;\n }\n\n}", "function checkWin() {\n for (let i = 0; i < winningCombinations.length; i++) {\n let pattern = winningCombinations[i];\n let [a, b, c] = pattern;\n if ( currentCells[a] === currentCells[b] && currentCells[b] === currentCells[c] ) {\n return true;\n }\n }\n return false;\n}", "function checkMove(xPos, yPos, newState) {\n\tvar result = true;\n\tvar newX = xPos;\n\tvar newY = yPos;\n\t\n\tfor(var r = 0, len = ourPiece.states[newState].length; r < len; r++) {\n\t\tfor(var c = 0, len2 = ourPiece.states[newState][r].length; c < len2; c++) {\n\t\t\t// If a square of the block is outside the left-right confines of the gameboard then the move is invalid.\n\t\t\tif(newX < 0 || newX >= columns) {\n\t\t\t\tresult = false;\n\t\t\t\tc = len2;\n\t\t\t\tr = len;\n\t\t\t}\n\t\t\t\n\t\t\t// This if checks that any given square of the block isn't already occupied by a previous block in game data.\n\t\t\tif(gameData[newY] != undefined && gameData[newY][newX] != 0 \n\t\t\t\t&& ourPiece.states[newState][r] != undefined && ourPiece.states[newState][r][c] != 0) {\n\t\t\t\tresult = false;\n\t\t\t\tc = len2;\n\t\t\t\tr = len;\n\t\t\t}\n\t\t\t\n\t\t\tnewX++;\n\t\t}\n\t\tnewX = xPos;\n\t\tnewY++;\n\t\t\n\t\t// If the new row would be below the last line of the gameboard the move is again invalid.\n\t\tif(newY > rows) {\n\t\t\tr = len;\n\t\t\tresult = false;\n\t\t}\n\t}\n\treturn result;\n}", "function checkWiningRowMove(p) {\n //0,1,2 3,4,5 6,7,8\n var ret = false;\n var r1 = _matrix[0][0] + _matrix[0][1] + _matrix[0][2];\n var r2 = _matrix[1][0] + _matrix[1][1] + _matrix[1][2];\n var r3 = _matrix[2][0] + _matrix[2][1] + _matrix[2][2];\n\n if (r1 === p.repeat(3) || r2 === p.repeat(3) || r3 === p.repeat(3) ) ret = true;\n\n return ret;\n }", "function checkWin() {\n if(($('[data-cell=\"0\"]').text() === playerTurn &&\n $('[data-cell=\"3\"]').text() === playerTurn &&\n $('[data-cell=\"6\"]').text() === playerTurn\n ) || ($('[data-cell=\"1\"]').text() === playerTurn &&\n $('[data-cell=\"4\"]').text() === playerTurn &&\n $('[data-cell=\"7\"]').text() === playerTurn\n ) || ($('[data-cell=\"2\"]').text() === playerTurn &&\n $('[data-cell=\"5\"]').text() === playerTurn &&\n $('[data-cell=\"8\"]').text() === playerTurn\n ) || ($('[data-cell=\"0\"]').text() === playerTurn &&\n $('[data-cell=\"1\"]').text() === playerTurn &&\n $('[data-cell=\"2\"]').text() === playerTurn\n ) || ($('[data-cell=\"3\"]').text() === playerTurn &&\n $('[data-cell=\"4\"]').text() === playerTurn &&\n $('[data-cell=\"5\"]').text() === playerTurn\n ) || ($('[data-cell=\"6\"]').text() === playerTurn &&\n $('[data-cell=\"7\"]').text() === playerTurn &&\n $('[data-cell=\"8\"]').text() === playerTurn\n ) || ($('[data-cell=\"0\"]').text() === playerTurn &&\n $('[data-cell=\"4\"]').text() === playerTurn &&\n $('[data-cell=\"8\"]').text() === playerTurn\n ) || ($('[data-cell=\"2\"]').text() === playerTurn &&\n $('[data-cell=\"4\"]').text() === playerTurn &&\n $('[data-cell=\"6\"]').text() === playerTurn\n )\n )\n {\n return true;\n } else {\n return false;\n }\n }", "function checkForWin () {\n function _win (cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every (\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n //DONE TODO: read and understand this code. Add comments to help you.\n //row = top -> ID -> tr -> #column-top -> height -> y\n //loops thru each row element\n for (let y = 0; y < HEIGHT; y++) {\n //cell = headCell -> id -> td -> width -> x\n //loops thru each cell element\n for (let x = 0; x < WIDTH; x++) {\n // Random thought: The arrays below kind of remind me of a cartesian grid layout\n //horizontal array increments by one as it goes down each row\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n //vertical array increments by one as it goes down each column\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n // diagonal right array increments by 1 as\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n //diagonal left array\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n //checks for win in multiple scenarios; either horizontal or vertical or diagonal right or diagonal left\n if (_win (horiz) || _win (vert) || _win (diagDR) || _win (diagDL)) {\n // if any of the logical operators || return true\n return true;\n }\n }\n }\n}", "checkWin(tile = null) {\n if (tile === null) {\n return Evaluator.getWinningMelds(this).length > 0;\n } else {\n this.addTile(tile);\n const bool = Evaluator.getWinningMelds(this).length > 0;\n this.removeTile(tile);\n return bool;\n }\n\n }", "function winCheck() {\n\n // Traverses the entire grid and checks for any discrepancy between the current grid and the answer grid, if there is then the player has not won yet\n for (var row = 0; row < 9; row++) {\n for (var col = 0; col < 9; col++) {\n if (grid[row][col].textContent != answerGrid[row][col]) {\n return false;\n }\n }\n }\n return true;\n}", "function checkWin(player, board) {\n let playerOccupied = board.reduce((a, e, i) => (e==player) ? a.concat(i) : a, []);\n // true or false\n return WINNING_COMBINATIONS.some(combination => {\n return combination.every(index => {\n return playerOccupied.includes(index);\n });\n });\n}", "function checkForWin (evt) {\n mineCount = 0 \n x = 0\n hiddenCount = 0\n\n for(let i = 0; i < board.cells.length; i ++){\n\n if(board.cells[i].isMine){ \n mineCount ++\n }\n if(board.cells[i].hidden ){\n x++\n hiddenCount = x\n }\n }\n\n for(let i = 0; i < board.cells.length; i ++){\n\n if (board.cells[i].isMarked != true && board.cells[i].isMine == true){\n return\n }\n\n if(board.cells[i].isMine != true && board.cells[i].hidden == true){\n return\n }\n }\n\n lib.displayMessage('You win!')\n\n\n\n // console.log(mineCount)\n // console.log(hiddenCount)\n\n // let foundCount = 0\n // for(let i = 0; i < board.cells.length; i ++){ \n\n // if (board.cells[i].isMarked == true && board.cells[i].isMine == true){\n // foundCount ++\n // }\n // if(foundCount == mineCount){\n // console.log(\"win\")\n\n // }\n // if(hiddenCount == mineCount ){\n // console.log(\"win\")\n // }\n \n // }\n\n // You can use this function call to declare a winner (once you've\n // detected that they've won, that is!)\n // lib.displayMessage('You win!')\n}", "function checkWin(turn) {\n\t\tif (\n\t\t board[0] === board[1] && board[0] === board[2] ||\n\t\t board[0] === board[3] && board[0] === board[6] ||\n\t\t board[0] === board[4] && board[0] === board[8] ||\n\t\t board[1] === board[4] && board[1] === board[7] ||\n\t\t board[2] === board[4] && board[2] === board[6] ||\n\t\t board[2] === board[5] && board[2] === board[8] ||\n\t\t board[3] === board[4] && board[3] === board[5] ||\n\t\t board[6] === board[7] && board[2] === board[8]\n\t\t ) {\n\t\t\tupdateBoard();\n\t\t\tboard = [1,2,3,4,5,6,7,8,9];\n\t\t\tturnNumber = 1;\n\t\t\tplayerTurn = true;\n\t\t\tplayer = turn ? 'Player \"X\"': 'Player \"O\"';\n\t\t\tconsole.log(player + 'won');\n\t\t\tupdateBoard();\n\t\t\tpopup(player);\n\t\t}\n\t}", "function isWinner() {\n //store player if x or o or undefined//\n const tile0 = tiles[0].classList[2];\n const tile1 = tiles[1].classList[2];\n const tile2 = tiles[2].classList[2];\n const tile3 = tiles[3].classList[2];\n const tile4 = tiles[4].classList[2];\n const tile5 = tiles[5].classList[2];\n const tile6 = tiles[6].classList[2];\n const tile7 = tiles[7].classList[2];\n const tile8 = tiles[8].classList[2];\n\n const winningConditions = [\n //row are the same//\n [tile0, tile1, tile2],\n [tile3, tile4, tile5],\n [tile6, tile7, tile8],\n //column are the same//\n [tile0, tile3, tile6],\n [tile1, tile4, tile7],\n [tile2, tile5, tile8],\n //diagonally are the same//\n [tile0, tile4, tile8],\n [tile2, tile4, tile6],\n ];\n\n //any winning condition//\n winningConditions.some((tile) => {\n if (tile[0] && tile[0] === tile[1] && tile[0] === tile[2]) {\n playerDisplay.textContent = `Player ${tile[0]} won!`;\n modalHeader.textContent = \"\";\n modalText.textContent = `Player ${tile[0]} won`;\n isGameOver(true);\n //display previous button//\n return tile;\n } else {\n isDraw();\n }\n });\n}", "winCheck() {\n if (this.state.A1 === this.state.A2 && this.state.A2 === this.state.A3) {\n this.updateState(this.state.A2)\n } else if (this.state.B1 === this.state.B2 && this.state.B3 === this.state.B2) {\n this.updateState(this.state.B2)\n } else if (this.state.C1 === this.state.C2 && this.state.C3 === this.state.C2) {\n this.updateState(this.state.C2)\n } else if (this.state.A1 === this.state.B2 && this.state.C3 === this.state.B2) {\n this.updateState(this.state.B2)\n } else if (this.state.C1 === this.state.B2 && this.state.A3 === this.state.B2) {\n this.updateState(this.state.B2)\n } else if (this.state.A1 === this.state.B1 && this.state.C1 === this.state.B1) {\n this.updateState(this.state.B1)\n } else if (this.state.A2 === this.state.B2 && this.state.C2 === this.state.B2) {\n this.updateState(this.state.B2)\n } else if (this.state.A3 === this.state.B3 && this.state.C3 === this.state.B3) {\n this.updateState(this.state.B3)\n } else if ((this.state.availCells.length <= 1) && (this.state.winner === '')) {\n this.updateState('draw')\n } else {this.nextTurn()}\n }", "function checkForWin() {\n var hiddenBlanks = 0;\n var unMarkedMines = 0;\n\n for(var b = 0; b < board.cells.length; b++){\n if(board.cells[b].hidden == true && board.cells[b].isMine == false){\n hiddenBlanks++;}\n if(board.cells[b].isMine == true && board.cells[b].isMarked == false){\n unMarkedMines++;}\n }\n if(hiddenBlanks == 0 && unMarkedMines == 0){\n lib.displayMessage('You win!');\n }\n}" ]
[ "0.70196646", "0.6976245", "0.6952398", "0.6924065", "0.69226193", "0.6917704", "0.6907018", "0.68547726", "0.6847678", "0.6834587", "0.6819364", "0.68186", "0.6812699", "0.6812083", "0.6801315", "0.6797841", "0.67967856", "0.67956686", "0.67941564", "0.6793112", "0.67795557", "0.6778184", "0.6769147", "0.6760908", "0.675165", "0.6735923", "0.6719358", "0.67018473", "0.66850567", "0.6683098", "0.6677276", "0.66768456", "0.66652095", "0.6664465", "0.6664312", "0.66626424", "0.6659138", "0.665873", "0.6654962", "0.66540927", "0.66496426", "0.66482", "0.66425294", "0.6640296", "0.6640296", "0.6628421", "0.66242915", "0.6608291", "0.6603763", "0.6601942", "0.6600269", "0.65877557", "0.6586568", "0.6585761", "0.6582808", "0.658095", "0.65763754", "0.6573286", "0.65721536", "0.65708274", "0.65686953", "0.6565036", "0.6561906", "0.6561632", "0.6551076", "0.65469986", "0.6546271", "0.6546089", "0.654489", "0.65197134", "0.65191746", "0.6512647", "0.65100133", "0.6488609", "0.6473743", "0.6463625", "0.6461666", "0.6447649", "0.6446098", "0.64435375", "0.64302254", "0.64293814", "0.6428662", "0.6423394", "0.6420025", "0.64136386", "0.6405338", "0.64039767", "0.6401792", "0.6393995", "0.6388842", "0.637839", "0.6376491", "0.6371094", "0.63612753", "0.6357705", "0.635549", "0.63548857", "0.63424104", "0.6340206" ]
0.65262496
69
Winning combinations Determines which cell number is clicked so that it can be used for the checkRow function
function getBox (number) { return document.getElementById("cell"+number).innerHTML; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleClick (evt) {\n //Checks game for win, if one player wins, ends game.\n if (checkForWin ()) {\n return endGame (\n `Game Over. Player ${currPlayer} won. Hit refresh to play again!`\n );\n }\n // get x from ID of clicked cell\n //row = top -> ID -> tr -> #column-top -> height -> y\n //cell = headCell -> id -> td -> width -> x\n\n //create variable for evt\n //gets x from id of clicked cell\n const x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n const y = findSpotForCol (x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n // DONE TODO: add line to update in-memory board\n //updates board at current index and sets it to currPlayer\n board[y][x] = currPlayer;\n placeInTable (y, x);\n\n // check for win\n if (checkForWin ()) {\n return endGame (`Player ${currPlayer} won!`);\n }\n\n // check for tie\n // DONE TODO: check if all cells in board are filled; if so call, call endGame\n //using .every() and callback function to check all elements in an array (cells)\n //and returns a boolean value. Reference this solution from\n //https://stackoverflow.com/questions/62727756/connect-4-check-for-win-isnt-working-how-do-i-fix\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n //used checkForWin instead of board.every(row => row.every(Boolean)) because I think it makes sense to check whether each cell\n //is filled for a win\n if (board.every (cells => cells.every (cell => cell))) {\n //console.log ('Tie game');\n return endGame ('Tie game');\n }\n\n // switch players\n // DONE TODO: switch currPlayer 1 <-> 2\n if (currPlayer === 1) {\n currPlayer = 2;\n } else {\n currPlayer = 1;\n }\n}", "function checkWin() {\n return Winning_combinations.some(combination => {\n return combination.every( index => {\n if (move % 2 !== 0) {\n return cells[index].classList.contains('x');\n }\n else {\n return cells[index].classList.contains('o');\n }\n })\n })\n}", "function checkForWin () {\n function _win (cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every (\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n //DONE TODO: read and understand this code. Add comments to help you.\n //row = top -> ID -> tr -> #column-top -> height -> y\n //loops thru each row element\n for (let y = 0; y < HEIGHT; y++) {\n //cell = headCell -> id -> td -> width -> x\n //loops thru each cell element\n for (let x = 0; x < WIDTH; x++) {\n // Random thought: The arrays below kind of remind me of a cartesian grid layout\n //horizontal array increments by one as it goes down each row\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n //vertical array increments by one as it goes down each column\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n // diagonal right array increments by 1 as\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n //diagonal left array\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n //checks for win in multiple scenarios; either horizontal or vertical or diagonal right or diagonal left\n if (_win (horiz) || _win (vert) || _win (diagDR) || _win (diagDL)) {\n // if any of the logical operators || return true\n return true;\n }\n }\n }\n}", "clicked(key, e){\r\n let k = this.keyToPoint(key)\r\n let j = this.state.prevClick\r\n let moved = false\r\n let cellClicked = this.state.rows[k.x][k.y]\r\n let prevClicked = j !== null ? this.state.rows[j.x][j.y] : null\r\n let nextTurn = this.state.turn\r\n\r\n if (this.sameCell(k, j))\r\n return\r\n \r\n //first click since last turn\r\n //Make sure white doesnt click black pieces and vice versa\r\n //Cells without pieces are not highlighted either\r\n if(prevClicked === null){\r\n if(!cellClicked.holdsPiece() || \r\n this.state.turn !== cellClicked.piece.player){\r\n return\r\n }\r\n else\r\n cellClicked.hl = \"true\"\r\n }\r\n else{\r\n if(cellClicked.holdsPiece() && \r\n prevClicked.piece.player === cellClicked.piece.player){\r\n cellClicked.hl = \"true\"\r\n prevClicked.hl = \"false\"\r\n }\r\n else{\r\n moved = prevClicked.piece.move(cellClicked, this.state.rows)\r\n if(moved){\r\n nextTurn = this.state.moveCount % 2 === 0 ? \"black\" : \"white\"\r\n prevClicked.hl = \"false\"\r\n }\r\n }\r\n }\r\n this.setState(prevState => ({\r\n rows : prevState.rows.map(row => ([...row])),\r\n prevClick : moved ? null : cellClicked.hl === \"true\" ? {...k} : prevState.prevClick,\r\n moveCount : moved ? prevState.moveCount + 1 : prevState.moveCount,\r\n turn : nextTurn\r\n }))\r\n\r\n if(moved){\r\n let mover = this.state.turn === \"white\" ? player1 : player2\r\n let moved = mover === player1 ? player2 : player1\r\n console.log(`${moved.name} is checked: ${mover.checkedOpponent(moved.kingLocation,\r\n this.state.rows)}`)\r\n }\r\n \r\n }", "function check_win(row, col) {\n var win = false;\n\n var res = diag1_check(row, col);\n if (!win && res[0] >= req_len) {\n win = true;\n for (i = 1; i <= res[1]; i++) {\n $('#grid tr').eq(row - i).find('td').eq(col - i).find('button').css(\"border-color\", 'rgba(255,255,255,0.8)');\n }\n for (i = 0; i < res[2]; i++) {\n $('#grid tr').eq(row + i).find('td').eq(col + i).find('button').css(\"border-color\", 'rgba(255,255,255,0.8)');\n }\n }\n\n var res = diag2_check(row, col);\n if (!win && res[0] >= req_len) {\n win = true;\n for (i = 1; i <= res[1]; i++) {\n $('#grid tr').eq(row - i).find('td').eq(col + i).find('button').css(\"border-color\", 'rgba(255,255,255,0.8)');\n }\n for (i = 0; i < res[2]; i++) {\n $('#grid tr').eq(row + i).find('td').eq(col - i).find('button').css(\"border-color\", 'rgba(255,255,255,0.8)');\n }\n }\n\n var res = row_check(row, col);\n if (!win && res[0] >= req_len) {\n win = true;\n for (i = 1; i <= res[1]; i++) {\n $('#grid tr').eq(row - i).find('td').eq(col).find('button').css(\"border-color\", 'rgba(255,255,255,0.8)');\n }\n for (i = 0; i < res[2]; i++) {\n $('#grid tr').eq(row + i).find('td').eq(col).find('button').css(\"border-color\", 'rgba(255,255,255,0.8)');\n }\n }\n\n var res = col_check(row, col);\n if (!win && res[0] >= req_len) {\n win = true;\n for (i = 1; i <= res[1]; i++) {\n $('#grid tr').eq(row).find('td').eq(col - i).find('button').css(\"border-color\", 'rgba(255,255,255,0.8)');\n }\n for (i = 0; i < res[2]; i++) {\n $('#grid tr').eq(row).find('td').eq(col + i).find('button').css(\"border-color\", 'rgba(255,255,255,0.8)');\n }\n }\n\n if (win) {\n $('#bg-winner').css('background-color', players[curr_player].win_color);\n $('#bg-red').css('opacity', '0');\n $('#bg-blue').css('opacity', '0');\n $('#bg-yellow').css('opacity', '0');\n $('#bg-green').css('opacity', '0');\n $('.navbar-left').html(\"<span style='color:\" + players[curr_player].color + \"'>\" + players[curr_player].name.toUpperCase() + \"</span> WINS!!\");\n $('.navbar-left').addClass('bg-dark');\n }\n\n return win;\n}", "function checkVictory(board, whoseTurn, row, col) {\n\n var connections = 1; //How many connections have been made?\n //2 variables determining the direction in which we are checking\n var up = 0;\n var right = 0; \n\n //For fading animation purposes\n var singleMatch = false; \n var matches = 0;\n\n //A matrix of the potentially winning combination\n var winningCombo = [ [col, row] ];\n\n \n for (var i = 0; i < 4; i++) { //Check in all 4 directions\n\n switch(i) {\n case 0:\n up = 0;\n right = 1;\n break;\n case 1:\n up = 1;\n right = 1;\n break;\n case 2:\n up = 1;\n right = 0;\n break;\n case 3:\n up = 1;\n right = -1;\n break;\n }\n\n for (var j = 0; j < 2; j++) { //Look both ways!\n for (var k = 1; k < 4; k++) { //Look 3 spaces ahead\n \n var checkX = (col + k*right);\n var checkY = (row + k*up);\n \n //Are we still on the board\n if (checkY < numRow && checkX < numCol && checkY >= 0 && checkX >= 0) {\n\n //Is the next tile of the same player? \n if (board.value[checkX][checkY] == whoseTurn) {\n if(!singleMatch) { \n board.$name[col][row].fadeTo(200, 0.5).fadeTo(200, 1);\n matches++;\n singleMatch = true;\n }\n board.$name[checkX][checkY].delay(400*(matches-1)+100*k).fadeTo(200, 0.5).fadeTo(200, 1);\n connections++;\n winningCombo[connections-1] = [checkX, checkY];\n }\n else break; \n }\n }\n //look the other way\n up *= -1;\n right *= -1;\n }\n\n singleMatch = false;\n\n if (connections >= 4) {\n return winningCombo;\n }\n else {\n connections = 1;\n winningCombo = [ [col, row]];\n }\n }\n\n return false;\n}", "function handleClick(evt) {\n // get x from ID of clicked cell in top row. All IDs are the value x of the column\n let clickedCell = evt.target;\n //retrieve the id\n //HTML converted the id to a string. the + sign converts it back to a int.\n let x = +clickedCell.id;\n\n // get next spot in column (if none, ignore click)\n let y = findSpotForCol(x);\n if (y === -1) {\n return;\n }\n\n // place piece in board and add to HTML table\n placeInTable(y, x);\n // update in-memory board with the player occupyiong the cell\n board[y][x] = currPlayer;\n\n // check for win\n if (checkForWin()) {\n //remove eventListener to the top line to avoid players keep playing\n let top = document.getElementById('column-top');\n top.removeEventListener('click',handleClick);\n // return winning alert\n return endGame(`Player ${currPlayer} won!...reset to play again...`);\n }\n\n // check for tie\n // check if all cells in board are filled; if so call, call endGame\n //row.findIndex will return the index of the first cell in the row that is empty, if none it returns -1. Goes through the 'row' array inside the board array\n //board.reduce will stock in the accumulator the value of this index going through each row in the board array. If there is no empty cell at all, the final value will be -1. The initial value is set to null\n //reverse the board because beginning of array and bottom of board are opposite\n board.reverse();\n let tie = board.reduce(((acc,row) => acc = row.findIndex(cell => cell==='')),);\n if (tie === -1){\n return endGame(`No winners!`);\n }\n //reverse the board back\n board.reverse();\n \n // switch players\n // switch currPlayer 1 <-> 2\n [player[0], player[1]]=[player[1],player[0]];\n currPlayer=player[0];\n //switch player name\n playerName();\n}", "function cellsClicked(e) {\n if (gameOver == true) {\n clearBoard();\n return;\n } else if (event.target.textContent) {\n messageBox.textContent = \"That square is already taken!\";\n return;\n }\n if (playersTurn % 2 == 0) {\n e.target.textContent = ' X ';\n } else {\n e.target.textContent = ' 0 ';\n }\n //Run the function to check who turn it is every click\n checkPlayersTurn();\n //Run function to check if their is a winner every click\n checkWinner();\n}", "function clickTestMode(cell, col, testNum){\n\n //console.log(\"clicked cell # \"+cell.id);\n if(cell.hasValue)\n {\n alert(\"Cannot click here.\");\n return;\n }\n\n if(playerRed==true) //player red\n {\n\n let cellSelected=selectCell(cell, col); //finds next available cell at bottom of column and adds emoji to the board\n\n if(winChoice())\n {\n //printWinner();\n if(test5Bool==true)\n {\n document.getElementById(\"test5\").innerHTML=testNum + \"PASSED\";\n }\n else if(test7Bool==true)\n {\n document.getElementById(\"test7\").innerHTML=testNum + \"PASSED\";\n }\n else if(test9Bool==true)\n {\n document.getElementById(\"test9\").innerHTML=testNum + \"PASSED\";\n }\n return;\n }\n else if(test5Bool==true)\n {\n document.getElementById(\"test5\").innerHTML=testNum + \"FAILED\";\n }\n else if(test7Bool==true)\n {\n document.getElementById(\"test7\").innerHTML=testNum + \"FAILED\";\n }\n else if(test9Bool==true)\n {\n document.getElementById(\"test9\").innerHTML=testNum + \"FAILED\";\n }\n\n }\n else //player yellow\n {\n let cellSelected=selectCell(cell, col);\n\n if(winChoice())\n {\n //printWinner();\n if(test6Bool==true)\n {\n document.getElementById(\"test6\").innerHTML=testNum + \"PASSED\";\n }\n else if(test8Bool==true)\n {\n document.getElementById(\"test8\").innerHTML=testNum + \"PASSED\";\n }\n else if(test10Bool==true)\n {\n document.getElementById(\"test10\").innerHTML=testNum + \"PASSED\";\n }\n return;\n }\n else if(test6Bool==true)\n {\n document.getElementById(\"test6\").innerHTML=testNum + \"FAILED\";\n }\n else if(test8Bool==true)\n {\n document.getElementById(\"test8\").innerHTML=testNum + \"FAILED\";\n }\n else if(test10Bool==true)\n {\n document.getElementById(\"test10\").innerHTML=testNum + \"FAILED\";\n }\n }\n switchPlayer();\n}", "function win(clicked) {\n //every time I will get all the cell classes and slipt them \n var memberOf = clicked.className.split(\" \");\n for (var i = 0; i < memberOf.length; i++) {\n //I am just appending a '.' so that I can query easily\n var testClass = '.' + memberOf[i];\n //this will return me the number of cells with the turn\n var items = contains('#TicTacToe ' + testClass, turn);\n // winning condition: turn == N_SIZE\n if (items.length == N_SIZE) {\n return true;\n }\n }\n //return false otherwise\n return false;\n}", "function checkWin() {\n for (let i = 0; i < winningCombinations.length; i++) {\n let pattern = winningCombinations[i];\n let [a, b, c] = pattern;\n if ( currentCells[a] === currentCells[b] && currentCells[b] === currentCells[c] ) {\n return true;\n }\n }\n return false;\n}", "function handleClick(evt) {\n // get x from ID of clicked cell\n let x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n // create pointer to keep track of lowest empty cell\n\n let y = findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n board[y][x] = currPlayer\n placeInTable(y, x);\n\n // check for win\n if (checkForWin()) {\n return endGame(`Player ${currPlayer} won!`);\n }\n\n // check for tie\n //check if there is an available spot\n // consider .every function to check top\n let spotAvailable = false\n console.log(board)\n for(let i = 0; i < WIDTH; i++){\n for(let j = 0; j < HEIGHT; j++){\n if (!(board[j][i] === 1 || board[j][i] === 2)){\n spotAvailable = true\n }\n }\n }\n if (!spotAvailable){\n endGame(\"It's a tie guys :(\")\n }\n\n // switch players\n currPlayer = (currPlayer === 1) ? 2 : 1\n \n console.log(currPlayer)\n}", "function handleClick(evt) {\n // get x from ID of clicked cell\n let x = evt.target.id;\n\n // get next spot in column (if none, ignore click)\n let y = findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n // TODO: add line to update in-memory board\n board[x][y] = currPlayer;\n //Setting the value of each cell to the player who chose the cell\n\n placeInTable(y, x);\n\n // check for win\n if (checkForWin()) {\n return endGame(`Player ${currPlayer} won!`);\n }\n\n // check for tie\n // TODO: check if all cells in board are filled; if so call the function endGame\n //every function uses a call back function for each value in the array\n //call back function uses arrow function \n\n let isBoardFilled = board.every((row) => row.every((cell) => cell));\n\n if(isBoardFilled){\n return endGame(\"Tie!!!\");\n }\n\n //if the board is a truthy value, then return a message through the endGame function with argument (message) \"Tie!\"\n\n\n // switch players\n // TODO: switch currPlayer 1 <-> 2\n\n /* if(currPlayer == 1){\n currPlayer = 2;\n }else{\n currPlayer = 1;\n }\n */\n\n //if currPlayer is 1 then assign 2 to the variable otherwise, assign it to 1.\n currPlayer = currPlayer == 1 ? 2 : 1; \n\n}", "function handleCellClick(event, rowIndex, cellIndex){\n\n if(gameState.board[rowIndex][cellIndex] == null ){\n gameState.board[rowIndex][cellIndex] = gameState.players[gameState.currentPlayerIndex];\n changeTurn();\n renderBoard();\n if(checkWin()){\n //do something\n alert(\"We; have a winner\")\n console.log(gameState)\n } else if(checkDraw()){\n alert(`We have a draw`)\n }\n }\n\n}", "clickEvent(event) {\n if (!event.target.classList.contains(\"cell\")) return;\n const cellElement = event.target;\n console.log(cellElement);\n console.log(\"Row Index:\", cellElement.dataset.rowIndex, \"| Column Index:\", cellElement.dataset.colIndex);\n const rowIndex = Number(cellElement.dataset.rowIndex);\n const colIndex = Number(cellElement.dataset.colIndex);\n const clickedCell = this.findCellByIndexes(rowIndex, colIndex);\n const neighborCells = this.findSurroundingCells(rowIndex, colIndex);\n\n // const clickedCellBelow = this.findCellByIndexes(rowIndex + 1, colIndex);\n // const clickedCellBelowLeft = this.findCellByIndexes(rowIndex + 1, colIndex - 1);\n // const clickedCellBelowRight = this.findCellByIndexes(rowIndex + 1, colIndex + 1);\n // const clickedCellLeft = this.findCellByIndexes(rowIndex, colIndex - 1);\n // const clickedCellTopLeft = this.findCellByIndexes(rowIndex - 1, colIndex - 1);\n // const clickedCellTopRight = this.findCellByIndexes(rowIndex - 1, colIndex + 1);\n // const clickedCellTop = this.findCellByIndexes(rowIndex - 1, colIndex);\n console.log(neighborCells, \"yeah\");\n console.log(\"index\", clickedCell);\n // console.log(\"index below\", clickedCellBelow);\n // console.log(\"index below right\", clickedCellBelowRight);\n // console.log(\"index top left\", clickedCellTopLeft);\n // console.log(\"index top\", clickedCellTop);\n }", "function checkWin() {\n\n let a = document.querySelectorAll('.btn');\n\n if (turn)\n winner = \"O\";\n else\n winner = \"X\";\n\n\n // console.log(combinations.length)\n for (let i in combinations) {\n let array = combinations[i];\n // console.log(array)\n\n // if ((a[array[0]].innerHTML == \"X\" || a[array[0]].innerHTML == \"O\")\n // console.log(typeof a[array[0]].innerHTML);\n if ((a[array[0]].innerHTML == \"X\" || a[array[0]].innerHTML == \"O\")\n && a[array[0]].innerHTML == a[array[1]].innerHTML &&\n a[array[1]].innerHTML == a[array[2]].innerHTML) {\n\n // console.log(array[0],array[1],array[2])\n\n alert(`${winner} Won the Match!!`);\n addCount();\n return true;\n }\n\n }\n\n\n if ((no_of_clicks >= 9 && !singlePlayer) ||\n (no_of_clicks > 4 && singlePlayer)) {\n drawCount++;\n alert(\"Its a Draw!!\");\n document.querySelector(\"#drawCount\").innerHTML = `Draws : ${drawCount}`\n resetBoard();\n twoCombinations = [];\n X_POSITIONS = [] ,O_POSITIONS = [];\n };\n return false;\n}", "function handleClick(evt) {\n // get x from ID of clicked cell\n const x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n const y = findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n // TODO: add line to update in-memory board\n\n // cell location assigned to player 1 or 2, so then its not null anymore and place chip in that location\n board[y][x] = currPlayer; \n placeInTable(y, x);\n\n // check for win\n if (checkForWin()) {\n return endGame(`Player ${currPlayer} won!`);\n }\n\n // check for tie\n // TODO: check if all cells in board are filled; if so call, call endGame\n \n // iterate over entire board\n let tieGame = true;\n\n for(let i = 0; i < board.length; i++) {\n // iterate over each array/row\n for(let j = 0; j < board[i].length; j++) {\n console.log(board[i][j]);\n if (board[i][j] === null) {\n tieGame = false;\n }\n }\n }\n\n if(tieGame === true) {\n endGame(\"Tie!\")\n }\n // if (board.every(row => row.every(cell => cell))) {\n // return endGame('Tie!');\n // }\n \n // switch players\n // TODO: switch currPlayer 1 <-> 2\n // if(currPlayer === 1) {\n // currPlayer = 2;\n // } else if(currPlayer === 2) {\n // currPlayer = 1;\n // }\n currPlayer = currPlayer === 1 ? 2 : 1;\n}", "function _isCellRelatedToSelectedCell(row, column) {\n if (cellSelected === row * 9 + column) {\n return true\n }\n let rowOfSelectedCell = Math.floor(cellSelected / 9)\n let columnOfSelectedCell = cellSelected % 9\n if (rowOfSelectedCell === row || columnOfSelectedCell === column) {\n return true\n }\n return [\n [0, 3, 0, 3],\n [0, 3, 3, 6],\n [0, 3, 6, 9],\n [3, 6, 0, 3],\n [3, 6, 3, 6],\n [3, 6, 6, 9],\n [6, 9, 0, 3],\n [6, 9, 3, 6],\n [6, 9, 6, 9],\n ].some(array => {\n if (\n rowOfSelectedCell > array[0] - 1 &&\n row > array[0] - 1 &&\n rowOfSelectedCell < array[1] &&\n row < array[1] &&\n columnOfSelectedCell > array[2] - 1 &&\n column > array[2] - 1 &&\n columnOfSelectedCell < array[3] &&\n column < array[3]\n )\n return true\n return false\n })\n }", "function clickCell(x,y) {\n if (grid[x][y]>0) {\n alert(\"Dont Try To Cheat Bud!!!!!\");\n } \n\n\n// Clicking Of Boxes\n else {\n if (currentPlayer==1) {\n document.getElementById(\"cell_\"+x+\"_\"+y).style.color=\"#3F88C5\";\n document.getElementById(\"cell_\"+x+\"_\"+y).innerHTML=\"X\";\n grid[x][y]=1;\n currentPlayer=2;\n } else {\n document.getElementById(\"cell_\"+x+\"_\"+y).style.color=\"#E2C290\";\n document.getElementById(\"cell_\"+x+\"_\"+y).innerHTML=\"O\";\n grid[x][y]=2;\n currentPlayer=1;\n }\n }\n}", "function checkForBoardWin(outerX, outerY, player)\n{\n //Check for win\n //Down left column\n if(selected[outerX][outerY][0][0] == player && selected[outerX][outerY][0][1] == player && selected[outerX][outerY][0][2] == player)\n return player;\n //Down middle column\n if(selected[outerX][outerY][1][0] == player && selected[outerX][outerY][1][1] == player && selected[outerX][outerY][1][2] == player)\n return player;\n //Down right column\n if(selected[outerX][outerY][2][0] == player && selected[outerX][outerY][2][1] == player && selected[outerX][outerY][2][2] == player)\n return player;\n //Across top row\n if(selected[outerX][outerY][0][0] == player && selected[outerX][outerY][1][0] == player && selected[outerX][outerY][2][0] == player)\n return player; \n //Across middle row\n if(selected[outerX][outerY][0][1] == player && selected[outerX][outerY][1][1] == player && selected[outerX][outerY][2][1] == player)\n return player;\n //Across bottom row\n if(selected[outerX][outerY][0][2] == player && selected[outerX][outerY][1][2] == player && selected[outerX][outerY][2][2] == player)\n return player;\n //Top left to bottom right\n if(selected[outerX][outerY][0][0] == player && selected[outerX][outerY][1][1] == player && selected[outerX][outerY][2][2] == player)\n return player;\n //Top right to bottom left\n if(selected[outerX][outerY][0][2] == player && selected[outerX][outerY][1][1] == player && selected[outerX][outerY][2][0] == player)\n return player;\n\n \n //If no win, check for tie\n var countOfSelected = 0;\n for(var i = 0; i < 3; i++)\n {\n for(var j = 0; j < 3; j++)\n {\n if(selected[outerX][outerY][i][j] != 0)\n countOfSelected++;\n }\n }\n\n if(countOfSelected == 9)\n return -1;\n else\n return 0;\n}", "function win(clicked) {\n // Get all cell classes\n // var memberOf = clicked.className.split(/\\s+/);\n // for (var i = 0; i < memberOf.length; i++) {\n // var testClass = '.' + memberOf[i];\n // var items = contains('#tictactoe ' + testClass, turn);\n // // winning condition: turn == N_SIZE\n // if (items.length == N_SIZE) {\n // return true;\n // }\n // }\n return false;\n}", "function setCellClickHandlers(){\r\n\r\n\tvar cells = document.getElementsByTagName(\"td\");\r\n\r\n\tfor(var i = 0; i < cells.length; i++){\r\n\r\n\t\tcells[i].onclick = function(){\r\n\r\n\t\t\tvar row = this.dataset.row;\r\n\t\t\tvar col = this.dataset.column;\r\n\t\t\tvar gridTable = document.getElementsByTagName(\"table\")[0];\r\n\t\t\tvar cell = gridTable.rows[row].cells[col];\r\n\t\t\tdocument.getElementById(\"errorDiv\").innerHTML = \"\";\r\n\r\n\t\t\t//First click\r\n\t\t\tif(chipSelected == false){\r\n\r\n\t\t\t\t//Black turn\r\n\t\t\t\tif(gameState.turn == BLACK){\r\n\r\n\t\t\t\t\tif(this.dataset.checkChip == BLACK || this.dataset.checkChip == BLACKKING){\r\n\r\n\t\t\t\t\t\tprevColor = this.style.background;\r\n\t\t\t\t\t\tprevRow = row;\r\n\t\t\t\t\t\tprevCol = col;\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tprevChip = this.dataset.checkChip;\r\n\t\t\t\t\t\tthis.style.background = selectedColor;\r\n\t\t\t\t\t\tchipSelected = true;\r\n\t\t\t\t\t\t//Call chipPossMoves and store in firstClickPossMovesArr\r\n\t\t\t\t\t\tvar selectedChip = gameState.checkArr[this.dataset.row][this.dataset.column];\r\n\t\t\t\t\t\tfirstClickMovesArr = chipPossMoves(selectedChip, cell);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\t//Error message\r\n\t\t\t\t\t\tdocument.getElementById(\"errorDiv\").innerHTML = \"ERROR: Please select a Black Chip\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Grey turn\r\n\t\t\t\telse{\r\n\r\n\t\t\t\t\tif(this.dataset.checkChip == GREY || this.dataset.checkChip == GREYKING){\r\n\r\n\t\t\t\t\t\tprevColor = this.style.background;\r\n\t\t\t\t\t\tprevRow = row;\r\n\t\t\t\t\t\tprevCol = col;\r\n\t\t\t\t\t\tprevCell = cell;\r\n\t\t\t\t\t\tprevChip = this.dataset.checkChip;\r\n\t\t\t\t\t\tthis.style.background = selectedColor;\r\n\t\t\t\t\t\tchipSelected = true;\r\n\t\t\t\t\t\t//Call chipPossMoves and store in firstClickPossMovesArr\r\n\t\t\t\t\t\tvar selectedChip = gameState.checkArr[this.dataset.row][this.dataset.column];\r\n\t\t\t\t\t\tfirstClickMovesArr = chipPossMoves(selectedChip, cell);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tdocument.getElementById(\"errorDiv\").innerHTML = \"ERROR: Please select a Grey Chip\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//Second click\r\n\t\t\telse{\r\n\r\n\t\t\t\t//Check to see if selected cell is in the firstClickPossMovesArr[]\r\n\t\t\t\tvar validMove = false;\r\n\t\t\t\tvar normMovesLength = firstClickMovesArr[0].length;\r\n\t\t\t\tvar jumpMovesLength = firstClickMovesArr[1].length;\r\n\r\n\t\t\t\tfor(var i = 0; i < normMovesLength; i++){\r\n\r\n\t\t\t\t\tif(firstClickMovesArr[0][i] == cell){\r\n\r\n\t\t\t\t\t\tvalidMove = true;\r\n\r\n\t\t\t\t\t\t//Black chip hitting King row\r\n\t\t\t\t\t\tif(cell.dataset.row == 7 && prevCell.dataset.checkChip == 1){\r\n\r\n\t\t\t\t\t\t\tcell.innerHTML = BLACKKINGDIV;\r\n\t\t\t\t\t\t\tprevCell.innerHTML = \"\";\r\n\t\t\t\t\t\t\tprevCell.style.background = prevColor;\r\n\t\t\t\t\t\t\tprevCell.dataset.checkChip = 0;\r\n\t\t\t\t\t\t\tthis.dataset.checkChip = BLACKKING;\r\n\r\n\t\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column] =\r\n\t\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column];\r\n\t\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column] = 0;\r\n\t\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column].king = true;\r\n\r\n\r\n\r\n\t\t\t\t\t\t\tchipSelected = false;\r\n\t\t\t\t\t\t\tif(gameState.turn == BLACK) gameState.turn = GREY;\r\n\t\t\t\t\t\t\telse gameState.turn = BLACK;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Grey chip hitting King row\r\n\t\t\t\t\t\telse if(cell.dataset.row == 0 && prevCell.dataset.checkChip == 2){\r\n\r\n\t\t\t\t\t\t\tcell.innerHTML = GREYKINGDIV;\r\n\t\t\t\t\t\t\tprevCell.innerHTML = \"\";\r\n\t\t\t\t\t\t\tprevCell.style.background = prevColor;\r\n\t\t\t\t\t\t\tprevCell.dataset.checkChip = 0;\r\n\t\t\t\t\t\t\tthis.dataset.checkChip = GREYKING;\r\n\r\n\t\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column] =\r\n\t\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column];\r\n\t\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column] = 0;\r\n\t\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column].king = true;\r\n\r\n\r\n\t\t\t\t\t\t\tchipSelected = false;\r\n\t\t\t\t\t\t\tif(gameState.turn == BLACK) gameState.turn = GREY;\r\n\t\t\t\t\t\t\telse gameState.turn = BLACK;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Normal movement\r\n\t\t\t\t\t\telse{\r\n\r\n\t\t\t\t\t\tcell.innerHTML = prevCell.innerHTML;\r\n\t\t\t\t\t\tprevCell.innerHTML = \"\";\r\n\t\t\t\t\t\tprevCell.style.background = prevColor;\r\n\t\t\t\t\t\tprevCell.dataset.checkChip = 0;\r\n\t\t\t\t\t\tthis.dataset.checkChip = prevChip;\r\n\r\n\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column] =\r\n\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column];\r\n\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column] = 0;\r\n\r\n\t\t\t\t\t\t//Need to update chipSelected no matter where they click\r\n\t\t\t\t\t\tchipSelected = false;\r\n\t\t\t\t\t\tif(gameState.turn == BLACK) gameState.turn = GREY;\r\n\t\t\t\t\t\telse gameState.turn = BLACK;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}//End for\r\n\r\n\t\t\t\t//Second for-loop to test jump cells\r\n\t\t\t\tfor(var i = 1; i < jumpMovesLength; i++){\r\n\r\n\t\t\t\t\tif(firstClickMovesArr[1][i] == cell){\r\n\r\n\t\t\t\t\t\tvalidMove = true;\r\n\r\n\t\t\t\t\t\t//Black chip jumping and hitting King row\r\n\t\t\t\t\t\tif(cell.dataset.row == 7 && prevCell.dataset.checkChip == 1){\r\n\r\n\t\t\t\t\t\t\tcell.innerHTML = BLACKKINGDIV;\r\n\t\t\t\t\t\t\tprevCell.innerHTML = \"\";\r\n\t\t\t\t\t\t\tprevCell.style.background = prevColor;\r\n\t\t\t\t\t\t\tprevCell.dataset.checkChip = 0;\r\n\t\t\t\t\t\t\tthis.dataset.checkChip = BLACKKING;\r\n\r\n\t\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column] =\r\n\t\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column];\r\n\t\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column] = 0;\r\n\t\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column].king = true;\r\n\r\n\t\t\t\t\t\t var currChip = gameState.checkArr[this.dataset.row][this.dataset.column];\r\n\t\t\t\t\t\t jump(firstClickMovesArr[1][i], firstClickMovesArr[1][i-1], currChip);\r\n\r\n\r\n\t\t\t\t\t\t\tchipSelected = false;\r\n\t\t\t\t\t\t\tif(gameState.turn == BLACK) gameState.turn = GREY;\r\n\t\t\t\t\t\t\telse gameState.turn = BLACK;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Grey chip hitting King row\r\n\t\t\t\t\t\telse if(cell.dataset.row == 0 && prevCell.dataset.checkChip == 2){\r\n\r\n\t\t\t\t\t\t\tcell.innerHTML = GREYKINGDIV;\r\n\t\t\t\t\t\t\tprevCell.innerHTML = \"\";\r\n\t\t\t\t\t\t\tprevCell.style.background = prevColor;\r\n\t\t\t\t\t\t\tprevCell.dataset.checkChip = 0;\r\n\t\t\t\t\t\t\tthis.dataset.checkChip = GREYKING;\r\n\r\n\t\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column] =\r\n\t\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column];\r\n\t\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column] = 0;\r\n\t\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column].king = true;\r\n\r\n\t\t\t\t\t\t var currChip = gameState.checkArr[this.dataset.row][this.dataset.column];\r\n\t\t\t\t\t\t jump(firstClickMovesArr[1][i], firstClickMovesArr[1][i-1], currChip);\r\n\r\n\r\n\t\t\t\t\t\t\tchipSelected = false;\r\n\t\t\t\t\t\t\tif(gameState.turn == BLACK) gameState.turn = GREY;\r\n\t\t\t\t\t\t\telse gameState.turn = BLACK;\r\n\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Normal jump movement\r\n\t\t\t\t\t\telse{\r\n\r\n\t\t\t\t\t\tcell.innerHTML = prevCell.innerHTML;\r\n\t\t\t\t\t\tprevCell.innerHTML = \"\";\r\n\t\t\t\t\t\tprevCell.style.background = prevColor;\r\n\t\t\t\t\t\tprevCell.dataset.checkChip = 0;\r\n\t\t\t\t\t\tthis.dataset.checkChip = prevChip;\r\n\r\n\t\t\t\t\t\tgameState.checkArr[this.dataset.row][this.dataset.column] =\r\n\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column];\r\n\t\t\t\t\t\tgameState.checkArr[prevCell.dataset.row][prevCell.dataset.column] = 0;\r\n\r\n\t\t\t\t\t\tvar currChip = gameState.checkArr[this.dataset.row][this.dataset.column];\r\n\t\t\t\t\t\tjump(firstClickMovesArr[1][i], firstClickMovesArr[1][i-1], currChip);\r\n\r\n\t\t\t\t\t\tchipSelected = false;\r\n\t\t\t\t\t\tif(gameState.turn == BLACK) gameState.turn = GREY;\r\n\t\t\t\t\t\telse gameState.turn = BLACK;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}//End for\r\n\r\n\t\t\t\tif(validMove == false){\r\n\t\t\t\t\tdocument.getElementById(\"errorDiv\").innerHTML = \"ERROR: Invalid move\";\r\n\t\t\t\t\tprevCell.style.background = prevColor;\r\n\t\t\t\t\tchipSelected = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfirstClickMovesArr = null;\r\n\r\n endGame();\r\n\r\n\t\t\t}//End Second Click\r\n\r\n\t\t}//End onclick\r\n\r\n\t}//End for\r\n\r\n}", "function giveCellsClick() {\n if(turn)\n {\n player = whitePlayer;\n }\n else\n {\n player = blackPlayer;\n }\n cells.forEach(cell => {\n cell.addEventListener('click', () =>\n { \n i = cell.closest('tr').rowIndex;\n j = cell.cellIndex;\n if(board[i][j] == 0 && player.possiblemoves[i][j] == 1)\n { \n if(HumanIsWhite)\n {\n placePiece(i, j, \"white\");\n }\n else\n {\n placePiece(i, j, \"black\");\n }\n \n }\n }); \n });\n}", "function cellClick(cells){\n console.log('clicked'+cells.target.id);\n var cellid;\n if(isChallenge){\ncellid=cells.target.id.substr(5);\n }else{\n cellid=cells.target.id;\n }\n if(typeof boardList[cellid]=='number'){\n Currcell=cellid;\n if(emptycells().length==boardSize){\n startTimer();\n }\n gameTurn(cellid,currPlayer);\n if(($(\".endgame\").css('display')=='none')){\n if(!checkDraw()){\n if($(\".endgame\").css('display')=='none'){\n if(isTwoMode){\n if(currPlayer==player){\n currPlayer=secondPlayer;\n }else{\n currPlayer=player;\n } \n }else{\n gameTurn(bestMove(),computer);\n if(emptycells().length==0&&($(\".endgame\").css('display')=='none')){\n checkDraw();\n }\n \n } \n }\n }\n } \n } \n}", "function Clicked(CellClicked){ \n if (typeof originalBoard[CellClicked.target.id]=='number'){\n if(PlayerDecide%2==1) {\n Show(CellClicked.target.id,FirstPlayer);\n PlayerDecide=PlayerDecide+1;\n }\n else { \n Show(CellClicked.target.id,SecondPlayer);\n PlayerDecide=PlayerDecide+1;\n }\n }\n}", "function checkCorrect(playerNum) {\n var correct = true;\n\n // Variables to keep track of the current 3x3 box the player is in\n var boxRow = Math.floor(selectedRow / 3) * 3;\n var boxCol = Math.floor(selectedCol / 3) * 3;\n\n // For loop to check if there is any overlap in the current column\n for (var row = 0; row < grid.length; row++) {\n if (playerNum == grid[row][selectedCol].textContent && row != selectedRow) {\n correct = false;\n }\n }\n\n // For loop to check if there is any overlap in the current row\n for (var col = 0; col < grid[selectedRow].length; col++) {\n if (playerNum == grid[selectedRow][col].textContent && col != selectedCol) {\n correct = false;\n }\n }\n\n // For loop to check if there is any overlap in the current 3x3 mini box\n for (var row = boxRow; row < boxRow + 3; row++) {\n for (var col = boxCol; col < boxCol + 3; col++) {\n if (playerNum == grid[row][col].textContent && col != selectedCol && row != selectedRow) {\n correct = false;\n }\n }\n }\n\n // If the player is wrong the cell is highlighted red and kept that way until the player is right, otherwise the cell remains the same\n if (!correct) {\n $(selectedCell).removeClass('clicked');\n $(selectedCell).addClass(\"incorrect-clicked\");\n } else {\n $(selectedCell).removeClass('incorrect-clicked incorrect');\n $(selectedCell).addClass('clicked');\n // Every time the player inputs a seemingly correct answer, the game will check to see if the player won and then end the game\n if (winCheck()) {\n \n // Stops the timer\n stopTimer();\n\n // Disables clickability\n clickDisabled = true;\n\n // Disables the ability to overwrite cells\n document.removeEventListener(\"keyup\", writeCell, false);\n\n // Creates a button to take the player to the endscreen\n var btn = document.createElement(\"button\");\n btn.innerHTML = \"You Win! Click me to see your stats.\";\n $(btn).addClass('btn btn-primary my-2');\n gridBox.appendChild(btn);\n $(btn).attr(\"onclick\", \"document.location='endscreen.html'\");\n localStorage.setItem(\"minutes\", min);\n localStorage.setItem(\"seconds\", sec);\n }\n }\n}", "function click(cell, col){\n //console.log(\"clicked cell # \"+cell.id);\n if(cell.hasValue)\n {\n alert(\"Cannot click here.\");\n return;\n }\n\n if(playerRed==true) //player red\n {\n\n let cellSelected=selectCell(cell, col); //finds next available cell at bottom of column and adds emoji to the board\n\n if(winChoice())\n {\n printWinner();\n return;\n }\n }\n else //player yellow\n {\n let cellSelected=selectCell(cell, col);\n\n if(winChoice())\n {\n printWinner();\n return;\n }\n }\n switchPlayer();\n}", "function _isCellSameAsSelectedCell(row, column) {\n if (fastMode) {\n if (numberSelected === gameArray[row * 9 + column]) {\n return true\n }\n return false\n } else {\n if (cellSelected === row * 9 + column) {\n return true\n }\n if (gameArray[cellSelected] === '0') {\n return false\n }\n if (gameArray[cellSelected] === gameArray[row * 9 + column]) {\n return true\n }\n }\n }", "function handleClick(e) { \n \n const currentCell = Number(e.target.id) // * change to a number here eliminates the need for repetition!\n // const column = currentCell % width\n const totalCells = width * height - 1 // * total number of cells on grid\n const isBottomRow = (totalCells - currentCell - width) < 0 // * check if we are on the bottom row \n\n // * this checks if the cell below has a counter on it or not, if it doesnt then you cant click above it\n if (!colArray.includes(currentCell + width) && !isBottomRow) return \n // * this checks if the colArray already includes the id of the cell thats been clicked, only adds it if its a new cell\n if (!colArray.includes(currentCell)){\n colArray.push(currentCell).id\n }\n if (colArray.length === 42) {\n document.querySelector('h4').innerHTML = 'Its a draw!'\n currentPlayer.style.backgroundColor = '#3e3e3e'\n }\n \n\n // * first part checks if current player is player one and if the cell they clicked is empty\n // * if the cell is empty then it adds the player-one class\n // * the else if does the reverse so is checking if the current player is 2\n if (isPlayerOne && isCellEmpty(currentCell)) {\n isPlayerOne = false // * reassigning isPlayerOne to false to switch player two to be the current player\n\n // this delays the switching current player to line up with the coin drop delay\n setTimeout(() => {\n currentPlayer.style.backgroundColor = '#005eff'\n }, 1200) \n player1.src = './sounds/shoosh.wav'\n player1.play() \n cells[currentCell].classList.add('animate__animated', 'animate__bounceInDown', 'player-one') \n return checkForWinner() \n } else if (!isPlayerOne && isCellEmpty(currentCell)) {\n isPlayerOne = true // * reassigning isPlayerOne to true to switch player one back to be the current player\n\n // this delays the switching current player to line up with the coin drop delay\n setTimeout(() => {\n currentPlayer.style.backgroundColor = 'yellow'\n }, 1200) \n player2.src = './sounds/light.wav'\n player2.play() \n cells[currentCell].classList.add('animate__animated', 'animate__bounceInDown', 'player-two') \n return checkForWinner() \n } \n }", "function doClick(row, col) {\n\n var top = row - 1;\n var bottom = row + 1;\n var left = col - 1;\n var right = col + 1;\n swapped = false;\n if (top != -1 && cells[top][col].innerHTML == \"\")\n swap(cells[row][col], cells[top][col]);\n else if (right != 4 && cells[row][right].innerHTML == \"\")\n swap(cells[row][col], cells[row][right]);\n else if (bottom != 4 && cells[bottom][col].innerHTML == \"\")\n swap(cells[row][col], cells[bottom][col]);\n else if (left != -1 && cells[row][left].innerHTML == \"\")\n swap(cells[row][col], cells[row][left]);\n else\n alert(\"Illegal move.\");\n checkWinner();\n\n}", "function handleCellClick(clickedCellEvent) {\n\n const clickedCell = clickedCellEvent.target;\n // below gives corresponding cell index\n const clickedCellIndex = parseInt(clickedCell.getAttribute('data-cell-index'));\n // delete this line to let the game decide if final clicked cell is a winner or draw?...\n\n if (gameState[clickedCellIndex] !== '') /* !== \"\" || !gameActive) */ {\n return;\n } \n\n // clickedCell = html, clickedCellIndex for the gameState[]\n handleCellPlayed(clickedCell, clickedCellIndex);\n handleResultValidation();\n}", "function handleClick(evt) {\n // get col from ID of clicked cell\n let col = +evt.target.id;\n\n // get the row available in column (if none, ignore click)\n let row = findSpotForCol(col);\n if (row === null) {\n return;\n }\n\n\n // place piece in board and add to HTML table\n placeInTable(row, col);\n\n // also adding undo button\n let htmlPieces = document.getElementsByClassName(\"piece\");\n if (htmlPieces.length > 0) {\n document.querySelector(\".undo\").classList.add(\"visible\");\n }\n\n board[row][col] = currPlayer === 1 ? PLAYER_ONE_COLOR : PLAYER_TWO_COLOR;\n\n // check for win\n if (checkForWin()) {\n return endGame(`Player ${currPlayer} won!`);\n }\n\n // check for tie\n if(isTie()) {\n return endGame(\"It's a tie!\");\n }\n\n// switch players\ncurrPlayer = (currPlayer === 1) ? 2 : 1;\n}", "cellClicked(event) {\n const target = event.target;\n if (target.classList.contains('cell')) {\n const col = parseInt(target.dataset.column);\n const row = parseInt(target.dataset.row);\n this.history[this.step][col][row] = !this.history[this.step][col][row];\n if (this.history[this.step][col][row]) {\n this.gridItems[col + (row * this.cols)].classList.add('alive');\n }\n else {\n this.gridItems[col + (row * this.cols)].classList.remove('alive');\n }\n }\n }", "function checkforWinner(){\n let row1 = cell0.textContent+cell1.textContent+cell2.textContent; //These are all the winning combinations\n let row2 = cell3.textContent+cell4.textContent+cell5.textContent;\n let row3 = cell6.textContent+cell7.textContent+cell8.textContent;\n let col1 = cell0.textContent+cell3.textContent+cell6.textContent;\n let col2 = cell1.textContent+cell4.textContent+cell7.textContent;\n let col3 = cell2.textContent+cell5.textContent+cell8.textContent;\n let diagL = cell0.textContent+cell4.textContent+cell8.textContent;\n let diagR = cell2.textContent+cell4.textContent+cell6.textContent;\n let checkAnswer = [row1, row2, row3, col1, col2, col3, diagL, diagR]; //All winning combinations added to array for iteration\n\n //checks to see if there's a winning or drawn state, if so it gives an alert and calls resetBoard to reset the game board \n checkAnswer.forEach((cond)=>{\n if(cond === \"XXX\"){\n //alert('You win!')\n status.textContent = \"You win!\"\n gameOver = true;\n resetBoard()\n }\n if(cond === \"OOO\"){\n alert('The computer wins!')\n resetBoard()\n }\n //checks if the game has started (to stop drawing on an empty board when the game starts) and if all the cells have text content\n })\n if(gameStarted && allCells.every(element => element.textContent !== \"\")){\n alert(`It's a draw!`);\n resetBoard();\n }\n}", "function checkWin(){\r\n\tlet cb = []; //current Board\r\n\tcb[0] = \"\"; //not going to use\r\n\tcb[1] = document.getElementById(\"one\").innerHTML;\r\n\tcb[2] = document.getElementById(\"two\").innerHTML;\r\n\tcb[3] = document.getElementById(\"three\").innerHTML;\r\n\tcb[4] = document.getElementById(\"four\").innerHTML;\r\n\tcb[5] = document.getElementById(\"five\").innerHTML;\r\n\tcb[6] = document.getElementById(\"six\").innerHTML;\r\n\tcb[7] = document.getElementById(\"seven\").innerHTML;\r\n\tcb[8] = document.getElementById(\"eight\").innerHTML;\r\n\tcb[9] = document.getElementById(\"nine\").innerHTML;\r\n\t\r\n\t//top row \r\n\tif(cb[1] != \"\" && cb[1] == cb[2] && cb[2] == cb[3]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//middle row\r\n\tif(cb[4] != \"\" && cb[4] == cb[5] && cb[5] == cb[6]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//bottem row\r\n\tif(cb[7] != \"\" && cb[7] == cb[8] && cb[8] == cb[9]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//first collum\r\n\tif(cb[1] != \"\" && cb[1] == cb[4] && cb[4] == cb[7]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//second collum\r\n\tif(cb[2] != \"\" && cb[2] == cb[5] && cb[5] == cb[8]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//third collum\r\n\tif(cb[3] != \"\" && cb[3] == cb[6] && cb[6] == cb[9]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//digonal left going down\r\n\tif(cb[1] != \"\" && cb[1] == cb[5] && cb[5] == cb[9]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t\r\n\t//digonal right going down\r\n\tif(cb[3] != \"\" && cb[3] == cb[5] && cb[5] == cb[7]) {\r\n\t\treturn true;\r\n\t}//if\r\n\r\n\telse{\r\n\t\t\t\t//check for tie\r\n\t\tif(numTurns == 9){\r\n\t\t\tgameStatus = \"Game Tie\";\r\n\t\t}//numTurns\r\n\t}//else\r\n\t\r\n\r\n\r\n}//check win", "function selectCell() {\n let highlighting = false;\n OUTER: for (let row of grid) {\n for (let cell of row) {\n if (cell.highlight != null) {\n highlighting = true;\n cell.highlight = null;\n cell.owner = playersTurn;\n if (checkWin(cell.row, cell.col)) {\n gameOver = true;\n }\n break OUTER;\n }\n }\n }\n\n //do not allow selection if no highlighting\n if (!highlighting) {\n return;\n }\n\n //checks for a tied game\n if (!gameOver) {\n gameTied = true;\n OUTER: for (let row of grid) {\n for (let cell of row) {\n if (cell.owner == null) {\n gameTied = false;\n break OUTER;\n }\n }\n }\n\n if (gameTied) {\n gameOver = true;\n }\n }\n\n //switch the player if the game is not over\n if (!gameOver) {\n playersTurn = !playersTurn;\n }\n}", "handleClick(x, y) {\n\n // Update cell\n this.board[y][x] = this.currentPlayer;\n\n // Check for win or draw\n var full = true;\n for (var i = 0; i < 3; i++) {\n\n // Vertical (|)\n if (!!this.board[0][i] && this.board[0][i] == this.board[1][i] && this.board[1][i] == this.board[2][i]) {\n this.gameOver = true;\n this.winner = this.board[0][i];\n this.winLine = {\n x1: i * 10 + 5,\n y1: 0,\n x2: i * 10 + 5,\n y2: 30\n };\n }\n\n // Horizontal (-)\n if (!!this.board[i][0] && this.board[i][0] == this.board[i][1] && this.board[i][1] == this.board[i][2]) {\n this.gameOver = true;\n this.winner = this.board[i][0];\n this.winLine = {\n x1: 0,\n y1: i * 10 + 5,\n x2: 30,\n y2: i * 10 + 5\n };\n }\n\n // Check for empty cells\n for (var j = 0; j < 3; j++) {\n if (!this.board[i][j]) {\n full = false;\n }\n }\n }\n\n // Diagonal (\\)\n if (!!this.board[0][0] && this.board[0][0] == this.board[1][1] && this.board[1][1] == this.board[2][2]) {\n this.gameOver = true;\n this.winner = this.board[0][0];\n this.winLine = {\n x1: 0,\n y1: 0,\n x2: 30,\n y2: 30\n };\n }\n\n // Diagonal (/)\n if (!!this.board[2][0] && this.board[2][0] == this.board[1][1] && this.board[1][1] == this.board[0][2]) {\n this.gameOver = true;\n this.winner = this.board[0][0];\n this.winLine = {\n x1: 30,\n y1: 0,\n x2: 0,\n y2: 30\n };\n }\n\n // Boerd full -> draw\n if (full) {\n this.gameOver = true;\n }\n\n // Change turns\n this.currentPlayer = this.currentPlayer == O ? X : O;\n }", "function checkWin () {\r\n\tlet cb = []; // current board\r\n\tcb[0] = \"\";\r\n\tcb[1] = document.getElementById(\"one\").innerHTML;\r\n\tcb[2] = document.getElementById(\"two\").innerHTML;\r\n\tcb[3] = document.getElementById(\"three\").innerHTML;\r\n\tcb[4] = document.getElementById(\"four\").innerHTML;\r\n\tcb[5] = document.getElementById(\"five\").innerHTML;\r\n\tcb[6] = document.getElementById(\"six\").innerHTML;\r\n\tcb[7] = document.getElementById(\"seven\").innerHTML;\r\n\tcb[8] = document.getElementById(\"eight\").innerHTML;\r\n\tcb[9] = document.getElementById(\"nine\").innerHTML;\r\n\t\r\n\t//top row\r\n\tif (cb[1] != \"\" && cb[1] == cb[2] && cb[2] == cb[3]) {\r\n\t\treturn true;\r\n\t}\r\n\telse if (cb[4] != \"\" && cb[4] == cb[5] && cb[5] == cb[6]) {\r\n\t\treturn true;\r\n\t}\r\n\telse if (cb[7] != \"\" && cb[7] == cb[8] && cb[8] == cb[9]) {\r\n\t\treturn true;\r\n\t}\r\n\telse if (cb[1] != \"\" && cb[1] == cb[4] && cb[4] == cb[7]) {\r\n\t\treturn true;\r\n\t}\r\n\telse if (cb[2] != \"\" && cb[2] == cb[5] && cb[5] == cb[8]) {\r\n\t\treturn true;\r\n\t}\r\n\telse if (cb[3] != \"\" && cb[3] == cb[6] && cb[6] == cb[9]) {\r\n\t\treturn true;\r\n\t}\r\n\telse if (cb[1] != \"\" && cb[1] == cb[5] && cb[5] == cb[9]) {\r\n\t\treturn true;\r\n\t}\r\n\telse if (cb[3] != \"\" && cb[3] == cb[5] && cb[5] == cb[7]) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}//check win", "componentDidUpdate(prevProps, prevState) {\n //checking for rows\n let combination = [\n [1, 2, 3],\n [4, 5, 6],\n [7, 8, 9],\n [1, 4, 7],\n [2, 5, 8],\n [3, 6, 9],\n [1, 5, 9],\n [3, 5, 7],\n ];\n\n let win = true;\n for (let i = 0; i < combination.length; i++) {\n win = true;\n for (let j = 0; j < 3; j++) {\n const [m, n] = this.idToIndex(combination[i][j]);\n if (this.state.boardState[m][n] != prevState.playerTurn) {\n win = false;\n break;\n }\n }\n if (win == true) {\n this.alertWin(prevState.playerTurn);\n }\n }\n if (this.state.count == 9) {\n this.alertDraw();\n }\n }", "squareClick(){\n this.props.boardClick(this.props.rowIndex, this.props.columnIndex);\n }", "function getCellPosition(){\r\n\tfor (var i = 0; i < squres.rows.length; i++) {\r\n\t\tfor (var j = 0; j < squres.rows[i].cells.length; j++) {\r\n\t\t\tsqures.rows[i].cells[j].onclick = function(){\r\n\t\t\t\tcurrentRow = this.parentElement.rowIndex;\r\n\t\t\t\tcurrentCol = this.cellIndex;\r\n\t\t\t\tprevCol = colPosition(currentCol);\r\n\t\t\t\tprevRow = rowPosition(currentRow);\r\n\t\t\t};\r\n\t\t\tconsole.log(\"click not working\");\r\n\t\t}\r\n\t}\r\n}", "function checkRows(){\n //check first row\n if(box0 == activePlayer.symbol && box1 == activePlayer.symbol && box2 == activePlayer.symbol){\n console.log(`${activePlayer.name} wins`);\n const showWinner = displayWin();\n gameState = false;\n // const restart_ = restart();\n\n } \n //check second row\n if(box3 == activePlayer.symbol && box4 == activePlayer.symbol && box5 == activePlayer.symbol){\n const showWinner = displayWin();\n gameState = false;\n\n }\n //check third row\n if(box6 == activePlayer.symbol && box7 == activePlayer.symbol && box8 == activePlayer.symbol){\n const showWinner = displayWin();\n gameState = false;\n\n }\n}", "function checkWin() {\n\tlet cb = []; // current board\n\t\t\n\tcb[0] = \"\"; // not going to use\n\tcb[1] = document.getElementById(\"one\").innerHTML;\n\tcb[2] = document.getElementById(\"two\").innerHTML;\n\tcb[3] = document.getElementById(\"three\").innerHTML;\n\tcb[4] = document.getElementById(\"four\").innerHTML;\n\tcb[5] = document.getElementById(\"five\").innerHTML;\n\tcb[6] = document.getElementById(\"six\").innerHTML\n\tcb[7] = document.getElementById(\"seven\").innerHTML;\n\tcb[8] = document.getElementById(\"eight\").innerHTML;\n\tcb[9] = document.getElementById(\"nine\").innerHTML;\n\n\n\t// top row\n\tif (cb[1] != \"\" && cb[1] == cb[2] && cb[2] == cb[3]) {\n\t\treturn true;\n\t} // if\n\t\n\t// middle row\n\tif (cb[4] != \"\" && cb[4] == cb[5] && cb[5] == cb[6]) {\n\t\treturn true;\n\t} // if\n\n\t// bottom row\n\tif (cb[7] != \"\" && cb[7] == cb[8] && cb[8] == cb[9]) {\n\t\treturn true;\n\t} // if\n\t\n\t// colomn one\n\tif (cb[1] != \"\" && cb[1] == cb[4] && cb[4] == cb[7]) {\n\t\treturn true;\n\t} // if\n\t\n\t// colomn two\n\tif (cb[2] != \"\" && cb[2] == cb[5] && cb[5] == cb[8]) {\n\t\treturn true;\n\t} // if\n\t\n\t// colomn three\n\tif (cb[3] != \"\" && cb[3] == cb[6] && cb[6] == cb[9]) {\n\t\treturn true;\n\t} // if\n\t\n\t// top left to bottom right diagonal\n\tif (cb[1] != \"\" && cb[1] == cb[5] && cb[5] == cb[9]) {\n\t\treturn true;\n\t} // if\n\t\n\t// top right to bottom left diagonal\n\tif (cb[3] != \"\" && cb[3] == cb[5] && cb[5] == cb[7]) {\n\t\treturn true;\n\t} // if\n\n} // checkWin()", "function handleClick(evt) {\n if(gameOver) {\n htmlBoard.classList.add('freeze');\n return;\n }\n\n // get x from ID of clicked cell\n var x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n var y = findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n // TODO: add line to update in-memory board\n //Student Comment: JS board is updated. Value at specified indexes is upated from null to currPlayer number (ex: null => 1).\n board[y][x] = currPlayer;\n placeInTable(y, x);\n\n // check for win\n if (checkForWin()) {\n return endGame(`Player ${currPlayer} won!`);\n }\n\n // check for tie\n // TODO: check if all cells in board are filled; if so call, call endGame\n //Student Comment: Values of multidimensional board array are reduced to a single array with length of board dimensions. This array is then checked using every method. If no array element has the value of null, it means every cell on board is populated with either 1 or 2. This means tie game.\n if(board.reduce((a, b) => {\n a.push(...b);\n return a;\n }, []).every(v => v !== null)) {\n return endGame(\"TIE\")\n }\n\n // switch players\n // TODO: switch currPlayer 1 <-> 2\n currPlayer = currPlayer === 1 ? 2 : 1;\n}", "function handleCellClick(clickedCellEvent) {\n const clickedCell = clickedCellEvent.target;\n // below gives corresponding cell index\n const clickedCellIndex = parseInt(clickedCell.getAttribute('data-cell-index'));\n\n\n // delete this line to make code run?...\n if (gameState[clickedCellIndex] !== '') /*|| !gameActive)*/ {\n return;\n } \n\n // clickedCell = html, clickedCellIndex for the gameState[]\n handleCellPlayed(clickedCell, clickedCellIndex);\n handleResultValidation();\n}", "function _handleClickEvent(e){\n const cellID = e.target.getAttribute('id');\n const cellIndex = cellID.slice(5);\n\n if(gameBoard.state[cellIndex]){\n return;\n }\n\n //deciding turn based on how many cells were actually filled\n let filledCells = gameBoard.state.filter(cell => cell);\n let cellValue = filledCells.length % 2 === 0 ? 'X' : 'O';\n\n //updating the array and the display\n gameBoard.state[cellIndex] = cellValue;\n e.target.textContent = cellValue;\n\n gameFlow.checkWinner();\n }", "checkForWin() {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n const _win = cells =>\n cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.height &&\n x >= 0 &&\n x < this.width &&\n this.board[y][x] === this.currPlayer\n );\n\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; x < this.width; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function check_for_win() {\r\n\t\t// check for empty cells , loop on whole array\r\n\t\tfor(var i=0; i<size; i++) {\r\n\t\t\tvar currentNumber = parseInt($(\"td:eq(\"+i+\")\").text());\r\n\t\t\tif(!($.isNumeric(currentNumber))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\t\t//loop on rows to check for each row sum\r\n\t\tfor(var i=0; i < rows; i++) {\r\n\t\t\tvar rowSum = 0;\r\n\t\t\tfor(var j=0; j < cols; j++) {\r\n\t\t\t\tvar currentIndex = i*cols + j;\r\n\t\t\t\trowSum += parseInt($(\"td:eq(\"+currentIndex+\")\").text());\r\n\t\t\t}\r\n\t\t\tif(rowSum!==10) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//loop on each col to check for sum\t\t\r\n\t\tfor(var i=0; i < cols; i++) {\r\n\t\t\tvar colSum = 0;\r\n\t\t\tfor(var j=0; j < rows; j++) {\r\n\t\t\t\tvar currentIndex = i + j*rows;\r\n\t\t\t\tcolSum += parseInt($(\"td:eq(\"+currentIndex+\")\").text());\r\n\t\t\t}\r\n\t\t\tif(colSum!==10) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//loop on each row to check for repeated cells\r\n\t\tfor(var i=0; i < rows; i++) {\r\n\t\t\tvar rowNumArr = [];\r\n\t\t\tfor(var j=0; j < cols; j++) {\r\n\t\t\t\tvar currentIndex = i*cols + j;\r\n\t\t\t\tvar currentNumber = parseInt($(\"td:eq(\"+currentIndex+\")\").text());\r\n\t\t\t\tif(rowNumArr.includes(currentNumber)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\trowNumArr.push(currentNumber);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//loop on each col to check for repeated cells\r\n\t\tfor(var i=0; i < rows; i++) {\r\n\t\t\tvar colNumArr = [];\r\n\t\t\tfor(var j=0; j < cols; j++) {\r\n\t\t\t\tvar currentIndex = i + j*rows;\r\n\t\t\t\tvar currentNumber = parseInt($(\"td:eq(\"+currentIndex+\")\").text());\r\n\t\t\t\tif(colNumArr.includes(currentNumber)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tcolNumArr.push(currentNumber);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}//<-- End of Win function -->", "function checkForWin() {\n\n /** _win:\n * takes input array of 4 cell coordinates [ [y, x], [y, x], [y, x], [y, x] ]\n * returns true if all are legal coordinates for a cell & all cells match\n * currPlayer\n */\n function _win(cells) {\n\n // TODO: Check four cells to see if they're all legal & all color of current\n // player\n\n\n //check for out of bounds,if out of bounds return false\n for (let cell of cells) {\n if (cell[0] < 0 || cell[0] >= HEIGHT) {\n return false\n } else if (cell[1] < 0 || cell[1] >= WIDTH ){\n return false\n }\n }\n\n //make more readable\n for (let idx = 0; idx < cells.length; idx++) {\n //this is getting value at 0th index because, all should be same in array\n let baseCheck = board[cells[0][0]][cells[0][1]]\n if (board[cells[idx][0]][cells[idx][1]] !== baseCheck || board[cells[idx][0]][cells[idx][1]] === null) {\n return false\n }\n }\n return true \n }\n\n // using HEIGHT and WIDTH, generate \"check list\" of coordinates\n // for 4 cells (starting here) for each of the different\n // ways to win: horizontal, vertical, diagonalDR, diagonalDL\n for (var y = 0; y < HEIGHT; y++) {\n for (var x = 0; x < WIDTH; x++) {\n // TODO: assign values to the below variables for each of the ways to win\n // horizontal has been assigned for you\n // each should be an array of 4 cell coordinates:\n // let horiz = [ [y, x], [y, x], [y, x], [y, x] ]\n\n let horiz = [[y, x], [y, x+1], [y, x+2], [y, x+3]] \n let vert = [[y, x], [y+1, x], [y+2, x], [y+3, x]] \n let diagDL = [[y, x], [y+1, x+1], [y+2, x+2], [y+3, x+3]] \n let diagDR = [[y, x], [y-1, x+1], [y-2, x+2], [y-3, x+3]] \n\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function selectCell() {\n\n // If the game ends then none of the cells should be clickable\n if (clickDisabled) {\n return;\n }\n\n // This is a conditional to make sure that only one cell is highlighted at a time by reverting the previous selected cell back to normal\n if (selectedCell && !($(selectedCell).hasClass('incorrect-clicked'))) {\n $(selectedCell).removeClass('clicked');\n $(selectedCell).addClass('empty-cell');\n } else if (selectedCell) {\n $(selectedCell).removeClass('incorrect-clicked');\n $(selectedCell).addClass('incorrect');\n }\n\n // Updates the selected cell to the current one\n selectedCell = this;\n\n // Updates the background of the selected cell to show that it is highlighted\n $(this).removeClass('empty-cell');\n if (!$(this).hasClass('incorrect')) {\n $(this).addClass(\"clicked\");\n } else {\n $(this).addClass(\"incorrect-clicked\");\n }\n\n // For loop to traverse the entire array to find the selected cell in the grid 2-d array and then stores the coordinates of that cell\n for (var row = 0; row < grid.length; row++) {\n if (grid[row].indexOf(this) != -1) {\n selectedCol = grid[row].indexOf(this);\n selectedRow = row;\n }\n }\n}", "checkForWin() {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n const _win = cells =>\n cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.height &&\n x >= 0 &&\n x < this.width &&\n this.board[y][x] === this.currPlayer\n );\n\n\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; x < this.width; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function checkWin()\n{\n for (var i=0; i < 3; i++)\n {\n var startplace = i * 3;\n var endplace = startplace+3;\n var presentX = 0;\n var presentO = 0;\n\n for (startplace; startplace,endplace; startplace++)\n {\n var checkElement = document.getElementById(startplace).textContent;\n if(checkElement == \"X\")\n {\n presentX+=1;\n }\n if(checkElement == \"O\")\n {\n presentO+=1;\n }\n }\n if(presentX==3 || presentO==3)\n {\n winMess();\n return true\n }\n \n }\n //End of Code for horizontal row\n\n //Code for vertical row \n for(var i = 0; i < 3; i++)\n {\n var startplace = i;\n var presentX = 0;\n var presentO = 0;\n\n for(var r = 0; r < 3; r++)\n {\n var checkElement = document.getElementById(startplace).textContent;\n if(checkElement == \"X\")\n {\n presentX+=1;\n }\n else if(checkElement == \"O\")\n {\n presentO+=1;\n }\n startplace+=3;\n }\n if (presentX==3 || presentO==3)\n {\n winMess();\n return true\n }\n }\n //End of Code for vertical row \n\n //Code for diagonal row\n if((document.getElementById(0).textContent==\"x\") && (document.getElementById(4).textContent==\"x\") && (document.getElementById(8).textContent==\"x\") || (document.getElementById(0).textContent==\"o\") && (document.getElementById(4).textContent==\"o\") && (document.getElementById(8).textContent==\"o\"))\n {\n winMess();\n return true;\n }\n\n if((document.getElementById(2).textContent==\"x\") && (document.getElementById(4).textContent=\"x\") && (document.getElementById(6).textContent==\"x\") || (document.getElementById(2).textContent==\"o\") && (document.getElementById(4).textContent=\"o\") && (document.getElementById(6).textContent==\"o\"))\n {\n winMess();\n return true;\n }\n //End of Code for vertical row \n\n if(tracker.length==8)\n {\n var tieMessage = document.getElementById('status');\n tieMessage.textContent = \"There was a tie. Click New Game to play again\";\n game = false;\n }\n}", "function isValidClick(numberOnCell) {\n var emptyRow = getRowNumber(NUMBER_ON_EMPTY_CELL), emptyCol = getColumnNumber(NUMBER_ON_EMPTY_CELL);\n var clickRow = getRowNumber(numberOnCell), clickCol = getColumnNumber(numberOnCell);\n // console.log(\"number on cell: \" + numberOnCell + \", erow: \" + emptyRow + \", ecol: \" + emptyCol + \", cRow: \" + clickRow + \", cCol: \" + clickCol);\n return (emptyRow == clickRow) || (emptyCol == clickCol);\n }", "function isContaineWinCombination(arr, val) {\n let counter = 0;\n let firstCell;\n let lastCell;\n for (let i = 0; i < arr.length; i++) {\n if ( counter === 0) {\n firstCell = arr[i]\n }\n\n if (arr[i].val === val) {\n counter++;\n if (counter === count) {\n lastCell = arr[i];\n printLine(\n countCoordinate(firstCell.j),\n countCoordinate(firstCell.i),\n countCoordinate(lastCell.j),\n countCoordinate(lastCell.i));\n return true\n }\n } else {\n counter = 0;\n }\n }\n return false ;\n}", "checkForWin() {\n const _win = (cells) => {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.HEIGHT &&\n x >= 0 &&\n x < this.WIDTH &&\n this.board[y][x] === this.currPlayer\n );\n };\n\n for (let y = 0; y < this.HEIGHT; y++) {\n for (let x = 0; x < this.WIDTH; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function connectFour() {\n playerRed=true; //red\n playerYellow=false; //yellow\n table = document.getElementById(\"gameBoard\");\n\n for(let i = 0; i < 6; i++){\n //console.log(\"got here row\"+i);\n\t\ttable.insertRow(i);\n\t\tfor(let j = 0; j < 7; j++){\n //console.log(\"got here col\"+j);\n\t\t\ttable.rows[i].insertCell(j);\n cell = table.rows[i].cells[j];\n cell.id = i*7+j;\n cell.hasValue = false;\n cell.isRed = false;\n cell.isYellow = false;\n\n cell.onclick = function(){\n //this.style.backgroundColor=\"beige\";\n click(this, j);\n };\n\n }\n }\n\n document.getElementById(\"newGame\").onmousedown = function(){\n for(let i=5; i>=0; i--){\n table.deleteRow(i);\n }\n\n document.getElementById(\"test1\").innerHTML=\"\";\n document.getElementById(\"test2\").innerHTML=\"\";\n document.getElementById(\"test3\").innerHTML=\"\";\n document.getElementById(\"test4\").innerHTML=\"\";\n document.getElementById(\"test5\").innerHTML=\"\";\n document.getElementById(\"test6\").innerHTML=\"\";\n document.getElementById(\"test7\").innerHTML=\"\";\n document.getElementById(\"test8\").innerHTML=\"\";\n document.getElementById(\"test9\").innerHTML=\"\";\n document.getElementById(\"test10\").innerHTML=\"\";\n document.getElementById(\"test11\").innerHTML=\"\";\n\n connectFour()};\n}", "function checkWin() {\r\n\tlet cb =[]; //current board\r\n\tcb[0] = \"\"; // not going to use it\r\n\tcb[1] = document.getElementById(\"one\").innerHTML;\r\n\tcb[2] = document.getElementById(\"two\").innerHTML;\r\n\tcb[3] = document.getElementById(\"three\").innerHTML;\r\n\tcb[4] = document.getElementById(\"four\").innerHTML;\r\n\tcb[5] = document.getElementById(\"five\").innerHTML;\r\n\tcb[6] = document.getElementById(\"six\").innerHTML;\r\n\tcb[7] = document.getElementById(\"seven\").innerHTML;\r\n\tcb[8] = document.getElementById(\"eight\").innerHTML;\r\n\tcb[9] = document.getElementById(\"nine\").innerHTML;\r\n\t\r\n\t//top row\r\n\tif(cb[1] != \"\" && cb[1] == cb[2] && cb[2] ==cb[3]) {\r\n\t\treturn true;\t\r\n\t\t\t\r\n\t}//if\r\n\t\r\n\t\t//middle row\r\n\tif(cb[4] != \"\" && cb[4] == cb[5] && cb[5] ==cb[6]) {\r\n\t\treturn true;\t\r\n\t\t\t\r\n\t}//if\r\n\t\r\n\t\t//bottom row\r\n\tif(cb[7] != \"\" && cb[7] == cb[8] && cb[8] ==cb[9]) {\r\n\t\treturn true;\t\r\n\t\t\t\r\n\t}//if\r\n\t\r\n\t\t//left side\r\n\tif(cb[1] != \"\" && cb[1] == cb[4] && cb[4] ==cb[7]) {\r\n\t\treturn true;\t\r\n\t\t\t\r\n\t}//if\r\n\t\r\n\t\t//middle\r\n\tif(cb[2] != \"\" && cb[2] == cb[5] && cb[5] ==cb[8]) {\r\n\t\treturn true;\t\r\n\t\t\t\r\n\t}//if\r\n\t\r\n\t\t//right side\r\n\tif(cb[3] != \"\" && cb[3] == cb[6] && cb[6] ==cb[9]) {\r\n\t\treturn true;\t\r\n\t\t\t\r\n\t}//if\r\n\t\r\n\t\t//diagonal 1\r\n\tif(cb[1] != \"\" && cb[1] == cb[5] && cb[5] ==cb[9]) {\r\n\t\treturn true;\t\r\n\t\t\t\r\n\t}//if\r\n\t\r\n\t\t//diagonal 2\r\n\tif(cb[3] != \"\" && cb[3] == cb[5] && cb[5] ==cb[7]) {\r\n\t\treturn true;\t\r\n\t\t\t\r\n\t}//if\r\n\t\r\n}//check wins", "function cellClick(event) {\n // getting position of empty cell\n const emptyCell = getEmptyCell();\n const { target } = event;\n const targetClasses = target.className.split(' ');\n const position = targetClasses.find(name => /(x[1-4]y[1-4])/.test(name));\n // if block was not empty cell himself (empty cell don't have positioning class)\n if (position) {\n // position is string (e.g. x1y1) so we take x and y values from it and convert to number\n const x = Number(position[1]);\n const y = Number(position[3]);\n\n // check if clicked block is nearby empty cell\n if (\n ((x - 1 === emptyCell.x || x + 1 === emptyCell.x) && y === emptyCell.y)\n || ((y - 1 === emptyCell.y || y + 1 === emptyCell.y) && x === emptyCell.x)\n ) {\n // increase score and move clicked block to empty cell, check if game was won\n setScore(score + 1);\n target.classList.remove(position);\n target.classList.add(`x${emptyCell.x}y${emptyCell.y}`);\n checkWin();\n }\n }\n}", "function checkForWin(winningCombinations, playerSelections) {\n\n // var match1 = eachitem\n for (let i = 0; i < winningCombinations.length; i++) {\n let matches = 0\n let currentcombo = winningCombinations[i]\n\n\n for (let j = 0; j < currentcombo.length; j++) {\n let currentnum = currentcombo[j]\n if (playerSelections.includes(currentnum)) {\n matches++\n if (matches === 3) {\n return true\n }\n\n\n\n }\n }\n } return false\n\n}", "function clicked(elCell, i, j) {\n if (gIsGameOn) {\n if (!gBoard[i][j].isFlag) {\n if (!gHint) {\n if (gBoard[i][j].isMine) {\n elCell.style.backgroundColor = 'red';\n elCell.innerText = EXPLOSION_ICON;\n isLost(i, j);\n } else {\n if (gIsFirstClick) {\n gIsFirstClick = false;\n while (gMineCount < gSetMineNumber) {\n var iRandom = getRandomInt(0, gBoard.length - 1);\n var jRandom = getRandomInt(0, gBoard[0].length - 1);\n if (iRandom !== i && jRandom !== j) {\n if (!gBoard[iRandom][jRandom].isMine) {\n gBoard[iRandom][jRandom].isMine = true;\n gMineCount++\n gMineLeftCount = gMineCount;\n var elMineLeftCount = document.querySelector('.mine-number');\n elMineLeftCount.innerText = gMineLeftCount;\n }\n }\n }\n findMine(gBoard);\n render(gBoard);\n elCell.style.backgroundColor = gCell_BGC;\n elCell.innerText = gBoard[i][j].mineCounter;\n clicked(elCell, i, j)\n } else {\n\n if (gBoard[i][j].mineCounter === 0 && !gBoard[i][j].isCleared) {\n gBoard[i][j].isCleared = true;\n gEmptyCellCounter++\n if (gEmptyCellCounter === 1) clock();\n elCell.innerText = '';\n elCell.style.backgroundColor = gCell_BGC;\n exposeZeroAround({ i: i, j: j })\n } else if (!gBoard[i][j].isCleared) {\n gBoard[i][j].isCleared = true;\n gEmptyCellCounter++;\n elCell.style.backgroundColor = gCell_BGC;\n elCell.innerText = gBoard[i][j].mineCounter;\n copyBoard()\n isWin()\n }\n }\n }\n } else {\n hintPress(elCell, i, j);\n }\n }\n }\n return\n}", "function click1(letter) {\r\n // console.log(letter);\r\n\r\n\r\n let newCell = checkForEmptyCellInTheColum(letter); //into the newcell we enter the show of the specific circle\r\n console.log(newCell.id);\r\n if (counter % 2 == 0) {\r\n newCell.style.backgroundColor = \"red\";\r\n player = 'red';\r\n document.getElementById(\"cursor\").style.backgroundColor = \"yellow\";\r\n } else {\r\n newCell.style.backgroundColor = \"yellow\";\r\n player = 'yellow';\r\n document.getElementById(\"cursor\").style.backgroundColor = \"red\";\r\n }\r\n\r\n counter++; //to know which player is playing right now\r\n checkWin(letter, newCell.id, newCell.getAttribute(\"data-row\"), newCell.getAttribute(\"data-Col\"), newCell, player);\r\n\r\n // checkvictory(newCell);\r\n}", "function checkWin(curr){\r\n var currentTiles=[];\r\n for(let i=0; i<boardArr.length; i++){\r\n if(boardArr[i]===curr[1]){\r\n currentTiles.push(i);\r\n }\r\n }\r\n for(let x=0; x<winCombination.length; x++){\r\n var count=0;\r\n for(let j=0; j<winCombination[x].length; j++){\r\n if(currentTiles.indexOf(winCombination[x][j])!=-1){\r\n count=count + 1;\r\n }\r\n if(count==3){\r\n gameWon=current[0]; \r\n } \r\n }\r\n }\r\n }", "function searchRowsEtc() {\n var checking;\n var result = false;\n for (var i = 0; i < toCheck.length; i) {\n console.log(toCheck[0][0] + \",\" + toCheck[0][1])\n checking = toCheck.shift();\n switch (checking[0]) {\n case 0:\n if (checkRow(checking[1])) {\n result = true;\n }\n break;\n case 1:\n if (checkCol(checking[1])) {\n result = true;\n }\n break;\n case 2:\n if (checkSector(checking[1])) {\n result = true;\n }\n break;\n }\n }\n //returns true if any soluntions were found\n return result;\n}", "function selectionPosition(row, column){\n\tif(row < 0 || row >= table.table[0].length || column < 0 || column >= table.table.length){\n\t\treturn;\n\t}\n\n\telse if(table.isFlaged(row, column)){\n\t\ttable.nbrMines++;\n\t\tdocument.getElementById(\"nbflag\").textContent = table.nbrMines;\n\t}\n\n\tif(table.isSelected(row,column)){\n\t\treturn;\n\t}\n\n\telse{\n\t\tif(table.isMined(row, column)){\n\t\t\tcanPlay=false;\n\t\t\talert(\"game over\");\n\t\t\tclearInterval(temp);\n\t\t\ttemp = undefined;\n\t\t\tshowMines();\n\t\t}\n\n\t\telse{\n\t\t\ttable.table[row][column].select = true;\t\n\t\t\ttable.selectable--;\n\t\t\tvar nbrMines = checkAround(row, column);\n\n\t\t\tif(!nbrMines){\n\t\t\t\tdocument.querySelector(\"td[data-row='\"+row+\"'][data-column='\"+column+\"']\").childNodes[0].src = \"images/empty.png\";\n\t\t\t\tselectionPosition(row-1,column-1);\n\t\t\t\tselectionPosition(row+1,column-1);\n\t\t\t\tselectionPosition(row-1,column+1);\n\t\t\t\tselectionPosition(row+1,column+1);\n\t\t\t\tselectionPosition(row-1,column);\n\t\t\t\tselectionPosition(row+1,column);\n\t\t\t\tselectionPosition(row,column-1);\n\t\t\t\tselectionPosition(row,column+1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdocument.querySelector(\"td[data-row='\"+row+\"'][data-column='\"+column+\"']\").childNodes[0].src = \"images/\"+nbrMines+\".png\";\n\t\t\t}\n\n\t\t}\n\n\t\tif(!table.selectable){\n\t\t\talert(\"You win !\");\n\t\t\tcanPlay = false;\n\t\t\tclearInterval(temp);\n\t\t\ttemp = undefined;\n\t\t}\n\t}\n}", "handleClick(evt) {\n // get x from ID of clicked cell\n const x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n const y = this.findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n this.board[y][x] = this.currPlayer;\n this.placeInTable(y, x);\n\n // check for tie\n if (this.board.every(row => row.every(cell => cell))) {\n return this.endGame('Tie!');\n }\n\n // check for win\n if (this.checkForWin()) {\n this.gameOver = true;\n return this.endGame(`The ${this.currPlayer.color} player won!`);\n }\n\n // switch players\n this.currPlayer =\n this.currPlayer === this.players[0] ? this.players[1] : this.players[0];\n }", "function checkForGameWin(player)\n{\n //Check for win\n //Down left column\n if(wonCells[0][0] == player && wonCells[0][1] == player && wonCells[0][2] == player)\n return player;\n //Down middle column\n if(wonCells[1][0] == player && wonCells[1][1] == player && wonCells[1][2] == player)\n return player;\n //Down right column\n if(wonCells[2][0] == player && wonCells[2][1] == player && wonCells[2][2] == player)\n return player;\n //Across top row\n if(wonCells[0][0] == player && wonCells[1][0] == player && wonCells[2][0] == player)\n return player; \n //Across middle row\n if(wonCells[0][1] == player && wonCells[1][1] == player && wonCells[2][1] == player)\n return player;\n //Across bottom row\n if(wonCells[0][2] == player && wonCells[1][2] == player && wonCells[2][2] == player)\n return player; \n //Top left to bottom right\n if(wonCells[0][0] == player && wonCells[1][1] == player && wonCells[2][2] == player)\n return player;\n //Top right to bottom left\n if(wonCells[0][2] == player && wonCells[1][1] == player && wonCells[2][0] == player)\n return player; \n \n //If no win, check for tie\n var countOfWonCells = 0;\n for(var i = 0; i < 3; i++)\n {\n for(var j = 0; j < 3; j++)\n {\n if(wonCells[i][j] != 0)\n countOfWonCells++;\n }\n }\n\n if(countOfWonCells == 9)\n return -1;\n else\n return 0;\n}", "function cellClick(clickedCellEvent) {\n\n const clickedCell = clickedCellEvent.target; // saves clicked html in a variable for future use\n\n const clickedCellIndex = parseInt(clickedCell.getAttribute('data-cell-index')); // grabs the 'data-cell-index' attribute from clicked cell\n if (board[clickedCellIndex] !== \"\" || !gameActive) { //checks if the cell has been clicked before or if the game has been paused. If true will ignore the click\n return;\n }\n cellPlayed(clickedCell, clickedCellIndex);\n resultValidation();\n}", "function onClick(event) {\n for(let i=0; i<(rows*cols); ++i) {\n //Add start cell \n if(cells[i] == event.target && cells[i].contains(event.target) && currentKey == 83 && start == null) {\n cells[i].style.backgroundColor = \"blue\"\n start = cells[i];\n }\n //Add end cell \n else if(cells[i] == event.target && cells[i].contains(event.target) && currentKey == 69 && end == null) {\n cells[i].style.backgroundColor = \"red\"\n end = cells[i];\n }\n \n }\n}", "function handleClick(evt) {\n // get x from ID of clicked cell\n var x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n var y = findSpotForCol(board, x, HEIGHT);\n if (y === null) {\n return;\n }\n\n\n //update board variable with player #\n board[y][x] = currPlayer\n\n\n // place piece in board and add to HTML table\n // TODO: add line to update in-memory board\n placeInTable(y, x);\n\n // check for tie\n // TODO: check if all cells in board are filled; if so call, call endGame\n let boardIsFilled = checkBoardIsFilled(board);\n // const boardIsFilled = board.every(row => {\n // return row.every(cell => {\n // //not null means its filled. \n // return cell !== null\n // })\n // })\n\n if (boardIsFilled) {\n endGame('Tie Game')\n return resetGame()\n }\n\n // check for win\n if (checkForWin(board, currPlayer, HEIGHT, WIDTH)) {\n endGame(`Player ${currPlayer} won!`);\n return resetGame()\n }\n\n // switch players\n // TODO: switch currPlayer 1 <-> 2\n currPlayer = currPlayer === 1 ? 2 : 1\n}", "function checkWin() {\n if (\n cells[0].textContent === cells[1].textContent &&\n cells[1].textContent === cells[2].textContent &&\n cells[0].textContent === cells[2].textContent &&\n cells[0].textContent !== \"\"\n ) {\n console.log('You Won!');\n //return winningMsg.innerText = nonActivePlayer + \" won!\"; \n } else if (turnCounter === 9) {\n console.log(\"It's a draw\");\n //return winningMsg.innerText = \"It's a draw\"; \n \n } else if (\n cells[3].textContent === cells[4].textContent &&\n cells[4].textContent === cells[5].textContent &&\n cells[3].textContent === cells[5].textContent &&\n cells[3].textContent !== \"\"\n ) {\n console.log('You Won!');\n //return winningMsg.innerText = nonActivePlayer + \" won!\"; \n } else if (turnCounter === 9) {\n console.log(\"It's a draw\");\n //return winningMsg.innerText = \"It's a draw\";\n }\n // all other win combos\n else if (\n cells[6].textContent === cells[7].textContent &&\n cells[7].textContent === cells[8].textContent &&\n cells[6].textContent === cells[8].textContent &&\n cells[6].textContent !== \"\"\n ) {\n console.log('You Won!');\n //return winningMsg.innerText = nonActivePlayer + \" won!\"; \n } else if (turnCounter === 9) {\n console.log(\"It's a draw\");\n //return winningMsg.innerText = \"It's a draw\";\n } else if (\n cells[0].textContent === cells[3].textContent &&\n cells[3].textContent === cells[6].textContent &&\n cells[0].textContent === cells[6].textContent &&\n cells[0].textContent !== \"\"\n ) {\n console.log('You Won!');\n //return winningMsg.innerText = nonActivePlayer + \" won!\"; \n } else if (turnCounter === 9) {\n console.log(\"It's a draw\");\n //return winningMsg.innerText = \"It's a draw\";\n } else if (\n cells[1].textContent === cells[4].textContent &&\n cells[4].textContent === cells[7].textContent &&\n cells[1].textContent === cells[7].textContent &&\n cells[1].textContent !== \"\"\n ) {\n console.log('You Won!');\n //return winningMsg.innerText = nonActivePlayer + \" won!\"; \n } else if (turnCounter === 9) {\n return winningMsg.innerText = \"It's a draw\";\n } else if (\n cells[2].textContent === cells[5].textContent &&\n cells[5].textContent === cells[8].textContent &&\n cells[2].textContent === cells[8].textContent &&\n cells[2].textContent !== \"\"\n ) {\n console.log('You Won!'); \n //return winningMsg.innerText = nonActivePlayer + \" won!\"; \n } else if (turnCounter === 9) {\n console.log(\"It's a draw\");\n //return winningMsg.innerText = \"It's a draw\";\n } else if (\n cells[0].textContent === cells[4].textContent &&\n cells[4].textContent === cells[8].textContent &&\n cells[4].textContent === cells[8].textContent &&\n cells[0].textContent !== \"\"\n ) {\n //return winningMsg.innerText = nonActivePlayer + \" won!\";\n console.log('You Won!'); \n } else if (turnCounter === 9) {\n console.log(\"It's a draw\");\n } else if (\n cells[2].textContent === cells[4].textContent &&\n cells[4].textContent === cells[6].textContent &&\n cells[2].textContent === cells[6].textContent &&\n cells[2].textContent !== \"\"\n ) {\n console.log('You Won!');\n //return winningMsg.innerText = nonActivePlayer + \" won!\"; \n } else if (turnCounter === 9) {\n console.log(\"It's a draw\");\n }\n }", "function clickCell(cell, player, computer, row, column){\n //If cell isn't already filled\n if(cell.className !== 'hit' && cell.className !== 'miss'){\n //Player 1's Turn\n //If ship hit\n if(hasShip(computer.grid, row, column)){\n cell.className = 'hit'\n cell.innerText = 'X'\n player.score++\n if(checkWinningPlayer(player)){\n return\n }\n } else{ //If ship NOT hit\n cell.className = 'miss'\n cell.innerText = '•'\n }\n \n //Computer's Turn\n output.innerText = \"Computer's Turn!\"\n //Added 1 second delay between player 1 and computer's turn\n let delayInMilliseconds = 1000; \n //\"Cover\" so that player can't click on computer grid when it's computer's turn\n let cover = document.getElementById('right-cover')\n cover.style.zIndex = -1\n cover.style.backgroundColor = 'rgba(156, 156, 156, 0.3)'\n setTimeout(function() {\n computerAttack(player, computer)\n output.innerText = \"Player 1's Turn!\"\n cover.style.zIndex = 1\n cover.style.backgroundColor = 'transparent'\n }, delayInMilliseconds);\n }\n}", "function winCheck() {\n //win conditions: 3 vertical, 3 horizontal, or 3 diagonal\n if ((cell1.innerHTML == 'X' && cell2.innerHTML == 'X' && cell3.innerHTML == 'X') || (cell4.innerHTML == 'X' &&\n cell5.innerHTML =='X' && cell6.innerHTML == 'X') || (cell7.innerHTML == 'X' && cell8.innerHTML == 'X' &&\n cell9.innerHTML == 'X') || (cell1.innerHTML == 'X' && cell4.innerHTML == 'X' && cell7.innerHTML == 'X') ||\n (cell2.innerHTML == 'X' && cell5.innerHTML == 'X' && cell8.innerHTML == 'X') || (cell3.innerHTML == 'X' &&\n cell6.innerHTML == 'X' && cell9.innerHTML == 'X') || (cell1.innerHTML == 'X' && cell5.innerHTML == 'X' &&\n cell9.innerHTML == 'X') || (cell3.innerHTML == 'X' && cell5.innerHTML == 'X' && cell7.innerHTML == 'X')) {\n //displays the message to the victor\n log(\"Congratulations, player 1(X) has won. Please refresh the page to start again.\");\n document.getElementById('game-board').style.pointerEvents = 'none';\n return;\n } else if ((cell1.innerHTML == 'O' && cell2.innerHTML == 'O' && cell3.innerHTML == 'O') ||\n (cell4.innerHTML == 'O' && cell5.innerHTML =='O' && cell6.innerHTML == 'O') || (cell7.innerHTML == 'O' &&\n cell8.innerHTML == 'O' && cell9.innerHTML == 'O') || (cell1.innerHTML == 'O' && cell4.innerHTML == 'O' &&\n cell7.innerHTML == 'O') || (cell2.innerHTML == 'O' && cell5.innerHTML == 'O' && cell8.innerHTML == 'O') ||\n (cell3.innerHTML == 'O' && cell6.innerHTML == 'O' && cell9.innerHTML == 'O') || (cell1.innerHTML == 'O' &&\n cell5.innerHTML == 'O' && cell9.innerHTML == 'O') || (cell3.innerHTML == 'O' &&\n cell5.innerHTML == 'O' && cell7.innerHTML == 'O')) {\n //disables each table cell click event\n document.getElementById('game-board').style.pointerEvents = 'none';\n log(\"Congratulations, player 2(O) has won. Please refresh the page to start again.\");\n return;\n //if there is a tie, will display this message\n } else if (moveCount >= 9) {\n log(\"Tie, please refresh the page.\");\n document.getElementById('game-board').style.pointerEvents = 'none';\n return;\n }\n}", "function start() {\n document.getElementById('cell-0').addEventListener('click', () => {\n if (oLog.includes(0) === false && xLog.includes(0) === false) {\n placeMark(0);\n winChecker();\n } else {alert('Space taken')};\n });\n document.getElementById('cell-1').addEventListener('click', () => {\n if (oLog.includes(1) === false && xLog.includes(1) === false) {\n placeMark(1);\n boardArray.splice(1, 1) \n winChecker();\n } else {alert('Space taken')};\n }); \n document.getElementById('cell-2').addEventListener('click', () => {\n if (oLog.includes(2) === false && xLog.includes(2) === false) {\n placeMark(2);\n boardArray.splice(2, 1) \n winChecker();\n } else {alert('Space taken')};\n });\n document.getElementById('cell-3').addEventListener('click', () => {\n if (oLog.includes(3) === false && xLog.includes(3) === false) {\n placeMark(3);\n boardArray.splice(3, 1) \n winChecker();\n } else {alert('Space taken')};\n });\n document.getElementById('cell-4').addEventListener('click', () => {\n if (oLog.includes(4) === false && xLog.includes(4) === false) {\n placeMark(4);\n boardArray.splice(4, 1) \n winChecker();\n } else {alert('Space taken')};\n });\n document.getElementById('cell-5').addEventListener('click', () => {\n if (oLog.includes(5) === false && xLog.includes(5) === false) {\n placeMark(5);\n boardArray.splice(5, 1) \n winChecker();\n } else {alert('Space taken')};\n });\n document.getElementById('cell-6').addEventListener('click', () => {\n if (oLog.includes(6) === false && xLog.includes(6) === false) {\n placeMark(6);\n boardArray.splice(6, 1) \n winChecker();\n } else {alert('Space taken')};\n });\n document.getElementById('cell-7').addEventListener('click', () => {\n if (oLog.includes(7) === false && xLog.includes(7) === false) {\n placeMark(7);\n boardArray.splice(7, 1) \n winChecker();\n } else {alert('Space taken')};\n });\n document.getElementById('cell-8').addEventListener('click', () => {\n if (oLog.includes(8) === false && xLog.includes(8) === false) {\n placeMark(8);\n boardArray.splice(8, 1) \n winChecker();\n } else {alert('Space taken')};\n });\n}", "function checkForWin() {\n /** _win:\n * takes input array of 4 cell coordinates [ [y, x], [y, x], [y, x], [y, x] ]\n * returns true if all are legal coordinates for a cell & all cells match\n * currPlayer\n */\n\n /**\n * _wins \n * @param {*} cells -- list of coordinates of the game state board \n */\n\n function _win(cells) {\n let [y, x] = cells[0];\n let currentPlayer = board[y][x];\n if (currentPlayer !== null) {\n\n return cells.every(cell => {\n return validCoord(cell) && board[cell[0]][cell[1]] === currentPlayer\n })\n\n }\n return false;\n }\n\n // using HEIGHT and WIDTH, generate \"check list\" of coordinates\n // for 4 cells (starting here) for each of the different\n // ways to win: horizontal, vertical, diagonalDR, diagonalDL\n for (var y = 0; y < HEIGHT; y++) {\n for (var x = 0; x < WIDTH; x++) {\n\n\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function clickOnCell() {\n const clickedCell = event.target;\n const clickedCellIndex = clickedCell.dataset.index;\n cellPlayed(clickedCell, clickedCellIndex);\n resultValidation();\n \n clickedCell.removeEventListener('click', clickOnCell);\n return;\n}", "function selectBoardCells (args) {\n for(var i=0; i<args.length; i++){\n TicTacToePage.boardCells[args[i]].click()\n } \n }", "function handleClick(evt) {\n // get x from ID of clicked cell\n let x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n let y = findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n // TODO: add line to update in-memory board\n placeInTable(y, x);\n board[y][x] = currPlayer;\n\n // check for win\n if (checkForWin()) {\n return setTimeout(function(){\n endGame(`Player ${currPlayer} won!`);\n }, 50)\n }\n\n // check for tie\n // TODO: check if all cells in board are filled; if so call, call endGame\n if(board.every((row) => {\n return row.every(Boolean);\n })) { \n setTimeout(function(){\n endGame(`It's a tie!`);\n }, 50) \n}\n\t\t\t\n\n // switch players\n // TODO: switch currPlayer 1 <-> 2\n currPlayer === 1 ? (currPlayer = 2) : (currPlayer = 1);\n\n // Toggle which players turn it is\n currPlayer === 1 ? (playerTurn.classList = 'player1') : (playerTurn.classList = 'player2');\n}", "function checkWin(row, col) {\n //get all the cells from each direction\n let diagL = [], diagR = [], horiz = [], vert = [];\n for (let i = 0; i < GRID_ROWS; i++) {\n for (let j = 0; j < GRID_COLS; j++) {\n //horizontal cells\n if (i == row) {\n horiz.push(grid[i][j]);\n }\n\n //vertical cells\n if (j == col) {\n vert.push(grid[i][j]);\n }\n\n //top left to bottom right\n if (i - j == row - col) {\n diagL.push(grid[i][j]);\n }\n\n //top right to bottom left\n if (i + j == row + col) {\n diagR.push(grid[i][j]);\n }\n }\n }\n\n //if any have four in a row, return a win\n return connect4(diagL) || connect4(diagR) || connect4(horiz) || connect4(vert);\n}", "function giveCellsClick() {\n if (selectedPiece.seventhSpace) {\n cells[selectedPiece.indexOfBoardPiece + 7].setAttribute(\"onclick\", \"makeMove(7)\");\n }\n if (selectedPiece.ninthSpace) {\n cells[selectedPiece.indexOfBoardPiece + 9].setAttribute(\"onclick\", \"makeMove(9)\");\n }\n if (selectedPiece.fourteenthSpace) {\n cells[selectedPiece.indexOfBoardPiece + 14].setAttribute(\"onclick\", \"makeMove(14)\");\n }\n if (selectedPiece.eighteenthSpace) {\n cells[selectedPiece.indexOfBoardPiece + 18].setAttribute(\"onclick\", \"makeMove(18)\");\n }\n if (selectedPiece.minusSeventhSpace) {\n cells[selectedPiece.indexOfBoardPiece - 7].setAttribute(\"onclick\", \"makeMove(-7)\");\n }\n if (selectedPiece.minusNinthSpace) {\n cells[selectedPiece.indexOfBoardPiece - 9].setAttribute(\"onclick\", \"makeMove(-9)\");\n }\n if (selectedPiece.minusFourteenthSpace) {\n cells[selectedPiece.indexOfBoardPiece - 14].setAttribute(\"onclick\", \"makeMove(-14)\");\n }\n if (selectedPiece.minusEighteenthSpace) {\n cells[selectedPiece.indexOfBoardPiece - 18].setAttribute(\"onclick\", \"makeMove(-18)\");\n }\n}", "function checkForWin() {\n\n /** _win:\n * takes input array of 4 cell coordinates [ [y, x], [y, x], [y, x], [y, x] ]\n * returns true if all are legal coordinates for a cell & all cells match\n * currPlayer\n */\n function _win(cells) {\n // Checks four cells to see if they're all legal & all equal to current\n // player. \n return cells.every(function ([y, x]) {\n return (y >= 0 && y < HEIGHT && x >= 0 && y < WIDTH && board[y][x] === currPlayer);\n });\n }\n\n // using HEIGHT and WIDTH, generate \"check list\" of coordinates\n // for 4 cells (starting here) for each of the different\n // ways to win: horizontal, vertical, diagonalDR, diagonalDL\n for (var y = 0; y < HEIGHT; y++) {\n for (var x = 0; x < WIDTH; x++) {\n\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDL = [[y, x], [y - 1, x + 1], [y - 2, x + 2], [y - 3, x + 3]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function mousePressed() {\n for (var i = 0; i < cols; i++) {\n for (var j = 0; j < rows; j++) {\n if (grid[i][j].contains(mouseX, mouseY)) { // checks every spot to see if it contains a mouse click\n grid[i][j].reveal(); // shows what's inside the clicked cell\n \n // if clicked on a mine\n if (grid[i][j].mine) {\n gameOver(); // game over\n alert(\"You lose... :(\");\n }\n }\n }\n }\n}", "function checkWin() {\n var squares = [];\n for (var i = 1; i <= 9; i++) {\n var classname = 'clicked' + symbol;\n squares[i] = $(document.getElementById(i)).hasClass(classname);\n }\n // top row\n var r1 = squares[1] && squares[2] && squares[3];\n // middle row\n var r2 = squares[4] && squares[5] && squares[6];\n // bottom row\n var r3 = squares[7] && squares[8] && squares[9];\n // left column\n var c1 = squares[1] && squares[4] && squares[7];\n // middle column\n var c2 = squares[2] && squares[5] && squares[8];\n // right column\n var c3 = squares[3] && squares[6] && squares[9];\n // left to right diagonal\n var d1 = squares[1] && squares[5] && squares[9];\n // right to left diagonal\n var d2 = squares[3] && squares[5] && squares[7];\n // are all the squares filled in\n var numClicked = $('.clicked').length;\n\n if (r1 || r2 || r3 || c1 || c2 || c3 || d1 || d2) {\n finishGame(symbol);\n } else {\n if (numClicked == 9)\n finishGame('TIE');\n }\n }", "function handleClick(evt) {\n // get x from ID of clicked cell\n let x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n let y = findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n // adds line to update in-memory board\n // y,x coordinates at the current player's selection\n board[y][x] = currPlayer;\n // adds selection to the board as current player\n placeInTable(y, x);\n\n // check for win\n if (checkForWin()) {\n // runs end game function w/ message\n return endGame(`Player ${currPlayer} won!`);\n }\n\n // check for tie\n // checks if all cells in board are filled; if so call, call endGame\n if (board.every(row => row.every(cell => cell))) {\n return endGame('Tie!');\n }\n // switch players\n // switch currPlayer 1 <-> 2\n currPlayer = currPlayer === 1 ? 2 : 1;\n\n}", "function win(clicked) {\n\t\t// Get all cell classes\n\t\tvar memberOf = clicked[0].className.split(/\\s+/);\n\t\tfor (var i = 0; i < memberOf.length; i++) {\n\t\t\tvar testClass = '.' + memberOf[i];\n\t\t\t// winning condition: turn == N_SIZE,\n\t\t\tif ($('#tictactoe').find(testClass + ':contains(' + turn + ')').length == N_SIZE) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function changeColor(e) {\n let column = e.target.cellIndex;\n let row = [];\n\n for (let i = 5; i > -1; i--){\n if(tableRow[i].children[column].style.backgroundColor =='white'){\n row.push(tableRow[i].children[column]);\n if(currentPlayer===1) {\n row[0].style.backgroundColor = player1Color;\n if (horizonalCheck() || verticalCheck() || diagnolCheck1() || diagnolCheck2){\n return(alert('winner'))\n }\n playerTurn.textContent = `${player2}'s turn!`;\n return currentPlayer = 2;\n// We are taking the first index of the array, and turning it into player 1's color, else if it doesnt euqal one, then it is players twos color.\n } else {scroll\n row [0].style.backgroundColor = player2Color;\n playerTurn.textContent = `${player1 }'s turn!`\n return currentPlayer = 1;\n }\n } \n }\n}", "function checkRow()\n\t{\n\t\tvar plr = getPlayer();\n\t\tfor (i = 0; i < 3; i++)\n\t\t{\n\t\t\tvar inARow = 0;\n\t\t\tfor(j = 0; j < 3; j++)\n\t\t\t{\n\t\t\t\tif(grid[j][i] == plr)\n\t\t\t\t{\n\t\t\t\t\tinARow++;\n\t\t\t\t\tif (inARow == 3)\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function checkRowWin(game) {\n for(count = 0; count < boardRows; count++) {\n rowArr = game[count];\n console.log(rowArr);\n if(rowArr.every(allEqual)) {\n console.log('row win');\n return;\n }\n }\n}", "function clickGameCell(cell) {\n var cell_num = cell.id.match(/\\d/g);\n cell_num = cell_num.join(\"\");\n previousCells.push(cell_num);\n\n if(previousCells[previousCells.length -1] != cell_num){\n previousCells.push(cell_num);\n }\n\n // If the cell is not highlighted, do nothing.\n if (!$(cell).hasClass('highlighted')) {\n return;\n }\n\n // If the cell does not contain a piece, make the move\n if (!cell.innerHTML) {\n makeMove(cell_num);\n return;\n }\n\n // If we clicked on the last piece, regenerate the board using saved state\n if (cell_num == previousCell()) {\n if (saveCurrentState.secondMove) {\n // Make no move\n makeNoMove();\n return;\n }\n\n // Reset board\n resetBoard();\n return;\n }\n\n // Finally, if the piece clicked\n getMoves(cell_num);\n}", "function checkWiner(board){\n //check first row\n if(board[0][0] != '' && board[0][0] == board[0][1] && board[0][0] == board[0][2]){\n return true;\n //second row\n }else if(board[1][0] != '' && board[1][0] == board[1][1] && board[1][0] == board[1][2]){\n return true;\n //third row\n }else if(board[2][0] != '' && board[2][0] == board[2][1] && board[2][0] == board[2][2]){\n return true;\n //first column\n }else if(board[0][0] != '' && board[0][0] == board[1][0] && board[0][0] == board[2][0]){\n return true;\n //second column\n }else if(board[0][1] != '' && board[0][1] == board[1][1] && board[0][1] == board[2][1]){\n return true;\n //third column\n }else if(board[0][2] != '' && board[0][2] == board[1][2] && board[0][2] == board[2][2]){\n return true;\n //diagnal \n }else if(board[0][0] != '' && board[0][0] == board[1][1] && board[0][0] == board[2][2]){\n return true;\n //opposite diagnal\n }else if(board[0][2] != '' && board[0][2] == board[1][1] && board[0][2] == board[2][0]){\n return true;\n }\n}", "trackRow(e) {\n let newRow = 0\n this.state.rowMap.forEach((row, index) => {\n let value = e.clientY\n let min = row[0]\n let max = row[1]\n let isInRange = (value - min) * (value - max) <= 0\n if (isInRange) {\n newRow = index\n }\n })\n return newRow\n }", "function reCheck(rowNo,colNo) {\n toCheck.push([0,rowNo]);\n toCheck.push([1,colNo]);\n toCheck.push([2,(rowNo - rowNo % 3) + (colNo - colNo % 3) / 3]);\n}", "function findHWin(row){\n if (row[0] === row[1] && row[0] === row[2]){\n game1.won = true;\n $(\"#endgame\").show();\n switch (row){\n case game1.toprow:\n $(\"#NW, #NC, #NE\").css({'background-color':'red'});\n break;\n case game1.midrow:\n $(\"#CW, #CC, #CE\").css({'background-color':'red'});\n break;\n case game1.botrow:\n $(\"#SW, #SC, #SE\").css({'background-color':'red'});\n break;\n default:\n console.log(\"Horizontal win highlighting error\");\n }\n }\n}", "handleClick(evt) {\n const playerTurn = document.getElementById('playerTurn');\n // get x from ID of clicked cell\n if (!this.isGameOver) {\n const x = +evt.target.id;\n // get next spot in column (if none, ignore click)\n const y = this.findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n this.board[y][x] = this.currPlayer;\n this.placeInTable(y, x);\n\n // check for win\n if (this.checkForWin()) {\n const winningPiece = document.getElementById(`${y}-${x}`).querySelector('div');\n winningPiece.classList.add('winningPiece');\n return this.endGame(`Player ${this.playerTurn} wins!`);\n }\n\n // // check for tie\n if (this.checkForTie()) {\n return endGame('TIE GAME!');\n }\n // switch players\n this.currPlayer = this.currPlayer === this.players[0] ? this.players[1] : this.players[0];\n if (this.playerTurn === 1) {\n this.playerTurn = 2;\n } else this.playerTurn = 1;\n playerTurn.innerHTML = '';\n const playerTurnMsg = document.createElement('span');\n const playerTurnToken = document.createElement('div');\n playerTurnToken.classList.remove(...playerTurnToken.classList);\n playerTurnMsg.innerText = `Player ${this.playerTurn}'s Turn`;\n playerTurnToken.classList.add('playerToken');\n playerTurnToken.classList.add(`${this.currPlayer.color}`);\n playerTurnMsg.style.color = `${this.currPlayer.color}`;\n if (playerTurnMsg.style.color === 'white') {\n playerTurnMsg.style.color = 'black';\n }\n playerTurn.append(playerTurnMsg);\n playerTurn.append(playerTurnToken);\n }\n }", "function checkForWin(player,gameboard) {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match \n return cells.every(\n ([x, y]) => \n y >= 0 && \n y < HEIGHT && \n x >= 0 && \n x < WIDTH && \n gameboard[x][y] === player\n );\n }\n\n //This code block defines an array of coordinates in each corresponding direction for each cell that's found to have a player piece in it. These arrays are then tested for a win condition using the _win(cell) function (designated private).\n for (let x = 0; x < WIDTH; x++) {\n for (let y = 0; y < HEIGHT; y++) {\n //only process a win analysis on the pieces just played by the current player. Wasteful to analyze conditions with the player that previously went.\n if (gameboard[x][y] === player){\n let vert = [[x, y], [x, y+1], [x, y+2], [x, y+3]];\n\n //Testing as long as there's room to check for patterns to the right\n if (x<WIDTH-3){\n let horiz = [[x, y], [x+1, y], [x+2, y], [x+3, y]];\n let diagDR = [[x, y], [x+1, y-1], [x+2, y-2], [x+3, y-3]];\n let diagUR = [[x, y], [x+1, y+1], [x+2, y+2], [x+3, y+3]];\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagUR)) {\n return true;\n }\n }\n //No space to check for patterns that travel to the right. Only test vertical patterns\n else{\n if (_win(vert)) {\n return true;\n }\n\n }\n\n }\n }\n }\n}", "function little_check(count,count2){\n\t\t\t\n\t\t\t//console.log(\"count \"+ count+\"count2 \"+count2);\t\t\t\n \t \t\tfor ( var x=count; x <= (count+2); x++) { // cycle the matrix rows...\n \t \t\t\tfor (var y=count2; y <= (count2+2); y++) { // ...and cycle the matrix cells\n\t\t\t\t\t//var BR=1;\n\n\t\t\t\t\t//console.log(\"matrx[x] \"+ x+\"martix[y] \"+y);\n\t\t\t\t\tif ((matrix[x][(count2+0)]) === \"p1\" && (matrix[x][(count2+1)]) === \"p1\" && (matrix[x][(count2+2)]) === \"p1\") { // If our cell has been 'tagged' p1 given x is (e.g 0) then: x0y0, x0y1, x0y2 would mean player one has 3 horizontal cells in a line = victory!\n\t\t\t\t\t\tif (player1 === true){\n\t\t\t\t\t\t//console.log(\"horizontal victory\")\n\t\t\t\t\t\t//console.log(\"player1 wins square row \"+BR+ \"column \"+BC )\n\t\t\t\t\t\twinner_show(BR,BC)\n\t\t\t\t\t\tlittlematrix[(BR-1)][(BC-1)]=\"p1\";\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\telse if\t( (matrix[(count+0)][y]) === \"p1\" && (matrix[(count+1)][y]) === \"p1\" && (matrix[(count+2)][y]) === \"p1\") { // Repeated for other conditions\n\t\t\t\t\t\tif (player1 === true){\n\t\t\t\t\t\t//console.log(\"vertical victory\")\n\t\t\t\t\t\t//console.log(\"player1 wins\")\n\t\t\t\t\t\twinner_show(BR,BC)\n\t\t\t\t\t\tlittlematrix[(BR-1)][(BC-1)]=\"p1\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if ((matrix[(count+0)][(count2+0)]) === \"p1\" && (matrix[(count+1)][(count2+1)]) === \"p1\" && (matrix[(count+2)][(count2+2)]) === \"p1\") {\n\t\t\t\t\t\tif (player1 === true){\n\t\t\t\t\t\tconsole.log(\"LtopRdown diagonal\")\n\t\t\t\t\t\tconsole.log(\"player1 wins\")\n\t\t\t\t\t\twinner_show(BR,BC)\n\t\t\t\t\t\tlittlematrix[(BR-1)][(BC-1)]=\"p1\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\telse if\t( (matrix[(count+0)][(count2+2)]) === \"p1\" && (matrix[(count+1)][(count2+1)]) === \"p1\" && (matrix[(count+2)][(count2+0)]) === \"p1\") {\t\n\t\t\t\t\t\tif (player1 === true){\n\t\t\t\t\t\tconsole.log(\"Rtop Ldown diagonal\")\n\t\t\t\t\t\tconsole.log(\"player1 wins\")\n\t\t\t\t\t\twinner_show(BR,BC)\n\t\t\t\t\t\tlittlematrix[(BR-1)][(BC-1)]=\"p1\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t \t}", "isOnRow(num) {\n if (num === 1) return this.y === 60;\n if (num === 2) return this.y === 145;\n if (num === 3) return this.y === 230;\n }", "function handleHTMLCellClick(e) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n let idArray = e.currentTarget.id.split(\"-\");\n let row = Number(idArray[1]);\n let col = Number(idArray[2]);\n\n chess.handleCellSelected(row, col);\n}", "function checkForWin() {\n // using HEIGHT and WIDTH, generate \"check list\" of coordinates\n // for 4 cells (starting here) for each of the different\n // ways to win: horizontal, vertical, diagonalDR, diagonalDL\n for (let row = 0; row < HEIGHT; row++) {\n for (let col = 0; col < WIDTH; col++) {\n\n let horiz = [[row, col], [row, col + 1], [row, col + 2], [row, col + 3]];\n let vert = [[row, col], [row + 1, col], [row + 2, col], [row + 3, col]];\n let diagBLToTR = [[row, col], [row - 1, col + 1], [row - 2, col + 2], [row - 3, col + 3]];\n let diagBRToTL = [[row, col], [row - 1, col - 1], [row - 2, col - 2], [row - 3, col - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagBRToTL) || _win(diagBLToTR)) {\n return true;\n }\n }\n }\n}", "function validClick(x,y){\n if (compArray[x][y] == 0 || compArray[x][y] == 2) return true;\n else return false \n}", "handleClick(evt) {\n // get x from ID of clicked cell\n const x = +evt.target.id;\n\n // get next spot in column (if none, ignore click)\n const y = this.findSpotForCol(x);\n if (y === null) {\n return;\n }\n\n // place piece in board and add to HTML table\n this.board[y][x] = this.currPlayer;\n this.placeInTable(y, x);\n\n // check for win\n if (this.checkForWin()) {\n this.gameOver = true;\n return this.endGame(`${this.currPlayer.name} won!`);\n }\n\n // check for tie\n if (this.board.every(row => row.every(cell => cell))) {\n return this.endGame('Tie!');\n }\n\n // switch players\n this.currPlayer = this.currPlayer === this.players[0] ? this.players[1] : this.players[0];\n }", "function handleClick(event) {\n\t// get x from ID of clicked cell\n\tconst x = +event.target.id;\n\n\t// get next spot in column (if none, ignore click)\n\tconst y = findSpotForCol(x);\n\tif (y === null) return;\n\n\t// place piece in board and add to HTML table\n\tboard[y][x] = currPlayer;\n\tplaceInTable(y, x);\n\n\t// check for win\n\tif (checkForWin()) return endGame(`Player ${currPlayer} won!`);\n\n\t// check for tie\n\tconst checkForTie = board[0].every((cell) => cell);\n\tif (checkForTie) return endGame('The game is a tie!');\n\n\t// switch players 1 <-> 2\n\t// [currPlayer, nextPlayer] = [nextPlayer, currPlayer];\n\tcurrPlayer = currPlayer % 2 + 1;\n}" ]
[ "0.6866995", "0.68578416", "0.6837854", "0.6822141", "0.6803706", "0.6794932", "0.6773249", "0.67554885", "0.6738475", "0.6737375", "0.67291284", "0.6723694", "0.6717159", "0.6660504", "0.66520005", "0.6643504", "0.66336966", "0.66101444", "0.6609261", "0.6593005", "0.65722656", "0.6543592", "0.6534942", "0.65317696", "0.653123", "0.6509127", "0.6498398", "0.6491858", "0.6482237", "0.64803004", "0.6475272", "0.64482576", "0.6441041", "0.64368224", "0.6434088", "0.64242303", "0.6422915", "0.6422451", "0.64019746", "0.6390218", "0.63869226", "0.6384533", "0.63792664", "0.6377004", "0.6365649", "0.63580596", "0.63576823", "0.63575315", "0.6351682", "0.6339285", "0.63278615", "0.6325994", "0.6324367", "0.63199097", "0.6298438", "0.6297325", "0.62969506", "0.62893254", "0.6279747", "0.6278568", "0.6264058", "0.62635255", "0.62605006", "0.6247762", "0.6242247", "0.6239706", "0.6233513", "0.62321967", "0.62305063", "0.62232816", "0.621999", "0.6219435", "0.6217829", "0.6215844", "0.62126315", "0.6197393", "0.6197132", "0.61900365", "0.61798203", "0.6175403", "0.6164917", "0.6164714", "0.6157819", "0.6157253", "0.61519796", "0.61471635", "0.6146753", "0.61439794", "0.6143475", "0.6143119", "0.61318886", "0.6130628", "0.61281645", "0.61265033", "0.61215967", "0.6119757", "0.61143094", "0.61128044", "0.6112045", "0.6111438", "0.611025" ]
0.0
-1
Check to see if the moves have resulted in 3 in a row.
function checkRow (a, b, c, move) { var result = false; if (getBox(a) == move && getBox(b) == move && getBox(c) == move) { result = true; }; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkWiningRowMove(p) {\n //0,1,2 3,4,5 6,7,8\n var ret = false;\n var r1 = _matrix[0][0] + _matrix[0][1] + _matrix[0][2];\n var r2 = _matrix[1][0] + _matrix[1][1] + _matrix[1][2];\n var r3 = _matrix[2][0] + _matrix[2][1] + _matrix[2][2];\n\n if (r1 === p.repeat(3) || r2 === p.repeat(3) || r3 === p.repeat(3) ) ret = true;\n\n return ret;\n }", "function checkRow()\n\t{\n\t\tvar plr = getPlayer();\n\t\tfor (i = 0; i < 3; i++)\n\t\t{\n\t\t\tvar inARow = 0;\n\t\t\tfor(j = 0; j < 3; j++)\n\t\t\t{\n\t\t\t\tif(grid[j][i] == plr)\n\t\t\t\t{\n\t\t\t\t\tinARow++;\n\t\t\t\t\tif (inARow == 3)\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function checkRow(a, b, c, move) {\r\n var flag = false;\r\n if ( (getTile(a) == move) && (getTile(b) == move) && (getTile(c) == move) ) {\r\n flag = true;\r\n }\r\n return flag;\r\n}", "function checkWiningColumnMove(p) {\n //0,3,6 1,4,7 2,5,8\n var ret = false;\n var c1 = _matrix[0][0] + _matrix[1][0] + _matrix[2][0];\n var c2 = _matrix[0][1] + _matrix[1][1] + _matrix[2][1];\n var c3 = _matrix[0][2] + _matrix[1][2] + _matrix[2][2];\n\n if (c1 === p.repeat(3) || c2 === p.repeat(3) || c3 === p.repeat(3) ) ret = true;\n\n return ret;\n }", "function winnerCheck(move) {\r\n var flag = false;\r\n if (checkRow(1, 2, 3, move) ||\r\n checkRow(4, 5, 6, move) ||\r\n checkRow(7, 8, 9, move) ||\r\n checkRow(1, 4, 7, move) ||\r\n checkRow(2, 5, 8, move) ||\r\n checkRow(3, 6, 9, move) ||\r\n checkRow(1, 5, 9, move) ||\r\n checkRow(3, 5, 7, move)) {\r\n flag = true;\r\n }\r\n return flag;\r\n}", "function checkForWinner(move) {\r\n var result = false;\r\n if (checkRow(1, 2, 3, move) || checkRow(4, 5, 6, move) || checkRow(7, 8, 9, move) || checkRow(1, 4, 7, move) || checkRow(2, 5, 8, move) || checkRow(3, 6, 9, move) || checkRow(1, 5, 9, move) || checkRow(3, 5, 7, move)) {\r\n result = true;\r\n }\r\n return result;\r\n}", "function checkRow(a,b,c, move) {\n\t\tvar result = false;\n\t\tif (getBox(a) ==move && getBox(b) ==move && getBox(c) == move){\n\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "function isWinningMove() {\n var hori = count(0, -1) + count(0, 1) - 1;\n var vert = count(-1, 0) + count(1, 0) - 1;\n var diag = count(1, -1) + count(-1, 1) - 1;\n var antd = count(1, 1) + count(-1, -1) - 1;\n // console.log(\"horizontal: \" + hori);\n // console.log(\"vertical: \" + vert);\n // console.log(\"diagonal: \" + diag);\n // console.log(\"anti-diagonal: \" + antd);\n if (hori >=4 | vert >= 4 | diag >= 4 | antd >= 4) {\n return true;\n }\n else return false;\n }", "checkWinner(move) \n {\n let result = false;\n if (this.checkRow(1, 2, 3, move) || \n this.checkRow(4, 5, 6, move) ||\n this.checkRow(7, 8, 9, move) ||\n this.checkRow(1, 4, 7, move) ||\n this.checkRow(2, 5, 8, move) ||\n this.checkRow(3, 6, 9, move) ||\n this.checkRow(1, 5, 9, move) ||\n this.checkRow(3, 5, 7, move)) \n {\n result = true;\n }\n\n return result;\n }", "function checkRowForThree() {\n for (i = 0; i <= 61; i++) { // can't check for #64 or #65; respect limit at #61\n let rowOfThree = [i, i+1, i+2];\n let decidedCandy = squares[i].style.backgroundImage;\n const isBlank = squares[i].style.backgroundImage === '';\n\n const notAllowed = [6, 7, 14, 15, 22, 23, 30, 31, 38, 39, 46, 47, 54, 55]\n if(notAllowed.includes(i)) continue // skip ; validate only if same row\n\n if (rowOfThree.every(index => squares[index].style.backgroundImage === decidedCandy && !isBlank)) {\n if (isRunning.timer) {\n score += 3;\n scoreDisplay.innerHTML = score;\n }\n rowOfThree.forEach(index => {\n squares[index].style.backgroundImage = '';\n })\n }\n }\n }", "function checkRowForThree() {\n for (i = 0; i < 62; i++) {\n //if we use indexes to draw our row, it would look like this\n let rowOfThree = [i, i + 1, i + 2];\n //this is the color to eliminate\n let decidedColor = squares[i].style.backgroundImage;\n\n //below is a variable to confirm that we have cleared the colored squares\n //we'll use it as a boolean\n const isBlank = squares[i].style.backgroundImage === '';\n\n //we need to confirm valid moves because having\n // the row start at the end and continue to the next row is invalid\n const notValid = [\n 6,\n 7,\n 14,\n 15,\n 22,\n 23,\n 30,\n 31,\n 38,\n 39,\n 46,\n 47,\n 54,\n 55,\n 58,\n 59,\n 60,\n 61,\n ];\n\n if (notValid.includes(i)) continue;\n //if every index in our row of three array is\n // equal to squares grid color based on decided color\n // and we make sure it's not blank\n // index was created on the fly and passed through an arrow\n // funcion to act as index 0 to confirm the first box\n // has the same color as the decided color.\n if (\n rowOfThree.every(\n (index) =>\n squares[index].style.backgroundImage === decidedColor && !isBlank\n )\n ) {\n //so, for each box in row of three we will set to\n // a blank color on the grid and give points\n score += 3;\n playScoreSound();\n\n scoreDisplay.innerHTML = score;\n rowOfThree.forEach((index) => {\n squares[index].style.backgroundImage = '';\n });\n }\n }\n }", "function checkForWinner(move) {\n\t\tvar result = false;\n\t\tif (checkRow(1,2,3, move) || \n\t\t\tcheckRow(4,5,6, move) || \n\t\t\tcheckRow(7,8,9, move) ||\n\t\t\tcheckRow(1,4,7, move) ||\n\t\t\tcheckRow(2,5,8, move) ||\n\t\t\tcheckRow(3,6,9, move) ||\n\t\t\tcheckRow(1,5,9, move) ||\n\t\t\tcheckRow(3,5,7, move)) {\n\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "function checkForWinner(move) { // move basically checks the infomration that your giving ie X or O.\n var result = false; //default value\n if (checkRow(1, 2, 3, move) ||\n (checkRow(4, 5, 6, move)) ||\n (checkRow(7, 8, 9, move)) ||\n (checkRow(1, 4, 7, move)) ||\n (checkRow(2, 5, 8, move)) ||\n (checkRow(3, 6, 9, move)) ||\n (checkRow(1, 5, 9, move)) ||\n (checkRow(3, 5, 7, move))) {\n result = true;\n}\nconsole.log(result);\nreturn result;\n}", "function checkForWinner(move) {\n\tvar result = false;\n\tif (checkRow(1, 2, 3, move) || checkRow(4, 5, 6, move) ||\n\t\tcheckRow(7, 8, 9, move) || checkRow(1, 4, 7, move) ||\n\t\tcheckRow(2, 5, 8, move) || checkRow(3, 6, 9, move) ||\n\t\tcheckRow(1, 5, 9, move) || checkRow(3, 5, 7, move)) {\n\n\t\tresult = true;\n\t};\n\treturn result;\n}", "function isFinished(board, row, col, c){\n for(var i = 0; i < 9; i++) {\n if (board[row][col] == \"\") return false;\n if(board[i][col] != \"\" && board[i][col] == c && i != row) return false; //check row\n if(board[row][i] != \"\" && board[row][i] == c && i != col) return false; //check column\n if(board[3 * Math.floor(row / 3) + Math.floor(i / 3)][ 3 * Math.floor(col / 3) + Math.floor(i % 3)] != \"\" && \nboard[3 * Math.floor(row / 3) + Math.floor(i / 3)][3 * Math.floor(col / 3) + Math.floor(i % 3)] == c && \n((3 * Math.floor(row / 3) + Math.floor(i / 3)) != row && (3 * Math.floor(col / 3) + Math.floor(i % 3)) != col)) return false; //check 3*3 block\n }\n return true;\n}", "function checkWinner(turn) {\nvar result = false;\nif (checkRow(1, 2, 3, turn) ||\n checkRow(4, 5, 6, turn) ||\n checkRow(7, 8, 9, turn) ||\n checkRow(1, 4, 7, turn) ||\n checkRow(2, 5, 8, turn) ||\n checkRow(3, 6, 9, turn) ||\n checkRow(3, 5, 7, turn) ||\n checkRow(1, 5, 9, turn)) {\n\n result = true;\n }\n return result;\n}", "function checkRow3() {\n // loop over 3 edges\n for (let i = 0; i < 61; i++) {\n let rowOfThree = [i, i + 1, i + 2];\n let decidedcolor = squares[i].style.backgroundImage;\n const isBlank = squares[i].style.backgroundImage === \"\";\n const notValid = [6, 7, 14, 15, 22, 23, 30, 31, 38, 39, 46, 47, 54, 55];\n if (notValid.includes(i)) {\n continue;\n }\n if (\n // if all the three colors are same then we make them as blank\n rowOfThree.every(\n (index) => squares[index].style.backgroundImage === decidedcolor\n ) &&\n !isBlank\n ) {\n score += 3;\n scoreDisplay.innerHTML = score;\n rowOfThree.forEach((index) => {\n squares[index].style.backgroundImage = \"\";\n });\n }\n }\n }", "function checkRowForThree() {\n for (i = 0; i < 61; i ++) {\n let rowOfThree = [i, i+1, i+2]\n let decidedColor = squares[i].style.backgroundImage\n const isBlank = squares[i].style.backgroundImage === ''\n const notValid=[6,7,14,15,30,31,38,39,46,47,54,55]\n if(notValid.includes(i))continue\n\n if(rowOfThree.every(index => squares[index].style.backgroundImage === decidedColor && !isBlank)) {\n score += 3\n scoreDisplay.innerHTML = score\n rowOfThree.forEach(index => {\n squares[index].style.backgroundImage = ''\n })\n }\n }\n }", "function checkVictoryThirdScenario(move){\n var i = 0;\n while(i < 8){\n if($(tileOrder[i]).html() !== \"\" && $(tileOrder[i]).html() === $(tileOrder[i+1]).html() && \n $(tileOrder[i]).html() === $(tileOrder[i+2]).html()){\n if(move === \"O\"){\n showPopUp(\".defeats\"); \n }else{\n showPopUp(\".victories\"); \n }\n return false;\n }\n i = i + 3;\n }\n //no victory happened after human's turn, so the machine can make its move\n if(move === \"X\"){\n addO(); \n }\n }", "function hasMoves() {\n for (var x = 0; x < cols; ++x) {\n for (var y = 0; y < cols; ++y) {\n if (canJewelMove(x, y)) {\n return true;\n }\n }\n }\n\n return false;\n }", "function checkforMoves(theMoves, one, two, three) {\n if (theMoves.includes(one) && theMoves.includes(two)) {\n return three;\n } else if (theMoves.includes(two) && theMoves.includes(three)) {\n return one;\n } else if (theMoves.includes(three) && theMoves.includes(one)) {\n return two;\n } else {\n return false;\n }\n }", "function isWinner() {\n\n\t\tvar winner = false;\n\t\tif (threeInaRow(0,1,2,turn) ||\n\t\t\tthreeInaRow(3,4,5, turn) ||\n\t\t\tthreeInaRow(6,7,8, turn) ||\n\t\t\tthreeInaRow(0,3,6, turn) ||\n\t\t\tthreeInaRow(1,4,7, turn) ||\n\t\t\tthreeInaRow(2,5,8, turn) ||\n\t\t\tthreeInaRow(0,4,8, turn) ||\n\t\t\tthreeInaRow(2,4,6, turn)) {\n\t\t\twinner = true;\n\t\t\t}\n\t\treturn winner;\n\t\t}", "function checkPossibleMoves()\n{\n\tif(squares[0].innerHTML && squares[1].innerHTML && squares[2].innerHTML && squares[3].innerHTML &&\n\tsquares[4].innerHTML && squares[5].innerHTML && squares[6].innerHTML && squares[7].innerHTML && squares[8].innerHTML){\n\t\treturn true;\n\t}\n}", "function hasMoves () {\n for (var x = 0; x < cols; x++) {\n for (var y = 0; y < rows; y++) {\n if (canTileMove(x, y)) {\n return true;\n }\n }\n }\n return false;\n }", "function _checkMoves() {\n\t\t\n\t\t// iterate through the rows\n\t\tfor(row = 0; row < _rows; row++) {\n\t\t\t\n\t\t\t// iterate through the cols\n\t\t\tfor (col = 0; col < _cols; col++) {\n\t\t\t\t\n\t\t\t\t// check top and bottom\n\t\t\t\tif(row - 1 >= 0 && typeof _board[row - 1][col] !== \"undefined\"\n\t\t\t\t && row + 1 < _rows && typeof _board[row + 1][col] !== \"undefined\"){\n\t\t\t\t\t\n\t\t\t\t\tif(_board[row - 1][col] === _board[row][col] && _board[row + 1][col] === _board[row][col]) {\n\t\t\t\t\t\t_winnerFound = true;\n\t\t\t\t\t\t_winner = _board[row][col];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check left and right\n\t\t\t\tif(col - 1 >= 0 && typeof _board[row][col - 1] !== \"undefined\"\n\t\t\t\t && col + 1 < _cols && typeof _board[row][col + 1] !== \"undefined\"){\n\t\t\t\t\t\n\t\t\t\t\tif(_board[row][col - 1] === _board[row][col] && _board[row][col + 1] === _board[row][col]) {\n\t\t\t\t\t\t_winnerFound = true;\n\t\t\t\t\t\t_winner = _board[row][col];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check diagonals\n\t\t\t\tif(col - 1 >= 0 && col + 1 < _cols && row - 1 >= 0 && row + 1 < _rows){\n\n\t\t\t\t\tif(typeof _board[row - 1][col - 1] !== \"undefined\"\n\t\t\t\t\t && typeof _board[row + 1][col + 1] !== \"undefined\"\n\t\t\t\t\t && _board[row - 1][col - 1] === _board[row][col] \n\t\t\t\t\t && _board[row + 1][col + 1] === _board[row][col]) {\n\t\t\t\t\t\t_winnerFound = true;\n\t\t\t\t\t\t_winner = _board[row][col];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if(typeof _board[row - 1][col + 1] !== \"undefined\"\n\t\t\t\t\t && typeof _board[row + 1][col - 1] !== \"undefined\"\n\t\t\t\t\t && _board[row - 1][col + 1] === _board[row][col] \n\t\t\t\t\t\t&& _board[row + 1][col - 1] === _board[row][col]) {\n\t\t\t\t\t\t_winnerFound = true;\n\t\t\t\t\t\t_winner = _board[row][col];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// if winner was found, then break out of loop\n\t\t\tif(_winnerFound) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "function checkWin() {\n return Winning_combinations.some(combination => {\n return combination.every( index => {\n if (move % 2 !== 0) {\n return cells[index].classList.contains('x');\n }\n else {\n return cells[index].classList.contains('o');\n }\n })\n })\n}", "isWinner(player) {\n return TTTGame.POSSIBLE_WINNING_ROWS.some(row => {\n return this.board.countMarkersFor(player, row) === 3;\n })\n }", "function check(player) {\n // check three rows\n if (player.has(0) && player.has(1) && player.has(2)) return true;\n if (player.has(3) && player.has(4) && player.has(5)) return true;\n if (player.has(6) && player.has(7) && player.has(8)) return true;\n\n // check three columns\n if (player.has(0) && player.has(3) && player.has(6)) return true;\n if (player.has(1) && player.has(4) && player.has(7)) return true;\n if (player.has(2) && player.has(5) && player.has(8)) return true;\n\n // check two slashes\n if (player.has(0) && player.has(4) && player.has(8)) return true;\n if (player.has(2) && player.has(4) && player.has(6)) return true;\n return false;\n}", "checkColumns(player) {\n //player\n\n /* Check all column in that row */\n if (\n (this.board[0][0] === player && this.board[1][0] === player && this.board[2][0] === player) ||\n\n (this.board[0][1] === player && this.board[1][1] === player && this.board[2][1] === player) ||\n (this.board[0][2] === player && this.board[1][2] === player && this.board[2][2] === player)\n ) {\n return true;\n }\n return false;\n }", "function check_for_winning_move(gs, player){\n //check horizontals\n for(let i = 0; i<gs.length; i++){\n for(let j = 0; j<(gs[i].length)-3; j++){\n if(gs[i][j] === player && gs[i][j+1] === player && gs[i][j+2] === player && gs[i][j+3] === player){\n console.log(\"Horizontal Win!\");\n return true;\n }\n }\n }\n\n //check verticals\n for(let i = 0; i<(gs.length)-3; i++){\n for(let j = 0; j<gs[i].length; j++){\n if(gs[i][j] === player && gs[i+1][j] === player && gs[i+2][j] === player && gs[i+3][j] === player){\n console.log(\"Vertical Win!\");\n return true;\n }\n }\n }\n\n //check slash\n for(let i = gs.length-1; i>=(gs.length)-3; i--){\n for(let j = 0; j<(gs[i].length)-3; j++){\n if(gs[i][j] === player && gs[i-1][j+1] === player && gs[i-2][j+2] === player && gs[i-3][j+3] === player){\n console.log(\"Slash Win!\");\n return true;\n }\n }\n }\n\n //check backslash\n for(let i = 0; i<(gs.length)-3; i++){\n for(let j = 0; j<(gs[i].length)-3; j++){\n if(gs[i][j] === player && gs[i+1][j+1] === player && gs[i+2][j+2] === player && gs[i+3][j+3] === player){\n console.log(\"Backslash Win!\");\n return true;\n }\n }\n }\n\n for(let i = 0; i<gs.length; i++){\n for(let j = 0; j<gs[i].length; j++){\n if(gs[i][j] !== 0){\n return false\n }\n }\n }\n\n console.log(\"We have a draw....\");\n return true;\n}", "function checkColForThree() {\n for (i = 0; i < 48; i++) {\n //if we use indexes to draw our row, it would look like this\n let colOfThree = [i, i + width, i + 2 * width];\n //this is the color to eliminate\n let decidedColor = squares[i].style.backgroundImage;\n\n //below is a variable to confirm that we have cleared the colored squares\n //we'll use it as a boolean\n let isBlank = squares[i].style.backgroundImage === '';\n\n //if every index in our row of three array is\n // equal to squares grid color based on decided color\n // and we make sure it's not blank\n // index was created on the fly and passed through an arrow\n // funcion to act as index 0 to confirm the first box\n // has the same color as the decided color.\n if (\n colOfThree.every(\n (index) =>\n squares[index].style.backgroundImage === decidedColor && !isBlank\n )\n ) {\n //so, for each box in row of three we will set to\n // a blank color on the grid and give points\n score += 3;\n playScoreSound();\n scoreDisplay.innerHTML = score;\n colOfThree.forEach((index) => {\n squares[index].style.backgroundImage = '';\n });\n }\n }\n }", "isFinished() {\n // after the first player third move, checks if anybody wan the game\n if(this.moves >= 5) {\n let i, j;\n\n // check rows\n for(i = 0; i < 6; i = i + 3) {\n if(this.board[i] !== 'E' && this.board[i] === this.board[i + 1] && this.board[i + 1] == this.board[i + 2]) {\n this.updatePlayerScore(this.result = {\n status: 'finished',\n winner: this.board[i]\n });\n return true;\n }\n }\n\n // check cols\n for(i = 0; i <= 2; i ++) {\n if(this.board[i] !== 'E' && this.board[i] === this.board[i + 3] && this.board[i + 3] == this.board[i + 6]) {\n this.updatePlayerScore(this.result = {\n status: 'finished',\n winner: this.board[i]\n });\n return true;\n }\n }\n\n // check diagonals\n for(i = 0, j = 4; i <= 2; i = i + 2, j = j - 2) {\n if(this.board[i] !== 'E' && this.board[i] === this.board[i + j] && this.board[i + j] == this.board[i + 2*j]) {\n this.updatePlayerScore(this.result = {\n status: 'finished',\n winner: this.board[i]\n });\n return true;\n }\n }\n\n if(this.moves === 9) {\n this.updatePlayerScore(this.result = {\n status: 'draw'\n });\n return true;\n }\n }\n\n // if there is not winner, the game is still running and the next player shoul move\n this.result = {status: 'running'};\n\n return false;\n }", "function checkColumn3() {\n // loop over 3 edges\n for (let i = 0; i < 47; i++) {\n let columnOfThree = [i, i + width, i + 2 * width];\n let decidedcolor = squares[i].style.backgroundImage;\n const isBlank = squares[i].style.backgroundImage === \"\";\n\n if (\n // if all the three colors are same then we make them as blank\n columnOfThree.every(\n (index) => squares[index].style.backgroundImage === decidedcolor\n ) &&\n !isBlank\n ) {\n score += 3;\n scoreDisplay.innerHTML = score;\n columnOfThree.forEach((index) => {\n squares[index].style.backgroundImage = \"\";\n });\n }\n }\n }", "function isMoveValid(row, columns) {\n for (let i = 0; i < row; i++) {\n if (columns[i] === columns[row]) {\n return false; // Two queens are in the same column\n }\n\n if (row - i === Math.abs(columns[row] - columns[i])) {\n return false; // Two queens are in the same diagonal\n }\n }\n\n return true;\n}", "function isLegalMove(col) {\n return stats.moveStart != null && stats.openRows[col] < 6 && stats.winner == null;\n }", "function rowOfThree() {\n for (let i = 0; i < 61; i++) {\n const notValid = [6, 7, 14, 15, 22, 23, 30, 31, 38, 39, 46, 47, 54, 55];\n if (notValid.includes(i)) continue;\n decidedColor = squares[i].style.backgroundImage;\n decidedColor2 = squares[i + 1].style.backgroundImage;\n decidedColor3 = squares[i + 2].style.backgroundImage;\n\n if (\n decidedColor !== \"\" &&\n decidedColor === decidedColor2 &&\n decidedColor2 === decidedColor3 &&\n decidedColor3 === decidedColor\n ) {\n score += 3;\n resultDisplay.innerHTML = score;\n squares[i].style.backgroundImage = \"\";\n squares[i + 1].style.backgroundImage = \"\";\n squares[i + 2].style.backgroundImage = \"\";\n }\n }\n }", "function hasWon(puzzle)\n{\n var i = 0;\n for (var r = 0; r < 4; r++) \n {\n for (var c = 0; c < 4; c++) \n {\n if (i < puzzle.length)\n {\n var currentRow = parseInt(puzzle[i].style.top, 10) / 100;\n var currentCol = parseInt(puzzle[i].style.left, 10) / 100;\n if (currentRow != r || currentCol != c)\n { \n return false;\n }\n i++;\n }\n }\n }\n $(\"text\").removeClassName(\"lose\");\n $(\"text\").addClassName(\"win\");\n $(\"text\").innerHTML = \"You've solved the puzzle in \" + moves + \" moves!\";\n moves = 0;\n return true;\n}", "function checkWiningDiagonalMove(p) {\n //0,4,8 2,4,6\n var ret = false;\n var d1 = _matrix[0][0] + _matrix[1][1] + _matrix[2][2];\n var d2 = _matrix[0][2] + _matrix[1][1] + _matrix[2][0];\n\n if ( d1 === p.repeat(3) || d2 === p.repeat(3) ) ret = true;\n\n return ret;\n }", "function checkHorWin(){\n for (i=0;i<7;i += 3){\n let firstCell = game.gameBoard[i];\n if (firstCell == null) {continue;}\n if (firstCell == game.gameBoard[i+1] && firstCell == game.gameBoard[i+2]){\n game.gameWinner = firstCell;\n return true;\n\n }\n }\n return false;\n}", "function verifyWin() {\n let win = false;\n for (let i = 0; i < 3; i++) {\n if (board[i][0] === turn && board[i][1] === turn && board[i][2] === turn) {\n win = true;\n break;\n } else if (board[0][i] === turn && board[1][i] === turn && board[2][i] === turn) {\n win = true;\n break;\n }\n }\n // diagornal principal\n if (board[0][0] === turn && board[1][1] === turn && board[2][2] === turn) {\n win = true;\n // diagonal secundária\n } else if (board[0][2] === turn && board[1][1] === turn && board[2][0] === turn) {\n win = true;\n }\n return win;\n}", "function checkRowForThree(){\n for(i=0; i<61; i++){\n\n let rowOfThree = [i, i+1, i+2]\n let decidedColor = squares[i].style.backgroundImage\n const isBlack = squares[i].style.backgroundImage === ''\n\n const notValid =[6, 7,14,15,22,30,31,38,39,46,47,54,55]\n if (notValid.includes(i)) continue\n\n if (rowOfThree.every(index => squares[index].style.backgroundImage === decidedColor && !isBlack)){\n score += 3\n squareDisplay.innerHTML= score\n rowOfThree.forEach(index => {\n squares[index].style.backgroundImage = ''\n })\n }\n }\n}", "threefoldRepetition() {\n for (var element of state.threefoldHistory) {\n var count = 0\n for (var i = 0; i < state.threefoldHistory.length; i++) {\n if (state.threefoldHistory[i] === element) {\n count +=1\n if (count === 3) {\n state.messageBoard = 'Draw by threefold repetition'\n return true\n }\n }\n }\n }\n return false\n }", "function checkWin() {\n if(($('[data-cell=\"0\"]').text() === playerTurn &&\n $('[data-cell=\"3\"]').text() === playerTurn &&\n $('[data-cell=\"6\"]').text() === playerTurn\n ) || ($('[data-cell=\"1\"]').text() === playerTurn &&\n $('[data-cell=\"4\"]').text() === playerTurn &&\n $('[data-cell=\"7\"]').text() === playerTurn\n ) || ($('[data-cell=\"2\"]').text() === playerTurn &&\n $('[data-cell=\"5\"]').text() === playerTurn &&\n $('[data-cell=\"8\"]').text() === playerTurn\n ) || ($('[data-cell=\"0\"]').text() === playerTurn &&\n $('[data-cell=\"1\"]').text() === playerTurn &&\n $('[data-cell=\"2\"]').text() === playerTurn\n ) || ($('[data-cell=\"3\"]').text() === playerTurn &&\n $('[data-cell=\"4\"]').text() === playerTurn &&\n $('[data-cell=\"5\"]').text() === playerTurn\n ) || ($('[data-cell=\"6\"]').text() === playerTurn &&\n $('[data-cell=\"7\"]').text() === playerTurn &&\n $('[data-cell=\"8\"]').text() === playerTurn\n ) || ($('[data-cell=\"0\"]').text() === playerTurn &&\n $('[data-cell=\"4\"]').text() === playerTurn &&\n $('[data-cell=\"8\"]').text() === playerTurn\n ) || ($('[data-cell=\"2\"]').text() === playerTurn &&\n $('[data-cell=\"4\"]').text() === playerTurn &&\n $('[data-cell=\"6\"]').text() === playerTurn\n )\n )\n {\n return true;\n } else {\n return false;\n }\n }", "function isValid(board, row, col, c){\n for(var i = 0; i < 9; i++) {\n if(board[i][col] != \"\" && board[i][col] == c) return false; //check row\n if(board[row][i] != \"\" && board[row][i] == c) return false; //check column\n if(board[3 * Math.floor(row / 3) + Math.floor(i / 3)][ 3 * Math.floor(col / 3) + Math.floor(i % 3)] != \"\" && \nboard[3 * Math.floor(row / 3) + Math.floor(i / 3)][3 * Math.floor(col / 3) + Math.floor(i % 3)] == c) return false; //check 3*3 block\n }\n return true;\n}", "function checkRows(){\n //check first row\n if(box0 == activePlayer.symbol && box1 == activePlayer.symbol && box2 == activePlayer.symbol){\n console.log(`${activePlayer.name} wins`);\n const showWinner = displayWin();\n gameState = false;\n // const restart_ = restart();\n\n } \n //check second row\n if(box3 == activePlayer.symbol && box4 == activePlayer.symbol && box5 == activePlayer.symbol){\n const showWinner = displayWin();\n gameState = false;\n\n }\n //check third row\n if(box6 == activePlayer.symbol && box7 == activePlayer.symbol && box8 == activePlayer.symbol){\n const showWinner = displayWin();\n gameState = false;\n\n }\n}", "function checktie(){\r\n const allEqual = arr => arr.every(val => val !== 0);\r\n //Check for tie condition\r\n if (allEqual(boardState.map((_, columnIndex) => boardState.map(row => row[columnIndex]))[0].slice(0, 7))) {\r\n return true;\r\n }\r\n return false;\r\n}", "function checkForColRow(slots) {\n console.log(slots);\n var count = 0;\n for (var i = 0; i < slots.length; i++) {\n if (slots.eq(i).hasClass(currentPlayer)) {\n count++;\n }\n }\n if (count >= 4) {\n return true;\n } else {\n return false;\n }\n }", "checkWinner() {\n // Check rows\n let win = false;\n\n const checkEqual = arr => arr.every(v => (v === arr[0] && v !== ''));\n console.log(\"CHECK WINNER.\");\n const board = this.state.board;\n for (let i = 0; i < this.width; i++) {\n\n for (let j = 0; j < this.height; j++) {\n\n // Check row win\n if (j <= this.height - 4) {\n //console.log(\"LINE:\" + [board[i][j+1],board[i][j+2],board[i][j+3],board[i][j]]);\n win = checkEqual([board[i][j + 1], board[i][j + 2], board[i][j + 3], board[i][j]]) ? board[i][j] : false;\n if (win !== false) break;\n }\n\n // Check line & diagonal win \n if (i <= this.width - 4) {\n //console.log(\"ROW:\" + [board[i+1][j],board[i+2][j],board[i+3][j],board[i][j]]);\n win = checkEqual([board[i + 1][j], board[i + 2][j], board[i + 3][j], board[i][j]]) ? board[i][j] : false;\n if (win !== false) break;\n\n // Check diagonal line\n if (j <= this.height - 4) {\n win = checkEqual([board[i + 1][j + 1], board[i + 2][j + 2], board[i + 3][j + 3], board[i][j]]) ? board[i][j] : false;\n //console.log(\"MAYBE WIN? \" + [board[i][j],board[i+1][j+1],board[i+2][j+2],board[i+3][j+3]] + \"LINE: \" + i + \",ROW: \" + j);\n if (win !== false) break;\n }\n }\n\n if (i <= this.width - 4 && j >= 3) {\n win = checkEqual([board[i][j], board[i + 1][j - 1], board[i + 2][j - 2], board[i + 3][j - 3]]) ? board[i][j] : false;\n //console.log(\"MAYBE WIN? \" + [board[i + 3][j - 3], board[i + 2][j - 2], board[i + 1][j - 1], board[i][j]] + \"LINE: \" + i + \",ROW: \" + j);\n if (win !== false) break;\n }\n\n\n }\n\n // Break out from second for loop\n if (win !== false) {\n break;\n }\n }\n\n if (win !== false) return win;\n return false;\n }", "is_finished() {\n // if last piece\n let cpt = 0;\n\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 6; y++) {\n if (this._board[x][y] !== -1) {\n cpt++;\n }\n }\n }\n if (cpt === 0) {\n return true;\n }\n // if one player have the set of color\n for (let i = 0; i < 6; i++) {\n if (this._player_1_pieces[i] === 6) {\n return true;\n }\n if (this._player_2_pieces[i] === 6) {\n return true;\n }\n }\n return false;\n }", "function checkWonDiagonal2(pos) {\n let fields = [];\n let i = 1;\n let col;\n let field = [];\n\n //above/left of pos\n while (col = container.children[pos.col - i]) {\n if (field = col.children[pos.row - i]) {\n if (field.classList.contains(player)) {\n fields.push(field);\n } else {\n break;\n }\n } else {\n break;\n }\n i++;\n }\n\n //below/right of pos\n i = 1;\n while (col = container.children[pos.col + i]) {\n if (field = col.children[pos.row + i]) {\n if (field.classList.contains(player)) {\n fields.push(field);\n } else {\n break;\n }\n } else {\n break;\n }\n i++;\n }\n\n if (fields.length >= 3) {\n return fields;\n }\n return false;\n}", "function checkBoard(i1, i2, i3, i4, i5) {\n if (checkArray(i1, clickedSquares)) {\n if (checkArray(i2, clickedSquares)) {\n if (checkArray(i3, clickedSquares)) {\n if (checkArray(i4, clickedSquares)) {\n if (checkArray(i5, clickedSquares)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n}", "function checkWiner(board){\n //check first row\n if(board[0][0] != '' && board[0][0] == board[0][1] && board[0][0] == board[0][2]){\n return true;\n //second row\n }else if(board[1][0] != '' && board[1][0] == board[1][1] && board[1][0] == board[1][2]){\n return true;\n //third row\n }else if(board[2][0] != '' && board[2][0] == board[2][1] && board[2][0] == board[2][2]){\n return true;\n //first column\n }else if(board[0][0] != '' && board[0][0] == board[1][0] && board[0][0] == board[2][0]){\n return true;\n //second column\n }else if(board[0][1] != '' && board[0][1] == board[1][1] && board[0][1] == board[2][1]){\n return true;\n //third column\n }else if(board[0][2] != '' && board[0][2] == board[1][2] && board[0][2] == board[2][2]){\n return true;\n //diagnal \n }else if(board[0][0] != '' && board[0][0] == board[1][1] && board[0][0] == board[2][2]){\n return true;\n //opposite diagnal\n }else if(board[0][2] != '' && board[0][2] == board[1][1] && board[0][2] == board[2][0]){\n return true;\n }\n}", "checkBoard() {\n // Check three in a row and ties\n let countEmpty = 0;\n for (let row = 0; row < 3; row++) {\n let countX = 0;\n let countO = 0;\n for (let col = 0; col < 3; col++) {\n if (this.board[row][col] === \"X\") countX++;\n if (this.board[row][col] === \"O\") countO++;\n if (this.board[row][col] === \"\") countEmpty++;\n }\n if (countX === 3) this.winner = \"X wins!\";\n if (countO === 3) this.winner = \"O wins!\";\n }\n\n // Check three in a column\n for (let col = 0; col < 3; col++) {\n let countX = 0;\n let countO = 0;\n for (let row = 0; row < 3; row++) {\n if (this.board[row][col] === \"X\") countX++;\n if (this.board[row][col] === \"O\") countO++;\n }\n if (countX === 3) this.winner = \"X wins!\";\n if (countO === 3) this.winner = \"O wins!\";\n }\n\n // Check diagonals\n let countX = 0;\n let countO = 0;\n for (let i = 0; i < 3; i++) {\n if (this.board[i][i] === \"X\") countX++;\n if (this.board[i][i] === \"O\") countO++;\n }\n if (countX === 3) this.winner = \"X wins!\";\n if (countO === 3) this.winner = \"O wins!\";\n\n countX = 0;\n countO = 0;\n for (let i = 0; i < 3; i++) {\n if (this.board[i][2 - i] === \"X\") countX++;\n if (this.board[i][2 - i] === \"O\") countO++;\n }\n if (countX === 3) this.winner = \"X wins!\";\n if (countO === 3) this.winner = \"O wins!\";\n\n if (countEmpty === 0) this.winner = \"It's a tie!\";\n }", "function checkMove(xPos, yPos, newState) {\n\tvar result = true;\n\tvar newX = xPos;\n\tvar newY = yPos;\n\t\n\tfor(var r = 0, len = ourPiece.states[newState].length; r < len; r++) {\n\t\tfor(var c = 0, len2 = ourPiece.states[newState][r].length; c < len2; c++) {\n\t\t\t// If a square of the block is outside the left-right confines of the gameboard then the move is invalid.\n\t\t\tif(newX < 0 || newX >= columns) {\n\t\t\t\tresult = false;\n\t\t\t\tc = len2;\n\t\t\t\tr = len;\n\t\t\t}\n\t\t\t\n\t\t\t// This if checks that any given square of the block isn't already occupied by a previous block in game data.\n\t\t\tif(gameData[newY] != undefined && gameData[newY][newX] != 0 \n\t\t\t\t&& ourPiece.states[newState][r] != undefined && ourPiece.states[newState][r][c] != 0) {\n\t\t\t\tresult = false;\n\t\t\t\tc = len2;\n\t\t\t\tr = len;\n\t\t\t}\n\t\t\t\n\t\t\tnewX++;\n\t\t}\n\t\tnewX = xPos;\n\t\tnewY++;\n\t\t\n\t\t// If the new row would be below the last line of the gameboard the move is again invalid.\n\t\tif(newY > rows) {\n\t\t\tr = len;\n\t\t\tresult = false;\n\t\t}\n\t}\n\treturn result;\n}", "function threeByThree(i, j) {\n let sum = 0;\n for (let r = i; r < i + 3; r++) {\n for (let c = j; c < j + 3; c++) {\n sum += board[r][c];\n }\n }\n if (sum !== 45) valid = false;\n }", "checkCompletedBoard(){\n let totalSquares = board.columnCount * board.rowCount;\n let dustedSquaresCount = 0;\n for(let checkColumn=0; checkColumn<board.columnCount; checkColumn++) {\n for(let checkRow=0; checkRow<board.rowCount; checkRow++) {\n let s = board.squares[checkColumn][checkRow];\n if (board.squares[checkColumn][checkRow].dusted===1) {\n dustedSquaresCount++;\n }\n }\n }\n if (dustedSquaresCount===totalSquares){\n level.boardFinished();\n }\n }", "function checkWonDiagonal1(pos) {\n let fields = [];\n let i = 1;\n let col;\n let field = [];\n\n //above/right of pos\n while (col = container.children[pos.col + i]) {\n if (field = col.children[pos.row - i]) {\n if (field.classList.contains(player)) {\n fields.push(field);\n } else {\n break;\n }\n } else {\n break;\n }\n i++;\n }\n\n //below/left of pos\n i = 1;\n while (col = container.children[pos.col - i]) {\n if (field = col.children[pos.row + i]) {\n if (field.classList.contains(player)) {\n fields.push(field);\n } else {\n break;\n }\n } else {\n break;\n }\n i++;\n }\n\n if (fields.length >= 3) {\n return fields;\n }\n return false;\n}", "function checkVerWin(){\n for (i=0;i<3;i++){\n let firstCell = game.gameBoard[i];\n if (firstCell == null) {continue;}\n if (firstCell == game.gameBoard[i+3] && firstCell == game.gameBoard[i+6]){\n game.gameWinner = firstCell;\n return true;\n }\n }\n return false;\n}", "function checkHorizontal() {\n for (let rowIndex = 0; rowIndex < gameBoard.length; rowIndex++) {\n let row = gameBoard[rowIndex];\n for (let columnIndex = 0; columnIndex < config.edgeX; columnIndex++) {\n let cell = row[columnIndex];\n if (cell !== 0) {\n if (cell === gameBoard[rowIndex][columnIndex + 1] && cell === gameBoard[rowIndex][columnIndex + 2] && cell === gameBoard[rowIndex][columnIndex + 3]) {\n return true\n }\n }\n }\n }\n}", "check() {\r\n //check if all cells are taken\r\n if(this.board.every(row=>row.every(cell=>cell==1 || cell ==2))) return 3;\r\n for (var x = 0; x < 6; x++) {\r\n //For each row\r\n for (var y = 0; y < 7; y++) {\r\n //for each cell in row\r\n if(this.board[x][y] != 0) {\r\n //space occupied, check\r\n\r\n //check right\r\n var n = this.board[x][y]\r\n if(r(x, y, this.board).s) {\r\n this.board = r(x, y, this.board).d\r\n return n\r\n }\r\n if(u(x, y, this.board).s) {\r\n this.board = u(x, y, this.board).d\r\n return n\r\n }\r\n if(dl(x, y, this.board).s) {\r\n this.board = dl(x, y, this.board).d\r\n return n\r\n }\r\n if(dr(x, y, this.board).s) {\r\n this.board = dr(x, y, this.board).d\r\n return n\r\n }\r\n }\r\n\r\n }\r\n }\r\n return 0\r\n }", "function horizontalWin() {\n\n //for loop to check each row\n for(let i=0; i<=2; i++){\n let row = board[i];\n\n //if win in a row returns true\n if(row[0] == row[1] && row[1] == row[2] && row[0] != ' '){\n return true;\n }\n\n }\n\n}", "function isSolved(grid){\n for (const tube of grid){\n if(tube.length==0) {continue}\n else if(tube.length < 4){return false}\n else if(tube.filter(x => x == tube[0]).length != 4) {return false}\n\n }\n return true\n\n}", "function checkWin(){\r\n\tlet cb = []; //current Board\r\n\tcb[0] = \"\"; //not going to use\r\n\tcb[1] = document.getElementById(\"one\").innerHTML;\r\n\tcb[2] = document.getElementById(\"two\").innerHTML;\r\n\tcb[3] = document.getElementById(\"three\").innerHTML;\r\n\tcb[4] = document.getElementById(\"four\").innerHTML;\r\n\tcb[5] = document.getElementById(\"five\").innerHTML;\r\n\tcb[6] = document.getElementById(\"six\").innerHTML;\r\n\tcb[7] = document.getElementById(\"seven\").innerHTML;\r\n\tcb[8] = document.getElementById(\"eight\").innerHTML;\r\n\tcb[9] = document.getElementById(\"nine\").innerHTML;\r\n\t\r\n\t//top row \r\n\tif(cb[1] != \"\" && cb[1] == cb[2] && cb[2] == cb[3]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//middle row\r\n\tif(cb[4] != \"\" && cb[4] == cb[5] && cb[5] == cb[6]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//bottem row\r\n\tif(cb[7] != \"\" && cb[7] == cb[8] && cb[8] == cb[9]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//first collum\r\n\tif(cb[1] != \"\" && cb[1] == cb[4] && cb[4] == cb[7]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//second collum\r\n\tif(cb[2] != \"\" && cb[2] == cb[5] && cb[5] == cb[8]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//third collum\r\n\tif(cb[3] != \"\" && cb[3] == cb[6] && cb[6] == cb[9]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t//digonal left going down\r\n\tif(cb[1] != \"\" && cb[1] == cb[5] && cb[5] == cb[9]) {\r\n\t\treturn true;\r\n\t}//if\r\n\t\r\n\t\r\n\t//digonal right going down\r\n\tif(cb[3] != \"\" && cb[3] == cb[5] && cb[5] == cb[7]) {\r\n\t\treturn true;\r\n\t}//if\r\n\r\n\telse{\r\n\t\t\t\t//check for tie\r\n\t\tif(numTurns == 9){\r\n\t\t\tgameStatus = \"Game Tie\";\r\n\t\t}//numTurns\r\n\t}//else\r\n\t\r\n\r\n\r\n}//check win", "function checkWin()\n{\n for (var i=0; i < 3; i++)\n {\n var startplace = i * 3;\n var endplace = startplace+3;\n var presentX = 0;\n var presentO = 0;\n\n for (startplace; startplace,endplace; startplace++)\n {\n var checkElement = document.getElementById(startplace).textContent;\n if(checkElement == \"X\")\n {\n presentX+=1;\n }\n if(checkElement == \"O\")\n {\n presentO+=1;\n }\n }\n if(presentX==3 || presentO==3)\n {\n winMess();\n return true\n }\n \n }\n //End of Code for horizontal row\n\n //Code for vertical row \n for(var i = 0; i < 3; i++)\n {\n var startplace = i;\n var presentX = 0;\n var presentO = 0;\n\n for(var r = 0; r < 3; r++)\n {\n var checkElement = document.getElementById(startplace).textContent;\n if(checkElement == \"X\")\n {\n presentX+=1;\n }\n else if(checkElement == \"O\")\n {\n presentO+=1;\n }\n startplace+=3;\n }\n if (presentX==3 || presentO==3)\n {\n winMess();\n return true\n }\n }\n //End of Code for vertical row \n\n //Code for diagonal row\n if((document.getElementById(0).textContent==\"x\") && (document.getElementById(4).textContent==\"x\") && (document.getElementById(8).textContent==\"x\") || (document.getElementById(0).textContent==\"o\") && (document.getElementById(4).textContent==\"o\") && (document.getElementById(8).textContent==\"o\"))\n {\n winMess();\n return true;\n }\n\n if((document.getElementById(2).textContent==\"x\") && (document.getElementById(4).textContent=\"x\") && (document.getElementById(6).textContent==\"x\") || (document.getElementById(2).textContent==\"o\") && (document.getElementById(4).textContent=\"o\") && (document.getElementById(6).textContent==\"o\"))\n {\n winMess();\n return true;\n }\n //End of Code for vertical row \n\n if(tracker.length==8)\n {\n var tieMessage = document.getElementById('status');\n tieMessage.textContent = \"There was a tie. Click New Game to play again\";\n game = false;\n }\n}", "checkWin(board, rows = 10, cols = 10) {\n var swept = true;\n for (var r = 0; r < rows; r ++) {\n for (var c = 0; c < cols; c++) {\n if (!board[r][c].mine && !board[r][c].visible) {\n swept = false;\n return;\n }\n }\n }\n return swept;\n }", "function checkWin() {\n const combinations = [\n [0,1,2], [3,4,5], [6,7,8], \n [0,3,6], [1,4,7], [2,5,8], \n [0,4,8], [2,4,6],\n ];\n\n let check = false;\n combinations.forEach((items) => {\n const value0 = board[items[0]]; \n const value1 = board[items[1]]; \n const value2 = board[items[2]]; \n check |= value0 != \"\" && value0 == value1 && value1 == value2;\n });\n\n return check;\n}", "function isValid(board, row, col, k) {\n for (let i = 0; i < 9; i++) {\n const m = 3 * Math.floor(row / 3) + Math.floor(i / 3);\n const n = 3 * Math.floor(col / 3) + (i % 3);\n if (board[row][i] == k || board[i][col] == k || board[m][n] == k) {\n return false;\n }\n }\n return true;\n}", "function isValidMove(matrix, cellRow, cellCol) {\n for (let row = 0; row < matrix.length; row++) {\n for (let col = 0; col < matrix[row].length; col++) {\n if (\n matrix[row][col] &&\n // outside the game bounds\n (cellCol + col < 0 ||\n cellCol + col >= playfield[0].length ||\n cellRow + row >= playfield.length ||\n // collides with another piece\n playfield[cellRow + row][cellCol + col])\n ) {\n return false;\n }\n }\n }\n\n return true;\n}", "function checkWin(n) {\n var hz = west(n) + east(n) + 1;\n var vt = south(n) + 1;\n var dg = northwest(n) + southeast(n) + 1;\n var ad = northeast(n) + southwest(n) + 1;\n\n // Un-comment to see how close the target piece is to causing a win in each direction.\n // document.getElementById(\"hz\").innerHTML = \"horizontal: \" + hz;\n // document.getElementById(\"vt\").innerHTML = \"vertical: \" + vt;\n // document.getElementById(\"dg\").innerHTML = \"diagonal: \" + dg;\n // document.getElementById(\"ad\").innerHTML = \"anti-diagonal: \" + ad;\n\n return (hz >= 4) || (vt >= 4) || (dg >= 4) || (ad >= 4);\n }", "function checkForCheck(someBoard, player){\n\n\tvar tempsq = positionOf(\"K\", someBoard, player);\n\n\tfor (var a = 0; a <= 11; a++){\n\n\t\tfor (var b = 0; b <= 11; b++){\n\n\t\t\tif (someBoard[a][b].player !== 0 && someBoard[a][b].player !== player){\n\n\t\t\t\tvar tempSquares = computeMoves(someBoard[a][b].symbol, a, b, someBoard);\n\t\t\t\t//if(someBoard[a][b].symbol === )\n\t\t\t\tfor(var x = 0; x < tempSquares.length; x++){\n\t\t\t\t\tif (tempSquares[x].row === tempsq.row && tempSquares[x].col === tempsq.col){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t}\n\n\treturn false;\n}", "function canMove(direction) {\n // 37 - left arrow\n // 38 - up arrow\n var a = 1,\n b = 4,\n c = 1;\n // 39 - right arrow\n // 40 - down arrow\n if (direction == 39 || direction == 40) {\n a = 2;\n b = -1;\n c = -1;\n }\n for (var i = 0; i < 4; i++) {\n for (var j = a; j != b; j += c) {\n switch (direction) {\n // when moving left or rigth, we check whether there are either free space\n // or two adjacent tiles with the same number in the same row\n case 37:\n case 39:\n if (all_numbers[i][j]) {\n if (all_numbers[i][j - c] == 0 || all_numbers[i][j] == all_numbers[i][j - c]) {\n return true;\n }\n }\n break;\n case 38:\n case 40:\n // when moving up or down, we check whether there are either free space\n // or two adjacent tiles with the same number in the same column\n if (all_numbers[j][i]) {\n if (all_numbers[j - c][i] == 0 || all_numbers[j][i] == all_numbers[j - c][i]) {\n return true;\n }\n }\n break;\n }\n }\n }\n return false;\n}", "function canMove(piece) {\n\t\tvar id = parseInt(piece.id.substring(1));\n\t\tif (id % 4 == 0) { // right column\n\t\t\treturn id - 1 == empty || id + 4 == empty || id - 4 == empty;\n\t\t} else if (id % 4 == 1) { // left column\n\t\t\treturn id + 1 == empty || id + 4 == empty || id - 4 == empty;\n\t\t} else { // middle columns\n\t\t\treturn id + 1 == empty || id - 1 == empty || id + 4 == empty || id - 4 == empty;\n\t\t}\n\t}", "function isWinning(board, x, y, player) {\n let hori = [];\n let vert = [];\n let left = [];\n let right = [];\n\n // We are able to move from -4 to 4\n for(let i = -4; i < 5; i++) {\n if(x + i >= 0 && y >= 0 && x + i < board.length && y < board.length) {\n vert.push(board[x+i][y]);\n }\n if(x >= 0 && y + i >= 0 && x < board.length && y + i < board.length) {\n hori.push(board[x][y+i]);\n }\n if(x + i >= 0 && y + i >= 0 && x + i < board.length && y + i < board.length) {\n left.push(board[x+i][y+i]);\n }\n if(x + i >= 0 && y - i >= 0 && x + i < board.length && y - i < board.length) {\n right.push(board[x+i][y-i]);\n }\n }\n // Arrays with all of the valid moves from -4 to 4\n console.log(hori);\n console.log(vert);\n console.log(left);\n console.log(right);\n\n return (\n isWin(hori, player) !== -1 ||\n isWin(vert, player) !== -1 ||\n isWin(left, player) !== -1 ||\n isWin(right, player) !== -1\n ) ? player : -1;\n}", "function checkForWin() {\n\tfunction _win(cells) {\n\t\t// Check four cells to see if they're all color of current player\n\t\t// - cells: list of four (y, x) cells\n\t\t// - returns true if all are legal coordinates & all match currPlayer\n\n\t\treturn cells.every(([ y, x ]) => y >= 0 && y < HEIGHT && x >= 0 && x < WIDTH && board[y][x] === currPlayer);\n\t}\n\n\t// TODO: read and understand this code. Add comments to help you.\n\t//for each y coordinate and each x coordinate,\n\t//check to see if the four surrounding coordinates are filled horizontally, vertically, or either direction diagonally.\n\t// if there are four coordinates filled of the same color, return true\n\tfor (let y = 0; y < HEIGHT; y++) {\n\t\tfor (let x = 0; x < WIDTH; x++) {\n\t\t\tlet horiz = [ [ y, x ], [ y, x + 1 ], [ y, x + 2 ], [ y, x + 3 ] ];\n\t\t\tlet vert = [ [ y, x ], [ y + 1, x ], [ y + 2, x ], [ y + 3, x ] ];\n\t\t\tlet diagDR = [ [ y, x ], [ y + 1, x + 1 ], [ y + 2, x + 2 ], [ y + 3, x + 3 ] ];\n\t\t\tlet diagDL = [ [ y, x ], [ y + 1, x - 1 ], [ y + 2, x - 2 ], [ y + 3, x - 3 ] ];\n\n\t\t\tif (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n}", "function checkForWin() {\n\tfunction _win(cells) {\n\t\t// Check four cells to see if they're all color of current player\n\t\t// - cells: list of four (y, x) cells\n\t\t// - returns true if all are legal coordinates & all match currPlayer\n\n\t\treturn cells.every(([ y, x ]) => y >= 0 && y < HEIGHT && x >= 0 && x < WIDTH && board[y][x] === currPlayer);\n\t}\n\n\tfor (let y = 0; y < HEIGHT; y++) {\n\t\tfor (let x = 0; x < WIDTH; x++) {\n\t\t\tlet horiz = [ [ y, x ], [ y, x + 1 ], [ y, x + 2 ], [ y, x + 3 ] ];\n\t\t\tlet vert = [ [ y, x ], [ y + 1, x ], [ y + 2, x ], [ y + 3, x ] ];\n\t\t\tlet diagDR = [ [ y, x ], [ y + 1, x + 1 ], [ y + 2, x + 2 ], [ y + 3, x + 3 ] ];\n\t\t\tlet diagDL = [ [ y, x ], [ y + 1, x - 1 ], [ y + 2, x - 2 ], [ y + 3, x - 3 ] ];\n\n\t\t\tif (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n}", "function isSolvedFn() {\n for (var i = 0; i < board.length - 1; i++) { // i < board.length because last index 15, will have 0 (empty space)\n if (board[i] != i + 1) {\n return false;\n }\n }\n return true;\n }", "function check4InRow(array){\n for (var i=0; i<(array.length-3); i++) {\n if ( array[i].value !== 0 && \n (array[i].value === array[i+1].value) && \n (array[i+1].value === array[i+2].value) && \n (array[i+2].value === array [i+3].value)){\n end = true;\n endGame(array, i);\n return;\n };\n };\n}", "function checkWin() {\n\tlet cb = []; // current board\n\t\t\n\tcb[0] = \"\"; // not going to use\n\tcb[1] = document.getElementById(\"one\").innerHTML;\n\tcb[2] = document.getElementById(\"two\").innerHTML;\n\tcb[3] = document.getElementById(\"three\").innerHTML;\n\tcb[4] = document.getElementById(\"four\").innerHTML;\n\tcb[5] = document.getElementById(\"five\").innerHTML;\n\tcb[6] = document.getElementById(\"six\").innerHTML\n\tcb[7] = document.getElementById(\"seven\").innerHTML;\n\tcb[8] = document.getElementById(\"eight\").innerHTML;\n\tcb[9] = document.getElementById(\"nine\").innerHTML;\n\n\n\t// top row\n\tif (cb[1] != \"\" && cb[1] == cb[2] && cb[2] == cb[3]) {\n\t\treturn true;\n\t} // if\n\t\n\t// middle row\n\tif (cb[4] != \"\" && cb[4] == cb[5] && cb[5] == cb[6]) {\n\t\treturn true;\n\t} // if\n\n\t// bottom row\n\tif (cb[7] != \"\" && cb[7] == cb[8] && cb[8] == cb[9]) {\n\t\treturn true;\n\t} // if\n\t\n\t// colomn one\n\tif (cb[1] != \"\" && cb[1] == cb[4] && cb[4] == cb[7]) {\n\t\treturn true;\n\t} // if\n\t\n\t// colomn two\n\tif (cb[2] != \"\" && cb[2] == cb[5] && cb[5] == cb[8]) {\n\t\treturn true;\n\t} // if\n\t\n\t// colomn three\n\tif (cb[3] != \"\" && cb[3] == cb[6] && cb[6] == cb[9]) {\n\t\treturn true;\n\t} // if\n\t\n\t// top left to bottom right diagonal\n\tif (cb[1] != \"\" && cb[1] == cb[5] && cb[5] == cb[9]) {\n\t\treturn true;\n\t} // if\n\t\n\t// top right to bottom left diagonal\n\tif (cb[3] != \"\" && cb[3] == cb[5] && cb[5] == cb[7]) {\n\t\treturn true;\n\t} // if\n\n} // checkWin()", "function horizontalWin() {\n let winTally = 0;\n // loop through each cell by row, loop through all rows\n for (let y = 5; y >= 0; y--) {\n for (let x = 0; x <= 6; x++) {\n if (checkSpaceOccupant(y, x)) {\n winTally++;\n if (winTally >= 4) { return true };\n } else {\n // reset tally as occupied spaces aren't consecutive\n winTally = 0;\n }\n }\n // set tally back to zero before looping through the next row\n winTally = 0;\n }\n // return false if no winner is found\n return false;\n }", "function checkForTie(){\n let chk1 = false;\n let chk2 = false;\n let chk3 = false;\n let tie = false;\n if(gameState.board[0] != \"\" && gameState.board[1] != \"\" &&gameState.board[2] != \"\")\n {\n chk1 = true;\n }\n if(gameState.board[3] != \"\" && gameState.board[4] != \"\" &&gameState.board[5] != \"\")\n {\n chk2 = true;\n }\n if(gameState.board[6] != \"\" && gameState.board[7] != \"\" &&gameState.board[8] != \"\")\n {\n chk3 = true;\n }\n\n if(chk1 == true && chk2==true && chk3==true) {\n tie = true;\n return tie;\n }\n return false;\n}", "function canMove(row, col) {\n if (!hasOppositeChecker(row, col, currentColor)) {\n if (isAKing(occupiedArray[row][col].id)) {\n if (!cellIsVacant(row + 1, col + 1) && !cellIsVacant(row + 1, col - 1) && !cellIsVacant(row - 1, col + 1) && !cellIsVacant(row - 1, col - 1)) {\n return false;\n }\n }\n else if (occupiedArray[row][col].classList.contains(\"black\")) {\n if (!cellIsVacant(row + 1, col - 1) && !cellIsVacant(row + 1, col + 1)) {\n return false;\n }\n }\n else if (occupiedArray[row][col].classList.contains(\"red\")) {\n if (!cellIsVacant(row - 1, col - 1) && !cellIsVacant(row - 1, col + 1)) {\n return false;\n }\n }\n return true;\n }\n}", "function checkWin(){\n if ((board.top.col1===board.top.col2 && board.top.col3===\"X\") || (board.top.col1===board.top.col2 && board.top.col3===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n if ((board.middle.col1===board.middle.col2 && board.middle.col3===\"X\") || (board.middle.col1===board.middle.col2 && board.middle.col3===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n if ((board.bottom.col1===board.bottom.col2 && board.bottom.col3===\"X\") || (board.bottom.col1===board.bottom.col2 && board.bottom.col3===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n if ((board.top.col1===board.middle.col2 && board.bottom.col3===\"X\") || (board.top.col1===board.middle.col2 && board.bottom.col3===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n if ((board.top.col3===board.middle.col2 && board.bottom.col1===\"X\") || (board.top.col3===board.middle.col2 && board.bottom.col1===\"O\")){\n running = false;\n console.log(\"Someone won!\");\n };\n}", "function checkWin(row, col) {\n // Get all the cells from each possible direction.\n let horiz = [],\n vert = [],\n diagL = [],\n diagR = [];\n for (i = 0; i < GRID_ROWS; i++) {\n for (let j = 0; j < GRID_COLS; j++) {\n // Horizontal\n if (i === row) {\n horiz.push(grid[i][j]);\n }\n\n // Vertical\n if (j === col) {\n vert.push(grid[i][j]);\n }\n\n // Diagonal, top-left to bottom-right\n if (i - j === row - col) {\n diagL.push(grid[i][j]);\n }\n\n // Diagonal, top-right to bottom-left\n if (i + j === row + col) {\n diagR.push(grid[i][j]);\n }\n }\n }\n\n // If any direction has four identical tokens in a row, the game has been won.\n return (\n connectFour(horiz) ||\n connectFour(vert) ||\n connectFour(diagL) ||\n connectFour(diagR)\n );\n}", "function checkWin() {\n for (let i = 0; i < winningCombinations.length; i++) {\n let pattern = winningCombinations[i];\n let [a, b, c] = pattern;\n if ( currentCells[a] === currentCells[b] && currentCells[b] === currentCells[c] ) {\n return true;\n }\n }\n return false;\n}", "function checkResult(boardByColumns){\n checkColumns(boardByColumns);\n checkRows(boardByColumns);\n checkDiagonals(boardByColumns);\n checkDraw();\n endGame();\n}", "function isRowOk(grid, row, num) {\n for (var col = 0; col < 9; col++) {\n if (grid[row][col] === num) {\n return false;\n }\n }\n return true;\n }", "function checkSolved() {\n var orientation;\n for (i = 0; i < 3; i++) {\n for (j = 0; j < 3; j++) {\n orientation = cubeState[0][0][0][3];\n for (x = -1; x < 2; x++) {\n for (y = -1; y < 2; y++) {\n for (z = -1; z < 2; z++) {\n if (cubeState[x+1][y+1][z+1][3][i][j] !== orientation[i][j]) {\n if (x === 0 && z === 0) {\n if (cubeState[x+1][y+1][z+1][3][1][j] !== orientation[1][j])\n return false;\n } else if (x === 0 && y === 0) {\n if (cubeState[x+1][y+1][z+1][3][2][j] !== orientation[2][j])\n return false;\n } else if (y === 0 && z === 0) {\n if (cubeState[x+1][y+1][z+1][3][0][j] !== orientation[0][j])\n return false;\n } else\n return false;\n }\n }\n }\n }\n }\n }\n return true; // Only reached if all match\n}", "function horizontalWin(firstRow, secondRow, thirdRow) {\n if(firstRow == winX || firstRow == winO) {\n return true;\n }\n if(secondRow == winX || secondRow == winO){\n return true;\n }\n if(thirdRow == winX || thirdRow == winO){\n return true;\n }\n}", "function checkWin(){\n //Across horizontals\n for(i=0; i<3; i++){\n if(check3Checked(board[`${rowCode[i]}${colCode[0]}`],board[`${rowCode[i]}${colCode[1]}`],board[`${rowCode[i]}${colCode[2]}`]) === true){\n win = true;\n //Checks first column of row to see who won. X = player, O = computer\n if(board[`${rowCode[i]}${colCode[0]}`] === 'X'){\n console.log('Player has won!');\n } else if(board[`${rowCode[i]}${colCode[0]}`] === 'O'){\n console.log('Computer has won!');\n } \n }\n }\n //Across verticals\n for(i=0; i<3; i++){\n if(check3Checked(board[`${rowCode[0]}${colCode[i]}`],board[`${rowCode[1]}${colCode[i]}`],board[`${rowCode[2]}${colCode[i]}`]) === true){\n win = true;\n //Checks first row of column to see who won. X = player, O = computer\n if(board[`${rowCode[0]}${colCode[i]}`] === 'X'){\n console.log('Player has won!');\n } else if(board[`${rowCode[i]}${colCode[i]}`] === 'O'){\n console.log('Computer has won!');\n } \n }\n }\n //Across diagonals\n if (check3Checked(board[`${rowCode[0]}${colCode[0]}`],board[`${rowCode[1]}${colCode[1]}`],board[`${rowCode[2]}${colCode[2]}`]) === true){\n win = true;\n if(board[`${rowCode[0]}${colCode[0]}`] === 'X'){\n console.log('Player has won!');\n } else if(board[`${rowCode[0]}${colCode[0]}`] === 'O'){\n console.log('Computer has won!');\n }\n }\n if (check3Checked(board[`${rowCode[0]}${colCode[2]}`],board[`${rowCode[1]}${colCode[1]}`],board[`${rowCode[2]}${colCode[0]}`]) === true){\n win = true;\n if(board[`${rowCode[0]}${colCode[2]}`] === 'X'){\n console.log('Player has won!');\n } else if(board[`${rowCode[0]}${colCode[2]}`] === 'O'){\n console.log('Computer has won!');\n }\n }\n\n //Tie: No win despite all avaiableMoves ===0 (all possible moves exhausted)\n if (availableMoves.length === 0 && win === false){\n console.log(\"Tie!\")\n }\n }", "function checkForWin() {\n // define a win\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n // if the y and x coordinates are vaild playable coordinates within the grid return true else return false\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // TODO: read and understand this code. Add comments to help you.\n // determining a win with four of the same pieces vertically, horizonally, diagDR, diagDL\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function isMovesLeft(board) {\r\n for (var i = 0; i < 3; ++i) {\r\n for (var j = 0; j < 3; ++j) {\r\n if (board[i][j] == -1)\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // TODO: read and understand this code. Add comments to help you.\n\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function checkWin() {\n checkWinCount += 1;\n\n if (Math.abs(gameBoard[0] + gameBoard[1] + gameBoard[2]) === 3){\n winner(); \n } else if (Math.abs(gameBoard[3] + gameBoard[4] + gameBoard[5]) === 3){\n winner(); \n } else if(Math.abs(gameBoard[6] + gameBoard[7] + gameBoard[8]) === 3){\n winner(); \n } else if(Math.abs(gameBoard[0] + gameBoard[3] + gameBoard[6]) === 3){\n winner();\n } else if(Math.abs(gameBoard[1] + gameBoard[4] + gameBoard[7]) === 3){\n winner();\n } else if(Math.abs(gameBoard[2] + gameBoard[5] + gameBoard[8]) === 3){\n winner(); \n } else if(Math.abs(gameBoard[0] + gameBoard[4] + gameBoard[8]) === 3){\n winner();\n } else if(Math.abs(gameBoard[2] + gameBoard[4] + gameBoard[6]) === 3){\n winner();\n } else if (checkWinCount === 9){\n drawMatch();\n }\n}", "function isValidMove(matrix, cellRow, cellCol) {\r\n let isValid = true;\r\n for(let row = 0; row < matrix.length; row++) {\r\n for(let col = 0; col < matrix[row].length; col++) {\r\n\r\n if(matrix[row][col] && (\r\n // Outside the Game Bounds\r\n cellCol + col < 0 ||\r\n cellCol + col >= thisField[0].length ||\r\n cellRow + row >= thisField.length ||\r\n // Conflicts with another block\r\n thisField[cellRow + row][cellCol + col])) \r\n { isValid = false; }\r\n }\r\n }\r\n return isValid;\r\n}", "function checkWin() {\n var squares = [];\n for (var i = 1; i <= 9; i++) {\n var classname = 'clicked' + symbol;\n squares[i] = $(document.getElementById(i)).hasClass(classname);\n }\n // top row\n var r1 = squares[1] && squares[2] && squares[3];\n // middle row\n var r2 = squares[4] && squares[5] && squares[6];\n // bottom row\n var r3 = squares[7] && squares[8] && squares[9];\n // left column\n var c1 = squares[1] && squares[4] && squares[7];\n // middle column\n var c2 = squares[2] && squares[5] && squares[8];\n // right column\n var c3 = squares[3] && squares[6] && squares[9];\n // left to right diagonal\n var d1 = squares[1] && squares[5] && squares[9];\n // right to left diagonal\n var d2 = squares[3] && squares[5] && squares[7];\n // are all the squares filled in\n var numClicked = $('.clicked').length;\n\n if (r1 || r2 || r3 || c1 || c2 || c3 || d1 || d2) {\n finishGame(symbol);\n } else {\n if (numClicked == 9)\n finishGame('TIE');\n }\n }", "function winnerCheck(columns) {\n // horizontal check\n for (let i = 0; i < HEIGHT; i++) {\n for (let j = 0; j < WIDTH - LIMIT; j++) {\n if (columns[j][i] && columns[j][i] === columns[j + 1][i] &&\n columns[j][i] === columns[j + 2][i] && columns[j][i] === columns[j + 3][i]) {\n return columns[j][i];\n }\n }\n }\n\n // vertical check\n for (let i = 0; i < HEIGHT - LIMIT; i++) {\n for (let j = 0; j < WIDTH; j++) {\n if (columns[j][i] && columns[j][i] === columns[j][i + 1] &&\n columns[j][i] === columns[j][i + 2] && columns[j][i] === columns[j][i + 3]) {\n return columns[j][i];\n }\n }\n }\n\n // top-right diagonal check\n for (let i = 0; i < HEIGHT - LIMIT; i++) {\n for (let j = 0; j < WIDTH - LIMIT; j++) {\n if (columns[j][i] && columns[j][i] === columns[j + 1][i + 1] &&\n columns[j][i] === columns[j + 2][i + 2] && columns[j][i] === columns[j + 3][i + 3]) {\n return columns[j][i];\n }\n }\n }\n\n // bottom-right diagonal check\n for (let i = LIMIT; i < HEIGHT; i++) {\n for (let j = 0; j < WIDTH - LIMIT; j++) {\n if (columns[j][i] && columns[j][i] === columns[j + 1][i - 1] &&\n columns[j][i] === columns[j + 2][i - 2] && columns[j][i] === columns[j + 3][i - 3]) {\n return columns[j][i];\n }\n }\n }\n\n // no winner\n return false;\n}", "function check3OAK() {\n for (let i = 1; i <= 6; i++) {\n if (getNOccurences(3, i)) return true;\n }\n return false;\n}", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // TODO: read and understand this code. Add comments to help you.\n\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // TODO: read and understand this code. Add comments to help you.\n\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "checkForWin() {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n const _win = cells =>\n cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.height &&\n x >= 0 &&\n x < this.width &&\n this.board[y][x] === this.currPlayer\n );\n\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; x < this.width; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }" ]
[ "0.7784433", "0.7537197", "0.74251866", "0.74220955", "0.7318096", "0.7291771", "0.7284944", "0.72652704", "0.7221565", "0.71908194", "0.7190789", "0.71839005", "0.71588254", "0.7136651", "0.70757294", "0.7030792", "0.6985195", "0.69706374", "0.69657284", "0.69411016", "0.691099", "0.6904716", "0.69022316", "0.6848337", "0.683336", "0.68285364", "0.6814685", "0.6780664", "0.6767251", "0.6736191", "0.6731795", "0.6718964", "0.6707039", "0.669989", "0.6665302", "0.6658843", "0.6630162", "0.66176534", "0.6609053", "0.66038316", "0.66003567", "0.65983665", "0.6597315", "0.6582197", "0.6571431", "0.6563345", "0.65571487", "0.65460664", "0.6542807", "0.6537156", "0.6533774", "0.65188", "0.65132123", "0.65056366", "0.6497515", "0.6497498", "0.64877826", "0.64777035", "0.64729786", "0.64711666", "0.6466535", "0.6463059", "0.6453636", "0.6445499", "0.64267224", "0.6422236", "0.64146274", "0.6408508", "0.6408031", "0.6407716", "0.64068496", "0.64049065", "0.63975316", "0.6393858", "0.63838595", "0.63832664", "0.638323", "0.6381245", "0.63784343", "0.6373745", "0.6371863", "0.63717437", "0.63709253", "0.63653874", "0.6365024", "0.6361949", "0.6358368", "0.635591", "0.63533723", "0.6352667", "0.635139", "0.6344447", "0.63441855", "0.6343545", "0.63327354", "0.63296324", "0.63291615", "0.63282365", "0.63282365", "0.63271916" ]
0.75067693
2
Determines if the row is one of the winning combinations
function checkForWinner(move) { var result = false; if (checkRow(1, 2, 3, move) || checkRow(4, 5, 6, move) || checkRow(7, 8, 9, move) || checkRow(1, 4, 7, move) || checkRow(2, 5, 8, move) || checkRow(3, 6, 9, move) || checkRow(1, 5, 9, move) || checkRow(3, 5, 7, move)) { result = true; }; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkWin() {\n for (let i = 0; i < winningCombinations.length; i++) {\n let pattern = winningCombinations[i];\n let [a, b, c] = pattern;\n if ( currentCells[a] === currentCells[b] && currentCells[b] === currentCells[c] ) {\n return true;\n }\n }\n return false;\n}", "function checkWin() {\n return Winning_combinations.some(combination => {\n return combination.every( index => {\n if (move % 2 !== 0) {\n return cells[index].classList.contains('x');\n }\n else {\n return cells[index].classList.contains('o');\n }\n })\n })\n}", "function checkWin() {\n const combinations = [\n [0,1,2], [3,4,5], [6,7,8], \n [0,3,6], [1,4,7], [2,5,8], \n [0,4,8], [2,4,6],\n ];\n\n let check = false;\n combinations.forEach((items) => {\n const value0 = board[items[0]]; \n const value1 = board[items[1]]; \n const value2 = board[items[2]]; \n check |= value0 != \"\" && value0 == value1 && value1 == value2;\n });\n\n return check;\n}", "function checkRowWin(game) {\n for(count = 0; count < boardRows; count++) {\n rowArr = game[count];\n console.log(rowArr);\n if(rowArr.every(allEqual)) {\n console.log('row win');\n return;\n }\n }\n}", "function checkIfWin(currentPlayer){\r\n return winningCombinations.some(function(combination) {\r\n return combination.every(function(index) {\r\n return currentStateOfTheBoard[index] == currentPlayer;\r\n });\r\n });\r\n}", "function checkWinner(turn) {\nvar result = false;\nif (checkRow(1, 2, 3, turn) ||\n checkRow(4, 5, 6, turn) ||\n checkRow(7, 8, 9, turn) ||\n checkRow(1, 4, 7, turn) ||\n checkRow(2, 5, 8, turn) ||\n checkRow(3, 6, 9, turn) ||\n checkRow(3, 5, 7, turn) ||\n checkRow(1, 5, 9, turn)) {\n\n result = true;\n }\n return result;\n}", "function checkRow()\n\t{\n\t\tvar plr = getPlayer();\n\t\tfor (i = 0; i < 3; i++)\n\t\t{\n\t\t\tvar inARow = 0;\n\t\t\tfor(j = 0; j < 3; j++)\n\t\t\t{\n\t\t\t\tif(grid[j][i] == plr)\n\t\t\t\t{\n\t\t\t\t\tinARow++;\n\t\t\t\t\tif (inARow == 3)\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function checkWin(board, player)\r\n{\r\n for (let i = 0; i < winCombos.length; i++) // goes through all win comditions\r\n {\r\n // see if the current board has a win condition\r\n if(board[winCombos[i][0]] === player && board[winCombos[i][1]] === player && board[winCombos[i][2]] === player) \r\n {\r\n return [true, winCombos[i]]; // Returns true, but ALSO HOW they won. Gives the winning combination\r\n }\r\n }\r\n return false; // return false\r\n}", "function checkWin(row, col) {\n // Get all the cells from each possible direction.\n let horiz = [],\n vert = [],\n diagL = [],\n diagR = [];\n for (i = 0; i < GRID_ROWS; i++) {\n for (let j = 0; j < GRID_COLS; j++) {\n // Horizontal\n if (i === row) {\n horiz.push(grid[i][j]);\n }\n\n // Vertical\n if (j === col) {\n vert.push(grid[i][j]);\n }\n\n // Diagonal, top-left to bottom-right\n if (i - j === row - col) {\n diagL.push(grid[i][j]);\n }\n\n // Diagonal, top-right to bottom-left\n if (i + j === row + col) {\n diagR.push(grid[i][j]);\n }\n }\n }\n\n // If any direction has four identical tokens in a row, the game has been won.\n return (\n connectFour(horiz) ||\n connectFour(vert) ||\n connectFour(diagL) ||\n connectFour(diagR)\n );\n}", "function checkWin(player, board) {\n let playerOccupied = board.reduce((a, e, i) => (e==player) ? a.concat(i) : a, []);\n // true or false\n return WINNING_COMBINATIONS.some(combination => {\n return combination.every(index => {\n return playerOccupied.includes(index);\n });\n });\n}", "function checkWin(row, col) {\n //get all the cells from each direction\n let diagL = [], diagR = [], horiz = [], vert = [];\n for (let i = 0; i < GRID_ROWS; i++) {\n for (let j = 0; j < GRID_COLS; j++) {\n //horizontal cells\n if (i == row) {\n horiz.push(grid[i][j]);\n }\n\n //vertical cells\n if (j == col) {\n vert.push(grid[i][j]);\n }\n\n //top left to bottom right\n if (i - j == row - col) {\n diagL.push(grid[i][j]);\n }\n\n //top right to bottom left\n if (i + j == row + col) {\n diagR.push(grid[i][j]);\n }\n }\n }\n\n //if any have four in a row, return a win\n return connect4(diagL) || connect4(diagR) || connect4(horiz) || connect4(vert);\n}", "function checkWiner(board){\n //check first row\n if(board[0][0] != '' && board[0][0] == board[0][1] && board[0][0] == board[0][2]){\n return true;\n //second row\n }else if(board[1][0] != '' && board[1][0] == board[1][1] && board[1][0] == board[1][2]){\n return true;\n //third row\n }else if(board[2][0] != '' && board[2][0] == board[2][1] && board[2][0] == board[2][2]){\n return true;\n //first column\n }else if(board[0][0] != '' && board[0][0] == board[1][0] && board[0][0] == board[2][0]){\n return true;\n //second column\n }else if(board[0][1] != '' && board[0][1] == board[1][1] && board[0][1] == board[2][1]){\n return true;\n //third column\n }else if(board[0][2] != '' && board[0][2] == board[1][2] && board[0][2] == board[2][2]){\n return true;\n //diagnal \n }else if(board[0][0] != '' && board[0][0] == board[1][1] && board[0][0] == board[2][2]){\n return true;\n //opposite diagnal\n }else if(board[0][2] != '' && board[0][2] == board[1][1] && board[0][2] == board[2][0]){\n return true;\n }\n}", "function rowCheck(row)\n{ \n let st = new Set();\n for(let i=0; i<9; i++)\n { \n if(st.has(grid[row][i]))\n return false;\n \n if(grid[row][i] != -1)\n st.add(grid[row][i]);\n }\n return true;\n}", "function isContaineWinCombination(arr, val) {\n let counter = 0;\n let firstCell;\n let lastCell;\n for (let i = 0; i < arr.length; i++) {\n if ( counter === 0) {\n firstCell = arr[i]\n }\n\n if (arr[i].val === val) {\n counter++;\n if (counter === count) {\n lastCell = arr[i];\n printLine(\n countCoordinate(firstCell.j),\n countCoordinate(firstCell.i),\n countCoordinate(lastCell.j),\n countCoordinate(lastCell.i));\n return true\n }\n } else {\n counter = 0;\n }\n }\n return false ;\n}", "function checkWinner() {\n var board = {};\n var winner = false;\n const winningCombinations = [[0,1,2], [3,4,5], [6,7,8], [0,3,6],\n [1,4,7], [2,5,8], [0,4,8], [2,4,6]];\n $('td').text((index, stringToken) => board[index] = stringToken);\n\n winningCombinations.some(function(combo) {\n if(board[combo[0]] !== \"\" && board[combo[0]] === board[combo[1]] && board[combo[1]] === board[combo[2]]){\n setMessage(`Player ${board[combo[0]]} Won!`);\n return winner = true;\n }\n });\n\n return winner;\n}", "function checkWin(board, player) {\n // Get every cell the player has currently selected\n let plays = board.reduce(\n (acc, nxt, idx) => (nxt === player ? acc.concat(idx) : acc),\n []\n );\n // loop through every single winning pattern to check if a winning pattern has been played\n let gameWon = null;\n for (let [index, win] of winCombos.entries()) {\n // check if this winning pattern has been played by the player\n if (win.every(elem => plays.indexOf(elem) > -1)) {\n gameWon = { index: index, player: player };\n break;\n }\n }\n return gameWon;\n}", "function check(arr) { // check if the input array has any one of the combinations\r\n let flag = false; // in the win_combination array\r\n win_combination.forEach(x => {\r\n let count2 = 0;\r\n x.forEach(y => {\r\n if (arr.includes(y)) {count2 += 1};\r\n })\r\n if (count2 === 3) {flag = true;};\r\n })\r\n return flag;\r\n}", "function checkWin(array){\n for (let i = 0; i < 10; i++){\n for (let j = 0; j < 10; j++){\n if (array[i][j] === 2) return false;\n }\n\n }\n return true;\n}", "function checkWiningRowMove(p) {\n //0,1,2 3,4,5 6,7,8\n var ret = false;\n var r1 = _matrix[0][0] + _matrix[0][1] + _matrix[0][2];\n var r2 = _matrix[1][0] + _matrix[1][1] + _matrix[1][2];\n var r3 = _matrix[2][0] + _matrix[2][1] + _matrix[2][2];\n\n if (r1 === p.repeat(3) || r2 === p.repeat(3) || r3 === p.repeat(3) ) ret = true;\n\n return ret;\n }", "hasWinningCombo()\n {\n const winningCombos = [ [0,1,2], [3,4,5], [6,7,8], [0,3,6], [1,4,7], [2,5,8], [0,4,8], [2,4,6]];\n\n for(var i = 0; i < winningCombos.length; i++)\n {\n for(var j = 0; j < winningCombos[i].length; j++){\n var currentComboIndex = winningCombos[i][j];\n if(this.state.board[currentComboIndex] !== this\n .state.currentTurn)\n {\n break;\n }\n if(j >= winningCombos[i].length-1){\n return true;\n } \n } \n }\n return false;\n }", "function checkWin(board, player) {\n\n //get the combinations on the board \n //all the places the player played on the board\n let plays = board.reduce((a, e, i) =>\n (e === player) ? a.concat(i) : a , []);\n \n let gameWon = null;\n //loop through winning combinations\n for (let[index, win] of winCombos.entries())\n {\n if (win.every(elem => plays.indexOf(elem) > -1)) \n {\n gameWon = {index: index, player: player};\n break;\n }\n }\n return gameWon;\n\n}", "function _isCellSameAsSelectedCell(row, column) {\n if (fastMode) {\n if (numberSelected === gameArray[row * 9 + column]) {\n return true\n }\n return false\n } else {\n if (cellSelected === row * 9 + column) {\n return true\n }\n if (gameArray[cellSelected] === '0') {\n return false\n }\n if (gameArray[cellSelected] === gameArray[row * 9 + column]) {\n return true\n }\n }\n }", "function winnerCheck(move) {\r\n var flag = false;\r\n if (checkRow(1, 2, 3, move) ||\r\n checkRow(4, 5, 6, move) ||\r\n checkRow(7, 8, 9, move) ||\r\n checkRow(1, 4, 7, move) ||\r\n checkRow(2, 5, 8, move) ||\r\n checkRow(3, 6, 9, move) ||\r\n checkRow(1, 5, 9, move) ||\r\n checkRow(3, 5, 7, move)) {\r\n flag = true;\r\n }\r\n return flag;\r\n}", "function checkWin(board, player){\r\n if (\r\n // top row win\r\n board[0][0] === board[0][1] && board[0][1] === board[0][2] && board[0][2] === player ||\r\n // middle row win\r\n board[1][0] === board[1][1] && board[1][1] === board[1][2] && board[1][2] === player ||\r\n // bottom row win\r\n board[2][0] === board[2][1] && board[2][1] === board[2][2] && board[2][2] === player ||\r\n // left column win\r\n board[0][0] === board[1][0] && board[1][0] === board[2][0] && board[2][0] === player ||\r\n // middle column win\r\n board[0][1] === board[1][1] && board[1][1] === board[2][1] && board[2][1] === player ||\r\n // right column win\r\n board[0][2] === board[1][2] && board[1][2] === board[2][2] && board[2][2] === player ||\r\n // diagonal top left to bottom right win\r\n board[0][0] === board[1][1] && board[1][1] === board[2][2] && board[2][2] === player ||\r\n // diagonal top right to bottom left win\r\n board[0][2] === board[1][1] && board[1][1] === board[2][0] && board[2][0] === player\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n}", "checkWinner() {\n // Check rows\n let win = false;\n\n const checkEqual = arr => arr.every(v => (v === arr[0] && v !== ''));\n console.log(\"CHECK WINNER.\");\n const board = this.state.board;\n for (let i = 0; i < this.width; i++) {\n\n for (let j = 0; j < this.height; j++) {\n\n // Check row win\n if (j <= this.height - 4) {\n //console.log(\"LINE:\" + [board[i][j+1],board[i][j+2],board[i][j+3],board[i][j]]);\n win = checkEqual([board[i][j + 1], board[i][j + 2], board[i][j + 3], board[i][j]]) ? board[i][j] : false;\n if (win !== false) break;\n }\n\n // Check line & diagonal win \n if (i <= this.width - 4) {\n //console.log(\"ROW:\" + [board[i+1][j],board[i+2][j],board[i+3][j],board[i][j]]);\n win = checkEqual([board[i + 1][j], board[i + 2][j], board[i + 3][j], board[i][j]]) ? board[i][j] : false;\n if (win !== false) break;\n\n // Check diagonal line\n if (j <= this.height - 4) {\n win = checkEqual([board[i + 1][j + 1], board[i + 2][j + 2], board[i + 3][j + 3], board[i][j]]) ? board[i][j] : false;\n //console.log(\"MAYBE WIN? \" + [board[i][j],board[i+1][j+1],board[i+2][j+2],board[i+3][j+3]] + \"LINE: \" + i + \",ROW: \" + j);\n if (win !== false) break;\n }\n }\n\n if (i <= this.width - 4 && j >= 3) {\n win = checkEqual([board[i][j], board[i + 1][j - 1], board[i + 2][j - 2], board[i + 3][j - 3]]) ? board[i][j] : false;\n //console.log(\"MAYBE WIN? \" + [board[i + 3][j - 3], board[i + 2][j - 2], board[i + 1][j - 1], board[i][j]] + \"LINE: \" + i + \",ROW: \" + j);\n if (win !== false) break;\n }\n\n\n }\n\n // Break out from second for loop\n if (win !== false) {\n break;\n }\n }\n\n if (win !== false) return win;\n return false;\n }", "function horizontalWin() {\n\n //for loop to check each row\n for(let i=0; i<=2; i++){\n let row = board[i];\n\n //if win in a row returns true\n if(row[0] == row[1] && row[1] == row[2] && row[0] != ' '){\n return true;\n }\n\n }\n\n}", "isGameOver(){\n let board=this.state.board;\n\n let win=[\n //rows\n [0, 1, 2], [3, 4, 5], [6, 7, 8],\n \n //columns\n [0, 3, 6], [1, 4, 7], [2, 5, 8],\n\n //diagonals\n [0, 4, 8], [2, 4, 6]\n ]\n \n for(let i=0;i<win.length;i++){\n let cell1=board[win[i][0]];\n let cell2=board[win[i][1]];\n let cell3=board[win[i][2]];\n\n if(cell1!==\"#\" && cell1===cell2 && cell2===cell3){\n return cell1;\n }\n }\n\n return -1;\n }", "function checkRows (grid, row) {\r\n //console.log(\"checking rows\");\r\n var result = true;\r\n var fact = 1;\r\n for (var i = 0; i < grid.length; i++) {\r\n //multiply each cell\r\n fact = fact * grid[row][i];\r\n\r\n }\r\n //console.log(fact);\r\n if (fact != 362880) //since the grid is 9x9, if each cell has unique number, multiply each number will be 362880\r\n result = false;\r\n\r\n return result;\r\n}", "function checktie(){\r\n const allEqual = arr => arr.every(val => val !== 0);\r\n //Check for tie condition\r\n if (allEqual(boardState.map((_, columnIndex) => boardState.map(row => row[columnIndex]))[0].slice(0, 7))) {\r\n return true;\r\n }\r\n return false;\r\n}", "function winCheck() {\n\n // Traverses the entire grid and checks for any discrepancy between the current grid and the answer grid, if there is then the player has not won yet\n for (var row = 0; row < 9; row++) {\n for (var col = 0; col < 9; col++) {\n if (grid[row][col].textContent != answerGrid[row][col]) {\n return false;\n }\n }\n }\n return true;\n}", "function checkWin(board, win){\n const first = board[win[0]];\n\n if(!first){\n return false;\n }\n for(let i = 1; i < win.length; i++){\n if(first !== board[win[i]]){\n return false;\n }\n }\n return true;\n}", "function checkWin(currentPlayer) {\n return winCombos.some((combination) => {\n return combination.every((index) => {\n return SQUARES[index].classList.contains(currentPlayer.getSign());\n });\n });\n }", "winner(board, player){\n const wins = [[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[2,4,6],[0,4,8]];\n\n for(let i = 0; i < wins.length; i++){\n let win = wins[i];\n if(board[win[0]] === player && board[win[1]] === player && board[win[2]] === player) \n \n {\n return true;\n }\n \n }\n}", "function checkForWinner(move) { // move basically checks the infomration that your giving ie X or O.\n var result = false; //default value\n if (checkRow(1, 2, 3, move) ||\n (checkRow(4, 5, 6, move)) ||\n (checkRow(7, 8, 9, move)) ||\n (checkRow(1, 4, 7, move)) ||\n (checkRow(2, 5, 8, move)) ||\n (checkRow(3, 6, 9, move)) ||\n (checkRow(1, 5, 9, move)) ||\n (checkRow(3, 5, 7, move))) {\n result = true;\n}\nconsole.log(result);\nreturn result;\n}", "function isRowOk(grid, row, num) {\n for (var col = 0; col < 9; col++) {\n if (grid[row][col] === num) {\n return false;\n }\n }\n return true;\n }", "checkWin(player) {\n for (let i = 0; i < 3; i++) {\n //check horizontal wins\n if (player._letter === this._board[i][0] &&\n player._letter === this._board[i][1] &&\n player._letter === this._board[i][2]) {\n return true;\n }\n //check vertical wins\n if (player._letter === this._board[0][i] &&\n player._letter === this._board[1][i] &&\n player._letter === this._board[2][i]) {\n return true;\n }\n }\n\n //check wins on the diagonals\n if (player._letter === this._board[0][0] &&\n player._letter === this._board[1][1] &&\n player._letter === this._board[2][2]) {\n return true;\n }\n\n if (player._letter === this._board[0][2] &&\n player._letter === this._board[1][1] &&\n player._letter === this._board[2][0]) {\n return true;\n }\n\n //Check for a tie\n if (this._board.toString().length === 17) {\n return 'tie';\n }\n }", "function boardHasWinnerInRow(board, player, row) {\n let symbol = player.symbol;\n\n // board[2][0] === 'X' (ok, look at next one)\n // board[2][1] === ' ' (ok, X didn't win this round)\n // board[2][2]\n for (let j = 0; j < 3; j += 1) {\n if (board[row][j] !== symbol) {\n return false;\n }\n }\n\n return true;\n}", "function checkForWin () {\n function _win (cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every (\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n //DONE TODO: read and understand this code. Add comments to help you.\n //row = top -> ID -> tr -> #column-top -> height -> y\n //loops thru each row element\n for (let y = 0; y < HEIGHT; y++) {\n //cell = headCell -> id -> td -> width -> x\n //loops thru each cell element\n for (let x = 0; x < WIDTH; x++) {\n // Random thought: The arrays below kind of remind me of a cartesian grid layout\n //horizontal array increments by one as it goes down each row\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n //vertical array increments by one as it goes down each column\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n // diagonal right array increments by 1 as\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n //diagonal left array\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n //checks for win in multiple scenarios; either horizontal or vertical or diagonal right or diagonal left\n if (_win (horiz) || _win (vert) || _win (diagDR) || _win (diagDL)) {\n // if any of the logical operators || return true\n return true;\n }\n }\n }\n}", "checkWinner(move) \n {\n let result = false;\n if (this.checkRow(1, 2, 3, move) || \n this.checkRow(4, 5, 6, move) ||\n this.checkRow(7, 8, 9, move) ||\n this.checkRow(1, 4, 7, move) ||\n this.checkRow(2, 5, 8, move) ||\n this.checkRow(3, 6, 9, move) ||\n this.checkRow(1, 5, 9, move) ||\n this.checkRow(3, 5, 7, move)) \n {\n result = true;\n }\n\n return result;\n }", "function rowToCounter(row) {\n // player uses \"1\"\n var oneCount = 0;\n // checking that row is NOT full yet\n if (row.indexOf(null) == -1) {\n return false;\n }\n for (var i = 0; i < row.length; i++) {\n if (row[i] == 1) {\n oneCount++;\n }\n }\n if (oneCount >= 2) {\n return true;\n }\n }", "function checkWinner(currPlayerSelections) {\n \n for(var i=0; i<winningCombinations.length; i++) {\n var matches = 0;\n for(var j=0; j<winningCombinations[i].length; j++) { \n if(currPlayerSelections.includes(winningCombinations[i][j])) {\n matches++;\n } else {\n break;\n }\n }\n if(matches === winningCombinations[i].length) {\n return true;\n }\n }\n return false;\n}", "function checkIfSomebodyWins(matrix)\n{\n for (let i = 0; i < matrix.length; i++) {\n if(matrix[i][0]===matrix[i][1]&&matrix[i][2]===matrix[i][0])\n {\n if(matrix[i][0]==='X')\n return 'X';\n else if(matrix[i][0]==='O')\n return 'O';\n }\n } \n for (let i = 0; i < matrix.length; i++) {\n if(matrix[0][i]===matrix[1][i]&&matrix[2][i]===matrix[0][i])\n {\n if(matrix[0][i]==='X')\n return 'X';\n else if(matrix[0][i]==='O')\n return 'O';\n }\n } \n\n //console.log(matrix[0][0]);\n //console.log(typeof(matrix[0][0]));\n if(matrix[0][0]===matrix[1][1]&&matrix[0][0]===matrix[2][2])\n {\n if(matrix[0][0]==='O')\n return 'O';\n else if(matrix[0][0]==='O')\n return 'X'\n }\n \n if(matrix[0][2]===matrix[1][1]&&matrix[2][0]===matrix[0][2])\n {\n if(matrix[0][2]==='X')\n return 'X';\n else if(matrix[0][2]==='O')\n return 'O'\n }\n return false;\n}", "function checkWin(board, player) {\n let plays = board.reduce((a, e, i) =>\n (e === player) ? a.concat(i) : a, []);\n let gameWon = null;\n for (let [index, win] of winCombos.entries()) {\n if (win.every(elem => plays.indexOf(elem) > -1)) {\n gameWon = {index: index, player: player}; \n break;\n }\n }\n //if the loops show a win then \n return gameWon;\n}", "checkForWin() {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n const _win = cells =>\n cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.height &&\n x >= 0 &&\n x < this.width &&\n this.board[y][x] === this.currPlayer\n );\n\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; x < this.width; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "isWinner(player) {\n return TTTGame.POSSIBLE_WINNING_ROWS.some(row => {\n return this.board.countMarkersFor(player, row) === 3;\n })\n }", "function checkIfWinner()\n{\n var count = 1;\n for (var i = 0; i < rows; i++)\n {\n for (var j = 0; j < columns; j++)\n {\n if (arrayForBoard[i][j] != count)\n {\n\tif ( !(count === rows * columns && arrayForBoard[i][j] === 0 ))\n\t{\n\t return false;\n\t}\n }\n count++;\n }\n }\n \n return true;\n}", "function checkWin() {\n\n //get subarray of grid array using the goalArray as indexes\n let gridGoal = [];\n for (var i = 0; i < grid.length; i++) {\n for (var j = 0; j < grid[i].length; j++) {\n if (arrayCheck(goalArray, [i, j])) {\n gridGoal.push(grid[i][j]);\n }\n }\n }\n //loop through gridGoal array to determine if there is a win.\n if (gridGoal.length > 0) {\n win = gridGoal.every(element => element == 3);\n } else {\n console.log(\"Something went wrong generating goal\");\n }\n}", "function horizontalWin(firstRow, secondRow, thirdRow) {\n if(firstRow == winX || firstRow == winO) {\n return true;\n }\n if(secondRow == winX || secondRow == winO){\n return true;\n }\n if(thirdRow == winX || thirdRow == winO){\n return true;\n }\n}", "function checkWinner(player) {\n for (var i = 0; i < gameState.length; i++) {\n if (player === 'X' && gameState[i] === 'X') {\n arrayX.push(i);\n } else if (player === 'O' && gameState[i] === 'O') {\n arrayO.push(i);\n }\n }\n if (player === 'X') {\n for (var key in winningCombinations) {\n if (arrayX.includes(winningCombinations[key][0]) && arrayX.includes(winningCombinations[key][1]) && arrayX.includes(winningCombinations[key][2])) {\n return true;\n }\n }\n }\n if (player === 'O') {\n for (var key in winningCombinations) {\n if (arrayO.includes(winningCombinations[key][0]) && arrayO.includes(winningCombinations[key][1]) && arrayO.includes(winningCombinations[key][2])) {\n return true;\n }\n }\n }\n return false;\n}", "checkForWin() {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n const _win = cells =>\n cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.height &&\n x >= 0 &&\n x < this.width &&\n this.board[y][x] === this.currPlayer\n );\n\n\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; x < this.width; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every( //check every cell on the board for a 1 or 2 (piece played)\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n for (var y = 0; y < HEIGHT; y++) { \n for (var x = 0; x < WIDTH; x++) {\n var horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]]; //horizonal win\n var vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]]; //vertical win\n var diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]]; //diagonal to the right win\n var diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]]; //diagonal to the left win\n\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) { //if any of these win situations are true, return true\n return true;\n }\n }\n }\n}", "checkForWin() {\n const _win = (cells) => {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < this.HEIGHT &&\n x >= 0 &&\n x < this.WIDTH &&\n this.board[y][x] === this.currPlayer\n );\n };\n\n for (let y = 0; y < this.HEIGHT; y++) {\n for (let x = 0; x < this.WIDTH; x++) {\n // get \"check list\" of 4 cells (starting here) for each of the different\n // ways to win\n const horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n const vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n const diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n const diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n\n // find winner (only checking each win-possibility as needed)\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n }", "function checkRow(sudoko, row, value) {\n for(let i = 0; i < sudoko.length; i++) { \n if (sudoko[row][i] === value) {\n return false;\n }\n }\n return true;\n}", "function compTryToWin() {\n for (var i = 0; i < winners.length; i++) {\n if (board[winners[i][0]] == compChoice && board[winners[i][1]] == compChoice && board[winners[i][2]] == \"\") {\n return winners[i][2];\n }\n else if (board[winners[i][0]] == compChoice && board[winners[i][2]] == compChoice && board[winners[i][1]] == \"\") {\n return winners[i][1];\n }\n else if (board[winners[i][1]] == compChoice && board[winners[i][2]] == compChoice && board[winners[i][0]] == \"\") {\n return winners[i][0];\n } \n }\n return false;\n}", "function playerwon(id) {\r\n if (matrix[0][0] == id && matrix[0][1] == id && matrix[0][2] == id)\r\n return true\r\n else\r\n if (matrix[1][0] == id && matrix[1][1] == id && matrix[1][2] == id)\r\n return true\r\n else if (matrix[2][0] == id && matrix[2][1] == id && matrix[2][2] == id)\r\n return true\r\n else if (matrix[0][0] == id && matrix[1][0] == id && matrix[2][0] == id)\r\n return true\r\n else\r\n if (matrix[0][1] == id && matrix[1][1] == id && matrix[2][1] == id)\r\n return true\r\n else\r\n if (matrix[0][2] == id && matrix[1][2] == id && matrix[2][2] == id)\r\n return true\r\n else if (matrix[0][0] == id && matrix[1][1] == id && matrix[2][2] == id)\r\n return true\r\n else if (matrix[0][2] == id && matrix[1][1] == id && matrix[2][0] == id)\r\n return true\r\n\r\n return false\r\n}", "function checkwin(cells,symbol) {\n return winCombination.some((combination) => {\n return combination.every(function(idx) {\n if (cells[idx].firstChild !== null) {\n return cells[idx].firstChild.getAttribute('value') === symbol;\n } else {\n return false;\n }\n });\n });\n }", "function isWin()\r\n{\r\n for(var i=0; i<size; i++)\r\n {\r\n for(var j=0; j<size; j++)\r\n {\r\n if((tableDuJeu[i][j] == 2048) && !win)\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function win(squares)\n{\n\tconst lines = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6]\n ];\n for (let i = 0; i < lines.length; i++) {\n const [a, b, c] = lines[i];\n if (squares[a] && squares[a] === squares[b] && squares[a] === squares[c]) {\n return true;\n }\n }\n return false;\n}", "function checkForWinner(move) {\r\n var result = false;\r\n if (checkRow(1, 2, 3, move) || checkRow(4, 5, 6, move) || checkRow(7, 8, 9, move) || checkRow(1, 4, 7, move) || checkRow(2, 5, 8, move) || checkRow(3, 6, 9, move) || checkRow(1, 5, 9, move) || checkRow(3, 5, 7, move)) {\r\n result = true;\r\n }\r\n return result;\r\n}", "function isCorrectRow(row,sudoku) {\n\tvar rightSequence = new Array(1,2,3,4,5,6,7,8,9);\n\tvar rowTemp= new Array();\n\tfor (var i=0; i<=8; i++) {\n\t\trowTemp[i] = sudoku[row*9+i];\n\t}\n\trowTemp.sort();\n\treturn rowTemp.join() == rightSequence.join();\n}", "function winCheck (){\n var winCombos = [\n [0,1,2],\n [3,4,5],\n [6,7,8],\n [0,3,6],\n [1,4,7],\n [2,5,8],\n [0,4,8],\n [2,4,6]\n ]\n\n //win check\n for (var i=0; i < winCombos.length; i++) {\n var winCombo = winCombos[i]\n // if (board !== (winCombos[0,1,2,3,4,5,6,7])){\n var square1 = board[winCombo[0]]\n var square2 = board[winCombo[1]]\n var square3 = board[winCombo[2]]\n console.log(square1, square2, square3)\n\n if (square1 !== '' && square1 === square2 && square2 === square3){\n win = square1\n }\n\n }\n\n // tie check\n if (!win) {\n tie = true\n for (var i=0; i < board.length; i++) {\n if(board[i] === '') {\n tie = false\n }\n\n }\n }\n\n }", "function checkWin(originalBoard) {\r\n let playerOneSquares = [];\r\n let playerTwoSquares = [];\r\n let gameWon = null;\r\n for (var i = 0; i < originalBoard.length; i++) {\r\n if (originalBoard[i] === playerOne.sign) playerOneSquares.push(i);\r\n else if (originalBoard[i] === playerTwo.sign) playerTwoSquares.push(i);\r\n }\r\n for (win in winConditions) {\r\n if (winConditions[win].every(cell => playerOneSquares.indexOf(cell) > -1)) {\r\n gameWon = playerOne;\r\n break;\r\n } else if (winConditions[win].every(cell => playerTwoSquares.indexOf(cell) > -1)) {\r\n gameWon = playerTwo;\r\n break;\r\n }\r\n }\r\n if ((playerOneSquares.length + playerTwoSquares.length) === originalBoard.length && gameWon === null) gameWon = \"Tie\";\r\n return gameWon;\r\n}", "function isWinner() {\n\n\t\tvar winner = false;\n\t\tif (threeInaRow(0,1,2,turn) ||\n\t\t\tthreeInaRow(3,4,5, turn) ||\n\t\t\tthreeInaRow(6,7,8, turn) ||\n\t\t\tthreeInaRow(0,3,6, turn) ||\n\t\t\tthreeInaRow(1,4,7, turn) ||\n\t\t\tthreeInaRow(2,5,8, turn) ||\n\t\t\tthreeInaRow(0,4,8, turn) ||\n\t\t\tthreeInaRow(2,4,6, turn)) {\n\t\t\twinner = true;\n\t\t\t}\n\t\treturn winner;\n\t\t}", "checkWin(play) {\n // state variable\n const { board } = this.state;\n // loop through board layers\n for (let i = 0; i < board.length; i++) {\n // if there is a row or column that matches the current play...\n if (\n (board[i][0] === play && board[i][1] === play && board[i][2] === play)\n || (board[0][i] === play && board[1][i] === play && board[2][i] === play)\n ) {\n // update the state to display who won\n this.setState({\n won: true,\n wins: play\n });\n }\n // if a diagonal matches the current play...\n if (\n (board[0][0] === play && board[1][1] === play && board[2][2] === play)\n || (board[0][2] === play && board[1][1] === play && board[2][0] === play)\n ) {\n // update the state to display who won\n this.setState({\n won: true,\n wins: play\n })\n }\n }\n }", "function judge(grid){\n for(var i = 0; i < row; i++){\n for(var j = 0; j < col; j++){\n if(grid[i][j]){\n return false;\n }\n }\n }\n return true;\n}", "function winning(board, player){\n if (\n (board[0] === player && board[1] === player && board[2] === player) ||\n (board[3] === player && board[4] === player && board[5] === player) ||\n (board[6] === player && board[7] === player && board[8] === player) ||\n (board[0] === player && board[3] === player && board[6] === player) ||\n (board[1] === player && board[4] === player && board[7] === player) ||\n (board[2] === player && board[5] === player && board[8] === player) ||\n (board[0] === player && board[4] === player && board[8] === player) ||\n (board[2] === player && board[4] === player && board[6] === player)\n ) {\n return true;\n } else {\n return false;\n }\n}", "checkWin(c){\n if ((arr[0][0]==c && arr[0][1]==c && arr[0][2]==c)\n || (arr[1][0]==c && arr[1][1]==c && arr[1][2]==c)\n || (arr[2][0]==c && arr[2][1]==c && arr[2][2]==c)\n || (arr[0][0]==c && arr[1][0]==c && arr[2][0]==c)\n || (arr[0][1]==c && arr[1][1]==c && arr[2][1]==c)\n || (arr[0][2]==c && arr[1][2]==c && arr[2][2]==c)\n || (arr[0][0]==c && arr[1][1]==c && arr[2][2]==c)\n || (arr[0][2]==c && arr[1][1]==c && arr[2][0]==c)){\n\n if(c=='x')\n {\n console.log(\"Player won\");\n } \n else {\n console.log(\"System won\");\n }\n showGame();\n check=false;\n }\n\n }", "function checkWin(board){\n var winner = 0;\n\n //Check for possible tie\n if (board.indexOf(0) === -1){\n winner = 3;\n }\n //Check for a winner\n winPatterns.forEach(function(value){\n if (board[value[0]] !== 0){\n if(board[value[0]] === board[value[1]] &&\n board[value[1]] === board[value[2]]){\n winner = board[value[0]];\n //Store winning line for animation later\n winLine = value;\n }\n }\n });\n return winner; //1 for human, 2 for comp, 3 for tie\n}", "function winnerChecker(x,y,player) {\n var col,row,diag,adiag;\n col = 0;row = 0;diag = 0;adiag = 0;\n winner = false;\n var len = matrix.length;\n for (var i = 0; i < matrix.length; i++) {\n if(matrix[x][i] == player)\n col++;\n if(matrix[i][y] == player)\n row++;\n if(matrix[i][i] == player)\n diag++;\n if(matrix[i][len - i - 1])\n adiag++;\n }\n\n if(row == len || col == len || diag == len || adiag == len){\n winner = true;\n }\n return winner;\n\n}", "Check_Win(){\r\n // Checks rows\r\n for (let k = 0; k < this.Board.length; k++){\r\n if ((this.Board[k][0] == this.Board[k][1]) &&( this.Board[k][1] == this.Board[k][2]) && (this.Board[k][1] != 0)){\r\n return true\r\n }\r\n }\r\n // Checks columns\r\n for (let l = 0; l < this.Board.length; l++){\r\n if ((this.Board[0][l] == this.Board[1][l]) && (this.Board[1][l] == this.Board[2][l]) && (this.Board[1][l] != 0)){\r\n return true\r\n }\r\n }\r\n // Checks the diagonal\r\n if ((this.Board[0][0] == this.Board[1][1]) && (this.Board[1][1] == this.Board[2][2]) && (this.Board[1][1] != 0)){\r\n return true\r\n }\r\n // Check the other diagonal\r\n if ((this.Board[2][0] == this.Board[1][1]) && (this.Board[1][1] == this.Board[0][2]) && (this.Board[1][1] != 0)){\r\n return true\r\n }\r\n return false;\r\n }", "function verifyWin() {\n let win = false;\n for (let i = 0; i < 3; i++) {\n if (board[i][0] === turn && board[i][1] === turn && board[i][2] === turn) {\n win = true;\n break;\n } else if (board[0][i] === turn && board[1][i] === turn && board[2][i] === turn) {\n win = true;\n break;\n }\n }\n // diagornal principal\n if (board[0][0] === turn && board[1][1] === turn && board[2][2] === turn) {\n win = true;\n // diagonal secundária\n } else if (board[0][2] === turn && board[1][1] === turn && board[2][0] === turn) {\n win = true;\n }\n return win;\n}", "function checkforWinner(){\n let row1 = cell0.textContent+cell1.textContent+cell2.textContent; //These are all the winning combinations\n let row2 = cell3.textContent+cell4.textContent+cell5.textContent;\n let row3 = cell6.textContent+cell7.textContent+cell8.textContent;\n let col1 = cell0.textContent+cell3.textContent+cell6.textContent;\n let col2 = cell1.textContent+cell4.textContent+cell7.textContent;\n let col3 = cell2.textContent+cell5.textContent+cell8.textContent;\n let diagL = cell0.textContent+cell4.textContent+cell8.textContent;\n let diagR = cell2.textContent+cell4.textContent+cell6.textContent;\n let checkAnswer = [row1, row2, row3, col1, col2, col3, diagL, diagR]; //All winning combinations added to array for iteration\n\n //checks to see if there's a winning or drawn state, if so it gives an alert and calls resetBoard to reset the game board \n checkAnswer.forEach((cond)=>{\n if(cond === \"XXX\"){\n //alert('You win!')\n status.textContent = \"You win!\"\n gameOver = true;\n resetBoard()\n }\n if(cond === \"OOO\"){\n alert('The computer wins!')\n resetBoard()\n }\n //checks if the game has started (to stop drawing on an empty board when the game starts) and if all the cells have text content\n })\n if(gameStarted && allCells.every(element => element.textContent !== \"\")){\n alert(`It's a draw!`);\n resetBoard();\n }\n}", "function checkWin(curr){\r\n var currentTiles=[];\r\n for(let i=0; i<boardArr.length; i++){\r\n if(boardArr[i]===curr[1]){\r\n currentTiles.push(i);\r\n }\r\n }\r\n for(let x=0; x<winCombination.length; x++){\r\n var count=0;\r\n for(let j=0; j<winCombination[x].length; j++){\r\n if(currentTiles.indexOf(winCombination[x][j])!=-1){\r\n count=count + 1;\r\n }\r\n if(count==3){\r\n gameWon=current[0]; \r\n } \r\n }\r\n }\r\n }", "function checkWin() {\n\n let a = document.querySelectorAll('.btn');\n\n if (turn)\n winner = \"O\";\n else\n winner = \"X\";\n\n\n // console.log(combinations.length)\n for (let i in combinations) {\n let array = combinations[i];\n // console.log(array)\n\n // if ((a[array[0]].innerHTML == \"X\" || a[array[0]].innerHTML == \"O\")\n // console.log(typeof a[array[0]].innerHTML);\n if ((a[array[0]].innerHTML == \"X\" || a[array[0]].innerHTML == \"O\")\n && a[array[0]].innerHTML == a[array[1]].innerHTML &&\n a[array[1]].innerHTML == a[array[2]].innerHTML) {\n\n // console.log(array[0],array[1],array[2])\n\n alert(`${winner} Won the Match!!`);\n addCount();\n return true;\n }\n\n }\n\n\n if ((no_of_clicks >= 9 && !singlePlayer) ||\n (no_of_clicks > 4 && singlePlayer)) {\n drawCount++;\n alert(\"Its a Draw!!\");\n document.querySelector(\"#drawCount\").innerHTML = `Draws : ${drawCount}`\n resetBoard();\n twoCombinations = [];\n X_POSITIONS = [] ,O_POSITIONS = [];\n };\n return false;\n}", "function game_over(){\n // return true if blue king on row 1 or 5\n}", "function checkWin(board, player) {\n\n // Reduce to find array containing the indexes of cell that matches the player\n // i.e., moves of player\n\tlet plays = board.reduce((a, e, i) =>\n\t\t(e === player) ? a.concat(i) : a, []);\n\n\tlet gameWon = null;\n\n // Find if moves of player qualify for win\n // If yes than break from loop and return gameWon\n for (let [index, win] of winCombos.entries()) {\n\t\tif (win.every(elem => plays.indexOf(elem) > -1)) {\n\t\t\tgameWon = {index: index, player: player};\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn gameWon;\n}", "function winningCondition(subArray) {\n return (board[subArray[0]] !== \"\") &&\n (board[subArray[0]] === board[subArray[1]]) &&\n (board[subArray[0]] === board[subArray[2]])\n }", "function checkWin(board, player) {\r\n let plays = board.reduce((a, e, i) => (e === player) ? a.concat(i) : a, []);\r\n let gameWon = null;\r\n for (let [index, win] of winCombos.entries()) {\r\n if (win.every(elem => plays.indexOf(elem) > -1)) {\r\n gameWon = {index: index, player: player};\r\n break;\r\n }\r\n }\r\n return gameWon;\r\n}", "function winning(player){\n\treturn (\n\t\t(board[0] == player && board[1] == player && board[2] == player) ||\n\t\t(board[3] == player && board[4] == player && board[5] == player) ||\n\t\t(board[6] == player && board[7] == player && board[8] == player) ||\n\t\t(board[0] == player && board[3] == player && board[6] == player) ||\n\t\t(board[1] == player && board[4] == player && board[7] == player) ||\n\t\t(board[2] == player && board[5] == player && board[8] == player) ||\n\t\t(board[0] == player && board[4] == player && board[8] == player) ||\n\t\t(board[2] == player && board[4] == player && board[6] == player)\n\t)\n\t\t\n}", "function checkForWin() {\n const _win = (cells) => {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n };\n\n // TODO: read and understand this code. Add comments to help you.\n //iterate throught the board\n for (let y = 0; y < HEIGHT; y++) {\n for (let x = 0; x < WIDTH; x++) {\n //to win horizontally, all y's are the same\n const horiz = [\n [y, x],\n [y, x + 1],\n [y, x + 2],\n [y, x + 3],\n ];\n //to win vertically, all x's are the same\n const vert = [\n [y, x],\n [y + 1, x],\n [y + 2, x],\n [y + 3, x],\n ];\n\n //to win diag to the right, x's and y's are all plus 1 every step\n const diagDR = [\n [y, x],\n [y + 1, x + 1],\n [y + 2, x + 2],\n [y + 3, x + 3],\n ];\n //to win diag to the left, x's subtract 1 every step and y's plus 1 every step\n const diagDL = [\n [y, x],\n [y + 1, x - 1],\n [y + 2, x - 2],\n [y + 3, x - 3],\n ];\n\n //one way winning is a win\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n\n //nobody wins return false;\n return false;\n}", "function checkForWin(winningCombinations, playerSelections) {\n\n // var match1 = eachitem\n for (let i = 0; i < winningCombinations.length; i++) {\n let matches = 0\n let currentcombo = winningCombinations[i]\n\n\n for (let j = 0; j < currentcombo.length; j++) {\n let currentnum = currentcombo[j]\n if (playerSelections.includes(currentnum)) {\n matches++\n if (matches === 3) {\n return true\n }\n\n\n\n }\n }\n } return false\n\n}", "function checkForWinner(row, column) {\n const charCode = boardState[row][column];\n return (\n // horizontal check\n (boardState[row][0] === charCode &&\n boardState[row][1] === charCode &&\n boardState[row][2] === charCode) ||\n // vertical check\n (boardState[0][column] === charCode &&\n boardState[1][column] === charCode &&\n boardState[2][column] === charCode) ||\n // left angle check\n (boardState[0][0] === charCode &&\n boardState[1][1] === charCode &&\n boardState[2][2] === charCode) ||\n // right angle check\n (boardState[0][2] === charCode &&\n boardState[1][1] === charCode &&\n boardState[2][0] === charCode)\n );\n}", "function isOver(){\r\n\tfor (var i = 0; i < size; i++) { \r\n\t\tfor (var j = 0; j < size; j++) { \r\n\t\t\tif(grid[i][j]==Math.pow(2,(7+(size)))){//The winning score depends on the size of Grid\r\n\t\t\t\treturn true;//Return true if the winning score is met\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "function checkVerWin(){\n for (i=0;i<3;i++){\n let firstCell = game.gameBoard[i];\n if (firstCell == null) {continue;}\n if (firstCell == game.gameBoard[i+3] && firstCell == game.gameBoard[i+6]){\n game.gameWinner = firstCell;\n return true;\n }\n }\n return false;\n}", "function checkRows(){\n //check first row\n if(box0 == activePlayer.symbol && box1 == activePlayer.symbol && box2 == activePlayer.symbol){\n console.log(`${activePlayer.name} wins`);\n const showWinner = displayWin();\n gameState = false;\n // const restart_ = restart();\n\n } \n //check second row\n if(box3 == activePlayer.symbol && box4 == activePlayer.symbol && box5 == activePlayer.symbol){\n const showWinner = displayWin();\n gameState = false;\n\n }\n //check third row\n if(box6 == activePlayer.symbol && box7 == activePlayer.symbol && box8 == activePlayer.symbol){\n const showWinner = displayWin();\n gameState = false;\n\n }\n}", "checkColumns(player) {\n //player\n\n /* Check all column in that row */\n if (\n (this.board[0][0] === player && this.board[1][0] === player && this.board[2][0] === player) ||\n\n (this.board[0][1] === player && this.board[1][1] === player && this.board[2][1] === player) ||\n (this.board[0][2] === player && this.board[1][2] === player && this.board[2][2] === player)\n ) {\n return true;\n }\n return false;\n }", "function checkForWin(player) {\n\tlet g = gameBoard.bigGrid;\n\n\t// Check for 3 in a row on big board\n\tif (\n\t\t(g.A1 === g.A2 && g.A1 === g.A3 && g.A1) ||\n\t\t(g.B1 === g.B2 && g.B1 === g.B3 && g.B1) ||\n\t\t(g.C1 === g.C2 && g.C1 === g.C3 && g.C1) ||\n\t\t(g.A1 === g.B1 && g.A1 === g.C1 && g.A1) ||\n\t\t(g.A2 === g.B2 && g.A2 === g.C2 && g.A2) ||\n\t\t(g.A3 === g.B3 && g.A3 === g.C3 && g.A3) ||\n\t\t(g.A1 === g.B2 && g.A1 === g.C3 && g.A1) ||\n\t\t(g.C1 === g.B2 && g.C1 === g.A3 && g.C1)\n\t) {\n\t\t$('#turn').text(`${player} Wins`);\n\t}\n\n\t// Check for tie game on big board\n\telse if (\n\t\tg.A1 && g.A2 && g.A3 && g.B1 && g.B2 && g.B3 && g.C1 && g.C2 && g.C3\n\t) {\n\t\t$('#turn').text(`It's a Tie Game!`);\n\t}\n\n\t$('#gameBoard').css('background-color', 'rgb(128, 128, 128)');\n}", "function canSomeOneWin(target, justCheck, pPlayer){\n\t// armazena a quantidade de possiveis vitorias com o jogo atual\n\tvar victoryCount = 0;\n\n\t//horizontais\n\tfor(i = 0; i < tableClone.length; i++){\n\t\t//se a soma da linha + 1 = 3, verificar qual esta vaga e jogar nesta posicao\n\t\tif( ((tableClone[i][0] + tableClone[i][1] + tableClone[i][2]) + 1) == target ){\n\t\t\t//armazena o valor da coluna e da linha\n\t\t\tfor(var j = 0; j< 3; j++){\n\t\t\t\tif(tableClone[i][j] == 0){\n\t\t\t\t\tvictoryCount++;\n\t\t\t\t\t// marca esta posicao no tabuleiro real\n\t\t\t\t\tif(!justCheck){\n\t\t\t\t\t\tplay([i,j], pPlayer);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//verticais\n\tfor(i = 0; i < tableClone.length; i++){\n\t\t//se a soma da linha + 1 = 3, verificar qual esta vaga e jogar nesta posicao\n\t\tif( (tableClone[0][i] + tableClone[1][i] + tableClone[2][i]) + 1 == target ){\n\t\t\t//armazena o valor da coluna e da linha\n\t\t\tfor(var j = 0; j < 3; j++){\n\t\t\t\tif(tableClone[j][i] == 0){\n\t\t\t\t\tvictoryCount++;\n\t\t\t\t\t// marca esta posicao no tabuleiro real\n\t\t\t\t\tif(!justCheck){\n\t\t\t\t\t\tplay([j,i], pPlayer);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//duas diagonais\n\t//diagonal 1\n\tif( (tableClone[0][0] + tableClone[1][1] + tableClone[2][2]) + 1 == target ){\n\t\tfor(var i=0;i<3;i++){\n\t\t\tif(tableClone[i][i] == 0){\n\t\t\t\tvictoryCount++;\n\t\t\t\tif(!justCheck){\n\t\t\t\t\tplay([i,i], pPlayer);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//diagonal 2\n\tif( ((tableClone[0][2] + tableClone[1][1] + tableClone[2][0]) + 1) == target ){\n\t\tfor(var i=0;i<3;i++){\n\t\t\tif(tableClone[i][2-i] == 0){\n\t\t\t\tvictoryCount++;\n\t\t\t\tif(!justCheck){\n\t\t\t\t\tplay([i,2-i], pPlayer);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif(justCheck){\n\t\treturn victoryCount;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "function checkRow(a, b, c, move) {\r\n var flag = false;\r\n if ( (getTile(a) == move) && (getTile(b) == move) && (getTile(c) == move) ) {\r\n flag = true;\r\n }\r\n return flag;\r\n}", "function won(board) {\n const checkX = (el) => el === 'X';\n const checkY = (el) => el === 'Y';\n\n for(let i = 0; i < board.length; i++) {\n didWin = board[i].every(checkX) || board[i].every(checkY);\n if (didWin) return true;\n }\n\n return false;\n}", "function checkWin() {\n //check if there is a winner\n return WINARR.some(function (arr) {\n return (\n playerChoices[arr[0]] === playerChoices[arr[1]] &&\n playerChoices[arr[0]] === playerChoices[arr[2]] &&\n playerChoices[arr[2]]\n );\n });\n}", "function isSolved(row, col) {\n return document.querySelector('[data-row=\"' + row + '\"][data-col=\"' + col + '\"]').value ? true : false;\n}", "function checkRow (board, row, marker) {\n //if marker is blank return false\n if (marker == null || marker === \"_\") {\n return false;\n }\n //if the marker is x or o check if the the rest of the row hs the same marker\n if (board.getIn([row, 0]) === marker && board.getIn([row, 1]) === marker && board.getIn([row, 2]) === marker) {\n return true;\n }\n return false;\n}", "function checkHorWin(){\n for (i=0;i<7;i += 3){\n let firstCell = game.gameBoard[i];\n if (firstCell == null) {continue;}\n if (firstCell == game.gameBoard[i+1] && firstCell == game.gameBoard[i+2]){\n game.gameWinner = firstCell;\n return true;\n\n }\n }\n return false;\n}", "function checkForWin() {\n function _win(cells) {\n // Check four cells to see if they're all color of current player\n // - cells: list of four (y, x) cells\n // - returns true if all are legal coordinates & all match currPlayer\n\n return cells.every(\n ([y, x]) =>\n y >= 0 &&\n y < HEIGHT &&\n x >= 0 &&\n x < WIDTH &&\n board[y][x] === currPlayer\n );\n }\n\n // \n // iterate through y axis\n for (let y = 0; y < HEIGHT; y++) {\n // while going through x axis\n for (let x = 0; x < WIDTH; x++) {\n // coordinates for a horizontal win\n let horiz = [[y, x], [y, x + 1], [y, x + 2], [y, x + 3]];\n // coordinates for a vertical win\n let vert = [[y, x], [y + 1, x], [y + 2, x], [y + 3, x]];\n // coordinates for a diagonal right win\n let diagDR = [[y, x], [y + 1, x + 1], [y + 2, x + 2], [y + 3, x + 3]];\n // coordinates for diagonal left win\n let diagDL = [[y, x], [y + 1, x - 1], [y + 2, x - 2], [y + 3, x - 3]];\n// if a win in any direction return true\n if (_win(horiz) || _win(vert) || _win(diagDR) || _win(diagDL)) {\n return true;\n }\n }\n }\n}", "function checkWinning(char, a, b, c, d, e) {\r\n if (board[a] == char && board[b] == char && board[c] == char && board[d] == char && board[e] == char) {\r\n return true;\r\n } return false;\r\n}", "function winnerCheck(columns) {\n // horizontal check\n for (let i = 0; i < HEIGHT; i++) {\n for (let j = 0; j < WIDTH - LIMIT; j++) {\n if (columns[j][i] && columns[j][i] === columns[j + 1][i] &&\n columns[j][i] === columns[j + 2][i] && columns[j][i] === columns[j + 3][i]) {\n return columns[j][i];\n }\n }\n }\n\n // vertical check\n for (let i = 0; i < HEIGHT - LIMIT; i++) {\n for (let j = 0; j < WIDTH; j++) {\n if (columns[j][i] && columns[j][i] === columns[j][i + 1] &&\n columns[j][i] === columns[j][i + 2] && columns[j][i] === columns[j][i + 3]) {\n return columns[j][i];\n }\n }\n }\n\n // top-right diagonal check\n for (let i = 0; i < HEIGHT - LIMIT; i++) {\n for (let j = 0; j < WIDTH - LIMIT; j++) {\n if (columns[j][i] && columns[j][i] === columns[j + 1][i + 1] &&\n columns[j][i] === columns[j + 2][i + 2] && columns[j][i] === columns[j + 3][i + 3]) {\n return columns[j][i];\n }\n }\n }\n\n // bottom-right diagonal check\n for (let i = LIMIT; i < HEIGHT; i++) {\n for (let j = 0; j < WIDTH - LIMIT; j++) {\n if (columns[j][i] && columns[j][i] === columns[j + 1][i - 1] &&\n columns[j][i] === columns[j + 2][i - 2] && columns[j][i] === columns[j + 3][i - 3]) {\n return columns[j][i];\n }\n }\n }\n\n // no winner\n return false;\n}", "function checkIfWon(chosenSquare) {\n\n var mulitArr = winningCombos[chosenSquare];\n var playerWon;\n\n for (var i = 0; i < mulitArr.length; i++) { // this nested loop provides the length of the multidimensional array\n playerWon = true;\n for (var j = 0; j < mulitArr[i].length; j++) {\n //value of j starts at zero\n //If j starts at 1 only two more divs must match in order to win.\n //If j is two 2 only one more div must be matched in order to win (which would be any square on the board)\n if (!$(\"#board\").find(\"div\").eq(mulitArr[i][j]).find(\"span\").hasClass(circleOrEx)) {\n // if the #board finds the divs are equal(equal amount of \"x\" and \"o\" then nothing happens)\n playerWon = false;\n }\n }\n\n if (playerWon) { // if they playerWon do this code\n\n for (var j = 0; j < mulitArr[i].length; j++) {\n $(\"#board\").find(\"div\").eq(mulitArr[i][j]).find(\".\" + circleOrEx).addClass(\"green\");\n //This changes the divs i and j (the first two inputs) of the winning combination to green\n }\n $(\"#board\").find(\"div\").eq(chosenSquare).find(\".\" + circleOrEx).addClass(\"green\");\n // this changes the chosenSquare (the deciding div) of the winning combination to green aswell\n alert(\"Winner is \" + circleOrEx.toUpperCase() + \"!\");\n // this makes an alert pop up saying who the winner is\n isGameInProgress = false;\n // at this point the game is not in progress anymore\n return false; //this exits the loop\n }\n }\n\n\n }", "function checkForWin(winningCombinations, playerSelections) {\n for (let i = 0; i < winningCombinations.length; i++) {\n let matches = 0;\n let currentCombination = winningCombinations[i];\n\n for (let j = 0; j < currentCombination.length; j++) {\n let newCombination = currentCombination[j];\n if (playerSelections.includes(newCombination)) {\n matches++;\n if (matches === 3) {\n return true;\n }\n }\n }\n }\n return false;\n}", "function isValidRow(row, size) {\n\tfor (col = 0; col < size; col++) {\n\t\tif (board[row][col] == 1)\n\t\t\treturn false;\n\t}\n\treturn true;\n}", "function checkWin(board, user) {\n let plays = board.reduce((a, e, i) => (e === user) ? a.concat(i) : a, []);// => means check\n let gameWon = null;\n for (let [index, win] of winCombos.entries()) {\n if (win.every(elem => plays.indexOf(elem) > -1)) {\n gameWon = {index: index, user: user};\n break;\n }\n }\n return gameWon;\n}" ]
[ "0.75367916", "0.7323091", "0.73075527", "0.72247434", "0.7200272", "0.7142273", "0.71399826", "0.7033779", "0.69245094", "0.69237643", "0.68896663", "0.6887292", "0.68794304", "0.6865423", "0.6860089", "0.682167", "0.6817677", "0.67861307", "0.6779591", "0.67776483", "0.67718905", "0.6762823", "0.67502373", "0.6736484", "0.6711236", "0.66935956", "0.6684355", "0.6677177", "0.66542035", "0.66512084", "0.6646172", "0.66271156", "0.66191053", "0.6612163", "0.6600777", "0.657764", "0.65768814", "0.65652424", "0.65524036", "0.6538621", "0.65303504", "0.6518784", "0.65171087", "0.65001816", "0.6480404", "0.647121", "0.64708906", "0.6464407", "0.64632994", "0.6460151", "0.64573115", "0.64482635", "0.6447027", "0.64458215", "0.6443889", "0.6442812", "0.6434351", "0.6434121", "0.6433024", "0.6431503", "0.64284736", "0.6416124", "0.6415652", "0.6404815", "0.64047384", "0.64002633", "0.63909525", "0.6388394", "0.6386555", "0.63845557", "0.6378362", "0.635562", "0.6354619", "0.63469046", "0.6343884", "0.63434845", "0.634276", "0.6341526", "0.6340179", "0.63400835", "0.6338751", "0.6336171", "0.6331876", "0.6328722", "0.63284296", "0.6326067", "0.63230467", "0.63230157", "0.63209885", "0.63177186", "0.6313383", "0.6312949", "0.62974155", "0.6290039", "0.62892", "0.6286838", "0.62805736", "0.62770236", "0.6258653", "0.6257799", "0.6257441" ]
0.0
-1
COUNT items in each brand
countItemsInBrand(getBrandArr, getItemsArr) { for (let i = 0; i < getBrandArr.length; i++) { var tmp = getItemsArr.filter((item) => item.subcategoryArr.id === getBrandArr[i].id).length; getBrandArr[i].itemCount = tmp; } return getBrandArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "countOfItems() {\n var count = 0\n for (var sku in this.items) {\n var li = this.items[sku]\n count = Number(count) + Number(li.quantity)\n }\n return count\n }", "itemsCount() {\n return this._checkoutProducts\n .map((checkoutProduct) => checkoutProduct.count)\n .reduce((totalCount, count) => totalCount + count, 0);\n }", "countItems() {\n this.elementsCounted = {};\n \t for(let name of this.items) {\n \t\tthis.elementsCounted[name] = this.elementsCounted[name] ? this.elementsCounted[name] + 1 : 1;\n }\n }", "function getNumItemsPerCategory() {\n // Get items per farming season\n const perSeason = [];\n farmSeasonFilters.forEach((season) => {\n const currentSeasonItems = produceListings.filter(\n (listing) => listing.season === season,\n );\n perSeason.push(currentSeasonItems.length);\n });\n setSeasonItems(perSeason);\n\n // Get items per item type (agency or standard)\n const numAgencyItems = produceListings.filter((listing) => listing.hasAgencyPrice).length;\n const numStandardItems = produceListings.length - numAgencyItems;\n setItemsPerItemType([numAgencyItems, numStandardItems]);\n\n // Get items per produce type\n const perProdType = [];\n produceTypeFilters.forEach((prodType) => {\n const currentProdItems = produceListings.filter(\n (listing) => listing.produceType === prodType,\n );\n perProdType.push(currentProdItems.length);\n });\n setProdItems(perProdType);\n\n // Get items per price range (0-15, 15-30, 30-45, 45-60, 60-75)\n const perPrice = [0, 0, 0, 0, 0];\n produceListings.forEach((listing) => {\n const thisPrice = listing.palletPrice;\n if (thisPrice >= priceOptions[0] && thisPrice <= priceOptions[1]) {\n perPrice[0] += 1;\n }\n if (thisPrice >= priceOptions[1] && thisPrice <= priceOptions[2]) {\n perPrice[1] += 1;\n }\n if (thisPrice >= priceOptions[2] && thisPrice <= priceOptions[3]) {\n perPrice[2] += 1;\n }\n if (thisPrice >= priceOptions[3] && thisPrice <= priceOptions[4]) {\n perPrice[3] += 1;\n }\n if (thisPrice >= priceOptions[4] && thisPrice <= priceOptions[5]) {\n perPrice[4] += 1;\n }\n });\n setPriceItems(perPrice);\n }", "count() {\n let sum = this.items.length;\n return sum;\n }", "countItems(type) {\n let key = this.getKey(type)\n return this.items[key].length\n }", "getItemCount() {\n let count = 0;\n for (const data of this.facetBatches.values()) {\n count += data.length;\n }\n return count;\n }", "GetItemCount() {}", "get count() {\n\t\t\treturn this.items\n\t\t\t\t.map(item => item.qty)\n\t\t\t\t.reduce((total, qty) => total += qty, 0);\n\t\t}", "function countProductsOnPage() {\n $('.displayed__localCount').html(document.querySelectorAll('.collection__item').length + ' of');\n}", "function countBy(items, groupName) {\r\n\tlet counts = [];\r\n\tfor(let item of items) {\r\n\t\tlet name = groupName(item);\r\n\t\tlet known = counts.findIndex(c => c.name == name);\r\n\t\tif(known == -1) {\r\n\t\t\tcounts.push({name, count: 1});\r\n\t\t} else {\r\n\t\t\tcounts[known].count++;\r\n\t\t}\r\n\t}\r\n\treturn counts;\r\n}", "count(state) {\n const cart = state.cart || [];\n let count = 0;\n for (const slug in cart) {\n if (cart.hasOwnProperty(slug)) {\n count += cart[slug];\n }\n }\n return count;\n }", "function numberOfItemTypes(numbOfUniqueItems){\n //takes in the shopping cart as input\n //returns the number of unique item types in the shopping cart\n var ItemsThatAreUnique = [];\n for (let i = 0; i < numbOfUniqueItems.items.length; i++) {//took a while to find .items.length inorder to make this one work\n if (ItemsThatAreUnique.includes(numbOfUniqueItems.items[i].title)){\n //only need to check for one thing that each item has inorder to count them as unique\n continue;\n }\n ItemsThatAreUnique.push(numbOfUniqueItems.items[i].title);// put findings into empty array\n }\n return ItemsThatAreUnique.length;//returns all unique items in the object\n}", "function countBricks () {\n var brickIds = Crafty(\"Brick\");\n counts = {normals: 0, diamonds: 0};\n\n for (var i = 0; i < brickIds.length; i++) {\n if (brickIsNormal(Crafty(brickIds[i]).type)) {\n counts.normals++;\n }\n if (brickIsDiamond(Crafty(brickIds[i]).type)) {\n counts.diamonds++;\n }\n }\n\n return counts;\n}", "function countItem(item, callbacker) {\n var q = new Parse.Query(Item);\n q.equalTo(\"category\", item).count({\n success: function(count) {\n callbacker(null, count);\n }\n })\n }", "function countSales(pop){\n\n // it would probably be better if every purchase of a beer got stored in the database as a number\n // then this would go faster\n var counting = []; // array where beer_id and the number of times it has been bought is stored\n var itemlist = []; // array where beer_id is stored so it's possible to use indexOf\n\n\n for (var i = 0; i < pop.length; i++) {\n var if_in_mapp= itemlist.indexOf(pop[i].beer_id);// gives what index an element has or -1 if it's not in the array\n\n if (if_in_mapp==-1){\n var itemBought = {\"beer_id\" :pop[i].beer_id, \"times_bought\": 1};\n counting.push(itemBought); // store the item in counted...\n itemlist.push(pop[i].beer_id);\n\n }\n\n else { // every time loop finds that a beverage has been bought 1 time or more it adds +1 in times it has been bought\n for (var j =0; j < itemlist.length; j++){\n if (pop[i].beer_id==counting[j].beer_id){\n counting[j].times_bought+=1;\n\n }\n\n }\n }\n\n }\n\n return counting;\n}", "function getLegendCounts(d) {\n brandCounts[d['Manufacturer']]['count']--;\n if (brandCounts[d['Manufacturer']]['count'] <= 0) {\n hiddenBrands.push(d['Manufacturer']);\n }\n}", "get itemCount() {\n return this._itemsByElement.size;\n }", "function countBy(items, groupName) {\n\tlet counts = [];\n\tfor (let item of items) {\n\t\tlet name = groupName(item);\n\t\tlet known = counts.findIndex(c => c.name == name);\n\t\tif (known == -1) {\n\t\t\tcounts.push({ name, count: 1 });\n\t\t} else {\n\t\t\tcounts[known].count++;\n\t\t}\n\t}\n\treturn counts;\n}", "function num_availHouses(ndx, group) {\n dc.dataCount('.dc-data-count')\n .crossfilter(ndx)\n .groupAll(group)\n .transitionDuration(500);\n}", "function num_items(name) {\r\n\tvar item_count = character.items.filter(item => item != null && item.name == name).reduce(function (a, b) {\r\n\t\treturn a + (b[\"q\"] || 1);\r\n\t}, 0);\r\n\r\n\treturn item_count;\r\n}", "function itemCount(arr, el) {\n\t\tlet count = {};\n\t\tarr.forEach(function(item){\n\t\t\tcount[item] = count[item] ? count[item] + 1 : 1;\n\t\t});\n\t\treturn count[el];\n\t}", "function num_items(name) {\n var item_count = character.items.filter(item => item != null && item.name == name).reduce(function(a, b) {\n return a + (b[\"q\"] || 1);\n }, 0);\n\n return item_count;\n}", "function calculateSummaryOfAllItems(basketItems) {\n const counts = {};\n for (var i = 0; i < basketItems.length; i++) {\n counts[basketItems[i]] = 1 + (counts[basketItems[i]] || 0);\n };\n return counts;\n}", "function countBy(items, groupName) {\n let counts = [];\n for (let item of items) {\n let name = groupName(item);\n let known = counts.findIndex(c => c.name == name);\n if (known == -1) {\n counts.push({ name, count: 1 });\n } else {\n counts[known].count++;\n }\n }\n return counts;\n}", "function countCombinations() {\n var sets = [];\n for (var i in filteredInfo) {\n var genres = filteredInfo[i].Genre.split(\",\");\n for (var j in genres) {\n var genre = genres[j].trim();\n if (genres_count[genre] != undefined)\n genres_count[genre] += 1;\n else\n genres_count[genre] = 1;\n }\n }\n for (var i in genres_count)\n sets.push({\"Genre\": i, Size: genres_count[i], label: i});\n createDonutChart(sets);\n}", "getCount(category) {\n let count = [];\n let types = this.getAllPossible(category);\n let slot = this.getCategoryNumber(category);\n\n types.forEach(() => {\n count.push(0);\n });\n\n mushroom.data.forEach((mushroom) => {\n types.forEach((type, index) => {\n if (mushroom[slot] === type.key) {\n count[index]++;\n }\n });\n });\n\n return count;\n }", "getProductCount(array) {\n let productCount = 0;\n array.value.splitEntries.map((item) => {\n productCount += Number(item.qty);\n });\n return productCount;\n }", "function HowMany() {\r\n shirts.forEach(shirt => {\r\n SIZESFOREACH[shirt.size]++;\r\n });\r\n\r\n return SIZESFOREACH;\r\n}", "function countCartItems(arr) {\n let count = 0;\n arr.map(item => {\n count += item.qauntity\n })\n return count;\n}", "function pezCount(dispenser) {\n return dispenser[\"flavors\"].length;\n}", "getItemCount(item){\n if(this.inventory[item] == null)\n {\n console.log(\"%cCould not find \" + item, \"color:red\");\n return 0;\n }\n else{\n return this.inventory[item];\n }\n }", "function countBy(items, groupName) {\n let counts = [];\n for (let item of items) {\n let name = groupName(item); //True/False depending on whether it passes groupName test\n let known = counts.findIndex(c => c.name == name); //Finds the index of the first value to return true, else -1\n if (known == -1) { //Not already in array\n counts.push({name, count: 1}); //Creating the object\n } else {\n counts[known].count++;\n }\n }\n return counts;\n}", "function countCategories(response) {\n let categ = {};\n\n for (let offer of response.offers) {\n let item = offer.items[0]; // only the first item can have presets\n\n categ[item._tpl] = categ[item._tpl] || 0;\n categ[item._tpl]++;\n }\n // not in search mode, add back non-weapon items\n for (let c in response.categories) {\n if (!categ[c]) {\n categ[c] = 1;\n }\n }\n\n response.categories = categ;\n}", "function getTotalItemCount(){\n var total_item_count = 0;\n for(var i =0; i < cart_items.length; i++){\n total_item_count += cart_items[i][1];\n }\n return total_item_count;\n}", "function question6() {\n\n var seller_items = 0;\n for (i = 0; i < data.length; i++) {\n if (data[i].who_made === \"i_did\") {\n seller_items++;\n }\n\n }\n console.log(seller_items);\n // Answer:\n}", "function updateCounter() {\n const counter = document.getElementById('itemCount');\n counter.textContent = `(${cart.items.length})`;\n}", "function countTotalCart(shoppingCart) {\n let som = 0;\n shoppingCart.map(item => {\n som += item.camera.price\n });\n return som;\n}", "function itemsCount() {\n $(\"#itemsShow\").html(items);\n }", "function getTotalArt(location) {\n var count = 0;\n for(var i = 0; i < Object.keys(artists).length-1; i++) {\n if(artists[i].country == location) {\n count++;\n }\n }\n return count;\n}", "static async countAnimals(){\n const { rows } = await pool.query(\n `SELECT COUNT(*), species.type\n FROM animals\n LEFT JOIN species\n ON animals.species_id = species.id\n GROUP BY species.id\n ORDER BY species.type, COUNT`\n );\n\n return rows.map(row => new Animal(row));\n }", "function updateCounter() {\n var span = document.getElementById('itemCount');\n span.textContent = ` (${cart.items.length})`;\n\n}", "function getAllThugBrand() {\n let rezultatasBrand = \"\";\n let highestCount = 0;\n for (let gamintojas in pazeidimaiPagalMarke) {\n let count = pazeidimaiPagalMarke[gamintojas];\n if (count > highestCount) {\n highestCount = count;\n rezultatasBrand = gamintojas;\n }\n }\n\n return{\n gamintojas: rezultatasBrand,\n baudos: highestCount\n };\n}", "function petsByType() {\n let dogs = 0, cats = 0;\n\n for (var i = 0; i < pets.length; i ++) {\n switch(pets[i].anType) {\n case \"Dog\" :\n dogs ++;\n break;\n case \"Cat\" :\n cats ++;\n break;\n \n }\n }\n\n document.getElementById(\"dog-count\").innerHTML=`<b>${dogs}</b>`;\n document.getElementById(\"cat-count\").innerHTML=`<b>${cats}</b>`;\n}", "function handmadeItems(){\n var final = 0;\n items.forEach(function(num){\n if(num.who_made === \"i_did\"){\n final++;\n }\n });\n console.log(final + \" \" + \"were made by their sellers\");\n return final;\n }", "function updateCounter() {\n\n var cartCounter = document.getElementById('itemCount');\n cartCounter.textContent = cart.items.length;\n}", "function brandFilter() {\r\n var brandVal = document.querySelectorAll('input[name=\"brand\"]:checked');\r\n var brandData = [];\r\n brandVal.forEach((elem) => {\r\n elem.checked ? brandData.push(elem.value) : null ;\r\n })\r\n var resultBrand = []; \r\n brandData.forEach((val) => {\r\n resultBrand = resultBrand.concat(productData.filter((product) => product.brand.includes(val)))\r\n })\r\n \r\n brandData.length!==0? cards(resultBrand):cards(productData)\r\n}", "count() {\n return Object.keys(this.getAll()).length;\n }", "function countItem(itemID) {\n var inventory = SpreadsheetApp.getActive().getSheetByName('Inventory');\n if (inventory != null) {\n var values = inventory.getRange(1, 1, inventory.getLastRow(), inventory.getLastColumn()).getDisplayValues();\n \n for (var i=0; i < values.length; i++) {\n // if item is in inventory\n if (values[i][0] == itemID) {\n var count = values[i][4]; // capture the current count of the item\n var cell = 'E' + (i+1); // E is the column with number of times checked out\n if (count == null) { // sets the count if first time checked out\n count = 1;\n inventory.getRange(cell).setValue(count); // adjusting the new count\n }\n else {\n count++;\n inventory.getRange(cell).setValue(count);\n }\n }\n }\n }\n}", "function fnUpdateCounts() {\n\t\t\t\tvar oSmartTable = oState.oMultipleViewsHandler[oCurrentSection.key].oSmartTable;\n\t\t\t\tvar oModel = oSmartTable.getModel();\n\t\t\t\tvar oBindingContext = oSmartTable.getBindingContext();\n\t\t\t\tvar sContextPath = oBindingContext.getPath();\n\t\t\t\tvar sTableBindingPath = oSmartTable.getTableBindingPath();\n\t\t\t\tvar aFilters = [], sTableEntitySet;\n\t\t\t\tvar aFiltersTemp;\n\t\t\t\tfor (var sKey in mItemData) { // loop over all items\n\t\t\t\t\taFiltersTemp = jQuery.extend(true, {}, oState.oMultipleViewsHandler[oCurrentSection.key].oFiltersForCounts); // oState.[oCurrentSection.key].oFiltersForCounts contains \"editing status\" and custom filters if any\n\t\t\t\t\tvar oItemData = mItemData[sKey]; // get metadata for this item\n\t\t\t\t\tsTableEntitySet = oItemData.entitySet;\n\t\t\t\t\tif (!sTableEntitySet) {\n\t\t\t\t\t\tsTableEntitySet = oSmartTable.getEntitySet();\n\t\t\t\t\t}\n\t\t\t\t\toItemData.numberOfUpdates++; // start a new update call\n\t\t\t\t\toItemData.updateStartFunction(oItemData.numberOfUpdates); // set counter busy\n\n\t\t\t\t\taFilters = aFiltersTemp.filters.concat(oItemData.selectionVariantFilters); // note, that this does not modify the arrays which are concatenated\n\n\t\t\t\t\toModel.read(sContextPath + \"/\" + sTableBindingPath + \"/$count\", {\n\t\t\t\t\t\t//urlParameters: oSearch,\n\t\t\t\t\t\tfilters: aFilters,\n\t\t\t\t\t\tgroupId: \"updateMultipleViewsItemsCounts\", // send the requests for all count updates in one batch request\n\t\t\t\t\t\tsuccess: oItemData.updateSuccessFunction.bind(null, oItemData.numberOfUpdates), // bind the success handler to the current request\n\t\t\t\t\t\terror: oItemData.errorFunction.bind(null, oItemData.numberOfUpdates) // bind the error handler to the current request\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}", "function shopForApricots(shopping){\n//if the let count is in the for loop then it will get put back to zero\n let count = 0;\n for (let i = 0; i < shopping.length; i++){\n//this if is tells me how many apricots i have\n if (\"apricots\" === shopping[i]){\n count ++;\n }\n }\n//this kicks out the result of the for loop\n return count;\n}", "function getCount() {\n return count;\n}", "function wishlistCountItems(){\r\n if($('#wishlist_block_top_list dl dt.first_item').length != 0){\r\n return $('#wishlist_block_top_list dl dt').length;\r\n } else {\r\n return 0;\r\n }\r\n}", "function checkBoatCount()\n{\n var b = document.getElementById(\"boat1\");\n var saints = b.querySelectorAll(\"img.saint\");\n var canni = b.querySelectorAll(\"img.canni\");\n return saints.length+canni.length;\n}", "getHealthCheckTotalCount ({ commit }) {\n const getItems = async () => {\n const entities = await api.getAllHealthChecks()\n const count = entities.items.length\n\n commit('SET_TOTAL_HEALTH_CHECK_COUNT', count)\n }\n\n getItems()\n }", "function question6() {\n // Answer:\n let itemCount = 0;\n for (let i = 0; i < data.length; i++) {\n if (data[i].who_made === \"i_did\") {\n itemCount++;\n }\n }\n console.log(itemCount + \" items were made by there sellers.\");\n}", "function getTotalBooksCount(books) \n{\n return books.length;\n}", "function countItemsInList(list) {\n var count = 0;\n if (list.length === 0) return count;\n return (count += 1 + countItemsInList(list.slice(1)));\n}", "async getCount() {\n return axios\n .get(UrlBuilder[this.storeType].paths.count, createHeaders())\n .then(response => response.data)\n .catch(error => handleError(error.response))\n }", "size(){\n // Object.keys returns an array of all the properties of a given obj...\n return Object.keys(this.items).length;\n\n \n // OR, iterate thru object and increase counter for each (this does the same thing as Object.keys does under the hood)\n // var count = 0;\n // for (var key in this.items){\n // if (this.items.hasOwnProperty(key)){\n // count++;\n // }\n // }\n // return count;\n \n }", "function calcCountOfItemHr(wrapperWidth) {\n var itemWidth = getItemSize();\n\n return Math.floor(wrapperWidth / itemWidth);\n}", "function nbItems(list){\n var count = list.length;\n for (var i = 0; i < list.length; i++) {\n count += list[i].users.length;\n }\n return count;\n }", "function countShowing (dropList) {\r\n\tlet dropListItems = dropList.children;\r\n\tlet n = 0;\r\n\tfor (var i = 0; i < dropListItems.length; i++) {\r\n\t\tif (dropListItems[i].classList.contains(\"show\")) {\r\n\t\t\tn++;\r\n\t\t}\r\n\t}\r\n\treturn n;\r\n}", "function get_quantity_of_boats() {\n const q = datastore.createQuery(BOAT);\n return datastore.runQuery(q).then((entities) => {\n return entities[0].map(ds.fromDatastore).length;\n });\n}", "function getNumOfItems(items, name) {\n\n let keys = Object.keys(items);\n let total = 0;\n\n for(let i = 0; i < keys.length; i++){\n if(keys[i] == name && items[keys[i]] != null){\n console.log('Name of the item: ', keys[i], ' Amount: ', items[keys[i]]);\n total += items[keys[i]];\n }\n }\n return total;\n}", "function totalNumberOfItems(numbOfItemsInCart){\n //takes in the shopping cart as input\n //returns the total number all item quantities\n //return the sum of all of the quantities from each item type\n var totItems = 0;\n for (let i = 0; i < numbOfItemsInCart.items.length; i++) {\n totItems += numbOfItemsInCart.items[i].quantity;\n }\n return totItems;\n}", "contadorCarrito(){\r\n return this.itemsCarrito().length\r\n }", "getProductsCountByCategory(){\n\n\n for (let index = 0; index < this.state.labels.length; index++) {\n\n let key = this.state.labels[index];\n\n const token = localStorage.getItem('token');\n axios.get(`http://${config.host}:${config.port}/registration/byUni/` + key, {\n headers:\n {\n token: token\n\n }\n }).then(res => {\n\n this.setState({\n \n productArray: res.data.data\n \n \n \n })\n\n \n \n this.state.data.push(this.state.productArray.length);\n DataArray[index]=this.state.productArray.length;\n\n \n \n \n\n \n\n \n }).catch(err => {\n console.log(err);\n\n\n })\n \n }\n\n \n \n \n }", "function calcTotalCart(item){\n //console.log(\"item count\" + item.count);\n total = total + item.count;\n var productName = products.find(y => y.id == item.id).name;\n //Display each individual item name and it's individual count\n console.log(productName + \" - Quantity = \" + item.count);\n }", "function getTotalNumberOfBorrows(account, books) {\n const borrowsArrays = books.map((book) => book.borrows)\n const flattened = borrowsArrays.reduce((acc, curVal) => acc.concat(curVal));\n return flattened.reduce((acc, curVal) => {\n if (curVal.id === account.id) acc += 1;\n return acc; \n }, 0)\n}", "createItemsCount(architect) {\n let root = architect.createLi();\n\n let itemsCount = root.createSpan(\"pagination__count\");\n itemsCount.addDomProp(\"innerHTML\", this.getItemsCount);\n\n root.addChild(itemsCount);\n architect.addChild(root);\n }", "function getTotalItemCount(){\n\t\t\treturn itemCount;\n\t\t}", "async count() {\r\n const params = {\r\n where: this.getWheres(),\r\n include: this.getIncludes(),\r\n order: this.getOrders(),\r\n distinct: true\r\n };\r\n let model = this.Models();\r\n if (this.getScopes().length > 0) {\r\n _.forEach(this.getScopes(), scope => {\r\n model = model.scope(scope);\r\n });\r\n }\r\n const result = await model.count(params);\r\n return result;\r\n }", "countAll() {\n let sqlRequest = \"SELECT COUNT(*) AS count FROM category\";\n return this.common.findOne(sqlRequest);\n }", "function updateCounts() {\n const counts = knnClassifier.getCountByLabel();\n\n select('#exampleRock').html(counts['Thor'] || 0);\n select('#examplePaper').html(counts['Loki'] || 0);\n select('#exampleScissor').html(counts['Odin'] || 0);\n}", "function getLabelCount() {\n const counts = knnClassifier.getCountByLabel();\n\n blueCount.innerText = counts['Rock'];\n redCount.innerText = counts['Scissor'];\n blackCount.innerText = counts['Paper'];\n}", "function itemsChecked() {\n\tvar number = 0;\n\t$$('.itemCheckBox').each(function(checkbox) {\n\t\tif (checkbox.checked) {\n\t\t\tnumber++;\n\t\t}\n\t}); \n\treturn number;\n}", "getCount() {\n return knex(\"libraries\").count(\"* as count\").from(\"libraries\").first();\n }", "function isProductAlreadyIn(bayProductID) {\n var productsIn = $('#shopping-card-window ul').children('li'),\n count = 1;\n for (var i = 0; i < productsIn.length; i+=1) {\n if ($(productsIn[i]).hasClass(bayProductID)) {\n count = Number($(productsIn[i]).children('.count').text()) + 1;\n //take the number from the span tag and increased with 1\n return count;\n }\n }\n return count;\n }", "function question6 () {\n let sellersIdentified = [];\n let sellersNumbers = 0;\n for(let i = 0; i < data.length; i++) {\n if(data[i].who_made === \"i_did\") {\n sellersIdentified += 1;\n }\n sellersNumbers = sellersIdentified.length;\n }\n console.log(sellersNumbers + \" items were made by their sellers.\");\n}", "function countItems() {\n count = 0;\n completed = 0;\n $.each($('.new-item'), function (index, toDoItem) {\n count++;\n if (toDoItem.firstChild.checked)\n completed++;\n\n });\n}", "function createCount(data, platform, station, survey, speciesBdmer) {\n\tlet count = {\n\t\tcode: \"\",\n\t\tcodePlatform: platform.code,\n\t\tcodeSurvey: survey.code,\n\t\tcodeStation: station.properties.code,\n\t\tdate: null,\n\t\tmonospecies: null,\n\t\tmesures: []\n\t};\n\n\tif (data.META_INSTANCE_NAME === null || data.META_INSTANCE_NAME === \"\") {\n\t\treturn { err: true, msg: \"No name provided\" };\n\t} else {\n\t\tcount.code = data.META_INSTANCE_NAME;\n\t}\n\n\tlet speciesName = [];\n\n\tfor (var key in data) {\n\t\tif (key.startsWith(\"SPECIES_DETAILS_\") && key.endsWith(\"_COUNT\") && data[key] !== null) {\n\t\t\tspeciesName.push(key);\n\t\t}\n\t}\n\n\tfor (let i in speciesName) {\n\t\tlet name = speciesName[i]\n\t\t\t.split(\"SPECIES_DETAILS_\")[1]\n\t\t\t.split(\"_COUNT\")[0]\n\t\t\t.split(\"_\");\n\n\t\tlet refactorName = \"\";\n\n\t\tfor (let y = 0; y < name.length; y++) {\n\t\t\tif (y === name.length - 1) {\n\t\t\t\trefactorName += name[y];\n\t\t\t} else {\n\t\t\t\trefactorName += name[y] + \" \";\n\t\t\t}\n\t\t}\n\t\tspeciesName[i] = refactorName;\n\t}\n\n\tfor (let name of speciesName) {\n\t\tfor (let sp of speciesBdmer) {\n\t\t\tif (sp.names.includes(name.toLowerCase())) {\n\t\t\t\tlet mesure = {\n\t\t\t\t\tcodeSpecies: sp.code,\n\t\t\t\t\tlong: \"\",\n\t\t\t\t\tlarg: \"\"\n\t\t\t\t};\n\t\t\t\tcount.mesures.push(mesure);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (count.mesures.length > 1) {\n\t\tcount.monospecies = false;\n\t} else {\n\t\tcount.monospecies = true;\n\t}\n\n\treturn count;\n}", "async allBrand(brand_id) {\n return db\n .query(\n `SELECT * FROM brand_sales_item\n WHERE brand_id = $1`,\n [brand_id]\n )\n .then(Result.many);\n }", "_getItemCount() {\n return this.options.length + this.optionGroups.length;\n }", "function calc_count_per_meta(data) {\n var count_per_meta = {};\n for(var i = 0; i < data.length; i+=1)\n {\n var row = data[i];\n if(row.meta in count_per_meta)\n {\n count_per_meta[row.meta] += 1;\n }\n else\n {\n count_per_meta[row.meta] = 1;\n }\n }\n \n //convert to array form\n var count_per_meta_array = Object.keys(count_per_meta).map(function (meta) {\n return {\n \"meta\": meta, \n \"total_count\": count_per_meta[meta]\n };\n });\n \n return count_per_meta_array;\n}", "function TotalCount()\n{\n\tvar totalcount = 0;\n\tfor (var i in Cart) {\n\t totalcount += Cart[i].count;\n\t}\n\treturn totalcount;\n}", "function count_of_each_type() {\n var no_of_types = get_number_of_item_types();\n var fruit_type_with_max_count = -1;\n var curr_type_max_count = -1;\n\n for(var i=1; i<=no_of_types; i++) {\n var type_count = get_total_item_count(i);\n\n if (type_count > curr_type_max_count) {\n fruit_type_with_max_count = i;\n curr_type_max_count = type_count;\n }\n }\n\n return fruit_type_to_collect;\n}", "getCartAmount () {\n return _products.length;\n }", "totalChecked() {\n return this.state.items.filter(props => props.checked).length;\n }", "function getTotalBooksCount(books) {\n return books.length\n}", "function countCart(){\n \tvar totalCount=0;\n \tfor(var i in cart){\n \t\ttotalCount+=cart[i].count;\n \t}\n \t return totalCount; \n }", "function countItems(menu) {\n \t\tvar list = menu.split(',');\n \t\tvar number = 0;\n \t\tfor (var i in list) {\n \t\t\tif (list[i].trim() !== '') {\n \t\t\t\t++number;\n \t\t\t}\n \t\t}\n \t\treturn number;\n \t}", "function basketCount() {\n let fullOrderJson = localStorage.getItem(\"fullOrder\");\n // Parse local storage\n let fullOrder = JSON.parse(fullOrderJson);\n if (fullOrder == null) {\n // console.log(\"No buns. fullOrder: \" + fullOrder);\n return;\n } else {\n // Get number of objects from parsed local storage array\n let numberOfBasketObjects = fullOrder.length;\n // Render as an HTML signifier on the basket icon\n let basket = document.getElementById(\"basket\");\n let basketBadge = document.createElement(\"div\");\n basketBadge.className = \"basket-badge\";\n basketBadge.innerText = numberOfBasketObjects;\n basket.appendChild(basketBadge);\n return;\n }\n}", "get totalNumberOfDescendants() {\n let n = 0;\n const counter = (vampire) => {\n for (let offspring of vampire.offsprings) {\n n ++;\n counter(offspring);\n }\n };\n\n counter(this);\n return n;\n }", "function count(){\r\n\r\n\tvar n=0;\r\n\tObject.keys(this.datastore).forEach((key)=>\r\n\t{\r\n\t\t++n;\r\n\t});\r\n\treturn n;\r\n}", "function getOrderItemsCount() {\n AppOrdersService\n .getItemOrderedCount()\n .then(count => {\n vm.ItemOrderedCounter = count;\n });\n }", "function question6 () {\n let c = 0;\n for (let i = 0; i < n; i++){\n if (data[i].who_made == \"i_did\"){\n c += 1;\n }\n } console.log(`${c} items were made by their sellers`)\n return c;\n}", "function getCount(){\ncardCounts = [{'name':'-1', 'value':0}, {'name': '0', 'value':0}, {'name':'1', 'value':0}];\ndiscard.forEach(function(card) {\n val = countValues[card];\n val = parseInt(val);\n cardCounts[val+1].value++;\n})\n}", "findNumOfPackage(cartItems) {\n var totalPrice = 0;\n cartItems.forEach((val, index) => {\n totalPrice += val['Price'];\n })\n return Math.ceil(totalPrice/maxOrderPrice);\n }", "function getBooksBorrowedCount(books) {\n let result = 0\n books.forEach((index)=> {\n let borrow = index.borrows;\n borrow.forEach((index2) =>{\n let total = index2.returned\n if (total === false){ \n result += 1\n }\n })\n })\n return result\n }" ]
[ "0.67231584", "0.6563493", "0.63034475", "0.62030816", "0.6187013", "0.60876316", "0.60441923", "0.6032323", "0.59975", "0.59230274", "0.5913571", "0.59081304", "0.590752", "0.5882206", "0.5869655", "0.5868861", "0.5865619", "0.5865054", "0.58574206", "0.5835562", "0.5833918", "0.58227307", "0.5812632", "0.5780321", "0.5748023", "0.5742234", "0.5689573", "0.56750953", "0.5670736", "0.5664956", "0.56541264", "0.5632091", "0.5612329", "0.5607357", "0.5575046", "0.5528407", "0.5519447", "0.54875255", "0.5481477", "0.5473295", "0.5457003", "0.5456405", "0.54411304", "0.5437143", "0.54350716", "0.54194176", "0.5418184", "0.5413082", "0.5392928", "0.53855616", "0.5369159", "0.53607804", "0.53555167", "0.5355087", "0.53529245", "0.53505176", "0.5348968", "0.53476113", "0.5346971", "0.53464526", "0.53416896", "0.53414667", "0.5340532", "0.5338714", "0.5338164", "0.53333426", "0.53331435", "0.53276443", "0.53274614", "0.53195053", "0.5306621", "0.5300415", "0.5298195", "0.52916825", "0.52873415", "0.52868676", "0.52744335", "0.52715737", "0.5253657", "0.5249656", "0.52477634", "0.5243456", "0.5240064", "0.52362835", "0.52351457", "0.5231752", "0.52296394", "0.521805", "0.52081686", "0.5199353", "0.51963174", "0.5194329", "0.518975", "0.51820314", "0.5180187", "0.51741356", "0.5174035", "0.51708347", "0.5169339", "0.5168886" ]
0.7266751
0
OFF FULLSCREEN OVERLAY MENU
function handleFullscreenMenu() { $('#off-fullscreen-menu li').each(function() { if ($(this).hasClass('menu-item-has-children')) { $(this).children().first().attr('href', '#'); if ($(this).hasClass('mega-menu')) { $(this).removeClass('mega-menu'); } } }); $('#off-fullscreen-menu li.menu-item-has-children > a').append('<span class="fullscreen-dropdown-toggle"></span>'); $('body').on('click', '[data-toggle="fullscreen-menu"]', function(e) { //$('.toggle-menu').toggleClass('active'); e.preventDefault(); e.stopPropagation(); $('body').toggleClass('full-menu-open'); $('#off-fullscreen-menu').toggleClass('full-menu-open'); $('body').on('click', '#off-fullscreen-menu nav > ul li > a', function(e) { e.preventDefault(); e.stopPropagation(); var targetLink = $(this).attr('href'); if (targetLink != '#' && targetLink != '') { $('body').fadeOut(350, function() { window.location.href = targetLink; }); } if ($(this).hasClass('is-open')) { $(this).removeClass('is-open'); $(this).next().slideUp(300); } else { $(this).parent('.submenu').parent().find('.is-open').next().slideUp(300); $(this).parent('.submenu').parent().find('.is-open').removeClass('is-open'); $(this).addClass('is-open'); $(this).next().slideDown(300); } }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OCM_fullscreenAltOpen() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\t$('header#top .slide-out-widget-area-toggle a').addClass('menu-push-out');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('header#top .slide-out-widget-area-toggle:not(.std-menu) .lines-button').addClass('close');\r\n\t\t\t\t\t$('#slide-out-widget-area.fullscreen-alt').show().addClass('open');\r\n\t\t\t\t\t$offCanvasBG.addClass('open');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('body > div[class*=\"body-border\"]').css('z-index', '9995');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.off-canvas-menu-container .menu').transition({\r\n\t\t\t\t\t\ty: '0px',\r\n\t\t\t\t\t\t'opacity': 1\r\n\t\t\t\t\t}, 0);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('.nectar-social.fixed').length == 0) {\r\n\t\t\t\t\t\thideToTop();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('#header-outer.transparent').length > 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($bodyBorderTop.length > 0) {\r\n\t\t\t\t\t\t\t$('.admin-bar #slide-out-widget-area-bg.fullscreen-alt').css({\r\n\t\t\t\t\t\t\t\t'padding-top': ($bodyBorderTop.outerHeight(true) + 32) + 'px'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t$('body:not(.admin-bar) #slide-out-widget-area-bg.fullscreen-alt').css({\r\n\t\t\t\t\t\t\t\t'padding-top': ($bodyBorderTop.outerHeight(true)) + 'px'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Set translateY to 0 in all cases\r\n\t\t\t\t\t$headerOuterEl.stop(true).css('transform', 'translateY(0)');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('#logo .starting-logo').length > 0 && \r\n\t\t\t\t\t$window.width() > 1000 && \r\n\t\t\t\t\t$('#header-outer[data-format=\"centered-menu-bottom-bar\"].fixed-menu').length == 0 && \r\n\t\t\t\t\t$('body.material #header-outer[data-condense=\"true\"]').length == 0 && \r\n\t\t\t\t\t!nectarDOMInfo.usingFrontEndEditor) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$headerOuterEl.stop(true).css('transform', 'translateY(0)').addClass('transparent');\r\n\t\t\t\t\t\tif ($headerOuterEl.attr('data-transparent-header') != 'true') {\r\n\t\t\t\t\t\t\t$headerOuterEl.attr('data-transparent-header', 'true').addClass('pseudo-data-transparent');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.off-canvas-menu-container .clip-wrap').css('transition-duration', '0s');\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('.off-canvas-menu-container .menu > li').each(function (i) {\r\n\t\t\t\t\t\t\t$(this).delay(i * 50).transition({\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\t'opacity': 1\r\n\t\t\t\t\t\t\t}, 750, 'easeOutCubic').addClass('no-pointer-events');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t$('.off-canvas-menu-container .menu > li').removeClass('no-pointer-events');\r\n\t\t\t\t\t\t\t$('.off-canvas-menu-container .clip-wrap').css('transition-duration', '.45s');\r\n\t\t\t\t\t\t}, 500);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen-alt .widget').each(function (i) {\r\n\t\t\t\t\t\t\t$(this).delay(i * 100).transition({\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\t'opacity': 1\r\n\t\t\t\t\t\t\t}, 650, 'easeOutCubic');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}, 200);\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links').addClass('line-shown');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links li').css('opacity', '1').each(function (i) {\r\n\t\t\t\t\t\t\t$(this).delay(i * 50).transition({\r\n\t\t\t\t\t\t\t\t'scale': 1\r\n\t\t\t\t\t\t\t}, 400, 'easeOutCubic');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t$('#slide-out-widget-area .bottom-text').transition({\r\n\t\t\t\t\t\t\t'opacity': 1\r\n\t\t\t\t\t\t}, 600, 'easeOutCubic');\r\n\t\t\t\t\t}, 200);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Fade In BG Overlay\r\n\t\t\t\t\tvar $opacity = 0.4;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($offCanvasBG.hasClass('solid')) {\r\n\t\t\t\t\t\t$opacity = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($offCanvasBG.hasClass('dark')) {\r\n\t\t\t\t\t\t$opacity = 0.97;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($offCanvasBG.hasClass('medium')) {\r\n\t\t\t\t\t\t$opacity = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($offCanvasBG.hasClass('light')) {\r\n\t\t\t\t\t\t$opacity = 0.4;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$offCanvasBG.removeClass('no-transition');\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$offCanvasBG.addClass('padding-removed').css({\r\n\t\t\t\t\t\t'height': '100%',\r\n\t\t\t\t\t\t'width': '100%',\r\n\t\t\t\t\t\t'left': '0',\r\n\t\t\t\t\t\t'opacity': $opacity\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('.slide-out-widget-area-toggle > div > a').removeClass('animating');\r\n\t\t\t\t\t}, 600);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Overflow state \r\n\t\t\t\t\tOCM_overflowState();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('.mobile #header-outer[data-permanent-transparent=\"false\"]').length > 0 && \r\n\t\t\t\t\t$('.container-wrap').hasClass('no-scroll')) {\r\n\t\t\t\t\t\t$('#ajax-content-wrap').addClass('at-content');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('.mobile #header-outer[data-permanent-transparent=\"false\"]').length > 0 || \r\n\t\t\t\t\t$('.mobile').length == 0 && $('#header-outer.transparent').length == 0) {\r\n\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen-alt .inner-wrap').css('padding-top', $headerOuterEl.height());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function OCM_fullscreenAltClose() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t$('header#top .slide-out-widget-area-toggle a').removeClass('menu-push-out');\r\n\t\t\t\t\t\t}, 350);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.slide-out-widget-area-toggle:not(.std-menu) .lines-button').removeClass('close');\r\n\t\t\t\t\t$('.blurred-wrap').removeClass('blurred');\r\n\t\t\t\t\t$offCanvasBG.removeClass('open');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('#slide-out-widget-area.fullscreen-alt .widget').transition({\r\n\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t}, 500, 'easeOutQuad', function () {\r\n\t\t\t\t\t\t$(this).transition({\r\n\t\t\t\t\t\t\ty: '40px'\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$('#slide-out-widget-area .bottom-text, #slide-out-widget-area .off-canvas-social-links li').transition({\r\n\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t}, 250, 'easeOutQuad');\r\n\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links').removeClass('line-shown');\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.off-canvas-menu-container .menu').transition({\r\n\t\t\t\t\t\ty: '-13px',\r\n\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t}, 400);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('.off-canvas-menu-container .menu > li').stop(true, true).transition({\r\n\t\t\t\t\t\t\ty: '40px',\r\n\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links li').transition({\r\n\t\t\t\t\t\t\t'scale': 0\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links').removeClass('line-shown');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Close submenu items\r\n\t\t\t\t\t\t$('#slide-out-widget-area .menuwrapper .menu').removeClass('subview');\r\n\t\t\t\t\t\t$('#slide-out-widget-area .menuwrapper .menu li').removeClass('subview subviewopen');\r\n\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen-alt .inner .off-canvas-menu-container').css('height', 'auto');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('.mobile #header-outer[data-permanent-transparent=\"false\"]').length > 0 && $('.container-wrap').hasClass('no-scroll')) {\r\n\t\t\t\t\t\t\t$('#ajax-content-wrap').removeClass('at-content');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('.mobile #header-outer[data-permanent-transparent=\"false\"]').length == 0) {\r\n\t\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen-alt .inner-wrap').css('padding-top', '0');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('.slide-out-widget-area-toggle a').removeClass('animating');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$offCanvasBG.css({\r\n\t\t\t\t\t\t\t'height': '1px',\r\n\t\t\t\t\t\t\t'width': '1px',\r\n\t\t\t\t\t\t\t'left': '-100%'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen-alt').hide().removeClass('open');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}, 550);\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\tif ($('.nectar-social.fixed').length == 0) {\r\n\t\t\t\t\t\t\tshowToTop();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, 600);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Fade out overlay\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$offCanvasBG.removeClass('padding-removed');\r\n\t\t\t\t\t}, 50);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar borderDelay = ($bodyBorderHeaderColorMatch == true) ? 150 : 50;\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$offCanvasBG.stop(true).css({\r\n\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tif ($('#header-outer[data-transparent-header=\"true\"]').length > 0) {\r\n\t\t\t\t\t\t\t$('body > div[class*=\"body-border\"]').css('z-index', '10000');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, borderDelay);\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('#header-outer.transparent.small-nav, #header-outer.transparent.detached, #header-outer:not([data-permanent-transparent=\"1\"]).transparent.scrolled-down').removeClass('transparent');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($headerOuterEl.hasClass('pseudo-data-transparent')) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$headerOuterEl.attr('data-transparent-header', 'false')\r\n\t\t\t\t\t\t\t\t.removeClass('pseudo-data-transparent')\r\n\t\t\t\t\t\t\t\t.removeClass('transparent');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}, 100);\r\n\t\t\t\t\t\r\n\t\t\t\t}", "enterFullScreen() {\n }", "enterFullScreen() {\n }", "enterFullScreen() {\n }", "function mytoggleFullScreen(){\n\t\tif(full_screen==true){\n\t\t\t$(\"#full_screen_bt\").html(\"fullscreen_exit\");\n\t\t\tfull_screen=false;\n\t\t}\n\t\telse{\n\t\t\t$(\"#full_screen_bt\").html(\"fullscreen\");\n\t\t\tfull_screen=true;\n\t\t}\n\t}", "function OCM_fullscreenClose() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t$('header#top .slide-out-widget-area-toggle a').removeClass('menu-push-out');\r\n\t\t\t\t\t\t}, 350);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.slide-out-widget-area-toggle:not(.std-menu) .lines-button').removeClass('close');\r\n\t\t\t\t\t$('.blurred-wrap').removeClass('blurred');\r\n\t\t\t\t\t$('#slide-out-widget-area.fullscreen').transition({\r\n\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t}, 700, 'easeOutQuad', function () {\r\n\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen').hide().css('opacity', '1');\r\n\t\t\t\t\t}).removeClass('open');\r\n\t\t\t\t\t$('#slide-out-widget-area.fullscreen .widget').transition({\r\n\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t}, 700, 'easeOutQuad', function () {\r\n\t\t\t\t\t\t$(this).transition({\r\n\t\t\t\t\t\t\ty: '110px'\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('.off-canvas-menu-container .menu > li').transition({\r\n\t\t\t\t\t\t\ty: '80px',\r\n\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links li').transition({\r\n\t\t\t\t\t\t\t'scale': 0\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links').removeClass('line-shown');\r\n\t\t\t\t\t\t$('#slide-out-widget-area .bottom-text').transition({\r\n\t\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Close submenu items\r\n\t\t\t\t\t\t$('#slide-out-widget-area .menuwrapper .menu').removeClass('subview');\r\n\t\t\t\t\t\t$('#slide-out-widget-area .menuwrapper .menu li').removeClass('subview subviewopen');\r\n\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen .inner .off-canvas-menu-container').css('height', 'auto');\r\n\t\t\t\t\t}, 800);\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\tif ($('.nectar-social.fixed').length == 0) {\r\n\t\t\t\t\t\t\tshowToTop();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$('.container-wrap').removeClass('no-shadow');\r\n\t\t\t\t\t}, 500);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Fade out overlay\r\n\t\t\t\t\t$offCanvasBG.stop(true).transition({\r\n\t\t\t\t\t\t'opacity': 0\r\n\t\t\t\t\t}, 900, 'easeOutQuad', function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('.mobile #header-outer[data-permanent-transparent=\"false\"]').length > 0 && $('.container-wrap').hasClass('no-scroll')) {\r\n\t\t\t\t\t\t\t$('#ajax-content-wrap').removeClass('at-content');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($('.mobile #header-outer[data-permanent-transparent=\"false\"]').length == 0) {\r\n\t\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen .inner-wrap').css('padding-top', '0');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('.slide-out-widget-area-toggle a').removeClass('animating');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $opacity = 0.4;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($offCanvasBG.hasClass('solid')) {\r\n\t\t\t\t\t\t\t$opacity = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($offCanvasBG.hasClass('dark')) {\r\n\t\t\t\t\t\t\t$opacity = 0.93;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($offCanvasBG.hasClass('medium')) {\r\n\t\t\t\t\t\t\t$opacity = 0.6;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($offCanvasBG.hasClass('light')) {\r\n\t\t\t\t\t\t\t$opacity = 0.4;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t'height': '1px',\r\n\t\t\t\t\t\t\t'width': '1px',\r\n\t\t\t\t\t\t\t'opacity': $opacity\r\n\t\t\t\t\t\t}).transition({\r\n\t\t\t\t\t\t\ty: '-100%'\r\n\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "static toggleFS(){\n win.setFullScreen(!win.isFullScreen());\n win.setMenuBarVisibility(!win.isFullScreen());\n }", "function fullScreenClick(){\r\n if (game.scale.isFullScreen)\r\n {\r\n game.scale.stopFullScreen();\r\n }\r\n else\r\n {\r\n game.scale.startFullScreen(false);\r\n }\r\n}", "function OCM_fullscreenOpen() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\t$('header#top .slide-out-widget-area-toggle a').addClass('menu-push-out');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Scroll away from fixed reveal footer if shown (firefox bug with bluring over it)\r\n\t\t\t\t\tvar $scrollDelay = 0;\r\n\t\t\t\t\tvar $scrollDelay2 = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop + $window.height() > $('.blurred-wrap').height() && $('#nectar_fullscreen_rows').length == 0) {\r\n\t\t\t\t\t\t$('body,html').stop().animate({\r\n\t\t\t\t\t\t\tscrollTop: $('.blurred-wrap').height() - $window.height()\r\n\t\t\t\t\t\t}, 600, 'easeInOutCubic');\r\n\t\t\t\t\t\t$scrollDelay = 550;\r\n\t\t\t\t\t\t$scrollDelay2 = 200;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('header#top .slide-out-widget-area-toggle:not(.std-menu) .lines-button').addClass('close');\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('.blurred-wrap').addClass('blurred');\r\n\t\t\t\t\t}, $scrollDelay);\r\n\t\t\t\t\t$('#slide-out-widget-area.fullscreen').show().addClass('open');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('.nectar-social.fixed').length == 0) {\r\n\t\t\t\t\t\thideToTop();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Remove box shadow incase at the top of the page with nectar box roll above\r\n\t\t\t\t\t$('.container-wrap').addClass('no-shadow');\r\n\t\t\t\t\t$headerOuterEl.stop(true).css('transform', 'translateY(0)');\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('.off-canvas-menu-container .menu > li').each(function (i) {\r\n\t\t\t\t\t\t\t$(this).delay(i * 50).transition({\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\t'opacity': 1\r\n\t\t\t\t\t\t\t}, 800, 'easeOutExpo');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen .widget').each(function (i) {\r\n\t\t\t\t\t\t\t$(this).delay(i * 100).transition({\r\n\t\t\t\t\t\t\t\ty: 0,\r\n\t\t\t\t\t\t\t\t'opacity': 1\r\n\t\t\t\t\t\t\t}, 800, 'easeOutExpo');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}, 370 + $scrollDelay2);\r\n\t\t\t\t\t\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links').addClass('line-shown');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#slide-out-widget-area .off-canvas-social-links li').each(function (i) {\r\n\t\t\t\t\t\t\t$(this).delay(i * 50).transition({\r\n\t\t\t\t\t\t\t\t'scale': 1\r\n\t\t\t\t\t\t\t}, 400, 'easeOutCubic');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#slide-out-widget-area .bottom-text').transition({\r\n\t\t\t\t\t\t\t'opacity': 0.7\r\n\t\t\t\t\t\t}, 400, 'easeOutCubic');\r\n\t\t\t\t\t}, 750 + $scrollDelay2);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Fade In BG Overlay\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\tvar $easing = ($('body.mobile').length > 0) ? 'easeOutCubic' : 'easeInOutQuint';\r\n\t\t\t\t\t\t$offCanvasBG.css({\r\n\t\t\t\t\t\t\t'height': '100%',\r\n\t\t\t\t\t\t\t'width': '100%'\r\n\t\t\t\t\t\t}).show().stop(true).transition({\r\n\t\t\t\t\t\t\t'y': '0%'\r\n\t\t\t\t\t\t}, 920, $easing, function () {\r\n\t\t\t\t\t\t\t$('.slide-out-widget-area-toggle > div > a').removeClass('animating');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}, 50 + $scrollDelay2);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Overflow state \r\n\t\t\t\t\tOCM_overflowState();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('.mobile #header-outer[data-permanent-transparent=\"false\"]').length > 0 && $('.container-wrap').hasClass('no-scroll')) {\r\n\t\t\t\t\t\t$('#ajax-content-wrap').addClass('at-content');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('.mobile #header-outer[data-permanent-transparent=\"false\"]').length > 0 || $('.mobile').length == 0 && $('#header-outer.transparent').length == 0) {\r\n\t\t\t\t\t\t$('#slide-out-widget-area.fullscreen .inner-wrap').css('padding-top', $headerOuterEl.height());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "helpMenu() {\n this.room2_help_menu.alpha = 1.0;\n this.room2_helpOpen = true;\n }", "onFullScreenChanged () {}", "exitFullScreen() {\n }", "exitFullScreen() {\n }", "exitFullScreen() {\n }", "function menuFull() {\n var $overlay = $('.overlay');\n var $triggerOverlay = $('#trigger-overlay');\n $triggerOverlay.on('click', function(e) {\n if($overlay.hasClass('open')) {\n $overlay.removeClass('open');\n $(this).removeClass('is-active');\n } else {\n $overlay.addClass('open');\n $(this).addClass('is-active');\n }\n return false;\n });\n $overlay.find('a').on('click', function(e) {\n $overlay.removeClass('open');\n $triggerOverlay.removeClass('is-active');\n });\n}", "function toggle(elemid){\n \n if(inFullScreen){\n\n inFullScreen=false;\n\n elemid.exitFullscreen();\n }\n else{\n \n inFullScreen=true;\n\n elemid.requestFullscreen();\n }\n}", "fullscreenClicked () {\n if (this.isFullScreen() === false) {\n this.enterFullScreen()\n } else {\n this.exitFullScreen()\n }\n }", "toggleFullScreenEdit() {\n var isFS = document.body.classList.contains(\n this.FULLSCREEN_MODE_CLASS\n );\n\n if (document.webkitIsFullScreen) {\n document.webkitExitFullscreen();\n }\n\n document.body.classList[isFS ? 'remove' : 'add'](\n this.FULLSCREEN_MODE_CLASS\n );\n this.decreaseRes(this.currentDivider);\n }", "toggleFullScreenEdit() {\n var isFS = document.body.classList.contains(this.FULLSCREEN_MODE_CLASS);\n\n if (document.webkitIsFullScreen) {\n document.webkitExitFullscreen();\n }\n\n document.body.classList[isFS ? 'remove' : 'add'](this.FULLSCREEN_MODE_CLASS);\n this.decreaseRes(this.currentDivider);\n }", "function fullScreen () {\r\n if ( !isFullscreen ){\r\n requestFullScreen( document.body );\r\n isFullscreen = true;\r\n $('.fullscreenButton').addClass('fullscreen-active');\r\n } else {\r\n cancelFullScreen( document.body );\r\n isFullscreen = false;\r\n $('.fullscreenButton').removeClass('fullscreen-active');\r\n }\r\n\r\n }", "onFullScreenModeChanged(is_fullscreen) {}", "drawOffscreen() { }", "requestFullscreen() {\n if (screenfull.isEnabled) {\n screenfull.toggle();\n }\n }", "function triggerOverlayMenu(){\n playSound(menuSound); \n $('.overlay-menu').empty();\n $('.overlay-menu').fadeTo('fast', 1);\n $('.overlay-menu').css('max-height', '600px'); \n $('.overlay-menu').css('display', 'block');\n $('.game').css('opacity', '0.9');\n $('.game').addClass('blurred');\n \n}", "function tl_start() {\n $('#futureman_face, #menu-open').css('display', 'inherit');\n $('.menu-open').css('visibility', 'inherit');\n }", "function fsgo(element) {if(element.requestFullScreen){element.requestFullScreen();} else if(element.mozRequestFullScreen){element.mozRequestFullScreen();} else if(element.webkitRequestFullScreen){element.webkitRequestFullScreen();}}", "function toggleFull(event)\n\t\t{\n\t\t\tg.playSound(\"click\");\n\t\t\n\t\t\tcontext.isFull = !context.isFull;\n\t\t\t\n\t\t\tg.toggleFullScreen();\n\t\t\t\n\t\t\tarrangeFullButtons();\n\t\t\thideButtons(this);\n\t\t}", "toggleFullScreenHandler() {\n Y.doccirrus.DCBinder.toggleFullScreen();\n\n }", "function fullscreen() {\n chrome.windows.getCurrent(function (win) {\n if (win.state === \"fullscreen\") {\n chrome.windows.update(win.id, { state: \"normal\" });\n } else {\n chrome.windows.update(win.id, { state: \"fullscreen\" });\n }\n });\n}", "function toggleFullScreen(){\n if (RunPrefixMethod(document, \"FullScreen\") || RunPrefixMethod(document, \"IsFullScreen\")) {\n RunPrefixMethod(document, \"CancelFullScreen\");\n }\n else {\n RunPrefixMethod(document.getElementById(\"fullscreen\"), \"RequestFullScreen\");\n }\n}", "function __full_screen_btn_click_event()\n{\n fixed_full_screen_btn.on(\"click\",function(){\n if(!is_full_screen)\n {\n __run_full_screen();\n }\n else\n {\n __exit_full_screen();\n }\n });\n}", "function toggleFullScreen() \n{\nif (!document.mozFullScreen && !document.webkitFullScreen) \n{\n if (player.$container.mozRequestFullScreen) \n {\n player.$container.mozRequestFullScreen()\n } \n else \n {\n player.$container.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)\n }\n} \n}", "function showToTop() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop > 350 && !$offCanvasEl.is('.fullscreen.open') ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#to-top').stop().transition({\r\n\t\t\t\t\t\t\t'bottom': '17px'\r\n\t\t\t\t\t\t}, 350, 'easeInOutCubic');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll', showToTop);\r\n\t\t\t\t\t\t$window.on('scroll', hideToTop);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function FullscreenRequest() {\n }", "function toggleHMSClientScreen() {\r\n if(document.getElementById(\"HMSClientScreen\").style.display == \"none\") {\r\n document.getElementById(\"HMSClientScreen\").style.display = \"\";\r\n document.getElementById(\"HMSClientScreen\").style.top = document.documentElement.scrollTop + \"px\";\r\n document.getElementById(\"HMSClientScreen\").style.left = document.documentElement.scrollLeft + \"px\";\r\n document.body.style.overflow = \"hidden\";\r\n } else {\r\n document.getElementById(\"HMSClientScreen\").style.display = \"none\";\r\n document.body.style.overflow = \"\";\r\n };\r\n}", "function showOnlineMenu() {\n\t$('#mainBox').css({'width':'275px','height':'105px'});\n\t$('#mainMenu').hide(0);\n\t$('#onlineMenu').delay(200).show(0); //delay is used to wait for animation\n}", "function ofFullScrenn() {\n console.log(\"work\");\n document.cancelFullscreen();\n document.webkitCancelFullscreen();\n document.mozCancelFullScreen();\n}", "function openFullscreen(elem) {\r\n fullexit.css('display','block')\r\n fullscreen2.css('display','none')\r\n if (elem.requestFullscreen) {\r\n elem.requestFullscreen();\r\n } else if (elem.webkitRequestFullscreen) { /* Safari */\r\n elem.webkitRequestFullscreen();\r\n } else if (elem.msRequestFullscreen) { /* IE11 */\r\n elem.msRequestFullscreen();\r\n }\r\n}", "function toggleFullScreen() {\n fullBut.find('i').toggleClass('active');\nif (!document.fullscreenElement && // alternative standard method\n!document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods\n if (document.documentElement.requestFullscreen) {\n document.documentElement.requestFullscreen();\n } else if (document.documentElement.mozRequestFullScreen) {\n document.documentElement.mozRequestFullScreen();\n } else if (document.documentElement.webkitRequestFullscreen) {\n document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n }\n} else {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n}\n}", "function settingsForScreens(){\n $(\"body\").css(\"visibility\", \"visible\" );\n var menuWidth = parseInt( $(\"#menu-container .menu-content-holder\").css(\"width\"), 10 );\n var menuHider = parseInt( $(\"#menu-container #menu-hider\").width(), 10 );\n var menuHiderIcon = parseInt( $(\"#menu-container #menu-hider #menu-hider-icon\").width(), 10 );\n var menuHeight = parseInt( $(\"#menu-container\").css(\"height\"), 10 );\n\n var menuHiderH = parseInt( $(\"#menu-container #menu-hider\").height(), 10 );\n var menuHiderIconH = parseInt( $(\"#menu-container #menu-hider #menu-hider-icon\").height(), 10 );\n templateMenuW = menuWidth + menuHider;\n $(\"#menu-hider-icon\").click(menuHideClick);\n $(\"#module-container\").css( \"width\", ($(window).width() - templateMenuW) + \"px\" );\n\n if( $(window).width() > 767){\n $(\"#menu-container\").css('left', -(menuWidth + menuHider + menuHiderIcon) + 'px');\n\t\t $(\"#menu-container\").css( 'visibility', 'visible' );\n\n $(\"#menu-hider\").css( 'display', 'inline' );\n $(\"#menu-hider\").css( 'visibility', 'visible' );\n\n /*start-up animation*/\n $(\"#module-container\").css( \"opacity\", 1 );\n \t\t$(\"#module-container\").css( \"left\", menuWidth + menuHider + \"px\" );\n\n $(\"footer\").css( 'display', 'inline' );\n\t\t TweenMax.to( $(\"#menu-container\"), .4, { css:{left: \"0px\"}, ease:Sine.easeInOut, delay: 0.5, onComplete: endStartupAnimation });\n /*end start-up animation*/\n }\n if( $(window).width() <= 767 ){\n templateMenuW = 0;\n var containerH = $(window).height() - (menuHeight + menuHiderH);\n $(\"#menu-container\").css(\"left\", \"0px\");\n $(\"#menu-container\").css(\"top\", -(menuHeight + menuHiderH + menuHiderIconH) + \"px\");\n\t\t $(\"#menu-container\").css( \"visibility\", \"visible\" );\n\n $(\"#menu-hider\").css( \"display\", \"inline\" );\n $(\"#menu-hider\").css( \"visibility\", \"visible\" );\n\n /*start-up animation*/\n $(\"#module-container\").css( \"opacity\", \"1\" );\n \t\t$(\"#module-container\").css( \"left\", \"0px\" );\n $(\"#module-container\").css( \"top\", (menuHeight + menuHiderH) + \"px\" );\n $(\"#module-container\").css( \"height\", containerH );\n\n\t\t TweenMax.to( $(\"#menu-container\"), .4, { css:{top: \"0px\"}, ease:Sine.easeInOut, delay: 0.5, onComplete: endStartupAnimation });\n /*end start-up animation*/\n }\n $(\"#template-smpartphone-menu select\").change(\n function(){\n var customURL = $(this).val();\n if( customURL.indexOf(\"http://\") != -1 ){\n //window.open( customURL, \"_blank\" );\n var custA = '<a id=\"mc-link\" href=\"' + customURL + '\" style=\"display:none;\" target=\"_blank\" />';\n $(\"#template-smpartphone-menu select\").append(custA);\n\n var theNode = document.getElementById('mc-link');\n fireClick(theNode);\n $(\"#template-smpartphone-menu select\").find(\"#mc-link\").remove();\n\n return;\n }\n if( $(this).val() != urlCharDeeplink){\n menuOptionOut(menuOptionID, submenuOptionID, undefined);\n var hashURL = updateMenu( $(this).val(), prevURL, undefined, false);\n window.location.hash = hashURL;\n }\n });\n function fireClick(node){\n \tif ( document.createEvent ) {\n \t\tvar evt = document.createEvent('MouseEvents');\n \t\tevt.initEvent('click', true, false);\n \t\tnode.dispatchEvent(evt);\n \t} else if( document.createEventObject ) {\n \t\tnode.fireEvent('onclick') ;\n \t} else if (typeof node.onclick == 'function' ) {\n \t\tnode.onclick();\n \t}\n }\n }", "function backToMenuFromGame()\r\n\t\t{\r\n\t\t\tresetMatch();\r\n\t\t\tcancelAnimationFrame(requestId);\r\n\t\t\tdocument.getElementById('canvasSpace').style.display = \"none\";\r\n\t\t\tdocument.getElementById('menuInGame').style.display = \"none\";\r\n\t\t\tdocument.getElementById('settings').style.display = \"none\";\r\n\t\t\tdocument.getElementById('menu').style.display = \"initial\";\r\n\t\t}", "function screenOn() {\n clearTimeout(screenOff);\n lcd.bgColor(\"ffffff\");\n screenOff = setTimeout(function() {\n lcd.bgColor(\"000000\");\n }, 10000);\n }", "function toggleScreen() {\n var x = document.getElementById(\"changeIcon\");\n if (x.className === \"fas fa-expand-arrows-alt\") {\n x.className = \"fas fa-compress-arrows-alt\";\n openFullscreen();\n } else {\n x.className = \"fas fa-expand-arrows-alt\";\n closeFullscreen();\n }\n }", "function fullScreen() {\n /*\n if (divSimula.requestFullscreen) {\n divSimula.requestFullscreen();\n } else if (divSimula.webkitRequestFullscreen) {\n divSimula.webkitRequestFullscreen();\n } else if (divSimula.mozRequestFullScreen) {\n divSimula.mozRequestFullScreen();\n } else if (divSimula.msRequestFullscreen) {\n divSimula.msRequestFullscreen();\n }\n //*/\n }", "function toggleFullScreen (e) {\n\n isFullScreen = ( document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement );\n\n\t if ( isFullScreen ) {\n\t \tshowControl();\n\t } else {\n\t \thideControl();\n\t \t\n\t }\n}", "killMenu() {\n isReady = false;\n API.showCursor(false);\n API.setHudVisible(true);\n API.setChatVisible(true);\n API.setCanOpenChat(true);\n API.callNative(\"_TRANSITION_FROM_BLURRED\", 3000);\n }", "toggleFullScreenHandler() {\n Y.doccirrus.DCBinder.toggleFullScreen();\n \n\n }", "function toggleUI(param) {\r\n\tset('V[screenMODE]',param.l_mode);\r\n}", "function off() {\n document.getElementById(\"overlay\").style.display = \"none\";\n}", "function toMenu() {\n\tclearScreen();\n\tviewPlayScreen();\n}", "function powerOff(){\n\n\t\t\t//Generate empty terminal\n\t\t\t$('#terminal').html(framework['empty']);\n\n\t\t\t//Change background image\n\t\t\t$('#terminal-container').css(\"background-image\", \"url('images/monitorborder.png')\");\n\n\t\t\t//Change button to powerOn\n\t\t\tbuttonOn();\n\t\t}", "function toggleFullScreen(subProcess) {\n if (subProcess.fullScreen) {\n subProcess.fullScreen = false;\n subProcess.className = \"subProcess\";\n subProcess.style.position = \"\";\n subProcess.style.left = \"\";\n subProcess.style.top = \"\";\n subProcess.style.width = \"\";\n subProcess.style.height = \"\";\n // subProcess.style.zIndex = \"\";\n }\n else {\n subProcess.fullScreen = true;\n subProcess.className = \"subProcess fullScreen\";\n subProcess.style.position = \"absolute\";\n subProcess.style.left = \"0px\";\n subProcess.style.top = \"0px\";\n subProcess.style.width = \"100%\";\n subProcess.style.height = \"100%\";\n\n }\n \n}", "function hideMenu()\n{\n\t\t\n\t\t//set a timeout and then kill all the menu's\n\t\t//we will check in menuHandler() to see if some stay lit.\n\t\tmenuTimeout= setTimeout(\"killMenu('all');\",800);\n\t\t\n\t\tflagMenuSwitch=\"off\";\n\t\t\n}//end hideMenu() function", "function menuForSmallScreen() {\n navMenuList.hide();\n\n hideMenuBtn.addClass(ClassName.NONE);\n showMenuBtn.removeClass(ClassName.NONE);\n\n function toggleSmallMenu() {\n navMenuList.fadeToggle();\n toggleButtons();\n }\n\n function toggleMenuEventHandler(event) {\n event.preventDefault();\n toggleSmallMenu();\n }\n\n hideMenuBtn.click(toggleMenuEventHandler);\n showMenuBtn.click(toggleMenuEventHandler);\n menuEl.click(function () {\n setTimeout(toggleSmallMenu, 600);\n });\n }", "function __toggleOffscreenContent() {\n\n\t\tif (sOpen) {\n\t\t\t$content.fadeOut();\n\t\t\t$body.toggleClass('no-scroll');\n\t\t\tsOpen = false;\n\t\t} else {\n\t\t\t$content.fadeIn();\n\t\t\t$body.toggleClass('no-scroll');\n\t\t\tsOpen = true;\n\t\t}\n\n\t}", "function menuFull() {\n if ($('#trigger-overlay').length > 0) {\n $('#trigger-overlay').click(function () {\n if ($('.overlay').hasClass('open')) {\n $('.overlay').removeClass('open');\n $(this).removeClass('is-active');\n } else {\n $('.overlay').addClass('open');\n $(this).addClass('is-active');\n }\n return false;\n });\n $('.overlay').find('a').on('click', function (e) {\n $('.overlay').removeClass('open'), $('.dropdown-icon').removeClass('is-active');\n });\n }\n}", "function showLocalMenu() {\n\t$('#mainBox').css({'width':'300px','height':'170px'});\n\t$('#mainMenu').hide(0);\n\t$('#localMenu').delay(200).show(0); //delay is used to wait for animation\n}", "function exit_fullscreen() {\n\tisFullscreen = false;\n\t\n\t// Move the canvas element to its original position\n\tvar canvas_elem = $(\"#canvas\").detach();\n\t$(\"#canvas_div\").prepend(canvas_elem);\n\t$(\"#canvas\").removeClass(\"canvas-full\");\n\t$(\"#canvas\").addClass(\"canvas-part\");\n\t\n\t// if ($('#btn-group-location-fullscreen').is(':visible')) {\n\t\t// var location_buttons = $('#btn-group-location-fullscreen').children().detach();\n\t\t// $('#btn-group-location').prepend(location_buttons);\n\t\t// $('#btn-group-location').show();\n\t\t// $('#btn-group-location-fullscreen').hide();\n\t// }\n\t\n\t$('#canvas_button_group').removeClass(\"full\").addClass(\"part\");\n\t\n\t// Show the \"full screen\" button\n\t// $(\"#btn-fullscreen\").removeClass(\"exit\").addClass(\"enter\");\n\t// $(\"#btn-fullscreen\").show();\n\t// $(\"#btn-exit-fullscreen\").hide();\n\t\n\t// Launch an \"exit-fullscreen\" event\n\tvar evt = document.createEvent(\"Event\");\n\tevt.initEvent(\"exit-fullscreen\", true, false);\n\tdocument.dispatchEvent(evt);\n}", "function menuForLargeScreen() {\n navMenuList.show();\n\n timerObj = setTimeout(function () {\n menuPanel.addClass(ClassName.MENU_PANEL__COMPRESSED);\n hideMenuBtn.addClass(ClassName.NONE);\n showMenuBtn.removeClass(ClassName.NONE);\n }, 5000);\n\n function toggleMenuEventHandler(event) {\n event.preventDefault();\n toggleButtons();\n menuPanel.toggleClass(ClassName.MENU_PANEL__COMPRESSED);\n }\n\n hideMenuBtn.click(toggleMenuEventHandler);\n showMenuBtn.click(toggleMenuEventHandler);\n\n menuPanel.mouseenter(function () {\n clearTimeout(timerObj);\n menuPanel.removeClass(ClassName.MENU_PANEL__COMPRESSED);\n hideMenuBtn.removeClass(ClassName.NONE);\n showMenuBtn.addClass(ClassName.NONE);\n });\n menuPanel.mouseleave(function () {\n if (!menuPanel.hasClass(ClassName.MENU_PANEL__COMPRESSED)) {\n timerObj = setTimeout(function () {\n menuPanel.addClass(ClassName.MENU_PANEL__COMPRESSED);\n toggleButtons();\n }, 2000);\n }\n });\n }", "function switchFullscreen() { //Fullscreen ON\n if (fullscreenClick == 0) { //when fullscreenClick is equal to 0 then activate everything under this.\n if (holeDoc.requestFullscreen) { //When elem (document).requestFullscreen is active then \n holeDoc.requestFullscreen();\n } else if (holeDoc.mozRequestFullScreen) { /* Firefox */\n holeDoc.mozRequestFullScreen();\n } else if (holeDoc.webkitRequestFullscreen) { /* Chrome, Safari and Opera */\n holeDoc.webkitRequestFullscreen();\n } else if (holeDoc.msRequestFullscreen) { /* IE/Edge */\n holeDoc.msRequestFullscreen();\n }\n FSonOff.innerHTML = 'ON';\n fullscreenClick = 1;\n }\n\n else if (fullscreenClick == 1) { //Fullscreen OFF\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.mozCancelFullScreen) { /* Firefox */\n document.mozCancelFullScreen();\n } else if (document.webkitExitFullscreen) { /* Chrome, Safari and Opera */\n document.webkitExitFullscreen();\n } else if (document.msExitFullscreen) { /* IE/Edge */\n document.msExitFullscreen();\n }\n FSonOff.innerHTML = 'OFF';\n fullscreenClick = 0;\n }\n}", "function fullscreen() {\n\tisFullscreen = true;\n\t\n\t// Move the canvas element to be the first element of the\n\t// document and make it occupy the entire screen\n\tvar canvas_elem = $(\"#canvas\").detach();\n\t$(\"body\").prepend(canvas_elem);\n\t$(\"#canvas\").removeClass(\"canvas-part\");\n\t$(\"#canvas\").addClass(\"canvas-full\");\n\t\n\t// if ($('#btn-group-location').is(':visible')) {\n\t\t// var location_buttons = $('#btn-group-location').children().detach();\n\t\t// $('#btn-group-location-fullscreen').prepend(location_buttons);\n\t\t// $('#btn-group-location').hide();\n\t\t// $('#btn-group-location-fullscreen').show();\n\t// }\n\n\t$('#canvas_button_group').removeClass(\"part\").addClass(\"full\");\n\t\n\t// Show the \"exit full screen\" button\n\t// $(\"#btn-fullscreen\").removeClass(\"enter\").addClass(\"exit\");\n\t// $(\"#btn-fullscreen\").hide();\n\t// $(\"#btn-exit-fullscreen\").show();\n\t\n\t// Launch an \"enter-fullscreen\" event\n\tvar evt = document.createEvent(\"Event\");\n\tevt.initEvent(\"enter-fullscreen\", true, false);\n\tdocument.dispatchEvent(evt);\n}", "function on_paint()\n{\n var scoped = entity_get_prop(entity_get_local_player(), \"CCSPlayer\", \"m_bIsScoped\");\n\n if (ui_is_menu_open() || !entity_is_alive(entity_get_local_player()) || !entity_get_local_player()) return;\n ui_set_value(\"Visual\", \"SELF\", \"Chams\", \"Configure\", 0);\n ui_set_value(\"Visual\", \"SELF\", \"Chams\", \"Visible override\", scoped ? false : true);\n}", "function handleFullscreen()\n{\n\tcreateWindow(!isFullscreen); // Toggle full / windowed\n\tgame.window = mainWindow;\n}", "function fullscreenOn() {\n\tif (elem.requestFullscreen) {\n\t\telem.requestFullscreen();\n\t} else if (elem.webkitRequestFullscreen) {\n\t\t// Safari \n\t\telem.webkitRequestFullscreen();\n\t} else if (elem.msRequestFullscreen) {\n\t\t// IE 11\n\t\telem.msRequestFullscreen();\n\t}\n}", "function openFullscreen() {\n if (elem.requestFullscreen) {\n elem.requestFullscreen();\n } else if (elem.mozRequestFullscreen) { /* Safari */\n elem.webkitRequestFullscreen();\n } else if (elem.requestFullscreen) { /* IE11 */\n elem.requestFullscreen();\n }\n}", "function exitFullscreen () {\n\n if ( document.exitFullscreen ) {\n\n document.exitFullscreen();\n\n } else if ( document.webkitExitFullscreen ) {\n\n document.webkitExitFullscreen();\n\n } else if ( document.webkitCancelFullScreen ) {\n\n document.webkitCancelFullScreen();\n\n } else if ( document.mozCancelFullScreen ) {\n\n document.mozCancelFullScreen();\n\n } else if ( document.msExitFullscreen ) {\n\n document.msExitFullscreen();\n\n }\n\n // Restore the Ui\n\n showControlPanel();\n\n }", "onFocus() {\n setTimeout(function() {\n if(config.get(\"focusPathOfExile\") && !this.settingsMenuActive && !this.overrideFocus) {\n Helpers.setAlwaysOnTop();\n Helpers.focusGame();\n }\n }, 20);\n }", "static toggleMenu() {\n var win = $(\"#window\")[0];\n\n if (win.classList.contains(MENU_ACTIVE)) {\n this.menuOff();\n }\n else {\n this.menuOn();\n }\n }", "function playbutton(){\n document.querySelector('#startMenu').style.display = \"none\";\n bg_call();\n }", "toggleFullScreenHandler() {\n const viewportIsWide = Y.doccirrus.DCBinder.toggleFullScreen();\n\n this.isFullScreen( viewportIsWide );\n }", "function onlineToMain() {\n\t$('#mainBox').css({'width':'500px','height':'200px'});\n\t$('#onlineMenu').delay(100).hide(0); \n\t$('#mainMenu').delay(200).show(0).delay(200); //delay is used to wait for animation\n}", "function openFullscreen() {\r\n if (elem.requestFullscreen) {\r\n elem.requestFullscreen();\r\n } else if (elem.mozRequestFullScreen) { /* Firefox */\r\n elem.mozRequestFullScreen();\r\n } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */\r\n elem.webkitRequestFullscreen();\r\n } else if (elem.msRequestFullscreen) { /* IE/Edge */\r\n elem = window.top.document.body; //To break out of frame in IE\r\n elem.msRequestFullscreen();\r\n }\r\n}", "function hideOverlay() {\n getId('levelOverlay').style.display = \"none\";\n getId('quitOverlay').style.display = \"none\";\n getId('buttonLeft').style.display = \"none\";\n getId('buttonRight').style.display = \"none\";\n getId('playAgain').style.display = \"none\";\n}", "function showOverlay() {\n $overlay.show();\n checkBuyable();\n checkActiveCross();\n checkMilestones();\n menuVisible = true;\n }", "function callback() {\n touchTarget.removeEventListener(theScreen._touchEvent, callback);\n theScreen.requestFullScreen(element, onFullScreenChange);\n }", "function toggleFullScreen() {\r\n var a = $(window).height() - 10;\r\n\r\n if (!document.fullscreenElement && // alternative standard method\r\n !document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods\r\n if (document.documentElement.requestFullscreen) {\r\n document.documentElement.requestFullscreen();\r\n } else if (document.documentElement.mozRequestFullScreen) {\r\n document.documentElement.mozRequestFullScreen();\r\n } else if (document.documentElement.webkitRequestFullscreen) {\r\n document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\r\n }\r\n } else {\r\n if (document.cancelFullScreen) {\r\n document.cancelFullScreen();\r\n } else if (document.mozCancelFullScreen) {\r\n document.mozCancelFullScreen();\r\n } else if (document.webkitCancelFullScreen) {\r\n document.webkitCancelFullScreen();\r\n }\r\n }\r\n $('.full-screen > i').toggleClass('icon-maximize');\r\n $('.full-screen > i').toggleClass('icon-minimize');\r\n}", "doFullscreen() {\n if (this.isFullscreen()) {\n //Throw error maybe?\n return\n }\n this._domElement.requestFullscreen()\n }", "restore () {\n\t\tthis.$element.removeClass('screenlayer-minimized');\n\t\tthis.show();\n\t}", "function setupFullScreen(){\n makeFullScreenButton();\n\n document.getElementById('fullscreen').addEventListener(\"click\", function(){\n if(_renderer.domElement.requestFullscreen) {\n _renderer.domElement.requestFullscreen();\n } else if(_renderer.domElement.mozRequestFullScreen) {\n _renderer.domElement.mozRequestFullScreen();\n } else if(_renderer.domElement.webkitRequestFullscreen) {\n _renderer.domElement.webkitRequestFullscreen();\n } else if(_renderer.msRequestFullscreen) {\n _renderer.domElement.msRequestFullscreen();\n }\n });\n }", "function show_menu_bars(){\n if(window.innerWidth <= 1000){\n setAct(true)\n setNavs(false)\n }\n else{\n setAct(false)\n setNavs(true)\n }\n }", "function toFakeFullScreen(){\n\t\t\n\t\tjQuery(\"body\").addClass(\"ug-body-fullscreen\");\n\t\tg_objWrapper.addClass(\"ug-fake-fullscreen\");\n\t\t\n\t\tg_temp.isFakeFullscreen = true;\n\t\t\n\t\tg_objGallery.trigger(t.events.ENTER_FULLSCREEN);\n\t\tg_objGallery.trigger(t.events.SIZE_CHANGE);\n\t}", "function hideOverlay() {\n $overlay.hide();\n menuVisible = false;\n }", "function toggleFullScreen() {\n var a = $(window).height() - 10;\n\n if (!document.fullscreenElement && // alternative standard method\n !document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods\n if (document.documentElement.requestFullscreen) {\n document.documentElement.requestFullscreen();\n } else if (document.documentElement.mozRequestFullScreen) {\n document.documentElement.mozRequestFullScreen();\n } else if (document.documentElement.webkitRequestFullscreen) {\n document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n }\n } else {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n }\n $('.full-screen > i').toggleClass('icon-maximize');\n $('.full-screen > i').toggleClass('icon-minimize');\n}", "function Start () {\n\t//Don't light up any lanes \n\tshow = false;\n\t//Disable all lanes\n\tDeactivate();\n}", "function hideToTop() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop < 350 || $offCanvasEl.is('.fullscreen.open') ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $animationTiming = ($('#slide-out-widget-area.fullscreen.open').length > 0) ? 1150 : 350;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#to-top').stop().transition({\r\n\t\t\t\t\t\t\t'bottom': '-30px'\r\n\t\t\t\t\t\t}, $animationTiming, 'easeInOutQuint');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll', hideToTop);\r\n\t\t\t\t\t\t$window.on('scroll', showToTop);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function startAction() {\n\n overlay.style.display = 'none';\n introduction.style.display = 'none';\n actionCleanup();\n startGame();\n\n}", "function toggleFullScreen() {\n if (!document.fullscreenElement && // alternative standard method\n !document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods\n if (document.documentElement.requestFullscreen) {\n document.documentElement.requestFullscreen();\n } else if (document.documentElement.mozRequestFullScreen) {\n document.documentElement.mozRequestFullScreen();\n } else if (document.documentElement.webkitRequestFullscreen) {\n document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n }\n } else {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n }\n }", "function toggleFullScreen() {\n if (!document.fullscreenElement && // alternative standard method\n !document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods\n if (document.documentElement.requestFullscreen) {\n document.documentElement.requestFullscreen();\n } else if (document.documentElement.mozRequestFullScreen) {\n document.documentElement.mozRequestFullScreen();\n } else if (document.documentElement.webkitRequestFullscreen) {\n document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\n }\n } else {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n }\n }\n }", "function RequestFullscreen() {\n var doc = document,\n docEl = doc.documentElement,\n rfs = docEl.requestFullscreen ||\n docEl.mozRequestFullScreen ||\n docEl.webkitRequestFullScreen ||\n docEl.msRequestFullscreen,\n $fsicon = $('#fs_toggle').find('i');\n try {\n rfs.call(docEl);\n $fsicon.prop({ 'class': 'fa fa-compress button' });\n }\n catch (ex) {\n alert(\"Full screen mode not supported in this browser.\");\n }\n}", "function MenuWatchdog()\n{\n g_MenuWDCounter++;\n if(g_MenuWDCounter > 20)\n {\n doMenuFadeOut();\n }\n}", "function lvlScreen(){\n\tconsole.log('lvlScreen');\n\tdocument.removeEventListener('keydown', enter, false);\n\tdisplayInstruct = false;\n\tbackgroundCtx.clearRect(0, 0, backgroundCan.width, backgroundCan.height);\n}", "function Full_Screen() {\n\n var rtsp = document.getElementById('RTSPCtl');\n var is_full = rtsp.Get_Full();\n\n if (!is_full) rtsp.Set_Full(1);\n else rtsp.Set_Full(0);\n}", "function callback() {\n touchTarget.removeEventListener(theScreen._touchEvent, callback);\n theScreen.requestFullScreen(element, onFullScreenChange);\n }", "function showMenu() {\r\n togMenu=true;\r\n togSet=false;\r\n ctx.fillStyle = \"black\";\r\n ctx.globalAlpha = 0.9; \r\n ctx.fillRect(120, 40, 950, 600);\r\n ctx.globalAlpha = 1.0; \r\n ctx.fillStyle = \"white\";\r\n ctx.textAlign = \"center\"; \r\n ctx.font = \"45px Arial\";\r\n ctx.fillText(\"Settings\", w, 100);\r\n ctx.font = \"35px Arial\";\r\n\r\n if (speechOn) {\r\n ctx.fillText(\"Speech: On - press O to change\", w, 210);\r\n if (keys[79]) { //o\r\n speechOn=false;\r\n }\r\n }\r\n\r\n if (!speechOn) {\r\n ctx.fillText(\"Speech: Off - press B to change\", w, 210);\r\n if (keys[66]) { //b\r\n speechOn=true;\r\n }\r\n }\r\n\r\n /*------------------------------------------------------ */\r\n\r\n \r\n if (musicOn) {\r\n ctx.fillText(\"Music: On - press M to change\", w, 310);\r\n if (keys[77]) { //m\r\n musicOn=false;\r\n }\r\n }\r\n\r\n if (!musicOn) {\r\n ctx.fillText(\"Music: Off - press U to change\", w, 310);\r\n if (keys[85]) { //u\r\n musicOn=true;\r\n }\r\n }\r\n\r\n /*------------------------------------------------------ */\r\n\r\n if (picOn) {\r\n ctx.fillText(\"Picture: On - press C to change\", w, 410);\r\n if (keys[67]) { //o\r\n picOn=false;\r\n }\r\n }\r\n\r\n if (!picOn) {\r\n ctx.fillText(\"Colour: On - press I to change\", w, 410);\r\n if (keys[73]) { //f\r\n picOn=true;\r\n }\r\n }\r\n\r\n ctx.font = \"30px Arial\";\r\n ctx.fillText(\"Return to Game\", w, 560);\r\n ctx.fillText(\"Press A\", w, 610);\r\n\r\n if (keys[65]) { //a\r\n togSet=true;\r\n togMenu=false;\r\n }\r\n}", "function power(){ \r\n\tif(screenOn === false){\r\n\t\tscreenOn = true;\r\n\t\t$(\"#lockscreen\").attr(\"style\", \"display: block;\"); /*shows lockscreen wallpaper*/\r\n\r\n\t\tconsole.log(screenOn, \"Screen is on\");\r\n\t}else{ //turns off phone screen\r\n\t\thome();\r\n\t\tscreenOn = false;\r\n\t\tscreenLocked = true;\r\n\t\t$(\"#screen\").attr(\"style\", \"background-color: #222;\"); /*makes screen color black*/\r\n\t\t$(\"#lockscreen\").attr(\"style\", \"display: none;\"); /*Hides lockscreen wallpaper*/\r\n\t\t$(\"#normal-screen\").attr(\"style\", \"display: none;\"); /*hides normal screen wallpaper*/\r\n\t\t$(\"#notification-box\").css(\"display\", \"none\"); //hides notification box\r\n\t\tfxLockScreen.play(); //plays lock screen sound\r\n\r\n\t\tconsole.log(screenOn, \"Screen is off\");\r\n\t}\r\n}", "function full_screenchange_handler(event){\n\tif(document.fullscreen==true || document.mozFullScreen==true || document.webkitIsFullScreen==true){\n\t\t//turn on\n\t\tFS = true;\n\t\tif(PLACE == 'game'){\n\t\t\tcheck_canvas_sizes();\n\t\t\tdraw_map(false);\n\t\t\t}\n\t\t}\n\tif(document.fullscreen==false || document.mozFullScreen==false || document.webkitIsFullScreen==false){\n\t\t//turn off\n\t\tFS = false;\n\t\tif(PLACE == 'game'){\n\t\t\tcheck_canvas_sizes();\n\t\t\tdraw_map(false);\n\t\t\t}\n\t\telse if(PLACE == 'init'){\n\t\t\tcheck_canvas_sizes();\n\t\t\tinit_game(false);\n\t\t\t}\t\n\t\t}\n\t}", "showMenu() {\n this._game = null;\n this.stopRefresh();\n this._view.renderMenu();\n this._view.bindStartGame(this.startGame.bind(this));\n this._view.bindShowScores(this.showScores.bind(this));\n }", "function setFullScreen(val){\r\n if(val){\r\n $(\"#full-screen-btn\").addClass(\"tbbutton_fullscreen_selected\");\r\n FlexPaperFullScreen = true;\r\n }else{\r\n FlexPaperFullScreen = false;\r\n }\r\n}", "startMainMenu()\n {\n // We check if the player is on mobile and open fullscreen\n let os = theGame.device.os;\n if(os.android || os.iOS || os.iPad || os.iPhone || os.windowsPhone)\n {\n openFullScreen();\n }\n \n let gameCredits;\n let goat = currentScene.add.image(-100, topBackgroundYOrigin+35, 'GoatMenu');\n let fondo2 = currentScene.add.image(topBackgroundXOrigin, topBackgroundYOrigin, 'Fondo2');\n fondo2.visible = false;\n let logo = currentScene.add.image(topBackgroundXOrigin, topBackgroundYOrigin, 'Logo');\n //logo.visible = false;\n \n // Start Btn\n let startBtn = currentScene.add.image(topBackgroundXOrigin-40, topBackgroundYOrigin+125, 'StartBtn');\n let startHigh = currentScene.add.image(topBackgroundXOrigin-40, topBackgroundYOrigin+125, 'StartHigh');\n startBtn.setInteractive();\n startBtn.on('pointerover', ()=> this.onMenuBtnInteracted(startHigh, true));\n startBtn.on('pointerdown', ()=> this.onMenuBtnInteracted(startHigh, true));\n startBtn.on('pointerup', ()=> this.onMenuBtnInteracted(startHigh, false));\n startBtn.on('pointerout', ()=> this.onMenuBtnInteracted(startHigh, false));\n startBtn.on('pointerup', ()=> interacionManager.interactMenu(\"Start\"));\n\n startBtn.visible = false;\n startHigh.visible = false;\n\n // Continue Btn\n let continueBtn = currentScene.add.image(topBackgroundXOrigin-186, topBackgroundYOrigin+128, 'ContinueBtn');\n let continueHigh = currentScene.add.image(topBackgroundXOrigin-186, topBackgroundYOrigin+128, 'ContinueHigh');\n continueBtn.setInteractive();\n continueBtn.on('pointerover', ()=> this.onMenuBtnInteracted(continueHigh, true));\n continueBtn.on('pointerdown', ()=> this.onMenuBtnInteracted(continueHigh, true));\n continueBtn.on('pointerup', ()=> this.onMenuBtnInteracted(continueHigh, false));\n continueBtn.on('pointerout', ()=> this.onMenuBtnInteracted(continueHigh, false));\n continueBtn.on('pointerup', ()=> interacionManager.interactMenu(\"Continue\"));\n\n continueBtn.visible = false;\n continueHigh.visible = false;\n\n // Credits Btn\n let creditsBtn = currentScene.add.image(topBackgroundXOrigin-308, topBackgroundYOrigin+128, 'CreditsBtn');\n let creditsHigh = currentScene.add.image(topBackgroundXOrigin-308, topBackgroundYOrigin+128, 'CreditsHigh');\n creditsBtn.setInteractive();\n creditsBtn.on('pointerover', ()=> this.onMenuBtnInteracted(creditsHigh, true));\n creditsBtn.on('pointerdown', ()=> this.onMenuBtnInteracted(creditsHigh, true));\n creditsBtn.on('pointerup', ()=> this.onMenuBtnInteracted(creditsHigh, false));\n creditsBtn.on('pointerout', ()=> this.onMenuBtnInteracted(creditsHigh, false));\n creditsBtn.on('pointerup', ()=> enableCredits(this.gameCredits, true));\n\n creditsBtn.visible = false;\n creditsHigh.visible = false;\n\n // Mute Btn\n let muteBtn = currentScene.add.image(topBackgroundXOrigin-395, topBackgroundYOrigin+128, 'MenuMuteBtn');\n let muteHigh = currentScene.add.image(topBackgroundXOrigin-395.9, topBackgroundYOrigin+128, 'MenuMuteHigh');\n muteBtn.setInteractive();\n muteBtn.on('pointerover', ()=> this.onMenuBtnInteracted(muteHigh, true));\n muteBtn.on('pointerdown', ()=> this.onMenuBtnInteracted(muteHigh, true));\n muteBtn.on('pointerup', ()=> this.onMenuBtnInteracted(muteHigh, false));\n muteBtn.on('pointerout', ()=> this.onMenuBtnInteracted(muteHigh, false));\n muteBtn.on('pointerup', ()=> interacionManager.interactMenu(\"Mute\"));\n\n muteBtn.visible = false;\n muteHigh.visible = false;\n\n let timeline = currentScene.tweens.createTimeline();\n\n timeline.add(\n {\n targets: goat,\n x: topBackgroundXOrigin + 175,\n duration: 900\n }\n );\n\n timeline.add( \n {\n targets: fondo2,\n onStart: function()\n {\n fondo2.visible = true;\n let timedEvent = currentScene.time.delayedCall(1300, function()\n {\n musicManager.playThemeSong('Main');\n startBtn.visible = true;\n continueBtn.visible = true;\n creditsBtn.visible = true;\n muteBtn.visible = true;\n\n } , currentScene);\n } \n } \n );\n timeline.play(); \n this.gameCredits = currentScene.add.image(topBackgroundXOrigin, topBackgroundYOrigin, 'GameCredits');\n this.gameCredits.setInteractive();\n this.gameCredits.on('pointerdown', ()=> enableCredits(this.gameCredits, false));\n this.gameCredits.visible = false;\n }" ]
[ "0.6833504", "0.6828152", "0.67699605", "0.67699605", "0.67699605", "0.67404884", "0.67333907", "0.66932297", "0.66915023", "0.659659", "0.65687484", "0.6520185", "0.6515098", "0.6515098", "0.6515098", "0.64546734", "0.6447622", "0.6357631", "0.6350292", "0.63362837", "0.6332375", "0.6328945", "0.6284394", "0.6273853", "0.6268", "0.62287265", "0.62017035", "0.62007695", "0.6200647", "0.61816883", "0.6176525", "0.6175276", "0.6159421", "0.6152848", "0.61498606", "0.61256534", "0.612558", "0.61202633", "0.60963666", "0.6088921", "0.60865283", "0.60842824", "0.607972", "0.60641634", "0.60628635", "0.6061749", "0.6056853", "0.60549563", "0.6053568", "0.6045493", "0.6041904", "0.60354024", "0.60319674", "0.6010535", "0.60056937", "0.60051095", "0.6004615", "0.6004389", "0.59972084", "0.5996224", "0.598551", "0.59796154", "0.5973412", "0.59679496", "0.59539604", "0.59288234", "0.59280044", "0.59233975", "0.5920023", "0.591897", "0.59113026", "0.5906095", "0.58962274", "0.58920085", "0.5888047", "0.58782256", "0.58741486", "0.5869839", "0.58680606", "0.5863341", "0.5852393", "0.585", "0.58423424", "0.58419347", "0.5837252", "0.5835547", "0.58350146", "0.58283305", "0.58283305", "0.5825237", "0.58214", "0.58186865", "0.58141935", "0.5799879", "0.5789516", "0.5785832", "0.57814187", "0.5777253", "0.57771736", "0.5776379" ]
0.59259
67
MANAGE NAVIGATION LOGO / BACKGROUND COLOR Header on Scroll
function navbarScroll() { if ( windowWidth > 1000 && topnav.length > 0 ) { var topScroll = $(window).scrollTop(); var logoImg = $('body').find('#logo a img'); var logoLight = $('body').find('#logo a').data('logo-light'); var logoDark = $('body').find('#logo a').data('logo-dark'); var $navSelectors = $('.main-nav,.main-nav ul.nav > li > a,.main-nav .nav-tools li a'); if ( wrapper.hasClass('onepage-special') ) return; if ( wrapper.hasClass('header-light') ) { logoImg.attr('src', logoDark); } if ( wrapper.hasClass('header-dark') ) { logoImg.attr('src', logoLight); } if ( wrapper.hasClass('transparent-dark') ) { logoImg.attr('src', logoDark); } if ( wrapper.hasClass('nav-bottom') ) { return; } if ( wrapper.hasClass('header-transparent') && wrapper.hasClass('transparent-dark') ) { logoImg.attr('src', logoDark); } var scrollHeight = header.data('scroll-height'); var finalScroll = topnavHeight - headerScrollHeight; var zeroScroll = 0; if ( $('#topbar').length > 0 ) { finalScroll = finalScroll + topbarHeight; zeroScroll = topbarHeight; } if ( topScroll > zeroScroll && topScroll <= finalScroll ) { $navSelectors.css({ 'height' : topnavHeight - ( topScroll - zeroScroll ) }); } else if ( topScroll > finalScroll ) { if ( !wrapper.hasClass( 'header-scroll-full' ) ) { $navSelectors.css({ 'height' : scrollHeight }); wrapper.addClass('header-scroll-full'); header.removeClass( headerSkin ).addClass( headerScrollSkin ); wrapper.removeClass('topnav-top'); } } else { // Initial State $navSelectors.css({ 'height' : '' }); wrapper.addClass('topnav-top'); wrapper.removeClass('header-scroll-full'); header.removeClass( headerScrollSkin ).addClass( headerSkin ); } if (wrapper.hasClass('dark-skin')) { if (wrapper.hasClass('header-light')) { wrapper.removeClass('header-light').addClass('header-dark'); } else { logoImg.attr('src', logoLight); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function style_header() {\n if ($(document).scrollTop() > $('#lead-content>h1').offset().top ) {\n $('header').css({\"background-color\":\"#000\",\"border-bottom\":\"2.5px solid #3498db\"});\n $('.logo').css(\"visibility\",\"visible\");\n } \n else {\n $('header').css({\"background-color\":\"transparent\",\"border\":\"none\"});\n $('header .menu').css({\"background-color\":\"transparent\",\"border\":\"none\"});\n $('.logo').css(\"visibility\",\"hidden\");\n \n }\n }", "function HeaderScroll(){\n var windown_top = $(window).scrollTop();\n if (windown_top > 100) {\n if ($('#header').hasClass('header-stick') == false) {\n $('#header').addClass('header-stick');\n $('.navigation.nav')\n .closest('body')\n .find('#header')\n .find('.logo')\n .css({\n 'opacity': '1',\n 'visibility': 'visible'\n });\n }\n } else {\n $('#header').removeClass('header-stick');\n $('.navigation.nav')\n .closest('body')\n .find('#header')\n .css('background-color', 'transparent')\n .find('.logo')\n .css({\n 'opacity': '0',\n 'visibility': 'hidden'\n });\n }\n \n }", "function header() {\n if ($(document).scrollTop() > 0) {\n $('header').addClass('white')\n } else {\n $('header').removeClass('white');\n }\n }", "function headerStyle() {\n\t\tif($('.main-header').length){\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tvar siteHeader = $('.main-header');\n\t\t\t//var scrollLink = $('.scroll-to-top');\n\t\t\tif (windowpos >= 60) {\n\t\t\t\tsiteHeader.addClass('fixed-header');\n\t\t\t\t//scrollLink.fadeIn(300);\n\t\t\t} else {\n\t\t\t\tsiteHeader.removeClass('fixed-header');\n\t\t\t\t//scrollLink.fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function navPostion(windowScroll)\n {\n let servicesTop = $(\"#services\").offset().top;\n if (windowScroll > servicesTop-200 ) \n {\n $(\".navbar\").css(\"backgroundColor\", \"rgba(0,0,0,0.8)\");\n $(\".navbar\").css(\"position\", \"fixed\");\n }\n else \n {\n $(\".navbar\").css(\"backgroundColor\", \"transparent\");\n $(\".navbar\").css(\"position\", \"absolute\");\n }\n }", "function headerStyle() {\r\n if ($('.main-header').length) {\r\n var windowpos = $(window).scrollTop();\r\n var siteHeader = $('.main-header');\r\n var scrollLink = $('.scroll-top');\r\n if (windowpos >= 100) {\r\n siteHeader.addClass('fixed-header');\r\n scrollLink.fadeIn(300);\r\n } else {\r\n siteHeader.removeClass('fixed-header');\r\n scrollLink.fadeOut(300);\r\n }\r\n }\r\n }", "function headerStyle() {\n if ($('.main-header').length) {\n var windowpos = $(window).scrollTop();\n var siteHeader = $('.main-header');\n var scrollLink = $('.scroll-top');\n if (windowpos >= 100) {\n siteHeader.addClass('fixed-header');\n scrollLink.fadeIn(300);\n } else {\n siteHeader.removeClass('fixed-header');\n scrollLink.fadeOut(300);\n }\n }\n }", "function initHomepageNav() {\n hideNavBackground();\n $(window).scroll(hideNavBackground);\n}", "function backgroundColor() {\n\t\t\t\tif (panache.inview(header, 68)) {\n\t\t\t\t\tpanache.addClass(nav, 'is-transparent');\n\t\t\t\t} else {\n\t\t\t\t\tpanache.removeClass(nav, 'is-transparent');\n\t\t\t\t}\n\t\t\t}", "function backgroundColor() {\n\t\t\t\tif (panache.inview(header, 68)) {\n\t\t\t\t\tpanache.addClass(nav, 'is-transparent');\n\t\t\t\t} else {\n\t\t\t\t\tpanache.removeClass(nav, 'is-transparent');\n\t\t\t\t}\n\t\t\t}", "function headerNavScrollInit() {\r\n\r\n\t\t\t\t\t// Remove transparent class if page loaded further down.\r\n\t\t\t\t\tif ($('#header-outer[data-remove-fixed=\"1\"]').length == 0 && nectarDOMInfo.winW > 1000) {\r\n\t\t\t\t\t\tif ( $(window).scrollTop() != 0 && $('#header-outer.transparent[data-permanent-transparent=\"false\"]').length == 1) {\r\n\t\t\t\t\t\t\t$headerOuterEl.removeClass('transparent');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Permanent transparent header.\r\n\t\t\t\t\tif ($('#nectar_fullscreen_rows').length == 0 && $('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\tmidnightInit();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Determine which events to bind at start.\r\n\t\t\t\t\tif (nectarDOMInfo.winW < 1000 && $('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\tbindScrollEffectsMobile();\r\n\t\t\t\t\t\t$window.on('smartresize.nectarNavScrollEffects', bindScrollEffectsMobile);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbindScrollEffectsDesktop();\r\n\t\t\t\t\t\t$window.on('smartresize.nectarNavScrollEffects', bindScrollEffectsDesktop);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}", "function headerStyle() {\n\t\tif($('.main-header').length){\n\t\t\tvar topHeader = $('.mainmenu-area').innerHeight();\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tif (windowpos >= topHeader) {\n\t\t\t\t$('.scroll-to-top').fadeIn(300);\n\t\t\t} else {\n\t\t\t\t$('.scroll-to-top').fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function headerStyle() {\n if ($('.main-header').length) {\n var windowpos = $(window).scrollTop();\n var siteHeader = $('.main-header');\n var scrollLink = $('.scroll-top');\n if (windowpos >= 250) {\n siteHeader.addClass('fixed-header');\n scrollLink.fadeIn(300);\n } else {\n siteHeader.removeClass('fixed-header');\n scrollLink.fadeOut(300);\n }\n }\n }", "function headerStyle() {\r\n if ($('.main-header').length) {\r\n var windowpos = $(window).scrollTop();\r\n var siteHeader = $('.main-header');\r\n var scrollLink = $('.scroll-top');\r\n if (windowpos >= 250) {\r\n siteHeader.addClass('fixed-header');\r\n scrollLink.fadeIn(300);\r\n } else {\r\n siteHeader.removeClass('fixed-header');\r\n scrollLink.fadeOut(300);\r\n }\r\n }\r\n }", "function bgMenu() {\n var header = document.querySelector('.header-main');\n\n if (pageYOffset > 50) {\n if (!header.classList.contains('header-main_scroll')) {\n header.classList.add('header-main_scroll');\n }\n } else {\n if (header.classList.contains('header-main_scroll')) {\n header.classList.remove('header-main_scroll');\n }\n }\n}", "function headerStyle() {\r\n\t\tif($('.main-header').length){\r\n\t\t\tvar windowpos = $(window).scrollTop();\r\n\t\t\tvar siteHeader = $('.main-header');\r\n\t\t\tvar scrollLink = $('.scroll-to-top');\r\n\t\t\tif (windowpos >= 1) {\r\n\t\t\t\tsiteHeader.addClass('fixed-header');\r\n\t\t\t\tscrollLink.fadeIn(300);\r\n\t\t\t} else {\r\n\t\t\t\tsiteHeader.removeClass('fixed-header');\r\n\t\t\t\tscrollLink.fadeOut(300);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function headerStyle() {\r\n if ($('.main-header').length) {\r\n var windowpos = $(window).scrollTop();\r\n if (windowpos >= 150) {\r\n $('.main-header').addClass('fixed-header');\r\n $('.scroll-to-top').fadeIn(300);\r\n } else {\r\n $('.main-header').removeClass('fixed-header');\r\n $('.scroll-to-top').fadeOut(300);\r\n }\r\n }\r\n }", "function Navbar() {\n\n // Setup hidden navbar and black overlay\n $(window).scroll(function() {\n var h = window.innerHeight;\n var val=($(window).scrollTop())/h;\n $(\".intro\").css({'background-color':'rgba(0,0,0,'+val*val/1.5+')'});\n \n if ($(window).scrollTop() > h / 3.6) {\n $('.dissolve').addClass(\"scrolled\");\n } else if ($(window).scrollTop() < h / 3.6) {\n $('.dissolve').removeClass(\"scrolled\");\n }\n });\n}", "function recolorScrolledMenu() {\n const heroHeight = hero.offsetHeight;\n // if the user has scrolled beyond the hero block\n if (window.scrollY + 100 > heroHeight) {\n headerContainer.classList.add('header__content_scrolled');\n hamburger.classList.add('header__hamburger_scrolled');\n logo.classList.add('header__logo_scrolled');\n logoAccent.classList.add('header__logo-accent_scrolled');\n headerLinks.forEach(link => {\n link.classList.add('header__link_scrolled');\n });\n } else {\n hamburger.classList.remove('header__hamburger_scrolled');\n headerContainer.classList.remove('header__content_scrolled');\n logo.classList.remove('header__logo_scrolled');\n logoAccent.classList.remove('header__logo-accent_scrolled');\n headerLinks.forEach(link => {\n link.classList.remove('header__link_scrolled');\n });\n }\n}", "function headerStyle() {\n\t\tif($('.main-header').length){\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tvar siteHeader = $('.main-header');\n\t\t\tvar scrollLink = $('.scroll-to-top');\n\t\t\tif (windowpos >= 200) {\n\t\t\t\tsiteHeader.addClass('fixed-header');\n\t\t\t\tscrollLink.fadeIn(300);\n\t\t\t} else {\n\t\t\t\tsiteHeader.removeClass('fixed-header');\n\t\t\t\tscrollLink.fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function navScroll() {\n // init controller\n height = window.innerHeight;\n var controller = new ScrollMagic.Controller();\n\n // build scenes\n new ScrollMagic.Scene({triggerElement: \"#intro\"})\n .setClassToggle(\"#nav\", \"bg-sienna\") // add class toggle\n .addTo(controller);\n}", "function onScrollGhazaal() {\n if (window.pageYOffset > sticky) {\n header.classList.add(\"sticky\");\n navbar.classList.add(\"user-specific-container-withlogo\");\n } else {\n header.classList.remove(\"sticky\");\n navbar.classList.remove(\"user-specific-container-withlogo\");\n }\n}", "function change_menu_class(){\n var scrollPos = $(document).scrollTop();\n if (scrollPos >= $('.main-navigation').outerHeight()) {\n $('.main-navigation').addClass(\"active-background\");\n } else {\n $('.main-navigation').removeClass(\"active-background\");\n $('body').css(\"padding-top:0;\");\n }\n if (scrollPos >= $('.main-header').outerHeight()) {\n $('body').addClass(\"padding-active\");\n } else {\n $('body').removeClass(\"padding-active\");\n }\n }", "function headerSticky(){\n\t\tvar windowPos=$(window).scrollTop();\n\t\tif( windowPos>20){\n\t\t\t// SCROLL\n\t\t\t$('.fixed-top').addClass(\"on-scroll\");\n\t\t\t$('#svg-normal').removeClass(\"svg-hidden\");\n\t\t\t$('#svg-branca').addClass(\"svg-hidden\");\n\t\t\t$('.nav-link ').addClass(\"my-menu-scroll\");\n\t\t} else {\n\t\t\t// FIXADO (É O INICIAL)\n\t\t\t$('.fixed-top').removeClass(\"on-scroll\");\n\t\t\t$('#svg-normal').addClass(\"svg-hidden\");\n\t\t\t$('#svg-branca').removeClass(\"svg-hidden\");\n\t\t\t$('.nav-link ').removeClass(\"my-menu-scroll\");\n\t\t}\n\t}", "function headerStyle() {\r\n if($header.length){\r\n var windowpos = $window.scrollTop();\r\n if (windowpos >= 180) {\r\n $header.addClass('fixed-header');\r\n } else {\r\n $header.removeClass('fixed-header');\r\n }\r\n }\r\n }", "function handleNavScroll() {\n const navHeight = nav.getBoundingClientRect().bottom;\n if (window.scrollY > navHeight) {\n nav.classList.add('light-color');\n } else {\n nav.classList.remove('light-color');\n }\n}", "function headerStyle() {\n if ($window.width() >= 992) {\n if ($header.length) {\n var windowpos = $window.scrollTop();\n if (windowpos >= 200) {\n $header.addClass('fixed-top');\n } else {\n $header.removeClass('fixed-top');\n $page_wrapper.removeClass('overlay');\n $sidenav.removeClass('visible');\n }\n }\n }\n }", "function setHeader() {\n if ($(window).scrollTop() > 91) {\n header.addClass('scrolled');\n }\n else {\n header.removeClass('scrolled');\n }\n }", "function mudaCor () {\n\tif($('header ul li p').position().top <= 100){\n\t\t$('header ul li p').removeClass('do-color');\n\t\t$('header ul li').removeClass('do-nothing');\n\t}else{\n\t\t$('header ul li p').addClass('do-color');\n\t\t$('header ul li').removeClass('do-nothing');\n\t}\n\tif($('.wrapper').outerHeight() >= $(window).height()){\n\t\t$('footer li a').addClass('do-nothing');\n\t}else{\n\t\t$('footer li a').removeClass('do-nothing');\n\t}\n\tif($(window).scrollTop() + $(window).height() == $(document).height()) {\n\t\t$('footer li a').removeClass('do-nothing');\n\t}else{\n\t\t$('footer li a').addClass('do-nothing');\n\t}\n}", "function scrollFunction(menuHeight) {\n if (document.body.scrollTop > menuHeight / 2 || document.documentElement.scrollTop > menuHeight / 2) {\n menu.style.backgroundColor = \"#ffffff\";\n logoDark.classList.add('hidden-logo');\n logo.style.display = \"none\";\n logoShort.style.display = \"block\";\n if (menu.classList.contains(\"dark-mode\")) {\n var el = document.querySelectorAll('.menu .line');\n document.querySelector('.menu a').style.color = \"#000000\";\n for (var i = 0; i < el.length; i++) {\n el[i].style.backgroundColor = '#000000';\n }\n }\n } else {\n logoDark.classList.remove('hidden-logo');\n menu.classList.remove('menu-down');\n menu.style.backgroundColor = \"transparent\";\n logoShort.style.display = \"none\";\n logo.style.display = \"block\";\n if (menu.classList.contains(\"dark-mode\")) {\n var el = document.querySelectorAll('.menu .line');\n // document.querySelector('.menu a').style.color = \"#ffffff\";\n for (var i = 0; i < el.length; i++) {\n // el[i].style.backgroundColor = '#ffffff';\n }\n }\n }\n }", "function changeHeaderStyle() {\n window.addEventListener('scroll', () => {\n // console.log(window.scrollY);\n if(window.scrollY >= 557) {\n document.getElementById('header').className = 'dark-background-header';\n } else if(window.scrollY < 557 && document.getElementById('header').classList.contains('dark-background-header')) {\n document.getElementById('header').classList.remove('dark-background-header');\n document.getElementById('header').className = 'transparent-background-header';\n };\n });\n}", "function headerStyle() {\n\t\tif($('.main-header').length){\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tvar siteHeader = $('.main-header');\n\t\t\tvar sticky_header = $('.main-header .sticky-header');\n\t\t\tvar scrollLink = $('.scroll-to-top');\n\t\t\tif (windowpos > 200) {\n\t\t\t\tsiteHeader.addClass('fixed-header');\n\t\t\t\tsticky_header.addClass(\"animated slideInDown\");\n\t\t\t\tscrollLink.fadeIn(300);\n\t\t\t} else {\n\t\t\t\tsiteHeader.removeClass('fixed-header');\n\t\t\t\tsticky_header.removeClass(\"animated slideInDown\");\n\t\t\t\tscrollLink.fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function scrolledHeader(){\n\t\tif ( $('.stickable-nav').length ) {\n\t\t\t//var menuTrigger = $('.sticky-menu-trigger').outerHeight() - 35;\n\t\t\tif ( $(document).scrollTop() > 1){\n\t\t\t\t$('body').addClass('scrolled');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$('body').removeClass('scrolled');\n\t\t\t}\n\t\t}\n\t}", "function updateNavBar() {\n\n\t// Checks if its the width of a phone\n\tif ($(window).width() <= 820) {\n\t\tif ($(window).scrollTop() >= $(window).height())\n\t\t\t$(\"header\").addClass(\"header-background\");\n\t\telse\n\t\t\t$(\"header\").removeClass(\"header-background\");\n\t} else {\n\t\t// Adds the background to the header/navbar\n\t\tif ($(window).scrollTop() > 100) {\n\t\t\t$(\"header\").addClass(\"header-background\");\n\t\t} else {\n\t\t\t$(\"header\").removeClass(\"header-background\");\n\t\t}\n\t}\n\n\tif ($(window).scrollTop() >= $(window).height())\n\t\t$(\"#nav-logo\").addClass(\"nav-img-show\");\n\telse\n\t\t$(\"#nav-logo\").removeClass(\"nav-img-show\");\n\n\t// Animates navbar links when scrolling\n\tvar windscroll = $(window).scrollTop();\n\tvar navheight = $('header').height();\n\tif (windscroll >= navheight) {\n\t\t$('section').each(function (i) {\n\t\t\tif ($(this).position().top <= windscroll + 100) {\n\t\t\t\t// $('nav a.active').removeClass('active');\n\t\t\t\t$('nav ul li.active').removeClass('active');\n\t\t\t\t// $('nav a').eq(i).addClass('active');\n\t\t\t\t$('nav ul li').eq(i).addClass('active');\n\t\t\t}\n\t\t});\n\t} else {\n\t\t$('nav').removeClass('fixed');\n\t\t$('nav ul li.active').removeClass('active');\n\t\t$('nav ul li:first').addClass('active');\n\t}\n}", "function navBG() {\r\n \"use strict\";\r\n \r\n $(window).scroll(function () {\r\n if ($(this).scrollTop()) {\r\n $(\".navbar\").addClass(\"nav-bg\");\r\n } else {\r\n $(\".navbar\").removeClass(\"nav-bg\");\r\n }\r\n });\r\n}", "function addColoredStyleToNavigation() {\n selectElement(\".container\").classList.add(\"nav-container-onscroll\");\n selectElement(\".navbar-brand\").classList.add(\"navbar-brand-onscroll\");\n selectAllElements(\".nav-link\").forEach((link) =>\n link.classList.add(\"nav-link-onscroll\")\n );\n selectAllElements(\".hamburger .line\").forEach((line) =>\n line.classList.add(\"hamburger-line-onscroll\")\n );\n}", "function changeNavbarBgOnScroll() {\n let navbarSelector = \".navbar--fixed\";\n\n let elementProperties = getOffset(navbarSelector);\n\n let topLogoSelector = \".site-logo-header-main\";\n\n // For mobile devices\n // White bg and red logo\n if ($(window).width() < 768) {\n $(navbarSelector).addClass(\"navbar-fixed-white-bg\");\n changeLogoToRed(topLogoSelector);\n return;\n }\n // FOr other devices\n $(window).on(\"scroll\", function () {\n // If the scroll is greater than 100vh and minus the height of the logo\n // We minus the height to ensure that the bg turns white as soon as the logo touches the next div\n if ($(window).scrollTop() > $(window).height() - elementProperties.height) {\n $(navbarSelector).addClass(\"navbar-fixed-white-bg\");\n changeLogoToRed(topLogoSelector);\n } else {\n $(navbarSelector).removeClass(\"navbar-fixed-white-bg\");\n changeLogoToWhite(topLogoSelector);\n }\n });\n}", "function redrawDotNav(){\r\n var section1Top = 0;\r\n var section2Top = $('#news').offset().top;\r\n var section3Top = $('#about').offset().top;\r\n var section4Top = $('#login').offset().top;\r\n $('nav#primary a').removeClass('active');\r\n if($(window).scrollTop() >= section1Top && $(document).scrollTop() < section2Top){\r\n $('nav#primary a#home').addClass('active');\r\n } else if ($(window).scrollTop() >= section2Top && $(document).scrollTop() < section3Top){\r\n $('nav#primary a#news').addClass('active');\r\n } else if ($(window).scrollTop() >= section3Top && $(document).scrollTop() < section4Top){\r\n $('nav#primary a#about').addClass('active');\r\n } else if ($(window).scrollTop() >= section4Top){\r\n $('nav#primary a#login').addClass('active');\r\n }\r\n \r\n }", "function headerStyle() {\n\t\tif($('#header').length){\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tif (windowpos >= 1) {\n\t\t\t\t//$('#header').addClass('fixed-top-header');\n\t\t\t\t$('.scroll-to-top').fadeIn(300);\n\t\t\t} else {\n\t\t\t\t//$('#header').removeClass('fixed-top-header');\n\t\t\t\t$('.scroll-to-top').fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function headerHomeScroll() {\n var headerHome = document.querySelector(\"header\");\n var main = document.querySelector(\"main\");\n const checkpoint = 75;\n\n main.addEventListener(\"scroll\", () => {\n const currentScroll = main.scrollTop;\n if (currentScroll <= checkpoint) {\n opacity = 1 - currentScroll / checkpoint;\n headerHome.classList.remove(\"hidden\");\n } else {\n opacity = 0;\n headerHome.classList.add(\"hidden\");\n }\n headerHome.style.opacity = opacity;\n // console.log(\"Scrolled in main: \" + main.scrollTop + \"px\");\n });\n }", "function scrNav() {\n var sTop = $(window).scrollTop();\n $('section').each(function () {\n var id = $(this).attr('id'),\n offset = $(this).offset().top - 1,\n height = $(this).height();\n if (sTop >= offset && sTop < offset + height) {\n link.removeClass('active');\n $('#navbar').find('[data-scroll=\"' + id + '\"]').addClass('active');\n }\n });\n }", "function headerStyle() {\n\t\tif($header.length){\n\t\t\tvar windowpos = $window.scrollTop();\n\t\t\tif (windowpos >= 100) {\n\t\t\t\t$header.addClass('fixed-top');\n\t\t\t} else {\n\t\t\t\t$header.removeClass('fixed-top');\n\t\t\t}\n\t\t}\n\t}", "handleScroll(event){\n if(event.target.documentElement.scrollTop > \"250\" || window.pageYOffset > \"250\"){\n this.refs.navbar.classList.remove('bg-light');\n this.refs.navbar.style.backgroundColor = \"#fff\";\n this.refs.logo.style.maxWidth = \"110px\";\n } else{\n this.refs.navbar.classList.add('bg-light');\n this.refs.navbar.style.height = \"inherite\";\n this.refs.logo.style.maxWidth = \"140px\";\n }\n }", "function fixedMenu(){\r\n\t\r\n\tvar nav =$('.main-header-container').offset().top+50;\r\n\tvar yOffset = window.pageYOffset;\r\n\tif(nav < yOffset){\r\n\t\t$('.main-header').css({\"padding\":\"7px 40px 5px 20px \",\"background\":\"rgba(255,255,255,0.985)\"})\r\n\t\t$('.logo img').css({\"height\":\"80px\"})\r\n\t\t$('.main-header nav').css({\"padding-top\":\"20px\"})\r\n\t\t\r\n\t}else{\r\n\t\t$('.main-header').css({\"padding\":\"20px\", \"background\":\"rgba(255,255,255,0.7)\", \"transition\":\".5s\"})\r\n\t\t$('.logo img').css({\"height\":\"130px\", \"transition\":\".5s\"})\t\r\n\t\t$('.main-header nav').css({\"padding-top\":\"40px\", \"transition\":\".5s\"})\t\t\r\n\t\t}\r\n\t}", "function openLightMenu() {\n var $menuContainer = $('.menu-container');\n if ($menuContainer.length) {\n var heroSectionHeight = $('.hero').height();\n var menuHeight = $('.menu-container').height();\n var scrollTop = $(document).scrollTop();\n if (scrollTop >= heroSectionHeight - menuHeight) {\n $menuContainer.addClass('light-header');\n } else {\n $menuContainer.removeClass('light-header');\n }\n }\n}", "function parallaxHeader() {\n\t\n\t// get page scroll position\n\tscrollPosition = jQuery(this).scrollTop();\n\t\n\t// scroll and fade header text\n\tjQuery('#parallax_inner').css({\n\t\t'margin-top' : -(scrollPosition/4)+\"px\",\n\t\t'opacity' : 1-(scrollPosition/500)\n\t});\n\t\n\t// scroll banner background\n\tjQuery('#parallax_wrap').css({\n\t\t'background-position' : 'center ' + (-scrollPosition/8)+\"px\"\n\t});\n\t\n\t// scroll banner background\n\tjQuery('.top_bar').css({\n\t\t'top' : \"0\"\n\t});\n}", "function updateNavigation() {\n\tvar btnTop = $('#btnTop');\n\tvar dropDownMenu = $('.dropdown-menu');\n\tvar scroll = $(window).scrollTop();\n\tvar win_height = ($(\"header\").height())/3;\n\tvar $myNavBar = $(\".navbar\");\n\tvar $navElt = $(\".navbar-left a\");\n\tvar heightClient = win_height - scroll;\n\n\tif (heightClient <= 0) {\n\t\t$myNavBar.css({\"background-color\": \"#FFA1B5\"});\n\t\t$navElt.css({\"color\": \"white\"});\n\t\tdropDownMenu.css({\"width\": \"100%\"}, {\"background-color\": \"#FFA1B5 !important\"});\n\t\tbtnTop.show();\n\t\tsocialMenu.show();\n\n\t} else {\n\t\t$myNavBar.css({\"background-color\": \"transparent\"});\n\t\tdropDownMenu.css({\"background-color\": \"#FFA1B5 !important\"});\n\t\t$navElt.css({\"color\": \"white\"});\n\t\tbtnTop.hide();\n\t\tsocialMenu.hide();\n\t}\n}", "function initLogo()\n {\n var $navbarBrand = $('.navbar-brand');\n \n $(document).scroll(function () {\n var scrollPosition = $(window).scrollTop();\n var logoPosition = $navbarBrand.offset().top;\n \n if(scrollPosition < logoPosition) {\n $navbarBrand.removeClass('small');\n } else {\n $navbarBrand.addClass('small');\n }\n });\n }", "function onScroll() \n {\n if ($(window).scrollTop() > 50) {\n $('body > header').addClass('mini');\n }\n else {\n $('body > header').removeClass('mini');\n }\n }", "function scrollNavBar() {\n var width = $(window).width();\n if (width > 991) {\n var scroll = $(window).scrollTop();\n if (scroll >= 30) {\n $(\".header-section\").addClass(\"header-sticky\");\n } else {\n $(\".header-section\").removeClass(\"header-sticky\");\n }\n }\n }", "function navbarAnimation(navbar, homeSection, navHeight) {\n var topScroll = $(window).scrollTop();\n if (navbar.length > 0 && homeSection.length > 0) {\n if(topScroll >= navHeight) {\n navbar.removeClass('navbar-transparent');\n } else {\n navbar.addClass('navbar-transparent');\n }\n }\n }", "function navbarAnimation(navbar, homeSection, navHeight) {\n var topScroll = $(window).scrollTop();\n if (navbar.length > 0 && homeSection.length > 0) {\n if(topScroll >= navHeight) {\n navbar.removeClass('navbar-transparent');\n } else {\n navbar.addClass('navbar-transparent');\n }\n }\n }", "function navColorChange(id) {\n var selector = document.getElementById(\"js-hero-\" + id);\n if (selector) {\n var scrll = new ScrollMagic.Scene({\n triggerElement: selector,\n })\n .offset(heroBottom - 28)\n .triggerHook(0)\n .setClassToggle(\"#js-navbar\", \"navbar-color--\" + id)\n //.addIndicators()\n .addTo(controller);\n };\n}", "function setToActive () {\n window.addEventListener('scroll', function (event) {\n let section = getActiveSection();\n section.classList.add('your-active-class');\n // set other sections as inactive\n for ( i of sections) {\n if (i.id != section.id & i.classList.contains('your-active-class')) {\n i.classList.remove('your-active-class');\n }\n }\n // set the header style to list element\n const active = document.querySelector('li[data-nav=\"' + section.id + '\"]'); // get the corresponding list element\n active.classList.add('active__link'); // added to the css\n // remove from other list elements\n const elements = document.querySelectorAll('.menu__link');\n for ( i of elements) {\n if (i.dataset.nav != active.dataset.nav & i.classList.contains('active__link')) {\n i.classList.remove('active__link');\n }\n }\n })\n}", "function hideHeader() {\r\n let scrollPos = $(window).scrollTop();\r\n let windowWidth = $(window).width();\r\n\r\n //Check Window Location and width\r\n if (scrollPos < 50 && windowWidth > 924) {\r\n //Hide Background\r\n $(\"#navContainer\").addClass(\"clBackground\");\r\n } else {\r\n //Add Background\r\n $(\"#navContainer\").removeClass(\"clBackground\");\r\n }\r\n}", "function setupNav() {\n\tvar section1Top = 0;\n\tvar section2Top \t= $('footer').offset().top - (($(document).height() - $('footer').offset().top) / 2);;\n\t\n\t$('nav li').removeClass('active');\n\t\n\tif($(document).scrollTop() >= section1Top && $(document).scrollTop() < section2Top){\n\t\t$('nav li.selected_work').addClass('active');\n\t} else if ($(document).scrollTop() >= section2Top){\n\t\t$('nav li.about').addClass('active');\n\t}\n\t\n\t// CHANGE THESE NUMBERS TO ADJUST THE POSITION OF THE NAV WHEN YOU HIT THE FOOTER\n\tif($(window).scrollTop() >= 14532) {\n\t\t$('header').css('position', 'absolute');\n\t\t$('header').css('top', 14552);\n\t} else {\n\t\t$('header').css('position', 'fixed');\n\t\t$('header').css('top', 20);\n\t}\n\t\n}", "function initHeaderScroll() {\n _window.on('scroll load', function (e) {\n var vScroll = _window.scrollTop();\n var header = $('.header').not('.header--static');\n\n if (vScroll > 15) {\n header.addClass('is-fixed');\n } else {\n header.removeClass('is-fixed');\n }\n });\n }", "function cms_stiky_menu() {\n\n\t\tif (header_top < scroll_top) {\n\t\t\tswitch (true) {\n\t\t\t\tcase (window_width >= 992):\n\t\t\t\t\theader.addClass('header-fixed');\n\t\t\t\t\t$('body').addClass('fixed-margin-top');\n\t\t\t\t\tbreak;\n\t\t\t\tcase (window_width < 992):\n\t\t\t\t\theader.addClass('header-fixed');\n\t\t\t\t\t$('body').addClass('fixed-margin-top');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\theader.removeClass('header-fixed');\n\t\t\t$('body').removeClass('fixed-margin-top');\n\t\t}\n\t}", "function opNavScroll() {\r\n\r\n if ($('.op-section')[0]) {\r\n\r\n var section = $(\".op-section\");\r\n var sections = {};\r\n var i = 0;\r\n\r\n Array.prototype.forEach.call(section, function(e) {\r\n sections[e.id] = e.offsetTop;\r\n });\r\n\r\n window.onscroll = function() {\r\n var scrollPosition = document.documentElement.scrollTop || document.body.scrollTop;\r\n\r\n for (i in sections) {\r\n if (sections[i] <= scrollPosition) {\r\n $('li.menu-item').removeClass('current_page_item');\r\n $('a[href*=' + i + ']').parent().addClass('current_page_item ');\r\n }\r\n }\r\n }\r\n\r\n }\r\n }", "function fadeHeader() {\n\t\tvar curr_scroll = $(window).scrollTop();\n\t\tif (curr_scroll > 20) {\n\t\t\t$(\"#header-carousel .item .container\").css(\"opacity\", 1 - (curr_scroll/100 * 0.4));\n\t\t\t$(\".subpage .subpage-title\").css(\"opacity\", 1 - (curr_scroll/100 * 0.));\n\t\t} else {\n\t\t\t$(\"#header-carousel .item .container\").css(\"opacity\", 1);\n\t\t\t$(\".subpage .subpage-title\").css(\"opacity\", 1);\n\t\t}\n\t}", "function header() {\n var header = document.querySelector('header') || document.querySelector('.header');\n //init header animation\n window.addEventListener('load', function () {\n header.classList.add('header--animate');\n });\n initBurger(header);\n initScrollTo(header);\n}", "function scrollFunction() {\r\n let nav = document.querySelector(\"nav\");\r\n if (\r\n document.body.scrollTop > 100 ||\r\n document.documentElement.scrollTop > 100\r\n ) {\r\n nav.classList.remove(\"bigHeader\");\r\n } else {\r\n nav.classList.add(\"bigHeader\");\r\n }\r\n }", "function activeHeaderWhenScroll(){\n var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;\n var header = document.getElementsByClassName('header')[0];\n // console.log('scrollTop', scrollTop);\n if(scrollTop > 196){\n header.classList.add('active');\n }else{\n header.classList.remove('active');\n }\n}", "function window_scroll() {\n\n var scroll_top = $(window).scrollTop() - $('#canvas').offset().top;\n\n // Show/Hide Header\n\n var header_sidebar_toggle = $('.canvas-sidebar-toggle');\n\n if (scroll_top > 0) {\n\n header_sidebar_toggle.addClass('fade');\n\n } else {\n\n header_sidebar_toggle.removeClass('fade');\n\n }\n\n }", "function stickyNav() {\n if ($(window).scrollTop() >= 100) {\n $(\".desktop-header\").addClass(\"header-sticky\");\n } else {\n $(\".desktop-header\").removeClass(\"header-sticky\");\n }\n }", "function stickyHeader () {\n\t\tvar headerScrollPos = $('header').next().offset().top;\n\t\tif($(window).scrollTop() > headerScrollPos) {\n\t\t\t$('header').addClass('header-fixed gradient-overlay'); \n\t\t}\n\t\telse if($(this).scrollTop() <= headerScrollPos) {\n\t\t\t$('header').removeClass('header-fixed gradient-overlay'); \n\t\t}\n\t}", "function navbarScroll(topnav, topnavHeight) {\n var topScroll = $(window).scrollTop();\n if (topnav.length > 0) {\n if(topScroll >= topnavHeight) {\n topnav.removeClass('topnav-top');\n if(!topnav.hasClass('bg-black') && !topnav.hasClass('no-transparent')) topnav.removeClass('transparent');\n } else {\n topnav.addClass('topnav-top');\n if(!topnav.hasClass('bg-black') && !topnav.hasClass('no-transparent')) topnav.addClass('transparent');\n }\n }\n }", "function toggleHeaderBgImg() {\n let winToTop = $(window).scrollTop(),\n headerHt = $('header').height();\n if(winToTop > headerHt * 2) {\n $('header').addClass('remove');\n } else {\n $('header').removeClass('remove');\n }\n}", "function initHeaderScroll(){\n if ( _document.find('.header-static').length == 0 ){\n _window.on('scroll', throttle(function() {\n var vScroll = _window.scrollTop();\n if (vScroll > 25) {\n $('.menu').addClass('menu_fixed');\n } else {\n $('.menu').removeClass('menu_fixed');\n }\n }, 25));\n\n }\n }", "function navCheck() {\n if (window.pageYOffset >= sticky) {\n navbar.classList.add(\"sticky\");\n quote.classList.add(\"pad\");\n $(\"#mlh-trust-badge\").css(\"visibility\", \"visible\");\n $(\"#mlh-trust-badge\").slideDown();\n document.body.style.backgroundColor = \"#000000\";\n } else {\n $('.cover').each(function(){\n $(this).css('margin-top', (-1 * $(window).scrollTop() / parseInt($(this).attr('speed'))));\n });\n navbar.classList.remove(\"sticky\");\n quote.classList.remove(\"pad\");\n $(\"#mlh-trust-badge\").slideUp();\n document.body.style.backgroundColor = \"#253A79\";\n }\n }", "function main(){\r\n // build the nav\r\n createNav();\r\n\r\n // Add class 'active' to section when near top of viewport\r\n toggleActive();\r\n}", "function headerNavPreInit() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Deactivate hide header until needed effect on mobile.\r\n\t\t\t\t\tif (nectarDOMInfo.usingMobileBrowser && $('#header-outer[data-remove-fixed=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t$body.attr('data-hhun', '0');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Page fullscreen rows does not need permanent transparent.\r\n\t\t\t\t\tif ($('#nectar_fullscreen_rows').length > 0) {\r\n\t\t\t\t\t\t($headerOuterEl.attr('data-permanent-transparent', 'false'));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Set mobile header height.\r\n\t\t\t\t\tif (nectarDOMInfo.usingMobileBrowser && $('#header-outer[data-mobile-fixed=\"1\"]').length > 0 && \r\n\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').length == 0) {\r\n\t\t\t\t\t\t$('#header-space').css('height', $headerOuterEl.outerHeight());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function hhunHeaderEffect() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar previousScroll = 0, // previous scroll position\r\n\t\t\t\t\tmenuOffset = 250, // height of menu (once scroll passed it, menu is hidden)\r\n\t\t\t\t\thideShowOffset = 6; // scrolling value after which triggers hide/show menu\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Called in RAF loop to calculate the header visibility.\r\n\t\t\t\t\tfunction hhunCalcs() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$headerOuterEl.addClass('detached');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar currentScroll = nectarDOMInfo.scrollTop, // Gets current scroll position\r\n\t\t\t\t\t\tscrollDifference \t= Math.abs(currentScroll - previousScroll); // Calculates how fast user is scrolling\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop scrolling while animated anchors / box roll\r\n\t\t\t\t\t\tif ($('body.animated-scrolling').length > 0 && $('#header-outer.detached').length > 0 || $('body.no-scroll').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t// Alter scroll tracking to continue hiding menu.\r\n\t\t\t\t\t\t\t\t\tpreviousScroll = nectarDOMInfo.scrollTop;\r\n\t\t\t\t\t\t\t\t\tcurrentScroll = nectarDOMInfo.scrollTop;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop when material ocm or material search is open\r\n\t\t\t\t\t\tif ($('body.material-ocm-open').length > 0 || $('#search-outer.material-open').length > 0) {\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop on mobile if not using sticky option\r\n\t\t\t\t\t\tif ($('#header-outer[data-mobile-fixed=\"false\"]').length > 0 && $('body.mobile').length > 0) {\r\n\t\t\t\t\t\t\t$headerOuterEl.removeClass('detached');\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!$headerOuterEl.hasClass('side-widget-open') && !$('#header-outer .slide-out-widget-area-toggle a').hasClass('animating')) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvar heightToAdjust;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Remove transparent and body border margin\r\n\t\t\t\t\t\t\tif (currentScroll > 1) {\r\n\t\t\t\t\t\t\t\tif ($('#header-outer[data-permanent-transparent=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('transparent');\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl.addClass('scrolling');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Handle secondary header\r\n\t\t\t\t\t\t\t\tif ($headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\t\t$headerSecondaryEl.addClass('hide-up');\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl.css('transform', 'translateY(-' + nectarDOMInfo.secondaryHeaderHeight + 'px)');\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t$headerSecondaryEl.removeClass('hide-up');\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl.css('transform', '0px)');\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Scrolled past menu\r\n\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Scrolled past detach point add class to fix menu\r\n\t\t\t\t\t\t\t\tif (!$headerOuterEl.hasClass('detached')) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t.addClass('detached')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('parallax-contained');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('no-transition');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Scrolling faster than hideShowOffset hide/show menu\r\n\t\t\t\t\t\t\t\tif (scrollDifference >= hideShowOffset) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (currentScroll > previousScroll) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Hide menu\r\n\t\t\t\t\t\t\t\t\t\tif (!$headerOuterEl.hasClass('invisible')) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('invisible')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('at-top');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Close submenus\r\n\t\t\t\t\t\t\t\t\t\t\tif ($(\".sf-menu\").length > 0 && $().superfish) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(\".sf-menu\").superfish('hide');\r\n\t\t\t\t\t\t\t\t\t\t\t\t$('header#top nav > ul.sf-menu > li.menu-item-over').removeClass('menu-item-over');\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0px)')\r\n\t\t\t\t\t\t\t\t\t\t\t.addClass('header-not-visible');\r\n\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Show menu\r\n\t\t\t\t\t\t\t\t\t\tif ($headerOuterEl.hasClass('invisible')) {\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('invisible');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Page submenu adjust\r\n\t\t\t\t\t\t\t\t\t\theightToAdjust = $headerOuterEl.outerHeight();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif( $headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\theightToAdjust -=\tnectarDOMInfo.secondaryHeaderHeight;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0 && $('body.mobile').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$bodyBorderSizeToRemove = ($bodyBorderHeaderColorMatch) ? $bodyBorderTop.height() : 0;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + (heightToAdjust - $bodyBorderSizeToRemove) + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + heightToAdjust + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t\t\t\t\t\t\tvar $topDetachNum = ($('#header-outer[data-using-secondary=\"1\"]').length > 0) ? 32 : 0;\r\n\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0) {\r\n\t\t\t\t\t\t\t\t\t$topDetachNum = ($('#header-outer[data-using-secondary=\"1\"]').length > 0) ? 32 + $bodyBorderTop.height() : $bodyBorderTop.height();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (currentScroll <= $topDetachNum) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t.addClass('at-top')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('invisible')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('scrolling');\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-megamenu-rt=\"1\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t$('#header-outer .megamenu').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.nectar-box-roll').length == 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.megamenu.sfHover').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('transparent')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('no-transition');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else if ($('.nectar-box-roll').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('at-top-before-box');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('transparent')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else if ($('.nectar-box-roll').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('at-top-before-box');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif ($('#page-header-bg[data-parallax=\"1\"]').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t.addClass('parallax-contained')\r\n\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)');\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// At the bottom of document - show menu\r\n\t\t\t\t\t\t\tif ((nectarDOMInfo.winH + window.scrollY) >= document.body.offsetHeight) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('invisible');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Page submenu adjust\r\n\t\t\t\t\t\t\t\theightToAdjust = $headerOuterEl.outerHeight();\r\n\t\t\t\t\t\t\t\tif( $headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\theightToAdjust -=\tnectarDOMInfo.secondaryHeaderHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0 && $('body.mobile').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$bodyBorderSizeToRemove = ($bodyBorderHeaderColorMatch) ? $bodyBorderTop.height() : 0;\r\n\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + (heightToAdjust - $bodyBorderSizeToRemove) + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + heightToAdjust + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Keep track of current scroll position\r\n\t\t\t\t\t\tpreviousScroll = currentScroll;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Start the animation loop.\r\n\t\t\t\t\thhunCalcs();\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function updNav () {\n let pos = [\n window.pageYOffset,\n document.documentElement.scrollTop,\n document.body.scrollTop\n ]\n let nav = document.getElementById(\"navbar\");\n let themeColor = {\n 'setting': document.getElementById('theme_color'),\n 'background': document.getElementById('theme_color_bg').content,\n 'theme': document.getElementById('theme_color_tm').content\n };\n\n if(pos[1] > 0 || pos[2] > 0 || pos[3] > 0) {\n nav.setAttribute(\"data-at-top\", false);\n themeColor.setting.content = themeColor.theme;\n }\n else {\n nav.setAttribute(\"data-at-top\", true);\n themeColor.setting.content = themeColor.background;\n }\n}", "function onScroll(event) {\n let scrollPos = $(document).scrollTop();\n $(\".header__nav a\").each(function() {\n let currLink = $(this);\n let refElement = $(currLink.attr(\"href\"));\n if (\n refElement.position().top - 80 <= scrollPos &&\n refElement.position().top + refElement.height() + 180 > scrollPos\n ) {\n $(\".header__nav a\").removeClass(\"active\");\n currLink.addClass(\"active\");\n } else {\n currLink.removeClass(\"active\");\n }\n });\n }", "function scrollBG(){\n\t\t// vars\n\t\tvar pos = $(window).scrollTop();\n\t\tvar height = $(\"#splash\").height();\n\t\tvar intertia = 0.1;\n\n\t\t// Scroll background\n\t\t$(\"#background\").css(\"background-position\", \"0px \" + String(-pos*intertia) + \"px\");\n\n\t\t// Repositions the nav.\n\t\t$(\"#nav\").css(\"top\", String(Math.max(height, pos) + \"px\"));\n\n\t\t// ScrollSpy\n\t\t// Note: there's probably a cleaner way to do this.\n\t\tvar posmid = pos + $(window).height()/2;\n\t\tif($('#about').offset().top < posmid && posmid < ($('#about').offset().top + $('#about').height())) {\n\t\t\t// console.log('about active!' + ($('#about').offset().top).toString() + ' ' + (posmid).toString() + ' ' + ($('#about').offset().top + $('#about').height()).toString());\n\t\t\t$('#about-link').addClass('nav-link-active');\n\t\t} else {\n\t\t\t// console.log('about not active');\n\t\t\t$('#about-link').removeClass('nav-link-active');\n\t\t}\n\t\tif($('#experience').offset().top < posmid && posmid < ($('#experience').offset().top + $('#experience').height())) {\n\t\t\t// console.log('about active!' + ($('#about').offset().top).toString() + ' ' + (posmid).toString() + ' ' + ($('#about').offset().top + $('#about').height()).toString());\n\t\t\t$('#experience-link').addClass('nav-link-active');\n\t\t} else {\n\t\t\t// console.log('about not active');\n\t\t\t$('#experience-link').removeClass('nav-link-active');\n\t\t}\n\t\tif($('#work').offset().top < posmid && posmid < ($('#work').offset().top + $('#work').height())) {\n\t\t\t// console.log('about active!' + ($('#about').offset().top).toString() + ' ' + (posmid).toString() + ' ' + ($('#about').offset().top + $('#about').height()).toString());\n\t\t\t$('#work-link').addClass('nav-link-active');\n\t\t} else {\n\t\t\t// console.log('about not active');\n\t\t\t$('#work-link').removeClass('nav-link-active');\n\t\t}\n\t}", "function mostrarBarraHeader(){\n $(document).scroll(function(e){\n if($(window).scrollTop() >= ($(\"#top_home\").height()*1)){\n if(!withClass){\n jQuery('#header').removeClass(\"sombra\");\n jQuery('#header').addClass(\"av_header_effect\");\n $('#linea_cabecera').addClass(\"esconder_linea_cabecera\");\n $('#label_cabecera').addClass(\"centrar_label_cabecera\");\n withClass = true;\n } \n }\n if($(window).scrollTop() < ($(\"#top_home\").height()*1)){\n jQuery('#header').removeClass(\"av_header_effect\");\n jQuery('#header').addClass(\"sombra\");\n $('#linea_cabecera').removeClass(\"esconder_linea_cabecera\");\n $('#label_cabecera').removeClass(\"centrar_label_cabecera\");\n withClass = false;\n }\n }); \n}", "function afterSetUp() {\n // Fixate header MENU\n $(document).on('scroll', function() {\n $('.ms-header-container').addClass('ms-on-scroll');\n if($('.ms-header-container').offset().top === 0) {\n $('.ms-header-container').removeClass('ms-on-scroll');\n } else {\n $('.ms-header-container').addClass('ms-on-scroll');\n }\n });\n\n // Open SIDEBAR MENU on mobile\n $('.ms-mob-nav-btn-wrapper').on('click', function() {\n $('.ms-header-container nav, .ms-overlay, .ms-header-container').addClass('ms-active');\n });\n\n // Close SIDEBAR MENU on mobile\n $('.ms-overlay, .ms-nav-close-btn').on('click', function() {\n $('.ms-header-container nav, .ms-overlay, .ms-header-container').removeClass('ms-active');\n $('.ms-gallery-section-image-holder-container').detach();\n $('body').removeClass('no-scroll');\n $('.ms-header-container').addClass('ms-on-scroll');\n });\n\n // Scroll to the MENU ITEM when selected from the main menu\n $('.ms-header-wrapper nav ul li').on('click', function() {\n var selectedMenuItemIndex;\n \n $(this).addClass('ms-clicked');\n $('.ms-header-container.ms-active').removeClass('ms-active');\n $('.ms-header-wrapper nav ul li').each(function(index) {\n if($(this).hasClass('ms-clicked')) {\n selectedMenuItemIndex = index;\n }\n });\n $('.ms-header-wrapper nav ul li.ms-clicked').removeClass('ms-clicked');\n\n $('.ms-menu-item').each(function(index) {\n var menuItemOffsetTop,\n selectedMenuItem;\n if(index === selectedMenuItemIndex) {\n selectedMenuItem = $(this);\n menuItemOffsetTop = $(selectedMenuItem).offset().top - 220;\n $(document).scrollTop(menuItemOffsetTop);\n\n $('.ms-header-wrapper nav').removeClass('ms-active');\n $('.ms-overlay').removeClass('ms-active');\n }\n });\n });\n\n // HEADER SLIDER functionality\n setInterval(function() {\n var currentSlide = $('ul.ms-header-slider-list li.ms-active'),\n nextSlide = $('ul.ms-header-slider-list li.ms-active+li'),\n currentBullet = $('ul.ms-heder-slider-bullet-list li.ms-active'),\n nextBullet = $('ul.ms-heder-slider-bullet-list li.ms-active+li');\n if(!$(nextSlide).length) {\n $(currentSlide).removeClass('ms-active');\n $('ul.ms-header-slider-list li:first-child').addClass('ms-active');\n\n $(currentBullet).removeClass('ms-active');\n $('ul.ms-heder-slider-bullet-list li:first-child').addClass('ms-active');\n } else {\n $(currentSlide).removeClass('ms-active');\n $(nextSlide).addClass('ms-active');\n\n $(currentBullet).removeClass('ms-active');\n $(nextBullet).addClass('ms-active');\n }\n }\n , 5000);\n\n // Change SLIDE on BULLET click\n $('.ms-heder-slider-bullet-list .ms-header-slider-bullet').on('click', function() {\n // initally remove .ms-active from slides and bullets\n $('.ms-heder-slider-bullet-list .ms-header-slider-bullet.ms-active').removeClass('ms-active');\n $('.ms-header-slider-list li.ms-active').removeClass('ms-active');\n\n var thisBullet = $(this),\n currentBulletIndex;\n // add class ms-active to the selected bullet\n $(thisBullet).addClass('ms-active');\n // find bullet index\n $('.ms-heder-slider-bullet-list .ms-header-slider-bullet').each(function(index) {\n if($(this).hasClass('ms-active')) {\n currentBulletIndex = index;\n }\n });\n // adjust slide index\n $('.ms-header-slider-list li').each(function(indexs) {\n if(indexs === currentBulletIndex) {\n $(this).addClass('ms-active');\n }\n });\n });\n\n // On GALLERY image select - create large image\n $('.ms-gallery-section img').on('click', function() {\n var largerImage = $(this).clone(),\n imageHolder = '<div class=\"ms-gallery-section-image-holder-container\"><div class=\"ms-gallery-section-image-holder-wrapper\"><i class=\"fa fa-times-thin fa-2x\" aria-hidden=\"true\"></i></div></div>';\n \n if(!$('.ms-gallery-section-image-holder').length) {\n $('.ms-gallery-section').append(imageHolder);\n $('.ms-overlay').addClass('ms-active');\n $('body').addClass('no-scroll');\n $('.ms-header-container.ms-on-scroll').removeClass('ms-on-scroll');\n }\n $('.ms-gallery-section-image-holder-wrapper').append(largerImage);\n\n // Close GALLERY large image\n $('.ms-gallery-section-image-holder-wrapper i').on('click', function() {\n $(this).parents('.ms-gallery-section-image-holder-container').detach();\n $('.ms-overlay').removeClass('ms-active');\n $('body').removeClass('no-scroll');\n $('.ms-header-container').addClass('ms-on-scroll');\n });\n });\n\n // CUSTOMERS SLIDER functionality\n setInterval(function() {\n var currentCustomer = $('.ms-customer-container.ms-active'),\n nextCustomer = $('.ms-customer-container.ms-active+.ms-customer-container');\n if(!$(nextCustomer).length) {\n $(currentCustomer).removeClass('ms-active');\n $('.ms-customer-container').first().addClass('ms-active');\n $('.ms-customer-container').first().show(\"slide\", { direction: \"right\" }, 1000);\n } else {\n $(currentCustomer).removeClass('ms-active');\n $(nextCustomer).addClass('ms-active');\n $(nextCustomer).show(\"slide\", { direction: \"right\" }, 1000);\n }\n }\n , 5000);\n }", "function onScroll() {\n let scroll_top = $(window).scrollTop();\n $('.scroll-box i:eq(0)').html('').append(scroll_top);\n $('.header-nav a').each(function()\n {\n let hash = $(this).attr(\"href\");\n let target = $(hash);\n let targetStart = target.position().top;\n let targetHeight = target.outerHeight();\n let targetStartC = Math.floor(targetStart);\n let targetHeightC = Math.floor(targetHeight);\n let targetStartAndHeight = parseInt(targetStartC) + parseInt(targetHeightC);\n //console.log(targetStartAndHeight);\n if (targetStartC <= scroll_top && targetStartAndHeight > scroll_top && scroll_top !== 0)\n {\n $(this).addClass(\"active\");\n $('.scroll-box i:eq(1)').html('').append(targetStart);\n $('.scroll-box i:eq(2)').html('').append(targetStartAndHeight);\n } else\n {\n $(this).removeClass(\"active\");\n }\n });\n }", "function cms_stiky_menu() {\r\n\t\tif (header_top < scroll_top && window_width > 992) {\r\n\t\t\tswitch (true) {\r\n\t\t\t\tcase (window_width > 0):\r\n\t\t\t\t\theader.addClass('header-fixed');\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\theader.removeClass('header-fixed');\r\n\t\t}\r\n\t}", "function setHeader() {\n if (window.innerWidth < 992) {\n if ($(window).scrollTop() > 100) {\n header.css({ 'top': \"0\" });\n }\n else {\n header.css({ 'top': \"10\" });\n }\n }\n else {\n if ($(window).scrollTop() > 100) {\n header.css({ 'top': \"-15px\" });\n }\n else {\n header.css({ 'top': \"0\" });\n }\n }\n if (window.innerWidth > 991 && menuActive) {\n closeMenu();\n }\n }", "function siteHeaderScroll(scroll, offset) {\n\n // \n // Add .filled class\n // \n\n if (scroll >= offset) {\n $('.site-header').addClass('filled');\n }\n\n\n //\n // Remove .filled class\n //\n\n else {\n $('.site-header').removeClass('filled');\n }\n}", "function scrollHeader(){\r\n const nav = document.getElementById('header')\r\n // When the scroll is greater than 200 viewport height, add the scroll-header class to the header tag\r\n if(this.scrollY >= 80) nav.classList.add('scroll-header'); else nav.classList.remove('scroll-header')\r\n }", "function redrawDotNav(){\n var half = $(window).height() / 2;\n var section1Top = 0;\n // The top of each section is offset by half the distance to the previous section.\n var section2Top = $('#about').offset().top - half;\n var section3Top = $('#features').offset().top - half;\n var section4Top = $('#demo').offset().top - half;\n var section5Top = $('#conclusion').offset().top - half;\n $('nav#primary a').removeClass('active');\n if($(document).scrollTop() >= section1Top && $(document).scrollTop() < section2Top){\n $('nav#primary a.home').addClass('active');\n } else if ($(document).scrollTop() >= section2Top && $(document).scrollTop() < section3Top){\n $('nav#primary a.about').addClass('active');\n } else if ($(document).scrollTop() >= section3Top && $(document).scrollTop() < section4Top){\n $('nav#primary a.features').addClass('active');\n } else if ($(document).scrollTop() >= section4Top && $(document).scrollTop() < section5Top){\n $('nav#primary a.demo').addClass('active');\n } else if ($(document).scrollTop() >= section5Top){\n $('nav#primary a.conclusion').addClass('active');\n }\n}", "function scroll_style() {\n var window_top = $(window).scrollTop();\n var div_top = 1;\n\n if (window_top > div_top){\n console.log('show navigation');\n $('#splash').slideUp(\"slow\");\n $('#loadSecond').fadeIn(\"slow\");\n $('#navbar').slideDown(\"slow\");\n } else {\n $('#loadSecond').slideDown();\n $('#navbar').slideUp();\n $('#splash').fadeIn();\n console.log('no show navigation'); }\n }", "function headerScroll() {\n \"use strict\";\n var changeNavigationOn = 80;\n var sy = scrollY();\n // console.log($(window).innerWidth());\n if ($(window).innerWidth() > 991) {\n if (sy >= changeNavigationOn) {\n // console.log(\"ON\");\n $(\"#header\").removeClass('changeHeaderOn');\n } else {\n $(\"#header\").removeClass('changeHeaderOn');\n }\n if (sy >= 10) {\n $(\"#header\").addClass('changeHeaderOn');\n }\n }\n}", "function setActive () {\n window.addEventListener('scroll', function (event) {\n let section = getActiveElem();\n section.classList.add('your-active-class');\n // set other sections as inactive\n for (let item of sectionList) {\n if (item.id != section.id & item.classList.contains('your-active-class')) {\n item.classList.remove('your-active-class');\n }\n }\n // set corresponding header style\n const active = document.querySelector('li > a[data-id=\"' + section.id + '\"]');\n active.classList.add('active__link');\n // remove from other headers\n const headers = document.querySelectorAll('.menu__link');\n for (let item of headers) {\n if (item.dataset.id != active.dataset.id & item.classList.contains('active__link')) {\n item.classList.remove('active__link');\n }\n };\n });\n}", "function Activating() {\r\n window.addEventListener(\"scroll\", function(event) {\r\n let activatedsection = sectioninview();\r\n activatedsection.classList.add(\"your-active-class\");\r\n\r\n\r\n for (const element of allsections) {\r\n if (element.id != activatedsection.id & element.classList.contains(\"your-active-class\")) {\r\n element.classList.remove(\"your-active-class\");\r\n }\r\n }\r\n let activeli = document.querySelector(\"li[data-nav=\" + activatedsection.id + \"]\");\r\n activeli.classList.add(\"active_header\");\r\n\r\n const headers = document.querySelectorAll(\".menu__link\");\r\n for (const element of headers) {\r\n\r\n if (element.dataset.nav != activeli.dataset.nav & element.classList.contains(\"active_header\")) {\r\n element.classList.remove(\"active_header\");\r\n }\r\n };\r\n });\r\n}", "function navbarOnScroll() {\n var x = $(window).scrollTop();\n var vh = $(window).height();\n if (x <= vh*0.55) {\n if(!titleHidden){\n $(\"#navbar-title\").animate({opacity: 0.0}, 300);\n $(\"#main-nav\").animate({padding: \"8px 0\"}, 300);\n titleHidden = true;\n }\n } else {\n if(titleHidden || onceFlag){\n $(\"#navbar-title\").animate({opacity: 1.0}, 300);\n $(\"#main-nav\").animate({padding: \"24px 0\"}, 300);\n titleHidden = false;\n onceFlag = false;\n }\n }\n}", "function scroll() {\n // Check the menus offset.\n if ($(window).scrollTop() >= origOffsetY) {\n //If it is indeed beyond the offset, affix it to the top.\n $(menu).addClass(\"fixed-top bg-fixed\");\n } else {\n // Otherwise, un affix it.\n $(menu).removeClass(\"fixed-top bg-fixed\");\n }\n}", "function bigNav() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $offset = nectarDOMInfo.scrollTop,\r\n\t\t\t\t\t$windowWidth = nectarDOMInfo.winW,\r\n\t\t\t\t\t$scrollTriggerOffset = ($body.is('.material')) ? 150 : 30;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($body.is('.material-ocm-open')) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($offset <= $scrollTriggerOffset && $windowWidth > 1000 || $('.small-nav').length > 0 && $('#ajax-content-wrap.no-scroll').length > 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#header-outer, #search-outer').removeClass('small-nav');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('#header-outer[data-megamenu-rt=\"1\"]').length > 0 && \r\n\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t$('#header-outer .megamenu').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($headerOuterEl.attr('data-transparent-header') == 'true' && \r\n\t\t\t\t\t\t\t$('.nectar-box-roll').length == 0 && \r\n\t\t\t\t\t\t\t$('.megamenu.sfHover').length == 0) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.addClass('transparent');\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('no-transition');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($headerOuterEl.attr('data-transparent-header') == 'true' && $('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\t\t\t$headerOuterEl.addClass('transparent');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Body border full width side padding\r\n\t\t\t\t\t\tif ($('#header-outer[data-full-width=\"true\"][data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t$bodyBorderTop.length > 0 && \r\n\t\t\t\t\t\t$bodyBorderHeaderColorMatch == true) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('#header-outer[data-full-width=\"true\"] header > .container').stop(true, true).animate({\r\n\t\t\t\t\t\t\t\t'padding': '0 28px'\r\n\t\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\t\tqueue: false,\r\n\t\t\t\t\t\t\t\tduration: 250,\r\n\t\t\t\t\t\t\t\teasing: 'easeOutCubic'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('header#top nav > ul > li.menu-item-with-margin').stop(true, true).animate({\r\n\t\t\t\t\t\t\t\t'margin-right': (parseInt($('header#top nav > ul > li.menu-item-with-margin').css('margin-right')) + parseInt(logoShrinkNum) * 3) + 'px'\r\n\t\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\t\tqueue: false,\r\n\t\t\t\t\t\t\t\tduration: 140,\r\n\t\t\t\t\t\t\t\teasing: 'easeOutQuad'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Secondary header\r\n\t\t\t\t\t\tif ($headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$headerSecondaryEl.removeClass('hide-up');\r\n\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t.removeClass('hide-up')\r\n\t\t\t\t\t\t\t\t.css('transform', 'translateY(0%)');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Box roll\r\n\t\t\t\t\t\tif ($('.nectar-box-roll').length > 0 && $('#header-outer[data-permanent-transparent=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t\t$('#ajax-content-wrap').animate({\r\n\t\t\t\t\t\t\t\t'margin-top': (Math.floor(($logoHeight) + (headerPadding * 2) + nectarDOMInfo.adminBarHeight + nectarDOMInfo.secondaryHeaderHeight))\r\n\t\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\t\tqueue: false,\r\n\t\t\t\t\t\t\t\tduration: 250,\r\n\t\t\t\t\t\t\t\teasing: 'easeOutCubic'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll.headerResizeEffect', bigNav);\r\n\t\t\t\t\t\t$window.on('scroll.headerResizeEffect', smallNav);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Dark slider coloring border\r\n\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').css('transition', 'transform 0.3s ease, background-color 0.30s ease, opacity 0.3s ease, box-shadow 0.30s ease, margin 0.25s ease-out');\r\n\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"] .cart-menu').css('transition', 'none');\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').css('transition', 'transform 0.3s ease, background-color 0.30s ease, opacity 0.3s ease, box-shadow 0.30s ease, border-color 0.30s ease, margin 0.25s ease-out');\r\n\t\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"] .cart-menu').css('transition', 'border-color 0.30s ease');\r\n\t\t\t\t\t\t}, 300);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function fixedMenu(scroll) {\n const headerScroll = document.querySelector(\".navigation-bar\");\n\n // In the case that the scroll is greater than 300 add some classes\n if (scroll > 300) {\n headerScroll.classList.add(\"fixed-top\");\n } else {\n headerScroll.classList.remove(\"fixed-top\");\n }\n}", "function smallHeader() {\n\t\n\tif (jQuery(window).scrollTop() > 40) {var delDarkHeader = false;\n\tvar addTransHeader = false;\n\tjQuery('nav#main-nav > ul > li.mega-menu').on({\n\t\tmouseenter: function() {\n\t\t\tif (jQuery(window).width() > 1023 && !jQuery(\"header\").hasClass(\"header-style-vertical\")) {\n\t\t\t\tif (jQuery(\"header\").hasClass(\"sub-dark\")) {\n\t\t\t\t\tif (!jQuery(\"header\").hasClass(\"header-dark\")) {\n\t\t\t\t\t\tdelDarkHeader = true;\n\t\t\t\t\t\tjQuery(\"header\").addClass('header-dark');\n\t\t\t\t\t}\n\t\t\t\t\tif (!jQuery(\"header\").hasClass(\"transparent-light\")) {\n\t\t\t\t\t\taddTransHeader = true;\n\t\t\t\t\t\tjQuery(\"header\").addClass('transparent-light');\n\t\t\t\t\t}\n\t\t\t\t} else if (jQuery(\"header\").hasClass(\"header-dark\") || jQuery(\"header\").hasClass(\"transparent-light\")) {\n\t\t\t\t\tjQuery(\"header\").addClass('mega-hover');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmouseleave: function() {\n\t\t\tif (jQuery(window).width() > 1023 && !jQuery(\"header\").hasClass(\"header-style-vertical\")) {\n\t\t\t\tjQuery(\"header\").removeClass('mega-hover');\n\t\t\t\tif (delDarkHeader) { jQuery(\"header\").removeClass('header-dark'); }\n\t\t\t\tif (addTransHeader) { jQuery(\"header\").removeClass('transparent-light'); }\n\t\t\t}\n\t\t}\n\t});\n\t\tjQuery(\"header\").addClass(\"small-header\");\t\n\t} else {\n\t\tjQuery(\"header\").removeClass(\"small-header\");\t\n\t}\n\t\n}", "function smallHeader() {\n\t\n\tif (jQuery(window).scrollTop() > 40) {var delDarkHeader = false;\n\tvar addTransHeader = false;\n\tjQuery('nav#main-nav > ul > li.mega-menu').on({\n\t\tmouseenter: function() {\n\t\t\tif (jQuery(window).width() > 1023 && !jQuery(\"header\").hasClass(\"header-style-vertical\")) {\n\t\t\t\tif (jQuery(\"header\").hasClass(\"sub-dark\")) {\n\t\t\t\t\tif (!jQuery(\"header\").hasClass(\"header-dark\")) {\n\t\t\t\t\t\tdelDarkHeader = true;\n\t\t\t\t\t\tjQuery(\"header\").addClass('header-dark');\n\t\t\t\t\t}\n\t\t\t\t\tif (!jQuery(\"header\").hasClass(\"transparent-light\")) {\n\t\t\t\t\t\taddTransHeader = true;\n\t\t\t\t\t\tjQuery(\"header\").addClass('transparent-light');\n\t\t\t\t\t}\n\t\t\t\t} else if (jQuery(\"header\").hasClass(\"header-dark\") || jQuery(\"header\").hasClass(\"transparent-light\")) {\n\t\t\t\t\tjQuery(\"header\").addClass('mega-hover');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmouseleave: function() {\n\t\t\tif (jQuery(window).width() > 1023 && !jQuery(\"header\").hasClass(\"header-style-vertical\")) {\n\t\t\t\tjQuery(\"header\").removeClass('mega-hover');\n\t\t\t\tif (delDarkHeader) { jQuery(\"header\").removeClass('header-dark'); }\n\t\t\t\tif (addTransHeader) { jQuery(\"header\").removeClass('transparent-light'); }\n\t\t\t}\n\t\t}\n\t});\n\t\tjQuery(\"header\").addClass(\"small-header\");\t\n\t} else {\n\t\tjQuery(\"header\").removeClass(\"small-header\");\t\n\t}\n\t\n}", "function smallHeader() {\n\t\n\tif (jQuery(window).scrollTop() > 40) {var delDarkHeader = false;\n\tvar addTransHeader = false;\n\tjQuery('nav#main-nav > ul > li.mega-menu').on({\n\t\tmouseenter: function() {\n\t\t\tif (jQuery(window).width() > 1023 && !jQuery(\"header\").hasClass(\"header-style-vertical\")) {\n\t\t\t\tif (jQuery(\"header\").hasClass(\"sub-dark\")) {\n\t\t\t\t\tif (!jQuery(\"header\").hasClass(\"header-dark\")) {\n\t\t\t\t\t\tdelDarkHeader = true;\n\t\t\t\t\t\tjQuery(\"header\").addClass('header-dark');\n\t\t\t\t\t}\n\t\t\t\t\tif (!jQuery(\"header\").hasClass(\"transparent-light\")) {\n\t\t\t\t\t\taddTransHeader = true;\n\t\t\t\t\t\tjQuery(\"header\").addClass('transparent-light');\n\t\t\t\t\t}\n\t\t\t\t} else if (jQuery(\"header\").hasClass(\"header-dark\") || jQuery(\"header\").hasClass(\"transparent-light\")) {\n\t\t\t\t\tjQuery(\"header\").addClass('mega-hover');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmouseleave: function() {\n\t\t\tif (jQuery(window).width() > 1023 && !jQuery(\"header\").hasClass(\"header-style-vertical\")) {\n\t\t\t\tjQuery(\"header\").removeClass('mega-hover');\n\t\t\t\tif (delDarkHeader) { jQuery(\"header\").removeClass('header-dark'); }\n\t\t\t\tif (addTransHeader) { jQuery(\"header\").removeClass('transparent-light'); }\n\t\t\t}\n\t\t}\n\t});\n\t\tjQuery(\"header\").addClass(\"small-header\");\t\n\t} else {\n\t\tjQuery(\"header\").removeClass(\"small-header\");\t\n\t}\n\t\n}", "function sticky_nav_scroll() {\n if (window.pageYOffset > 100 && w >= 500) {\n $('.nav').removeClass('display-none');\n $('body').addClass('body-margin-modifier');\n }\n else {\n $('.nav').addClass('display-none');\n $('body').removeClass('body-margin-modifier');\n }\n }", "function cms_stiky_menu() {\r\n\t\tif (header_top <= scroll_top) {\r\n\t\t\tswitch (true) {\r\n\t\t\t\tcase (window_width > 992):\r\n\t\t\t\t\theader.addClass('header-fixed');\r\n\t\t\t\t\t$('body').css('margin-top', header.outerHeight(true)+'px');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase ((window_width <= 992 && window_width >= 768) && (CMSOptions.menu_sticky_tablets == '1')):\r\n\t\t\t\t\theader.addClass('header-fixed');\r\n\t\t\t\t\t$('body').css('margin-top', header.outerHeight(true)+'px');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase ((window_width <= 768) && (CMSOptions.menu_sticky_mobile == '1')):\r\n\t\t\t\t\theader.addClass('header-fixed');\r\n\t\t\t\t\t$('body').css('margin-top', header.outerHeight(true)+'px');\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\theader.removeClass('header-fixed');\r\n\t\t\t$('body').css('margin-top', '0');\r\n\t\t}\r\n\t}", "function setScroll(){\n window.addEventListener(\"scroll\", ()=> {\n \n for (let i=0; i<navElements.length; ++i){\n let elementScroll = document.getElementById('section'+(i+1));\n let buttonNav = document.getElementById(\"section_nav\"+(i+1));\n if (isScrolledIntoView(elementScroll) ){\n elementScroll.classList.add(\"active\");\n buttonNav.style.background = \"orange\";\n \n }\n else{\n elementScroll.classList.remove(\"active\");\n buttonNav.style.background = \"white\";\n }\n \n }\n });\n}", "function headerStyle(){\r\n var windowPos = $(window).scrollTop(); // get the offset of the window from the top of page\r\n var windowHeight = $(window).height(); // get the height of the window\r\n var docHeight = $(document).height();\r\n var headerHeight = $('.header').outerHeight();\r\n\r\n for (var i=0; i < elArray.length; i++) {\r\n var theID = elArray[i];\r\n var divPos = $('#'+theID).offset().top; // get the offset of the div from the top of page\r\n var divHeight = $('#'+theID).outerHeight(); // get the height of the div in question\r\n\r\n if ( windowPos >= divPos - headerHeight - 10 && windowPos < (divPos + divHeight) ) {\r\n $('#'+theID).addClass('dark')\r\n } else {\r\n $('#'+theID).removeClass('dark')\r\n }\r\n\r\n if($('[data-headerstyle=\"dark\"]').hasClass('dark')) {\r\n $('body').addClass('header-dark')\r\n } else {\r\n $('body').removeClass('header-dark')\r\n }\r\n }\r\n}", "function toggleIsOpaque() {\n var scrollTop = window.scrollY;\n if (scrollTop > 0) {\n headerNav.classList.add(\"is-opaque\");\n } else {\n headerNav.classList.remove(\"is-opaque\");\n }\n }" ]
[ "0.7169707", "0.71389514", "0.7040095", "0.6822407", "0.6800498", "0.6783916", "0.6780022", "0.67553127", "0.6737385", "0.6737385", "0.67184144", "0.66696876", "0.66277003", "0.6626935", "0.66197735", "0.6611527", "0.65977097", "0.65884733", "0.65774775", "0.6560479", "0.655236", "0.65461373", "0.65445125", "0.65422904", "0.6538151", "0.65201217", "0.65063983", "0.6505263", "0.6500701", "0.64989483", "0.6484329", "0.6477512", "0.64718527", "0.64601034", "0.6456048", "0.645196", "0.6445911", "0.6425556", "0.641135", "0.6392193", "0.6391024", "0.6388943", "0.6386245", "0.6371347", "0.63709885", "0.63564426", "0.632803", "0.6317981", "0.6313023", "0.6285264", "0.62835306", "0.62835306", "0.627181", "0.62516236", "0.6249817", "0.62434614", "0.62420154", "0.62340593", "0.6223899", "0.6223722", "0.62087566", "0.6198332", "0.6187791", "0.61875707", "0.61841404", "0.6182778", "0.617733", "0.61766386", "0.61758435", "0.6163566", "0.61553586", "0.6153796", "0.6146652", "0.6143886", "0.61326253", "0.613164", "0.6129357", "0.6123544", "0.6099678", "0.60988325", "0.6097342", "0.6093857", "0.6081734", "0.6078578", "0.6076195", "0.60736525", "0.606863", "0.60630727", "0.6053899", "0.6053773", "0.60465103", "0.6045891", "0.604181", "0.604181", "0.604181", "0.6028074", "0.60223883", "0.6020561", "0.6015192", "0.60136294" ]
0.67566824
7
TOPBAR HIDE ON SCROLL
function handleTopNav() { var $upperNav = $('.upper-nav-wrapper'); var upperNavHeight; var classOut = 'nav-out'; if ( $upperNav.length && $(window).width() > 768 ) { upperNavHeight = $upperNav.height(); if ( scrollPos > 0 && scrollPos <= upperNavHeight ) { $upperNav.css( 'margin-top', - scrollPos ); $upperNav.removeClass( classOut ); //$('#main-navigation').css('top', 0); } else if ( scrollPos > topbarHeight ) { if ( !$upperNav.hasClass( classOut ) ) { $upperNav.addClass( classOut ); $upperNav.css('margin-top', - upperNavHeight ); } } else { $upperNav.removeClass( classOut ); $upperNav.css('margin-top', 0); //$('#main-navigation').css('top', topbarHeight); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initTopBar(){\n\tvar header = jQuery('#header')\n\tvar animSpeed = 400;\n\tvar win = jQuery(window);\n\tjQuery('.top-bar').each(function(){\n\t\tvar bar = jQuery(this);\n\t\tbar.css({\n\t\t\ttop: -bar.outerHeight()\n\t\t}).hide();\n\t\twin.bind('scroll resize orientationchange load', function(){\n\t\t\tif(win.scrollTop() < header.height()) {\n\t\t\t\tbar.stop().animate({\n\t\t\t\t\ttop: -bar.outerHeight()\n\t\t\t\t}, {duration:animSpeed, complete: function(){\n\t\t\t\t\tbar.hide();\n\t\t\t\t}})\n\t\t\t}\n\t\t\telse bar.show().stop().animate({top: 0}, {duration:animSpeed});\n\t\t})\n\t})\n}", "function handleScroll() {\n var yPos = window.pageYOffset\n if (yPos>700) {\n setShowTopButton(true)\n } else {\n setShowTopButton(false)\n }\n }", "function scrollFunction_topBtn() {\r\n if (\r\n document.body.scrollTop > 20 ||\r\n document.documentElement.scrollTop > 20\r\n ) {\r\n toTopBtn.style.display = \"block\";\r\n } else {\r\n toTopBtn.style.display = \"none\";\r\n }\r\n }", "function hideToTop() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop < 350 || $offCanvasEl.is('.fullscreen.open') ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $animationTiming = ($('#slide-out-widget-area.fullscreen.open').length > 0) ? 1150 : 350;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#to-top').stop().transition({\r\n\t\t\t\t\t\t\t'bottom': '-30px'\r\n\t\t\t\t\t\t}, $animationTiming, 'easeInOutQuint');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll', hideToTop);\r\n\t\t\t\t\t\t$window.on('scroll', showToTop);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function scrollFunction() {\n if (window.innerHeight < 144 || document.documentElement.scrollTop < 144) {\n document.getElementById(\"navbar\").style.top = \"144px\";\n console.log(window.scrollY)\n empo.style.display=\"none\"\n } else {\n document.getElementById(\"navbar\").style.top = \"0px\";\n console.log(window.scrollY)\n empo.style.display=\"initial\"\n\n }\n }", "function showDivTop() {\r\n if (window.scrollY >= 300) {\r\n divTop.classList.add('visible');\r\n } else {\r\n divTop.classList.remove('visible');\r\n }\r\n }", "function scrollTopButtonHide() {\n\t\tif ($(window).width() < 1500) {\n\n\t\t\t$(window).on('scroll', function() {\n\t\t\t\tif ($(this).scrollTop() > 100) {\n\t\t\t\t\t$('.js-scroll-top-button').addClass('-show');\n\t\t\t\t} else {\n\t\t\t\t\t$('.js-scroll-top-button').removeClass('-show');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif ($(document).scrollTop() > 100) {\n\t\t\t\t$('.js-scroll-top-button').addClass('-show');\n\t\t\t}\n\n\t\t}\n\t}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n topBtn.style.display = \"block\";\n } else {\n topBtn.style.display = \"none\";\n }\n}", "function hideMobileBar(){\n\t\t\t$(menu).show(0);\n\t\t\t$(showHideButton).hide(0);\n\t\t}", "function hideMobileBar(){\n\t\t\t$(menu).show(0);\n\t\t\t$(showHideButton).hide(0);\n\t\t}", "function gestoreScroll() {\r\n if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {\r\n nodoPulsTop.style.display = \"block\";\r\n } else {\r\n nodoPulsTop.style.display = \"none\";\r\n }\r\n}", "function hideStickyMegaBar() {\n $(\".header-mega-menu .mega-menu-lg-container\").removeClass('sticky-show');\n $(\".lg-down-header .mega-menu-lg-down-container\").removeClass('sticky-show');\n $(\".header .lg-navbar .login-button\").removeClass(\"d-none\").addClass(\"d-block\");\n $(\".header-mega-menu .login-button-sticky\").removeClass(\"d-block\").addClass(\"d-none\");\n $(\".sticky-navbar\").removeClass(\"login-button-sticky-block\").addClass(\"login-button-sticky-none\");\n addTop0AtCompareTable();\n }", "function head () {\n\t\t\n\t\tif (clientWidth < 800) {\n\n\t\t\tif ($(this).scrollTop() > 100) \n\t\t\t\t$logoBar.css('display', 'none');\n\t\t\telse\n\t\t\t\t$logoBar.css('display', 'block');\n\n\t\t} else {\n\n\t\t\t$logoBar.css('display', 'block');\n\t\t}\n\t}", "moveTopAppBar_() {\n if (this.checkForUpdate_()) {\n // Once the top app bar is fully hidden we use the max potential top app bar height as our offset\n // so the top app bar doesn't show if the window resizes and the new height > the old height.\n let offset = this.currentAppBarOffsetTop_;\n if (Math.abs(offset) >= this.topAppBarHeight_) {\n offset = -numbers$6.MAX_TOP_APP_BAR_HEIGHT;\n }\n\n this.adapter_.setStyle('top', offset + 'px');\n }\n }", "function showToTop() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop > 350 && !$offCanvasEl.is('.fullscreen.open') ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#to-top').stop().transition({\r\n\t\t\t\t\t\t\t'bottom': '17px'\r\n\t\t\t\t\t\t}, 350, 'easeInOutCubic');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll', showToTop);\r\n\t\t\t\t\t\t$window.on('scroll', hideToTop);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function hideScrollElem(){\n\t$('.dragger_container').hide(0)\n\t$(\".scrollUpBtn\").hide(0)\n\t$(\".scrollDownBtn\").hide(0)\n}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n myTopButton.style.display = \"block\";\n } else {\n myTopButton.style.display = \"none\";\n }\n}", "function setScroll(){\n $(window).scroll(function(event){\n if($(window).scrollTop()>20){\n topbtn.style.display ='block';\n }\n else{\n topbtn.style.display='none';\n } \n });\n}", "function scrollFunction() {\n if (document.documentElement.scrollTop > 20) {\n topButton.style.display = 'block';\n } else {\n topButton.style.display = 'none';\n }\n}", "toggleBackToTopButtonVisibility() {\n if (this._toTopOfPageButton) {\n if (window.scrollY > 100) {\n this._toTopOfPageButton.style.display = \"block\";\n } else {\n this._toTopOfPageButton.style.display = \"none\";\n }\n }\n }", "function fixedTopBar() {\n\n 'use strict';\n\n var offset,\n $navbar = $( '.navbar' );\n\n $( window ).on( 'scroll.happytodesign', function() {\n offset = $navbar.offset().top;\n if ( offset > 10 ) {\n if ( $navbar.attr( 'data-scrolling' ) !== 'true' ) {\n $navbar.attr( 'data-scrolling', 'true' );\n }\n }\n else {\n $navbar.attr( 'data-scrolling', 'false' );\n }\n } ).trigger( 'scroll.happytodesign' );\n}", "function pageScroll() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"topPageBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"topPageBtn\").style.display = \"none\";\n }\n}", "function manageTopPosition()\n {\n var scrollHeight = $(window).scrollTop();\n\n if(scrollHeight > 50 && !tucked)\n {\n tucked = true;\n $(\"#top\").css({\"top\": determineTopHeight() + \"px\", \"position\": \"fixed\"});\n $(\"#nav-bar\").toggleClass(\"tucked\");\n $(\"#nav-bar > .link > div:first\").removeClass(\"hovered\");\n }\n else if (scrollHeight <= 50 && tucked)\n {\n tucked = false;\n $(\"#top\").css({\"top\": \"0\", \"position\": \"absolute\"});\n $(\"#name\").css(\"display\", \"flex\");\n $(\"#nav-bar\").toggleClass(\"tucked\");\n resetNavbar();\n $(\"#nav-bar > .link:first > div:first\").addClass(\"hovered\");\n }\n }", "function showScroll() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"backToTopBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"backToTopBtn\").style.display = \"none\";\n }\n}", "function removeTopBar() {\n // Get the iframe\n var iframe = document.querySelector(\"#\" + yankeemallIframeId);\n iframe.parentNode.removeChild(iframe);\n}", "function showTopButton() {\n if (document.getElementById(\"myNav\").scrollTop > 20) {\n document.getElementById(\"top-btn\").style.display = \"block\";\n } else {\n document.getElementById(\"top-btn\").style.display = \"none\";\n }\n}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"topButton\").style.display = \"block\";\n } else {\n document.getElementById(\"topButton\").style.display = \"none\";\n }\n}", "function floatingTopButtonToolbarToggle()\n{\n toolbarToggle.updateForScroll();\n}", "function initToolbar() {\n\t\taddEvent(window, \"scroll\", function() {\n\t\t\tvar toolbar = document.getElementById(\"toolbar\");\n\t\t\tvar tcontainer = document.getElementById(\"toolbar-container\");\n\t\t\tif (tcontainer.getBoundingClientRect().top<=0) {\n\t\t\t\ttoolbar.style.position = \"fixed\"; toolbar.style.top = 0;\n\t\t\t} else \n\t\t\t\ttoolbar.style.position = \"relative\";\n\t\t})\n\t}", "function showScrolltop () {\n var scrollPosition = $(document).scrollTop();\n if (scrollPosition > 50) {\n scrolltop.fadeIn(300);\n }\n else {\n scrolltop.fadeOut(300);\n }\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n removeActiveNav();\n removeActiveSection();\n}", "function showScrollTopBtn() {\n if ($(window).scrollTop() > 1500 ) {\n $(goTopBtn).show();\n\n } else {\n $(goTopBtn).hide();\n }\n}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n backtoTop.style.display = \"block\";\n } else {\n backtoTop.style.display = \"none\";\n }\n}", "function hideURLbar() {\t\r\n\twindow.scrollTo(0, 1);\r\n}", "backToTopBtn() {\n if (window.scrollY >= 1000) {\n this.show.backToTop = false\n } else {\n this.show.backToTop = true\n }\n }", "function headerTopHandler(headerTop) {\n if (window.scrollY > 100) {\n headerTop.classList.add('hide');\n }\n else {\n headerTop.classList.remove('hide');\n }\n}", "function offSetManager() {\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if (yOffset < currYOffSet) {\n myNavBar.add();\n } else if (currYOffSet == yOffset) {\n myNavBar.remove();\n }\n }", "function scrollFunction() {\n if (document.body.scrollTop > 10 || document.documentElement.scrollTop > 10) {\n topbutton.style.display = \"block\";\n } else {\n topbutton.style.display = \"none\";\n }\n}", "hideBottomTabBar() {\n $('#nav-tabbar').addClass('hidden-xs');\n $(this.get('disableBottomClassSelector')).addClass('bottom-nav-disabled');\n this.get('eventBus').publish('fixedItemsShift');\n this.set('bottomTabBarIsShowing',false);\n $('#nav-body-inner').addClass('full-body');\n this.updateSidebarScrollerHeight();\n }", "function showScroll() {\r\n var scroll = $(window).scrollTop();\r\n var height = $(window).height();\r\n\r\n if (scroll > height) {\r\n $('#scroll_to_top').show();\r\n } else {\r\n $('#scroll_to_top').hide();\r\n }\r\n }", "function followingBar() {\n // $(window).unbind('scroll');\n // console.log($._data( $(window)[0], \"events\" ));\n $(window).scroll(function() {\n var isFullscreen = $editor.hasClass('fullscreen');\n\n if (isFullscreen) {\n // console.log(\"fullscreen\");\n return false;\n }\n\n var toolbar = $editor.children('.note-toolbar');\n var toolbarHeight = toolbar.outerHeight();\n var editable = $editor.children('.note-editable');\n var editableHeight = editable.outerHeight();\n var editorWidth = $editor.width;\n var toolbarOffset, editorOffsetTop, editorOffsetBottom;\n var activateOffset, deactivateOffsetTop, deactivateOffsetBottom;\n var currentOffset;\n var relativeOffset;\n var otherBarHeight;\n\n // check if the web app is currently using another static bar\n otherBarHeight = $(\".\" + options.otherStaticBarClass).outerHeight();\n if (!otherBarHeight) otherBarHeight = 0;\n //console.log(otherBarHeight);\n\n currentOffset = $(document).scrollTop()+$('nav.nav-extended').height();\n toolbarOffset = toolbar.offset().top+$('nav.nav-extended').height();\n editorOffsetTop = $editor.offset().top;\n editorOffsetBottom = editorOffsetTop + editableHeight;\n activateOffset = toolbarOffset - otherBarHeight;\n deactivateOffsetBottom = editorOffsetBottom - otherBarHeight;\n deactivateOffsetTop = editorOffsetTop - otherBarHeight;\n\n if ((currentOffset > activateOffset) && (currentOffset < deactivateOffsetBottom)) {\n relativeOffset = currentOffset - $editor.offset().top + otherBarHeight;\n toolbar.css({'top': relativeOffset + 'px', 'z-index': 990});\n } else {\n if ((currentOffset < toolbarOffset) && (currentOffset < deactivateOffsetBottom)) {\n toolbar.css({'top': 0, 'z-index': 990});\n\n if (currentOffset > deactivateOffsetTop) {\n relativeOffset = currentOffset - $editor.offset().top + otherBarHeight;\n toolbar.css({'top': relativeOffset + 'px', 'z-index': 990});\n }\n }\n }\n });\n }", "function back_to_top(){\n var scrollTop = $(window).scrollTop();\n var offset = 500;\n if (scrollTop < offset) {\n $('.evision-back-to-top').hide();\n } else {\n $('.evision-back-to-top').show();\n }\n }", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n }", "topAppBarScrollHandler_() {\n const currentScrollPosition = Math.max(this.adapter_.getViewportScrollY(), 0);\n const diff = currentScrollPosition - this.lastScrollPosition_;\n this.lastScrollPosition_ = currentScrollPosition;\n\n // If the window is being resized the lastScrollPosition_ needs to be updated but the\n // current scroll of the top app bar should stay in the same position.\n if (!this.isCurrentlyBeingResized_) {\n this.currentAppBarOffsetTop_ -= diff;\n\n if (this.currentAppBarOffsetTop_ > 0) {\n this.currentAppBarOffsetTop_ = 0;\n } else if (Math.abs(this.currentAppBarOffsetTop_) > this.topAppBarHeight_) {\n this.currentAppBarOffsetTop_ = -this.topAppBarHeight_;\n }\n\n this.moveTopAppBar_();\n }\n }", "function offSetManager() {\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if (yOffset < currYOffSet) {\n myNavBar.add();\n } else if (currYOffSet == yOffset) {\n myNavBar.remove();\n }\n }", "function show_button() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"btn-top\").style.display = \"block\";\n } else {\n document.getElementById(\"btn-top\").style.display = \"none\";\n }\n}", "function hideElementsOnScroll() {\n hideHeaderOnScroll();\n hideAllDropdownContents();\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n }", "function offSetManager(){\n \n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n \n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n \n }", "function offSetManager(){\n \n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n \n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n \n }", "function topFunction() {\n\n shouldShow = false;\n document.getElementById(\"myBtn\").style.display = \"none\";\n\n interval = setInterval(scroll, 50);\n\n}", "function toTop() {\n document.body.scrollTop= 0;\n hideButton();\n}", "function getScrollToTopBtn() {\n\n if ($(window).scrollTop() > $('.head-section').height() ) {\n\n $('.scroll-to-top').fadeIn();\n\n } else {\n\n $('.scroll-to-top').fadeOut();\n\n }\n\n }", "function backToTopVisibility() {\n\tif (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200)\n\t\tdocument.getElementById(\"back-to-top\").style.display = \"block\";\n\telse document.getElementById(\"back-to-top\").style.display = \"none\";\n} // backToTopVisibility", "function goTop(){\n\tvar goTop = $('#goTop');\n\tvar apply = $('.bottom-btn');\n\tgoTop.hide();\n\tapply.hide();\n\n\t$(window).on('scroll', function() {\n\t\tvar scroll_top = getScrollTop();\n\t\tif(scroll_top > 50){\n\t\t\tapply.show();\n\t\t} else{\n\t\t\tapply.hide();\n\t\t}\n\t\tif(scroll_top >= winH*2){\n\t\t\tgoTop.show();\n\t\t}else{\n\t\t\tgoTop.hide();\n\t\t}\n\t});\n\tgoTop.on('click', function(){\n\t\tdocument.body.scrollTop = 0;\n\t});\n}", "function showBackToTopButton(){\n if( $(window).scrollTop() >= backToTopFadeinPosition){\n backtoTop.css({'display':'inline-block'});\n }else{\n backtoTop.css({'display':'none'});\n }\n //console.log('Window Position = ' + $(window).scrollTop()); \n }", "function hideBar() {\n if( ( navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i) ) ) {\n if(window.addEventListener){\n window.addEventListener(\"load\",function() {\n // Set a timeout...\n setTimeout(function(){\n // Hide the address bar!\n window.scrollTo(0, 1);\n }, 0);\n });\n }\n }\n}", "function handleScroll() {\n if (window.pageYOffset === 0) {\n setTop(true)\n }\n setTop(undefined)\n }", "function topBarToggle () {\n var model = modelConnect();\n var topBarToggleAPI = \"toggleTopBar()\";\n model.postMessage(topBarToggleAPI,\"*\");\n}", "function topFct(){\r\n window.scrollTo(0, 0);\r\n }", "function silentScroll(top){\n if(options.scrollBar){\n container.scrollTop(top);\n }\n else if (options.css3) {\n var translate3d = 'translate3d(0px, -' + top + 'px, 0px)';\n transformContainer(translate3d, false);\n }\n else {\n container.css('top', -top);\n }\n }", "function handleTopbar() {\n\n\tif ($('#topbar').length && $(window).width() > 768 && !wrapper.hasClass('header-no-sticky')) {\n\t\tif ($('#header').hasClass('header-2')) {\n\t\t\tvar header2Height = $('.header-2 .main-nav-wrapper').height();\n\t\t\tvar windowScrollTop = $(window).scrollTop();\n\t\t\tif (windowScrollTop >= topbarHeight + header2Height) {\n\t\t\t\t$('.header-2 .main-nav-wrapper').css('position', 'fixed').css('width', '100%').css('top', 0);\n\t\t\t} else {\n\t\t\t\t$('.header-2 .main-nav-wrapper').attr('style', '');\n\t\t\t}\n\t\t} else {\n\t\t\tif (scrollPos > 0 && scrollPos <= topbarHeight) {\n\t\t\t\t$('#topbar').css('margin-top', - scrollPos);\n\t\t\t\t$('#topbar').removeClass( 'topbar-out' );\n\t\t\t\t//$('#main-navigation').css('top', 0);\n\t\t\t} else if (scrollPos > topbarHeight ) {\n\t\t\t\t\n\t\t\t\tif ( !$('#topbar').hasClass( 'topbar-out' ) ) {\n\t\t\t\t\t$('#topbar').addClass( 'topbar-out' );\n\t\t\t\t\t$('#topbar').css('margin-top', - topbarHeight);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$('#topbar').removeClass( 'topbar-out' );\n\t\t\t\t$('#topbar').css('margin-top', 0);\n\t\t\t\t//$('#main-navigation').css('top', topbarHeight);\n\t\t\t}\n\t\t}\n\t}\n}", "function moveIt() {\n const appDiv = document.querySelector(\".App\");\n let top = appDiv.getBoundingClientRect().top;\n // Setting up the classNames of bars depending on the scroll position\n\n setBar1Container(\n top <= 0 && top >= (infoBarHeight * 0.5 + navBarHeight) * -1\n ? \"showInfoContainer\"\n : \"hideInfoContainer\"\n );\n\n setBar2Container(\n top <= (infoBarHeight * 0.5 + navBarHeight) * -1 &&\n top >= (infoBarHeight * 1.5 + navBarHeight) * -1\n ? \"showInfoContainer\"\n : \"hideInfoContainer\"\n );\n\n setBar3Container(\n top <= (infoBarHeight * 1.5 + navBarHeight) * -1 &&\n top >= (infoBarHeight * 2.5 + navBarHeight) * -1\n ? \"showInfoContainer\"\n : \"hideInfoContainer\"\n );\n }", "function headerHide() {\n if ( window.scrollY < 80 ) {\n document.querySelector('#header-cont').classList.remove('header-hide');\n } else {\n document.querySelector('#header-cont').classList.add('header-hide');\n }\n return;\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function showBackTop() {\n window.addEventListener('scroll', function () {\n if(this.scrollY > 400) {\n backTop.style.display = 'block';\n backTop.addEventListener('click', () => {\n this.scrollTo({\n top: 0,\n left: 0,\n behavior: \"smooth\"\n });\n })\n } else {\n backTop.style.display = 'none';\n }\n })\n}", "function checkGoTopArraw() {\n if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {\n document.getElementById(\"myBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"myBtn\").style.display = \"none\";\n }\n }", "function toTop(){\n\tif (window.pageYOffset >= bottomPage){\n\t\ttoTopButton.style.display = 'inline';\n\t} else {\n\t\ttoTopButton.style.display = 'none';\n\t}\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function toggleTop() {\n setTopActive(!topActive);\n }", "function topFunction() {\n document.body.scrollTop = 0\n document.documentElement.scrollTop = 0\n }", "function titleBar()\n{\n\tif(channel == \"tablet\"|| channel == \"desktopweb\")\n\t\tfrmTitlebarOptions.show();\n\telse\n\t\tfrmTtlbarOptions.show();\n}", "function fixed_topbar(){\n d_top = $(document).scrollTop();\n if(d_top*2 > w_height){\n $(\".home__nav\").addClass(\"fixed\");\n }else{\n $(\".home__nav\").removeClass(\"fixed\");\n }\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function showTopBtn() {\n var documentHeight = $(document).height()\n var scrollTop = $(window).scrollTop()\n var windowHeight = $(window).height()\n var scrollPercent = Math.round(scrollTop / (documentHeight - windowHeight) * 100)\n if (scrollPercent > 25) {\n $(topBtn).fadeIn(200);\n } else {\n $(topBtn).fadeOut(200);\n\n }\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function checkSize(){\n\t if ($(window).width() > 480) {\n\t \t// $(\"html, body\").animate({ scrollTop: 0 });\t\t\t\t \n\t } else { \n\t $(\"html, body\").animate({scrollTop:$('.widget-bar').offset().top - 150}, 'slow'); \n\t }\n\t}", "function topFunction() {\r\n document.body.scrollTop = 0;\r\n document.documentElement.scrollTop = 0;\r\n }", "hideInfobar() {\n clearInterval(this.flag);\n clearInterval(this.flag1);\n this.visible = false;\n }", "function defile () {\n var scrollTop = window.pageYOffset;\n if (scrollTop > 50) {\n document.getElementById(\"retour\").className = \"visible\";\n document.getElementById(\"top_head\").style.height = \"50px\";\n $(\"#logo img\").css({'height': '50px'});\n $(\"#nav_mobile\").css({'top':'45px'});\n\n } else {\n document.getElementById(\"retour\").className = \"invisible\";\n document.getElementById(\"top_head\").style.height = \"100px\";\n $(\"#logo img\").css({'height': '80px'});\n $(\"#nav_mobile\").css({'top':'95px'});\n }\n}", "function topFunction() {\r\n\t\t\tdocument.body.scrollTop = 0;\r\n\t\t\tdocument.documentElement.scrollTop = 0;\r\n\t\t}", "function topFunction() {\n\t\t\tdocument.body.scrollTop = 0;\n\t\t\tdocument.documentElement.scrollTop = 0;\n\n\t\t}", "function topFunction() {\n\t\t\tdocument.body.scrollTop = 0; // For Chrome, Safari and Opera \n\t\t\t\tdocument.documentElement.scrollTop = 0; // For IE and Firefox\n\t\t}", "function topFunction(){$('html, body').animate({scrollTop: 0}, 800);}", "function hideHamburgerOnScroll() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n dropdownItems.classList.remove(\"show-hamburger-menu\");\n } \n}", "function topFunction() {\n document.body.scrollTo(0, 3000);\n document.documentElement.scrollTo(0, 3000);\n }", "function topFunction() {\n document.body.scrollTop = 0;\n}", "function BackToTop() {\r\n\t\t\r\n\t\t$('.scrolltotop').on('click', function() {\r\n\t\t\t$('html, body').animate({scrollTop : 0},800);\r\n\t\t\treturn false;\r\n\t\t});\r\n\t\t\r\n\t\t$(window).scroll(function() { \r\n\t\t\tvar scroll = $(window).scrollTop();\r\n\t\t\r\n\t\t\tif (scroll >= 300) {\r\n\t\t\t\t\r\n\t\t\t\t$(\".scrolltotop\").addClass('page-up').removeClass('no-tooltip');\r\n\t\t\t\t$(\"#page-action-holder-right\").removeClass('no-tooltip');\r\n\t\t\t\t\r\n\t\t\t} else {\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$(\".scrolltotop\").removeClass('page-up').addClass('no-tooltip');\r\n\t\t\t\t$(\"#page-action-holder-right\").addClass('no-tooltip');\r\n\t\t\t}\r\n\t\t});\r\n\t\r\n\t}", "function hideHeader() {\r\n let scrollPos = $(window).scrollTop();\r\n let windowWidth = $(window).width();\r\n\r\n //Check Window Location and width\r\n if (scrollPos < 50 && windowWidth > 924) {\r\n //Hide Background\r\n $(\"#navContainer\").addClass(\"clBackground\");\r\n } else {\r\n //Add Background\r\n $(\"#navContainer\").removeClass(\"clBackground\");\r\n }\r\n}", "function headerScroll () {\n let Y = document.documentElement.scrollTop || document.body.scrollTop;\n if (Y > 596) {\n header.classList.add('header-scrolled-view')\n scrollToTopButton.classList.add('show-toTop-btn');\n scrollToTopButton.style.display = 'block';\n }\n else {\n header.classList.remove(\"header-scrolled-view\");\n scrollToTopButton.classList.remove(\"show-toTop-btn\");\n scrollToTopButton.style.display = \"none\";\n }\n }", "function handleScrolling() {\n\tlet scrolled = root.scrollHeight - root.clientHeight;\n\tif((root.scrollTop / scrolled) > 0.95 ) {\n\t\tbtnToTop.style.display = 'block';\n\t} else {\n\t\tbtnToTop.style.display = 'none';\n\t};\n}" ]
[ "0.71608293", "0.68470377", "0.67728347", "0.67573625", "0.66268724", "0.66119576", "0.6596977", "0.6503522", "0.65002173", "0.65002173", "0.6441368", "0.64310133", "0.64081085", "0.640179", "0.64012665", "0.63919926", "0.6389622", "0.63764936", "0.6369483", "0.63693047", "0.63582116", "0.6350021", "0.6348618", "0.6348418", "0.6347253", "0.6329822", "0.631909", "0.6312766", "0.6307066", "0.62842405", "0.6272757", "0.6271778", "0.6270266", "0.6267913", "0.625063", "0.6249963", "0.624237", "0.6236541", "0.62316465", "0.6221195", "0.6219119", "0.621562", "0.61915946", "0.6188039", "0.6187266", "0.6183643", "0.61759466", "0.6158877", "0.6147662", "0.6147662", "0.6130894", "0.61124754", "0.60983396", "0.6085127", "0.60824305", "0.60797596", "0.6079024", "0.6072988", "0.60653687", "0.60591584", "0.60499424", "0.60453784", "0.60261804", "0.6019816", "0.6018684", "0.6018585", "0.60181016", "0.60088927", "0.60072005", "0.59965634", "0.59934574", "0.599039", "0.59880793", "0.5984559", "0.5984559", "0.5984559", "0.5984559", "0.5984559", "0.59812564", "0.5976391", "0.5972346", "0.5972346", "0.59670913", "0.59670913", "0.59670913", "0.5967057", "0.5964226", "0.5956611", "0.59482276", "0.59446317", "0.59445566", "0.5943642", "0.5943201", "0.5935974", "0.5932229", "0.59253675", "0.5924883", "0.5919033", "0.5917174", "0.5916667", "0.5914993" ]
0.0
-1
NAVIGATION VISIBLE ONLY ON SCROLL TO TOP
function stickyNav() { if ( $( '#sticky-nav' ).length ) { var stickyNav = $('#sticky-nav'); var windowScrollTop = $(window).scrollTop(); if ( windowScrollTop >= stickyNav.data( 'scroll-amount' ) ) { stickyNav.addClass( 'sticky-nav-visible' ); } else { stickyNav.removeClass('sticky-nav-visible'); } if ( windowScrollTop >= stickyNav.data( 'scroll-amount' ) - 250 ) { header.removeClass( 'header-' + header.data( 'skin' ) ).addClass( 'header-' + header.data( 'scroll-skin' ) ); $('#wrapper').removeClass( 'topnav-top' ); } else { header.removeClass( 'header-' + header.data( 'scroll-skin' ) ).addClass( 'header-' + header.data( 'skin' ) ).addClass( 'topnav-top' ); $('#wrapper').addClass( 'topnav-top' ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scroll_style() {\n var window_top = $(window).scrollTop();\n var div_top = 1;\n\n if (window_top > div_top){\n console.log('show navigation');\n $('#splash').slideUp(\"slow\");\n $('#loadSecond').fadeIn(\"slow\");\n $('#navbar').slideDown(\"slow\");\n } else {\n $('#loadSecond').slideDown();\n $('#navbar').slideUp();\n $('#splash').fadeIn();\n console.log('no show navigation'); }\n }", "function stikyNav() {\n\n top = allWindow.scrollTop();\n\n if ( top >= 100 ) {\n navBar.addClass(\"nav-sticky\");\n\n } else {\n navBar.removeClass(\"nav-sticky\");\n }\n\n // SHow Also Scroll up Button\n if ( top >= 1000 ) {\n $('.scroll-up').addClass(\"show-up-btn\");\n } else {\n $('.scroll-up').removeClass(\"show-up-btn\");\n }\n }", "toggleNavbarOnScroll() {\n\n let currentScrollTop = window.pageYOffset || document.documentElement.scrollTop;\n\n let scrollingDown = (this.initialScrollTop < currentScrollTop);\n let scrollingUp = (this.initialScrollTop > currentScrollTop);\n\n if (scrollingDown === true) {\n this.navHide();\n } else if (scrollingUp === true && window.screen.height > 500 || currentScrollTop < 10) {\n this.navShow();\n }\n\n this.initialScrollTop = currentScrollTop;\n\n }", "function showTopButton() {\n if (document.getElementById(\"myNav\").scrollTop > 20) {\n document.getElementById(\"top-btn\").style.display = \"block\";\n } else {\n document.getElementById(\"top-btn\").style.display = \"none\";\n }\n}", "function sticky_nav_scroll() {\n if (window.pageYOffset > 100 && w >= 500) {\n $('.nav').removeClass('display-none');\n $('body').addClass('body-margin-modifier');\n }\n else {\n $('.nav').addClass('display-none');\n $('body').removeClass('body-margin-modifier');\n }\n }", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n $(\".navbar\").addClass('invisible');\n } else {\n $(\".navbar\").removeClass('invisible');\n }\n}", "function hasScrolled() {\n var st = $(this).scrollTop();\n // make sure the scroll event is larger than delta\n if (Math.abs(lastST - st) <= delta){\n return;\n }\n // if scrolling down or if above half the intro size\n // hide the sticky nav\n if (st > lastST || st < nHeight*2){\n $(\"nav\").css({ \"opacity\": 1 });\n $('.nav-sticky').css({ \"top\": -nHeight });\n } \n else {\n // else show the navigation on scroll up\n if(wWidth > breakMobile && st + $(window).height() < $(document).height()) {\n $(\"nav\").css({ \"opacity\": 0 });\n $('.nav-sticky').css({ \"top\": 0 });\n }\n }\n // set last scroll top\n lastST = st;\n }", "function showHideNav(){\n if(\n $(window).scrollTop()>200){\n //show white navigation bar \n $(\"nav\").addClass(\"white-nav-top\");\n }\n\n else{\n\n //hide navigation bar\n $(\"nav\").removeClass(\"white-nav-top\");\n\n }\n }", "function scrNav() {\n var sTop = $(window).scrollTop();\n $('section').each(function () {\n var id = $(this).attr('id'),\n offset = $(this).offset().top - 1,\n height = $(this).height();\n if (sTop >= offset && sTop < offset + height) {\n link.removeClass('active');\n $('#navbar').find('[data-scroll=\"' + id + '\"]').addClass('active');\n }\n });\n }", "function backToTopVisibility() {\n\tif (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200)\n\t\tdocument.getElementById(\"back-to-top\").style.display = \"block\";\n\telse document.getElementById(\"back-to-top\").style.display = \"none\";\n} // backToTopVisibility", "function scrollFunction() {\n if (window.innerHeight < 144 || document.documentElement.scrollTop < 144) {\n document.getElementById(\"navbar\").style.top = \"144px\";\n console.log(window.scrollY)\n empo.style.display=\"none\"\n } else {\n document.getElementById(\"navbar\").style.top = \"0px\";\n console.log(window.scrollY)\n empo.style.display=\"initial\"\n\n }\n }", "function checkNavState() {\r\n\tif(!navScroll.state){\r\n\t\tscrolling.state = true;\r\n\t\tcheckScrollState();\r\n\t}\r\n}", "function check() {\n var cur = $(window).scrollTop();\n if (cur < 10) {\n $('#mainNav').addClass('topped');\n } else {\n $('#mainNav').removeClass('topped');\n }\n }", "function checkSimpleNavigation(theCurrentTop) { // eslint-disable no-shadow\n if (previousTop - theCurrentTop > scrollDelta) {\n mainHeader.removeClass(headerHiddenClass);\n } else if (theCurrentTop - previousTop > scrollDelta && theCurrentTop > scrollOffset) {\n mainHeader.addClass(headerHiddenClass);\n }\n }", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n backtoTop.style.display = \"block\";\n } else {\n backtoTop.style.display = \"none\";\n }\n}", "function scrollFunction_topBtn() {\r\n if (\r\n document.body.scrollTop > 20 ||\r\n document.documentElement.scrollTop > 20\r\n ) {\r\n toTopBtn.style.display = \"block\";\r\n } else {\r\n toTopBtn.style.display = \"none\";\r\n }\r\n }", "function updateNavVisibility(){if(!nav||navAsThumbnails){return;}getVisibleNavIndex();if(visibleNavIndexes!==visibleNavIndexesCached){forEachNodeList(navItems,function(el,i){if(visibleNavIndexes.indexOf(i)<0){hideElement(el);}else{showElement(el);}});// cache visible nav indexes\nvisibleNavIndexesCached=visibleNavIndexes;}}", "function navScrollHome () {\n $window.scrollTop(0)\n }", "function checkGoTopArraw() {\n if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {\n document.getElementById(\"myBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"myBtn\").style.display = \"none\";\n }\n }", "function pageScroll() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"topPageBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"topPageBtn\").style.display = \"none\";\n }\n}", "function transitionNavbar(){\n if(window.scrollY>100){\n handleShow(true)\n }else{\n handleShow(false)\n }\n }", "function visible_scroll_up(){\n /*visible scroll up arrow */\n if ($(window).scrollTop() > 300) {\n $('.scroll-top-wrapper').addClass('show');\n } else {\n $('.scroll-top-wrapper').removeClass('show');\n }\n\n /*hidden opt*/\n\n var $same_content = $('.same_content').height() - 200;\n\n if ($(window).scrollTop() > $same_content) {\n $(\".pos_right_button\").addClass('pos_right_button_added');\n } else {\n $(\".pos_right_button\").removeClass('pos_right_button_added');\n }\n\n /*fixed navigation*/\n if ($(window).scrollTop() > 120) {\n $('#navbar').addClass('fixed-nav-top');\n $('.app-container').addClass('top_animate');\n } else {\n $('#navbar').removeClass('fixed-nav-top');\n $('.app-container').removeClass('top_animate');\n }\n}", "function navPostion(windowScroll)\n {\n let servicesTop = $(\"#services\").offset().top;\n if (windowScroll > servicesTop-200 ) \n {\n $(\".navbar\").css(\"backgroundColor\", \"rgba(0,0,0,0.8)\");\n $(\".navbar\").css(\"position\", \"fixed\");\n }\n else \n {\n $(\".navbar\").css(\"backgroundColor\", \"transparent\");\n $(\".navbar\").css(\"position\", \"absolute\");\n }\n }", "function checkPosition(menuStatus){\n var position = $(this).scrollTop(); //get page position\n if(position == 0){\n if(menuStatus)\n $(\".navbar-special\").addClass(\"navbarStateScrolled\");\n else\n $(\".navbar-special\").removeClass(\"navbarStateScrolled\");\n }\n else{\n $(\".navbar-special\").addClass(\"navbarStateScrolled\");\n }\n }", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n topBtn.style.display = \"block\";\n } else {\n topBtn.style.display = \"none\";\n }\n}", "function togle_nav_func() {\r\n const elem = document.getElementById('togle_nav');\r\n if (elem.currentStyle) {\r\n displayStyle = elem.currentStyle.display;\r\n } else if (window.getComputedStyle) {\r\n displayStyle = window.getComputedStyle(elem, null).getPropertyValue('display');\r\n }\r\n if (displayStyle === 'block') {\r\n elem.style.display = 'none';\r\n } else {\r\n elem.style.display = 'block';\r\n }\r\n}", "function redrawNav(){\r\n var article1Top = 0;\r\n // The top of each article is offset by half the distance to the previous article.\r\n var article2Top = $('#frontend-school').offset().top / 2;\r\n var article3Top = ($(document).height() - $('#experience').offset().top) / 2;\r\n $('nav.nav li').removeClass('active');\r\n if($(document).scrollTop() >= article1Top && $(document).scrollTop() < article2Top){\r\n $('li.general-info').addClass('active');\r\n } else if ($(document).scrollTop() >= article2Top && $(document).scrollTop() < article3Top){\r\n $('li.frontend-school').addClass('active');\r\n } else if ($(document).scrollTop() >= article3Top){\r\n $('li.experience').addClass('active');\r\n }\r\n \r\n }", "function toggleIsOpaque() {\n var scrollTop = window.scrollY;\n if (scrollTop > 0) {\n headerNav.classList.add(\"is-opaque\");\n } else {\n headerNav.classList.remove(\"is-opaque\");\n }\n }", "function stickyNav() {\n\t\tpos = $(window).scrollTop();\n\t\tif (pos > 0) {\n\t\t\t$('nav').addClass('scroll').css({ position: 'absolute', top: pos }).fadeIn();\n\t\t} else {\n\t\t\t$('nav').removeClass('scroll').css({ position: 'absolute', top: 0 }).show();\n\t\t}\n\t}", "function navScroll(){\r\n\r\nvar top = $(window).scrollTop();\r\n\r\nif (top > 3) {\r\n$('.main-nav').fadeIn();\r\n\r\n}else {\r\n\r\n$('.main-nav').fadeOut();\r\n}\r\n\r\n}", "function checkScroll() {\n let scrY = window.scrollY;\n\n hideMenu();\n if (scrY > 10) {\n nav.className = \"scrolled\";\n } else {\n nav.className = \"\";\n }\n chekPosition(scrY);\n}", "function defile () {\n var scrollTop = window.pageYOffset;\n if (scrollTop > 50) {\n document.getElementById(\"retour\").className = \"visible\";\n document.getElementById(\"top_head\").style.height = \"50px\";\n $(\"#logo img\").css({'height': '50px'});\n $(\"#nav_mobile\").css({'top':'45px'});\n\n } else {\n document.getElementById(\"retour\").className = \"invisible\";\n document.getElementById(\"top_head\").style.height = \"100px\";\n $(\"#logo img\").css({'height': '80px'});\n $(\"#nav_mobile\").css({'top':'95px'});\n }\n}", "function handleTopNav() {\n\n\tvar $upperNav = $('.upper-nav-wrapper');\n\tvar upperNavHeight;\n\tvar classOut = 'nav-out';\n\t\n\tif ( $upperNav.length && $(window).width() > 768 ) {\n\t\t\t\n\t\tupperNavHeight = $upperNav.height();\n\t\t\n\t\tif ( scrollPos > 0 && scrollPos <= upperNavHeight ) {\n\t\t\t$upperNav.css( 'margin-top', - scrollPos );\n\t\t\t$upperNav.removeClass( classOut );\n\t\t\t//$('#main-navigation').css('top', 0);\n\t\t} else if ( scrollPos > topbarHeight ) {\n\t\t\t\n\t\t\tif ( !$upperNav.hasClass( classOut ) ) {\n\t\t\t\t$upperNav.addClass( classOut );\n\t\t\t\t$upperNav.css('margin-top', - upperNavHeight );\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$upperNav.removeClass( classOut );\n\t\t\t$upperNav.css('margin-top', 0);\n\t\t\t//$('#main-navigation').css('top', topbarHeight);\n\t\t}\n\t\t\n\t}\n\t\n}", "function gestoreScroll() {\r\n if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {\r\n nodoPulsTop.style.display = \"block\";\r\n } else {\r\n nodoPulsTop.style.display = \"none\";\r\n }\r\n}", "function sticky_navigation() {\n var scroll_top = document.body.scrollTop; // our current vertical position from the top\n // if we've scrolled more than the navigation, change its position to fixed to stick to top,\n if ($(window).scrollTop() > 250 && $(window).width() >= 960) {\n topBar.addClass('scroll-top-bar');\n navCell.addClass('scroll-nav-tile');\n } else {\n topBar.removeClass('scroll-top-bar');\n navCell.removeClass('scroll-nav-tile');\n }\n }", "function handleTopNav() {\n\tconst topPixels = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;\n\tif (topFixed) {\n\t\tif (topPixels < topNavPixels) {\n\t\t\ttopNav.classList.toggle(\"fixed-top\");\n\t\t\ttopNavPadding.classList.toggle(\"top-nav-padding\");\n\t\t\ttopNavPadding.classList.toggle(\"hidden\");\n\t\t\ttopFixed = false;\n\t\t}\n\t} else {\n\t\tlet topNavPixels = topNav.offsetTop;\n\t\tif (topPixels >= topNavPixels) {\n\t\t\ttopNav.classList.toggle(\"fixed-top\");\n\t\t\ttopNavPadding.classList.toggle(\"top-nav-padding\");\n\t\t\ttopNavPadding.classList.toggle(\"hidden\");\n\t\t\ttopFixed = true;\n\t\t}\n\t}\n}", "function handleScroll() {\n var yPos = window.pageYOffset\n if (yPos>700) {\n setShowTopButton(true)\n } else {\n setShowTopButton(false)\n }\n }", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"topButton\").style.display = \"block\";\n } else {\n document.getElementById(\"topButton\").style.display = \"none\";\n }\n}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n myTopButton.style.display = \"block\";\n } else {\n myTopButton.style.display = \"none\";\n }\n}", "function navScroll() {\n // init controller\n height = window.innerHeight;\n var controller = new ScrollMagic.Controller();\n\n // build scenes\n new ScrollMagic.Scene({triggerElement: \"#intro\"})\n .setClassToggle(\"#nav\", \"bg-sienna\") // add class toggle\n .addTo(controller);\n}", "checkScrollPos() {\n let fromTop = window.scrollY;\n this.links.forEach(link => {\n let section = document.querySelector(`#${link.el.dataset.section}`);\n if (section.offsetTop <= fromTop && section.offsetTop + section.offsetHeight > fromTop) {\n link.setCurrent();\n } else {\n link.setCurrent(false);\n }\n })\n }", "function bigNav() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $offset = nectarDOMInfo.scrollTop,\r\n\t\t\t\t\t$windowWidth = nectarDOMInfo.winW,\r\n\t\t\t\t\t$scrollTriggerOffset = ($body.is('.material')) ? 150 : 30;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($body.is('.material-ocm-open')) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($offset <= $scrollTriggerOffset && $windowWidth > 1000 || $('.small-nav').length > 0 && $('#ajax-content-wrap.no-scroll').length > 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#header-outer, #search-outer').removeClass('small-nav');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('#header-outer[data-megamenu-rt=\"1\"]').length > 0 && \r\n\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t$('#header-outer .megamenu').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($headerOuterEl.attr('data-transparent-header') == 'true' && \r\n\t\t\t\t\t\t\t$('.nectar-box-roll').length == 0 && \r\n\t\t\t\t\t\t\t$('.megamenu.sfHover').length == 0) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.addClass('transparent');\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('no-transition');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($headerOuterEl.attr('data-transparent-header') == 'true' && $('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\t\t\t$headerOuterEl.addClass('transparent');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Body border full width side padding\r\n\t\t\t\t\t\tif ($('#header-outer[data-full-width=\"true\"][data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t$bodyBorderTop.length > 0 && \r\n\t\t\t\t\t\t$bodyBorderHeaderColorMatch == true) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('#header-outer[data-full-width=\"true\"] header > .container').stop(true, true).animate({\r\n\t\t\t\t\t\t\t\t'padding': '0 28px'\r\n\t\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\t\tqueue: false,\r\n\t\t\t\t\t\t\t\tduration: 250,\r\n\t\t\t\t\t\t\t\teasing: 'easeOutCubic'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('header#top nav > ul > li.menu-item-with-margin').stop(true, true).animate({\r\n\t\t\t\t\t\t\t\t'margin-right': (parseInt($('header#top nav > ul > li.menu-item-with-margin').css('margin-right')) + parseInt(logoShrinkNum) * 3) + 'px'\r\n\t\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\t\tqueue: false,\r\n\t\t\t\t\t\t\t\tduration: 140,\r\n\t\t\t\t\t\t\t\teasing: 'easeOutQuad'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Secondary header\r\n\t\t\t\t\t\tif ($headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$headerSecondaryEl.removeClass('hide-up');\r\n\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t.removeClass('hide-up')\r\n\t\t\t\t\t\t\t\t.css('transform', 'translateY(0%)');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Box roll\r\n\t\t\t\t\t\tif ($('.nectar-box-roll').length > 0 && $('#header-outer[data-permanent-transparent=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t\t$('#ajax-content-wrap').animate({\r\n\t\t\t\t\t\t\t\t'margin-top': (Math.floor(($logoHeight) + (headerPadding * 2) + nectarDOMInfo.adminBarHeight + nectarDOMInfo.secondaryHeaderHeight))\r\n\t\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\t\tqueue: false,\r\n\t\t\t\t\t\t\t\tduration: 250,\r\n\t\t\t\t\t\t\t\teasing: 'easeOutCubic'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll.headerResizeEffect', bigNav);\r\n\t\t\t\t\t\t$window.on('scroll.headerResizeEffect', smallNav);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Dark slider coloring border\r\n\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').css('transition', 'transform 0.3s ease, background-color 0.30s ease, opacity 0.3s ease, box-shadow 0.30s ease, margin 0.25s ease-out');\r\n\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"] .cart-menu').css('transition', 'none');\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').css('transition', 'transform 0.3s ease, background-color 0.30s ease, opacity 0.3s ease, box-shadow 0.30s ease, border-color 0.30s ease, margin 0.25s ease-out');\r\n\t\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"] .cart-menu').css('transition', 'border-color 0.30s ease');\r\n\t\t\t\t\t\t}, 300);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function headerScroll () {\n let Y = document.documentElement.scrollTop || document.body.scrollTop;\n if (Y > 596) {\n header.classList.add('header-scrolled-view')\n scrollToTopButton.classList.add('show-toTop-btn');\n scrollToTopButton.style.display = 'block';\n }\n else {\n header.classList.remove(\"header-scrolled-view\");\n scrollToTopButton.classList.remove(\"show-toTop-btn\");\n scrollToTopButton.style.display = \"none\";\n }\n }", "function showScroll() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"backToTopBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"backToTopBtn\").style.display = \"none\";\n }\n}", "function scrollFunction() {\n if (document.documentElement.scrollTop > 20) {\n topButton.style.display = 'block';\n } else {\n topButton.style.display = 'none';\n }\n}", "function showNav(){\n $('#Nav').show();\n $('#botScroll').hide();\n \n // $('#BG2').show();\n }", "toggleBackToTopButtonVisibility() {\n if (this._toTopOfPageButton) {\n if (window.scrollY > 100) {\n this._toTopOfPageButton.style.display = \"block\";\n } else {\n this._toTopOfPageButton.style.display = \"none\";\n }\n }\n }", "function onScroll(event){\n var scrollPos = $(document).scrollTop();\n $('#nav a:not(#back-to-top)').each(function () {\n var currLink = $(this);\n var refElement = $(currLink.attr(\"href\"));\n if (refElement.position().top - 110 <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {\n $('#nav ul li a').removeClass(\"active\");\n currLink.addClass(\"active\");\n }\n else{\n currLink.removeClass(\"active\");\n }\n });\n}", "function back_to_top(){\n var scrollTop = $(window).scrollTop();\n var offset = 500;\n if (scrollTop < offset) {\n $('.evision-back-to-top').hide();\n } else {\n $('.evision-back-to-top').show();\n }\n }", "function navbarNavigation(link, btm) {\r\n let section,sectionPos,winPos,status;\r\n winPos = window.scrollY;\r\n if (!btm) {\r\n section = document.querySelector('.' + link.getAttribute('href').slice(1)),\r\n sectionPos = document.querySelector('.' + link.getAttribute('href').slice(1)).offsetTop - 100;\r\n } else {\r\n sectionPos = document.body.scrollHeight;\r\n }\r\n if (btm || window.scrollY !== sectionPos) {\r\n let animation = setInterval(frame, globalObj.navigationSpeed);\r\n if (!btm) {\r\n if (section.tagName.toLowerCase() !== 'section') {\r\n sectionPos = sectionPos + globalObj.closest(section, 'section').offsetTop;\r\n }\r\n if (section.style.paddingTop !== '') {\r\n sectionPos += Number(section.style.paddingTop.replace('px', ''));\r\n }\r\n }\r\n if (winPos > sectionPos && !btm) {\r\n // Go Up\r\n status = false;\r\n } else {\r\n // Go Down\r\n status = true;\r\n }\r\n function frame() {\r\n if (status) {\r\n if (winPos >= sectionPos) {\r\n clearInterval(animation);\r\n } else {\r\n winPos += globalObj.navigationCounter;\r\n window.scrollTo(0, winPos);\r\n }\r\n } else {\r\n if (winPos <= sectionPos) {\r\n clearInterval(animation);\r\n } else {\r\n winPos -= globalObj.navigationCounter;\r\n window.scrollTo(0, winPos);\r\n }\r\n }\r\n }\r\n }\r\n}", "function hideNav() {\n if(isNavVisible === true) {\n noNav();\n\n } else {\n yesNav();\n }\n}", "function topScroll() {\r\n if (window.pageYOffset >= sticky) {\r\n navbar.classList.add(\"sticky\")\r\n } else {\r\n navbar.classList.remove(\"sticky\");\r\n }\r\n }", "function manageTopPosition()\n {\n var scrollHeight = $(window).scrollTop();\n\n if(scrollHeight > 50 && !tucked)\n {\n tucked = true;\n $(\"#top\").css({\"top\": determineTopHeight() + \"px\", \"position\": \"fixed\"});\n $(\"#nav-bar\").toggleClass(\"tucked\");\n $(\"#nav-bar > .link > div:first\").removeClass(\"hovered\");\n }\n else if (scrollHeight <= 50 && tucked)\n {\n tucked = false;\n $(\"#top\").css({\"top\": \"0\", \"position\": \"absolute\"});\n $(\"#name\").css(\"display\", \"flex\");\n $(\"#nav-bar\").toggleClass(\"tucked\");\n resetNavbar();\n $(\"#nav-bar > .link:first > div:first\").addClass(\"hovered\");\n }\n }", "function hideNav() {\r\n if (isNavVisible === true) {\r\n noNav();\r\n\r\n } else {\r\n yesNav();\r\n }\r\n}", "function scrollFunction() {\r\n let nav = document.querySelector(\"nav\");\r\n if (\r\n document.body.scrollTop > 100 ||\r\n document.documentElement.scrollTop > 100\r\n ) {\r\n nav.classList.remove(\"bigHeader\");\r\n } else {\r\n nav.classList.add(\"bigHeader\");\r\n }\r\n }", "function setScroll(){\n $(window).scroll(function(event){\n if($(window).scrollTop()>20){\n topbtn.style.display ='block';\n }\n else{\n topbtn.style.display='none';\n } \n });\n}", "function opNavScroll() {\r\n\r\n if ($('.op-section')[0]) {\r\n\r\n var section = $(\".op-section\");\r\n var sections = {};\r\n var i = 0;\r\n\r\n Array.prototype.forEach.call(section, function(e) {\r\n sections[e.id] = e.offsetTop;\r\n });\r\n\r\n window.onscroll = function() {\r\n var scrollPosition = document.documentElement.scrollTop || document.body.scrollTop;\r\n\r\n for (i in sections) {\r\n if (sections[i] <= scrollPosition) {\r\n $('li.menu-item').removeClass('current_page_item');\r\n $('a[href*=' + i + ']').parent().addClass('current_page_item ');\r\n }\r\n }\r\n }\r\n\r\n }\r\n }", "function scrolling(){\n\t//display menu while scrolling\n myMenu.style.display = \"block\";\n\n updateActiveSection();\n \n \n //if reached end of file then show the button to back to top\n if ((window.innerHeight + window.pageYOffset) >= document.body.offsetHeight)\n\t\t backToTopButton.style.display =\"block\";\n\telse\n\t\tbackToTopButton.style.display =\"none\";\n\n \n if(timerForScrolling !== null) {\n clearTimeout(timerForScrolling); \n }\n timerForScrolling = setTimeout(function() {\n\t\t//hide menu after timeout is finished\n\t\t myMenu.style.display = \"none\";\n\t\t \n }, 2000);\n \n}", "function scrollCambios(){\n\n\n if( window.scrollY > 20 ){\n navBar.classList.add(\"sticky\");\n }else{\n navBar.classList.remove(\"sticky\");\n }\n\n if( window.scrollY > 500 ){\n document.querySelector(\".scroll-up-btn\").classList.add(\"show\");\n }else{\n document.querySelector(\".scroll-up-btn\").classList.remove(\"show\");\n }\n}", "function stickyNav()\n{\n window.addEventListener(\"scroll\", () =>\n {\n let header = document.querySelector(\"header\");\n\n header.classList.toggle(\"scrollActive\", window.scrollY > 0);\n });\n}", "function showBackTop() {\n window.addEventListener('scroll', function () {\n if(this.scrollY > 400) {\n backTop.style.display = 'block';\n backTop.addEventListener('click', () => {\n this.scrollTo({\n top: 0,\n left: 0,\n behavior: \"smooth\"\n });\n })\n } else {\n backTop.style.display = 'none';\n }\n })\n}", "_toggleNavigationElementsVisibility() {\n const that = this,\n numberOfTabs = that._tabs.length;\n let action;\n\n if (numberOfTabs === 0) {\n action = 'addClass';\n }\n else if (numberOfTabs === 1) {\n action = 'removeClass';\n }\n else {\n return;\n }\n\n if (that.tabLayout === 'scroll' && that.overflow === 'scroll') {\n that.$scrollButtonNear[action]('jqx-hidden');\n that.$scrollButtonFar[action]('jqx-hidden');\n }\n else if (that.tabLayout === 'dropDown') {\n that.$dropDownButton[action]('jqx-hidden');\n }\n }", "function showToTop() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop > 350 && !$offCanvasEl.is('.fullscreen.open') ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#to-top').stop().transition({\r\n\t\t\t\t\t\t\t'bottom': '17px'\r\n\t\t\t\t\t\t}, 350, 'easeInOutCubic');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll', showToTop);\r\n\t\t\t\t\t\t$window.on('scroll', hideToTop);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function NavScrollDown() {\n var nav = $(\"header.scroll-hide\");\n $(document).on(\"scroll\", function () {\n if ($(document).scrollTop() > 100) {\n nav.addClass(\"down\");\n } else {\n nav.removeClass(\"down\");\n }\n });\n}", "function onPageScroll(){\n\t\t// main nav banner fixed\n\t\tif ($(window).scrollTop() >= 25) {\n\t\t $('.js--main-nav').addClass('is-scrolled');\n\t\t} else {\n\t\t $('.js--main-nav').removeClass('is-scrolled');\n\t\t}\n\t}", "function navCheck() {\n if (window.pageYOffset >= sticky) {\n navbar.classList.add(\"sticky\");\n quote.classList.add(\"pad\");\n $(\"#mlh-trust-badge\").css(\"visibility\", \"visible\");\n $(\"#mlh-trust-badge\").slideDown();\n document.body.style.backgroundColor = \"#000000\";\n } else {\n $('.cover').each(function(){\n $(this).css('margin-top', (-1 * $(window).scrollTop() / parseInt($(this).attr('speed'))));\n });\n navbar.classList.remove(\"sticky\");\n quote.classList.remove(\"pad\");\n $(\"#mlh-trust-badge\").slideUp();\n document.body.style.backgroundColor = \"#253A79\";\n }\n }", "function stickyNavigation() {\n if (window.scrollY > tab_nav_offSet) {\n tab_nav.classList.add(\"fixed\");\n\n if (window.scrollY > 361) {\n tab_nav_user.style.opacity = \"1\";\n } else {\n tab_nav_user.style.opacity = \"0\";\n }\n } else {\n tab_nav.classList.remove(\"fixed\");\n }\n}", "function cms_back_to_top(){\r\n\t\t/* Back To Top */\r\n if (scroll_top < window_height) {\r\n \t$('#back_to_top').addClass('off').removeClass('on');\r\n } else {\r\n \t$('#back_to_top').removeClass('off').addClass('on');\r\n }\r\n\t}", "function checkOffset() {\n if ($(\"#mainNav\").offset().top < 50) {\n $(\"#mainBanner\").slideDown(200);\n $( \"div#popInWindow\" ).slideUp(200);\n }\n else if(!$(window).scrollTop()) {\n $(\"#mainBanner\").show();\n $( \"div#popInWindow\" ).hide();\n }\n else {\n $(\"#mainBanner\").slideUp(200);\n $( \"div#popInWindow\" ).slideDown(600);\n }\n}", "function showNav()\n\t{\n\t\tmobileNav = !mobileNav;\n\t\tif(mobileNav)\n\t\t{\n\t\t\t$(\"#side_nav\").addClass('show-nav');\n\t\t\t$('html,body').css('overflow','hidden');\n\t\t} else {\n\t\t\t$('#side_nav').removeClass('show-nav');\n\t\t\t$('html,body').css('overflow','auto');\n\t\t}\n\t}", "function scrollFunction() {\n if (document.body.scrollTop > 10 || document.documentElement.scrollTop > 10) {\n topbutton.style.display = \"block\";\n } else {\n topbutton.style.display = \"none\";\n }\n}", "function check_hideNavSel(scrollpos) {\r\n\tvar h = get_px( $(\"#breadcrumb\").css(\"margin-top\") );\r\n\r\n\tif (scrollpos > h) {\r\n\t\t$(\".OP_header_nav_sel\").removeClass(\"OP_header_nav_sel\").addClass(\"OP_header_nav_sel_dis\");\r\n\t}\r\n\telse {\r\n\t\t$(\".OP_header_nav_sel_dis\").removeClass(\"OP_header_nav_sel_dis\").addClass(\"OP_header_nav_sel\");\r\n\t}\r\n}", "function navbarOnScroll() {\n var x = $(window).scrollTop();\n var vh = $(window).height();\n if (x <= vh*0.55) {\n if(!titleHidden){\n $(\"#navbar-title\").animate({opacity: 0.0}, 300);\n $(\"#main-nav\").animate({padding: \"8px 0\"}, 300);\n titleHidden = true;\n }\n } else {\n if(titleHidden || onceFlag){\n $(\"#navbar-title\").animate({opacity: 1.0}, 300);\n $(\"#main-nav\").animate({padding: \"24px 0\"}, 300);\n titleHidden = false;\n onceFlag = false;\n }\n }\n}", "function enableScroll() { \n window.onscroll = function() {fix_navbar()}; \n}", "function cms_back_to_top(){\r\n\t\t/* back to top */\r\n if (scroll_top < window_height) {\r\n \t$('#back_to_top').addClass('off').removeClass('on');\r\n } else {\r\n \t$('#back_to_top').removeClass('off').addClass('on');\r\n }\r\n\t}", "function navbarScroll(topnav, topnavHeight) {\n var topScroll = $(window).scrollTop();\n if (topnav.length > 0) {\n if(topScroll >= topnavHeight) {\n topnav.removeClass('topnav-top');\n if(!topnav.hasClass('bg-black') && !topnav.hasClass('no-transparent')) topnav.removeClass('transparent');\n } else {\n topnav.addClass('topnav-top');\n if(!topnav.hasClass('bg-black') && !topnav.hasClass('no-transparent')) topnav.addClass('transparent');\n }\n }\n }", "function showDivTop() {\r\n if (window.scrollY >= 300) {\r\n divTop.classList.add('visible');\r\n } else {\r\n divTop.classList.remove('visible');\r\n }\r\n }", "function scrollFunction() {\n if ((document.body.scrollTop > 40 || document.documentElement.scrollTop > 40) && (vw > 900)) {\n pageHeader.style.boxShadow = \"0px 3px 3px rgba(73, 19, 39, 0.1)\";\n } else {\n pageHeader.style.boxShadow = \"0px 3px 3px rgba(73, 19, 39, 0)\";\n }\n vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0); //recalculate\n\n //draft code for a scroll to top button (nice to have)\n // if ((document.body.scrollTop > 900 || document.documentElement.scrollTop > 900)) {\n // backToTop.style.display = block;\n // } else {\n // backToTop.style.display = none;\n // }\n}", "function initHomepageNav() {\n hideNavBackground();\n $(window).scroll(hideNavBackground);\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function menuButton() {\n var x = document.getElementById(\"fullpagenav\");\n if (x.style.display === \"none\" || x.style.display === \"\") {\n x.style.position = \"fixed\";\n }\n\n}", "function handleScrolling() {\n\tlet scrolled = root.scrollHeight - root.clientHeight;\n\tif((root.scrollTop / scrolled) > 0.95 ) {\n\t\tbtnToTop.style.display = 'block';\n\t} else {\n\t\tbtnToTop.style.display = 'none';\n\t};\n}", "function navbarSceoll() {\n var iamHere = $(window).scrollTop(),\n nav = $('.navbar-custom');\n $(window).scroll(function () {\n if ($(this).scrollTop() > iamHere) {\n nav.addClass('up');\n iamHere = $(window).scrollTop();\n } else if ($(this).scrollTop() < iamHere) {\n nav.removeClass('up');\n iamHere = $(window).scrollTop();\n }\n });\n }", "function navbarScroll() {\n\t\n\tif ( windowWidth > 1000 && topnav.length > 0 ) {\n\t\t\n\t\tvar topScroll = $(window).scrollTop();\n\t\tvar logoImg = $('body').find('#logo a img');\n\t\tvar logoLight = $('body').find('#logo a').data('logo-light');\n\t\tvar logoDark = $('body').find('#logo a').data('logo-dark');\n\t\tvar $navSelectors = $('.main-nav,.main-nav ul.nav > li > a,.main-nav .nav-tools li a');\n\t\t\n\t\tif ( wrapper.hasClass('onepage-special') ) return;\n\t\tif ( wrapper.hasClass('header-light') ) {\n\t\t\tlogoImg.attr('src', logoDark);\n\t\t}\n\t\t\n\t\tif ( wrapper.hasClass('header-dark') ) {\n\t\t\tlogoImg.attr('src', logoLight);\n\t\t}\n\t\t\n\t\tif ( wrapper.hasClass('transparent-dark') ) {\n\t\t\tlogoImg.attr('src', logoDark);\n\t\t}\n\t\t\n\t\tif ( wrapper.hasClass('nav-bottom') ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( wrapper.hasClass('header-transparent') && wrapper.hasClass('transparent-dark') ) {\n\t\t\tlogoImg.attr('src', logoDark);\n\t\t}\n\n\t\tvar scrollHeight = header.data('scroll-height');\n\t\t\n\t\tvar finalScroll = topnavHeight - headerScrollHeight;\n\t\tvar zeroScroll = 0;\n\t\t\n\t\tif ( $('#topbar').length > 0 ) {\n\t\t\tfinalScroll = finalScroll + topbarHeight;\n\t\t\tzeroScroll = topbarHeight;\n\t\t}\n\n\t\tif ( topScroll > zeroScroll && topScroll <= finalScroll ) {\n\t\t\t$navSelectors.css({ 'height' : topnavHeight - ( topScroll - zeroScroll ) });\n\t\t\t\n\t\t} else if ( topScroll > finalScroll ) {\n \n if ( !wrapper.hasClass( 'header-scroll-full' ) ) {\n $navSelectors.css({ 'height' : scrollHeight });\n wrapper.addClass('header-scroll-full');\n header.removeClass( headerSkin ).addClass( headerScrollSkin );\n wrapper.removeClass('topnav-top');\n }\n\t\t\t\n\t\t} else { // Initial State\n\t\t\t$navSelectors.css({ 'height' : '' });\n\t\t wrapper.addClass('topnav-top');\n\t\t\twrapper.removeClass('header-scroll-full');\n\t\t\theader.removeClass( headerScrollSkin ).addClass( headerSkin );\n\t\t}\n\t\t\n\t\tif (wrapper.hasClass('dark-skin')) {\n\t\t\tif (wrapper.hasClass('header-light')) {\n\t\t\t\twrapper.removeClass('header-light').addClass('header-dark');\n\t\t\t} else {\n\t\t\t\tlogoImg.attr('src', logoLight);\n\t\t\t}\n\t\t}\n\t}\n}", "function positionNav() {\n var nav = $('nav');\n var windowHeight = $(window).height();\n var positionBottom = windowHeight - nav.outerHeight(true);\n var scrollVal = $(window).scrollTop();\n\n if ( scrollVal > positionBottom ) {\n nav.css({'position':'fixed','top' :'0px'});\n } else {\n nav.css({'position':'absolute','top': positionBottom +'px'});\n }\n\n $(window).scroll(function() {\n var scrollVal = $(this).scrollTop();\n if ( scrollVal > positionBottom ) {\n nav.css({'position':'fixed','top' :'0px'});\n } else {\n nav.css({'position':'absolute','top': positionBottom +'px'});\n }\n });\n\n }", "function backToTop() {\n if(document.body.scrollTop > 500 || document.documentElement.scrollTop > 500) {\n document.getElementById(\"backToTop\").style.visibility = \"visible\";\n document.getElementById(\"logo-container\").style.opacity = \"1\";\n }\n else {\n document.getElementById(\"backToTop\").style.visibility = \"hidden\";\n document.getElementById(\"logo-container\").style.opacity = \"0\";\n }\n}", "function show_button() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"btn-top\").style.display = \"block\";\n } else {\n document.getElementById(\"btn-top\").style.display = \"none\";\n }\n}", "function thememascot_navLocalScorll() {\n\t\tvar\tdata_offset = -60;\n $(\".menuzord-menu\").localScroll({\n target: \"body\",\n duration: 800,\n\t\t\toffset: data_offset,\n easing: \"easeInOutExpo\"\n });\n }", "function navbarHidden() {\n $$('.main--navbar').addClass('navbar-hidden');\n $$('.main--content').addClass('align-top');\n}", "function scrollFunction() {\n if (main_nav_bar) {\n if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {\n main_nav_bar.style.display = 'none';\n\n if (document.body.scrollTop > 500 || document.documentElement.scrollTop > 500) {\n main_nav_bar.style.display = 'flex';\n main_nav_bar.classList.add('navbar-v2');\n main_nav_bar.classList.remove('navbar');\n } else {\n main_nav_bar.style.display = 'none';\n main_nav_bar.classList.add('navbar');\n main_nav_bar.classList.remove('navbar-v2');\n }\n } else {\n main_nav_bar.style.display = 'flex';\n }\n }\n} // show btn when scroll down", "function fixedNav () {\n\tif (document.body.scrollTop < 200) {\n\t\tfixNav.classList.add('hidingNav'); \n\t} \n\telse if (fixNav.classList.contains('hidingNav')) {\n\t\tfixNav.classList.remove('hidingNav');\n\t}\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n }", "function redrawDotNav(){\r\n var section1Top = 0;\r\n var section2Top = $('#news').offset().top;\r\n var section3Top = $('#about').offset().top;\r\n var section4Top = $('#login').offset().top;\r\n $('nav#primary a').removeClass('active');\r\n if($(window).scrollTop() >= section1Top && $(document).scrollTop() < section2Top){\r\n $('nav#primary a#home').addClass('active');\r\n } else if ($(window).scrollTop() >= section2Top && $(document).scrollTop() < section3Top){\r\n $('nav#primary a#news').addClass('active');\r\n } else if ($(window).scrollTop() >= section3Top && $(document).scrollTop() < section4Top){\r\n $('nav#primary a#about').addClass('active');\r\n } else if ($(window).scrollTop() >= section4Top){\r\n $('nav#primary a#login').addClass('active');\r\n }\r\n \r\n }", "function offSetManager() {\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if (yOffset < currYOffSet) {\n myNavBar.add();\n } else if (currYOffSet == yOffset) {\n myNavBar.remove();\n }\n }", "function scrolEventListener(){ \n if(document.scrollingElement.scrollTop === 0){\n btn.classList.remove('show'); \n } \n allSections.forEach( (sec)=>{\n const rct = sec.getBoundingClientRect();\n \n if(rct.top >= -100 && rct.top <= 200){ \n allSections.forEach( (rem)=> {\n rem.style.background = \"\"; \n });\n sec.style.background = \"#337ab7\";\n \n allLinks.forEach((l)=>{\n if(l.id !=='button'){\n l.style.background=\"#337ab7\";\n }\n });\n allLinks.forEach((alink)=>{\n if(sec.getAttribute('data-nav')==alink.textContent){\n alink.style.background = \"blue\";\n }\n }); \n\n // show btn Back to top while scrolling \n btn.classList.add('show');\n }\n }); \n }", "function toggleScroll() {\r\n var maxOffset = Math.abs(parseInt($('.menu-holder').height() - $('.content').height())),\r\n currOffset = Math.abs(parseInt($(\".content\").css(\"margin-top\")));\r\n \r\n if (currOffset === 0) {\r\n $(\"#up .fas\").hide();\r\n $(\"#down .fas\").show();\r\n } \r\n else if (currOffset === maxOffset) {\r\n $(\"#up .fas\").show();\r\n $(\"#down .fas\").hide();\r\n    }\r\n else if (currOffset > 0 && currOffset < maxOffset) {\r\n $(\"#up .fas\").show();\r\n $(\"#down .fas\").show();\r\n }\r\n else {\r\n $(\"#up .fas\").hide();\r\n $(\"#down .fas\").hide();\r\n    }\r\n}", "function offSetManager(){\n \n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n \n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n \n }", "function offSetManager(){\n \n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n \n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n \n }" ]
[ "0.7086939", "0.70821786", "0.69970965", "0.6987205", "0.69347805", "0.68816125", "0.68556464", "0.68534666", "0.6806813", "0.67682844", "0.66906655", "0.66817236", "0.66751194", "0.667185", "0.6640746", "0.66287", "0.66236174", "0.66222817", "0.6605184", "0.6589516", "0.65872204", "0.65735716", "0.6546867", "0.65396005", "0.6538537", "0.6533479", "0.6526053", "0.6515732", "0.6509185", "0.6505069", "0.6504944", "0.6496971", "0.64866734", "0.6470018", "0.64608604", "0.6456873", "0.64513564", "0.6449887", "0.6444803", "0.6438517", "0.6433153", "0.64284265", "0.6422072", "0.6420588", "0.6419665", "0.64170045", "0.6415162", "0.6413822", "0.6403697", "0.6389411", "0.6387702", "0.6374774", "0.63740194", "0.63636845", "0.6349847", "0.63432914", "0.6338799", "0.63357997", "0.6334609", "0.6333866", "0.6332597", "0.633009", "0.63288134", "0.6321343", "0.63201606", "0.63198996", "0.6309267", "0.62978625", "0.62831223", "0.6282782", "0.6282396", "0.6278309", "0.6274894", "0.6274343", "0.62700254", "0.62697375", "0.6268061", "0.6260768", "0.6258278", "0.624871", "0.624871", "0.624871", "0.6242172", "0.623915", "0.62363917", "0.6234166", "0.6233876", "0.6228339", "0.62279487", "0.6225552", "0.6225239", "0.6222118", "0.62215745", "0.62174517", "0.62127495", "0.6210307", "0.6209449", "0.61940587", "0.6193763", "0.6193763" ]
0.6193265
100
HEADER NO STICKY EFFECT
function headerNoSticky() { scrollPos = $(window).scrollTop(); if ($('.header-no-sticky #main-navigation:not(.header-2)').length) { var st = $(this).scrollTop(); if (st > lastScrollTop) { $('.header-no-sticky #main-navigation').removeClass('nav-visible'); } else { $('.header-no-sticky #main-navigation').addClass('nav-visible'); } if (st > 0) { $('#main-navigation .main-nav-wrapper').css('background', '#fff'); } else { $('#main-navigation .main-nav-wrapper').css('background', ''); } lastScrollTop = st; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hhunHeaderEffect() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar previousScroll = 0, // previous scroll position\r\n\t\t\t\t\tmenuOffset = 250, // height of menu (once scroll passed it, menu is hidden)\r\n\t\t\t\t\thideShowOffset = 6; // scrolling value after which triggers hide/show menu\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Called in RAF loop to calculate the header visibility.\r\n\t\t\t\t\tfunction hhunCalcs() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$headerOuterEl.addClass('detached');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar currentScroll = nectarDOMInfo.scrollTop, // Gets current scroll position\r\n\t\t\t\t\t\tscrollDifference \t= Math.abs(currentScroll - previousScroll); // Calculates how fast user is scrolling\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop scrolling while animated anchors / box roll\r\n\t\t\t\t\t\tif ($('body.animated-scrolling').length > 0 && $('#header-outer.detached').length > 0 || $('body.no-scroll').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t// Alter scroll tracking to continue hiding menu.\r\n\t\t\t\t\t\t\t\t\tpreviousScroll = nectarDOMInfo.scrollTop;\r\n\t\t\t\t\t\t\t\t\tcurrentScroll = nectarDOMInfo.scrollTop;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop when material ocm or material search is open\r\n\t\t\t\t\t\tif ($('body.material-ocm-open').length > 0 || $('#search-outer.material-open').length > 0) {\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop on mobile if not using sticky option\r\n\t\t\t\t\t\tif ($('#header-outer[data-mobile-fixed=\"false\"]').length > 0 && $('body.mobile').length > 0) {\r\n\t\t\t\t\t\t\t$headerOuterEl.removeClass('detached');\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!$headerOuterEl.hasClass('side-widget-open') && !$('#header-outer .slide-out-widget-area-toggle a').hasClass('animating')) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvar heightToAdjust;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Remove transparent and body border margin\r\n\t\t\t\t\t\t\tif (currentScroll > 1) {\r\n\t\t\t\t\t\t\t\tif ($('#header-outer[data-permanent-transparent=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('transparent');\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl.addClass('scrolling');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Handle secondary header\r\n\t\t\t\t\t\t\t\tif ($headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\t\t$headerSecondaryEl.addClass('hide-up');\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl.css('transform', 'translateY(-' + nectarDOMInfo.secondaryHeaderHeight + 'px)');\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t$headerSecondaryEl.removeClass('hide-up');\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl.css('transform', '0px)');\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Scrolled past menu\r\n\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Scrolled past detach point add class to fix menu\r\n\t\t\t\t\t\t\t\tif (!$headerOuterEl.hasClass('detached')) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t.addClass('detached')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('parallax-contained');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('no-transition');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Scrolling faster than hideShowOffset hide/show menu\r\n\t\t\t\t\t\t\t\tif (scrollDifference >= hideShowOffset) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (currentScroll > previousScroll) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Hide menu\r\n\t\t\t\t\t\t\t\t\t\tif (!$headerOuterEl.hasClass('invisible')) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('invisible')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('at-top');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Close submenus\r\n\t\t\t\t\t\t\t\t\t\t\tif ($(\".sf-menu\").length > 0 && $().superfish) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(\".sf-menu\").superfish('hide');\r\n\t\t\t\t\t\t\t\t\t\t\t\t$('header#top nav > ul.sf-menu > li.menu-item-over').removeClass('menu-item-over');\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0px)')\r\n\t\t\t\t\t\t\t\t\t\t\t.addClass('header-not-visible');\r\n\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Show menu\r\n\t\t\t\t\t\t\t\t\t\tif ($headerOuterEl.hasClass('invisible')) {\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('invisible');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Page submenu adjust\r\n\t\t\t\t\t\t\t\t\t\theightToAdjust = $headerOuterEl.outerHeight();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif( $headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\theightToAdjust -=\tnectarDOMInfo.secondaryHeaderHeight;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0 && $('body.mobile').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$bodyBorderSizeToRemove = ($bodyBorderHeaderColorMatch) ? $bodyBorderTop.height() : 0;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + (heightToAdjust - $bodyBorderSizeToRemove) + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + heightToAdjust + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t\t\t\t\t\t\tvar $topDetachNum = ($('#header-outer[data-using-secondary=\"1\"]').length > 0) ? 32 : 0;\r\n\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0) {\r\n\t\t\t\t\t\t\t\t\t$topDetachNum = ($('#header-outer[data-using-secondary=\"1\"]').length > 0) ? 32 + $bodyBorderTop.height() : $bodyBorderTop.height();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (currentScroll <= $topDetachNum) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t.addClass('at-top')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('invisible')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('scrolling');\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-megamenu-rt=\"1\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t$('#header-outer .megamenu').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.nectar-box-roll').length == 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.megamenu.sfHover').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('transparent')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('no-transition');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else if ($('.nectar-box-roll').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('at-top-before-box');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('transparent')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else if ($('.nectar-box-roll').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('at-top-before-box');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif ($('#page-header-bg[data-parallax=\"1\"]').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t.addClass('parallax-contained')\r\n\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)');\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// At the bottom of document - show menu\r\n\t\t\t\t\t\t\tif ((nectarDOMInfo.winH + window.scrollY) >= document.body.offsetHeight) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('invisible');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Page submenu adjust\r\n\t\t\t\t\t\t\t\theightToAdjust = $headerOuterEl.outerHeight();\r\n\t\t\t\t\t\t\t\tif( $headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\theightToAdjust -=\tnectarDOMInfo.secondaryHeaderHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0 && $('body.mobile').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$bodyBorderSizeToRemove = ($bodyBorderHeaderColorMatch) ? $bodyBorderTop.height() : 0;\r\n\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + (heightToAdjust - $bodyBorderSizeToRemove) + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + heightToAdjust + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Keep track of current scroll position\r\n\t\t\t\t\t\tpreviousScroll = currentScroll;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Start the animation loop.\r\n\t\t\t\t\thhunCalcs();\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function header() {\n if ($(document).scrollTop() > 0) {\n $('header').addClass('white')\n } else {\n $('header').removeClass('white');\n }\n }", "function style_header() {\n if ($(document).scrollTop() > $('#lead-content>h1').offset().top ) {\n $('header').css({\"background-color\":\"#000\",\"border-bottom\":\"2.5px solid #3498db\"});\n $('.logo').css(\"visibility\",\"visible\");\n } \n else {\n $('header').css({\"background-color\":\"transparent\",\"border\":\"none\"});\n $('header .menu').css({\"background-color\":\"transparent\",\"border\":\"none\"});\n $('.logo').css(\"visibility\",\"hidden\");\n \n }\n }", "function eltdOnWindowScrollHeaderBehaviour() {\n }", "function headerStyle() {\n\t\tif($('#header').length){\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tif (windowpos >= 1) {\n\t\t\t\t//$('#header').addClass('fixed-top-header');\n\t\t\t\t$('.scroll-to-top').fadeIn(300);\n\t\t\t} else {\n\t\t\t\t//$('#header').removeClass('fixed-top-header');\n\t\t\t\t$('.scroll-to-top').fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function eltdOnWindowScrollHeader() {\n \n }", "function renderTrackHeaderOnly() {\r\n renderTrack(true);\r\n}", "function hideHeader() {\n if (body.hasClass('checked') === false) {\n $('.welcome>h2, .welcome>.separator').fadeToggle(300);\n $('.welcome').slideToggle(300);\n $('#main-header').addClass('go-paint');\n HintBtn.removeClass('hints-pulse');\n };\n }", "function eltdOnWindowLoadHeaderBehaviour() {\n }", "function eltdOnWindowResizeHeaderBehaviour() {\n }", "renderHeader() {\n this.refreshHeaders(false);\n }", "renderHeader() {\n this.refreshHeaders(false);\n }", "function headerStyle() {\n\t\tif($('.main-header').length){\n\t\t\tvar topHeader = $('.mainmenu-area').innerHeight();\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tif (windowpos >= topHeader) {\n\t\t\t\t$('.scroll-to-top').fadeIn(300);\n\t\t\t} else {\n\t\t\t\t$('.scroll-to-top').fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function header() {\n var header = document.querySelector('header') || document.querySelector('.header');\n //init header animation\n window.addEventListener('load', function () {\n header.classList.add('header--animate');\n });\n initBurger(header);\n initScrollTo(header);\n}", "function headerNavPreInit() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Deactivate hide header until needed effect on mobile.\r\n\t\t\t\t\tif (nectarDOMInfo.usingMobileBrowser && $('#header-outer[data-remove-fixed=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t$body.attr('data-hhun', '0');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Page fullscreen rows does not need permanent transparent.\r\n\t\t\t\t\tif ($('#nectar_fullscreen_rows').length > 0) {\r\n\t\t\t\t\t\t($headerOuterEl.attr('data-permanent-transparent', 'false'));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Set mobile header height.\r\n\t\t\t\t\tif (nectarDOMInfo.usingMobileBrowser && $('#header-outer[data-mobile-fixed=\"1\"]').length > 0 && \r\n\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').length == 0) {\r\n\t\t\t\t\t\t$('#header-space').css('height', $headerOuterEl.outerHeight());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function headerStyle() {\r\n if ($('.main-header').length) {\r\n var windowpos = $(window).scrollTop();\r\n if (windowpos >= 150) {\r\n $('.main-header').addClass('fixed-header');\r\n $('.scroll-to-top').fadeIn(300);\r\n } else {\r\n $('.main-header').removeClass('fixed-header');\r\n $('.scroll-to-top').fadeOut(300);\r\n }\r\n }\r\n }", "function transparentCheck() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// The condense header effect will bypass this unless in the custom mobile breakpoint (which is defined in theme options).\r\n\t\t\t\t\tif ($('#header-outer[data-format=\"centered-menu-bottom-bar\"][data-condense=\"true\"]').length > 0 && !$headerOuterEl.hasClass('within-custom-breakpoint') ) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop == 0 && $('body.material-ocm-open').length == 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('#header-outer[data-megamenu-rt=\"1\"]').length > 0 && \r\n\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t$('#header-outer .megamenu').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($headerOuterEl.attr('data-transparent-header') == 'true' && $('.megamenu.sfHover').length == 0) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t.addClass('transparent')\r\n\t\t\t\t\t\t\t\t\t.removeClass('scrolled-down');\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('no-transition');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else if ($headerOuterEl.attr('data-transparent-header') == 'true') {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('scrolled-down');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif ($headerOuterEl.attr('data-transparent-header') == 'true') {\r\n\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t.addClass('transparent')\r\n\t\t\t\t\t\t\t\t\t.removeClass('scrolled-down');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\t\t$headerOuterEl.removeClass('scrolled-down');\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Secondary header\r\n\t\t\t\t\t\t\tif ($headerSecondaryEl.length > 0 && nectarDOMInfo.winW > 1000) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerSecondaryEl.removeClass('hide-up');\r\n\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t.removeClass('hide-up')\r\n\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0%)');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Switch event to watch.\r\n\t\t\t\t\t\t$window.off('scroll.headerResizeEffectOpaque', transparentCheck);\r\n\t\t\t\t\t\t$window.on('scroll.headerResizeEffectOpaque', opaqueCheck);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function updateHeader() {\n return;\n}", "function fadeHeader() {\n\t\tvar curr_scroll = $(window).scrollTop();\n\t\tif (curr_scroll > 20) {\n\t\t\t$(\"#header-carousel .item .container\").css(\"opacity\", 1 - (curr_scroll/100 * 0.4));\n\t\t\t$(\".subpage .subpage-title\").css(\"opacity\", 1 - (curr_scroll/100 * 0.));\n\t\t} else {\n\t\t\t$(\"#header-carousel .item .container\").css(\"opacity\", 1);\n\t\t\t$(\".subpage .subpage-title\").css(\"opacity\", 1);\n\t\t}\n\t}", "function pageHeaderAfterLoad() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Transparent\r\n\t\t\t\t\tif ($('#header-outer[data-transparent-header=\"true\"]').length > 0) {\r\n\t\t\t\t\t\t$('#page-header-bg[data-parallax=\"1\"]').css({\r\n\t\t\t\t\t\t\t'top': nectarDOMInfo.adminBarHeight\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('body[data-header-resize=\"0\"]').length == 0 && $('body.material').length == 0) {\r\n\t\t\t\t\t\t\t$('#page-header-bg[data-parallax=\"1\"]').css({\r\n\t\t\t\t\t\t\t\t'top': ($('#page-header-wrap').offset().top) + 'px'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//fade in header\r\n\t\t\t\t\tif ($('#ajax-content-wrap').length == 0 || !$body.hasClass('ajax-loaded')) {\r\n\t\t\t\t\t\t$('#page-header-bg[data-parallax=\"1\"]').animate({\r\n\t\t\t\t\t\t\t'opacity': 1\r\n\t\t\t\t\t\t}, 350, 'easeInCubic');\r\n\t\t\t\t\t} else if ($('#ajax-content-wrap').length == 1) {\r\n\t\t\t\t\t\t$('#page-header-bg[data-parallax=\"1\"]').css({\r\n\t\t\t\t\t\t\t'opacity': 1\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('#page-header-bg[data-parallax=\"1\"] .nectar-particles').append('<div class=\"fade-out\" />');\r\n\t\t\t\t\t\r\n\t\t\t\t}", "_updateHeaderStyles() {\n if (this.$header) {\n const headerDisplay = this.attributes.header ? undefined : 'none';\n if (this.$header.style.display !== headerDisplay) {\n this.$header.style.display = headerDisplay;\n }\n }\n }", "function WINDOW_HEADER$static_(){ToolbarSkin.WINDOW_HEADER=( new ToolbarSkin(\"window-header\"));}", "goToHeader() {\n this.owner.enableHeaderAndFooter = true;\n this.enableHeadersFootersRegion(this.start.paragraph.bodyWidget.page.headerWidget);\n }", "function HEADER$static_(){ToolbarSkin.HEADER=( new ToolbarSkin(\"header\"));}", "function mobileHeaderRAF() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('body.material-ocm-open').length > 0) {\r\n\t\t\t\t\t\trequestAnimationFrame(mobileHeaderRAF);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Scrolled down.\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop > 80) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!$headerOuterEl.is('[data-permanent-transparent=\"1\"]')) {\r\n\t\t\t\t\t\t\t$headerOuterEl.removeClass('transparent');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (nectarDOMInfo.secondaryHeaderHeight > 0) {\r\n\t\t\t\t\t\t\t$headerSecondaryEl.addClass('hide-up');\r\n\t\t\t\t\t\t\t$headerOuterEl.css('transform', 'translateY(-' + nectarDOMInfo.secondaryHeaderHeight + 'px)');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} \r\n\t\t\t\t\t// At top.\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($headerOuterEl.is('[data-transparent-header=\"true\"]')) {\r\n\t\t\t\t\t\t\t$headerOuterEl.addClass('transparent');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (nectarDOMInfo.secondaryHeaderHeight > 0) {\r\n\t\t\t\t\t\t\t$headerSecondaryEl.removeClass('hide-up');\r\n\t\t\t\t\t\t\t$headerOuterEl.css('transform', 'translateY(0px)');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.winW < 1000) {\r\n\t\t\t\t\t\trequestAnimationFrame(mobileHeaderRAF);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function toggleHeaderBgImg() {\n let winToTop = $(window).scrollTop(),\n headerHt = $('header').height();\n if(winToTop > headerHt * 2) {\n $('header').addClass('remove');\n } else {\n $('header').removeClass('remove');\n }\n}", "renderHeader() {\n if (!this.hidden) {\n this.renderFilterBar();\n }\n }", "function loadHeaderCreateEvent(){\n /**\n * Hidde the formulaire for create header\n */\n $('#close-create-header').click(function (){\n $('#create-header-btn').css({\n 'background':'none',\n });\n for(let i = 0; i<$('.create-header').length; i++ ){\n $('.create-header')[i].style.display = 'none';\n }\n $('body').css({\n 'background': 'none',\n });\n });\n}", "function WIDGET_HEADER_HIGHLIGHTED$static_(){ToolbarSkin.WIDGET_HEADER_HIGHLIGHTED=( new ToolbarSkin(\"widget-header-highlighted\"));}", "function headerStyle() {\r\n if($header.length){\r\n var windowpos = $window.scrollTop();\r\n if (windowpos >= 180) {\r\n $header.addClass('fixed-header');\r\n } else {\r\n $header.removeClass('fixed-header');\r\n }\r\n }\r\n }", "function headerStyle() {\n\t\tif($header.length){\n\t\t\tvar windowpos = $window.scrollTop();\n\t\t\tif (windowpos >= 100) {\n\t\t\t\t$header.addClass('fixed-top');\n\t\t\t} else {\n\t\t\t\t$header.removeClass('fixed-top');\n\t\t\t}\n\t\t}\n\t}", "function WIDGET_HEADER$static_(){ToolbarSkin.WIDGET_HEADER=( new ToolbarSkin(\"widget-header\"));}", "function onToggleHeaderSection() {\n setAttributes(toggleSection(attributes, 'head'));\n }", "function _renderHead() {\n if (_$head instanceof $) {\n _$head.setMod(_B_BAR, _E_HEADING, _M_HIDDEN, true);\n setTimeout(function() {\n _$head.text(_$head.data(_DATA_STR) || \"\");\n _$head.setMod(_B_BAR, _E_HEADING, _M_HIDDEN, false);\n }, CFG.TIME.ANIMATION);\n }\n }", "function initHeader() {\n \tlet scrollTop = $(window).scrollTop();\n \tlet offsetTop = getHeaderHeight() / 3;\n \tlet $header = $('#container > header');\n\n \ttoggleShrink();\n\n \t$(window).scroll(function() {\n \t\tscrollTop = $(window).scrollTop();\n \t\ttoggleShrink();\n \t});\n\n \t/**\n \t * Toggle mini header\n \t */\n \tfunction toggleShrink() {\n \t\tif(scrollTop >= offsetTop && !header_shrinked) {\n \t\t\t$header.addClass('shrinked');\n \t\t\theader_shrinked = true;\n \t\t} else if(scrollTop < offsetTop && header_shrinked) {\n\t\t\t\t$header.removeClass('shrinked');\n \t\t\theader_shrinked = false;\n \t\t}\n \t}\n }", "function toggleHeader(){\n\t// external js:\n\t// 1) resizeByWidth (resize only width);\n\n\tvar $page = $('html');\n\n\tvar previousScrollTop = $(window).scrollTop();\n\n\t$(window).on('load scroll debouncedresize', function () {\n\t\tvar currentScrollTop = $(window).scrollTop();\n\n\n\t\tvar minScrollTop = $('.header').parent().offset().top + 50;\n\n\t\t$page.toggleClass('header-transform', (currentScrollTop >= minScrollTop));\n\n\t\tvar showHeaderPanel = currentScrollTop < previousScrollTop || currentScrollTop <= minScrollTop;\n\t\t$page.toggleClass('header-show', showHeaderPanel);\n\t\t$page.toggleClass('header-hide', !showHeaderPanel);\n\n\t\tpreviousScrollTop = currentScrollTop;\n\t});\n}", "function init() {\n\t $('header').removeClass('header-transition');\n\t }", "function headerStyle() {\n\t\tif($('.main-header').length){\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tvar siteHeader = $('.main-header');\n\t\t\t//var scrollLink = $('.scroll-to-top');\n\t\t\tif (windowpos >= 60) {\n\t\t\t\tsiteHeader.addClass('fixed-header');\n\t\t\t\t//scrollLink.fadeIn(300);\n\t\t\t} else {\n\t\t\t\tsiteHeader.removeClass('fixed-header');\n\t\t\t\t//scrollLink.fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function head () {\n\t\t\n\t\tif (clientWidth < 800) {\n\n\t\t\tif ($(this).scrollTop() > 100) \n\t\t\t\t$logoBar.css('display', 'none');\n\t\t\telse\n\t\t\t\t$logoBar.css('display', 'block');\n\n\t\t} else {\n\n\t\t\t$logoBar.css('display', 'block');\n\t\t}\n\t}", "function opaqueCheck() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// The condense header effect will bypass this unless in the custom mobile breakpoint (which is defined in theme options).\r\n\t\t\t\t\tif ($('#header-outer[data-format=\"centered-menu-bottom-bar\"][data-condense=\"true\"]').length > 0 && !$headerOuterEl.hasClass('within-custom-breakpoint') ) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop > 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($('body.material').length > 0) {\r\n\t\t\t\t\t\t\t$headerOuterEl.addClass('scrolled-down');\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Secondary header\r\n\t\t\t\t\t\t\tif ($headerSecondaryEl.length > 0 && nectarDOMInfo.winW > 1000) {\r\n\t\t\t\t\t\t\t\t$headerSecondaryEl.addClass('hide-up');\r\n\t\t\t\t\t\t\t\t$headerOuterEl.css('transform', 'translateY(-' + nectarDOMInfo.secondaryHeaderHeight + 'px)');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($headerOuterEl.attr('data-transparent-header') == 'true' && $('#header-outer[data-permanent-transparent=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t\t$headerOuterEl.removeClass('transparent').addClass('scrolled-down');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Switch event to watch.\r\n\t\t\t\t\t\t$window.off('scroll.headerResizeEffectOpaque', opaqueCheck);\r\n\t\t\t\t\t\t$window.on('scroll.headerResizeEffectOpaque', transparentCheck);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function scrollheader(){\n\tif (document.body.scrollTop > 110 || document.documentElement.scrollTop > 110) { // jika discroll 110 px ke bawah maka lakukan event di bawah\n $(\"#headermain\").css(\"top\",\"-85px\"); \n\t\t$(\"#header\").css(\"top\",\"-85px\");\n\t\t//$(\"#scrollbody\").css(\"margin-top\",\"-80px\");\n\t\t$(\"#menubar\").css(\"top\",\"-85px\");\n } else {\n $(\"#headermain\").css(\"top\",\"0px\"); \n\t\t$(\"#header\").css(\"top\",\"0px\");\n\t\t//$(\"#scrollbody\").css(\"margin-top\",\"0px\");\n\t\t$(\"#menubar\").css(\"top\",\"0px\");\n }\t\n}", "function animateHeader($section){\r\n var $anim = $section.find(\".anim\");\r\n $anim.each(function(index){\r\n var del = index * 0.1;\r\n TweenMax.set($(this),{opacity:1,delay:del});\r\n TweenMax.from($(this),0.4,{y:100,ease:Back.easeOut,delay:del});\r\n });\r\n }", "function headerNavScrollInit() {\r\n\r\n\t\t\t\t\t// Remove transparent class if page loaded further down.\r\n\t\t\t\t\tif ($('#header-outer[data-remove-fixed=\"1\"]').length == 0 && nectarDOMInfo.winW > 1000) {\r\n\t\t\t\t\t\tif ( $(window).scrollTop() != 0 && $('#header-outer.transparent[data-permanent-transparent=\"false\"]').length == 1) {\r\n\t\t\t\t\t\t\t$headerOuterEl.removeClass('transparent');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Permanent transparent header.\r\n\t\t\t\t\tif ($('#nectar_fullscreen_rows').length == 0 && $('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\tmidnightInit();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Determine which events to bind at start.\r\n\t\t\t\t\tif (nectarDOMInfo.winW < 1000 && $('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\tbindScrollEffectsMobile();\r\n\t\t\t\t\t\t$window.on('smartresize.nectarNavScrollEffects', bindScrollEffectsMobile);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbindScrollEffectsDesktop();\r\n\t\t\t\t\t\t$window.on('smartresize.nectarNavScrollEffects', bindScrollEffectsDesktop);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}", "function stickyHeader() {\n\t\tif ($(this).scrollTop() > 100) {\n\t\t\t$('header').addClass('fixed').fadeIn(2000);\n\t\t} else {\n\t\t\t$('header').removeClass('fixed').fadeIn(2000);\n\t\t}\n \t}", "function noAnimationInit(){\n\t$(\".navbar-header\").css({\n\t\t\"width\": \"100%\"\n\t});\n\t\n\t$(\"#content\").fadeIn();\n}", "function edgtfHeaderBehaviour() {\n\n var header = $('.edgtf-page-header'),\n\t stickyHeader = $('.edgtf-sticky-header'),\n fixedHeaderWrapper = $('.edgtf-fixed-wrapper'),\n\t menuAreaHeight = fixedHeaderWrapper.children('.edgtf-menu-area').outerHeight();\n \n var revSliderHeight = 0;\n if ($('.edgtf-slider').length) {\n revSliderHeight = $('.edgtf-slider').outerHeight();\n }\n\n var headerMenuAreaOffset = $('.edgtf-page-header').find('.edgtf-fixed-wrapper').length ? $('.edgtf-page-header').find('.edgtf-fixed-wrapper').offset().top - edgtfGlobalVars.vars.edgtfAddForAdminBar : 0;\n\t\t\n var stickyAppearAmount;\n var headerAppear;\n\n switch(true) {\n // sticky header that will be shown when user scrolls up\n case edgtf.body.hasClass('edgtf-sticky-header-on-scroll-up'):\n edgtf.modules.header.behaviour = 'edgtf-sticky-header-on-scroll-up';\n var docYScroll1 = $(document).scrollTop();\n stickyAppearAmount = parseInt(edgtfGlobalVars.vars.edgtfTopBarHeight) + parseInt(edgtfGlobalVars.vars.edgtfLogoAreaHeight) + parseInt(edgtfGlobalVars.vars.edgtfMenuAreaHeight) + parseInt(edgtfGlobalVars.vars.edgtfStickyHeaderHeight);\n\t \n headerAppear = function(){\n var docYScroll2 = $(document).scrollTop();\n\n if((docYScroll2 > docYScroll1 && docYScroll2 > stickyAppearAmount) || (docYScroll2 < stickyAppearAmount)) {\n edgtf.modules.header.isStickyVisible= false;\n stickyHeader.removeClass('header-appear').find('.edgtf-main-menu .second').removeClass('edgtf-drop-down-start');\n }else {\n edgtf.modules.header.isStickyVisible = true;\n stickyHeader.addClass('header-appear');\n }\n\n docYScroll1 = $(document).scrollTop();\n };\n headerAppear();\n\n $(window).scroll(function() {\n headerAppear();\n });\n\n break;\n\n // sticky header that will be shown when user scrolls both up and down\n case edgtf.body.hasClass('edgtf-sticky-header-on-scroll-down-up'):\n edgtf.modules.header.behaviour = 'edgtf-sticky-header-on-scroll-down-up';\n\n if(edgtfPerPageVars.vars.edgtfStickyScrollAmount !== 0){\n edgtf.modules.header.stickyAppearAmount = parseInt(edgtfPerPageVars.vars.edgtfStickyScrollAmount);\n } else {\n edgtf.modules.header.stickyAppearAmount = parseInt(edgtfGlobalVars.vars.edgtfTopBarHeight) + parseInt(edgtfGlobalVars.vars.edgtfLogoAreaHeight) + parseInt(edgtfGlobalVars.vars.edgtfMenuAreaHeight) + revSliderHeight;\n }\n\n headerAppear = function(){\n if(edgtf.scroll < edgtf.modules.header.stickyAppearAmount) {\n edgtf.modules.header.isStickyVisible = false;\n stickyHeader.removeClass('header-appear').find('.edgtf-main-menu .second').removeClass('edgtf-drop-down-start');\n }else{\n edgtf.modules.header.isStickyVisible = true;\n stickyHeader.addClass('header-appear');\n }\n };\n\n headerAppear();\n\n $(window).scroll(function() {\n headerAppear();\n });\n\n break;\n\n // on scroll down, part of header will be sticky\n case edgtf.body.hasClass('edgtf-fixed-on-scroll'):\n edgtf.modules.header.behaviour = 'edgtf-fixed-on-scroll';\n var headerFixed = function(){\n\n if(edgtf.scroll <= headerMenuAreaOffset) {\n fixedHeaderWrapper.removeClass('fixed');\n\t fixedHeaderWrapper.children('.edgtf-menu-area').css({'height': menuAreaHeight});\n header.css('margin-bottom', '0');\n } else {\n fixedHeaderWrapper.addClass('fixed');\n\t fixedHeaderWrapper.children('.edgtf-menu-area').css({'height': (menuAreaHeight - 20) + 'px'});\n\t header.css('margin-bottom', (menuAreaHeight - 20) + 'px');\n }\n };\n\n headerFixed();\n\n $(window).scroll(function() {\n headerFixed();\n });\n\n break;\n }\n }", "function headerStyle() {\r\n if ($('.main-header').length) {\r\n var windowpos = $(window).scrollTop();\r\n var siteHeader = $('.main-header');\r\n var scrollLink = $('.scroll-top');\r\n if (windowpos >= 100) {\r\n siteHeader.addClass('fixed-header');\r\n scrollLink.fadeIn(300);\r\n } else {\r\n siteHeader.removeClass('fixed-header');\r\n scrollLink.fadeOut(300);\r\n }\r\n }\r\n }", "function headerStyle() {\n if ($('.main-header').length) {\n var windowpos = $(window).scrollTop();\n var siteHeader = $('.main-header');\n var scrollLink = $('.scroll-top');\n if (windowpos >= 100) {\n siteHeader.addClass('fixed-header');\n scrollLink.fadeIn(300);\n } else {\n siteHeader.removeClass('fixed-header');\n scrollLink.fadeOut(300);\n }\n }\n }", "function hhunCalcs() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$headerOuterEl.addClass('detached');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar currentScroll = nectarDOMInfo.scrollTop, // Gets current scroll position\r\n\t\t\t\t\t\tscrollDifference \t= Math.abs(currentScroll - previousScroll); // Calculates how fast user is scrolling\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop scrolling while animated anchors / box roll\r\n\t\t\t\t\t\tif ($('body.animated-scrolling').length > 0 && $('#header-outer.detached').length > 0 || $('body.no-scroll').length > 0) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t// Alter scroll tracking to continue hiding menu.\r\n\t\t\t\t\t\t\t\t\tpreviousScroll = nectarDOMInfo.scrollTop;\r\n\t\t\t\t\t\t\t\t\tcurrentScroll = nectarDOMInfo.scrollTop;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop when material ocm or material search is open\r\n\t\t\t\t\t\tif ($('body.material-ocm-open').length > 0 || $('#search-outer.material-open').length > 0) {\r\n\t\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Stop on mobile if not using sticky option\r\n\t\t\t\t\t\tif ($('#header-outer[data-mobile-fixed=\"false\"]').length > 0 && $('body.mobile').length > 0) {\r\n\t\t\t\t\t\t\t$headerOuterEl.removeClass('detached');\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!$headerOuterEl.hasClass('side-widget-open') && !$('#header-outer .slide-out-widget-area-toggle a').hasClass('animating')) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvar heightToAdjust;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Remove transparent and body border margin\r\n\t\t\t\t\t\t\tif (currentScroll > 1) {\r\n\t\t\t\t\t\t\t\tif ($('#header-outer[data-permanent-transparent=\"1\"]').length == 0) {\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('transparent');\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl.addClass('scrolling');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Handle secondary header\r\n\t\t\t\t\t\t\t\tif ($headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\t\t$headerSecondaryEl.addClass('hide-up');\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl.css('transform', 'translateY(-' + nectarDOMInfo.secondaryHeaderHeight + 'px)');\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t$headerSecondaryEl.removeClass('hide-up');\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl.css('transform', '0px)');\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Scrolled past menu\r\n\t\t\t\t\t\t\tif (currentScroll > menuOffset) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Scrolled past detach point add class to fix menu\r\n\t\t\t\t\t\t\t\tif (!$headerOuterEl.hasClass('detached')) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t.addClass('detached')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('parallax-contained');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('no-transition');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Scrolling faster than hideShowOffset hide/show menu\r\n\t\t\t\t\t\t\t\tif (scrollDifference >= hideShowOffset) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (currentScroll > previousScroll) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Hide menu\r\n\t\t\t\t\t\t\t\t\t\tif (!$headerOuterEl.hasClass('invisible')) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('invisible')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('at-top');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Close submenus\r\n\t\t\t\t\t\t\t\t\t\t\tif ($(\".sf-menu\").length > 0 && $().superfish) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(\".sf-menu\").superfish('hide');\r\n\t\t\t\t\t\t\t\t\t\t\t\t$('header#top nav > ul.sf-menu > li.menu-item-over').removeClass('menu-item-over');\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0px)')\r\n\t\t\t\t\t\t\t\t\t\t\t.addClass('header-not-visible');\r\n\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Show menu\r\n\t\t\t\t\t\t\t\t\t\tif ($headerOuterEl.hasClass('invisible')) {\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('invisible');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Page submenu adjust\r\n\t\t\t\t\t\t\t\t\t\theightToAdjust = $headerOuterEl.outerHeight();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif( $headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\theightToAdjust -=\tnectarDOMInfo.secondaryHeaderHeight;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0 && $('body.mobile').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$bodyBorderSizeToRemove = ($bodyBorderHeaderColorMatch) ? $bodyBorderTop.height() : 0;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + (heightToAdjust - $bodyBorderSizeToRemove) + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + heightToAdjust + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t\t\t\t\t\t\tvar $topDetachNum = ($('#header-outer[data-using-secondary=\"1\"]').length > 0) ? 32 : 0;\r\n\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0) {\r\n\t\t\t\t\t\t\t\t\t$topDetachNum = ($('#header-outer[data-using-secondary=\"1\"]').length > 0) ? 32 + $bodyBorderTop.height() : $bodyBorderTop.height();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (currentScroll <= $topDetachNum) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t.addClass('at-top')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('invisible')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('scrolling');\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-megamenu-rt=\"1\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t$('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t$('#header-outer .megamenu').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.nectar-box-roll').length == 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.megamenu.sfHover').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('transparent')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.removeClass('no-transition');\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else if ($('.nectar-box-roll').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('at-top-before-box');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif ($('#header-outer[data-transparent-header=\"true\"]').length > 0 && \r\n\t\t\t\t\t\t\t\t\t\t$('.nectar-box-roll').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('transparent')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} else if ($('.nectar-box-roll').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)')\r\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('at-top-before-box');\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif ($('#page-header-bg[data-parallax=\"1\"]').length > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t$headerOuterEl\r\n\t\t\t\t\t\t\t\t\t\t\t.addClass('parallax-contained')\r\n\t\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(0)');\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// At the bottom of document - show menu\r\n\t\t\t\t\t\t\tif ((nectarDOMInfo.winH + window.scrollY) >= document.body.offsetHeight) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$headerOuterEl.removeClass('invisible');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Page submenu adjust\r\n\t\t\t\t\t\t\t\theightToAdjust = $headerOuterEl.outerHeight();\r\n\t\t\t\t\t\t\t\tif( $headerSecondaryEl.length > 0) {\r\n\t\t\t\t\t\t\t\t\theightToAdjust -=\tnectarDOMInfo.secondaryHeaderHeight;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($bodyBorderTop.length > 0 && $('body.mobile').length == 0) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$bodyBorderSizeToRemove = ($bodyBorderHeaderColorMatch) ? $bodyBorderTop.height() : 0;\r\n\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + (heightToAdjust - $bodyBorderSizeToRemove) + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$('.page-submenu.stuck')\r\n\t\t\t\t\t\t\t\t\t\t.css('transform', 'translateY(' + heightToAdjust + 'px)')\r\n\t\t\t\t\t\t\t\t\t\t.removeClass('header-not-visible');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Keep track of current scroll position\r\n\t\t\t\t\t\tpreviousScroll = currentScroll;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (nectarDOMInfo.winW > 999) {\r\n\t\t\t\t\t\t\trequestAnimationFrame(hhunCalcs);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "function scrollHeader() {\n\n}", "function _initHeader() {\n\t\tpage.header.classList.add('wl-header');\n\t\t\t\t\n\t\tpage.header.toolname.innerHTML = PAGE_TITLE;\n\t\t\n\t\tvar elemCourseSelect = _createCourseSelect();\n\t\tvar elemEmbedControl = _createEmbedControl();\n\t\t\n\t\tpage.header.courses.appendChild(elemCourseSelect);\n\t\tpage.header.courses.appendChild(elemEmbedControl);\n\t\t\n\t\tpage.header.style.display = 'block';\n\t\tpage.header.style.visibility = 'visible';\n\t}", "function MENU_HEADER$static_(){ToolbarSkin.MENU_HEADER=( new ToolbarSkin(\"menu-header\"));}", "function HeaderScroll(){\n var windown_top = $(window).scrollTop();\n if (windown_top > 100) {\n if ($('#header').hasClass('header-stick') == false) {\n $('#header').addClass('header-stick');\n $('.navigation.nav')\n .closest('body')\n .find('#header')\n .find('.logo')\n .css({\n 'opacity': '1',\n 'visibility': 'visible'\n });\n }\n } else {\n $('#header').removeClass('header-stick');\n $('.navigation.nav')\n .closest('body')\n .find('#header')\n .css('background-color', 'transparent')\n .find('.logo')\n .css({\n 'opacity': '0',\n 'visibility': 'hidden'\n });\n }\n \n }", "function handleAnimatedHeader() {\n var header = $('.header.fixed');\n function refresh() {\n var scroll = $(window).scrollTop();\n if (scroll >= 99) {\n header.addClass('shrink');\n } else {\n header.removeClass('shrink');\n }\n $.waypoints('refresh');\n }\n ;\n $(window).load(function () {\n refresh();\n });\n $(window).scroll(function () {\n refresh();\n });\n $(window).on('touchstart', function () {\n refresh();\n });\n $(window).on('scrollstart', function () {\n refresh();\n });\n $(window).on('scrollstop', function () {\n refresh();\n });\n $(window).on('touchmove', function () {\n refresh();\n });\n\n }", "function headerStyle() {\r\n\t\tif($('.main-header').length){\r\n\t\t\tvar windowpos = $(window).scrollTop();\r\n\t\t\tvar siteHeader = $('.main-header');\r\n\t\t\tvar scrollLink = $('.scroll-to-top');\r\n\t\t\tif (windowpos >= 1) {\r\n\t\t\t\tsiteHeader.addClass('fixed-header');\r\n\t\t\t\tscrollLink.fadeIn(300);\r\n\t\t\t} else {\r\n\t\t\t\tsiteHeader.removeClass('fixed-header');\r\n\t\t\t\tscrollLink.fadeOut(300);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function headerStyle() {\n\t\tif($('.main-header').length){\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tvar siteHeader = $('.main-header');\n\t\t\tvar scrollLink = $('.scroll-to-top');\n\t\t\tif (windowpos >= 200) {\n\t\t\t\tsiteHeader.addClass('fixed-header');\n\t\t\t\tscrollLink.fadeIn(300);\n\t\t\t} else {\n\t\t\t\tsiteHeader.removeClass('fixed-header');\n\t\t\t\tscrollLink.fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function stickyHeader () {\n\t\tvar headerScrollPos = $('header').next().offset().top;\n\t\tif($(window).scrollTop() > headerScrollPos) {\n\t\t\t$('header').addClass('header-fixed gradient-overlay'); \n\t\t}\n\t\telse if($(this).scrollTop() <= headerScrollPos) {\n\t\t\t$('header').removeClass('header-fixed gradient-overlay'); \n\t\t}\n\t}", "function accordion(header) {\n var el = $(header.parentNode.id + '-body');\n Effect.toggle(el, 'slide', {duration:0.2});\n}", "function subHeader(){\n\t\tif(subHeaderHidden===0 && subHeaderAnimTime==0){\n\t\t\t$('#subHeader').animate({top: '58px'}, subHeaderHideSpeed);\n\t\t\tsubHeaderHidden=1;\n\t\t\tsubHeaderAnimTime=subHeaderHideSpeed;\n\t\t}\n\t\tif(subHeaderHidden===2 && subHeaderAnimTime==0){\n\t\t\t$('#subHeader').animate({top: '98px'}, subHeaderHideSpeed);\n\t\t\tsubHeaderHidden=1;\n\t\t\tsubHeaderAnimTime=subHeaderHideSpeed;\n\t\t}\n\t\tif(subHeaderAnimTime > 0) subHeaderAnimTime-=(1000/websiteUPS)\n\t\tif(subHeaderAnimTime < 0) subHeaderAnimTime=0;\n\t}", "function headerStyle() {\n if ($('.main-header').length) {\n var windowpos = $(window).scrollTop();\n var siteHeader = $('.main-header');\n var scrollLink = $('.scroll-top');\n if (windowpos >= 250) {\n siteHeader.addClass('fixed-header');\n scrollLink.fadeIn(300);\n } else {\n siteHeader.removeClass('fixed-header');\n scrollLink.fadeOut(300);\n }\n }\n }", "function handleAnimatedHeader() {\n var header = $('.header.fixed');\n\n function refresh() {\n var scroll = $(window).scrollTop();\n if (scroll >= 99) {\n header.addClass('shrink');\n } else {\n header.removeClass('shrink');\n }\n }\n $(window).load(function () {\n refresh();\n });\n $(window).scroll(function () {\n refresh();\n });\n $(window).on('touchstart', function () {\n refresh();\n });\n $(window).on('scrollstart', function () {\n refresh();\n });\n $(window).on('scrollstop', function () {\n refresh();\n });\n $(window).on('touchmove', function () {\n refresh();\n });\n\n }", "function headerStyle() {\r\n if ($('.main-header').length) {\r\n var windowpos = $(window).scrollTop();\r\n var siteHeader = $('.main-header');\r\n var scrollLink = $('.scroll-top');\r\n if (windowpos >= 250) {\r\n siteHeader.addClass('fixed-header');\r\n scrollLink.fadeIn(300);\r\n } else {\r\n siteHeader.removeClass('fixed-header');\r\n scrollLink.fadeOut(300);\r\n }\r\n }\r\n }", "function cms_stiky_menu() {\r\n\t\tif (header_top < scroll_top && window_width > 992) {\r\n\t\t\tswitch (true) {\r\n\t\t\t\tcase (window_width > 0):\r\n\t\t\t\t\theader.addClass('header-fixed');\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\theader.removeClass('header-fixed');\r\n\t\t}\r\n\t}", "function headroomHeader() {\n var options = {\n \"offset\": 205,\n \"tolerance\": 5\n };\n var headNav = document.querySelector('.nav');\n var headroom = new Headroom(headNav, options);\n headroom.init();\n}", "function LogoHeaderComponent() {\n }", "function resetSectionHeader( $header ) {\n if ( $header.hasClass( 'fixed' ) ) {\n $header.css( 'top', '' );\n $header.css( 'width', '' );\n $header.removeClass( 'fixed' );\n }\n $header.removeClass( 'trailing' );\n }", "function headerClick() {\n enter.classList.remove('hidden');\n headerContent.classList.add('headerAnimation');\n}", "function headerScroll () {\n let Y = document.documentElement.scrollTop || document.body.scrollTop;\n if (Y > 596) {\n header.classList.add('header-scrolled-view')\n scrollToTopButton.classList.add('show-toTop-btn');\n scrollToTopButton.style.display = 'block';\n }\n else {\n header.classList.remove(\"header-scrolled-view\");\n scrollToTopButton.classList.remove(\"show-toTop-btn\");\n scrollToTopButton.style.display = \"none\";\n }\n }", "function headerStyle() {\n\t\tif($('.main-header').length){\n\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\tvar siteHeader = $('.main-header');\n\t\t\tvar sticky_header = $('.main-header .sticky-header');\n\t\t\tvar scrollLink = $('.scroll-to-top');\n\t\t\tif (windowpos > 200) {\n\t\t\t\tsiteHeader.addClass('fixed-header');\n\t\t\t\tsticky_header.addClass(\"animated slideInDown\");\n\t\t\t\tscrollLink.fadeIn(300);\n\t\t\t} else {\n\t\t\t\tsiteHeader.removeClass('fixed-header');\n\t\t\t\tsticky_header.removeClass(\"animated slideInDown\");\n\t\t\t\tscrollLink.fadeOut(300);\n\t\t\t}\n\t\t}\n\t}", "function headerFixed() {\n scrollTop = $(window).scrollTop();\n if(scrollTop > 0){\n $header.addClass('minimized')\n }\n else {\n $header.removeClass('minimized')\n }\n }", "backgroundHeaderPosition(e) {\n Helpers.backgroundHeaderPosition.call(false, e, this); }", "function _createHeader() {\n var backgroundSurface = new Surface({\n content: '<div class=\"styled-select\"><select id=\"select-box\"></select></div>',\n properties: {\n backgroundColor: 'white',\n color: 'blue',\n }\n });\n\n var backgroundModifier = new StateModifier({\n transform : Transform.behind\n });\n\n this.layout.header.add(backgroundModifier).add(backgroundSurface);\n }", "function mostrarBarraHeader(){\n $(document).scroll(function(e){\n if($(window).scrollTop() >= ($(\"#top_home\").height()*1)){\n if(!withClass){\n jQuery('#header').removeClass(\"sombra\");\n jQuery('#header').addClass(\"av_header_effect\");\n $('#linea_cabecera').addClass(\"esconder_linea_cabecera\");\n $('#label_cabecera').addClass(\"centrar_label_cabecera\");\n withClass = true;\n } \n }\n if($(window).scrollTop() < ($(\"#top_home\").height()*1)){\n jQuery('#header').removeClass(\"av_header_effect\");\n jQuery('#header').addClass(\"sombra\");\n $('#linea_cabecera').removeClass(\"esconder_linea_cabecera\");\n $('#label_cabecera').removeClass(\"centrar_label_cabecera\");\n withClass = false;\n }\n }); \n}", "_headerMouseEnterHandler() {\n const that = this;\n\n if (that.disabled) {\n return;\n }\n\n that.setAttribute('hovered', '');\n }", "function initHeaderScroll() {\n _window.on('scroll load', function (e) {\n var vScroll = _window.scrollTop();\n var header = $('.header').not('.header--static');\n\n if (vScroll > 15) {\n header.addClass('is-fixed');\n } else {\n header.removeClass('is-fixed');\n }\n });\n }", "function headerStyle() {\n if ($window.width() >= 992) {\n if ($header.length) {\n var windowpos = $window.scrollTop();\n if (windowpos >= 200) {\n $header.addClass('fixed-top');\n } else {\n $header.removeClass('fixed-top');\n $page_wrapper.removeClass('overlay');\n $sidenav.removeClass('visible');\n }\n }\n }\n }", "function parallaxHeader() {\n\t\n\t// get page scroll position\n\tscrollPosition = jQuery(this).scrollTop();\n\t\n\t// scroll and fade header text\n\tjQuery('#parallax_inner').css({\n\t\t'margin-top' : -(scrollPosition/4)+\"px\",\n\t\t'opacity' : 1-(scrollPosition/500)\n\t});\n\t\n\t// scroll banner background\n\tjQuery('#parallax_wrap').css({\n\t\t'background-position' : 'center ' + (-scrollPosition/8)+\"px\"\n\t});\n\t\n\t// scroll banner background\n\tjQuery('.top_bar').css({\n\t\t'top' : \"0\"\n\t});\n}", "static cloneHeader(source){\n let header = source.cloneNode(true);\n header.classList.add('fixed');\n source.parentNode.appendChild(header);\n [].slice.call(header.children).forEach(child=>{\n if(child.nodeName=='TBODY'){\n header.removeChild(child);\n }\n });\n return header;\n }", "function eltdfHeaderBehaviour() {\n\n var header = $('.eltdf-page-header'),\n stickyHeader = $('.eltdf-sticky-header'),\n fixedHeaderWrapper = $('.eltdf-fixed-wrapper');\n\n var revSliderHeight = 0;\n if ($('.eltdf-slider').length) {\n revSliderHeight = $('.eltdf-slider').outerHeight();\n }\n\n var headerMenuAreaOffset = $('.eltdf-page-header').find('.eltdf-fixed-wrapper').length ? $('.eltdf-page-header').find('.eltdf-fixed-wrapper').offset().top - eltdfGlobalVars.vars.eltdfAddForAdminBar - eltdf.scroll : 0;\n\n var stickyAppearAmount;\n var headerAppear;\n\n switch (true) {\n // sticky header that will be shown when user scrolls up\n case eltdf.body.hasClass('eltdf-sticky-header-on-scroll-up'):\n eltdf.modules.header.behaviour = 'eltdf-sticky-header-on-scroll-up';\n var docYScroll1 = $(document).scrollTop();\n stickyAppearAmount = eltdfGlobalVars.vars.eltdfTopBarHeight + eltdfGlobalVars.vars.eltdfLogoAreaHeight + eltdfGlobalVars.vars.eltdfMenuAreaHeight + eltdfGlobalVars.vars.eltdfStickyHeaderHeight;\n\n headerAppear = function () {\n var docYScroll2 = $(document).scrollTop();\n\n if ((docYScroll2 > docYScroll1 && docYScroll2 > stickyAppearAmount) || (docYScroll2 < stickyAppearAmount)) {\n eltdf.modules.header.isStickyVisible = false;\n stickyHeader.removeClass('header-appear').find('.eltdf-main-menu .second').removeClass('eltdf-drop-down-start');\n } else {\n eltdf.modules.header.isStickyVisible = true;\n stickyHeader.addClass('header-appear');\n }\n\n docYScroll1 = $(document).scrollTop();\n };\n headerAppear();\n\n $(window).scroll(function () {\n headerAppear();\n });\n\n break;\n\n // sticky header that will be shown when user scrolls both up and down\n case eltdf.body.hasClass('eltdf-sticky-header-on-scroll-down-up'):\n eltdf.modules.header.behaviour = 'eltdf-sticky-header-on-scroll-down-up';\n\n if (eltdfPerPageVars.vars.eltdfStickyScrollAmount !== 0) {\n eltdf.modules.header.stickyAppearAmount = eltdfPerPageVars.vars.eltdfStickyScrollAmount;\n } else {\n var menuHeight = eltdfGlobalVars.vars.eltdfMenuAreaHeight;\n\n eltdf.modules.header.stickyAppearAmount = eltdfGlobalVars.vars.eltdfStickyScrollAmount !== 0 ? eltdfGlobalVars.vars.eltdfStickyScrollAmount : eltdfGlobalVars.vars.eltdfTopBarHeight + eltdfGlobalVars.vars.eltdfLogoAreaHeight + menuHeight + revSliderHeight;\n }\n\n headerAppear = function () {\n if (eltdf.scroll < eltdf.modules.header.stickyAppearAmount) {\n eltdf.modules.header.isStickyVisible = false;\n stickyHeader.removeClass('header-appear').find('.eltdf-main-menu .second').removeClass('eltdf-drop-down-start');\n } else {\n eltdf.modules.header.isStickyVisible = true;\n stickyHeader.addClass('header-appear');\n }\n };\n\n headerAppear();\n\n $(window).scroll(function () {\n headerAppear();\n });\n\n break;\n\n // on scroll down, part of header will be sticky\n case eltdf.body.hasClass('eltdf-fixed-on-scroll'):\n eltdf.modules.header.behaviour = 'eltdf-fixed-on-scroll';\n var headerFixed = function () {\n\n //if(eltdf.scroll <= headerMenuAreaOffset) {\n // fixedHeaderWrapper.removeClass('fixed');\n // header.css('margin-bottom', '0');\n //} else {\n // fixedHeaderWrapper.addClass('fixed');\n // header.css('margin-bottom', fixedHeaderWrapper.outerHeight());\n //}\n\n if (eltdf.scroll <= (headerMenuAreaOffset)) {\n fixedHeaderWrapper.removeClass('fixed');\n\n } else {\n fixedHeaderWrapper.addClass('fixed');\n\n }\n\n if (eltdf.scroll > 0 && eltdf.scroll < eltdfGlobalVars.vars.eltdfTopBarHeight) {\n $('.eltdf-top-bar').css('top', (-eltdf.scroll) + 'px');\n $('.eltdf-page-header .eltdf-fixed-wrapper').css('top', (eltdfGlobalVars.vars.eltdfTopBarHeight - eltdf.scroll) + 'px');\n } else if (eltdf.scroll >= eltdfGlobalVars.vars.eltdfTopBarHeight) {\n $('.eltdf-top-bar').css('top', -eltdfGlobalVars.vars.eltdfTopBarHeight + 'px');\n $('.eltdf-page-header .eltdf-fixed-wrapper').css('top', '0px');\n } else {\n $('.eltdf-top-bar').css('top', '0px');\n $('.eltdf-page-header .eltdf-fixed-wrapper').css('top', eltdfGlobalVars.vars.eltdfTopBarHeight + 'px');\n }\n\n if ((eltdfGlobalVars.vars.eltdfMenuAreaHeight - eltdfGlobalVars.vars.eltdfTopBarHeight - (eltdf.scroll - eltdfGlobalVars.vars.eltdfTopBarHeight) / 4 >= 60) && (eltdf.scroll >= eltdfGlobalVars.vars.eltdfTopBarHeight)) {\n $('.eltdf-header-standard .eltdf-page-header .eltdf-menu-area').css('height', eltdfGlobalVars.vars.eltdfMenuAreaHeight - eltdfGlobalVars.vars.eltdfTopBarHeight - (eltdf.scroll - eltdfGlobalVars.vars.eltdfTopBarHeight) / 4 + 'px');\n $('.eltdf-header-full-screen .eltdf-page-header .eltdf-menu-area').css('height', eltdfGlobalVars.vars.eltdfMenuAreaHeight - eltdfGlobalVars.vars.eltdfTopBarHeight - (eltdf.scroll - eltdfGlobalVars.vars.eltdfTopBarHeight) / 4 + 'px');\n } else if (eltdf.scroll < eltdfGlobalVars.vars.eltdfTopBarHeight) {\n $('.eltdf-header-standard .eltdf-page-header .eltdf-menu-area').css('height', eltdfGlobalVars.vars.eltdfMenuAreaHeight - eltdfGlobalVars.vars.eltdfTopBarHeight);\n $('.eltdf-header-full-screen .eltdf-page-header .eltdf-menu-area').css('height', eltdfGlobalVars.vars.eltdfMenuAreaHeight - eltdfGlobalVars.vars.eltdfTopBarHeight);\n } else if ((eltdfGlobalVars.vars.eltdfMenuAreaHeight - eltdfGlobalVars.vars.eltdfTopBarHeight - (eltdf.scroll - eltdfGlobalVars.vars.eltdfTopBarHeight) / 4) < 60) {\n $('.eltdf-header-standard .eltdf-page-header .eltdf-menu-area').css('height', '60px');\n $('.eltdf-header-full-screen .eltdf-page-header .eltdf-menu-area').css('height', '60px');\n }\n };\n\n headerFixed();\n\n $(window).scroll(function () {\n headerFixed();\n });\n\n break;\n }\n }", "closeHeaderFooter() {\n this.disableHeaderFooter();\n }", "function renderHeader() {\n\t\theader.setToolbarOptions(computeHeaderOptions());\n\t\theader.render();\n\t\tif (header.el) {\n\t\t\telement.prepend(header.el);\n\t\t}\n\t}", "function createChooseColorHeader() {\n\theader.innerHTML = \"Choose A Color\";\n\t// slide in title from left\n\tTweenMax.from(header, 2, {opacity:0, x:-800, ease:Elastic.eastInOut}, 0.7);\n}", "function renderHeader() {\n\t\theader.render();\n\t\tif (header.el) {\n\t\t\telement.prepend(header.el);\n\t\t}\n\t}", "function setHeaderState (enable) {\n const c = ' warning';\n const header = document.getElementById('header');\n if (!header) return;\n\n if (enable) {\n header.className += c;\n document.getElementById('tl-badge').style.display = 'none';\n document.getElementById('tl-skull').style.display = 'block';\n } else {\n header.className = header.className.replace(c, '');\n document.getElementById('tl-skull').style.display = 'none';\n document.getElementById('tl-badge').style.display = 'inline-block';\n }\n}", "function setHeader() {\n if ($(window).scrollTop() > 91) {\n header.addClass('scrolled');\n }\n else {\n header.removeClass('scrolled');\n }\n }", "function setHeaderTransparency(lastKnownScrollPos, triggerHeight) {\n if (\n lastKnownScrollPos >= triggerHeight &&\n header.classList.contains(\"header--no-bg\")\n ) {\n header.classList.remove(\"header--no-bg\");\n headerIsAnimating = true;\n } else if (\n lastKnownScrollPos < triggerHeight &&\n !header.classList.contains(\"header--no-bg\")\n ) {\n header.classList.add(\"header--no-bg\");\n headerIsAnimating = true;\n }\n }", "function ListView_UpdateHeader(theObject)\n{\n\t//has headers?\n\tif (theObject.Content && theObject.Content.Header_Panel)\n\t{\n\t\t//remove header panel from parent\n\t\ttheObject.Content.Header_Panel.parentNode.removeChild(theObject.Content.Header_Panel);\n\t}\n\t//delete all headers\n\ttheObject.Content.Headers = [];\n\ttheObject.Content.Header_Height = 0;\n\ttheObject.Content.Header_Width = 0;\n\ttheObject.Content.Header_Panel = null;\n\t//want headers?\n\tvar strHeader = null;\n\t//check the style\n\tswitch (theObject.Content.ListView_Style)\n\t{\n\t\tcase __LISTVIEW_STYLE_ICON:\n\t\tcase __LISTVIEW_STYLE_SMALLICON:\n\t\tcase __LISTVIEW_STYLE_LIST:\n\t\t\t//no headers for these\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t//we want to show headers?\n\t\t\tstrHeader = Get_Bool(theObject.Properties[__NEMESIS_PROPERTY_COLUMN_HEADER], false) ? theObject.Properties[__NEMESIS_PROPERTY_HEADER] : null;\n\t\t\tbreak;\n\t}\n\t//want headers?\n\tif (!String_IsNullOrWhiteSpace(strHeader))\n\t{\n\t\t//create the header panel\n\t\ttheObject.Content.Header_Panel = theObject.HTML.appendChild(document.createElement(\"div\"));\n\t\ttheObject.Content.Header_Panel.id = \"HeaderPanel\";\n\t\ttheObject.Content.Header_Panel.style.cssText = \"position:absolute;left:0px;top:0px;background-color:transparent;overflow:hidden;width:100%;\";\n\t\t//this will always require a spacer panel\n\t\ttheObject.Content.Header_Panel.Spacer = theObject.Content.Header_Panel.appendChild(document.createElement(\"div\"));\n\t\ttheObject.Content.Header_Panel.Spacer.id = \"HeaderPanel_Spacer\";\n\t\ttheObject.Content.Header_Panel.Spacer.style.cssText = \"position:absolute;left:0px;top:0px;background-color:transparent;height:1px;width:1px;\";\n\t\t//helpers\n\t\tvar i, c;\n\t\t//split the headers\n\t\tvar aHeaders = strHeader.split(__LISTVIEW_SEPARATOR);\n\t\t//get widths\n\t\tvar aWidth = String_IsNullOrWhiteSpace(theObject.Properties[__NEMESIS_PROPERTY_COLUMNS_WIDTH]) ? [] : theObject.Properties[__NEMESIS_PROPERTY_COLUMNS_WIDTH].split(__LISTVIEW_SEPARATOR);\n\t\t//start position\n\t\tvar nLeft = 0;\n\t\t//fixed properties\n\t\tvar strFont = theObject.Properties[__NEMESIS_PROPERTY_FONT];\n\t\tvar headerBG = Get_Color(theObject.Properties[__NEMESIS_PROPERTY_HEADER_BACKGROUNDCOLOR], \"#F0F0F0\");\n\t\tvar headerFG = Get_Color(theObject.Properties[__NEMESIS_PROPERTY_HEADER_TEXTCOLOR], \"#000000\");\n\t\t//modifiers\n\t\tvar bFlat = Get_Bool(theObject.Properties[__NEMESIS_PROPERTY_FLAT], false);\n\t\t//modifier for the borders size\n\t\tvar modifier = bFlat ? -2 : -4;\n\t\tvar nPropertyHeaderHeight = Get_Number(theObject.Properties[__NEMESIS_PROPERTY_HEADER_HEIGHT], null);\n\t\t//valid?\n\t\tif (nPropertyHeaderHeight)\n\t\t{\n\t\t\t//use it\n\t\t\ttheObject.Content.Header_Height = nPropertyHeaderHeight;\n\t\t}\n\t\t//loop through them all\n\t\tfor (i = 0, c = aHeaders.length; i < c; i++)\n\t\t{\n\t\t\t//create the header item\n\t\t\tvar newHeader = theObject.Content.Header_Panel.appendChild(document.createElement(\"div\"));\n\t\t\t//set its styles\n\t\t\tnewHeader.style.cssText = \"position:absolute;top:0px;text-align:left;word-wrap:normal;white-space:nowrap;\";\n\t\t\tnewHeader.style.left = nLeft + \"px\";\n\t\t\tnewHeader.style.backgroundColor = headerBG;\n\t\t\tnewHeader.style.color = headerFG;\n\t\t\t//make it unselectable\n\t\t\tBrowser_SetSelectable(newHeader, false);\n\t\t\t//set its font\n\t\t\tBasic_SetFonts(newHeader, strFont);\n\t\t\t//Flat?\n\t\t\tif (bFlat)\n\t\t\t{\n\t\t\t\t//set a simple 1 pixel border\n\t\t\t\tnewHeader.style.border = \"1px solid #000000\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//set a 2 px raised border\n\t\t\t\tnewHeader.style.border = \"2px outset #FFFFFF\";\n\t\t\t}\n\t\t\t//set text\n\t\t\tnewHeader.innerHTML = aHeaders[i].ToPlainText(theObject.DataObject.Id); // SAFE BY ENCODING\n\t\t\t//get its forced width\n\t\t\tvar forcedWidth = Get_Number(aWidth[i], null);\n\t\t\t//has width?\n\t\t\tif (forcedWidth != null)\n\t\t\t{\n\t\t\t\t//was forcing to 0?\n\t\t\t\tif (forcedWidth == 0)\n\t\t\t\t{\n\t\t\t\t\t//we want to hide this\n\t\t\t\t\tnewHeader.style.display = \"none\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//set its width\n\t\t\t\t\tnewHeader.style.width = forcedWidth + modifier + \"px\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//increment left\n\t\t\tnLeft += Browser_GetOffsetWidth(newHeader);\n\t\t\t//no forced header height?\n\t\t\tif (!nPropertyHeaderHeight)\n\t\t\t{\n\t\t\t\t//update height\n\t\t\t\ttheObject.Content.Header_Height = Math.max(theObject.Content.Header_Height, Browser_GetOffsetHeight(newHeader));\n\t\t\t}\n\t\t\t//store it in the array\n\t\t\ttheObject.Content.Headers.push(newHeader);\n\t\t}\n\t\t//loop through them all again\n\t\tfor (i = 0, c = aHeaders.length; i < c; i++)\n\t\t{\n\t\t\t//get this header\n\t\t\tvar header = theObject.Content.Headers[i];\n\t\t\t//force heights\n\t\t\theader.style.height = theObject.Content.Header_Height + modifier + \"px\";\n\t\t\t//update lineheight to vertically center the text\n\t\t\theader.style.lineHeight = header.style.height;\n\t\t\t//create the resize object\n\t\t\tvar sizer = header.appendChild(document.createElement(\"div\"));\n\t\t\t//set its styles\n\t\t\tsizer.style.cssText = \"position:absolute;top:0px;height:100%;right:0px;width:2px;cursor:col-resize;background:url('\" + __NEMESIS_EMPTY_BG + \"');\";\n\t\t\t//set our sizer data\n\t\t\tsizer.Sizer =\n\t\t\t\t{\n\t\t\t\t\tInterpreterObject: theObject,\n\t\t\t\t\tUIDObject: theObject.DataObject.Id,\n\t\t\t\t\tColumnPosition: i,\n\t\t\t\t\tHeader: header\n\t\t\t\t};\n\t\t\t//add dragging to it\n\t\t\tBrowser_AddEvent(sizer, __BROWSER_EVENT_MOUSEDOWN, ListView_Sizer_BeginDrag);\n\t\t}\n\t\t//correct header height\n\t\ttheObject.Content.Header_Panel.style.height = theObject.Content.Header_Height + \"px\";\n\t\t//memorise its width\n\t\ttheObject.Content.Header_Width = nLeft;\n\t}\n}", "function unfreezeHeader () {\r\n\tvar header = $('.ui-jqgrid-htable thead')\r\n\t$('.jqgfirstrow').height(0);\r\n\theader.css('max-width', '');\r\n\theader.css('position','relative');\r\n}", "function renderHeader() {\n\t\t\theader.render();\n\t\t\tif (header.el) {\n\t\t\t\telement.prepend(header.el);\n\t\t\t}\n\t\t}", "function initHeaderScroll(){\n if ( _document.find('.header-static').length == 0 ){\n _window.on('scroll', throttle(function() {\n var vScroll = _window.scrollTop();\n if (vScroll > 25) {\n $('.menu').addClass('menu_fixed');\n } else {\n $('.menu').removeClass('menu_fixed');\n }\n }, 25));\n\n }\n }", "isStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader\n }", "function fixedHeader() {\n\t\tif(!$(window).scrollTop() == 0) {\n\t\t\t$('.header').addClass('is-fixed');\n\t\t} else {\n\t\t\t$('.header').removeClass('is-fixed');\n\t\t}\n\t}", "function Header() {\n return (null);\n}", "function headerAfterScroll(){\n var sElement = $('.bottom-header'),\n sDistace = $('.top-header').height() + 50,\n sFromTop = $(window).scrollTop();\n\n if(sFromTop > sDistace) {\n sElement.addClass('scrolled');\n }\n else {\n sElement.removeClass('scrolled');\n }\n requestAnimationFrame(headerAfterScroll);\n }", "function sticky_header() {\n if ($('#header').hasClass('sticky_header')) {\n var currentPos = $(window).scrollTop(); // Transparent header is best viewed on revolution slider\n\n if ($('.wpb_revslider_element').length < 1) {\n var isAdmin = $('body').hasClass('admin-bar') ? 32 : 1;\n\n if (currentPos > stickyHeaderOriginPos - isAdmin) {\n stickyHeader.addClass('fixed');\n $('#header').css({\n 'padding-bottom': stickyHeaderHeight + 'px'\n });\n\n if ($('#header').hasClass('transparent_header')) {\n $('#header').addClass('scrolling');\n $('.logo_transparent_static').addClass('hidden').removeClass('visible');\n $('.logo_colored_fixed').addClass('visible').removeClass('hidden');\n }\n } else {\n stickyHeader.removeClass('fixed');\n $('#header').css({\n 'padding-bottom': 0\n });\n\n if ($('#header').hasClass('transparent_header')) {\n $('#header').removeClass('scrolling');\n $('.logo_transparent_static').addClass('visible').removeClass('hidden');\n $('.logo_colored_fixed').addClass('hidden').removeClass('visible');\n }\n }\n } else {\n /* When revolution slider == true and header == transparent */\n if ($('#header').hasClass('transparent_header')) {\n sliderHeight = $('.wpb_revslider_element').height();\n console.log(sliderHeight);\n\n if (currentPos > stickyHeaderOriginPos + sliderHeight - 200) {\n stickyHeader.addClass('fixed_invisible_top');\n } else {\n stickyHeader.removeClass('fixed_invisible_top');\n }\n\n if (currentPos > stickyHeaderOriginPos + sliderHeight - 45) {\n stickyHeader.addClass('fixed');\n $('#header').css({\n 'padding-bottom': stickyHeaderHeight + 'px'\n });\n\n if ($('#header').hasClass('transparent_header')) {\n $('#header').addClass('scrolling');\n $('.logo_transparent_static').addClass('hidden').removeClass('visible');\n $('.logo_colored_fixed').addClass('visible').removeClass('hidden');\n }\n } else {\n stickyHeader.removeClass('fixed');\n $('#header').css({\n 'padding-bottom': 0\n });\n\n if ($('#header').hasClass('transparent_header')) {\n $('#header').removeClass('scrolling');\n $('.logo_transparent_static').addClass('visible').removeClass('hidden');\n $('.logo_colored_fixed').addClass('hidden').removeClass('visible');\n }\n }\n } else {\n /* Rev slider == true header != transparent */\n if (currentPos > stickyHeaderOriginPos - 1) {\n stickyHeader.addClass('fixed');\n $('#header').css({\n 'padding-bottom': stickyHeaderHeight + 'px'\n });\n\n if ($('#header').hasClass('transparent_header')) {\n $('#header').addClass('scrolling');\n $('.logo_transparent_static').addClass('hidden').removeClass('visible');\n $('.logo_colored_fixed').addClass('visible').removeClass('hidden');\n }\n } else {\n stickyHeader.removeClass('fixed');\n $('#header').css({\n 'padding-bottom': 0\n });\n\n if ($('#header').hasClass('transparent_header')) {\n $('#header').removeClass('scrolling');\n $('.logo_transparent_static').addClass('visible').removeClass('hidden');\n $('.logo_colored_fixed').addClass('hidden').removeClass('visible');\n }\n }\n }\n }\n }\n }", "function pageHeaderTextEffect() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($('#page-header-bg .nectar-particles').length == 0 && $('#page-header-bg[data-text-effect=\"none\"]').length == 0 || \r\n\t\t\t\t\t$('.nectar-box-roll').length > 0 && $('#page-header-bg .nectar-particles').length == 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $selector = ($('.nectar-box-roll').length == 0) ? '#page-header-bg .span_6' : '.nectar-box-roll .overlaid-content .span_6';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$($selector).find('.wraped').each(function (i) {\r\n\t\t\t\t\t\t\t$(this).find('span').delay(i * 370).transition({\r\n\t\t\t\t\t\t\t\trotateX: '0',\r\n\t\t\t\t\t\t\t\t'opacity': 1,\r\n\t\t\t\t\t\t\t\ty: 0\r\n\t\t\t\t\t\t\t}, 400, 'easeOutQuad');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$($selector).find('.inner-wrap > *:not(.top-heading)').each(function (i) {\r\n\t\t\t\t\t\t\t\t$(this).delay(i * 370).transition({\r\n\t\t\t\t\t\t\t\t\trotateX: '0',\r\n\t\t\t\t\t\t\t\t\t'opacity': 1,\r\n\t\t\t\t\t\t\t\t\ty: 0\r\n\t\t\t\t\t\t\t\t}, 650, 'easeOutQuad');\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$('.scroll-down-wrap').removeClass('hidden');\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}, $($selector).find('.wraped').length * 370);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function collapseHeader() {\n /*\n * Scroll events can fire a lot. So only check the scrolling one time,\n * 200ms after the scroll.\n */\n $(window).scroll(function () {\n var timeout,\n // minimum pixels to scroll before collapsing the header\n minimumScroll = 50,\n // duration of the header collapse animation in milliseconds\n duration = 200;\n\n if (!timeout) {\n timeout = setTimeout(function () {\n clearTimeout(timeout);\n timeout = null;\n if ($(this).scrollTop() > minimumScroll) {\n // collapse the header\n $('.uspto-header-middle').hide(duration, function () { // smooth out the transition\n $('#global-header').addClass('collapse-header');\n });\n } else {\n // restore the header\n $('.uspto-header-middle').show(duration, function () { // smooth out the transition\n $('#global-header').removeClass('collapse-header');\n });\n } // if\n }, 200);\n } // if\n });\n } // collapseHeader()", "attachHeader () {\n this.header = idel(document.body, 'header')\n this.pokeNote = idel(document.body, 'pokeNote')\n this.tooltip = idel(document.body, 'tooltip')\n const pg = this.page = Doc.parsePage(this.header, [\n 'noteIndicator', 'noteBox', 'noteList', 'noteTemplate',\n 'marketsMenuEntry', 'walletsMenuEntry', 'noteMenuEntry', 'loader',\n 'profileMenuEntry', 'profileIndicator', 'profileBox', 'profileSignout'\n ])\n pg.noteIndicator.style.display = 'none'\n delete pg.noteTemplate.id\n pg.noteTemplate.remove()\n pg.loader.remove()\n pg.loader.style.backgroundColor = 'rgba(0, 0, 0, 0.5)'\n Doc.show(pg.loader)\n var hide = (el, e, f) => {\n if (!Doc.mouseInElement(e, el)) {\n el.style.display = 'none'\n unbind(document, f)\n }\n }\n const hideNotes = e => { hide(pg.noteBox, e, hideNotes) }\n const hideProfile = e => { hide(pg.profileBox, e, hideProfile) }\n\n bind(pg.noteMenuEntry, 'click', async e => {\n bind(document, 'click', hideNotes)\n pg.noteBox.style.display = 'block'\n pg.noteIndicator.style.display = 'none'\n const acks = []\n for (const note of this.notes) {\n if (!note.acked) {\n note.acked = true\n if (note.id && note.severity > ntfn.POKE) acks.push(note.id)\n }\n note.el.querySelector('div.note-time').textContent = Doc.timeSince(note.stamp)\n }\n this.storeNotes()\n if (acks.length) ws.request('acknotes', acks)\n })\n if (this.notes.length === 0) {\n pg.noteList.textContent = 'no notifications'\n }\n bind(pg.profileMenuEntry, 'click', async e => {\n bind(document, 'click', hideProfile)\n pg.profileBox.style.display = 'block'\n })\n bind(pg.profileSignout, 'click', async e => await this.signOut())\n }", "function hideHeader() {\r\n let scrollPos = $(window).scrollTop();\r\n let windowWidth = $(window).width();\r\n\r\n //Check Window Location and width\r\n if (scrollPos < 50 && windowWidth > 924) {\r\n //Hide Background\r\n $(\"#navContainer\").addClass(\"clBackground\");\r\n } else {\r\n //Add Background\r\n $(\"#navContainer\").removeClass(\"clBackground\");\r\n }\r\n}", "function preventHeaderBehaviors() {\n\tvar header = document.getElementById('header');\n\n\tif(window.innerWidth <= 640){\n\t\theader.className = 'small';\n\n\t}else if(window.innerWidth > 640){\n\t\theader.className='large';\n\t}\n\n}", "function headerFunctions() {\n\tuiLoop();\n}" ]
[ "0.73440796", "0.6939821", "0.6848647", "0.6740718", "0.67094404", "0.6666176", "0.6661954", "0.66477185", "0.6628086", "0.6621007", "0.6601639", "0.6601639", "0.65870315", "0.65706724", "0.6547743", "0.65205896", "0.6520242", "0.6499889", "0.64820725", "0.6475748", "0.6466319", "0.6466002", "0.64538", "0.6428443", "0.6417672", "0.64086974", "0.63990843", "0.6395574", "0.63786644", "0.63750505", "0.63716537", "0.63695884", "0.63564813", "0.6341131", "0.6339118", "0.6337938", "0.6329209", "0.63207185", "0.6316269", "0.6310652", "0.6305562", "0.6304276", "0.6298852", "0.6294005", "0.628742", "0.6283718", "0.62817997", "0.62798464", "0.6278061", "0.62680125", "0.6258936", "0.62558395", "0.62399906", "0.62388515", "0.6237941", "0.62190723", "0.6218761", "0.620727", "0.62060755", "0.6205769", "0.620548", "0.62001365", "0.6199258", "0.6191723", "0.61914927", "0.6185582", "0.6180454", "0.61792713", "0.6173672", "0.6167408", "0.61570275", "0.6152443", "0.61458933", "0.61406726", "0.6140532", "0.6133268", "0.61213213", "0.6119821", "0.6115539", "0.6113557", "0.611076", "0.6106297", "0.61047906", "0.6098125", "0.60952866", "0.60865635", "0.6084977", "0.6081959", "0.60783863", "0.60704863", "0.60676944", "0.60675746", "0.60568994", "0.60568774", "0.6050631", "0.60469216", "0.60468143", "0.6037695", "0.6030941", "0.6019941", "0.60192263" ]
0.0
-1
TOPBAR HIDE ON SCROLL
function handleTopbar() { if ($('#topbar').length && $(window).width() > 768 && !wrapper.hasClass('header-no-sticky')) { if ($('#header').hasClass('header-2')) { var header2Height = $('.header-2 .main-nav-wrapper').height(); var windowScrollTop = $(window).scrollTop(); if (windowScrollTop >= topbarHeight + header2Height) { $('.header-2 .main-nav-wrapper').css('position', 'fixed').css('width', '100%').css('top', 0); } else { $('.header-2 .main-nav-wrapper').attr('style', ''); } } else { if (scrollPos > 0 && scrollPos <= topbarHeight) { $('#topbar').css('margin-top', - scrollPos); $('#topbar').removeClass( 'topbar-out' ); //$('#main-navigation').css('top', 0); } else if (scrollPos > topbarHeight ) { if ( !$('#topbar').hasClass( 'topbar-out' ) ) { $('#topbar').addClass( 'topbar-out' ); $('#topbar').css('margin-top', - topbarHeight); } } else { $('#topbar').removeClass( 'topbar-out' ); $('#topbar').css('margin-top', 0); //$('#main-navigation').css('top', topbarHeight); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initTopBar(){\n\tvar header = jQuery('#header')\n\tvar animSpeed = 400;\n\tvar win = jQuery(window);\n\tjQuery('.top-bar').each(function(){\n\t\tvar bar = jQuery(this);\n\t\tbar.css({\n\t\t\ttop: -bar.outerHeight()\n\t\t}).hide();\n\t\twin.bind('scroll resize orientationchange load', function(){\n\t\t\tif(win.scrollTop() < header.height()) {\n\t\t\t\tbar.stop().animate({\n\t\t\t\t\ttop: -bar.outerHeight()\n\t\t\t\t}, {duration:animSpeed, complete: function(){\n\t\t\t\t\tbar.hide();\n\t\t\t\t}})\n\t\t\t}\n\t\t\telse bar.show().stop().animate({top: 0}, {duration:animSpeed});\n\t\t})\n\t})\n}", "function handleScroll() {\n var yPos = window.pageYOffset\n if (yPos>700) {\n setShowTopButton(true)\n } else {\n setShowTopButton(false)\n }\n }", "function scrollFunction_topBtn() {\r\n if (\r\n document.body.scrollTop > 20 ||\r\n document.documentElement.scrollTop > 20\r\n ) {\r\n toTopBtn.style.display = \"block\";\r\n } else {\r\n toTopBtn.style.display = \"none\";\r\n }\r\n }", "function hideToTop() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop < 350 || $offCanvasEl.is('.fullscreen.open') ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tvar $animationTiming = ($('#slide-out-widget-area.fullscreen.open').length > 0) ? 1150 : 350;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#to-top').stop().transition({\r\n\t\t\t\t\t\t\t'bottom': '-30px'\r\n\t\t\t\t\t\t}, $animationTiming, 'easeInOutQuint');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll', hideToTop);\r\n\t\t\t\t\t\t$window.on('scroll', showToTop);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function scrollFunction() {\n if (window.innerHeight < 144 || document.documentElement.scrollTop < 144) {\n document.getElementById(\"navbar\").style.top = \"144px\";\n console.log(window.scrollY)\n empo.style.display=\"none\"\n } else {\n document.getElementById(\"navbar\").style.top = \"0px\";\n console.log(window.scrollY)\n empo.style.display=\"initial\"\n\n }\n }", "function showDivTop() {\r\n if (window.scrollY >= 300) {\r\n divTop.classList.add('visible');\r\n } else {\r\n divTop.classList.remove('visible');\r\n }\r\n }", "function scrollTopButtonHide() {\n\t\tif ($(window).width() < 1500) {\n\n\t\t\t$(window).on('scroll', function() {\n\t\t\t\tif ($(this).scrollTop() > 100) {\n\t\t\t\t\t$('.js-scroll-top-button').addClass('-show');\n\t\t\t\t} else {\n\t\t\t\t\t$('.js-scroll-top-button').removeClass('-show');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif ($(document).scrollTop() > 100) {\n\t\t\t\t$('.js-scroll-top-button').addClass('-show');\n\t\t\t}\n\n\t\t}\n\t}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n topBtn.style.display = \"block\";\n } else {\n topBtn.style.display = \"none\";\n }\n}", "function hideMobileBar(){\n\t\t\t$(menu).show(0);\n\t\t\t$(showHideButton).hide(0);\n\t\t}", "function hideMobileBar(){\n\t\t\t$(menu).show(0);\n\t\t\t$(showHideButton).hide(0);\n\t\t}", "function gestoreScroll() {\r\n if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {\r\n nodoPulsTop.style.display = \"block\";\r\n } else {\r\n nodoPulsTop.style.display = \"none\";\r\n }\r\n}", "function hideStickyMegaBar() {\n $(\".header-mega-menu .mega-menu-lg-container\").removeClass('sticky-show');\n $(\".lg-down-header .mega-menu-lg-down-container\").removeClass('sticky-show');\n $(\".header .lg-navbar .login-button\").removeClass(\"d-none\").addClass(\"d-block\");\n $(\".header-mega-menu .login-button-sticky\").removeClass(\"d-block\").addClass(\"d-none\");\n $(\".sticky-navbar\").removeClass(\"login-button-sticky-block\").addClass(\"login-button-sticky-none\");\n addTop0AtCompareTable();\n }", "function head () {\n\t\t\n\t\tif (clientWidth < 800) {\n\n\t\t\tif ($(this).scrollTop() > 100) \n\t\t\t\t$logoBar.css('display', 'none');\n\t\t\telse\n\t\t\t\t$logoBar.css('display', 'block');\n\n\t\t} else {\n\n\t\t\t$logoBar.css('display', 'block');\n\t\t}\n\t}", "moveTopAppBar_() {\n if (this.checkForUpdate_()) {\n // Once the top app bar is fully hidden we use the max potential top app bar height as our offset\n // so the top app bar doesn't show if the window resizes and the new height > the old height.\n let offset = this.currentAppBarOffsetTop_;\n if (Math.abs(offset) >= this.topAppBarHeight_) {\n offset = -numbers$6.MAX_TOP_APP_BAR_HEIGHT;\n }\n\n this.adapter_.setStyle('top', offset + 'px');\n }\n }", "function showToTop() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (nectarDOMInfo.scrollTop > 350 && !$offCanvasEl.is('.fullscreen.open') ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('#to-top').stop().transition({\r\n\t\t\t\t\t\t\t'bottom': '17px'\r\n\t\t\t\t\t\t}, 350, 'easeInOutCubic');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$window.off('scroll', showToTop);\r\n\t\t\t\t\t\t$window.on('scroll', hideToTop);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}", "function hideScrollElem(){\n\t$('.dragger_container').hide(0)\n\t$(\".scrollUpBtn\").hide(0)\n\t$(\".scrollDownBtn\").hide(0)\n}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n myTopButton.style.display = \"block\";\n } else {\n myTopButton.style.display = \"none\";\n }\n}", "function setScroll(){\n $(window).scroll(function(event){\n if($(window).scrollTop()>20){\n topbtn.style.display ='block';\n }\n else{\n topbtn.style.display='none';\n } \n });\n}", "function scrollFunction() {\n if (document.documentElement.scrollTop > 20) {\n topButton.style.display = 'block';\n } else {\n topButton.style.display = 'none';\n }\n}", "toggleBackToTopButtonVisibility() {\n if (this._toTopOfPageButton) {\n if (window.scrollY > 100) {\n this._toTopOfPageButton.style.display = \"block\";\n } else {\n this._toTopOfPageButton.style.display = \"none\";\n }\n }\n }", "function fixedTopBar() {\n\n 'use strict';\n\n var offset,\n $navbar = $( '.navbar' );\n\n $( window ).on( 'scroll.happytodesign', function() {\n offset = $navbar.offset().top;\n if ( offset > 10 ) {\n if ( $navbar.attr( 'data-scrolling' ) !== 'true' ) {\n $navbar.attr( 'data-scrolling', 'true' );\n }\n }\n else {\n $navbar.attr( 'data-scrolling', 'false' );\n }\n } ).trigger( 'scroll.happytodesign' );\n}", "function pageScroll() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"topPageBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"topPageBtn\").style.display = \"none\";\n }\n}", "function manageTopPosition()\n {\n var scrollHeight = $(window).scrollTop();\n\n if(scrollHeight > 50 && !tucked)\n {\n tucked = true;\n $(\"#top\").css({\"top\": determineTopHeight() + \"px\", \"position\": \"fixed\"});\n $(\"#nav-bar\").toggleClass(\"tucked\");\n $(\"#nav-bar > .link > div:first\").removeClass(\"hovered\");\n }\n else if (scrollHeight <= 50 && tucked)\n {\n tucked = false;\n $(\"#top\").css({\"top\": \"0\", \"position\": \"absolute\"});\n $(\"#name\").css(\"display\", \"flex\");\n $(\"#nav-bar\").toggleClass(\"tucked\");\n resetNavbar();\n $(\"#nav-bar > .link:first > div:first\").addClass(\"hovered\");\n }\n }", "function showScroll() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"backToTopBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"backToTopBtn\").style.display = \"none\";\n }\n}", "function removeTopBar() {\n // Get the iframe\n var iframe = document.querySelector(\"#\" + yankeemallIframeId);\n iframe.parentNode.removeChild(iframe);\n}", "function showTopButton() {\n if (document.getElementById(\"myNav\").scrollTop > 20) {\n document.getElementById(\"top-btn\").style.display = \"block\";\n } else {\n document.getElementById(\"top-btn\").style.display = \"none\";\n }\n}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"topButton\").style.display = \"block\";\n } else {\n document.getElementById(\"topButton\").style.display = \"none\";\n }\n}", "function floatingTopButtonToolbarToggle()\n{\n toolbarToggle.updateForScroll();\n}", "function initToolbar() {\n\t\taddEvent(window, \"scroll\", function() {\n\t\t\tvar toolbar = document.getElementById(\"toolbar\");\n\t\t\tvar tcontainer = document.getElementById(\"toolbar-container\");\n\t\t\tif (tcontainer.getBoundingClientRect().top<=0) {\n\t\t\t\ttoolbar.style.position = \"fixed\"; toolbar.style.top = 0;\n\t\t\t} else \n\t\t\t\ttoolbar.style.position = \"relative\";\n\t\t})\n\t}", "function showScrolltop () {\n var scrollPosition = $(document).scrollTop();\n if (scrollPosition > 50) {\n scrolltop.fadeIn(300);\n }\n else {\n scrolltop.fadeOut(300);\n }\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n removeActiveNav();\n removeActiveSection();\n}", "function showScrollTopBtn() {\n if ($(window).scrollTop() > 1500 ) {\n $(goTopBtn).show();\n\n } else {\n $(goTopBtn).hide();\n }\n}", "function scrollFunction() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n backtoTop.style.display = \"block\";\n } else {\n backtoTop.style.display = \"none\";\n }\n}", "function hideURLbar() {\t\r\n\twindow.scrollTo(0, 1);\r\n}", "backToTopBtn() {\n if (window.scrollY >= 1000) {\n this.show.backToTop = false\n } else {\n this.show.backToTop = true\n }\n }", "function headerTopHandler(headerTop) {\n if (window.scrollY > 100) {\n headerTop.classList.add('hide');\n }\n else {\n headerTop.classList.remove('hide');\n }\n}", "function offSetManager() {\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if (yOffset < currYOffSet) {\n myNavBar.add();\n } else if (currYOffSet == yOffset) {\n myNavBar.remove();\n }\n }", "function scrollFunction() {\n if (document.body.scrollTop > 10 || document.documentElement.scrollTop > 10) {\n topbutton.style.display = \"block\";\n } else {\n topbutton.style.display = \"none\";\n }\n}", "hideBottomTabBar() {\n $('#nav-tabbar').addClass('hidden-xs');\n $(this.get('disableBottomClassSelector')).addClass('bottom-nav-disabled');\n this.get('eventBus').publish('fixedItemsShift');\n this.set('bottomTabBarIsShowing',false);\n $('#nav-body-inner').addClass('full-body');\n this.updateSidebarScrollerHeight();\n }", "function showScroll() {\r\n var scroll = $(window).scrollTop();\r\n var height = $(window).height();\r\n\r\n if (scroll > height) {\r\n $('#scroll_to_top').show();\r\n } else {\r\n $('#scroll_to_top').hide();\r\n }\r\n }", "function followingBar() {\n // $(window).unbind('scroll');\n // console.log($._data( $(window)[0], \"events\" ));\n $(window).scroll(function() {\n var isFullscreen = $editor.hasClass('fullscreen');\n\n if (isFullscreen) {\n // console.log(\"fullscreen\");\n return false;\n }\n\n var toolbar = $editor.children('.note-toolbar');\n var toolbarHeight = toolbar.outerHeight();\n var editable = $editor.children('.note-editable');\n var editableHeight = editable.outerHeight();\n var editorWidth = $editor.width;\n var toolbarOffset, editorOffsetTop, editorOffsetBottom;\n var activateOffset, deactivateOffsetTop, deactivateOffsetBottom;\n var currentOffset;\n var relativeOffset;\n var otherBarHeight;\n\n // check if the web app is currently using another static bar\n otherBarHeight = $(\".\" + options.otherStaticBarClass).outerHeight();\n if (!otherBarHeight) otherBarHeight = 0;\n //console.log(otherBarHeight);\n\n currentOffset = $(document).scrollTop()+$('nav.nav-extended').height();\n toolbarOffset = toolbar.offset().top+$('nav.nav-extended').height();\n editorOffsetTop = $editor.offset().top;\n editorOffsetBottom = editorOffsetTop + editableHeight;\n activateOffset = toolbarOffset - otherBarHeight;\n deactivateOffsetBottom = editorOffsetBottom - otherBarHeight;\n deactivateOffsetTop = editorOffsetTop - otherBarHeight;\n\n if ((currentOffset > activateOffset) && (currentOffset < deactivateOffsetBottom)) {\n relativeOffset = currentOffset - $editor.offset().top + otherBarHeight;\n toolbar.css({'top': relativeOffset + 'px', 'z-index': 990});\n } else {\n if ((currentOffset < toolbarOffset) && (currentOffset < deactivateOffsetBottom)) {\n toolbar.css({'top': 0, 'z-index': 990});\n\n if (currentOffset > deactivateOffsetTop) {\n relativeOffset = currentOffset - $editor.offset().top + otherBarHeight;\n toolbar.css({'top': relativeOffset + 'px', 'z-index': 990});\n }\n }\n }\n });\n }", "function back_to_top(){\n var scrollTop = $(window).scrollTop();\n var offset = 500;\n if (scrollTop < offset) {\n $('.evision-back-to-top').hide();\n } else {\n $('.evision-back-to-top').show();\n }\n }", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n }", "topAppBarScrollHandler_() {\n const currentScrollPosition = Math.max(this.adapter_.getViewportScrollY(), 0);\n const diff = currentScrollPosition - this.lastScrollPosition_;\n this.lastScrollPosition_ = currentScrollPosition;\n\n // If the window is being resized the lastScrollPosition_ needs to be updated but the\n // current scroll of the top app bar should stay in the same position.\n if (!this.isCurrentlyBeingResized_) {\n this.currentAppBarOffsetTop_ -= diff;\n\n if (this.currentAppBarOffsetTop_ > 0) {\n this.currentAppBarOffsetTop_ = 0;\n } else if (Math.abs(this.currentAppBarOffsetTop_) > this.topAppBarHeight_) {\n this.currentAppBarOffsetTop_ = -this.topAppBarHeight_;\n }\n\n this.moveTopAppBar_();\n }\n }", "function offSetManager() {\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if (yOffset < currYOffSet) {\n myNavBar.add();\n } else if (currYOffSet == yOffset) {\n myNavBar.remove();\n }\n }", "function show_button() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n document.getElementById(\"btn-top\").style.display = \"block\";\n } else {\n document.getElementById(\"btn-top\").style.display = \"none\";\n }\n}", "function hideElementsOnScroll() {\n hideHeaderOnScroll();\n hideAllDropdownContents();\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n }", "function offSetManager(){\n \n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n \n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n \n }", "function offSetManager(){\n \n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n \n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n \n }", "function topFunction() {\n\n shouldShow = false;\n document.getElementById(\"myBtn\").style.display = \"none\";\n\n interval = setInterval(scroll, 50);\n\n}", "function toTop() {\n document.body.scrollTop= 0;\n hideButton();\n}", "function getScrollToTopBtn() {\n\n if ($(window).scrollTop() > $('.head-section').height() ) {\n\n $('.scroll-to-top').fadeIn();\n\n } else {\n\n $('.scroll-to-top').fadeOut();\n\n }\n\n }", "function backToTopVisibility() {\n\tif (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200)\n\t\tdocument.getElementById(\"back-to-top\").style.display = \"block\";\n\telse document.getElementById(\"back-to-top\").style.display = \"none\";\n} // backToTopVisibility", "function goTop(){\n\tvar goTop = $('#goTop');\n\tvar apply = $('.bottom-btn');\n\tgoTop.hide();\n\tapply.hide();\n\n\t$(window).on('scroll', function() {\n\t\tvar scroll_top = getScrollTop();\n\t\tif(scroll_top > 50){\n\t\t\tapply.show();\n\t\t} else{\n\t\t\tapply.hide();\n\t\t}\n\t\tif(scroll_top >= winH*2){\n\t\t\tgoTop.show();\n\t\t}else{\n\t\t\tgoTop.hide();\n\t\t}\n\t});\n\tgoTop.on('click', function(){\n\t\tdocument.body.scrollTop = 0;\n\t});\n}", "function showBackToTopButton(){\n if( $(window).scrollTop() >= backToTopFadeinPosition){\n backtoTop.css({'display':'inline-block'});\n }else{\n backtoTop.css({'display':'none'});\n }\n //console.log('Window Position = ' + $(window).scrollTop()); \n }", "function hideBar() {\n if( ( navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i) ) ) {\n if(window.addEventListener){\n window.addEventListener(\"load\",function() {\n // Set a timeout...\n setTimeout(function(){\n // Hide the address bar!\n window.scrollTo(0, 1);\n }, 0);\n });\n }\n }\n}", "function handleScroll() {\n if (window.pageYOffset === 0) {\n setTop(true)\n }\n setTop(undefined)\n }", "function topBarToggle () {\n var model = modelConnect();\n var topBarToggleAPI = \"toggleTopBar()\";\n model.postMessage(topBarToggleAPI,\"*\");\n}", "function topFct(){\r\n window.scrollTo(0, 0);\r\n }", "function silentScroll(top){\n if(options.scrollBar){\n container.scrollTop(top);\n }\n else if (options.css3) {\n var translate3d = 'translate3d(0px, -' + top + 'px, 0px)';\n transformContainer(translate3d, false);\n }\n else {\n container.css('top', -top);\n }\n }", "function moveIt() {\n const appDiv = document.querySelector(\".App\");\n let top = appDiv.getBoundingClientRect().top;\n // Setting up the classNames of bars depending on the scroll position\n\n setBar1Container(\n top <= 0 && top >= (infoBarHeight * 0.5 + navBarHeight) * -1\n ? \"showInfoContainer\"\n : \"hideInfoContainer\"\n );\n\n setBar2Container(\n top <= (infoBarHeight * 0.5 + navBarHeight) * -1 &&\n top >= (infoBarHeight * 1.5 + navBarHeight) * -1\n ? \"showInfoContainer\"\n : \"hideInfoContainer\"\n );\n\n setBar3Container(\n top <= (infoBarHeight * 1.5 + navBarHeight) * -1 &&\n top >= (infoBarHeight * 2.5 + navBarHeight) * -1\n ? \"showInfoContainer\"\n : \"hideInfoContainer\"\n );\n }", "function headerHide() {\n if ( window.scrollY < 80 ) {\n document.querySelector('#header-cont').classList.remove('header-hide');\n } else {\n document.querySelector('#header-cont').classList.add('header-hide');\n }\n return;\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function showBackTop() {\n window.addEventListener('scroll', function () {\n if(this.scrollY > 400) {\n backTop.style.display = 'block';\n backTop.addEventListener('click', () => {\n this.scrollTo({\n top: 0,\n left: 0,\n behavior: \"smooth\"\n });\n })\n } else {\n backTop.style.display = 'none';\n }\n })\n}", "function checkGoTopArraw() {\n if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {\n document.getElementById(\"myBtn\").style.display = \"block\";\n } else {\n document.getElementById(\"myBtn\").style.display = \"none\";\n }\n }", "function toTop(){\n\tif (window.pageYOffset >= bottomPage){\n\t\ttoTopButton.style.display = 'inline';\n\t} else {\n\t\ttoTopButton.style.display = 'none';\n\t}\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function toggleTop() {\n setTopActive(!topActive);\n }", "function topFunction() {\n document.body.scrollTop = 0\n document.documentElement.scrollTop = 0\n }", "function titleBar()\n{\n\tif(channel == \"tablet\"|| channel == \"desktopweb\")\n\t\tfrmTitlebarOptions.show();\n\telse\n\t\tfrmTtlbarOptions.show();\n}", "function fixed_topbar(){\n d_top = $(document).scrollTop();\n if(d_top*2 > w_height){\n $(\".home__nav\").addClass(\"fixed\");\n }else{\n $(\".home__nav\").removeClass(\"fixed\");\n }\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function showTopBtn() {\n var documentHeight = $(document).height()\n var scrollTop = $(window).scrollTop()\n var windowHeight = $(window).height()\n var scrollPercent = Math.round(scrollTop / (documentHeight - windowHeight) * 100)\n if (scrollPercent > 25) {\n $(topBtn).fadeIn(200);\n } else {\n $(topBtn).fadeOut(200);\n\n }\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function offSetManager(){\n\n var yOffset = 0;\n var currYOffSet = window.pageYOffset;\n\n if(yOffset < currYOffSet) {\n myNavBar.add();\n }\n else if(currYOffSet == yOffset){\n myNavBar.remove();\n }\n\n}", "function topFunction() {\n document.body.scrollTop = 0;\n document.documentElement.scrollTop = 0;\n }", "function checkSize(){\n\t if ($(window).width() > 480) {\n\t \t// $(\"html, body\").animate({ scrollTop: 0 });\t\t\t\t \n\t } else { \n\t $(\"html, body\").animate({scrollTop:$('.widget-bar').offset().top - 150}, 'slow'); \n\t }\n\t}", "function topFunction() {\r\n document.body.scrollTop = 0;\r\n document.documentElement.scrollTop = 0;\r\n }", "hideInfobar() {\n clearInterval(this.flag);\n clearInterval(this.flag1);\n this.visible = false;\n }", "function defile () {\n var scrollTop = window.pageYOffset;\n if (scrollTop > 50) {\n document.getElementById(\"retour\").className = \"visible\";\n document.getElementById(\"top_head\").style.height = \"50px\";\n $(\"#logo img\").css({'height': '50px'});\n $(\"#nav_mobile\").css({'top':'45px'});\n\n } else {\n document.getElementById(\"retour\").className = \"invisible\";\n document.getElementById(\"top_head\").style.height = \"100px\";\n $(\"#logo img\").css({'height': '80px'});\n $(\"#nav_mobile\").css({'top':'95px'});\n }\n}", "function topFunction() {\r\n\t\t\tdocument.body.scrollTop = 0;\r\n\t\t\tdocument.documentElement.scrollTop = 0;\r\n\t\t}", "function topFunction() {\n\t\t\tdocument.body.scrollTop = 0;\n\t\t\tdocument.documentElement.scrollTop = 0;\n\n\t\t}", "function topFunction() {\n\t\t\tdocument.body.scrollTop = 0; // For Chrome, Safari and Opera \n\t\t\t\tdocument.documentElement.scrollTop = 0; // For IE and Firefox\n\t\t}", "function topFunction(){$('html, body').animate({scrollTop: 0}, 800);}", "function hideHamburgerOnScroll() {\n if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {\n dropdownItems.classList.remove(\"show-hamburger-menu\");\n } \n}", "function topFunction() {\n document.body.scrollTo(0, 3000);\n document.documentElement.scrollTo(0, 3000);\n }", "function topFunction() {\n document.body.scrollTop = 0;\n}", "function BackToTop() {\r\n\t\t\r\n\t\t$('.scrolltotop').on('click', function() {\r\n\t\t\t$('html, body').animate({scrollTop : 0},800);\r\n\t\t\treturn false;\r\n\t\t});\r\n\t\t\r\n\t\t$(window).scroll(function() { \r\n\t\t\tvar scroll = $(window).scrollTop();\r\n\t\t\r\n\t\t\tif (scroll >= 300) {\r\n\t\t\t\t\r\n\t\t\t\t$(\".scrolltotop\").addClass('page-up').removeClass('no-tooltip');\r\n\t\t\t\t$(\"#page-action-holder-right\").removeClass('no-tooltip');\r\n\t\t\t\t\r\n\t\t\t} else {\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$(\".scrolltotop\").removeClass('page-up').addClass('no-tooltip');\r\n\t\t\t\t$(\"#page-action-holder-right\").addClass('no-tooltip');\r\n\t\t\t}\r\n\t\t});\r\n\t\r\n\t}", "function hideHeader() {\r\n let scrollPos = $(window).scrollTop();\r\n let windowWidth = $(window).width();\r\n\r\n //Check Window Location and width\r\n if (scrollPos < 50 && windowWidth > 924) {\r\n //Hide Background\r\n $(\"#navContainer\").addClass(\"clBackground\");\r\n } else {\r\n //Add Background\r\n $(\"#navContainer\").removeClass(\"clBackground\");\r\n }\r\n}", "function headerScroll () {\n let Y = document.documentElement.scrollTop || document.body.scrollTop;\n if (Y > 596) {\n header.classList.add('header-scrolled-view')\n scrollToTopButton.classList.add('show-toTop-btn');\n scrollToTopButton.style.display = 'block';\n }\n else {\n header.classList.remove(\"header-scrolled-view\");\n scrollToTopButton.classList.remove(\"show-toTop-btn\");\n scrollToTopButton.style.display = \"none\";\n }\n }", "function handleScrolling() {\n\tlet scrolled = root.scrollHeight - root.clientHeight;\n\tif((root.scrollTop / scrolled) > 0.95 ) {\n\t\tbtnToTop.style.display = 'block';\n\t} else {\n\t\tbtnToTop.style.display = 'none';\n\t};\n}" ]
[ "0.71608293", "0.68470377", "0.67728347", "0.67573625", "0.66268724", "0.66119576", "0.6596977", "0.6503522", "0.65002173", "0.65002173", "0.6441368", "0.64310133", "0.64081085", "0.640179", "0.64012665", "0.63919926", "0.6389622", "0.63764936", "0.6369483", "0.63693047", "0.63582116", "0.6350021", "0.6348618", "0.6348418", "0.6347253", "0.6329822", "0.631909", "0.6312766", "0.6307066", "0.62842405", "0.6272757", "0.6271778", "0.6270266", "0.6267913", "0.625063", "0.6249963", "0.624237", "0.6236541", "0.62316465", "0.6221195", "0.6219119", "0.621562", "0.61915946", "0.6188039", "0.6187266", "0.6183643", "0.61759466", "0.6158877", "0.6147662", "0.6147662", "0.6130894", "0.61124754", "0.60983396", "0.6085127", "0.60824305", "0.60797596", "0.6079024", "0.6072988", "0.60653687", "0.60591584", "0.60499424", "0.60261804", "0.6019816", "0.6018684", "0.6018585", "0.60181016", "0.60088927", "0.60072005", "0.59965634", "0.59934574", "0.599039", "0.59880793", "0.5984559", "0.5984559", "0.5984559", "0.5984559", "0.5984559", "0.59812564", "0.5976391", "0.5972346", "0.5972346", "0.59670913", "0.59670913", "0.59670913", "0.5967057", "0.5964226", "0.5956611", "0.59482276", "0.59446317", "0.59445566", "0.5943642", "0.5943201", "0.5935974", "0.5932229", "0.59253675", "0.5924883", "0.5919033", "0.5917174", "0.5916667", "0.5914993" ]
0.60453784
61
Page Title Vertical Align
function pageTitle(){ if ( $(window).width() >= 1000 && pageTitleResized == false ) { $('#ins-page-title').each(function() { var marginTop = 55; var extra = 0; var titleInner = $(this).find( '.ins-page-title-inner' ); var titleInnerHeight = titleInner.height(); if( $('#header').length ) { extra = 80 / 2; } if( $('#topbar').length ) { extra += $('#topbar').height() / 2; } if( $('.bottom-nav-wrapper').length ) { extra += $('.bottom-nav-wrapper').height() / 2; } marginTop = extra; $(this).find( '.ins-page-title-inner' ).css( 'margin-top', marginTop ); pageTitleResized = true; }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fTitlePlacement (elem, ht, vPos) {\n fAnimateHeight (elem, ht);\n fAnimateTop (elem, vPos);\n }", "function fTitlePlacement (elem, ht, vPos) {\n fAnimateHeight (elem, ht);\n fAnimateTop (elem, vPos);\n }", "function getPageTitle () {\n return title;\n }", "function createTitlePages() {\n let titleInfo = [\n { num:'1', title:'General Provisions' },\n { num:'2', title:'Elections'},\n { num:'3', title:'Legislature'},\n { num:'4', title:'State Organization and Administration, Generally'},\n { num:'5', title:'State Financial Administration'},\n { num:'6', title:'County Organization and Administration'},\n { num:'7', title:'Public Officers and Employees'},\n { num:'8', title:'Public Proceedings and Records'},\n { num:'9', title:'Public Property, Purchasing and Contracting'},\n { num:'10', title:'Public Safety and Internal Security'},\n { num:'11', title:'Agriculture and Animals'},\n { num:'12', title:'Conservation and Resources'},\n { num:'13', title:'Planning and Economic Development'},\n { num:'14', title:'Taxation'},\n { num:'15', title:'Transportation and Utilities'},\n { num:'16', title:'Intoxicating Liquor'},\n { num:'17', title:'Motor and Other Vehicles'},\n { num:'18', title:'Education'},\n { num:'19', title:'Health'},\n { num:'20', title:'Social Services'},\n { num:'21', title:'Labor and Industrial Relations'},\n { num:'22', title:'Banks and Financial Institutions'},\n { num:'23', title:'Corporations and Partnerships'},\n { num:'23a', title:'Other Business Entities'},\n { num:'24', title:'Insurance'},\n { num:'25', title:'Professions and Occupations'},\n { num:'25a', title:'General Business Provisions'},\n { num:'26', title:'Trade Regulation and Practice'},\n { num:'27', title:'Uniform Commercial Code'},\n { num:'28', title:'Property'},\n { num:'29', title:'Decedents\\' Estates'},\n { num:'30', title:'Guardians and Trustees'},\n { num:'30a', title:'Uniform Probate Code'},\n { num:'31', title:'Family'},\n { num:'32', title:'Courts and Court Officers'},\n { num:'33', title:'Evidence'},\n { num:'34', title:'Pleadings and Procedure'},\n { num:'35', title:'Appeal and Error'},\n { num:'36', title:'Civil Remedies and Defenses and Special Proceedings'},\n { num:'37', title:'Hawaii Penal Code'},\n { num:'38', title:'Procedural and Supplementary Provisions'}\n ];\n\n let re = new RegExp(/^([0-9]+)/i);\n\n let allPromises = [];\n\n //loop thru titles\n for (let i=0; i<titleInfo.length; i++) {\n\n let division = '';\n let volume = '';\n\n let r = titleInfo[i].num.match(re);\n let titleNumOnly = parseInt(r[1]);\n \n if (titleNumOnly < 22) division = '1';\n else if (titleNumOnly < 28) division = '2';\n else if (titleNumOnly < 32) division = '3';\n else if (titleNumOnly < 37) division = '4';\n else division = '5';\n\n if (titleNumOnly < 6) volume = '1';\n else if (titleNumOnly < 10) volume = '2';\n else if (titleNumOnly < 13) volume = '3';\n else if (titleNumOnly < 15) volume = '4';\n else if (titleNumOnly < 19) volume = '5';\n else if (titleNumOnly < 20) volume = '6';\n else if (titleNumOnly < 22) volume = '7';\n else if (titleNumOnly < 24) volume = '8';\n else if (titleNumOnly < 25) volume = '9';\n else if (titleNumOnly < 26) volume = '10';\n else if (titleNumOnly < 27) volume = '11';\n else if (titleNumOnly < 32) volume = '12';\n else if (titleNumOnly < 37) volume = '13';\n else volume = '14';\n\n // Create meta\n let meta = {\n hrs_structure: {\n division: division,\n volume: volume,\n title: titleInfo[i].num,\n chapter: '',\n section: ''\n },\n type: 'title',\n menu: {\n hrs: {\n identifier: `title${titleInfo[i].num}`,\n name: `Title ${titleInfo[i].num}. ${titleInfo[i].title}`\n }\n },\n weight: (5 * (i + 1)),\n title: titleInfo[i].title,\n full_title: `Title ${titleInfo[i].num}. ${titleInfo[i].title}`\n };\n let allMeta = Object.assign({}, meta, addCustomMetaAllFiles);\n\n //write file\n let path = Path.join(destFileDir, `title-${titleInfo[i].num}`, '_index.md');\n allPromises.push(writeFile(path, \"---\\n\" + yaml.safeDump(allMeta) + \"---\\n\"));\n \n } \n\n return Promise.all(allPromises).then((val)=>val);\n}", "function updatePageTitle() {\n $rootScope.page_title = Mayocat.applicationName + ' | ' + $translate('routes.title.' + $route.current.titleTranslation);\n }", "function titlePage(){\n\t\t$('.title-page').html('<h2 class=\"text-center\">'+objet_concours[last_concours]+'</h2>');\n\t}", "getFormattedTitle() {\n return this.info.title.toUpperCase();\n }", "function showTitle(title, selection, plotWidth, chartMargin, titleMargin) {\n var center = chartMargin.left + plotWidth/2,\n textHeight = 10,\n titleTop = titleMargin[1] + textHeight,\n attachedTitle = attachByClass(\"text\", selection, \"title\"); \n\n attachedTitle.entered()\n .attr(\"class\", \"title\")\n .attr(\"text-anchor\", \"middle\");\n\n attachedTitle\n .attr(\"transform\", \"translate(\" + center + \",\" + titleTop +\")\")\n .text(title);\n }", "function title() {\n\n push();\n imageMode(CORNER);\n image(titleImage,0,0,windowWidth,windowHeight);\n textFont(\"Times New Roman\");\n textSize(40);\n text(\"THE CODED \\nMULTIDISCIPLINARY GALLERY\",width*0.56,height*0.3);\n textSize(20);\n fill(0);\n text(\"Huyen Tran Pham\",width*0.56,height*0.6);\n text(\"Click to move around in the gallery\",width*0.56,height*0.65);\n pop();\n\n}", "function setPageTitle() {\n const titleHTML = document.getElementById('title');\n titleHTML.innerText = pageTitle;\n}", "function initTitle() {\n if (Vue.prototype.hasOwnProperty('$createTitle')) {\n return;\n }\n\n /**\n * Generates the document title out of the given VueComponent and parameters\n *\n * @param {String} [identifier = null]\n * @param {...String} additionalParams\n * @returns {string}\n */\n Vue.prototype.$createTitle = function createTitle(identifier = null, ...additionalParams) {\n const baseTitle = this.$tc('global.sw-admin-menu.textShopwareAdmin');\n const pageTitle = this.$tc(this.$route.meta.$module.title);\n\n const params = [baseTitle, pageTitle, identifier, ...additionalParams].filter((item) => {\n return item !== null && item.trim() !== '';\n });\n\n return params.reverse().join(' | ');\n };\n }", "function pageTitle($rootScope, $timeout) {\n return {\n // link: function(scope, element) {\n // var listener = function(event, toState, toParams, fromState, fromParams) {\n // var themeSettings = localStorageService.get('themeSettings');\n // // Default title\n // if(themeSettings == null || typeof(themeSettings) == \"undefined\") {\n // headerTitle = \"Panda\";\n // } else {\n // headerTitle = themeSettings.data.headerTitle;\n // }\n //\n // if(themeSettings.data.headerTitle == null) {\n // themeSettings.data.headerTitle = \"Panda\";\n // }\n //\n // var title = headerTitle;\n // // Create your own title pattern\n // if (toState.data && toState.data.pageTitle) title = 'Panda | ' + toState.data.pageTitle;\n // $timeout(function() {\n // // element.text(title);\n // });\n // };\n // $rootScope.$on('$stateChangeStart', listener);\n }\n}", "function setPageTitle() {\n const title = document.getElementById('title');\n title.innerText = pageTitle;\n}", "function setPageTitle() {\n const title = document.getElementById('title');\n title.innerText = pageTitle;\n}", "function titleText(title) {\n pageTitle.textContent = title;\n}", "function getPageTitle($location) {\n var name = $location.path().split(\"/\").slice(-1)[0].split(\".\")[0];\n var words = name.split('_');\n var title = '';\n for (var i = 0; i < words.length; i++) {\n title += ' ' + words[i].charAt(0).toUpperCase() + words[i].substr(1);\n }\n return title.substr(1);\n}", "function titleize() {\n\n}", "async getTitlePage() {\n const pageTitle = await this.page.title();\n console.log('\\t HomePage Title =', pageTitle);\n assert.strictEqual(pageTitle, \"Home loan borrowing power calculator | ANZ\");\n console.log('\\t Home Page title validation successful \\t \\n \\t Browser is open \\t');\n }", "function getPageTitle(url) {\n return path.basename(url);\n}", "function setPageTitle (newTitle) {\n title = newTitle;\n }", "function getTitle() {\n return chalk.blue(\n figlet.textSync(\"Weather app\", {\n horizontalLayout: \"full\",\n font: \"banner\",\n })\n );\n}", "function setTitle() {\n var dateString = dateFormat(new Date(), 'HH:MM:ss');\n document.title = title + ' - ' + APP_PACKAGE_INFO.version;\n }", "function setPageTitle(){\n\tif(pmgConfig.pmgSubTitle){\n\t\tdocument.tile = pmgConfig.siteTitle + ' - ' + pmgConfig.pmgSubTitle;\n\t}\n\telse{\n\t\tdocument.tile = pmgConfig.siteTitle;\n\t}\n}", "function subtitleSidePosition(subWidth, titleWidth, subScale, titleScale, marginBetween) {\nvar subHalfWidth = (subWidth*subScale)/2;\nvar titleHalfWidth = (titleWidth*titleScale)/2;\n// Calculate how far from the center this title needs to be\nvar centerOffset = subHalfWidth + titleHalfWidth + marginBetween;\nvar offset = ($(window).width()/2) - centerOffset;\n\nreturn offset;\n}", "function setPageTitle() {\n const titleElement = document.getElementById('title');\n titleElement.innerText = pageTitle;\n}", "function setTitle() {\n dt = formatDate(myDateFormat, appstate.date);\n dtextra = (appstate.date2 === null) ? '' : ' to ' + formatDate(myDateFormat, appstate.date2);\n $('#maptitle').html(\"Viewing \" + vartitle[appstate.ltype] +\n \" for \" + dt + \" \" + dtextra);\n $('#variable_desc').html(vardesc[appstate.ltype]);\n}", "getPageTitle(){\n return elementUtil.dogetPageTitle(constants.LOGIN_PAGE_TITLE)\n }", "function pageTitle($rootScope, $timeout) {\r\n return {\r\n link: function(scope, element) {\r\n var listener = function(event, toState, toParams, fromState, fromParams) {\r\n // Default title - load on Dashboard 1\r\n var title = 'SmpleGHPrj | Responsive Admin Theme';\r\n // Create your own title pattern\r\n if (toState.data && toState.data.pageTitle) title = 'SmpleGHPrj | ' + toState.data.pageTitle;\r\n $timeout(function() {\r\n element.text(title);\r\n });\r\n };\r\n $rootScope.$on('$stateChangeStart', listener);\r\n }\r\n }\r\n}", "function getSectionTitle(title) {\n // section title layout\n return title;\n}", "function displayTitle(){\n push();\n textFont(`Blenny`);\n textSize(70);\n fill(breadFill.r, breadFill.g, breadFill.b);\n textLeading(53);\n text(`GET\\nTHAT\\nBREAD`, 1050, 612);\n pop();\n}", "function PageTitle(_ref) {\n var title = _ref.title,\n subTitle = _ref.subTitle;\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: \"page-title-wrapper\"\n }, title && /*#__PURE__*/_react.default.createElement(\"label\", null, title), subTitle && /*#__PURE__*/_react.default.createElement(\"label\", null, \" - \", subTitle));\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length === 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function replacePageTitle() {\n\t$('title').empty();\n\t$('title').append($( '.menu nav ul li.active-menu a' ).text());\n}", "info() {\n if (this.numOfPages > 0) {\n return this.title + '<br>' + ' by ' + this.author + '<br>' + this.numOfPages + ' pages';\n } \n return this.title + '<br>' + ' by ' + this.author + '<br>'; \n }", "function TitleCtrl() { }", "function setPageTitle() {\nconst title = document.querySelector('#title');\n\ntitle.innerText = pageTitle;\n\n}", "function updateTitle() {\n var pos = d3.mouse(fullMareyForeground.node());\n var x = pos[0];\n var station = stationXScaleInvert[Math.round(xScale.invert(x))];\n if (station) {\n highlightMareyTitle(station)\n }\n }", "function title() {\r\n drawScene(gl);\r\n if (!cube_title.isScrambling)\r\n cube_title.scramble();\r\n moveCamera({ movementX: velX, movementY: velY });\r\n cube_title.update(1 / 60);\r\n cube_title.show(programInfo);\r\n titleAnimationRequest = requestAnimationFrame(title);\r\n }", "function pageTitle($rootScope, $timeout) {\n return {\n link: function(scope, element) {\n var listener = function(event, toState, toParams, fromState, fromParams) {\n // Default title - load on Dashboard 1\n var title = 'INSPINIA | Responsive Admin Theme';\n // Create your own title pattern\n if (toState.data && toState.data.pageTitle) title = 'INSPINIA | ' + toState.data.pageTitle;\n $timeout(function() {\n element.text(title);\n });\n };\n $rootScope.$on('$stateChangeStart', listener);\n }\n }\n}", "function setPageTitle() {\n document.getElementById('page-title').innerText = parameterUsername;\n document.title = parameterUsername + ' - User Page';\n}", "setTitle(title) {\r\n this.title = siteTitle + title\r\n document.title = Site.info.siteName + ' ' + siteTitle + title\r\n }", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n \n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n \n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "getTitle() {}", "function title() {\n \t\ttitleDef = new image(DEMO_ROOT + \"/def/resources/title_def.png\");\t\t\t\t\t// Load images\n \t\ttitleDemo = new image(DEMO_ROOT + \"/def/resources/title_demo.png\");\n \t\ttitleDefScreen = SeniorDads.ScreenHandler.Codef(\t\t\t\t\t\t\t\t\t// Set up \"'Def\" canvas\n \t\t\t\ttitleDef.img.width,\n \t\t\t\ttitleDef.img.height,\n \t\t\t\tname, zIndex++, \n \t\t\t\t0,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Position on center left\n \t\t\t\t200 - (titleDef.img.height /2)\n \t\t\t\t);\n \t\ttitleDefScreen.hide();\n \t\ttitleDef.draw(titleDefScreen,0,0);\t\t\t\t\t\t\t\t\t\t\t\t\t// Draw image onto canvas\n \t\ttitleDemoScreen = SeniorDads.ScreenHandler.Codef(\t\t\t\t\t\t\t\t\t// Set up \"Demo\" canvas\n \t\t\t\ttitleDemo.img.width,\n \t\t\t\ttitleDemo.img.height,\n \t\t\t\tname, zIndex++, \n \t\t\t\t640 - (titleDemo.img.width),\t\t\t\t\t\t\t\t\t\t\t\t// Position on center right\n \t\t\t\t200 - (titleDemo.img.height /2)\n \t\t\t\t);\n \t\ttitleDemoScreen.hide();\n \t\ttitleDemo.draw(titleDemoScreen,0,0);\t\t\t\t\t\t\t\t\t\t\t\t// Draw image onto canvas\n \t}", "function titleSetup() {\n\t\t\t\t\tif(scope.title !== undefined) {\n\t\t\t\t\t\t// For now we don't display the title\n\t\t\t\t\t\t// sel.select(\"span.list-title\").text(scope.title);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsel.select(\"span.list-title\").text(null);\n\t\t\t\t\t}\n\t\t\t\t}", "function pageTitle($rootScope, $timeout) {\n return {\n link: function(scope, element) {\n var listener = function(event, toState, toParams, fromState, fromParams) {\n // Default title\n var title = 'QUID Bonds p2p Market';\n // Create your own title pattern\n if (toState.data && toState.data.pageTitle) title = 'Quid Bonds p2p Market | ' + toState.data.pageTitle;\n $timeout(function() {\n element.text(title);\n });\n };\n $rootScope.$on('$stateChangeStart', listener);\n }\n }\n}", "function setPageTitle() {\n\n let h1 = document.getElementById('title');\n h1.innerText = pageTitle;\n}", "function setPageTitle() {\n const page = document.getElementById('title');\n page.innerHTML = pageTitle;\n}", "function showTitle(title) {\n\n push();\n fill(0, 30);\n noStroke();\n textStyle(BOLD);\n textSize(50);\n textAlign(CENTER);\n text(title, width/2, 100);\n pop();\n\n}", "function setPageTitle() {\n document.getElementById('page-title').innerText = parameterUsername;\n document.title = parameterUsername + ' - User Page';\n}", "setTitleBar() {\n $('[data-book-title]').text(this.book.title);\n $('[data-total-pages]').text(this.book.pages.length);\n $('[data-page-num]').text(this.book.currentPage.num);\n }", "function setPageTitle() {\n angular.forEach($scope.categories, function(value) {\n if (value.Id === parseInt($scope.search.categoryId)) {\n $rootScope.title = 'News - ' + value.CategoryName;\n }\n });\n }", "function shortenPageTitle() {\n document.getElementById('main-title').innerHTML = \"Fast & Furious\";\n }", "function set_title(title){\n\t\t\tdocument.querySelector(\"#footertitle span\").innerText = title;\n\t\t}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tvar titleDiv = document.getElementById( 'title-meta' );\n\n\tif( titleDiv == null ) {\n\t\treturn;\n\t}\n\n\tvar cloneNode = titleDiv.cloneNode( true );\n\tvar firstHeading = getFirstHeading();\n\tvar node = firstHeading.childNodes[0];\n\n\t// new, then old!\n\tfirstHeading.replaceChild( cloneNode, node );\n\tcloneNode.style.display = 'inline';\n\n\tvar titleAlign = document.getElementById( 'title-align' );\n\tfirstHeading.style.textAlign = titleAlign.childNodes[0].nodeValue;\n}", "function setTitle() {\n\t\ttitle.selectAll(\"*\").remove();\n\n\t\t// All the hustle for enabling italics ^^\n\t\tvar tmp = document.createElement(\"text\");\n\t\ttmp.innerHTML = \"Terrorist Attacks Divided into <tspan style='font-style: italic;'>K=\" + focusK + \"</tspan> Partitions\";\n\t\tvar nodes = Array.prototype.slice.call(tmp.childNodes);\n\t\tnodes.forEach(function(node) {\n\t\t\ttitle.append(\"tspan\")\n\t\t\t\t.attr(\"style\", node.getAttribute && node.getAttribute(\"style\"))\n\t\t\t\t.text(node.textContent);\n\t\t});\n\t}", "function pageTitle($rootScope, $timeout) {\n return {\n link: function (scope, element) {\n var listener = function (event, toState, toParams, fromState, fromParams) {\n // Default title - load on Dashboard 1\n var title = '管理平台';\n // Create your own title pattern\n if (toState.data && toState.data.pageTitle) title = toState.data.pageTitle;\n $timeout(function () {\n element.text(title);\n });\n }\n $rootScope.$on('$stateChangeStart', listener);\n }\n }\n}", "title() { return this.owner.name + \" - \" + this.label.replace('\\n', ' ') }", "function title() {\n var elm\n \n elm = d.find(\"title\");\n elm.innerText = g.title;\n \n elm = d.tags(\"title\");\n elm[0].innerText = g.title;\n }", "function dTitle(){return document.title;}", "function header(title) {\r\n console.log(\"===================================\")\r\n console.log(\" \"+title)\r\n console.log(\"===================================\")\r\n }", "async pageTitle () {\n debug('getting pageTitle')\n return new Promise(resolve => {\n this.pageContext.evaluate(() => { return document.title },\n (err, result) => {\n if (err) {\n console.error(err)\n }\n resolve(result)\n })\n })\n }", "function updateTitle(page) {\n $('#page-title').html(titles[page]);\n}", "function pageTitle($rootScope, $timeout,configLisNet,shareuser) {\n return {\n link: function(scope, element) {\n var listener = function(event, toState, toParams, fromState, fromParams) {\n // Default title - load on Dashboard 1\n var title = 'LISNET | TMInformática';\n // Create your own title pattern\n if (toState.data && toState.data.pageTitle) {\n if(shareuser.userDTO.cliente){\n title = shareuser.userDTO.cliente.CLI_ST_NOME.toUpperCase()+' | ' + toState.data.pageTitle;\n }else if(configLisNet){\n title = configLisNet.defaultDB.toUpperCase()+' | ' + toState.data.pageTitle;\n }else{\n title = 'ERRO | ' + toState.data.pageTitle;\n }\n }\n $timeout(function() {\n element.text(title);\n });\n };\n $rootScope.$on('$stateChangeStart', listener);\n }\n };\n}", "updateTitle(){ \n let title = '';\n const { head, instance } = this.entry;\n\n if (head.hasOwnProperty('title')){\n let prop = head.title;\n\n title = head.title\n if (typeof prop === 'function'){\n title = head.title.apply(instance);\n }\n }\n\n if (title && title.length > 0){\n document.title = title;\n }\n }", "function setPageTitle() {\n // First, get a reference to the DOM element\n let titleElement = document.querySelector(\"#page-title > span.name\");\n // Now set the inner text property so the content changes\n titleElement.innerText = name;\n}", "function setPageTitle() {\n const pageTitle = document.getElementById('page-title');\n pageTitle.querySelector('.name').innerText = name;\n}", "function reposTitle() {\n\t\t\tconsole.info(\"reposTitle\");\n\t\t\tif(jQuery(window).width() < 450) {\n\t\t\t\tif(!jQuery('.fc-header-title').is(':visible')) {\n\t\t\t\t\tif(jQuery('h3.calTitle').length == 0) {\n\t\t\t\t\t\tvar m = jQuery('.fc-header-title h2').text();\n\t\t\t\t\t\tjQuery('<h3 class=\"calTitle\">'+m+'</h3>').insertBefore('#calendar table.fc-header');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery('h3.calTitle').remove();\n\t\t\t}\n\t\t}", "function positionCB() {\n var bb;\n var innerThickness = thickPx + outlinewidth / 2;\n if (ticklabelposition.indexOf('inside') === -1) {\n bb = Drawing.bBox(axLayer.node());\n innerThickness += isVertical ? bb.width : bb.height;\n }\n titleEl = titleCont.select('text');\n var titleWidth = 0;\n var topSideVertical = isVertical && titleSide === 'top';\n var rightSideHorizontal = !isVertical && titleSide === 'right';\n var moveY = 0;\n if (titleEl.node() && !titleEl.classed(cn.jsPlaceholder)) {\n var _titleHeight;\n var mathJaxNode = titleCont.select('.h' + ax._id + 'title-math-group').node();\n if (mathJaxNode && (isVertical && topOrBottom || !isVertical && !topOrBottom)) {\n bb = Drawing.bBox(mathJaxNode);\n titleWidth = bb.width;\n _titleHeight = bb.height;\n } else {\n // note: the formula below works for all title sides,\n // (except for top/bottom mathjax, above)\n // but the weird gs.l is because the titleunshift\n // transform gets removed by Drawing.bBox\n bb = Drawing.bBox(titleCont.node());\n titleWidth = bb.right - gs.l - (isVertical ? uPx : vPx);\n _titleHeight = bb.bottom - gs.t - (isVertical ? vPx : uPx);\n if (!isVertical && titleSide === 'top') {\n innerThickness += bb.height;\n moveY = bb.height;\n }\n }\n if (rightSideHorizontal) {\n titleEl.attr('transform', strTranslate(titleWidth / 2 + titleFontSize / 2, 0));\n titleWidth *= 2;\n }\n innerThickness = Math.max(innerThickness, isVertical ? titleWidth : _titleHeight);\n }\n var outerThickness = (isVertical ? xpad : ypad) * 2 + innerThickness + borderwidth + outlinewidth / 2;\n var hColorbarMoveTitle = 0;\n if (!isVertical && title.text && yanchor === 'bottom' && optsY <= 0) {\n hColorbarMoveTitle = outerThickness / 2;\n outerThickness += hColorbarMoveTitle;\n moveY += hColorbarMoveTitle;\n }\n fullLayout._hColorbarMoveTitle = hColorbarMoveTitle;\n fullLayout._hColorbarMoveCBTitle = moveY;\n var extraW = borderwidth + outlinewidth;\n\n // TODO - are these the correct positions?\n var lx = (isVertical ? uPx : vPx) - extraW / 2 - (isVertical ? xpad : 0);\n var ly = (isVertical ? vPx : uPx) - (isVertical ? lenPx : ypad + moveY - hColorbarMoveTitle);\n g.select('.' + cn.cbbg).attr('x', lx).attr('y', ly).attr(isVertical ? 'width' : 'height', Math.max(outerThickness - hColorbarMoveTitle, 2)).attr(isVertical ? 'height' : 'width', Math.max(lenPx + extraW, 2)).call(Color.fill, bgcolor).call(Color.stroke, opts.bordercolor).style('stroke-width', borderwidth);\n var moveX = rightSideHorizontal ? Math.max(titleWidth - 10, 0) : 0;\n g.selectAll('.' + cn.cboutline).attr('x', (isVertical ? uPx : vPx + xpad) + moveX).attr('y', (isVertical ? vPx + ypad - lenPx : uPx) + (topSideVertical ? titleHeight : 0)).attr(isVertical ? 'width' : 'height', Math.max(thickPx, 2)).attr(isVertical ? 'height' : 'width', Math.max(lenPx - (isVertical ? 2 * ypad + titleHeight : 2 * xpad + moveX), 2)).call(Color.stroke, opts.outlinecolor).style({\n fill: 'none',\n 'stroke-width': outlinewidth\n });\n var xShift = isVertical ? xRatio * outerThickness : 0;\n var yShift = isVertical ? 0 : (1 - yRatio) * outerThickness - moveY;\n xShift = isPaperX ? gs.l - xShift : -xShift;\n yShift = isPaperY ? gs.t - yShift : -yShift;\n g.attr('transform', strTranslate(xShift, yShift));\n if (!isVertical && (borderwidth || tinycolor(bgcolor).getAlpha() && !tinycolor.equals(fullLayout.paper_bgcolor, bgcolor))) {\n // for horizontal colorbars when there is a border line or having different background color\n // hide/adjust x positioning for the first/last tick labels if they go outside the border\n var tickLabels = axLayer.selectAll('text');\n var numTicks = tickLabels[0].length;\n var border = g.select('.' + cn.cbbg).node();\n var oBb = Drawing.bBox(border);\n var oTr = Drawing.getTranslate(g);\n var TEXTPAD = 2;\n tickLabels.each(function (d, i) {\n var first = 0;\n var last = numTicks - 1;\n if (i === first || i === last) {\n var iBb = Drawing.bBox(this);\n var iTr = Drawing.getTranslate(this);\n var deltaX;\n if (i === last) {\n var iRight = iBb.right + iTr.x;\n var oRight = oBb.right + oTr.x + vPx - borderwidth - TEXTPAD + optsX;\n deltaX = oRight - iRight;\n if (deltaX > 0) deltaX = 0;\n } else if (i === first) {\n var iLeft = iBb.left + iTr.x;\n var oLeft = oBb.left + oTr.x + vPx + borderwidth + TEXTPAD;\n deltaX = oLeft - iLeft;\n if (deltaX < 0) deltaX = 0;\n }\n if (deltaX) {\n if (numTicks < 3) {\n // adjust position\n this.setAttribute('transform', 'translate(' + deltaX + ',0) ' + this.getAttribute('transform'));\n } else {\n // hide\n this.setAttribute('visibility', 'hidden');\n }\n }\n }\n });\n }\n\n // auto margin adjustment\n var marginOpts = {};\n var lFrac = FROM_TL[xanchor];\n var rFrac = FROM_BR[xanchor];\n var tFrac = FROM_TL[yanchor];\n var bFrac = FROM_BR[yanchor];\n var extraThickness = outerThickness - thickPx;\n if (isVertical) {\n if (lenmode === 'pixels') {\n marginOpts.y = optsY;\n marginOpts.t = lenPx * tFrac;\n marginOpts.b = lenPx * bFrac;\n } else {\n marginOpts.t = marginOpts.b = 0;\n marginOpts.yt = optsY + len * tFrac;\n marginOpts.yb = optsY - len * bFrac;\n }\n if (thicknessmode === 'pixels') {\n marginOpts.x = optsX;\n marginOpts.l = outerThickness * lFrac;\n marginOpts.r = outerThickness * rFrac;\n } else {\n marginOpts.l = extraThickness * lFrac;\n marginOpts.r = extraThickness * rFrac;\n marginOpts.xl = optsX - thickness * lFrac;\n marginOpts.xr = optsX + thickness * rFrac;\n }\n } else {\n // horizontal colorbars\n if (lenmode === 'pixels') {\n marginOpts.x = optsX;\n marginOpts.l = lenPx * lFrac;\n marginOpts.r = lenPx * rFrac;\n } else {\n marginOpts.l = marginOpts.r = 0;\n marginOpts.xl = optsX + len * lFrac;\n marginOpts.xr = optsX - len * rFrac;\n }\n if (thicknessmode === 'pixels') {\n marginOpts.y = 1 - optsY;\n marginOpts.t = outerThickness * tFrac;\n marginOpts.b = outerThickness * bFrac;\n } else {\n marginOpts.t = extraThickness * tFrac;\n marginOpts.b = extraThickness * bFrac;\n marginOpts.yt = optsY - thickness * tFrac;\n marginOpts.yb = optsY + thickness * bFrac;\n }\n }\n var sideY = opts.y < 0.5 ? 'b' : 't';\n var sideX = opts.x < 0.5 ? 'l' : 'r';\n gd._fullLayout._reservedMargin[opts._id] = {};\n var possibleReservedMargins = {\n r: fullLayout.width - lx - xShift,\n l: lx + marginOpts.r,\n b: fullLayout.height - ly - yShift,\n t: ly + marginOpts.b\n };\n if (isPaperX && isPaperY) {\n Plots.autoMargin(gd, opts._id, marginOpts);\n } else if (isPaperX) {\n gd._fullLayout._reservedMargin[opts._id][sideY] = possibleReservedMargins[sideY];\n } else if (isPaperY) {\n gd._fullLayout._reservedMargin[opts._id][sideX] = possibleReservedMargins[sideX];\n } else {\n if (isVertical) {\n gd._fullLayout._reservedMargin[opts._id][sideX] = possibleReservedMargins[sideX];\n } else {\n gd._fullLayout._reservedMargin[opts._id][sideY] = possibleReservedMargins[sideY];\n }\n }\n }", "async seeTitle() {\n const assert = require(\"assert\");\n const title = await this.grabTitle();\n assert.strictEqual(title, \"Online supermarket Rohlik.cz - nejrychlejší doručení ve městě\", \"Something is bad\");\n }", "function drawTitle(color, title_Y)\n{\n ctx.font = \"50px Arial\";\n ctx.textAlign = \"center\";\n ctx.strokeStyle = color;\n ctx.lineWidth = 3;\n ctx.strokeText(\"CASINO\", MID_CANVAS, title_Y);\n}", "function setPageTitle(nickName, viewingSelf) {\n if (viewingSelf == true){\n document.getElementById('page-title').innerText = 'Welcome home! ' + nickName.replace(/(\\n|\\r|\\r\\n)/g, '') + ' ^_^';\n }\n else{\n if (nickName == ''){\n document.getElementById('page-title').innerText = 'Hello! My owner hasn\\'t set my name yet! Please remind him/her to give me a name ^_^';\n }\n else{\n document.getElementById('page-title').innerText = 'Helloooo! This is ' + nickName.replace(/(\\n|\\r|\\r\\n)/g, '') + \". Welcome to my page ^_^\";\n }\n }\n document.title = parameterUsername + ' - User Page';\n}", "function verticalCenter() {\n\t$('.work_desc').each(function(i) {\n\t\tvar $this \t\t= $(this);\n\t\tvar descHeight \t= $this.height() / 2;\n\t\t\n\t\t$this.css('margin-top', parseFloat('-'+descHeight));\n\t});\n}", "function setWindowTitle() {\n const title = ['ARROYO', APP_VERSION];\n if (ARROYO_ENV_NAME) {\n title.unshift(`[${ARROYO_ENV_NAME}]`);\n }\n\n document.getElementsByTagName('title')[0].innerHTML = title.join(' ');\n}", "function title(){\n\n}", "async _refreshBarTitle() {\n this._top.attr(\"width\", this._dimView.width).attr(\"height\", this._barTitleHeight);\n }", "async setTitle(_) {\n this.titleView = _;\n this._top.attr(\"title\", this.titleView);\n select(this.element).attr(\"titleView\", this.titleView);\n select(this.element.shadowRoot.querySelector(\".title\")).text(_);\n }", "function draw_title() {\n // Draw the red area\n display.fill(0, 0, display.getWidth(), 1, \"white\", \"red\", ' ');\n\n // Draw the title and author\n display.text(1, 0, \"Etch A Sketch\");\n display.text(display.getWidth() - 14, 0, \"by Ricky Rung\");\n}", "function check_page_title_status() {\r\n /*\r\n First we check if the user scroll from top\r\n is the same as the offset from the first\r\n content which in our case is the same as\r\n the window height and then if it's higher\r\n we make the title fixed to the window.\r\n */\r\n if (window_scroll <= window_height) {\r\n title_is_fixed = true;\r\n } else {\r\n title_is_fixed = false;\r\n }\r\n /*\r\n Now here we do all the fancy graphics. If\r\n the title is fixed we make it so the\r\n opacity decreases as you scroll down and\r\n creates a fancy effect. For this to happen\r\n we also need to offset the content because\r\n the title is not there anymore so all the\r\n content would go up in the page so we take\r\n the content and we offset it to compensate.\r\n If not fixed (fixed == false) then we make\r\n the title go back to the top of the page\r\n and set the container offset to 0 to\r\n compensate.\r\n */\r\n if (title_is_fixed == false) {\r\n $(\"#page_title_container\").css(\"position\", \"relative\");\r\n $(\"#content_container\").css(\"top\", 0);\r\n } else {\r\n $(\"#page_title_container\").css(\"position\", \"fixed\");\r\n console.log(50 - window_scroll / window_height * 100 + \"%\");\r\n $(\"#page_title_container\").css(\"top\", (window_scroll / 20));\r\n $(\"#page_title_container\").css(\"opacity\", (1 - window_scroll / window_height));\r\n $(\"#content_container\").css(\"top\", window_height + \"px\");\r\n }\r\n}", "updatePageTitle (state, title) {\n state.pageTitle = title\n }", "function updateXYtitlesPosition(width, height, file_name, d3graph_container) {\n var delta = getResolution() < 1400 ? 15 : 0;\n d3graph_container.select('.x-title')\n .attr('transform', 'translate(' + ((width / 2) - 10) + ', 60)');\n\n var x = (file_name === 'IP') ? -70 : -40;\n d3graph_container.select('.y-title')\n .attr('transform', 'translate(' + (x + delta) + ',' + (height / 2) + '), rotate(-90)');\n\n}", "function getTitle() {\n try {\n var title = document.title;\n console.log(\"status pass : Current page title is \", title);\n return title;\n } catch (err) {\n console.log(err);\n }\n}", "function modify_title_space(){\r\n\t//stretch title row\r\n\ttitle_tr = main_t.getElementsByTagName(\"tr\")[0];\r\n\ttitle_td = title_tr.getElementsByTagName(\"td\")[0];\r\n\r\n\ttitle_td.setAttribute(\"colspan\", \"7\");\r\n\r\n\t//remove \"Recent Visitors by Visit Details\" so there is more vertical space\r\n\ttitle_td.childNodes[2].style.display = \"none\";\r\n}", "function appendYAxisTitle(svg, plot) {\n svg.append('text')\n .attr('id', 'yTitle')\n .attr('transform', 'translate(' + (plot.padding.left/3) + ','\n + (plot.padding.top + plot.range.y/2) + ') rotate(-90)')\n .text('Concentration %');\n }", "function PageTitleText(props) {\n const { children } = props;\n return (\n <Text size=\"large2\" weight=\"med2\">\n {children}\n </Text>\n );\n}", "get title(){\n return this._title.toUpperCase();\n }", "static get title() {\n return 'Oops! You weren\\'t supposed to see this...';\n }", "function scrollTitle(el) {\n\tif (el.clientWidth < el.firstChild.offsetWidth)\n\t\tel.firstChild.style.left = (el.clientWidth - el.firstChild.offsetWidth - 6) + 'px';\n}", "function injectTitlePage(title,login,i){\n\t\t\tif($(\"#appML_navigation_bar\").length>0 && $(\"#appML_navigation_bar\").is(\".appML_auto_fill\")){\n\t\t\t\tvar title_visibility=\"display:none\";\n\t\t\t\tif(i==current_page)\n\t\t\t\t\ttitle_visibility=\"\";\n\t\t\t\tif(login!=null)\n\t\t\t\t\ttitle=\"Login\";\n\t\t\t\t$(\"#appML_navigation_bar\").append($(\"<div style='position:relative'><div style='\"+title_visibility+\"'>\"+title+\"</div><div class='back'>Back</div></div>\"));\n\t\t\t}\n\t\t}", "getFormattedTitle(){\n //.....this key word used to apply conversion logic to code (uppercase letter)\n return this.info.title.toUpperCase()\n }", "function mainTitleTemplate({\n name\n}) {\n return `<h1 align=\"center\">${name}</h1>`;\n}", "static get tag(){return\"site-active-title\"}", "function pa_panel_create_title(title) {\n\tvar title_elem = pa_create_tag(\n\t\t'div',\n\t\t'pa-panel-title',\n\t\tdocument.body);\n\ttitle_elem.textContent = title;\n\ttitle_elem.className = 'bold';\n\tpa_add({\n\t\tid: 'pa-panel-title',\n\t\theight: 0.1,\n\t\tleft: 0.05,\n\t\tfontSize: PA_PANEL_FONT_SIZE,\n\t\ttop: 0.025\n\t});\n\treturn title_elem;\n}", "static get title() {\n return __('About');\n }", "function setYAxisTitleFtn(chart, index, labels) {\n $log.info('setting the Y Axis title: ' + labels[index]);\n chart.options.vAxis.title = labels[index];\n }", "function setYAxisTitleFtn(chart, index, labels) {\n $log.info('setting the Y Axis title: ' + labels[index]);\n chart.options.vAxis.title = labels[index];\n }" ]
[ "0.6289992", "0.6289992", "0.620483", "0.6144102", "0.6076659", "0.597595", "0.5893578", "0.586862", "0.5790285", "0.575313", "0.5747338", "0.5740914", "0.5738883", "0.5738883", "0.5716012", "0.57087487", "0.5697498", "0.56831956", "0.5679236", "0.5669497", "0.5648148", "0.56459606", "0.56445056", "0.56426144", "0.5633709", "0.5619147", "0.5616998", "0.55817986", "0.55634344", "0.55414385", "0.5534298", "0.55239034", "0.55192906", "0.55192906", "0.55192906", "0.55192906", "0.55161977", "0.5515405", "0.55113643", "0.55106926", "0.55081594", "0.5507707", "0.5502716", "0.5500477", "0.5494647", "0.5492536", "0.5490099", "0.5485284", "0.5485151", "0.5482515", "0.5479981", "0.5479535", "0.54782593", "0.54778594", "0.5475526", "0.54725564", "0.547226", "0.546685", "0.5465334", "0.5464233", "0.54539144", "0.5450078", "0.54452825", "0.54394674", "0.5437489", "0.5430195", "0.54290694", "0.5424492", "0.5408328", "0.539803", "0.53872377", "0.53712136", "0.53684086", "0.53604734", "0.5358016", "0.53559524", "0.5349746", "0.5344043", "0.53394175", "0.53371465", "0.53261775", "0.53209364", "0.53038704", "0.5303501", "0.52931374", "0.5278019", "0.5267805", "0.5266907", "0.5259013", "0.5257974", "0.5253474", "0.5252144", "0.5250813", "0.52490544", "0.5248867", "0.52382255", "0.52306473", "0.52244735", "0.52174413", "0.52174413" ]
0.6583696
0
Create a new zbDigitalClock object.
constructor() { // Must call super first super(); // Create the CSS parts for the shadow DOM const style = document.createElement('style'); // Set style style.textContent = ` :host { display: inline-block; } .root12 { min-width: 280px; min-height: 100px; height: 100%; width: 100%; background-color: rgb(48, 48, 48); display: grid; grid-template-columns: 4fr 4fr 1fr 4fr 4fr 2fr; grid-template-rows: 1fr; grid-column-gap: 0.5em; padding: 0.4em; } .root24 { min-width: 280px; min-height: 100px; height: 100%; width: 100%; background-color: rgb(48, 48, 48); display: grid; grid-template-columns: 4fr 4fr 1fr 4fr 4fr; grid-template-rows: 1fr; grid-column-gap: 0.5em; padding: 0.4em; } .digit { height: 100%; display: grid; grid-template-columns: 1fr 2fr 1fr; grid-template-rows: 1fr 2fr 1fr 2fr 1fr; grid-column-gap: 1px; grid-row-gap: 1px; } .digit-line-on { background-color: rgb(248, 248, 248); } .digit-line-off { background-color: rgb(55, 55, 55); } .digit-gap { background-color: rgb(48, 48, 48); } .dots { height: 100%; display: grid; grid-template-columns: 1fr; grid-template-rows: 2fr 1fr 3fr 1fr 2fr; grid-column-gap: 1px; grid-row-gap: 1px; } .dot { background-color: rgb(248, 248, 248); border-radius: 50%; } .ampm { height: 100%; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; grid-column-gap: 1px; grid-row-gap: 1px; font-family: "Lucida Console", Courier, monospace; font-size: 1em; } .ampm-parent { position: relative; width: 100%; height: 100%; } .ampm-child { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .ampm-on { color: rgb(248, 248, 248); } .ampm-off { color: rgb(55, 55, 55); } @keyframes blink { 50% { opacity: 0.0; } } .blink { animation: blink 1s step-start 0s infinite; }`; // Attach shadow DOM root this._shadowRoot = this.attachShadow({mode: 'open'}); // Add styles this._shadowRoot.appendChild(style); // Bind update event to this this._update = this._update.bind(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_create() {\n // Set show 24 hour clock\n let show24HourClock = false;\n\n // If there is a show 24 hour clock attribute\n if (this.hasAttribute('show24hour') === true) {\n // Set to show 24 hour clock\n show24HourClock = true;\n }\n\n // Create root DIV\n const rootDiv = document.createElement('div');\n\n // Set root class\n if (show24HourClock === true) {\n // Set to use the root24 class\n rootDiv.setAttribute('class', 'root24');\n } else {\n // Set to use the root12 class\n rootDiv.setAttribute('class', 'root12');\n }\n\n // Create digit line element list\n this._digit = [4];\n this._digit[0] = {};\n this._digit[1] = {};\n this._digit[2] = {};\n this._digit[3] = {};\n\n // Create digit DOM elements\n const digit1DomElement = this._createDigit(0);\n const digit2DomElement = this._createDigit(1);\n const dotsDomElement = this._createDots();\n const digit3DomElement = this._createDigit(2);\n const digit4DomElement = this._createDigit(3);\n\n // Append DOM elements to the root DIV\n rootDiv.appendChild(digit1DomElement);\n rootDiv.appendChild(digit2DomElement);\n rootDiv.appendChild(dotsDomElement);\n rootDiv.appendChild(digit3DomElement);\n rootDiv.appendChild(digit4DomElement);\n\n // If showing 12 hour clock\n if (show24HourClock === false) {\n // Create AM PM DOM elements\n const ampmDomElement = this._createAmpm();\n\n // Append to the root DIV\n rootDiv.appendChild(ampmDomElement);\n }\n\n // If there is a current root DIV\n if (this._rootDiv) {\n // Remove current root DIV from shadow DOM\n this._shadowRoot.removeChild(this._rootDiv);\n }\n\n // Set the new current root DIV\n this._rootDiv = rootDiv;\n\n // Add root DIV to shadow DOM\n this._shadowRoot.appendChild(this._rootDiv);\n\n // If there is a current time then remove it\n if (this._currentTime) delete this._currentTime;\n }", "get digitalClock() {\n delete this.digitalClock;\n return this.digitalClock = document.getElementById('digital-clock');\n }", "function startDigitalClock() {\n setInterval(updateDigitalClock, 1000);\n\n}", "function NewClock(props) {\n // let timeZone = props.timeZone;\n // or\n let { timeZone } = props; // de-structuing\n // let div1 = React.createElement('div', { className: 'card-header' }, timeZone);\n // let span = React.createElement('span', { className: 'badge badge-dark' }, new Date().toLocaleTimeString('en-US', { timeZone: timeZone }));\n // let div2 = React.createElement('div', { className: 'card-body' }, span);\n // let div = React.createElement('div', { className: 'card' }, div1, div2);\n // return div;\n return (\n <div className=\"card\">\n <div className=\"card-header\">{timeZone}</div>\n <div className=\"card-body\">\n <span className=\"badge badge-dark\">{new Date().toLocaleTimeString('en-US', { timeZone: timeZone })}</span>\n </div>\n </div>\n )\n}", "function timeFactory(d) {\n return new Time(d);\n}", "function _clockBorder() {\n\t\tvar clockBorder = new Surface({\n\t\t\tproperties: {\n\t\t\t\tborder: this.options.clockBorderWidth + 'px solid #dddddd',\n\t\t\t\tborderRadius: (this.options.size[0] / 2) + 'px',\n\t\t\t\tborderStyle: 'double'\n\t\t\t}\n\t\t});\n\n\t\tvar clockBorderModifier = new StateModifier(this.options);\n\n\t\tthis.add(clockBorderModifier).add(clockBorder);\n\t}", "function createClock(clock) {\n var newClock = {\n type: clock.type,\n name: clock.name,\n description: clock.description,\n goal: clock.goal,\n gameid: 4,\n createdby: userId\n }\n ClockService.Create(newClock).then(function (data) {\n vm.showClockEdit = false;\n getClocksByUserId(2);\n clock.name = \"\";\n clock.type = \"\";\n clock.description = \"\";\n clock.goal = \"\";\n });\n }", "function initialise_clock()\n{\n const led = $(\"#clock-led\");\n const clock_btn = $(\"#clock-btn\");\n const clock_btns = $(\"[name=clock-options]\");\n const interval_input = $(\"#clock-interval\");\n\n clock = new VirtualClock(false, 1000);\n clock.add_rising_client(() => {\n led.addClass(\"led-on\");\n });\n clock.add_falling_client(() => {\n led.removeClass(\"led-on\");\n });\n clock_btn.click(() => {\n $(\"#clock-manual\").prop(\"checked\", true);\n clock.cycle();\n });\n clock_btns.change(function(event) {\n if($(event.target).val() == \"auto\")\n clock.start();\n else\n clock.stop();\n });\n interval_input.on(\"input\", () => { clock.stop(); });\n interval_input.change(() => {\n const interval = Number.parseInt(interval_input.val());\n clock.set_interval(interval);\n clock.start();\n })\n \n}", "function Clock\n\t(IN_szContainerID, IN_objOptions) {\n\tthis.init();\n\n\t// First extend the new instance with the defaults\n\t$.extend(true, this, this.defaults);\n\n\t// Then extend the new instance with IN_objOptions, if specified, which overrides the defaults\n\t$.extend(true, this, IN_objOptions || {});\n\n\t// reference of the container\n\tthis.holder = $('#' + IN_szContainerID);\n\n\tthis.containerID = IN_szContainerID;\n\tthis.create();\n\tthis.draw();\n}", "function CuteClock() {\n this.sysDate = new Date();\n this.hour = this.sysDate.getHours();\n this.minutes = this.sysDate.getMinutes();\n this.seconds = this.sysDate.getSeconds();\n \n this.buildClockUI();\n \n this.ticTic();\n }", "function convertMillisecondsToDigitalClock(ms) {\n var date = new Date(ms);\n var str = '';\n str += date.getUTCDate() - 1 + \" days, \";\n str += date.getUTCHours() + \" hours, \";\n str += date.getUTCMinutes() + \" minutes, \";\n str += date.getUTCSeconds() + \" seconds \";\n//str += date.getUTCMilliseconds() + \" millis\";\n // console.log(str);\n\n var hours = Math.floor(ms / 3600000); // 1 Hour = 36000 Milliseconds\n var minutes = Math.floor((ms % 3600000) / 60000); // 1 Minutes = 60000 Milliseconds\n var seconds = Math.floor(((ms % 360000) % 60000) / 1000);// 1 Second = 1000 Milliseconds\n // console.log(\"hours\" + hours);\n return {\n hours: hours,\n minutes: minutes,\n seconds: seconds,\n // clock: hours + \":\" + minutes + \":\" + seconds\n clock: str\n };\n }", "function createClock(unit){\n\t\t// match the pattern to the corresponding variable\n\t\tif (pattern.match(unit)) {\n\t\t\tif (unit.match(/mm/)) {\n\t\t\t\taddUnitToClock(minutes, unit);\n\t\t\t}\n\t\t\tif (unit.match(/ss/)) {\n\t\t\t\taddUnitToClock(seconds, unit);\n\t\t\t};\n\t\t\t}\n\t\t}", "function Clock() {\n\n var daysInAMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n\n this.month = 1;\n this.day = 1;\n this.year = 2016;\n\n this.tick = function() {\n this.day += 1;\n\n if (this.day > daysInAMonth[this.month - 1]) {\n this.month += 1;\n this.day = 1;\n }\n\n }\n\n this.time = function() {\n \tvar month = this.month < 10 ? \"0\" + this.month : this.month;\n \tvar day = this.day < 10 ? \"0\" + this.day : this.day;\n console.log(`${this.year}-${month}-${day}`)\n }\n\n this.getTime = function() {\n var month = this.month < 10 ? \"0\" + this.month : this.month;\n \tvar day = this.day < 10 ? \"0\" + this.day : this.day;\n return `${this.year}-${month}-${day}`;\n }\n\n}", "function doClock() {\n\tvar clockElement = new Element('clock');\n\tclockElement.toExecuteOnRead = function (index, element) {\n\t\tif (element.getAttribute('type') === 'time') {\n\t\t\telement.innerHTML = new Date().toLocaleTimeString();\n\t\t} else if (element.getAttribute('type') === 'date') {\n\t\t\telement.innerHTML = new Date().toLocaleDateString();\n\t\t}\n\t};\n\tclockElement.addAttribute('type', true, function (attribute) {\n\t\tif (attribute === 'date' || attribute === 'time') {\n\t\t\treturn true;\n\t\t// eslint-disable-next-line no-else-return\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t});\n\tclockElement.readElements();\n}", "static fromTimestamp(timestamp) {\n let clock = new ClockJS();\n clock.setDateFromTimestamp(timestamp);\n return clock;\n }", "function Clock() {\n this._rate = 0.001; // 1ms elapsed : 60sec simulated\n this._date = d3.now();\n this._elapsed = 0;\n }", "createCandle(id) {\n\t\t\tconst self = this;\n\t\t\tthis.sand = document.createElement('canvas');\n\t\t\tlet currentsandID = id + \"Sand\"\n\t\t\tthis.sand.id = currentsandID.substring(1);\n\t\t\tthis.sand.setAttribute(\"width\", \"75\");\n\t\t\tthis.sand.setAttribute(\"height\", \"150\");\n\t\t\tvar ctx = this.sand.getContext(\"2d\");\n\t\t\tctx.fillStyle = \"#000000\";\n\t\t\tctx.fillRect(5, 5, 70, 150);\n\t\t\tctx.fillRect(35, 5, 10, 150);\n\t\t\treturn this.sand;\n\t\t}", "function setupClock(){\n \"use strict\";\n var opts = $[deck]('getOptions');\n if(!opts.clock.enable){\n $(opts.selectors.clock).remove();\n return;\n }\n dom.toggle = $(opts.selectors.toggle);\n dom.time = $(opts.selectors.time);\n started = false;\n\n dom.toggle.text(\"Start\").on(\"click\", toggleClock);\n dom.time.text(\"00:00:00\");\n\n ready = true;\n }", "constructor() {\n /** Indicates if the clock is endend. */\n this.endedLocal = false;\n /** The duration between start and end of the clock. */\n this.diff = null;\n this.startTimeLocal = new Date();\n this.hrtimeLocal = process.hrtime();\n }", "function localClock(){\n digitalClock(0,\"clock\");\n digitalClock(-7,\"clockNy\")\n digitalClock(8,\"tokyo\") \n}", "function Clock() {\n\n this.segments = [\n 'seconds',\n 'minutes',\n 'hours'\n ];\n\n}", "function initClock() {\n\tclock = new THREE.Clock();\n\t// Set the time to 0\n\tclock.start();\n}", "function ZApi() {\n\n var options = {};\n\n if (arguments.length > 0) {\n\n if (typeof arguments[0] === 'object') {\n // overwrite port attibutes with the ones passed\n options = util._extend(options, arguments[0]);\n\n } else {\n\n // set port path\n if (typeof arguments[0] === 'string') {\n options.portPath = arguments[0];\n }\n\n // set port baudrate\n if (typeof arguments[1] === 'number') {\n options.portBaudrate = arguments[1];\n }\n }\n }\n\n // establish a communication with serial\n this.serial = new SerialInterface(options);\n}", "function digitalClock(date) {\n // call the time\n timer(date.times);\n // call the date\n calendar(date.dates);\n}", "function initDigitalWatch() {\n flagDigital = true;\n interval = setInterval(updateTime, 500);\n }", "constructor(canvas, x, y, w, h, canvas_w)\r\n\t{\r\n\t\tthis.x = x; //x of the pad\r\n\t\tthis.y = y; //y of the pad\r\n\t\t\r\n\t\tthis.v_x = 0; //vertical speed of the pad\r\n\t\t\r\n\t\tthis.w = w; //width of the pad\r\n\t\tthis.h = h; //height of the pad\r\n\t\t\r\n\t\tthis.id = Pad.counter++; //giving unique id to ball and incrementing counter\r\n\t\t\r\n\t\tthis.canvas_w = canvas_w; //canvas width\r\n\t\t\r\n\t\tcanvas.appendChild(this.pad = document.createElement('div')); //pad refers to the html element\r\n\t\tthis.pad.id = 'Pad_' + this.id; //giving unique id to the html element\r\n\t\tthis.pad.classList.add('pad'); //class just for pad\r\n\t\tthis.pad.classList.add('game_element'); //class for all game elements\r\n\t\t\r\n\t\tthis.draft(); //drawing pad\r\n\t}", "constructor( autoStart ) {\n this.autoStart = ( autoStart !== undefined ) ? autoStart : true;\n /** startTime: number;\n * When the clock is running, It holds the starttime of the clock.\n * This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.\n * @default 0\n */\n this.startTime = 0;\n /** oldTime: number\n\t * When the clock is running, It holds the previous time from a update.\n\t * This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.\n\t * @default 0\n\t */\n this.oldTime = 0;\n /** elapsedTime: number;\n * When the clock is running, It holds the time elapsed between the start of the clock to the previous update.\n * This parameter is in seconds of three decimal places.\n * @default 0\n */\n\t\tthis.elapsedTime = 0;\n\t\tthis.running = false;\n\t}", "function zd(a, b) {\n zd.w.constructor.call(this, a, b);\n this.g = new C(0, 0);\n console.log(\"rendered connector\")\n}", "create_contract() {\n var mission = \"Destroy one debris\";\n var success_rate = this.get_successrate();\n var reward = this.get_reward(success_rate);\n var expiration = null; // TODO not implemented yet\n return new Contract(mission, reward, success_rate, expiration);\n }", "function Clock( autoStart ) {\n\n\tthis.autoStart = ( autoStart !== undefined ) ? autoStart : true;\n\n\tthis.startTime = 0;\n\tthis.oldTime = 0;\n\tthis.elapsedTime = 0;\n\n\tthis.running = false;\n\n}", "function getClock() {\n const date = new Date();\n const hours = String(date.getHours()).padStart(2, \"0\");\n // <- 2:min chracter(String), if chracter is less than 2, function will fill \"0\"\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n const seconds = String(date.getSeconds()).padStart(2, \"0\");\n clock.innerText = `${hours}:${minutes}:${seconds}`;\n}", "function drawClock()\n{\n\tclockCtx.clearRect(0,0,clockCWidth, clockCHeight);\n\tdrawClockOutline();\n\tdrawNumbers();\n\tdrawHands();\n\tsetTimeout(drawClock, 20);\n}", "function setClock(obj, offset, dst) {\r\n d = new Date();\r\n utc = d.getTime() + (d.getTimezoneOffset() * 60000);\r\n \tdst = (dst == 'True' ? 3600000 : 0); // Added support for DST\r\n nd = new Date(utc + (3600000*offset) + dst);\r\n \r\n // return time as a string\r\n obj.innerHTML = nd.toLocaleString();\r\n}", "function Clock() {\n /**\n * One-shot timer used to refresh the clock at a minute's turn\n * @memberOf Clock\n */\n this.timeoutID = null;\n\n /**\n * Timer used to refresh the clock every minute\n * @memberOf Clock\n */\n this.timerID = null;\n\n /**\n * Start the timer used to refresh the clock, will call the specified\n * callback at every timer tick to refresh the UI. The callback used to\n * refresh the UI will also be called immediately to ensure the UI is\n * consistent.\n *\n * @param {Function} refresh Function used to refresh the UI at every timer\n * tick, should accept a date object as its only argument.\n * @memberOf Clock\n */\n this.start = function cl_start(refresh) {\n var date = new Date();\n var self = this;\n\n refresh(date);\n\n if (this.timeoutID == null) {\n this.timeoutID = window.setTimeout(function cl_setClockInterval() {\n refresh(new Date());\n\n if (self.timerID == null) {\n self.timerID = window.setInterval(function cl_clockInterval() {\n refresh(new Date());\n }, 60000);\n }\n }, (60 - date.getSeconds()) * 1000);\n }\n };\n\n /**\n * Stops the timer used to refresh the clock\n * @memberOf Clock\n */\n this.stop = function cl_stop() {\n if (this.timeoutID != null) {\n window.clearTimeout(this.timeoutID);\n this.timeoutID = null;\n }\n\n if (this.timerID != null) {\n window.clearInterval(this.timerID);\n this.timerID = null;\n }\n };\n}", "function _clockHandPin() {\n\t\tvar pin = new Surface({\n\t\t\tproperties: {\n\t\t\t\tborder: this.options.pinDiameter + 'px solid #333333',\n\t\t\t\tborderRadius: this.options.pinDiameter + 'px'\n\t\t\t}\n\t\t});\n\n\t\tvar pinModifier = new StateModifier({\n\t\t\tsize: [this.options.pinDiameter, this.options.pinDiameter],\n\t\t\torigin: this.options.origin,\n\t\t\talign: this.options.align,\n\t\t\ttransform: Transform.translate(-this.options.pinDiameter / 2, -this.options.pinDiameter / 2, 100)\n\t\t});\n\n\t\tthis.add(pinModifier).add(pin);\n\t}", "function create() {\n bufferSize = spec.size.width / 2;\n let rotation = (spec.startLoc.x == 0) ? Math.PI : 0;\n let spaceBetween = (spec.canvasWidth + spec.size.width) / spec.numCars;\n\n for(let i = 0; i < spec.numCars; i++){\n let buffer = spaceBetween * i * spec.direction;\n let c = {\n center: { x: spec.startLoc.x + buffer, y: spec.startLoc.y },\n size: { x: spec.size.width, y: spec.size.height},\n direction: {x: spec.direction, y: 0},\n speed: spec.speed, // gridlengths per second\n rotation: rotation,\n level: spec.level,\n };\n cars[i] = c;\n }\n }", "function _createCipher(options) {\n\t options = options || {};\n\t var mode = (options.mode || 'CBC').toUpperCase();\n\t var algorithm = 'DES-' + mode;\n\n\t var cipher;\n\t if(options.decrypt) {\n\t cipher = forge.cipher.createDecipher(algorithm, options.key);\n\t } else {\n\t cipher = forge.cipher.createCipher(algorithm, options.key);\n\t }\n\n\t // backwards compatible start API\n\t var start = cipher.start;\n\t cipher.start = function(iv, options) {\n\t // backwards compatibility: support second arg as output buffer\n\t var output = null;\n\t if(options instanceof forge.util.ByteBuffer) {\n\t output = options;\n\t options = {};\n\t }\n\t options = options || {};\n\t options.output = output;\n\t options.iv = iv;\n\t start.call(cipher, options);\n\t };\n\n\t return cipher;\n\t}", "initialize_clock() {\n\t\tthis.$clock.html( theme_utils.get_current_localized_time() );\n\n\t\tsetInterval( () => _self.$clock.html( theme_utils.get_current_localized_time() ), 60000 );\n\t}", "constructor() {\n // Date and time constants.\n this.MS_IN_SEC = 1000;\n this.SEC_IN_HOUR = 3600;\n this.MIN_IN_HOUR = 60;\n this.MIN_IN_HALF_HOUR = 30;\n this.HOURS_IN_DAY = 24;\n this.DOUBLE_DIGITS = 10;\n this.DAY_NAMES = [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"];\n this.WEEK_REF = [\"היום\", \"מחר\", \"מחרתיים\"];\n this.now = new Date(); // Assign var with Date object of current time and date.\n }", "constructor () {\n super()\n\n // Attach shadow root and append template.\n this.attachShadow({ mode: 'open' })\n .appendChild(template.content.cloneNode(true))\n\n // Default time limit of 20 seconds.\n this._limit = 20\n\n // How many times the countdown has been activated.\n this._count = 0\n\n // Get the div-element for displaying the counting number.\n this._counter = this.shadowRoot.querySelector('#counter')\n\n // Bindings for reaching the this._limit-property.\n this._countdown = this._countdown.bind(this)\n this._displayTime = this._displayTime.bind(this)\n this._reset = this._reset.bind(this)\n this._stopTimer = this._stopTimer.bind(this)\n }", "function create(d, h, m, s, ms) {\n if (d === void 0) { d = 0; }\n if (h === void 0) { h = 0; }\n if (m === void 0) { m = 0; }\n if (s === void 0) { s = 0; }\n if (ms === void 0) { ms = 0; }\n switch (arguments.length) {\n case 1:\n return fromTicks(arguments[0]);\n case 3:\n d = 0, h = arguments[0], m = arguments[1], s = arguments[2], ms = 0;\n break;\n default:\n d = arguments[0], h = arguments[1], m = arguments[2], s = arguments[3], ms = arguments[4] || 0;\n break;\n }\n return d * 86400000 + h * 3600000 + m * 60000 + s * 1000 + ms;\n}", "drawStopwatch() {\n const stopwatch = document.createElement('div');\n stopwatch.setAttribute('id', this.id);\n stopwatch.setAttribute('class', 'stopwatch');\n document.getElementById('stopwatch-container').appendChild(stopwatch);\n }", "createCirc(id) {\n\t\t\tconst self = this;\n\t\t\tthis.sand = document.createElement('canvas');\n\t\t\tlet currentsandID = id + \"Sand\"\n\t\t\tthis.sand.id = currentsandID.substring(1);\n\t\t\tthis.sand.setAttribute(\"width\", \"100\");\n\t\t\tthis.sand.setAttribute(\"height\", \"100\");\n\t\t\tvar ctx = this.sand.getContext(\"2d\");\n\t\t\tctx.fillStyle = \"#000000\";\n\t\t\tctx.beginPath();\n\t\t\tctx.arc(50, 50, 40, 0, 2 * Math.PI);\n\t\t\tctx.stroke();\n\t\t\tctx.fill();\n\t\t\tctx.closePath();\n\t\t\treturn this.sand;\n\t\t}", "static create () {}", "function deltaTimeCreate(){\n\tthis.fullTime = new Date().getTime();\n\tthis.time = 0;\n\tthis.new = function(){\n\t\tthis.time = new Date().getTime() - this.fullTime;\n\t\tthis.fullTime += this.time;\n\t}\n}", "function BiddingContract(bytes32 nm,\n string desc,\n uint dur,\n uint sBid) {\n // constructor\n name=nm;\n description=desc;\n duration=dur;\n startBid=sBid;\n createdAt = now ;\n }", "function Clock () {\n this._time = 0;\n this._frame = 0;\n this._timerQueue = [];\n this._updatingIndex = 0;\n\n this._scale = 1;\n this._scaledTime = this._time;\n}", "function Clock () {\n this._time = 0;\n this._frame = 0;\n this._timerQueue = [];\n this._updatingIndex = 0;\n\n this._scale = 1;\n this._scaledTime = this._time;\n}", "function loadClock(yPos, xPos, draggableElement) {\n\t// Remove the element from the DOM first\n\t$(\"#clock\").remove();\n\t$(\"#clock2\").remove();\n\t// Specifiy the element with appropriate ID (MUST)\n\tvar htmlClock = '<canvas id=\"clock2\" style=\"background-color:#CCCCCC; border:1px solid white;\\\n\t\t\t\t\tposition:absolute;margin-top:'+ yPos + 'px;margin-left:' + xPos + 'px; \"width=\"250\" height=\"250\" \\\n\t\t\t\t\tclass=\"resize-drag\"></canvas>';\n\t// Append it to Dropzone (Passing the margin top 'Y' and margin left 'X' value will position the element correctly)\n\t$(\".dropzone\").append(htmlClock);\n\t// Call the clock function to load the Clock (calling the function in clock.js)\n\tclock();\n}", "function _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'DES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}", "function _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'DES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}", "function _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'DES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}", "function _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'DES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}", "function _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'DES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}", "function _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'DES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}", "function _createCipher(options) {\n options = options || {};\n var mode = (options.mode || 'CBC').toUpperCase();\n var algorithm = 'DES-' + mode;\n\n var cipher;\n if(options.decrypt) {\n cipher = forge.cipher.createDecipher(algorithm, options.key);\n } else {\n cipher = forge.cipher.createCipher(algorithm, options.key);\n }\n\n // backwards compatible start API\n var start = cipher.start;\n cipher.start = function(iv, options) {\n // backwards compatibility: support second arg as output buffer\n var output = null;\n if(options instanceof forge.util.ByteBuffer) {\n output = options;\n options = {};\n }\n options = options || {};\n options.output = output;\n options.iv = iv;\n start.call(cipher, options);\n };\n\n return cipher;\n}", "function initClock() {\n if (clock.children.length > 0)\n return;\n\n // ToDo: Calculate this somehow\n var clockHours = {\n '00': { left: '87px', top: '7px' },\n '1': { left: '114px', top: '40.2346px', bigger: true },\n '2': { left: '133.765px', top: '60px', bigger: true },\n '3': { left: '141px', top: '87px', bigger: true },\n '4': { left: '133.765px', top: '114px', bigger: true },\n '5': { left: '114px', top: '133.765px', bigger: true },\n '6': { left: '87px', top: '141px', bigger: true },\n '7': { left: '60px', top: '133.765px', bigger: true },\n '8': { left: '40.2346px', top: '114px', bigger: true },\n '9': { left: '33px', top: '87px', bigger: true },\n '10': { left: '40.2346px', top: '60px', bigger: true },\n '11': { left: '60px', top: '40.2346px', bigger: true },\n '12': { left: '87px', top: '33px', bigger: true },\n '13': { left: '127px', top: '17.718px'},\n '14': { left: '156.282px', top: '47px'},\n '15': { left: '167px', top: '87px'},\n '16': { left: '156.282px', top: '127px'},\n '17': { left: '127px', top: '156.282px'},\n '18': { left: '87px', top: '167px'},\n '19': { left: '47px', top: '156.282px'},\n '20': { left: '17.718px', top: '127px'},\n '21': { left: '7px', top: '87px'},\n '22': { left: '17.718px', top: '47px'},\n '23': { left: '47px', top: '17.718px'}\n };\n\n // ToDo: Calculate this somehow\n var clockMinutes = {\n '00': { left: '87px', top: '7px', bigger: true },\n '05': { left: '127px', top: '17.718px', bigger: true },\n '10': { left: '156.282px', top: '47px', bigger: true },\n '15': { left: '167px', top: '87px', bigger: true },\n '20': { left: '156.282px', top: '127px', bigger: true },\n '25': { left: '127px', top: '156.282px', bigger: true },\n '30': { left: '87px', top: '167px', bigger: true },\n '35': { left: '47px', top: '156.282px', bigger: true },\n '40': { left: '17.718px', top: '127px', bigger: true },\n '45': { left: '7px', top: '87px', bigger: true },\n '50': { left: '17.718px', top: '47px', bigger: true },\n '55': { left: '47px', top: '17.718px', bigger: true }\n };\n\n\n // Create hours container\n hours = document.createElement('div');\n hours.setAttribute('style', '');\n hours.className = 'datipi-circle-selector datipi-hours';\n fillTickElements(hours, clockHours, onHourTickSelect);\n\n // Create minutes container\n minutes = document.createElement('div');\n minutes.setAttribute('style', '');\n minutes.className = 'datipi-minutes datipi-circle-hidden';\n fillTickElements(minutes, clockMinutes, onMinutesTickSelect);\n\n // Clear clock and append child elements\n clock.innerHTML = '';\n clock.appendChild(hours);\n clock.appendChild(minutes);\n }", "static createInstance(dnaContractAttributes) {\n return new DnaContract(dnaContractAttributes);\n }", "function getClock() {\n const today = new Date();\n // console.log(`${today.getHours()}:${today.getMinutes()}:${today.getSeconds()}`)\n const hours = String(today.getHours()).padStart(2, \"0\");\n const minutes = String(today.getMinutes()).padStart(2, \"0\");\n const seconds = String(today.getSeconds()).padStart(2, \"0\"); \n\n clock.innerText = `${hours}:${minutes}:${seconds}`;\n}", "function Cb(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?(\"string\"==typeof b?b=zb(Td,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Bb(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,\"m\"),e!==b&&(!c||this._changeInProgress?Sb(this,Nb(b-e,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Bb(this):null!=b?this:NaN}", "function Cb(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?(\"string\"==typeof b?b=zb(Td,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Bb(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,\"m\"),e!==b&&(!c||this._changeInProgress?Sb(this,Nb(b-e,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Bb(this):null!=b?this:NaN}", "static create(time, dur, bones, morphs) {\nvar frame;\n//------\nframe = new CASFrame();\nframe.set(time, dur, bones, morphs);\nreturn frame;\n}", "constructor (timestamp) {\n this.time = Dayjs(timestamp).utc()\n }", "constructor(key, secret) {\n // Keep hold of the API key and secret\n this.key = key;\n this.secret = secret;\n\n this.bfx = new BFX({\n apiKey: key,\n apiSecret: secret,\n transform: true,\n ws: {\n autoReconnect: true,\n seqAudit: false,\n manageOrderBooks: true,\n },\n });\n\n this.ws = this.bfx.ws();\n\n // cache of some data\n this.state = {\n ticker: [],\n wallet: [],\n walletTimer: null,\n offers: [],\n loans: [],\n lastRates: {},\n };\n\n this.calcs = [];\n this.fundingRateChanged = () => {};\n }", "function getTime(){\n let date = new Date();\n hours = date.getHours();\n if(hours < 10){\n hours = '0' + hours;\n }\n minutes = date.getMinutes();\n if(minutes < 10){\n minutes = '0' + minutes;\n }\n seconds = date.getSeconds();\n if(seconds < 10){\n seconds = '0' + seconds;\n }\n digital_clock.innerHTML = `${hours}:${minutes}:${seconds}`;\n displayClockInBinary();\n}", "function initializeClock(id, endtime) {\n var clock = document.getElementById(id);\n var minutesSpan = clock.querySelector('.minutes');\n var secondsSpan = clock.querySelector('.seconds');\n\n function updateClock() {\n var t = getTimeRemaining(endtime);\n\n minutesSpan.innerHTML = ('0' + t.minutes).slice(-2);\n secondsSpan.innerHTML = ('0' + t.seconds).slice(-2);\n\n if (t.total <= 0) {\n clearInterval(timeinterval);\n }\n }\n\n updateClock();\n var timeinterval = setInterval(updateClock, 1000);\n\n document.getElementById('stop').addEventListener('click', () => {\n clearInterval(timeinterval);\n document.getElementById('start').disabled = false;\n });\n}", "function digitalClock() {\n var today = new Date();\n var options = {timeZone : 'Asia/Kolkata'};\n var time = today.toLocaleTimeString('en-US',options);\n document.getElementById('clock').textContent = time;\n}", "function showDigitalTime() {\n const date = new Date();\n let hour = date.getHours();\n let minute = date.getMinutes();\n let second = date.getSeconds();\n let session = \"AM\";\n\n if (hour == 0) {\n hour = 12;\n }\n\n if (hour > 12) {\n hour = hour - 12;\n session = \"PM\";\n }\n\n if (hour < 10) {\n hour = \"0\" + hour;\n } else {\n hour = hour;\n }\n\n if (minute < 10) {\n minute = \"0\" + minute;\n } else {\n minute = minute;\n }\n\n if (second < 10) {\n second = \"0\" + second;\n } else {\n second = second;\n }\n\n const time = hour + \":\" + minute + \":\" + second + \" \" + session;\n document.getElementById(\"digital-clock\").innerText = time;\n document.getElementById(\"digital-clock\").textContent = time;\n\n setTimeout(showDigitalTime, 1000);\n}", "constructor(peerId, ourId = guid) {\n return super(ourId, peerId, RTC_CONFIGURATION);\n }", "function initClock() {\n // Set theme and clock information\n changeTheme();\n updateMinute();\n updateHour();\n updateDate();\n\n // Add click handlers\n document.querySelector('button.themes').addEventListener('click', showThemesDropdown);\n }", "function _createTimer() {\n this.bodySurface = new Surface({\n size : [undefined, undefined],\n properties: {\n backgroundColor: '#003333', // deep blue\n color: '#669999',\n },\n });\n\n this.timerSurface = new Surface({\n size: [200, 200],\n content : \"<span class='stopwatch'><span class='mins'>00</span>:<span class='secs'>00</span>.<span class='tenths'>0</span></span><input id='timer-value' type='hidden' value='00:00.0' name='time'><br><span class='arrow'>▶<span>\",\n properties: {\n borderRadius: '100px',\n textAlign: 'center',\n fontSize: '44px',\n paddingTop: '65px',\n backgroundColor: 'white',\n },\n });\n\n var timerModifier = new StateModifier({\n origin: [0.5, 1.2],\n align : [0.5, 0.5],\n });\n\n this.resetSurface = new Surface({\n size: [50, 50],\n content: '↻',\n properties: {\n borderRadius: '25px',\n textAlign: 'center',\n paddingTop: '0px',\n fontSize: '36px',\n backgroundColor: '#801515', // deep red\n color: '#FFAAAA',\n },\n });\n\n var resetModifier = new StateModifier({\n origin: [0.5, 1.6],\n align: [0.15, 0.2],\n });\n\n this.submitSurface = new Surface({\n size: [66, 66],\n content: '✓',\n properties: {\n borderRadius: '33px',\n textAlign: 'center',\n paddingTop: '4px',\n paddingLeft: '0px',\n backgroundColor: '#567714', // green\n fontSize: '48px',\n color: '#D4EE9F',\n },\n });\n\n var submitModifier = new StateModifier({\n origin: [0.5, 1.6],\n align: [0.85, 0.55],\n });\n\n this.submittedSurface = new Surface({\n size: [100, 100],\n content: 'OK!',\n properties: {\n backgroundColor: '#669999',\n color: 'white',\n fontSize: '64px',\n borderRadius: '50px',\n paddingLeft: '2px',\n paddingTop: '10px',\n },\n });\n\n this.submittedModifier = new StateModifier({\n origin: [0.5, 0.95],\n align: [0.5, 0.5],\n // sets initial x- and y-scale to be 0\n transform: Transform.scale(0, 0, 1),\n // sets inital opacity to 0\n opacity: 0\n });\n\n this.layout.content.add(this.bodySurface);\n this.layout.content.add(timerModifier).add(this.timerSurface);\n this.layout.content.add(resetModifier).add(this.resetSurface);\n this.layout.content.add(submitModifier).add(this.submitSurface);\n this.layout.content.add(this.submittedModifier).add(this.submittedSurface);\n }", "function ClockFaceView() {\n\t\tView.apply(this, arguments);\n\n\t\t_clockBorder.call(this);\n\t\t_clockTicks.call(this);\n\t\t_clockHandPin.call(this);\n\t}", "function drawClock() {\n // add circle with border\n ctx.beginPath();\n ctx.arc(0, 0, radius, 0 , Math.PI * 2);\n // add border\n ctx.strokeStyle = \"#ffff00\";\n ctx.lineWidth = radius*0.2;\n ctx.stroke();\n ctx.fillStyle = '#ffffff';\n ctx.fill();\n\n // add point in the centre of clock\n ctx.beginPath();\n ctx.arc(0, 0, radius * 0.07, 0, 2 * Math.PI);\n ctx.fillStyle = '#666666';\n ctx.fill();\n\n drawNumbers();\n drawClockHands();\n }", "function digitalclock()\n{\n let displayTime=document.getElementById(\"clock\");\n let timenow=new Date();\n\n displayTime.innerHTML=timenow.toLocaleTimeString();\n}", "constructor () {\n /**\n * The div element containing the game.\n */\n this.memoryDiv = elementCreate.create('div', { id: 'memoryblock' })\n this.createMemoryBase()\n }", "function initClocks() {\n var $rail = $('#WikiaRail');\n \n if ($rail.length === 0)\n return;\n \n var htmlClocksContainer = '<section id=\"wiki-custom-clockModule\" class=\"module\">';\n for (i = 0; i < clocksModuleLabels.length; ++i) {\n htmlClocksContainer = htmlClocksContainer + \n '<div class=\"clocksModule ' + clocksModuleLabels[i] + '\">'+\n '<b>' + clocksModuleLabels[i] + '</b> <br/>' +\n '<span id=\"clock'+ clocksModuleLabels[i] + '\">' + \n '</span>'+\n '</div>';\n }\n \n htmlClocksContainer = htmlClocksContainer + '</section>';\n $(htmlClocksContainer).appendTo($rail);\n \n setInterval( function () {\n refreshClock();\n }, 1000\n );\n }", "function clock(duration, delay, direction, reverses, iterations, timingFunction, range, multiplier, offset) {\n\n // Initialize\n this.timeProvider = timeProvider; // Time provider\n this.duration = duration; // Duration (in seconds)\n this.delay = delay; // Initial delay (in seconds)\n this.direction = direction; // Direction (-1 = backward, 1 = forward)\n this.reverses = reverses; // Does this reverse? (true/false)\n this.iterations = iterations; // Number of iterations (0 = infinite)\n this.timingFunction = timingFunction; // Timing function\n this.multiplier = (range * multiplier); // Value multiplier (after timing function)\n this.offset = (range * offset); // Value offset (after multiplier)\n\n // Reset the clock\n this.reset = function () {\n\n this.startTime = 0; // Start time reference\n this.stopTime = 0; // Stop time reference\n this.lastTime = 0; // Last time reference\n this.baseDirection = this.direction; // Base direction\n this.d = this.baseDirection; // Current direction\n this.t = (this.baseDirection == 1 ? 0.0 : 1.0); // Current clock time (0.0 - 1.0)\n this.i = 0; // Current iteration\n this.isRunning = false; // Is this running?\n this.isFinished = false; // Is the entire clock run finished?\n this.value = 0.0; // Current computed clock value\n }\n\n // Reset to initial conditions\n this.reset();\n\n // Add events\n this.started = new customEvent(\"started\");\n this.stopped = new customEvent(\"stopped\");\n this.iterated = new customEvent(\"iterated\");\n this.finished = new customEvent(\"finished\");\n\n // Start the clock\n this.start = function () {\n\n // Only start if the clock isn't running and it hasn't finished\n if (!this.isRunning && !this.isFinished) {\n\n // Capture start time\n this.startTime = this.timeProvider.ticks() - (this.stopTime - this.startTime);\n\n // Start the animation\n this.isRunning = true;\n\n // Started event\n this.started.fire(null, { message: this.started.eventName });\n }\n }\n\n // Re-start the clock (reset and start)\n this.restart = function () {\n\n this.reset();\n this.start();\n }\n\n // Stop the clock\n this.stop = function () {\n\n // Only stop if the clock is running and it hasn't finished\n if (this.isRunning && !this.isFinished) {\n\n // Capture stop time\n this.stopTime = this.timeProvider.ticks();\n\n // Stop the animation\n this.isRunning = false;\n\n // Stopped event\n this.stopped.fire(null, { message: this.stopped.eventName });\n }\n }\n\n // Toggle the clock\n this.toggle = function () {\n\n // Only toggle the clock if it hasn't finished\n if (!this.isFinished) {\n\n // Is the clock running?\n if (this.isRunning) {\n\n // Stop the clock\n this.stop();\n }\n else {\n\n // Start the clock\n this.start();\n }\n }\n }\n\n // Rewind the clock\n this.rewind = function () {\n\n // Only rewind if the clock is running and it hasn't finished\n if (this.isRunning && !this.isFinished) {\n\n // Rewind to the beginning of the current iteration\n this.jumpTo(this.i);\n }\n }\n\n // Fast-forward the clock\n this.fastForward = function () {\n\n // Only fast-forward if the clock is running and it hasn't finished\n if (this.isRunning && !this.isFinished) {\n\n // Fast-forward to the beginning of the next iteration\n this.jumpTo(this.i + 1);\n }\n }\n\n // Reverse the clock\n this.reverse = function () {\n\n // Only reverse if the clock is running and it hasn't finished\n if (this.isRunning && !this.isFinished) {\n\n // Reverse the clock direction\n this.baseDirection = -this.baseDirection;\n\n // Jump to the same position, but in reverse\n var position = this.i + (this.d == -1.0 ? this.t : (1.0 - this.t));\n this.jumpTo(position);\n }\n }\n\n // Jump to iteration\n this.jumpTo = function(iteration) {\n\n // Determine iteration time\n var now = this.timeProvider.ticks();\n var ticksPerSecond = this.timeProvider.ticksPerSecond();\n var iterationTime = (this.delay * ticksPerSecond) + \n ((iteration * this.duration) * ticksPerSecond);\n this.startTime = (now - iterationTime);\n }\n\n // Update function\n this.update = updateClock;\n\n // Set initial value\n this.value = (this.timingFunction(this.t) * this.multiplier) + this.offset;\n\n // Add to clocks array\n clocks.push(this);\n}", "function createCountDownClock(delta) {\n const countdownArray = [];\n countdownArray.push(padNumber(Math.floor((delta % D) / H)));\n countdownArray.push(padNumber(Math.floor((delta % H) / M)));\n countdownArray.push(padNumber(Math.floor((delta % M) / S)));\n return countdownArray.join(DIVIDER);\n}", "function UTCTimeSystem() {\n\n /**\n * Metadata used to identify the time system in\n * the UI\n */\n this.key = 'utc';\n this.name = 'UTC';\n this.cssClass = 'icon-clock';\n this.timeFormat = 'utc';\n this.durationFormat = 'duration';\n this.isUTCBased = true;\n }", "function TimeZone(adjustmentTime, offset) {\n var __arguments = new Array(arguments.length);\n for (var __argumentIndex = 0; __argumentIndex < __arguments.length; ++__argumentIndex) {\n __arguments[__argumentIndex] = arguments[__argumentIndex];\n }\n if (__arguments.length == 2) {\n var adjustmentTime_1 = __arguments[0];\n var offset_1 = __arguments[1];\n //super();\n this.fmliveswitchsdpTimeZoneInit();\n this.setAdjustmentTime(adjustmentTime_1);\n this.setOffset(offset_1);\n }\n else {\n throw new fm.liveswitch.Exception('Constructor overload does not exist with specified parameter count/type combination.');\n }\n }", "function clock(){\r\n var date = new Date()\r\n var hour = date.getHours()\r\n var minutes = date.getMinutes()\r\n var seconds = date.getSeconds()\r\n var utcOffset = Number((date.getTimezoneOffset())/60) //convert timezone of minutes to hours\r\n\r\n //Mechanism to format the time in digital clock\r\n if(hour<10){\r\n hour = \"0\"+hour\r\n }\r\n if(minutes<10){\r\n minutes = \"0\"+minutes\r\n }\r\n if(seconds<10){\r\n seconds = \"0\"+seconds\r\n }\r\n\r\n //Switch the timezone's country\r\n switch(utcOffset){\r\n case 3:\r\n document.getElementById(\"utcOffset\").textContent = \"(UTC-03:00 - Brasil)\";\r\n break;\r\n default:\r\n document.getElementById(\"utcOffset\").textContent = \"(Outro país)\";\r\n }\r\n\r\n //Format the time in digital clock and apply this time in web page\r\n var clockTime = hour+\":\"+minutes+\":\"+seconds\r\n document.getElementById(\"clock\").textContent = clockTime\r\n}", "function DiscountFactory() {\r\n\t\r\n}", "instantiateMDC () {}", "function initializeClock(id, endtime) {\n clearAllIntervals();\n $('.workoutman--animated').show();\n $('.workoutman--still').hide();\n\n let clock = document.getElementById(id);\n let minutesEl = clock.querySelector('.minutes');\n let secondsEl = clock.querySelector('.seconds');\n\n function updateClock() {\n let t = getTimeRemaining(endtime);\n minutesEl.innerHTML = ('0' + t.minutes).slice(-2);\n secondsEl.innerHTML = ('0' + t.seconds).slice(-2);\n\n if (t.total <= 0) {\n window.clearInterval(timeInterval);\n // $('.timesup').removeClass('hide');\n // $('.illo--animated').hide();\n // $('.illo--still').show();\n showOutOfTime();\n }\n }\n updateClock();\n let timeInterval = setInterval(updateClock, 1000);\n activeIntervals.push(timeInterval)\n }", "constructor() { \n \n CandleStick.initialize(this);\n }", "function drawClock(ctx, radius) {\n\n //var smallerRadius = radius * 0.80; // make clock slightly smaller than container\n drawFace(ctx, radius);\n drawNumbers(ctx, radius);\n drawBottomButtons2(ctx, radius);\n drawTime(ctx, radius, now);\n //drawTime(ctx, radius);\n}", "function Timer(state, runTime) {\n // Public properties, assigned to the instance ('this')\n this.state = state;\n this.runTime = runTime;\n //this.cardId = cardId;\n this.timeManager = \"\";\n }", "function createTimer() {\n debug(\"createTimer\");\n clock = document.createElement('span');\n clock.setAttribute(\"class\", \"timer\");\n clock.innerHTML = \"0 Seconds\";\n\n document.querySelector('.score-panel').appendChild(clock);\n startTime();\n }", "function Zt(){}", "function setupClock_3() {\n var objClockOptions;\n\n objClockOptions =\n {\n size: 200,\n\n centerColor: '#21344b',\n centerRadius: 5,\n centerStrokeWidth: 3,\n centerStrokeOpacity: 0.8,\n\n hourLength: 40, // the length of the image\n hourColor: '#FF0000',\n hourStrokeWidth: 8,\n hourStrokeOpacity: 0.8,\n\n minuteColor: '#ffff00',\n minuteLength: 60, // the length of the image\n minuteStrokeWidth: 5,\n minuteStrokeOpacity: 0.8,\n\n secondLength: 75, // the length of the image\n secondColor: '#d0d7e1',\n secondStrokeWidth: 2,\n secondStrokeOpacity: 0.9,\n\n speed: 400,\n allowMinuteFullRotation: false,\n hourDraggable: true,\n minuteDraggable: true,\n\n onHourDragStart: onHourDragStart_3,\n onHourDragMove: onHourDragMove_3,\n onHourDragEnd: onHourDragEnd_3,\n onMinuteDragStart: onMinuteDragStart_3,\n onMinuteDragMove: onMinuteDragMove_3,\n onMinuteDragEnd: onMinuteDragEnd_3\n };\n\n\n objClock_4 = new Clock('CLOCK_HOLDER_4', objClockOptions);\n objClockOptions.minuteDragSnap = 1; // additional option for Clock 5\n\n objClock_5 = new Clock('CLOCK_HOLDER_5', objClockOptions);\n objClockOptions.minuteDragSnap = 15; // additional option for Clock 6\n\n objClock_6 = new Clock('CLOCK_HOLDER_6', objClockOptions);\n\n $('#CLOCK_HOUR_4, #CLOCK_MINUTE_4').bind('change', function () {\n objClock_4.setTime($(\"#CLOCK_HOUR_4\").val(), $(\"#CLOCK_MINUTE_4\").val());\n $('#CLOCK_EVENT_4').html('Clock time changed using pulldown menu');\n });\n\n $('#CLOCK_HOUR_5, #CLOCK_MINUTE_5').bind('change', function () {\n objClock_5.setTime($(\"#CLOCK_HOUR_5\").val(), $(\"#CLOCK_MINUTE_5\").val());\n $('#CLOCK_EVENT_5').html('Clock time changed using pulldown menu');\n });\n\n $('#CLOCK_HOUR_6, #CLOCK_MINUTE_6').bind('change', function () {\n objClock_6.setTime($(\"#CLOCK_HOUR_6\").val(), $(\"#CLOCK_MINUTE_6\").val());\n $('#CLOCK_EVENT_6').html('Clock time changed using pulldown menu');\n });\n\n\n // reset the pulldown menus, in case of a browser refresh\n $('#CLOCK_HOUR_4').val(objClock_4.hour.value);\n $('#CLOCK_MINUTE_4').val(objClock_4.minute.value);\n\n $('#CLOCK_HOUR_5').val(objClock_5.hour.value);\n $('#CLOCK_MINUTE_5').val(objClock_5.minute.value);\n\n $('#CLOCK_HOUR_6').val(objClock_6.hour.value);\n $('#CLOCK_MINUTE_6').val(objClock_6.minute.value);\n}", "function Cb(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?(\"string\"===typeof b?b=zb(Qe,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Bb(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,\"m\"),e!==b&&(!c||this._changeInProgress?Sb(this,Nb(b-e,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Bb(this):null!=b?this:NaN}", "function digital_clock() {\n var today=new Date();\n var option={timeZone:'Asia/kolkata'};\n var time=today.toLocaleTimeString('en-US',options);\n document.querySelector('#clock').textContent=time;\n}", "function initClock(){\n \n console.debug(\"Loaded Clock\")\n\tClockAPI.Numbers.getNumbers(function(json){\n\tnum = new Array();\t\n\t$.each(json, function(i){\n\t\tvar urls = new Array();\n\t\tfor ( a=0; a < this.length; a++ )\n\t\t{\n\t\t urls.push(this[a][\"URL\"]);\n\t\t}\n\t\tnum.push(urls);\n\t});\n\t\n\tstartClock();\n\n\t});\n}", "function Clock(tickSize) {\n this.tickSize = tickSize;\n this.prevTime = (new Date()).getTime();\n this.timer = null;\n // prevents additional ticks after stop() is called\n this.stopNextTick = false;\n this.onTick = function(){};\n}", "create () {}", "create () {}", "function createNgZone() {\n return new ng_zone_1.NgZone({ enableLongStackTrace: lang_1.assertionsEnabled() });\n}", "function MDCT(length) {\n this.N = length;\n this.N2 = length >>> 1;\n this.N4 = length >>> 2;\n this.N8 = length >>> 3;\n \n switch (length) {\n case 2048:\n this.sincos = MDCT_TABLE_2048;\n break;\n \n case 256:\n this.sincos = MDCT_TABLE_256;\n break;\n \n case 1920:\n this.sincos = MDCT_TABLE_1920;\n break;\n \n case 240:\n this.sincos = MDCT_TABLE_240;\n break;\n \n default:\n throw new Error(\"unsupported MDCT length: \" + length);\n }\n \n this.fft = new FFT(this.N4);\n \n this.buf = new Array(this.N4);\n for (var i = 0; i < this.N4; i++) {\n this.buf[i] = new Float32Array(2);\n }\n \n this.tmp = new Float32Array(2);\n}", "function createDeck() {\n\treturn {\n\t\t\"shareCode\": 20,\n\t\t\"image\": \"\",\n\t\t\"created\": new Date(),\n\t\t\"title\": \"\",\n\t\t\"anki\": false,\n\t\t\"ankiDate\": \"\",\n\n\t\t\"cards\": []\n\t};\n}", "constructor(props){\n super(props);\n this.state = {\n data: null,\n clock: new Date()\n };\n}", "function startClock(){\n\tt = getTime();\n\tsetNum(\"sec2\" ,t[\"s2\"]);\n\tsetNum(\"sec1\" ,t[\"s1\"]);\n\tsetNum(\"min2\" ,t[\"m2\"]);\n\tsetNum(\"min1\" ,t[\"m1\"]);\n\tsetNum(\"hours2\" ,t[\"h2\"]);\n\tsetNum(\"hours1\" ,t[\"h1\"]);\n\tupdateTimer = setTimeout(\"updateClock()\",5000)\n\t //console.debug(\"called startClock\");\n\tclock();\n}" ]
[ "0.5641572", "0.5471911", "0.53663963", "0.52661705", "0.52459407", "0.5147853", "0.5140225", "0.51113576", "0.5110032", "0.50638914", "0.4969592", "0.49694657", "0.49343893", "0.4905503", "0.4877259", "0.48505768", "0.48271105", "0.48216093", "0.48194742", "0.47990417", "0.47701252", "0.47477332", "0.47291365", "0.47135133", "0.4713426", "0.46913466", "0.46583322", "0.46269318", "0.46239144", "0.46158323", "0.46001595", "0.45755732", "0.45607734", "0.4542823", "0.45401445", "0.4517035", "0.4509615", "0.4509408", "0.45044842", "0.44908595", "0.44776088", "0.44728738", "0.44691578", "0.44644165", "0.44640216", "0.44591975", "0.4456358", "0.4456358", "0.4446834", "0.4446588", "0.4446588", "0.4446588", "0.4446588", "0.4446588", "0.4446588", "0.4446588", "0.44397143", "0.44324967", "0.44246227", "0.4405467", "0.4405467", "0.44035748", "0.44010383", "0.43961692", "0.438292", "0.43669555", "0.43561864", "0.43485978", "0.43424845", "0.43262234", "0.4314476", "0.43068746", "0.42942458", "0.42913046", "0.42894465", "0.42866597", "0.4284078", "0.42819375", "0.42792046", "0.42778632", "0.42760003", "0.42741773", "0.42716652", "0.42697594", "0.42627987", "0.42607492", "0.42601067", "0.42596602", "0.4253742", "0.42516425", "0.4243225", "0.42367303", "0.4227847", "0.42269593", "0.42269304", "0.42269304", "0.42221573", "0.42185625", "0.42099234", "0.42018795", "0.4197752" ]
0.0
-1
Override connectedCallback function to handle when component is attached into the DOM.
connectedCallback() { // Create parts this._create(); // Update to the current time this._update(); // Start clock this._timerId = setInterval(this._update, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connectedCallback() {\n // Do things when component is added to the DOM\n }", "connectedCallback() {\r\n\t\t\tthis._domAttached = true;\r\n\t\t}", "connectedCallback(){\n\n //Though here DOM is inserted, but not rendered, so you can change the attribute \n //but you cannot manipulate the DOM \n\n //You can not programatically add or remove the element \n console.log(\"Child's Component's Connected Callback is Called!\");\n }", "connectedCallback() {\n\t\tif (this.attached) return;\n\t\t// \"this\" will be the instance of the tag that extends BaseComponent.\n\t\tBaseComponent.buildReverseBindings(this);\n\t\tthis.attached = true;\n\t}", "attachedCallback() {\n this.connectedCallback();\n }", "connectedCallback() {\n self.addComponentContent()\n }", "connectedCallback() {\r\n this.addComponentContent()\r\n }", "attachedCallback() {\r\n this.connectedCallback()\r\n }", "attachedCallback() { self.connectedCallback() }", "connectedCallback() {\n // Using this pattern as it seems that the component\n // is immune to overriding connectedCallback at runtime.\n // Most probably the browser keeps a reference to connectedCallback\n // existing/defined at the time of upgrading and calls that one instead of the\n // latest (monkey patched / runtime evaluated) one.\n // Now, we can monkey patch onConnectedCallback if we want.\n this._onConnectedCallback();\n }", "connectedCallback() {\n // Detect super?\n if (this.addEvents) this.addEvents();\n }", "connectedCallback() {\n\t\t\t// Call `this.render` if this element doesn't use a Shadow DOM.\n\t\t\tif (!this.shadowRootMode) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t}", "connectedCallback () {\n // This allows the elements to be detatched/reattached without losing\n // handlers.\n this._listeners.forEach(([evt, f]) => this.addEventListener(evt, f));\n\n // Allows element to be detatched and reattached while automatically cleaning up\n // on eventual deletion.\n this._mutationObservers.forEach(([o, target, conf]) => o.observe(target, conf));\n }", "connectedCallback() {\n this.renderAndUpdateDom();\n }", "connectedCallback() {\n\t\tif (this.parentNode.sequenceAdd) {\n\t\t\tthis.parentNode.sequenceAdd(this);\n\t\t}\n\t}", "connectedCallback() {\n\t\t// super.connectedCallback()\n\t}", "connectedCallback() {\n this.setAttributes();\n super.connectedCallback();\n }", "async connectedCallback() {\n const ctor = this.constructor;\n this.setAttribute(`_ui5rt${(0, _Runtimes.getCurrentRuntimeIndex)()}`, \"\");\n this.setAttribute(\"_ui5host\", \"\");\n this.setAttribute(ctor.getMetadata().getPureTag(), \"\");\n if (ctor.getMetadata().supportsF6FastNavigation()) {\n this.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n }\n const slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n this._inDOM = true;\n if (slotsAreManaged) {\n // always register the observer before yielding control to the main thread (await)\n this._startObservingDOMChildren();\n await this._processChildren();\n }\n if (!this._inDOM) {\n // Component removed from DOM while _processChildren was running\n return;\n }\n (0, _Render.renderImmediately)(this);\n this._domRefReadyPromise._deferredResolve();\n this._fullyConnected = true;\n this.onEnterDOM();\n }", "connectedCallback() {\n this._defineUsedComponents();\n this._checkForUndefinedComponents();\n this.render();\n this.updateStyles();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n if (!this.isConnected) return;\n super.connectedCallback();\n \n }", "connectedCallback(){super.connectedCallback()}", "connectedCallback(){}", "connectedCallback() {\n if (this.$presentation !== null) {\n this.$presentation.applyTo(this);\n }\n super.connectedCallback();\n }", "connectedCallback() {\n \n }", "connected() {\n // implement if needed\n }", "connectedCallback() {\n super.connectedCallback();\n afterNextRender(this, function() {\n this.addEventListener(\"mousedown\", this.tapEventOn);\n this.addEventListener(\"mouseover\", this.tapEventOn);\n this.addEventListener(\"mouseout\", this.tapEventOff);\n this.$.button.addEventListener(\"focused-changed\", this.focusToggle);\n });\n }", "connectedCallback() {\n if (this.$presentation !== null) {\n this.$presentation.applyTo(this);\n }\n\n super.connectedCallback();\n }", "connectedCallback() {\n }", "connectedCallback () {\n super.connectedCallback();\n\n let ctrl = this.controlElement;\n if (ctrl) {\n ctrl.addEventListener('change', this._onCtrlChange);\n ctrl.addEventListener('blur', this._onCtrlBlur);\n }\n }", "connectedCallback()\n\t{\n\n\t}", "connectedCallback() {\n this.render();\n }", "connectedCallback() {\n\t\tthis._modal = this.shadowRoot.querySelector(\".modal\");\n\n\t\tthis.shadowRoot.querySelector(\".button-open\").addEventListener('click', this._toggleModalVisible.bind(this));\n\t\tthis.shadowRoot.querySelector(\".button-close\").addEventListener('click', this._toggleModalVisible.bind(this));\n\t}", "connectedCallback () {\n\n }", "connectedCallback() {\n this._update();\n }", "connectedCallback () {\n console.log('connected')\n\n this.render()\n }", "connectedCallback() {\n //\n }", "attachedCallback() {}", "attachedCallback() {}", "connectedCallback() {\n super.connectedCallback();\n this.initializeFun();\n }", "connectedCallback(){\r\n }", "connectedCallback(){\r\n }", "connectedCallback() {\n this.innerHTML = this.template();\n\n this.setComponent();\n this.defaultProperties();\n\n ccc.registerComponent(this, {\n id: this.id,\n secret: \"Card Parent\"\n });\n\n // If IntersectionObserver is available, initialize it.\n // otherwise, simply load the image.\n //if (\"IntersectionObserver\" in window) this.initIntersectionObserver();\n //else this.intersecting = true;\n }", "connectedCallback() {\n render(this.template(), this.shadowRoot);\n }", "connectedCallback () {\n this.template.render(this.attrs, this)\n .then(template => {\n this.shadowRoot.appendChild(template);\n return this._subTemplates();\n })\n .then(() => {\n if(typeof this.afterConnected === 'function')\n this.afterConnected();\n });\n }", "connectedCallback(){\n this.render()\n }", "async connectedCallback() {\n super.connectedCallback && super.connectedCallback();\n this.addEventListener('select-scene', this[$onSelectScene]);\n this.addEventListener('select-entity', this[$onSelectEntity]);\n this.addEventListener('select-renderer', this[$onSelectRenderer]);\n }", "connectedCallback() {\n super.connectedCallback();\n window.addEventListener(\"simple-drawer-hide\", this.close.bind(this));\n window.addEventListener(\"simple-drawer-show\", this.showEvent.bind(this));\n }", "connectedCallback () {\r\n if (this.shadowRoot.querySelector('p') !== null) {\r\n this.shadowRoot.querySelector('p').textContent = this.textContent\r\n }\r\n if (!this.hasAttribute('size')) {\r\n this.setAttribute('size', 'default')\r\n }\r\n if (!this.hasAttribute('type')) {\r\n this.setAttribute('type', 'default')\r\n }\r\n console.log('Component connected!')\r\n }", "onConnectedCallback() {\n if (this._isConnected) {\n return;\n }\n\n const element = this.element;\n\n if (this.needsInitialization) {\n this.finishInitialization();\n } else if (this.view !== null) {\n this.view.bind(element, defaultExecutionContext);\n }\n\n const behaviors = this.behaviors;\n\n if (behaviors !== null) {\n for (const [behavior] of behaviors) {\n behavior.bind(element, defaultExecutionContext);\n }\n }\n\n this.setIsConnected(true);\n }", "connectedCallback(){\n registerListener('productSelected', this.handleProductSelected, this); \n registerListener('areaSelect', this.handleNewArea, this);\n registerListener('appSelected', this.update, this); \n }", "connectedCallback() {\n // Prepare DOM\n this._prepareDOM();\n\n /* Set events listeners for the buttons */\n this.playBtn.addEventListener(\"click\", this.play);\n this.updateBtn.addEventListener(\"click\", this.update);\n this.deleteBtn.addEventListener(\"click\", this.delete);\n }", "connectedCallback() {\n this.connected = true;\n this.init();\n }", "connectedCallback() {\n this.connected = true;\n this.init();\n }", "connectedCallback () {\n this._setupNewGame(this._rows, this._cols)\n this._setupMemoryListeners()\n\n this._containerHeader.addEventListener('click', this._dropDownClick.bind(this))\n this._mainContainer.addEventListener('click', this._mainContainerClick.bind(this))\n this._mainContainer.addEventListener('windowRemoved', e => {\n this._userNameWindowOpen = false\n })\n }", "function handleConnectedCallback(element) {\n\t\tvar constructor = registry.get(element.localName);\n\t\tif (constructor !== undefined) {\n\t\t\tif (element.__upgraded__ === undefined)\n\t\t\t\tupgradeElement(element, constructor);\n\t\t\tif (typeof element.connectedCallback === \"function\") {\n\t\t\t\telement.connectedCallback();\n\t\t\t}\n\t\t}\n\t}", "connectedCallback() {\n // Initialize 'cartItems' list as soon as the component is inserted in the DOM.\n this.updateCartItems();\n }", "connectedCallback() {\n }", "connectedCallback() {\n }", "attachedCallback() {\n\t\t// update attached status\n\t\tthis._componentAttached = true;\n\n\t\t// wait until dependencies are ok\n\t\tthis._whenMountDependenciesAreOk().then(() => {\n\t\t\t// switch on the mountWhen prop\n\t\t\tswitch(this.props.mountWhen) {\n\t\t\t\tcase 'inViewport':\n\t\t\t\t__whenInViewport(this).then(() => {\n\t\t\t\t\tthis._mountComponent();\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t\tcase 'mouseover':\n\t\t\t\t\tthis.addEventListener('mouseover', this._onMouseoverComponentMount.bind(this));\n\t\t\t\tbreak;\n\t\t\t\tcase 'isVisible':\n\t\t\t\t\t__whenVisible(this).then(() => {\n\t\t\t\t\t\tthis._mountComponent();\n\t\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t// mount component directly\n\t\t\t\t\tthis._mountComponent();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}", "connectedCallback () {\n if (!this.hasAttribute('message')) {\n this.setAttribute('message', 'A simple hello from a web component.')\n }\n\n this._upgradeProperty('message')\n }", "async connectedCallback() {\n this.append(this.cssTemplate());\n await this.fetchData()\n let links = this.querySelectorAll(\"a\");\n links.forEach(link => this.addCustomEvent(link));\n }", "connectedCallback() {\n this.connected = true;\n\n if (this.needToInit) {\n this.init();\n }\n }", "connectedCallback() {\n \tsuper.connectedCallback();\n \t\n \tvar element = this;\n while(element.parentNode && (element = element.parentNode)) {\n if(element instanceof ShadowRoot){\n console.error(\"This element does not support shadow roots. Please use a <slot> for the element instead.\", element);\n }\n }\n }", "connectedCallback() {\n this.$backup = this.shadowRoot.querySelector(\"#backup\");\n this.$start = this.shadowRoot.querySelector(\"#start\");\n this.$end = this.shadowRoot.querySelector(\"#end\");\n this.$start.addEventListener(\"focus\", this.focusLastElement);\n this.$end.addEventListener(\"focus\", this.focusFirstElement);\n // Focus out is called every time the user tabs around inside the element\n this.addEventListener(\"focusin\", this.onFocusIn);\n this.addEventListener(\"focusout\", this.onFocusOut);\n this.render();\n }", "function connectedCallback () {\n const el = document.createElement('template');\n const text = String.raw`${template}`;\n if (!text) throw new Error('No template.');\n el.innerHTML = text;\n\n const root = this.attachShadow({ mode: 'open' });\n root.appendChild(el.content.cloneNode(true));\n\n this.nothing = root.querySelector('#nothing');\n setPadding(this)(this.getAttribute('padding'));\n setMessage(this)(this.getAttribute('message'));\n}", "connectedCallback() {\n // Trigger show event\n this.dispatchCustomEvent('tk.alert.show');\n this.setAttribute('role', 'alert');\n this.classList.add('tk-alert--show');\n\n // If no type has been defined, the default as \"info\"\n if (!this.type) {\n this.setAttribute('type', 'info');\n }\n\n // Append button\n if (this.hasAttribute('dismiss') || this.hasAttribute('acknowledge') || (this.hasAttribute('href') && this.getAttribute('href') !== '')) {\n if (!this.querySelector('button.tk-alert--close') && !this.querySelector('button.tk-alert-button--close')) {\n this.appendCloseButton.bind(this)();\n }\n }\n\n // Trigger shown event\n this.dispatchCustomEvent('tk.alert.show');\n\n if (this.closeButton) {\n this.closeButton.focus();\n }\n }", "connectedCallback () {\n this.log_('connected');\n this.connected_ = true;\n }", "connectedCallback () {\n this.addEventListener('click', this._cardClicked)\n }", "connectedCallback() {\n super.connectedCallback();\n this.__a11y = this.shadowRoot.querySelector(\"#button\");\n }", "connectedCallback() {\n this.classList.add('panel-group');\n this.setAttribute('role', 'tablist');\n this.setAttribute('aria-multiselectable', 'true');\n\n // catch bubbled events\n this.addEventListener('pf-accordion.expanding', this._handlePanelShown);\n this.addEventListener('pf-accordion.collapsing', this._handlePanelHidden);\n\n this._observer.observe(this, {\n childList: true\n });\n\n if (this.hasAttribute('fixedheight')) {\n // _initialized is raised after _initFixedHeight\n this._initFixedHeight();\n } else {\n this._initialized = true;\n this.dispatchEvent(new Event('pf-accordion.initialized'));\n }\n }", "connectedCallback() {\n window.adaptiveElements = window.adaptiveElements || Array();\n this.addEventListener('adaptiveUpdate', this._adaptiveChangeCallback, false);\n window.adaptiveElements.push(this);\n // Attach callback:\n this._pipeCallback('onCreate');\n }", "connectedCallback() {\n const root = this.shadowRoot;\n this._checkbootstrap(root);\n }", "connectedCallback() {\n super.connectedCallback();\n this.addEventListener(this._leaveEvent, this._iStateOnLeave);\n this.addEventListener(this._valueChangedEvent, this._iStateOnValueChange);\n this.initInteractionState();\n }", "connectedCallback() {\n super.connectedCallback();\n LocalizationHelper.onStringsUpdated(this.handleLocalizationChanged);\n LocalizationHelper.onDirectionUpdated(this.handleDirectionChanged);\n }", "connectedCallback() {\n super.connectedCallback();\n this.addEventListener('keydown', this._keyEventHandler.bind(this));\n this.addEventListener('keyup', this._keyEventHandler.bind(this));\n }", "connectedCallback() {\n // console.debug(`${this.Class} is connected`);\n this.findParent('md-parent');\n }", "connectedCallback() {\n this.innerHTML = this.render();\n\n }", "connectedCallback() {\n if (this.__dataEnabled || !this.hasAttribute(DISABLED_ATTR)) {\n super.connectedCallback();\n }\n }", "connectedCallback () {\n this.shadowRoot.querySelector('#playername').focus()\n\n this._onClickBrick = e => {\n this._clickBrick(e)\n }\n\n this._onPressEnterBrick = e => {\n this._pressEnterBrick(e)\n }\n\n this._onClickStartButton = e => {\n this._clickStartButton(e)\n }\n\n this.shadowRoot.addEventListener('click', this._onClickBrick)\n this.shadowRoot.addEventListener('keyup', this._onPressEnterBrick)\n this._startButton.addEventListener('click', this._onClickStartButton)\n }", "connectedCallback() {\n console.log('inside connectedCallback');\n this._content = document.createElement('span');\n this._content.innerText = 'Counter';\n this._content.className = 'counter-disabled';\n this.appendChild(this._content);\n\n this._upgradeProperty('value');\n this._upgradeProperty('interval');\n\n this.addEventListener('click', this._onClick);\n }", "connectedCallback () {\n this.appendChild(this._template.content);\n }", "connectedCallback() {\n this.subscribeToMessageChannel();\n }", "connectedCallback() {\n super.connectedCallback();\n const modal = window.SimpleModal.requestAvailability();\n this.$.list.addEventListener(\n \"editable-list-item-delete\",\n this.triggerDeleteModal.bind(this)\n );\n }", "connectedCallback() {\n super.connectedCallback?.();\n\n /* istanbul ignore next */\n if (this.reset) {\n this.#addReset();\n }\n }", "connectedCallback() {\n this.shadowRoot.querySelector('#toggle-info').addEventListener('click', () => this.toggleInfo());\n }", "connectedCallback() {\n let element = $(this);\n this.connected = true;\n this.gridId = element.attr('gridId');\n if (element.attr('manualInit') != 'true') {\n this.init();\n }\n }", "connectedCallback() {\n if (window.ShadyCSS) {\n window.ShadyCSS.styleElement(this);\n }\n }", "connectedCallback() {\n this.addEventListener('wheel', (e) => this.mouseWheelHandler(e))\n this.addEventListener('transitionend', () => this.setScroll())\n }", "connectedCallback() {\n this.innerHTML = `<div>Hello world!</div>`;\n }" ]
[ "0.8603147", "0.81673336", "0.8071765", "0.8056886", "0.79146945", "0.78885263", "0.78766465", "0.7840403", "0.78308374", "0.7818974", "0.7813992", "0.76180124", "0.7584181", "0.7568622", "0.7550421", "0.7505771", "0.7474685", "0.7424241", "0.7381253", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.7378645", "0.73471105", "0.73100895", "0.72754014", "0.7258141", "0.72306925", "0.7225483", "0.71691054", "0.7164684", "0.7160573", "0.71536595", "0.7085646", "0.70821905", "0.7057487", "0.70514745", "0.7044673", "0.7037045", "0.70301366", "0.70270264", "0.70270264", "0.7022911", "0.7005928", "0.7005928", "0.69965315", "0.6969037", "0.69523597", "0.6935421", "0.6921062", "0.69107103", "0.69063735", "0.69044787", "0.6902439", "0.6901348", "0.6897597", "0.6897597", "0.6895736", "0.68865865", "0.6865892", "0.68563795", "0.68563795", "0.68108034", "0.67760646", "0.6772992", "0.67586935", "0.6757196", "0.6747232", "0.67444307", "0.67397434", "0.6727581", "0.6720193", "0.6716654", "0.67151904", "0.670777", "0.6703575", "0.66602784", "0.66370493", "0.6622019", "0.6621578", "0.6588243", "0.65805525", "0.6575674", "0.65672606", "0.6552998", "0.6547575", "0.65334475", "0.6533268", "0.65308017", "0.65099776", "0.64840484", "0.6481263", "0.6476881" ]
0.0
-1
Override disconnectedCallback function to handle when component is detached from the DOM.
disconnectedCallback() { // If timer exists if (this.timerId) { // Clear timer clearInterval(this._timerId); // Remove timer id delete this._timerId; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disconnectedCallback () {\r\n console.log('Component disconnect!')\r\n }", "disconnectedCallback() {\n // Detect super?\n if (this.removeEvents) this.removeEvents();\n }", "disconnectedCallback () {\n this._shadowElement = null;\n this._listeners.forEach(([evt, f]) => this.removeEventListener(evt, f));\n this._mutationObservers.forEach(([o]) => o.disconnect());\n }", "disconnectedCallback() {\n this.setupWindowEvents(false);\n super.disconnectedCallback();\n }", "disconnectedCallback () {\n super.disconnectedCallback();\n\n let ctrl = this.controlElement;\n if (ctrl) {\n ctrl.removeEventListener('change', this._onCtrlChange);\n ctrl.removeEventListener('blur', this._onCtrlBlur);\n }\n }", "disconnectedCallback() {\n super.disconnectedCallback();\n }", "disconnectedCallback() {\n const ctor = this.constructor;\n const slotsAreManaged = ctor.getMetadata().slotsAreManaged();\n this._inDOM = false;\n if (slotsAreManaged) {\n this._stopObservingDOMChildren();\n }\n if (this._fullyConnected) {\n this.onExitDOM();\n this._fullyConnected = false;\n }\n if (this.staticAreaItem && this.staticAreaItem.parentElement) {\n this.staticAreaItem.parentElement.removeChild(this.staticAreaItem);\n }\n (0, _Render.cancelRender)(this);\n }", "disconnectedCallback() {\n super.disconnectedCallback();\n }", "disconnectedCallback(){\n \n }", "disconnectedCallback(){\n \n }", "disconnectedCallback(){\n \n }", "disconnectedCallback() {\n\t\tthis.attached = false;\n\t\tif (this.context) {\n\t\t\tfor (var i = 0; i < this.eventListeners.length; i++) {\n\t\t\t\tthis.context.stx.removeEventListener(this.eventListeners[i]);\n\t\t\t}\n\t\t}\n\t}", "disconnectedCallback() {\n this.removeEventListener('change', this._onChange);\n }", "disconnectedCallback() {\n // Attach callback:\n this._pipeCallback('onDisconnect');\n }", "disconnectedCallback() {\n \n }", "disconnectedCallback() {\n this._onDisconnectedCallback();\n }", "disconnectedCallback() { \n this.remove();\n //this.disconnectObserver();\n }", "disconnectedCallback() {\n if (this.firstChild.tagName && this.firstChild.tagName.toLowerCase() === 'button') {\n this.firstChild.removeEventListener('click', this.buttonCloseFn);\n }\n }", "disconnectedCallback () {\n /* Clears any remaining event listeners when element is removed from DOM */\n clearInterval(this._updateCounter)\n clearTimeout(this._counterTimeout)\n }", "disconnectedCallback() {\n super.disconnectedCallback();\n ipc.removeListener('search-count', this._searchCoundHandler);\n ipc.removeListener('focus-input', this._focusHandler);\n this.removeEventListener('keydown', this._keydownHandler);\n }", "disconnectedCallback() {\n\t\tthis.shadowRoot.querySelector(\".button-open\").removeEventListener('click', this._toggleModalVisible);\n\t\tthis.shadowRoot.querySelector(\".button-close\").removeEventListener('click', this._toggleModalVisible);\n\t}", "disconnectedCallback() {\n this.unsubscribeToMessageChannel();\n }", "disconnectedCallback () {\n this._close.removeEventListener('click', this._closeWindow)\n }", "disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener(\"simple-drawer-hide\", this.close.bind(this));\n window.removeEventListener(\"simple-drawer-show\", this.showEvent.bind(this));\n }", "disconnectedCallback () {\n }", "disconnectedCallback() {\n console.log('inside disconnectedCallback');\n this.stop();\n this.removeEventListener('click', this._onClick);\n }", "disconnectedCallback() {\n super.disconnectedCallback();\n LocalizationHelper.removeOnStringsUpdated(this.handleLocalizationChanged);\n LocalizationHelper.removeOnDirectionUpdated(this.handleDirectionChanged);\n Providers.removeProviderUpdatedListener(this.handleProviderUpdates);\n Providers.removeActiveAccountChangedListener(this.handleActiveAccountUpdates);\n }", "disconnectedCallback(){}", "disconnectedCallback(){}", "disconnectedCallback(){}", "disconnectedCallback()\n\t{\n\n\t}", "disconnectedCallback()\n\t{\n\n\t}", "disconnectedCallback()\n\t{\n\n\t}", "disconnectedCallback()\n\t{\n\n\t}", "disconnectedCallback(){super.disconnectedCallback()}", "disconnectedCallback(){super.disconnectedCallback()}", "disconnectedCallback() {\n //\n }", "disconnectedCallback(){\n\t\t\t\n\t\t}", "disconnectedCallback() {\n // Cleanup: we clear our interval, else it will continue even if the node got detached!\n clearInterval(this.timer);\n }", "disconnectedCallback() { }", "disconnectedCallback () {\n\n }", "disconnectedCallback() {\n if (this.__dataEnabled) {\n super.disconnectedCallback();\n }\n }", "disconnectedCallback() {\n }", "disconnectedCallback() {\n }", "disconnectedCallback() {\n }", "disconnectedCallback() {\n }", "disconnectedCallback() {\n this._observer.disconnect();\n window.removeEventListener('resize', this._fixedHeightListener);\n }", "disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this._keyEventHandler.bind(this));\n this.removeEventListener('keyup', this._keyEventHandler.bind(this));\n }", "disconnectedCallback() {\n this.removeEventListener(\"mousedown\", this.tapEventOn);\n this.removeEventListener(\"mouseover\", this.tapEventOn);\n this.removeEventListener(\"mouseout\", this.tapEventOff);\n this.$.button.removeEventListener(\"focused-changed\", this.focusToggle);\n super.disconnectedCallback();\n }", "disconnectedCallback() {\n console.log('disconnectedCallback called')\n }", "onDisconnectedCallback() {\n if (!this._isConnected) {\n return;\n }\n\n this.setIsConnected(false);\n const view = this.view;\n\n if (view !== null) {\n view.unbind();\n }\n\n const behaviors = this.behaviors;\n\n if (behaviors !== null) {\n const element = this.element;\n\n for (const [behavior] of behaviors) {\n behavior.unbind(element);\n }\n }\n }", "disconnectedCallback() {\n this.shadowRoot.querySelector('#toggle-info').removeEventListener('click', () => this.toggleInfo());\n }", "disconnectedCallback() {\n this.ancestor.dispatchEvent(Events.createLeaving(this));\n }", "disconnectedCallback() {\n unsubscribe(this.subscription);\n this.subscription = null;\n }", "disconnectedCallback() {\n }", "disconnectedCallback() {\n }", "disconnectedCallback() {\n\n }", "disconnectedCallback() {\n\n }", "disconnectedCallback() {\r\n console.log('disconnectedCallback called')\r\n }", "disconnected() {\n // implement if needed\n }", "disconnectedCallback () {\n console.log('disconnected')\n }", "disconnectedCallback () {\r\n this.removeEventListener('click', this._flipCard)\r\n this.removeEventListener('keydown', this._onkeydown)\r\n }", "disconnectedCallback () {}", "disconnectedCallback () {\n this.removeEventListener('click', this._cardClicked)\n }", "disconnectedCallback() {\n // remove the event listener\n this.shadowRoot.getElementById(\"btn-toggle-info\").removeEventListener();\n }", "disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener('sherby-metadata', this.__metadataEventListener);\n }", "disconnectedCallback() {\n this.$.list.removeEventListener(\n \"editable-list-item-delete\",\n this.triggerDeleteModal.bind(this)\n );\n }", "detachedCallback() {\n\t\t// update attached status\n\t\tthis._componentAttached = false;\n\t\t// will unmount\n\t\tthis.componentWillUnmount();\n\t\t// wait next frame\n\t\tthis.mutate(() => {\n\t\t\t// unmount only if the component is mounted\n\t\t\tif ( ! this._componentMounted) return;\n\t\t\t// unmount\n\t\t\tthis.componentUnmount();\n\t\t\t// did unmount\n\t\t\tthis.componentDidUnmount();\n\t\t});\n\t}", "disconnectedCallback() {\n this.removeEventListener(\"click\", this.handleClick_);\n this.removeEventListener(\"keyup\", this.handleKeyup_);\n this.removeEventListener(\"keypress\", this.handleKeyPress_);\n document.addEventListener(customEvents.READY, this.toggleDisplay_);\n }", "disconnectedCallback() {\n this.$start.removeEventListener(\"focus\", this.focusLastElement);\n this.$end.removeEventListener(\"focus\", this.focusFirstElement);\n this.removeEventListener(\"focusin\", this.onFocusIn);\n this.removeEventListener(\"focusout\", this.onFocusOut);\n }", "disconnectedCallback() {}", "disconnectedCallback() {}", "disconnectedCallback() {\n console.log(\"disconnected Callback called\")\n\n }", "disconnectedCallback() {\n this.#mutationObserver.disconnect()\n this.#intersectionObserver.disconnect()\n }", "disconnectedCallback() {\n window.removeEventListener(\n `es-bridge-${name}-loaded`,\n this._x2jsLoaded.bind(this)\n );\n super.disconnectedCallback();\n }", "disconnectedCallback() {\n /* Remove events listeners for the buttons*/\n this.playBtn.removeEventListener(\"click\", this.play);\n this.updateBtn.removeEventListener(\"click\", this.update);\n this.deleteBtn.removeEventListener(\"click\", this.delete);\n }", "disconnectedCallback(){\n console.log(\"disconnected\");\n this.tooltipIcon.removeEventListener(\"mouseenter\", this._showtoolTip);\n this.tooltipIcon.removeEventListener(\"mouseleave\", this._hidetoolTip); \n }", "disconnectedCallback () {\n this.shadowRoot.removeEventListener('click', this._onClickBrick)\n this.shadowRoot.removeEventListener('keyup', this._onPressEnterBrick)\n this._startButton.removeEventListener('click', this._onClickStartButton)\n window.clearInterval(this._interval)\n }", "disconnectedCallback () {\n document.removeEventListener('keydown', this.keyDownFunction)\n document.removeEventListener('keyup', this.keyUpFunction)\n }", "disconnectedCallback() {\n\t\t\tsweep(this, getRoot(this));\n\t\t\tclosedShadowRoots.delete(this);\n\t\t}", "disconnectedCallback () {\n this._buttons.removeEventListener('click', this._createBoard)\n this._gameBoard.removeEventListener('flip', this._onFlip)\n this.removeEventListener('finished', this._onFinish)\n this._tryAgainBtn.removeEventListener('click', this._onTryAgain)\n }", "disconnectedCallback() {\n // @todo make sure we remove the items from the tour if the\n // element they are related to gets removed from the page\n super.disconnectedCallback();\n }", "disconnectedCallback () {\n this.log_('disconnected');\n\n // Clear all timers.\n this.forEachTimeoutID_((id) => {\n this.clearTimeout(id);\n });\n\n this.connected_ = false;\n }", "disconnectedCallback() {\n // nop\n }", "disconnectedCallback() {\n window.removeEventListener('click', this.removeModal);\n }", "disconnectedCallback() {\n console.log('Clean up work can be done here for example.');\n }", "disconnectedCallback(){\n console.log('childLwcDay10 disconnectedCallback');\n }", "disconnectedCallback() {\r\n\t\t\tconsole.log(\"deleted\");\r\n\t\t}", "disconnectedCallback() {\n back.removeEventListener();\n }", "disconnectCallback() {\n this._disconnectCallback && this._disconnectCallback();\n }", "onClientDisconnected(callback) {\n this.discCallback = callback;\n }", "async disconnectedCallback() {\n // unregister events\n this._button.removeEventListener(\"click\", this._doSomethingHandler);\n\n // free up pointers\n this._button = null;\n this._header = null;\n this._content = null;\n this._doSomethingHandler = null;\n }", "disconnectedCallback() {\n this.removeEventListener('submit', this.onSubmit)\n this.removeEventListener('formdata', this.onFormData)\n\n settingsStore.events.unSubscribe('searchPanelChange', this.onStateChange)\n }", "disconnectedCallback() {\n opt.removed.call(this.context);\n this.disconnectStore();\n }", "disconnectedCallback() {\n document.removeEventListener(\n customEvents.FILTER_SUBSCRIPTIONS, this.filterView_);\n }", "_onDisconnect () {\n this._disconnectEvents();\n }", "_onDisconnected() {\n this._watcher.stop();\n this.emit(\"disconnected\");\n }", "disconnectedCallback () {\n this.shadowRoot.removeEventListener('menuIconClick', (e) => this.addWindow(e))\n this.shadowRoot.removeEventListener('displayContextMenu', (e) => this.displayContextMenu(e))\n this.shadowRoot.removeEventListener('closeEvent', (e) => this.deleteWindow(e))\n this.shadowRoot.removeEventListener('closeAll', (e) => this.closeAll(e))\n this.shadowRoot.removeEventListener('minimizeAll', (e) => this.minimizeAll(e))\n this.shadowRoot.addEventListener('restoreWindow', (e) => this.restoreWindow(e))\n }", "c4uChildDisconnected(child) {}", "disconnectedCallback() {\n this._initialized = false // important for loading charts !\n if (this.updateTimer) {\n clearInterval(this.updateTimer)\n }\n }", "disconnectedCallback() {\n this._initialized = false // important for loading charts !\n if (this.updateTimer) {\n clearInterval(this.updateTimer)\n }\n }" ]
[ "0.80025643", "0.7850981", "0.7760064", "0.7722052", "0.7703584", "0.75908214", "0.7568651", "0.7538355", "0.7447083", "0.7447083", "0.7447083", "0.74400645", "0.74290204", "0.7419395", "0.7408694", "0.7400944", "0.7372546", "0.7362139", "0.73553926", "0.7346556", "0.73222655", "0.7276336", "0.7268705", "0.7265553", "0.72442794", "0.721192", "0.7197145", "0.7192586", "0.7192586", "0.7192586", "0.7182267", "0.7182267", "0.7182267", "0.7182267", "0.71765053", "0.71765053", "0.7165155", "0.7161474", "0.71614176", "0.7158754", "0.71554637", "0.7145887", "0.7142951", "0.7142951", "0.7142951", "0.7142951", "0.7141459", "0.71368027", "0.71006685", "0.709879", "0.7094875", "0.70933455", "0.7088154", "0.70695853", "0.70610315", "0.70610315", "0.70505935", "0.70505935", "0.70476073", "0.7040421", "0.70299387", "0.7006748", "0.6998679", "0.698212", "0.69706315", "0.69574547", "0.69568837", "0.695428", "0.69531846", "0.69423777", "0.6940406", "0.6940406", "0.68634903", "0.6862742", "0.68484706", "0.68263197", "0.68240744", "0.68041754", "0.6747292", "0.67429566", "0.67271125", "0.6725447", "0.6717923", "0.6682514", "0.6679803", "0.667603", "0.66738737", "0.66608906", "0.66504097", "0.6639283", "0.66263634", "0.66250694", "0.65958154", "0.65932673", "0.65861315", "0.6581085", "0.6573235", "0.65712774", "0.6564541", "0.6467795", "0.6467795" ]
0.0
-1
Create the DOM elements.
_create() { // Set show 24 hour clock let show24HourClock = false; // If there is a show 24 hour clock attribute if (this.hasAttribute('show24hour') === true) { // Set to show 24 hour clock show24HourClock = true; } // Create root DIV const rootDiv = document.createElement('div'); // Set root class if (show24HourClock === true) { // Set to use the root24 class rootDiv.setAttribute('class', 'root24'); } else { // Set to use the root12 class rootDiv.setAttribute('class', 'root12'); } // Create digit line element list this._digit = [4]; this._digit[0] = {}; this._digit[1] = {}; this._digit[2] = {}; this._digit[3] = {}; // Create digit DOM elements const digit1DomElement = this._createDigit(0); const digit2DomElement = this._createDigit(1); const dotsDomElement = this._createDots(); const digit3DomElement = this._createDigit(2); const digit4DomElement = this._createDigit(3); // Append DOM elements to the root DIV rootDiv.appendChild(digit1DomElement); rootDiv.appendChild(digit2DomElement); rootDiv.appendChild(dotsDomElement); rootDiv.appendChild(digit3DomElement); rootDiv.appendChild(digit4DomElement); // If showing 12 hour clock if (show24HourClock === false) { // Create AM PM DOM elements const ampmDomElement = this._createAmpm(); // Append to the root DIV rootDiv.appendChild(ampmDomElement); } // If there is a current root DIV if (this._rootDiv) { // Remove current root DIV from shadow DOM this._shadowRoot.removeChild(this._rootDiv); } // Set the new current root DIV this._rootDiv = rootDiv; // Add root DIV to shadow DOM this._shadowRoot.appendChild(this._rootDiv); // If there is a current time then remove it if (this._currentTime) delete this._currentTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createDOMElements() {\n\t\tthis.$control = $( this.template( this.controlOptions ) );\n\t\tthis.$sliderGroup = this.$control.find( '.slider-group' );\n\t\tthis.$units = this.$control.find( '.unit' );\n\t\tthis.$revert = this.$control.find( '.undo' );\n\t\tthis.$deleteSaved = this.$control.find( '.delete-saved .remove' );\n\t}", "function createElements() {\n var nodeNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n nodeNames[_i] = arguments[_i];\n }\n return nodeNames.map(function (name) { return document.createElement(name); });\n }", "createElements() {\n const priv = privatePool.get(this);\n const { rootElement, rootDocument } = this.instance;\n const originalStyle = rootElement.getAttribute('style');\n\n if (originalStyle) {\n rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions\n }\n\n addClass(rootElement, 'handsontable');\n\n priv.table = rootDocument.createElement('TABLE');\n addClass(priv.table, 'htCore');\n\n if (this.instance.getSettings().tableClassName) {\n addClass(priv.table, this.instance.getSettings().tableClassName);\n }\n\n this.THEAD = rootDocument.createElement('THEAD');\n priv.table.appendChild(this.THEAD);\n\n this.TBODY = rootDocument.createElement('TBODY');\n priv.table.appendChild(this.TBODY);\n\n this.instance.table = priv.table;\n\n this.instance.container.insertBefore(priv.table, this.instance.container.firstChild);\n }", "function createDOMElements(container) {\n let btnValues = [\n {value:'AC',className:'clear'},\n {value:'⌫',className:'del'},\n {value:'%',className:'operator'},\n {value:'/',className:'operator'},\n {value:'7',className:'number'},\n {value:'8',className:'number'},\n {value:'9',className:'number'},\n {value:'*',className:'operator'},\n {value:'4',className:'number'},\n {value:'5',className:'number'},\n {value:'6',className:'number'},\n {value:'-',className:'operator'},\n {value:'1',className:'number'},\n {value:'2',className:'number'},\n {value:'3',className:'number'},\n {value:'+',className:'operator'},\n {value:'0',className:'number'},\n {value:'.',className:'number'},\n {value:'=',className:'equal'}\n ]; \n //create a Div\n let content = $(\"<div></div>\") ;\n content.appendTo(container).attr(\"class\", \"mainDiv content\"+i) ;//add into container div\n let contentDiv = $(\".content\"+i) ;\n //create a span tag\n let historyBox = $(\"<span></span>\") ;\n historyBox.appendTo(contentDiv).attr(\"class\", \"previous-operand\" ) ;\n //create a input box\n let inputBox = $(\"<input></input>\") ;\n inputBox.appendTo(contentDiv).attr(\"class\", \"current-operand\").attr(\"type\" , \"text\").attr(\"placeholder\" , \"0.00\" ) ;\n //for loop to create a buttons\n for( let j = 0 ; j < btnValues.length ; j++ ) {\n let createBtn = $(\"<input></input>\") ;\n createBtn.appendTo(contentDiv).attr(\"type\",\"button\").attr(\"class\", btnValues[j].className).attr(\"value\", btnValues[j].value);\n } \n}", "function _buildElements() {\n\t\t\t_buildGroup(_settings.layout.left);\n\t\t\t_buildGroup(_settings.layout.right, -1);\n\t\t\t_buildGroup(_settings.layout.center);\n\t\t}", "createDom() {\n var tempElement = this.getDomHelper().createElement('temp');\n\n this.updateBeforeRedraw();\n\n tempElement.innerHTML = this.buildHTML(true);\n\n this.setElementInternal(this.getDomHelper().\n getFirstElementChild(tempElement));\n }", "function initElements() {\n\t\t//select\n\t\tselectWrapperElem = document.createElement(\"div\");\n\t\tselectWrapperElem.setAttribute(\"id\", \"picture-browser-select\");\n\t\tvar selectElem = document.createElement(\"select\");\n\t\tfor(var i = 0; i < folders.length; i++) {\n\t\t\tvar optionElem = document.createElement(\"option\");\n\t\t\toptionElem.setAttribute(\"value\", folders[i]);\n\t\t\toptionElem.innerHTML = folders[i];\n\t\t\tselectElem.appendChild(optionElem);\n\t\t}\n\t\tselectWrapperElem.appendChild(selectElem);\n\n\t\t//add event handler for select\n\t\tselectElem.onchange = function(event) {\n\t\t\tdisplayPhotos(selectElem.value);\n\t\t\treturn true;\n\t\t}\n\n\t\t//photo and list\n\t\tphotoElem = document.createElement(\"div\");\n\t\tphotoElem.setAttribute(\"id\", \"picture-browser-photo\");\n\t\tlistElem = document.createElement(\"div\");\n\t\tlistElem.setAttribute(\"id\", \"picture-browser-list\");\n\n\t\t//Actually add elements\n\t\tpictureElem.appendChild(selectWrapperElem);\n\t\tpictureElem.appendChild(photoElem);\n\t\tpictureElem.appendChild(listElem);\n\t}", "function buildDom()\n {\n /*\n DOM model that is built here:\n\n <div class=\"development white\" data-dev=\"1\">\n <div class=\"costs\">\n <div class=\"circle white\"> <span>1</span> </div>\n <div class=\"circle blue\"> <span>2</span> </div>\n <div class=\"circle green\"> <span>3</span> </div>\n <div class=\"circle red\"> <span>4</span> </div>\n <div class=\"circle black nocost\"><span>0</span></div>\n </div>\n <div class=\"prestige\"> <span>1</span> </div>\n </div>\n */\n\n this.domRoot = document.createElement('div');\n this.domRoot.className = 'development ' + _color(reward);\n\n var costs = document.createElement('div');\n costs.className = 'costs';\n this.domRoot.appendChild(costs);\n\n for(var i = 0; i < 5; i++)\n {\n var costDiv = document.createElement('div');\n costDiv.classList.add('circle');\n costDiv.classList.add(_color(i));\n costs.appendChild(costDiv);\n if(cost[i] === 0)\n {\n costDiv.classList.add('nocost');\n }\n var costValue = document.createElement('span');\n costValue.innerText = cost[i];\n costDiv.appendChild(costValue);\n }\n\n var pointsDiv = document.createElement('div');\n pointsDiv.className = 'prestige';\n this.domRoot.appendChild(pointsDiv);\n if(points > 0)\n {\n var pointsValue = document.createElement('span');\n pointsValue.innerText = points;\n pointsDiv.appendChild(pointsValue);\n }\n }", "generate() {\n const body = document.getElementsByTagName('body')[0];\n const div = document.createElement('div');\n div.id = this.id;\n div.style = \"width: fit-content; height: fit-content; background-color: #92a8d1; box-shadow: 10px 10px 5px #888888; text-align: center; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; padding: 20px; display: none;\";\n \n // Header\n const header = document.createElement(\"h2\");\n header.style = \"color: white;\";\n const headerTextNode = document.createTextNode(this.headerTitle);\n header.appendChild(headerTextNode);\n div.appendChild(header);\n \n // Thematic change\n const thematicChange = document.createElement(\"hr\");\n thematicChange.style = \"width: 100%;\";\n div.appendChild(thematicChange);\n \n // Line break\n const lineBreak = document.createElement(\"br\");\n div.appendChild(lineBreak);\n \n // Element(s)\n var tmpParagraph = undefined;\n var tmpElement = undefined;\n var tmpTextNode = undefined;\n this.elementList.forEach(function(element) {\n switch(element.tagName) {\n \n case \"button\":\n tmpParagraph = document.createElement(\"p\");\n tmpParagraph.innerHTML = \"<button onclick=\\\"\" + element.onClick + \"\\\">\" + element.text + \"</button>\";\n div.appendChild(tmpParagraph);\n break;\n \n case \"select\":\n tmpElement = \"\";\n for (var i = 0; i < element.value.length; i++) {\n tmpElement += \"<option value=\\\"\" + element.value[i] + \"\\\">\" + element.text[i] + \"</option>\";\n }\n \n tmpParagraph = document.createElement(\"p\");\n tmpParagraph.style = \"color: white;\";\n tmpParagraph.innerHTML = element.desc + \": <select id=\\\"\" + element.id +\"\\\" onchange=\\\"\" + element.onChange + \"\\\">\" + tmpElement + \"</select>\";\n div.appendChild(tmpParagraph);\n break;\n \n case \"p\":\n tmpParagraph = document.createElement(\"p\");\n tmpParagraph.style = \"color: white;\";\n tmpTextNode = document.createTextNode(element.text);\n tmpParagraph.appendChild(tmpTextNode);\n div.appendChild(tmpParagraph);\n break;\n \n default:\n tmpParagraph = document.createElement(\"p\");\n tmpParagraph.style = \"color: white;\";\n tmpTextNode = document.createTextNode(\"(Element not recognized)\");\n tmpParagraph.appendChild(tmpTextNode);\n div.appendChild(tmpParagraph);\n \n }\n }, this);\n \n body.appendChild(div);\n }", "createElements () {\n this.form = document.createElement('form')\n this.emojiIcon = document.createElement('div')\n this.emojiIcon.setAttribute('class', 'emojiIcon')\n this.emojiIcon.innerHTML = '😃' // emoji icon enabling choosing of a emoji\n this.emojiContainer = document.createElement('div')\n this.emojiContainer.setAttribute('class', 'emojiContainer')\n this.sendButton = document.createElement('button')\n this.sendButton.setAttribute('type', 'submit')\n this.sendText = document.createTextNode('Send')\n this.inputField = document.createElement('input')\n this.inputField.setAttribute('type', 'text')\n this.form.appendChild(this.inputField)\n this.sendButton.appendChild(this.sendText)\n this.form.appendChild(this.emojiIcon)\n this.form.appendChild(this.sendButton)\n this.container.appendChild(this.emojiContainer)\n this.container.appendChild(this.form)\n this.populateEmojiContainer()\n }", "createElements() {\n var shelf = document.createElement(\"div\");\n shelf.classList.add(\"shelf\");\n this.shelfItems.forEach(function (item) {\n shelf.appendChild(item.element);\n });\n this.element = shelf;\n }", "function createDomElements(discussion) {\n //create DOM elements\n var $li = $('<li>').addClass('collection-item');\n var $spanParticipants = $('<span>').addClass('disc-particpants');\n var $spanDescription = $('<span>').addClass('disc-description');\n var $buttonContainer = $('<span>').addClass('btn-container');\n var $deleteBtn = $('<i>').addClass('material-icons close');\n var $editBtn = $('<i>').addClass('material-icons edit-btn');\n\n //Add the text to each element\n $spanParticipants.text(discussion.participants.join(', '));\n $spanDescription.text(discussion.description);\n $deleteBtn.text('delete');\n $editBtn.text('edit');\n $buttonContainer.append($editBtn, $deleteBtn);\n $li.append($spanParticipants, $spanDescription, $buttonContainer);\n appendListToDOM($li);\n}", "function make_elements(obj){\n return [\n base.make_text_element('h3',obj.title),\n base.make_text_element('p', obj.description),\n base.make_text_element('p', obj.publishedAt),\n base.make_image(obj.urlToImage)\n ]\n }", "function createCardElements() {\n var wikiLink = d.createElement(\"a\"); // creates link tag\n var card = d.createElement(\"div\"); // creates div tag\n var cardTitle = d.createElement(\"p\"); // creates title \n var cardDescription = d.createElement(\"p\"); // creates description\n setAttributes(card, cardTitle, cardDescription, wikiLink);\n generateCard(card, cardTitle, cardDescription, wikiLink);\n }", "function buildDom()\n {\n // main container\n elDom = utils.create( 'dialog', { class: 'lightbox', 'aria-hidden': 'true' });\n document.body.appendChild( elDom );\n\n // header\n elHeader = utils.create( 'header', { class: 'lightbox__header' });\n elHeader.classesToRemove = [];\n elDom.appendChild( elHeader );\n\n // content\n elContent = utils.create( 'div', { class: 'lightbox__content' });\n elDom.appendChild( elContent );\n\n // footer\n elFooter = utils.create( 'footer', { class: 'lightbox__footer' });\n elFooter.classesToRemove = [];\n elDom.appendChild( elFooter );\n\n // close button\n const elClose = utils.create( 'button', { class: 'lightbox__close', type: 'button' });\n elClose.appendChild( icon( 'times' ));\n elClose.addEventListener( 'click', close );\n elDom.appendChild( elClose );\n }", "createDOM() {\n // outer element hosts the node itself, css background colors,\n // border etc. will be applied here.\n this.domElement = document.createElement('div');\n this.domElement.node = this;\n this.domElement.classList.add('node');\n this.graph.domElement.appendChild(this.domElement);\n\n // content element has the title for the node and maybe some more UI\n // it is centered in the node in css.\n this.content = document.createElement('div');\n this.content.classList.add('node_content');\n this.domElement.appendChild(this.content);\n this.addDragAndDrop();\n }", "createContainers() {\n extensionElements.controlsContainer = document.createElement('div');\n extensionElements.controlsContainer.classList.add('toyplug-controls-container');\n\n extensionElements.controlsContainerHeader = document.createElement('div');\n extensionElements.controlsContainerHeader.classList.add('ste-header');\n extensionElements.controlsContainer.appendChild(extensionElements.controlsContainerHeader);\n\n extensionElements.timeWrapper = document.createElement('div');\n extensionElements.timeWrapper.classList.add('time-slider');\n extensionElements.controlsContainer.appendChild(extensionElements.timeWrapper);\n\n extensionElements.mouseSlidersWrapper = document.createElement('div');\n extensionElements.mouseSlidersWrapper.classList.add('mouse-uniforms');\n extensionElements.controlsContainer.appendChild(extensionElements.mouseSlidersWrapper);\n\n extensionElements.controlsContainerFooter = document.createElement('div');\n extensionElements.controlsContainerFooter.classList.add('ste-footer');\n extensionElements.controlsContainer.appendChild(extensionElements.controlsContainerFooter);\n\n shaderToyElements.leftColumnContainer.insertBefore(extensionElements.controlsContainer, shaderToyElements.shaderInfo);\n }", "createNodeAndListeners() {\n // Create button node\n this.createNode();\n // Remove text node from div prior to set up of arrows and body\n this.node.textContent = '';\n // Create arrows and svg text\n this.createLeftArrow();\n this.node.appendChild(this.leftArrow.node);\n this.createBody();\n this.node.appendChild(this.buttonBody);\n this.createRightArrow();\n this.node.appendChild(this.rightArrow.node);\n // Button values set externally from spec (e.g. on switch to page)\n if (this.text === false) {\n // Remove text node\n this.text = '';\n this.values = [];\n // Button values set internally from spec (e.g. list of set values)\n } else {\n this.setValues(this.values);\n }\n }", "function generateHTMLElements() {\n // select page header\n const searchContainer = pageContainer.querySelector('.page-header');\n // create div element for search function\n let searchDiv = document.createElement('div');\n // create search input\n searchInput = document.createElement('input');\n // create info message placeholder\n infoMessage = document.createElement('p');\n // set class for search div\n searchDiv.className = 'student-search';\n // set placeholder value for search input\n searchInput.placeholder = 'Search for students...';\n \n // append info message to page container\n pageContainer.appendChild(infoMessage);\n // append search input to search div\n searchDiv.appendChild(searchInput);\n // append search div to search container\n searchContainer.appendChild(searchDiv);\n}", "static createTemplateDOM() {\n DataItemComponent.templateDOM = {};\n DataItemComponent.templateDOM.root = document.createElement('tr');\n\n DataItemComponent.templateDOM.root.innerHTML = '<tr>' +\n '<td class=\"col-md-1\">{{id}}</td>' +\n '<td class=\"col-md-4\"><a class=\"lbl\">-</a></td>' +\n '<td class=\"col-md-4\"><a class=\"remove\"><span class=\"glyphicon glyphicon-remove remove\" aria-hidden=\"true\"></span></a></td>' +\n '<td class=\"col-md-6\"></td>' +\n '</tr>'\n\n DataItemComponent.templateDOM.idText = DataItemComponent.templateDOM.root.firstChild.firstChild;\n DataItemComponent.templateDOM.labelText = DataItemComponent.templateDOM.root.firstChild.nextSibling.firstChild.firstChild;\n }", "_createElements(text) {\n\t\tthis._elements.forEach((el) =>\n\t\t\tel.insertAdjacentHTML(\n\t\t\t\t'afterbegin',\n\t\t\t\t`<button class=\"glow-btn\">${text}</button>\n <span class=\"glow-span\"></span>`\n\t\t\t)\n\t\t);\n\t}", "function createHTMLElements(row_name, col_name, label_name, p_id, para) {\n const home = document.getElementById('home');\n const row = document.createElement('div');\n row.className = row_name;\n const col1 = document.createElement('div');\n col1.className = col_name;\n const label = document.createElement('label');\n label.innerHTML = label_name;\n const col2 = document.createElement('div');\n col2.className = col_name;\n const p = document.createElement('p');\n p.id = p_id;\n p.innerHTML = para;\n\n col1.appendChild(label);\n col2.appendChild(p);\n row.appendChild(col1);\n row.appendChild(col2);\n home.appendChild(row);\n}", "createAndAttachToDom() {\n\t\tif (!this.shadowRoot) {\n\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t}\n\n\t\t// remove any existing children\n\t\tthis.removeShadowRootChildren();\n\n\t\t// Create some CSS to apply to the shadow dom\n\t\tconst style = document.createElement('style');\n\t\tstyle.textContent = this.getStyleContent();\n\t\tthis.shadowRoot.appendChild(style);\n\n\t\t// Attach the created elements to the shadow dom\n\t\tconst childElement = this.getChildElement();\n\t\tthis.shadowRoot.appendChild(childElement);\n\t}", "createDomElements(id) {\n this.li = document.createElement('li');\n this.edit = document.createElement('button');\n this.delete = document.createElement('button');\n\n this.edit.classList.add('btn-edit');\n this.delete.classList.add('btn-delete');\n\n this.delete.setAttribute('data-id', id);\n this.edit.setAttribute('data-id', id);\n\n this.edit.innerHTML = 'Edit';\n this.delete.innerHTML = 'Delete';\n\n this.li.appendChild(this.delete);\n this.li.appendChild(this.edit);\n }", "function CreateAppBaseElements() {\n\t\t$('#AppCalendar-DataContainer').empty();\n\t\t$('#AppCalendar-DataContainer').append($('<div>').addClass('AppCalendar-Parts'));\n\t\t\n\t\t$('#AppCalendar-DataContainer .AppCalendar-Parts').append($('<div>').attr('id', 'AppCalendar-ExtEvents'));\n\t\t$('#AppCalendar-DataContainer .AppCalendar-Parts').append($('<div>').attr('id', 'AppCalendar-Calendar'));\n\t\t$('#AppCalendar-DataContainer .AppCalendar-Parts').append($('<div>').attr('id', 'AppCalendar-Dialog').addClass('ui-draggable ui-draggable-handle').css({'display':'none'}));\n\t\t$('#AppCalendar-DataContainer .AppCalendar-Parts').append($('<div>').addClass('AppCalendar-Load'));\n\t\t$('#AppCalendar-DataContainer .AppCalendar-Parts').append($('<div>').addClass('AppCalendar-overlay'));\n\t\t\n\t\tCreateHTMLExtEvents();\n\t\tCreateHTMLCalendar();\n\t\tCreateHTMLDialogElement();\n\t\t\n\t GetExternalCalendarDataAll();\n\t}", "create() {\n\t\tthis.element = document.querySelector( this.selectors.element );\n\t\tthis.elements = {};\n\n\t\teach( this.selectors.elements, ( selector, key ) => {\n\t\t\tif ( selector instanceof window.HTMLElement || selector instanceof window.NodeList ) {\n\t\t\t\tthis.elements[key] = selector;\n\t\t\t} else if ( Array.isArray( selector ) ) {\n\t\t\t\tthis.elements[key] = selector;\n\t\t\t} else if ( this.element ) {\n\n\t\t\t\tthis.elements[key] = this.element.querySelectorAll( selector );\n\n\t\t\t\tif ( 1 === this.elements[key].length ) {\n\t\t\t\t\tthis.elements[key] = this.element.querySelector( selector );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function createElements() {\n var svg = d3.select(document.getElementById('svgChartRight'));\n\n svg.selectAll('*').remove();\n\n connectorsSvg = svg.append('g').attr('class', 'connectors');\n arcsSvg = svg.append('g').attr('class', 'arcs');\n bubblesSvg = svg.append('g').attr('class', 'bubbles');\n bubbleLabelsSvg = svg.append('g').attr('class', 'bubbleLabels');\n}", "function generate_announcement_dom(index) {\n\n\n var dom = [];\n\n var div = document.createElement('div');\n div.id = 'announcement_' + index;\n div.className = 'vwli';\n div.setAttribute('data-round', index);\n\n if (!login_info.is_logged_in)\n div.setAttribute('hidden', null);\n\n var button = document.createElement('button');\n button.setAttribute('data-round', index);\n button.setAttribute('onclick', 'announcement_button_pressed(this)');\n button.appendChild(document.createTextNode('Announcement'));\n\n div.appendChild(button);\n dom.push(div);\n\n var h3 = document.createElement('h3');\n h3.id = 'announcement_recv_' + index;\n h3.setAttribute('data-round', index);\n\n dom.push(h3);\n\n return dom;\n}", "function createElementsForCard() {\r var newCard = createElementWithClass('div',['card']);\r\r var cardTitle = createElementWithClass('h2',['cardTitle']);\r var cardDescription = createElementWithClass('p', ['cardDescription']);\r\r return {'domElement' : newCard, 'innerElements' : {'title' : cardTitle, 'description' : cardDescription}};\r}", "_initContainers() {\n const that = this;\n\n that.dataValidationContainer = document.createElement('div');\n that.dataValidationContainer.classList.add('smart-data-validation-container');\n\n that.criteriaContainer = document.createElement('div');\n that.criteriaContainer.classList.add('smart-criteria-container');\n\n that.criteriaTypeContainer = document.createElement('div');\n that.criteriaTypeContainer.classList.add('smart-criteria-type-container');\n\n that.inputsCriteriaContainer = document.createElement('div');\n that.inputsCriteriaContainer.classList.add('smart-input-criteria-container');\n\n that.textBetweenInputsHolder = document.createElement('div');\n that.textBetweenInputsHolder.classList.add('smart-text-between-inputs-container');\n\n that.onInvalidDataContainer = document.createElement('div');\n that.onInvalidDataContainer.classList.add('smart-on-invalid-data-container');\n\n that.appearanceContainer = document.createElement('div');\n that.appearanceContainer.classList.add('smart-appearance');\n\n that.footerButtonsContainer = document.createElement('div');\n that.footerButtonsContainer.classList.add('smart-footer-buttons');\n\n that._generateStaticElements();\n }", "function CDomPartsBuilder() {\n }", "function creationElementListe(){\n cadre = document.createElement(\"li\");\n articleFiche = document.createElement(\"div\");\n articleImage = document.createElement(\"img\");\n articleNom = document.createElement(\"h2\");\n articlePrix = document.createElement(\"p\");\n articleDetails = document.createElement(\"a\");\n}", "build() {\n //hold references to elements we are creating\n const ghostContainer = document.createElement('div');\n const ghost = document.createElement('div');\n const info = document.createElement('p');\n\n // adding classes and content\n ghostContainer.className = `ghost-container ${this.name.toLowerCase()}`;\n ghost.className = 'ghost';\n ghost.style.backgroundColor = this.color;\n info.textContent = this.name;\n\n // appending elements to page. be careful of the order!\n ghostContainer.appendChild(ghost);\n ghostContainer.appendChild(info);\n container.appendChild(ghostContainer); // container defined just inside ghostCreatorModule\n\n // holds element references in an object for later access\n return {\n container: ghostContainer,\n ghost: ghost,\n info: info\n };\n }", "initDOMElements() {\n this.DOMElement = this.app.el.querySelector('#homepage');\n\n this.characterSelector = this.DOMElement.querySelector('#character-selector');\n\n this.charactersList = this.characterSelector.querySelectorAll('.character');\n \n this.buttonStartGame = this.DOMElement.querySelector('#start-game');\n\n this.character_01 = this.characterSelector.querySelectorAll('.character_01'); \n this.character_02 = this.characterSelector.querySelectorAll('.character_02');\n this.character_03 = this.characterSelector.querySelectorAll('.character_03');\n this.character_04 = this.characterSelector.querySelectorAll('.character_04');\n\n this.character_vs_01 = this.DOMElement.querySelector('#character_vs_01');\n this.character_vs_02 = this.DOMElement.querySelector('#character_vs_02');\n }", "generate()\n {\n this.post = document.createElement(\"div\");\n this.post.setAttribute(\"id\", \"haiku\"+this.id);\n this.post.setAttribute(\"class\", \"posts \" + this.gridClass);\n \n let postElements = [];\n\n let post_header = document.createElement(\"div\");\n post_header.setAttribute(\"class\", \"post-header\");\n post_header.setAttribute(\"style\", \"background-image: url('../uploads/background/\" + this.background + \"');\");\n let posts_haiku = document.createElement(\"div\");\n posts_haiku.setAttribute(\"class\", \"posts-haiku\");\n let post_haiku = document.createElement(\"div\");\n post_haiku.setAttribute(\"class\", \"post-haiku\");\n post_haiku.innerHTML = this.content;\n posts_haiku.appendChild(post_haiku);\n post_header.appendChild(posts_haiku);\n postElements.push(post_header);\n\n if(this.contentNative != \"NO\")\n {\n let lang_switch = document.createElement(\"div\");\n lang_switch.setAttribute(\"class\", \"lang-switch\");\n let lang_switcher = document.createElement(\"label\");\n lang_switcher.setAttribute(\"class\", \"lang-switcher\");\n let lang_input = document.createElement(\"input\");\n lang_input.setAttribute(\"type\", \"checkbox\");\n lang_input.setAttribute(\"class\", \"language-value\");\n let lang_slider = document.createElement(\"span\");\n lang_slider.setAttribute(\"class\", \"lang-slider\");\n lang_switcher.appendChild(lang_input);\n lang_switcher.appendChild(lang_slider);\n lang_switch.appendChild(lang_switcher);\n postElements.push(lang_switch);\n }\n\n let post_nav = document.createElement(\"div\");\n post_nav.setAttribute(\"class\", \"post-nav\");\n\n var post_nav_dot = document.createElement(\"div\");\n post_nav_dot.setAttribute(\"class\", \"post-nav-dot\");\n post_nav.appendChild(post_nav_dot);\n\n let post_nav_handwriting = document.createElement(\"div\");\n post_nav_handwriting.setAttribute(\"class\", \"post-nav-handwriting\");\n post_nav_handwriting.setAttribute(\"id\", \"post-nav-handwriting\");\n post_nav_handwriting.setAttribute(\"style\", \"background-image: url(../uploads/handwriting/\"+ this.handwriting +\")\");\n let post_nav_handwriting_close = document.createElement(\"div\");\n post_nav_handwriting_close.setAttribute(\"class\", \"post-nav-handwriting-close\");\n post_nav_handwriting_close.setAttribute(\"id\", \"post-nav-handwriting-close\");\n post_nav_handwriting.appendChild(post_nav_handwriting_close);\n post_nav.appendChild(post_nav_handwriting);\n\n var post_nav_sub = document.createElement(\"div\");\n post_nav_sub.setAttribute(\"class\", \"post-nav-sub\");\n\n let options = [\"Handwriting\", \"Report\"];\n\n if(this.loggedIn == true)\n options = [\"Handwriting\", \"Edit\", \"Delete\"];\n \n options.forEach(option => {\n let post_nav_sub_option = document.createElement(\"div\");\n post_nav_sub_option.setAttribute(\"class\", \"post-nav-sub-option\");\n post_nav_sub_option.textContent = option;\n post_nav_sub.appendChild(post_nav_sub_option);\n });\n\n post_nav.appendChild(post_nav_sub);\n\n postElements.push(post_nav);\n\n let post_footer = document.createElement('div');\n post_footer.setAttribute(\"class\", \"post-footer\");\n\n let post_author = document.createElement('div');\n post_author.setAttribute(\"class\", \"post-author\");\n post_author.textContent = this.authorName;\n post_footer.appendChild(post_author);\n\n let post_country = document.createElement('div');\n post_country.setAttribute(\"class\", \"post-country\");\n post_country.textContent = this.authorCountry;\n post_footer.appendChild(post_country);\n\n let post_like = document.createElement('div');\n post_like.setAttribute(\"class\", \"post-like\");\n if(this.likeStatus == true)\n post_like.style.backgroundImage = \"url('img/icons/heart_full_normal.svg')\";\n\n let post_like_counter = document.createElement('span');\n post_like_counter.textContent = this.likes;\n post_like.appendChild(post_like_counter);\n post_footer.appendChild(post_like);\n\n postElements.push(post_footer);\n\n postElements.forEach(element => {\n this.post.appendChild(element);\n });\n }", "function buildDOM() {\n $(\".container\").append(`\n <h3 class=\"page-heading\">Recycling Fun...</h3>\n <div class=\"row\">\n <div class=\"col code-app\"> \n </div>\n </div>`);\n\n madlibsStart();\n}", "function createInitalDivs() {\n\n let mainContainer = createDivElement({id: 'mainContainer'});\n\n let movieDisplays = createDivElement({id: 'movieDisplays'});\n\n let sideBar = createDivElement({id: 'sideBar'});\n\n let available = createDivElement({id: 'aDiv', class: 'movieDivs'});\n\n let rented = createDivElement({id: 'rDiv', class: 'movieDivs'});\n\n document.body.appendChild(mainContainer);\n\n mainContainer.appendChild(movieDisplays);t\n mainContainer.appendChild(sideBar);\n\n movieDisplays.appendChild(available);\n movieDisplays.appendChild(rented);\n \n}", "populate() {\n this.div.innerHTML = ''\n\n this.createHeader()\n this.createAddButton()\n this.createAddForm()\n this.createExpensesDiv()\n }", "function buildHTML() {\n //initialize html\n html = \"\";\n\n for(var i=0; i<elements.length; i++) {\n switch(elements[i].type) {\n case 'title':\n buildTitle(elements[i].options);\n break;\n case 'header':\n buildHeader(elements[i].options);\n break;\n case 'img-one':\n buildImageOne(elements[i].options);\n break;\n case 'img-two':\n buildImageTwo(elements[i].options);\n break;\n case 'img-three':\n buildImageThree(elements[i].options);\n break;\n case 'article-right':\n buildArticleRight(elements[i].options);\n break;\n case 'article-left':\n buildArticleLeft(elements[i].options);\n break;\n case 'text' :\n buildText(elements[i].options);\n break;\n \n }\n }\n buildEnd();\n\n document.getElementById('HTML').innerText = `${html}`;\n}", "function CreateElements(id, name,src, alt, imgUrl){\n this.id = id;\n this.name = name;\n this.src= src;\n this.alt = alt;\n this.imgUrl = imgUrl\n \n this.img = document.createElement('img');\n this.anchor = document.createElement('a');\n this.anchor.innerHTML = \"view project\";\n \n this.anchor.href = stateContainer[id].src;\n this.img.alt = stateContainer[id].alt;\n this.img.src = stateContainer[id].imgUrl;\n \n document.getElementsByClassName('mystyle')[id].appendChild(this.img);\n document.getElementsByClassName('mystyle')[id].appendChild(this.anchor);\n}", "_ConstructElements() {\n // Create the container that all the other elements will be contained within\n this.container = document.createElement('div');\n this.container.classList.add(styles['guify-container']);\n\n let containerCSS = {};\n\n // Position the container relative to the root based on `opts`\n if(this.opts.barMode == 'overlay' || this.opts.barMode == 'above' || this.opts.barMode == 'none'){\n containerCSS.position = 'absolute';\n }\n if(this.hasRoot && this.opts.barMode == 'above'){\n containerCSS.top = `-${theme.sizing.menuBarHeight}`;\n }\n css(this.container, containerCSS);\n\n // Insert the container into the root as the first element\n this.opts.root.insertBefore(this.container, this.opts.root.childNodes[0]);\n\n // Create a menu bar if specified in `opts`\n if(this.opts.barMode !== 'none') {\n this.bar = new MenuBar(this.container, this.opts);\n this.bar.addListener('ontogglepanel', () => {\n this.panel.ToggleVisible();\n });\n }\n\n // Create panel\n this.panel = new Panel(this.container, this.opts);\n\n // Show the panel by default if there's no menu bar or it's requested\n if(this.opts.barMode === 'none' || this.opts.open === true) {\n this.panel.SetVisible(true);\n } else {\n // Otherwise hide it by default\n this.panel.SetVisible(false);\n }\n\n // Create toast area\n this.toaster = new ToastArea(this.container, this.opts);\n\n }", "function domGenerate ()\n\t{\n\tfor (var i=0;i<totalNumberOfDivs;i++)\n\t {\n\t\t document.getElementById('game_board').appendChild(myDivArray[randArray[i]]);\n\t\n\t\t}\n\t}", "_create() {\n this._pagination = document.createElement('footer')\n this._pagination.classList.add('pagination')\n\n this._elem.append(this._pagination)\n\n this._render()\n }", "function setupDom() {\n creative.dom = {};\n creative.dom.mainContainer = document.getElementById('main-container');\n // creative.dom.expandedExit = document.getElementById('expanded-exit');\n creative.dom.expandedContent = document.getElementById('expanded-content');\n creative.dom.expandMain = document.getElementById('expand-main');\n creative.dom.collapsedContent = document.getElementById('collapsed-content');\n creative.dom.collapseButton = document.getElementById('collapseButton');\n creative.dom.expandButton = document.getElementById('expandButton');\n // creative.dom.closeButton = document.getElementById('close-button');\n}", "function prepareDom() {\n css(container, {\n 'height': '100%',\n 'position': 'relative'\n }); //adding a class to recognize the container internally in the code\n\n addClass(container, WRAPPER);\n addClass($html, ENABLED); //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n\n windowsHeight = getWindowHeight();\n removeClass(container, DESTROYED); //in case it was destroyed before initializing it again\n\n addInternalSelectors();\n var sections = $(SECTION_SEL); //styling the sections / slides / menu\n\n for (var i = 0; i < sections.length; i++) {\n var sectionIndex = i;\n var section = sections[i];\n var slides = $(SLIDE_SEL, section);\n var numSlides = slides.length; //caching the original styles to add them back on destroy('all')\n\n section.setAttribute('data-fp-styles', section.getAttribute('style'));\n styleSection(section, sectionIndex);\n styleMenu(section, sectionIndex); // if there's any slide\n\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n } else {\n if (options.verticalCentered) {\n addTableClass(section);\n }\n }\n } //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n\n\n if (options.fixedElements && options.css3) {\n $(options.fixedElements).forEach(function (item) {\n $body.appendChild(item);\n });\n } //vertical centered of the navigation + active bullet\n\n\n if (options.navigation) {\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n\n if (options.scrollOverflow) {\n scrollBarHandler = options.scrollOverflowHandler.init(options);\n }\n }", "createElements() {\n this.controlsExpandTrigger = document.createElement('div');\n this.renderSpeedSelectorWrapper = document.createElement('div');\n this.renderSpeedSelectorWrapper.classList.add(\n 'ste-renderSpeed-wrapper'\n );\n this.minValueInput = document.createElement('input');\n this.minValueInput.classList.add('ste-min-input');\n this.sliderInput = document.createElement('input');\n this.maxValueInput = document.createElement('input');\n this.maxValueInput.classList.add('ste-max-input');\n\n {\n this.loopInput = document.createElement('input');\n this.loopInput.setAttribute('type', 'checkbox');\n this.loopInput.classList.add('ste-loop-toggle');\n this.loopInput.setAttribute('title', 'loop');\n this.loopInput.addEventListener('change', (event) => {\n this.loop = event.target.checked;\n });\n }\n\n this.controlsExpandTrigger.textContent = 'Toggle controls';\n this.controlsExpandTrigger.classList.add(\n 'expand-trigger',\n 'formButton',\n 'formButton-extension',\n 'speed-select'\n );\n\n let renderSpeedSpan = document.createElement('label');\n renderSpeedSpan.setAttribute('for', 'ste-renderSpeed');\n renderSpeedSpan.textContent = 'Paint calls:';\n\n this.renderSpeedSelectorWrapper.appendChild(renderSpeedSpan);\n this.renderSpeedSelector = this.renderSpeedSelectorWrapper.appendChild(\n document.createElement('select')\n );\n this.renderSpeedSelector.id = 'ste-renderSpeed';\n this.renderSpeedSelector.classList.add('formButton');\n\n [ 1, 2, 4, 8, 16, 32, 64 ].forEach((val) => {\n let option = document.createElement('option');\n option.value = val;\n option.textContent = val;\n this.renderSpeedSelector.appendChild(option);\n });\n\n extensionElements.controlsContainerHeader.appendChild(\n this.controlsExpandTrigger\n );\n extensionElements.controlsContainerHeader.appendChild(\n this.renderSpeedSelectorWrapper\n );\n\n {\n extensionElements.timeWrapper.appendChild(this.minValueInput);\n extensionElements.timeWrapper.appendChild(this.sliderInput);\n extensionElements.timeWrapper.appendChild(this.maxValueInput);\n extensionElements.timeWrapper.appendChild(this.loopInput);\n }\n\n this.minValueInput.type = this.maxValueInput.type = 'number';\n this.minValueInput.value = 0;\n this.minValueInput.min = 0;\n this.maxValueInput.value = 60;\n this.maxValueInput.min = 1;\n\n this.sliderInput.type = 'range';\n this.sliderInput.min = 0;\n this.sliderInput.max = 60 * 1000;\n this.sliderInput.value = 0;\n this.sliderInput.step = 20;\n\n this.createRenderTimersTrigger();\n }", "function setupCarouselElements() {\n // element that will contain the slider and buttons\n viewportElement = document.createElement('div');\n viewportElement.className = 'carousel-viewport';\n\n // element that will contain the slides\n sliderElement = document.createElement('div');\n sliderElement.className = 'carousel-slider';\n\n elements.forEach(function (element, index) {\n // appending parent child elements into sliderElement\n sliderElement.appendChild(element);\n });\n\n viewportElement.appendChild(sliderElement);\n parentElement.appendChild(viewportElement);\n }", "generateElement() {\n // Build the card container\n let divo = document.createElement('div');\n divo.className = 'divvy';\n\n divo.appendChild(this.generateAnimalImage());\n divo.appendChild(this.generateChiImage());\n divo.appendChild(this.generateSoundIcon());\n divo.appendChild(this.generateText());\n\n return divo;\n }", "createNodeAndListeners() {\n this.createNode();\n this.clickListenerOn();\n }", "function createElements() {\n if( document.getElementById(\"ratk\") == null ) {\n let s0 = document.createElement(\"br\");\n let s1 = document.createElement(\"span\");\n s1.id=\"wiki\"\n let s2 = document.createElement(\"span\")\n s2.id=\"ratk\"\n let s3 = document.createElement(\"span\")\n s3.id=\"wikt\"\n let s4 = document.createElement(\"span\")\n s4.id=\"bing\"\n let s5 = document.createElement(\"span\")\n s5.id=\"syno\"\n document.getElementById(\"ratkaistuja\").appendChild(s0)\n document.getElementById(\"ratkaistuja\").appendChild(s1)\n document.getElementById(\"ratkaistuja\").appendChild(s2)\n document.getElementById(\"ratkaistuja\").appendChild(s3)\n document.getElementById(\"ratkaistuja\").appendChild(s4)\n document.getElementById(\"ratkaistuja\").appendChild(s5)\n }\n}", "function _constructComponents() {\r\n\t//having a set root element allows us to make queries\r\n\t//and resultant styling safe and much faster.\r\n\t//var elOuterParent = _rootDiv;\r\n\t//document.getElementById(_rootID);\r\n\tvar builder = new WidgetBuilder();\r\n\t_debugger.log(\"building html scaffolding.\"); //#\r\n\t_el = builder.construct(CSS_PREFIX, _manips);\r\n\t\r\n\t//todo: do we need to \"wait\" for these? Is there any initialization problem\r\n\t//that prevents them from being constructed to no effect?\r\n\t\r\n\t_debugger.log(\"building slideMotion.\"); //#\r\n\t_slideMotion = new SlideMotion();\r\n\tthis.slideMotion = _slideMotion; //# debugging only\r\n\t\r\n\t_debugger.log(\"building slideLogic.\"); //#\r\n\t_slideLogic = new SlideLogic(_slideMotion);\r\n\t_animator = _slideLogic;\r\n\t\r\n\t_debugger.log(\"building Event Manager.\"); //#\r\n\t_evtMgr = new EvtMgr(_behavior, _animator);\r\n\t_debugger.log(\"building Scaler.\"); //#\r\n\t_deviceWrangler = new DeviceWrangler();\r\n\t_scaler = new Scaler(_outerParent, _evtMgr, _animator);\r\n}", "createHtml() {\n this.container = document.createElement('div');\n this.container.className = 'container';\n this.container.innerHTML = `\n <div class=\"quiz-container display-flex-center\">\n <div class=\"question-text display-flex-center\">What would you say cross-sells best when magazines and publications are selling a lot?</div>\n <ul id=\"questionContainer\" class=\"display-flex-center\"></ul> \n </div>\n `;\n\n document.body.appendChild(this.container);\n this.createButtons();\n }", "createElements() {\n this.progressWave = this.wrapper.appendChild(\n // for doctor part\n this.style(document.createElement('wave'), {\n position: 'absolute',\n zIndex: 4,\n left: 0,\n top: 0,\n bottom: 0,\n overflow: 'hidden',\n width: '0',\n display: 'none',\n boxSizing: 'border-box',\n borderRightStyle: 'solid',\n pointerEvents: 'none'\n // backgroundColor: this.params.progressBackgroundColor\n })\n );\n this.patientProgressWave = this.wrapper.appendChild(\n this.style(document.createElement('wave'), {\n position: 'absolute',\n zIndex: 3,\n left: 0,\n top: 0,\n bottom: 0,\n overflow: 'hidden',\n width: '0',\n display: 'none',\n boxSizing: 'border-box',\n // borderRightStyle: 'solid',\n pointerEvents: 'none',\n backgroundColor: this.params.progressBackgroundColor\n })\n );\n this.currTime = document.createElement('currTime');\n this.totalTime = document.createElement('totalTime');\n this.wrapper.appendChild(this.currTime);\n this.wrapper.appendChild(this.totalTime);\n this.currTime.style.fontSize = '13px';\n this.currTime.style.color = '#ffffff';\n this.currTime.style.position = 'absolute';\n this.currTime.style.left = '-60px';\n this.currTime.style.top = '150px';\n this.totalTime.style.fontSize = '13px';\n this.totalTime.style.color = '#5F78FF';\n this.totalTime.style.position = 'absolute';\n this.totalTime.style.left = '8px';\n this.totalTime.style.top = '150px';\n this.addCanvas();\n this.updateCursor();\n }", "domBuilder() {\n this.getLocation()\n .then(() => this.getWeather())\n .then(() => {\n this.writeResult();\n this.buildCurrentWeather();\n this.buildForecast();\n this.buildMap();\n this.searchResultsBuilder();\n })\n .catch(() => console.error('Error building to DOM'));\n }", "function createElements(elementName, innerText, parentId){\r\n var node = document.createElement(elementName);\r\n var textNode = document.createTextNode(innerText);\r\n node.appendChild(textNode);\r\n document.getElementById(parentId).appendChild(node);\r\n}", "function createElem(foodElem)\n{\n\tvar listelem;\n\tvar elemName, elemNum, elemUnit, elemComm, elemPic;\n\n\tvar divL, divM, divR;\n\tvar elemImg;\n\tvar tplaceholder;\n\n\n\t// Div: Left\n\tdivL = document.createElement(\"div\");\n\tdivL.classList.add(\"food_div_L\");\n\n\telemImg = document.createElement(\"img\");\n\ttplaceholder = foodElem[4];\n\tif (tplaceholder.length > 0)\n\t{\n\t\telemImg.src = tplaceholder;\n\t}\n\telse\n\t{\n\t\telemImg.src = \"./images/forkAndKnife.png\";\n\t}\n\telemImg.classList.add(\"food_img\");\n\t\n\n\tdivL.appendChild(elemImg);\n\n\n\t// Div: Mid\n\tdivM = document.createElement(\"div\");\n\tdivM.classList.add(\"food_div_M\");\n\n\telemName = document.createElement(\"span\");\n\telemName.innerHTML = foodElem[0];\n\telemName.classList.add(\"food_name\");\n\n\telemComm = document.createElement(\"span\");\n\ttplaceholder = foodElem[3];\n\tif (tplaceholder.length > 0)\n\t{\n\t\telemComm.innerHTML = tplaceholder;\n\t}\n\telse\n\t{\n\t\telemComm.innerHTML = \"No Description.\";\n\t}\n\telemComm.classList.add(\"food_comments\");\n\n\tdivM.appendChild(elemName);\n\tdivM.appendChild(document.createElement(\"hr\"));\n\tdivM.appendChild(elemComm);\n\n\n\t// Div: Right\n\tdivR = document.createElement(\"div\");\n\tdivR.classList.add(\"food_div_R\");\n\n\t// divR.addEventListener(\"mousedown\", );\n\n\telemNum = document.createElement(\"div\");\n\telemNum.innerHTML = foodElem[1];\n\telemNum.classList.add(\"food_num\");\n\n\telemUnit = document.createElement(\"div\");\n\telemUnit.innerHTML = foodElem[2];\n\telemUnit.classList.add(\"food_unit\");\n\n\tdivR.appendChild(elemNum);\n\tdivR.appendChild(elemUnit);\n\n\n\tlistelem = document.createElement(\"li\");\n\tlistelem.classList.add(\"foodElem\");\n\n\t// listelem.addEventListener(\"mousedown\", listenerLM_SwipeDel);\n\tlistelem.addEventListener(\"click\", listener_clickElem)\n\n\tlistelem.appendChild(divL);\n\tlistelem.appendChild(divM);\n\tlistelem.appendChild(divR);\n\n\treturn listelem;\n}", "function createButtons(){\n\t\t//empty button divs so they don't \n\t\t$('#reactButtonsDiv').empty();\n\n\t\t//loop to create buttons\n\n\t\tfor (var i = 0; i < reactArray.length; i++) {\n\t\t\tvar reactButton = $('<button>');\n\t\t\treactButton.addClass('btn btn-info btn-md reactButtonClass');//css class\n\t\t\treactButton.attr('data-reactname', reactArray[i]); //data attr for button\n\t\t\t\n\t\t\treactButton.text(reactArray[i]);\n\t\t\t$('#reactButtonsDiv').append(reactButton);\n\t\t}\n\t}", "function prepareDom(){\n css(container, {\n 'height': '100%',\n 'position': 'relative'\n });\n\n //adding a class to recognize the container internally in the code\n addClass(container, WRAPPER);\n addClass($html, ENABLED);\n\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n windowsHeight = getWindowHeight();\n\n removeClass(container, DESTROYED); //in case it was destroyed before initializing it again\n\n addInternalSelectors();\n\n var sections = $(SECTION_SEL);\n\n //styling the sections / slides / menu\n for(var i = 0; i<sections.length; i++){\n var sectionIndex = i;\n var section = sections[i];\n var slides = $(SLIDE_SEL, section);\n var numSlides = slides.length;\n\n //caching the original styles to add them back on destroy('all')\n section.setAttribute('data-fp-styles', section.getAttribute('style'));\n\n styleSection(section, sectionIndex);\n styleMenu(section, sectionIndex);\n\n // if there's any slide\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n }else{\n if(options.verticalCentered){\n addTableClass(section);\n }\n }\n }\n\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n if(options.fixedElements && options.css3){\n $(options.fixedElements).forEach(function(item){\n $body.appendChild(item);\n });\n }\n\n //vertical centered of the navigation + active bullet\n if(options.navigation){\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n\n if(options.scrollOverflow){\n scrollBarHandler = options.scrollOverflowHandler.init(options);\n }\n }", "function prepareDom(){\n css(container, {\n 'height': '100%',\n 'position': 'relative'\n });\n\n //adding a class to recognize the container internally in the code\n addClass(container, WRAPPER);\n addClass($html, ENABLED);\n\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n windowsHeight = getWindowHeight();\n\n removeClass(container, DESTROYED); //in case it was destroyed before initializing it again\n\n addInternalSelectors();\n\n var sections = $(SECTION_SEL);\n\n //styling the sections / slides / menu\n for(var i = 0; i<sections.length; i++){\n var sectionIndex = i;\n var section = sections[i];\n var slides = $(SLIDE_SEL, section);\n var numSlides = slides.length;\n\n //caching the original styles to add them back on destroy('all')\n section.setAttribute('data-fp-styles', section.getAttribute('style'));\n\n styleSection(section, sectionIndex);\n styleMenu(section, sectionIndex);\n\n // if there's any slide\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n }else{\n if(options.verticalCentered){\n addTableClass(section);\n }\n }\n }\n\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n if(options.fixedElements && options.css3){\n $(options.fixedElements).forEach(function(item){\n $body.appendChild(item);\n });\n }\n\n //vertical centered of the navigation + active bullet\n if(options.navigation){\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n\n if(options.scrollOverflow){\n scrollBarHandler = options.scrollOverflowHandler.init(options);\n }\n }", "function prepareDom(){\n css(container, {\n 'height': '100%',\n 'position': 'relative'\n });\n\n //adding a class to recognize the container internally in the code\n addClass(container, WRAPPER);\n addClass($html, ENABLED);\n\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n windowsHeight = getWindowHeight();\n\n removeClass(container, DESTROYED); //in case it was destroyed before initializing it again\n\n addInternalSelectors();\n\n var sections = $(SECTION_SEL);\n\n //styling the sections / slides / menu\n for(var i = 0; i<sections.length; i++){\n var sectionIndex = i;\n var section = sections[i];\n var slides = $(SLIDE_SEL, section);\n var numSlides = slides.length;\n\n //caching the original styles to add them back on destroy('all')\n section.setAttribute('data-fp-styles', section.getAttribute('style'));\n\n styleSection(section, sectionIndex);\n styleMenu(section, sectionIndex);\n\n // if there's any slide\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n }else{\n if(options.verticalCentered){\n addTableClass(section);\n }\n }\n }\n\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n if(options.fixedElements && options.css3){\n $(options.fixedElements).forEach(function(item){\n $body.appendChild(item);\n });\n }\n\n //vertical centered of the navigation + active bullet\n if(options.navigation){\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n\n if(options.scrollOverflow){\n scrollBarHandler = options.scrollOverflowHandler.init(options);\n }\n }", "_createPageElements() {\n logger.debug('AnnotationListWidget#_createPageElements');\n const nav = this._nav;\n const pageRenderer = this._annoPageRenderer;\n\n for (let pageNum = 0; pageNum < this._canvases.length; ++pageNum) {\n let canvas = nav.getCanvas(pageNum);\n let pageElem = pageRenderer.createPageElement({\n pageNum: pageNum,\n canvasId: canvas['@id'],\n canvasLabel: canvas.label,\n layerId: this._layerId\n });\n\n this._rootElem.append(pageElem);\n pageElem.hide();\n nav.setPageElement(pageNum, pageElem);\n }\n }", "createElements() {\n this.controlsExpandTrigger = document.createElement('div');\n this.renderSpeedSelectorWrapper = document.createElement('div');\n this.renderSpeedSelectorWrapper.classList.add('ste-renderSpeed-wrapper');\n this.minValueInput = document.createElement('input');\n this.minValueInput.classList.add('ste-min-input');\n this.sliderInput = document.createElement('input');\n this.maxValueInput = document.createElement('input');\n this.maxValueInput.classList.add('ste-max-input');\n\n {\n this.loopInput = document.createElement('input');\n this.loopInput.setAttribute('type', 'checkbox');\n this.loopInput.classList.add('ste-input-loop');\n this.loopInput.setAttribute('title', 'loop');\n this.loopInput.addEventListener('change', event => {\n this.loop = event.target.checked;\n });\n }\n\n this.controlsExpandTrigger.textContent = 'Toggle controls';\n this.controlsExpandTrigger.classList.add('expand-trigger', 'formButton', 'formButton-extension', 'speed-select');\n\n let renderSpeedSpan = document.createElement('label');\n renderSpeedSpan.setAttribute('for', 'ste-renderSpeed');\n renderSpeedSpan.textContent = 'Paint calls:';\n\n this.renderSpeedSelectorWrapper.appendChild(renderSpeedSpan);\n this.renderSpeedSelector = this.renderSpeedSelectorWrapper.appendChild(document.createElement('select'));\n this.renderSpeedSelector.id = 'ste-renderSpeed';\n this.renderSpeedSelector.classList.add('formButton');\n\n [1, 2, 4, 8, 16, 32, 64].forEach(val => {\n let option = document.createElement('option');\n option.value = val;\n option.textContent = val;\n this.renderSpeedSelector.appendChild(option);\n });\n\n extensionElements.controlsContainerHeader.appendChild(this.controlsExpandTrigger);\n extensionElements.controlsContainerHeader.appendChild(this.renderSpeedSelectorWrapper);\n\n {\n extensionElements.timeWrapper.appendChild(this.minValueInput);\n extensionElements.timeWrapper.appendChild(this.sliderInput);\n extensionElements.timeWrapper.appendChild(this.maxValueInput);\n extensionElements.timeWrapper.appendChild(this.loopInput);\n }\n\n this.minValueInput.type = this.maxValueInput.type = 'number';\n this.minValueInput.value = 0;\n this.minValueInput.min = 0;\n this.maxValueInput.value = 60;\n this.maxValueInput.min = 1;\n\n this.sliderInput.type = 'range';\n this.sliderInput.min = 0;\n this.sliderInput.max = 60 * 1000;\n this.sliderInput.value = 0;\n this.sliderInput.step = 20;\n }", "_render() {\n\n this._el.innerHTML = `\n <div class='itk-slider'>\n <button class='show-prev-btn'> left </button>\n <img class='slide-img' src=''>\n <button class='show-next-btn'> right </button>\n </div>`;\n\n this.showPrevBtn = this._el.querySelector('.show-prev-btn');\n this.showNextBtn = this._el.querySelector('.show-next-btn');\n this.slideImage = this._el.querySelector('.slide-img');\n }", "function createInputElements( p_name, p_type, p_fieldName, p_values, p_desc ){\n\t// Create a div element to group the checkboxes or radio buttons\n\tvar group_div = document.createElement(\"div\"); \n\tgroup_div.setAttribute(\"class\", p_type + \"_container\");\n\t//group_div.id = p_name + \"_checkboxes\";\n\tif(p_fieldName){\n\t\tvar header = document.createElement( \"label\" );\n\t\theader.className =\"section-title\";\n\t\theader.appendChild( document.createTextNode(p_fieldName.toUpperCase()) );\n\t\tgroup_div.appendChild( header );\n\t}\n\n\t// Helper text\n\tif( p_desc ) group_div.appendChild( p_desc );\n\t\n\t// Loop throught the values array \n\tfor (var i = 0; i < p_values.length; i++) {\n\t\t// Create a div element\n\t\tvar div_wrap = document.createElement( \"div\" );\n\t\tdiv_wrap.className = p_type; \n\t\t\n\t\t// Create an input element\n\t\tvar input = document.createElement(\"input\");\n\t\tvar input_id = p_name + \"_\" + i;\n\t\tinput.setAttribute( \"type\", p_type );\n\t\tinput.setAttribute( \"name\", p_name );\n\t\tinput.setAttribute( \"value\", p_values[i] );\n\t\tinput.setAttribute( \"id\", input_id );\n\n\t\t// Create a label element\n\t\tvar label = document.createElement( \"label\" );\n\t\tlabel.setAttribute(\"for\", input_id);\n\t\tlabel.appendChild( document.createTextNode(p_values[i]) );\n\n\t\t// Append each element to the div_wrap\n\t\tdiv_wrap.appendChild( input );\n\t\tdiv_wrap.appendChild( label );\n\t\tgroup_div.appendChild( div_wrap );\n\t} \n\treturn group_div;\n}", "function prepareDom(){\r\n css(container, {\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n addClass(container, WRAPPER);\r\n addClass($('html'), ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = getWindowHeight();\r\n\r\n removeClass(container, DESTROYED); //in case it was destroyed before initializing it again\r\n\r\n addInternalSelectors();\r\n\r\n var sections = $(SECTION_SEL);\r\n\r\n //styling the sections / slides / menu\r\n for(var i = 0; i<sections.length; i++){\r\n var index = i;\r\n var section = sections[i];\r\n var slides = $(SLIDE_SEL, section);\r\n var numSlides = slides.length;\r\n\r\n //caching the original styles to add them back on destroy('all')\r\n section.setAttribute('data-fp-styles', section.getAttribute('style'));\r\n\r\n styleSection(section, index);\r\n styleMenu(section, index);\r\n\r\n // if there's any slide\r\n if (numSlides > 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n }\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).forEach(function(item){\r\n $body.appendChild(item);\r\n });\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n\r\n if(options.scrollOverflow){\r\n scrollBarHandler = options.scrollOverflowHandler.init(options);\r\n }else{\r\n afterRenderActions();\r\n }\r\n }", "function initDOMObjects() {\n\n\tprojectSelectLabel = document.getElementById('projectSelectLabel');\n\tprojectSelectGroup = document.getElementById('projectSelectGroup');\n\tprojectSelect = document.getElementById('projectSelect');\n\tgoProjectButton = document.getElementById('goProjectButton');\n\n}", "createDomElement(searchTerms) {\n const fieldId = this.columnDef && this.columnDef.id;\n const $headerElm = this.grid.getHeaderRowColumn(fieldId);\n $($headerElm).empty();\n // create the DOM Select dropdown for the Operator\n this.$filterInputElm = this.buildDatePickerInput(searchTerms);\n /* the DOM element final structure will be\n <div class=flatpickr>\n <input type=\"text\" class=\"form-control\" data-input>\n </div>\n */\n // create the DOM element & add an ID and filter class\n this.$filterInputElm.data('columnId', fieldId);\n // if there's a search term, we will add the \"filled\" class for styling purposes\n if (Array.isArray(searchTerms) && searchTerms.length > 0 && searchTerms[0] !== '') {\n this.$filterInputElm.addClass('filled');\n this._currentDates = searchTerms;\n this._currentValue = searchTerms[0];\n }\n // append the new DOM element to the header row\n if (this.$filterInputElm && typeof this.$filterInputElm.appendTo === 'function') {\n this.$filterInputElm.appendTo($headerElm);\n }\n return this.$filterInputElm;\n }", "function buildElements(type,obj) {\n const element = document.createElement(type);\n for (let prop in obj) {\n element[prop] = obj[prop];\n }\n return element;\n}", "function prepareDom(){\r\n css(container, {\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n addClass(container, WRAPPER);\r\n addClass($html, ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = getWindowHeight();\r\n\r\n removeClass(container, DESTROYED); //in case it was destroyed before initializing it again\r\n\r\n addInternalSelectors();\r\n\r\n var sections = $(SECTION_SEL);\r\n\r\n //styling the sections / slides / menu\r\n for(var i = 0; i<sections.length; i++){\r\n var sectionIndex = i;\r\n var section = sections[i];\r\n var slides = $(SLIDE_SEL, section);\r\n var numSlides = slides.length;\r\n\r\n //caching the original styles to add them back on destroy('all')\r\n section.setAttribute('data-fp-styles', section.getAttribute('style'));\r\n\r\n styleSection(section, sectionIndex);\r\n styleMenu(section, sectionIndex);\r\n\r\n // if there's any slide\r\n if (numSlides > 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n }\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).forEach(function(item){\r\n $body.appendChild(item);\r\n });\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n\r\n if(options.scrollOverflow){\r\n scrollBarHandler = options.scrollOverflowHandler.init(options);\r\n }\r\n }", "function createContainers() {\n\t\t\t\t//console.log('Creating containers...');\n\t\t\t\t// Define html to be prepended to the body\n\t\t\t\tvar qfInner = \"<div id=\\\"qfCloseContainer\\\">&times;</div>\\n<div id=\\\"qfSheetContent\\\"></div>\";\n\t var qfSheetContainer = \"<div id=\\\"qfSheetContainer\\\">\" + qfInner + \"</div>\";\n\t\t\t\tvar qfDimmer = \"<div id=\\\"qfDimmer\\\"></div>\";\n\t\t\t\tvar qfSpinner = \"<div id=\\\"qfSpinner\\\"></div>\";\n\t\t\t\n\t\t\t\t// Prepend the containers and remove the body scrollbars\n $('body').css('overflow','hidden').prepend(qfSheetContainer, qfDimmer, qfSpinner);\n\t\t\n\t\t\t\t// Hide the containers immediately\n\t\t\t\t$('#qfDimmer').hide().fadeIn(250);\n\t\t\t\t$('#qfSheetContainer, #qfSpinner').hide();\n\t\t\t}", "function prepareDom(){\n container.css({\n 'height': '100%',\n 'position': 'relative'\n });\n\n //adding a class to recognize the container internally in the code\n container.addClass(WRAPPER);\n $('html').addClass(ENABLED);\n\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n windowsHeight = $window.height();\n\n container.removeClass(DESTROYED); //in case it was destroyed before initializing it again\n\n addInternalSelectors();\n\n //styling the sections / slides / menu\n $(SECTION_SEL).each(function(index){\n var section = $(this);\n var slides = section.find(SLIDE_SEL);\n var numSlides = slides.length;\n\n styleSection(section, index);\n styleMenu(section, index);\n\n // if there's any slide\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n }else{\n if(options.verticalCentered){\n addTableClass(section);\n }\n }\n });\n\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n if(options.fixedElements && options.css3){\n $(options.fixedElements).appendTo($body);\n }\n\n //vertical centered of the navigation + active bullet\n if(options.navigation){\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n\n if(options.scrollOverflow){\n if(document.readyState === 'complete'){\n createScrollBarHandler();\n }\n //after DOM and images are loaded\n $window.on('load', createScrollBarHandler);\n }else{\n afterRenderActions();\n }\n }", "function prepareDom(){\n container.css({\n 'height': '100%',\n 'position': 'relative'\n });\n\n //adding a class to recognize the container internally in the code\n container.addClass(WRAPPER);\n $('html').addClass(ENABLED);\n\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n windowsHeight = $window.height();\n\n container.removeClass(DESTROYED); //in case it was destroyed before initializing it again\n\n addInternalSelectors();\n\n //styling the sections / slides / menu\n $(SECTION_SEL).each(function(index){\n var section = $(this);\n var slides = section.find(SLIDE_SEL);\n var numSlides = slides.length;\n\n styleSection(section, index);\n styleMenu(section, index);\n\n // if there's any slide\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n }else{\n if(options.verticalCentered){\n addTableClass(section);\n }\n }\n });\n\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n if(options.fixedElements && options.css3){\n $(options.fixedElements).appendTo($body);\n }\n\n //vertical centered of the navigation + active bullet\n if(options.navigation){\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n\n if(options.scrollOverflow){\n if(document.readyState === 'complete'){\n createScrollBarHandler();\n }\n //after DOM and images are loaded\n $window.on('load', createScrollBarHandler);\n }else{\n afterRenderActions();\n }\n }", "function createList(divPanel)\n{\n let ulMain = document.createElement('ul');\n \n let liHTML = document.createElement('li');\n liHTML.textContent = \"HTML\";\n ulMain.appendChild(liHTML);\n all.push(document.documentElement); //HTML\n allLi.push(liHTML);\n \n let inner = document.createElement('ul');\n \n let liHEAD = document.createElement('li');\n liHEAD.textContent = \"HEAD\";\n inner.appendChild(liHEAD);\n all.push(document.head); //HEAD\n allLi.push(liHEAD);\n \n let liBODY = document.createElement('li');\n liBODY.textContent = \"BODY\";\n inner.appendChild(liBODY);\n all.push(document.body); //BODY\n allLi.push(liBODY);\n \n findNodes(document.body, inner); \n \n ulMain.appendChild(inner);\n divPanel.appendChild(ulMain); \n}", "function createDomElementsFromObjects(dataRequested){\n\tconsole.log(\"Request to create DOM elements from Objects received: \"+dataRequested+\"...\");\n\t\n\tif(dataRequested===\"arcade\"){\n\t\t\n\t\tfor(var i=0;i<gameObjects.length;i++){\n\t\t\tgameObjects[i].createDomElements();\n\t\t}\n\t\tinitializeVerticaliScroll(0, \".vSnapToHere\");\n\n\t}else if(dataRequested===\"auctions\"){\n\t\t\n\t\tfor(var i=0;i<auctionObjects.length;i++){\n\t\t\tauctionObjects[i].createDomElements();\n\t\t}\n\t\t$(\"#auctions .auctions\").append('</br></br></br></br>');\n\t\tinitializeVerticaliScroll(1, \".vSnapToHere\");\n\t\tif(currentAuctionScope===1){\n\t\t\tFB.XFBML.parse(document.getElementById('auction'));\n\t\t}\n\n\t}else if(dataRequested===\"inbox\"){\n\t\t\n\t\tfor(var i=0;i<inboxObjects.length;i++){\n\t\t\tinboxObjects[i].createDomElements();\n\t\t}\n\t\t$(\"#inbox .messages\").append('</br></br>');\n\t\tinitializeVerticaliScroll(2, \".vSnapToHere\");\n\n\t}else if(dataRequested===\"transactions\"){\n\t\t\n\t\tfor(var i=0;i<transactionObjects.length;i++){ \n\t\t\ttransactionObjects[i].createDomElements();\n\t\t}\n\t\tinitializeVerticaliScroll(3, false);\n\n\t}\t\n\n\tconsole.log(\"DOM elements appended: \"+dataRequested+\"#\");\n}", "function buildDOM(){\r\n $.logEvent('[dataVisualization.core.buildDOM]');\r\n \r\n var visualizationWrapperObj = $('<div />')\r\n .attr({\r\n 'class': 'data-visualization ' + dataVisualization.configuration.device,\r\n id: dataVisualization.configuration.visualizationWrapperId\r\n });\r\n \r\n var rowClassname;\r\n var rowObj;\r\n var columnObj;\r\n \r\n // Prepend the wrapper for the visualization functionality to #content for now\r\n // TODO: this will eventually be document.write to the space in the DOM where the JS resides inline\r\n $('#content').prepend(visualizationWrapperObj);\r\n \r\n // Create all necessary event handlers (now that the wrapper for the visualization functionality has been created, and attached to the DOM)\r\n eventHandlersInit();\r\n \r\n $.each(dataVisualization.configuration.data,function(nodeName,value){ \r\n if(nodeName == 'meta-data'){\r\n // Add the overriding CSS classname from the JSON\r\n visualizationWrapperObj.addClass(this.classname);\r\n \r\n dataVisualization.configuration.theme = this.classname;\r\n \r\n if(this['global-key']){\r\n var globalKeyObj = this;\r\n \r\n visualizationWrapperObj\r\n .append(\r\n $('<div />')\r\n .append(\r\n $('<h4 />')\r\n .html('Key')\r\n )\r\n .append(\r\n $('<ul />') \r\n .html(function(){\r\n var listElements = '';\r\n \r\n $.each(globalKeyObj.labels,function(index){\r\n listElements += '<li style=\"color:' + globalKeyObj.colors[index] + '\">' + globalKeyObj.labels[index] + '</li>';\r\n })\r\n \r\n return listElements;\r\n })\r\n )\r\n .attr('id','global-key')\r\n )\r\n }\r\n }\r\n else {\r\n rowClassname = 'data-row';\r\n rowClassname += ' ' + this['meta-data']['row-style'];\r\n \r\n // Add the first exception\r\n if(nodeName == 'row-1') {\r\n rowClassname += ' first';\r\n }\r\n \r\n // Add any themes to the row upon DOM creation/injection\r\n if(this['meta-data'].theme){\r\n rowClassname += ' theme ' + this['meta-data'].theme;\r\n }\r\n \r\n rowObj = $('<div />')\r\n .attr({\r\n 'class': rowClassname\r\n })\r\n \r\n // Add the row to the visualization wrapper\r\n visualizationWrapperObj.append(rowObj);\r\n \r\n // Add the row heading to the component (provided it exists in the JSON)\r\n if(this['meta-data'].heading){ \r\n var headingClass = 'heading';\r\n \r\n if(this['meta-data'].heading['render-inside']){\r\n headingClass += ' inside';\r\n }\r\n \r\n $('<h2 />')\r\n .attr('class',headingClass)\r\n .html(this['meta-data'].heading.text)\r\n .insertBefore(rowObj)\r\n .IF(this['meta-data'].heading['render-inside'])\r\n .prependTo(rowObj)\r\n .ENDIF()\r\n }\r\n else{\r\n rowObj.addClass('compressed');\r\n }\r\n \r\n $.each(this['columns'],function(indexInner,valueInner){\r\n // Bar graphs have an override value for small, medium or regular (largest) heights\r\n var additionalClassname = '';\r\n if(this.size){\r\n additionalClassname += (this.size != 'regular' ? ' ' + this.size : '');\r\n }\r\n \r\n // Bar graphs and scatter graphs have an additional property (svg-palette), to send light or dark values to the plugins, retrieve (and append) where necessary\r\n if(this['meta-data']['svg-palette']){\r\n additionalClassname += ' svg-palette-' + this['meta-data']['svg-palette'];\r\n }\r\n \r\n columnObj = $('<div />')\r\n .append(\r\n $('<div />')\r\n .append(\r\n $('<h2 />')\r\n .html($.capitalize({stringText: this.id}))\r\n )\r\n .append(\r\n $('<a />')\r\n .attr({\r\n 'class': 'reload disabled',\r\n href: '#'\r\n })\r\n .html('Re-load')\r\n )\r\n .append(\r\n $('<div />')\r\n .append(\r\n $('<h4 />')\r\n .html('Loading...')\r\n )\r\n .attr('class','overlay')\r\n )\r\n .append(\r\n $('<div />')\r\n .append(\r\n $('<div />')\r\n .attr({\r\n 'class': this['meta-data']['column-type'] + ' interactive' + additionalClassname,\r\n id: this.id\r\n })\r\n .data('interactive',this) // Add the retrieved JSON data to the interactive DOM element for later use when initializing the interactive functionality\r\n )\r\n .attr('class','inner')\r\n )\r\n .attr('class','module')\r\n )\r\n .attr('class',this['meta-data']['grid-column-type'])\r\n \r\n // Handle specific data attributes for Fusion maps\r\n if(this['meta-data']['column-type'] == 'fusion-map'){\r\n $('.interactive',columnObj)\r\n .append(\r\n $('<img />')\r\n .attr({\r\n 'class': 'mobile',\r\n src: this['mobile-image']\r\n })\r\n )\r\n .attr({\r\n \"data-bucket-colours\": this['meta-data']['bucket-colours'],\r\n \"data-bucket-ranges\": this['meta-data']['bucket-ranges'],\r\n \"data-latitude-origin\": this['meta-data']['latitude-origin'],\r\n \"data-longitude-origin\": this['meta-data']['longitude-origin'],\r\n \"data-zoom-level\": this['meta-data']['zoom-level']\r\n });\r\n }\r\n \r\n // Handle specific data attributes for Bar charts\r\n if(this['meta-data']['column-type'] == 'bar-graph'){\r\n $('.interactive',columnObj)\r\n .attr({\r\n \"data-orientation\": this.orientation\r\n });\r\n }\r\n \r\n // Add the column to the current row\r\n rowObj.append(columnObj);\r\n });\r\n }\r\n });\r\n \r\n // The data is now attached to each unique DOM element, so the global storage can now be removed\r\n dataVisualization.configuration.data = null;\r\n\r\n // Dynamically create the load sequence based on the results of the DOM injection\r\n createLoadSequence();\r\n }", "addToDOM() {\n /*\n DOM INDEX\n * wrap: class=\"_DebuggerAppWrap\": div wrapper containing all elements for this application\n * app_header: class=\"_DebuggerAppHeader\": div container app Header (app UUID);\n * children: class=\"_DebuggerAppChildren\": div wrapper containing all elements of the child windows\n * children_header: class=\"_DebuggerAppChildrenHeader\": div containing child area Header (\"Windows\");\n * button.*: class=\"_DebuggerAppButton\": Button elements for various actions\n\n */\n\n this.DOM.CSS.wrap = \"_DebuggerAppWrap\";\n this.DOM.CSS.appHeader = \"_DebuggerAppHeader\";\n this.DOM.CSS.children = \"_DebuggerAppChildren\";\n this.DOM.CSS.childrenHeader = \"_DebuggerAppChildrenHeader\";\n this.DOM.CSS.button = \"_DebuggerAppButton\";\n\n this.DOM.wrap = $(`<div></div>`).addClass(this.DOM.CSS.wrap);\n\n this.DOM.app_header = $(`<div>${this.uuid}</div>`).addClass(this.DOM.CSS.appHeader);\n\n this.DOM.children = $(`<div></div>`).addClass(this.DOM.CSS.children);\n this.DOM.children_header = $(`<div>Windows</div>`).addClass(this.DOM.CSS.childrenHeader);\n\n $(this.DOM.children).append(this.DOM.children_header);\n\n this.DOM.button.devTools = $(`<button>Dev Tools</button>`)\n .addClass(this.DOM.CSS.button)\n .click(() => {\n fin.desktop.System.showDeveloperTools(this.uuid, this.name, () => { }, (e) => { console.log(e) });\n });\n\n this.DOM.button.restart = $(`<button>Restart</button>`)\n .addClass(this.DOM.CSS.button)\n .click(() => {\n this.app.restart();\n });\n\n $(this.DOM.wrap).append(this.DOM.app_header);\n $(this.DOM.wrap).append(this.DOM.button.devTools);\n $(this.DOM.wrap).append(this.DOM.button.restart);\n $(this.DOM.wrap).append(this.DOM.children);\n\n $(\"#_DebuggerApps\").append(this.DOM.wrap);\n }", "function start() {\n // Runs through this loop 16 times to create 16 divs\n for(let i=0; i <=15; i++) {\n // Calls on create element function to initialize the div\n Controls.divBlocks = create(\"div\", \"static\", \"200px\", \"100px\", \"left\",);\n // Sets the background color to red\n Controls.divBlocks.style.backgroundColor = \"red\"; \n // Appends child to the body\n Controls.divBlocks = document.body.appendChild(Controls.divBlocks); \n // Sets the attribute and name\n Controls.divBlocks.setAttribute(\"data-color\", \"block\");\n // Adds event listener for when the div is clicked\n Controls.divBlocks = addEventListener(\"click\", divClick);\n }\n}", "function _build(items) {\n var tbody = document.getElementsByTagName(\"tbody\"),\n fragment = document.createDocumentFragment(),\n rows = [],\n row;\n\n items.forEach(function (item) {\n row = _getRow(item);\n rows.push(row);\n });\n\n rows.forEach(function (r) {\n fragment.appendChild(r);\n });\n\n tbody[0].appendChild(fragment);\n\n \n }", "function _createElements(elements) {\n elements.forEach((el) => {\n // container surrounding the main element\n const newElContainer = document.createElement(\"div\");\n newElContainer.classList.add(\"element\");\n\n // main element\n let newEl;\n if (el.type === \"link\") {\n newEl = document.createElement(\"div\");\n newEl.classList.add(\"iframe-cover\");\n const iframe = document.createElement(\"iframe\");\n iframe.src = el.src;\n iframe.scrolling = \"no\";\n newElContainer.appendChild(iframe);\n } else if (el.type === \"audio\") {\n newEl = document.createElement(\"div\");\n newEl.classList.add(\"audio-cover\");\n const audio = document.createElement(\"audio\");\n audio.controls = true;\n newElContainer.appendChild(audio);\n } else {\n newEl = document.createElement(el.type);\n newEl.src = el.src;\n }\n _createOverlayElements(el, newEl, overlay);\n newElContainer.appendChild(newEl);\n\n // title\n const newTitleEl = document.createElement(\"h2\");\n newTitleEl.classList.add(\"title\");\n newTitleEl.innerHTML = el.title;\n if (el.type === \"audio\") {\n newTitleEl.classList.add(\"audio-title\");\n }\n\n // container surrounding elements container and title\n const galleryItem = document.createElement(\"div\");\n galleryItem.classList.add(\n \"gallery-item\",\n `priority-${el.priority}`\n );\n galleryItem.appendChild(newElContainer);\n galleryItem.appendChild(newTitleEl);\n\n _allElements.push(galleryItem);\n });\n _filteredOverlayElements = _allOverlayElements;\n }", "appendElements() {\n this.appendChild(this.container)\n }", "function makeElement(tagName, arrayPropertys) {\n var el = document.createElement(tagName);\n if (arrayPropertys == null || arrayPropertys == \"\")\n return el;\n\n //setando atributos\n for (x = 0; x < arrayPropertys.split(\"&\").length; ++x)\n {\n var attr = arrayPropertys.split(\"&\")[x].split(\"=\")[0];\n //O IE tem alguns atributos HTML diferentes do padrao W3C.\n attr = (attr.indexOf(\"class\") > -1 && isIE() ? \"className\" : attr);\n attr = (attr.indexOf(\"style\") > -1 && isIE() ? \"cssText\" : attr);\n //se o atributo eh um evento...\n if (attr.indexOf(\"on\") > -1 && isIE())\n el.attachEvent(attr, new Function(arrayPropertys.split(\"&\")[x].split(\"=\")[1]));\n else if (attr == \"innerHTML\")\n el.innerHTML = arrayPropertys.split(\"&\")[x].split(\"=\")[1];\n //else if (attr == \"checked\")\n // el.check = true;\n else\n el.setAttribute(attr, arrayPropertys.split(\"&\")[x].split(\"=\")[1]);\n\n }\n\n //setando o name para o id\n if (el.name == \"\")\n el.name = el.id;\n\n return el;\n}", "function createDom(vdom) {\r\n\t\tlet newElement = null;\r\n\t\t// Create text node for text\r\n\t\tif (vdom.type === \"text\") {\r\n\t\t\tnewElement = document.createTextNode(vdom.props.textNode);\r\n\t\t} else {\r\n\t\t\t// Create the dom element\r\n\t\t\tnewElement = document.createElement(vdom.type);\r\n\t\t\tsetElementProps(newElement, vdom.props);\r\n\t\t}\r\n\r\n\t\t// Iterate the children, create the element and set the attributes\r\n\t\tvdom.children.forEach((child) => mountNode(child, newElement));\r\n\t\treturn newElement;\r\n\t}", "function generateContent() {\n for (i = 0; i < database.length; i++) {\n\n // Creates div to contain content\n const contentContainer = document.createElement('div');\n contentContainer.setAttribute('class', 'container');\n contentContainer.setAttribute('id', i);\n document.body.appendChild(contentContainer);\n\n // Generates Image\n const img = document.createElement('img');\n img.setAttribute('src', database[i].img);\n img.setAttribute('class', 'img');\n contentContainer.appendChild(img);\n\n // Generates Title\n const title = document.createElement('h2');\n title.innerHTML = database[i].title;\n title.setAttribute('class', 'title');\n contentContainer.appendChild(title);\n\n // Generates Attribute\n const attribute = document.createElement('h4');\n attribute.innerHTML = database[i].attribute;\n attribute.setAttribute('class', 'attribute');\n contentContainer.appendChild(attribute);\n\n // Generates Date\n const date = document.createElement('h4');\n date.innerHTML = database[i].date;\n date.setAttribute('class', 'date');\n contentContainer.appendChild(date);\n\n // Generates Text Content\n const text = document.createElement('p');\n text.innerHTML = database[i].text;\n text.setAttribute('class', 'text');\n contentContainer.appendChild(text);\n }\n}", "createDOMElements(){\n // Main Book Container Div\n let bookContainer = document.createElement(\"div\");\n bookContainer.classList.add(\"book\");\n bookContainer.dataset.id = this.id;\n //Details Div\n let bookDetailsContainer = document.createElement(\"div\");\n bookDetailsContainer.classList.add(\"bookdetails\");\n //Book Name Heading\n let bookNameH2 = document.createElement(\"h2\");\n // Complete/Incomplete and Author name Container\n let completeAuthorContainer = document.createElement(\"div\");\n completeAuthorContainer.classList.add(\"complete-author\");\n // Completed or Not Completed text Content\n let compIncompPara = document.createElement(\"p\");\n //Author name textContent\n let authorSpan = document.createElement(\"span\");\n \n // Container for Buttons\n let btnContainer = document.createElement(\"div\");\n btnContainer.classList.add(\"btn-container\");\n //Edit Book Btn\n let btnEdit = document.createElement(\"button\");\n btnEdit.classList.add(\"btn\",\"btn-primary\");\n //Remove Book Btn\n let btnRemove = document.createElement(\"button\");\n btnRemove.classList.add(\"btn\",\"btn-danger\");\n //Toggle Complete and Incomplete Reading Book Btn\n let btnToggleComplete = document.createElement(\"button\");\n btnToggleComplete.classList.add(\"btn\",\"btn-warning\");\n\n //Adding TextContents\n bookNameH2.textContent = this.bookName;\n compIncompPara.textContent = this.isCompleted ? \"Completed\" : \"Not Completed\";\n authorSpan.textContent = \"~ \"+ this.bookAuthor;\n btnEdit.textContent = \"Edit\";\n btnRemove.textContent = \"Remove\";\n btnToggleComplete.textContent = `Mark as ${this.isCompleted ? \"Completed\" : \"Not Completed\"}`;\n \n //Apending Content to Main Containers\n completeAuthorContainer.append(compIncompPara,authorSpan);\n bookDetailsContainer.append(bookNameH2,completeAuthorContainer);\n btnContainer.append(btnEdit,btnRemove,btnToggleComplete);\n bookContainer.append(bookDetailsContainer,btnContainer);\n //Event Listeners\n btnEdit.addEventListener(\"click\",()=>{\n FormBookModal(\"edit\",this);\n });\n btnRemove.addEventListener(\"click\",()=>{\n let index = myLibrary.filter((book)=>{\n if(book.id === this.id)\n return true;\n });\n myLibrary.splice(index.id-1,1);\n updateToDOM();\n saveAllToLocalStorage();\n });\n btnToggleComplete.addEventListener(\"click\",()=>{\n this.toggleIsCompleted();\n btnToggleComplete.textContent = `Mark as ${this.isCompleted ? \"Completed\" : \"Not Completed\"}`;\n compIncompPara.textContent = this.isCompleted ? \"Completed\" : \"Not Completed\";\n updateToDOM();\n saveAllToLocalStorage();\n });\n return bookContainer;\n }", "create(...entities) {\n let newInstance = new MicroDOM;\n for (const entity of entities) if (\"string\" == typeof entity) newInstance.push(document.createElement(entity)); else if (entity instanceof Object) {\n const el = document.createElement(entity.tagName || \"div\");\n entity.content && (Array.isArray(entity.content) ? recursiveAppend(el, ...entity.content) : recursiveAppend(el, entity.content)), \n newInstance.push(el);\n }\n return newInstance;\n }", "function prepareDom(){\r\n container.css({\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n container.addClass(WRAPPER);\r\n $('html').addClass(ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = $window.height();\r\n\r\n container.removeClass(DESTROYED); //in case it was destroyed before initializing it again\r\n\r\n addInternalSelectors();\r\n\r\n //styling the sections / slides / menu\r\n $(SECTION_SEL).each(function(index){\r\n var section = $(this);\r\n var slides = section.find(SLIDE_SEL);\r\n var numSlides = slides.length;\r\n\r\n styleSection(section, index);\r\n styleMenu(section, index);\r\n\r\n // if there's any slide\r\n if (numSlides > 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n });\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).appendTo($body);\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n\r\n if(options.scrollOverflow){\r\n if(document.readyState === 'complete'){\r\n createScrollBarHandler();\r\n }\r\n //after DOM and images are loaded\r\n $window.on('load', createScrollBarHandler);\r\n }else{\r\n afterRenderActions();\r\n }\r\n }", "function prepareDom(){\r\n container.css({\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n container.addClass(WRAPPER);\r\n $('html').addClass(ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = $window.height();\r\n\r\n container.removeClass(DESTROYED); //in case it was destroyed before initializing it again\r\n\r\n addInternalSelectors();\r\n\r\n //styling the sections / slides / menu\r\n $(SECTION_SEL).each(function(index){\r\n var section = $(this);\r\n var slides = section.find(SLIDE_SEL);\r\n var numSlides = slides.length;\r\n\r\n styleSection(section, index);\r\n styleMenu(section, index);\r\n\r\n // if there's any slide\r\n if (numSlides > 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n });\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).appendTo($body);\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n\r\n if(options.scrollOverflow){\r\n if(document.readyState === 'complete'){\r\n createScrollBarHandler();\r\n }\r\n //after DOM and images are loaded\r\n $window.on('load', createScrollBarHandler);\r\n }else{\r\n afterRenderActions();\r\n }\r\n }", "init() {\n this.docElementNS = document.createElementNS(this.xmlns, 'image');\n this.docElementNS.setAttribute('id', this.id);\n this.docElementNS.setAttribute('xlink:href', this.xlinkHref);\n this.docElementNS.setAttribute('width', this.width);\n this.docElementNS.setAttribute('height', this.height);\n this.docElementNS.setAttribute('x', this.x);\n this.docElementNS.setAttribute('y', this.y);\n this.docElementNS.setAttribute('opacity', this.opacity)\n if (this.onclick) {\n this.docElementNS.setAttribute('onclick', this.onclick);\n }\n if (this.children && this.children.length) {\n this.children.map((child) => {\n child.parent = this;\n if (child.docElementNS) {\n this.docElementNS.appendChild(child.docElementNS);\n }\n });\n }\n if (this.autoBind) {\n this.bind();\n }\n }", "ready() {\n super.ready();\n this._createElement();\n }", "_build() {\n if ( typeof this._options.body === 'string' ) {\n this._body.innerHTML = this._options.body;\n }\n else if ( this._options.body instanceof Element ) {\n this._body.appendChild( this._options.body );\n }\n this._header.appendChild( this._title );\n this._header.appendChild( this._close );\n this._container.appendChild( this._header );\n this._container.appendChild( this._body );\n this._overlay.appendChild( this._container );\n document.body.appendChild( this._overlay );\n setTimeout( () => { this._overlay.classList.add( 'visible' ); }, 300 );\n }", "static buildDom(el) {\n var smoDomBuilder = function (el) {\n this.e = $('<' + el + '/>');\n var self = this;\n this.classes = function (cl) {\n $(self.e).addClass(cl);\n return self;\n }\n this.html = function(value) {\n $(self.e).html(value);\n return self;\n }\n this.data = function (name, value) {\n $(self.e).attr('data-' + name, value);\n return self;\n }\n this.attr = function (name, value) {\n $(self.e).attr(name, value);\n return self;\n }\n this.prop = function (name, value) {\n $(self.e).prop(name, value);\n return self;\n }\n this.css = function (name, value) {\n $(self.e).css(name, value);\n return self;\n }\n this.append = function (el) {\n $(self.e).append(el.e);\n return self;\n }\n this.text = function (tx) {\n $(self.e).append(document.createTextNode(tx));\n return self;\n }\n this.dom = function () {\n return self.e;\n }\n return this;\n }\n return new smoDomBuilder(el);\n }", "createElement() {\n if (this.isntNumber(this.elemId)) {\n this._makeElem(this.getParentElemId());\n if (this.cssOverflowY === false && this.cssOverflowX === false) {\n if (this.cssOverflow) {\n ELEM.setStyle(this.elemId, 'overflow', this.cssOverflow, true);\n }\n }\n if (this.cssOverflowY !== false) {\n ELEM.setStyle(this.elemId, 'overflow-y', this.cssOverflowY, true);\n }\n if (this.cssOverflowX !== false) {\n ELEM.setStyle(this.elemId, 'overflow-x', this.cssOverflowX, true);\n }\n ELEM.setStyle(this.elemId, 'visibility', 'hidden', true);\n ELEM.setStyle(this.elemId, 'position', this.cssPosition);\n\n // Theme name => CSS class name\n if (this.preserveTheme) {\n ELEM.addClassName(this.elemId, this.theme);\n }\n else {\n ELEM.addClassName(this.elemId, HThemeManager.currentTheme);\n }\n // componentName => CSS class name\n if (this.isString(this.componentName)) {\n const classNamesArray =\n this.isString(this.componentClassNames) ?\n this.componentClassNames.split(' ') :\n this.isArray(this.componentClassNames) ?\n this.componentClassNames :\n [this.componentName];\n classNamesArray.forEach(className => {\n ELEM.addClassName(this.elemId, className);\n });\n }\n // BROWSER_TYPE.* = true => CSS class names\n Object.entries(BROWSER_TYPE).forEach(([_browserName, _active]) => {\n if (_active) {\n ELEM.addClassName(this.elemId, _browserName);\n }\n });\n if (this.isArray(this.options.classes)) {\n this.options.classes.forEach(_className => {\n ELEM.addClassName(this.elemId, _className);\n });\n }\n if (this.isntNullOrUndefined(this.options.textSelectable)) {\n this.textSelectable = this.options.textSelectable;\n }\n this.updateTextSelectable();\n }\n }", "build() {\n\n // instanciation de la classe Hoover\n this.hoover = new Hoover();\n\n // création de l'élement DOM hoover\n var p = document.createElement(\"p\");\n p.innerHTML = this.hoover.card;\n\n var y = this.hoover.y;\n var x = this.hoover.x;\n\n // initialisation du hoover sur la balise <td id = 5-5>\n document.getElementById(y + '-' + x).appendChild(p);\n }", "function createUserElements() {\n for (let i = 1; i <= 100; i++) {\n document.body.appendChild(creatUserElement());\n }\n}", "function addToDom() {\n\n projectParent.innerHTML = ''\n\n //Create Project Instances\n\n for (let i = 0; i < projectCapture.myProjects.length; i++) {\n\n const projectInstance = document.createElement('div');\n const projectName = document.createElement('span');\n const projectDate = document.createElement('span');\n const deleteBtn = document.createElement('IMG');\n\n\n\n projectParent.appendChild(projectInstance);\n projectInstance.setAttribute('id', 'project' + i);\n projectInstance.classList.add('project-instance');\n\n //Create Number of to-dos\n const todoBullet = document.createElement('div');\n projectInstance.appendChild(todoBullet);\n todoBullet.setAttribute('id', 'todo-bullet')\n todoBullet.textContent = projectCapture.myProjects[i].todos.length;\n\n\n\n //Project Name\n projectInstance.appendChild(projectName);\n projectName.textContent = projectCapture.myProjects[i].name + ' ';\n\n\n projectName.addEventListener('dblclick', () => {\n projectName.setAttribute('contentEditable', 'true')\n })\n\n projectName.setAttribute('id', 'project-name')\n projectName.addEventListener('input', () => {\n projectCapture.myProjects[i].name = projectName.textContent;\n projectCapture.saveProjects();\n })\n\n //Project date\n projectInstance.appendChild(projectDate);\n projectDate.setAttribute('id', 'project-date')\n const editDateButton = document.createElement('IMG');\n editDateButton.src = Calendar;\n editDateButton.width = '15'\n editDateButton.setAttribute('id', 'edit-date-button');\n editDateButton.classList.add('hide')\n\n\n const editDate = document.createElement('INPUT');\n editDate.setAttribute('id', 'project-date-input')\n editDate.classList.add('hide');\n projectInstance.appendChild(editDateButton);\n projectInstance.appendChild(editDate);\n editDate.setAttribute('type', 'date');\n editDateButton.addEventListener('click', () => {\n editDate.classList.toggle('hide');\n projectDate.classList.toggle('hide');\n\n })\n\n if (projectCapture.myProjects[i].dueDate === '') {\n projectDate.textContent = projectCapture.myProjects[i].dueDate;\n } else {\n projectDate.textContent = 'Due: ' + projectCapture.myProjects[i].dueDate;\n\n }\n\n\n\n editDate.addEventListener('input', () => {\n projectCapture.myProjects[i].dueDate = format(new Date(editDate.value), 'dd/MM/yyyy');\n projectDate.textContent = 'Due: ' + projectCapture.myProjects[i].dueDate;\n editDate.classList.add('hide');\n projectCapture.saveProjects();\n render();\n\n })\n //Warning colour and text for late project\n const warningText = document.createElement('span');\n\n warningText.setAttribute('id', 'warning-text');\n if (projectCapture.myProjects[i].dueDate != '' && projectCapture.myProjects[i].dueDate < format(new Date(), 'dd/MM/yyyy')) {\n\n projectDate.style.color = 'red';\n projectDate.appendChild(warningText);\n warningText.textContent = 'Project is overdue!'\n }\n if (projectCapture.myProjects[i].dueDate == format(new Date(), 'dd/MM/yyyy')) {\n projectDate.style.color = 'rgb(216, 68, 0)';\n projectDate.appendChild(warningText);\n warningText.textContent = 'Project is due today!'\n }\n\n\n\n\n\n projectInstance.addEventListener('mouseover', () => {\n\n editDateButton.classList.remove('hide')\n })\n projectInstance.addEventListener('mouseleave', () => {\n\n editDateButton.classList.add('hide')\n })\n\n\n\n //More info button\n const info = document.createElement('button');\n projectInstance.appendChild(info);\n info.innerHTML = 'Info';\n info.setAttribute('id', 'project-info-button')\n\n const infoDiv = document.createElement('div');\n infoDiv.setAttribute('id', 'info-div')\n infoDiv.textContent = projectCapture.myProjects[i].moreInfo;\n projectParent.appendChild(infoDiv);\n infoDiv.classList.add('hide');\n\n\n\n info.addEventListener('click', () => {\n\n infoDiv.classList.toggle('hide')\n if (info.innerHTML === 'Info') {\n info.innerHTML = 'Hide'\n } else {\n info.innerHTML = 'Info'\n }\n\n if (infoDiv.textContent == '') {\n infoDiv.textContent = 'Edit Description'\n }\n\n })\n\n //Edit Description\n\n\n infoDiv.addEventListener('click', () => {\n infoDiv.setAttribute('contentEditable', 'true')\n })\n infoDiv.addEventListener('input', () => {\n projectCapture.myProjects[i].moreInfo = infoDiv.textContent;\n projectCapture.saveProjects();\n })\n\n //Delete icon\n projectInstance.appendChild(deleteBtn);\n deleteBtn.setAttribute('id', 'delete' + i);\n deleteBtn.setAttribute('class', 'projectdelete');\n deleteBtn.classList.add('hide');\n deleteBtn.src = Trash1;\n deleteBtn.width = '30'\n\n deleteBtn.addEventListener('click', () => {\n if (selectCurrentProject.currentProject.todos.length > 0) {\n if (confirm(`There are incomplete tasks for ${projectCapture.myProjects[i].name}.\\nAre you sure you want to delete this project?`) == true) {\n projectCapture.myProjects.splice(i, 1);\n selectCurrentProject.currentProject = projectCapture.myProjects[0];\n projectCapture.saveProjects();\n render();\n } else {\n selectCurrentProject.currentProject = projectCapture.myProjects[0];\n projectCapture.saveProjects();\n render();\n }\n } else {\n projectCapture.myProjects.splice(i, 1);\n selectCurrentProject.currentProject = projectCapture.myProjects[0];\n projectCapture.saveProjects();\n render();\n }\n\n\n\n })\n\n projectInstance.addEventListener('mouseover', () => {\n\n deleteBtn.classList.remove('hide')\n })\n projectInstance.addEventListener('mouseleave', () => {\n\n deleteBtn.classList.add('hide')\n })\n\n\n \n projectInstance.addEventListener('click', () => {\n selectCurrentProject.currentProject = projectCapture.myProjects[i];\n \n render();\n\n })\n\n \n\n }\n\n //Highlight current project\n const instances = document.querySelectorAll('.project-instance');\n let instanceArray = Array.from(instances);\n let projIndex = projectCapture.myProjects.indexOf(selectCurrentProject.currentProject)\n if (projIndex == 0) {\n instanceArray[0].style.backgroundColor = 'rgb(211, 230, 255)'\n instanceArray[0].style.borderRadius = '5px';\n } else if (projIndex > 0) {\n instanceArray[projIndex].style.backgroundColor = 'rgb(211, 230, 255)'\n instanceArray[projIndex].style.borderRadius = '5px';\n }\n \n }", "function buildPage() {\n //create title\n createElementsSlidWeOffer.titleWeOffer.classList.add('titleWeOffer');\n createElementsSlidWeOffer.titleWeOffer.appendChild(createElementsSlidWeOffer.textTitleWeOffer);\n slid2.appendChild(createElementsSlidWeOffer.titleWeOffer);\n\n // create svg\n createElementsSlidWeOffer.blockSVGWeOffer.classList.add('blockSVG');\n slid2.appendChild(createElementsSlidWeOffer.blockSVGWeOffer);\n\n // create modal window for internet shop\n createElementsSlidWeOffer.modalWindowInternetShop.classList.add('modalWeOfffer', 'internetShop');\n createElementsSlidWeOffer.containerModalInternetShop.classList.add('containerWeOfffer');\n createElementsSlidWeOffer.buttonModalInternetShop.classList.add('internetShopButton');\n // createElementsSlidWeOffer.buttonModalInternetShop.appendChild(createTextForModalWindows.textButtonInternetShop);\n createElementsSlidWeOffer.containerModalInternetShop.appendChild(createElementsSlidWeOffer.blockTextModalInternetShop);\n createElementsSlidWeOffer.containerModalInternetShop.appendChild(createElementsSlidWeOffer.buttonModalInternetShop);\n createElementsSlidWeOffer.blockTextModalInternetShop.appendChild(createTextForModalWindows.textModalInternetShop);\n createElementsSlidWeOffer.modalWindowInternetShop.appendChild(createElementsSlidWeOffer.containerModalInternetShop);\n slid2.appendChild(createElementsSlidWeOffer.modalWindowInternetShop);\n\n // create modal window for site company\n createElementsSlidWeOffer.modalWindowSiteCompany.classList.add('modalWeOfffer', 'siteCompany');\n createElementsSlidWeOffer.containerModalSiteCompany.classList.add('containerWeOfffer');\n createElementsSlidWeOffer.buttonModalSiteCompany.classList.add('siteCompanyButton');\n // createElementsSlidWeOffer.buttonModalSiteCompany.appendChild(createTextForModalWindows.textButtonSiteCompany);\n createElementsSlidWeOffer.containerModalSiteCompany.appendChild(createElementsSlidWeOffer.blockTextModalSiteCompany);\n createElementsSlidWeOffer.containerModalSiteCompany.appendChild(createElementsSlidWeOffer.buttonModalSiteCompany);\n createElementsSlidWeOffer.blockTextModalSiteCompany.appendChild(createTextForModalWindows.textModalSiteCompany);\n createElementsSlidWeOffer.modalWindowSiteCompany.appendChild(createElementsSlidWeOffer.containerModalSiteCompany);\n slid2.appendChild(createElementsSlidWeOffer.modalWindowSiteCompany);\n\n // create modal window for Blog\n createElementsSlidWeOffer.modalWindowBlog.classList.add('modalWeOfffer', 'blog');\n createElementsSlidWeOffer.containerModalBlog.classList.add('containerWeOfffer');\n createElementsSlidWeOffer.buttonModalBlog.classList.add('blogButton');\n // createElementsSlidWeOffer.buttonModalBlog.appendChild(createTextForModalWindows.textButtonBlog);\n createElementsSlidWeOffer.containerModalBlog.appendChild(createElementsSlidWeOffer.blockTextModalBlog);\n createElementsSlidWeOffer.containerModalBlog.appendChild(createElementsSlidWeOffer.buttonModalBlog);\n createElementsSlidWeOffer.blockTextModalBlog.appendChild(createTextForModalWindows.textModalBlog);\n createElementsSlidWeOffer.modalWindowBlog.appendChild(createElementsSlidWeOffer.containerModalBlog);\n slid2.appendChild(createElementsSlidWeOffer.modalWindowBlog);\n\n // create modal window for Portfolio\n createElementsSlidWeOffer.modalWindowPortfolio.classList.add('modalWeOfffer', 'portfolio');\n createElementsSlidWeOffer.containerModalPortfolio.classList.add('containerWeOfffer');\n createElementsSlidWeOffer.buttonModalPortfolio.classList.add('portfolioButton');\n // createElementsSlidWeOffer.buttonModalPortfolio.appendChild(createTextForModalWindows.textButtonPortfolio);\n createElementsSlidWeOffer.containerModalPortfolio.appendChild(createElementsSlidWeOffer.blockTextModalPortfolio);\n createElementsSlidWeOffer.containerModalPortfolio.appendChild(createElementsSlidWeOffer.buttonModalPortfolio);\n createElementsSlidWeOffer.blockTextModalPortfolio.appendChild(createTextForModalWindows.textModalPortfolio);\n createElementsSlidWeOffer.modalWindowPortfolio.appendChild(createElementsSlidWeOffer.containerModalPortfolio);\n slid2.appendChild(createElementsSlidWeOffer.modalWindowPortfolio);\n\n // create modal window for Social Network\n createElementsSlidWeOffer.modalWindowSocialNetwork.classList.add('modalWeOfffer', 'socialNetwork');\n createElementsSlidWeOffer.containerModalSocialNetwork.classList.add('containerWeOfffer');\n createElementsSlidWeOffer.buttonModalSocialNetwork.classList.add('socialNetworkButton');\n // createElementsSlidWeOffer.buttonModalSocialNetwork.appendChild(createTextForModalWindows.textButtonSocialNetwork);\n createElementsSlidWeOffer.containerModalSocialNetwork.appendChild(createElementsSlidWeOffer.blockTextModalSocialNetwork);\n createElementsSlidWeOffer.containerModalSocialNetwork.appendChild(createElementsSlidWeOffer.buttonModalSocialNetwork);\n createElementsSlidWeOffer.blockTextModalSocialNetwork.appendChild(createTextForModalWindows.textModalSocialNetwork);\n createElementsSlidWeOffer.modalWindowSocialNetwork.appendChild(createElementsSlidWeOffer.containerModalSocialNetwork);\n slid2.appendChild(createElementsSlidWeOffer.modalWindowSocialNetwork);\n\n // create modal window for Forum\n createElementsSlidWeOffer.modalWindowForum.classList.add('modalWeOfffer', 'forum');\n createElementsSlidWeOffer.containerModalForum.classList.add('containerWeOfffer');\n createElementsSlidWeOffer.buttonModalForum.classList.add('forumButton');\n // createElementsSlidWeOffer.buttonModalForum.appendChild(createTextForModalWindows.textButtonForum);\n createElementsSlidWeOffer.containerModalForum.appendChild(createElementsSlidWeOffer.blockTextModalForum);\n createElementsSlidWeOffer.containerModalForum.appendChild(createElementsSlidWeOffer.buttonModalForum);\n createElementsSlidWeOffer.blockTextModalForum.appendChild(createTextForModalWindows.textModalForum);\n createElementsSlidWeOffer.modalWindowForum.appendChild(createElementsSlidWeOffer.containerModalForum);\n slid2.appendChild(createElementsSlidWeOffer.modalWindowForum);\n\n // create modal window for Landing\n createElementsSlidWeOffer.modalWindowLanding.classList.add('modalWeOfffer', 'landing');\n createElementsSlidWeOffer.containerModalLanding.classList.add('containerWeOfffer');\n createElementsSlidWeOffer.buttonModalLanding.classList.add('landingButton');\n // createElementsSlidWeOffer.buttonModalLanding.appendChild(createTextForModalWindows.textButtonLanding);\n createElementsSlidWeOffer.containerModalLanding.appendChild(createElementsSlidWeOffer.blockTextModalLanding);\n createElementsSlidWeOffer.containerModalLanding.appendChild(createElementsSlidWeOffer.buttonModalLanding);\n createElementsSlidWeOffer.blockTextModalLanding.appendChild(createTextForModalWindows.textModalLanding);\n createElementsSlidWeOffer.modalWindowLanding.appendChild(createElementsSlidWeOffer.containerModalLanding);\n slid2.appendChild(createElementsSlidWeOffer.modalWindowLanding);\n\n // create modal window for Game Sours\n createElementsSlidWeOffer.modalWindowGameSours.classList.add('modalWeOfffer', 'gameSours');\n createElementsSlidWeOffer.containerModalGameSours.classList.add('containerWeOfffer');\n createElementsSlidWeOffer.buttonModalGameSours.classList.add('gameSoursButton');\n // createElementsSlidWeOffer.buttonModalGameSours.appendChild(createTextForModalWindows.textButtonGameSours);\n createElementsSlidWeOffer.containerModalGameSours.appendChild(createElementsSlidWeOffer.blockTextModalGameSours);\n createElementsSlidWeOffer.containerModalGameSours.appendChild(createElementsSlidWeOffer.buttonModalGameSours);\n createElementsSlidWeOffer.blockTextModalGameSours.appendChild(createTextForModalWindows.textModalGameSours);\n createElementsSlidWeOffer.modalWindowGameSours.appendChild(createElementsSlidWeOffer.containerModalGameSours);\n slid2.appendChild(createElementsSlidWeOffer.modalWindowGameSours);\n}", "function createNodes(el) {\n function getChildNodes() {\n var children = [];\n for (var i = 0; i < el.childNodes.length; i++) {\n var child = el.childNodes[i];\n if (child.nodeType === 1) {\n if (child.getAttribute('layout-style')) {\n children.push(createNodes(child));\n }\n }\n }\n return children;\n }\n return {\n style: parseStyle(el.getAttribute('layout-style')),\n children: getChildNodes(el),\n element: el\n };\n }", "function createDomElement(properties){\n //Creating the element with the property tagName\n var domElement = document.createElement(properties.tagName);\n\n //Loop through the attributes to set them on the element\n var attributes = properties.attributes;\n for (var prop in attributes) {\n domElement.setAttribute(prop, attributes[prop]);\n }\n\n //If any content, set the inner HTML\n if (properties.content) {\n domElement.innerHTML = properties.content;\n }\n\n //Return to use in other functions\n return domElement;\n}", "constructor() {\n this.id = undefined;\n this.headerTitle = undefined;\n \n // Structure for a button element\n this.buttonElement = function() {\n return {\n tagName: \"button\",\n onClick: null,\n text: null\n };\n };\n \n // Structure for a select element\n this.selectElement = function() {\n return {\n desc: null,\n tagName: \"select\",\n id: null,\n onChange: null,\n value: null,\n text: null\n };\n };\n \n // Structure for a text element\n this.textElement = function() {\n return {\n tagName: \"p\",\n text: null\n };\n }\n \n // List of element(s) to generate\n this.elementList = [];\n }", "function populateDOMElementVariables() {\n //_testControl.setInputElement(document.getElementById(\"TestSelect\") as HTMLSelectElement);\n //_testControl.setOutputElement(document.getElementById(\"Output\") as HTMLDivElement);\n players.push(new Player_1.Player(document.getElementById(\"Player1\"), \"Player1\"));\n players.push(new Player_1.Player(document.getElementById(\"Player2\"), \"Player2\"));\n players.push(new Player_1.Player(document.getElementById(\"Player3\"), \"Player3\"));\n players.push(new Player_1.Player(document.getElementById(\"Player4\"), \"Player4\"));\n players.push(new Player_1.Player(document.getElementById(\"Player5\"), \"Player5\"));\n players.push(new Player_1.Player(document.getElementById(\"Player6\"), \"Player6\"));\n players.push(new Player_1.Player(document.getElementById(\"Player7\"), \"Player7\"));\n players.push(new Player_1.Player(document.getElementById(\"Player8\"), \"Player8\"));\n return;\n}", "_addElementStructure() {\n const that = this;\n\n that._cells = [];\n that._table = document.createElement('table');\n that._table.className = 'jqx-array-element-gap';\n\n const tableBody = document.createElement('tbody'),\n masterFragment = document.createDocumentFragment();\n\n for (let i = 0; i < that.rows; i++) {\n const currentRow = document.createElement('tr'),\n childFragment = document.createDocumentFragment();\n\n currentRow.classList.add('jqx-array-table-row');\n that._cells.push([]);\n\n for (let j = 0; j < that.columns; j++) {\n const currentCell = document.createElement('td');\n\n currentCell.classList.add('jqx-array-table-data');\n\n if (that._elementGap) {\n currentCell.classList.add('jqx-array-table-data-gap');\n }\n\n that._cells[i].push({ td: currentCell });\n childFragment.appendChild(currentCell);\n }\n\n currentRow.appendChild(childFragment);\n masterFragment.appendChild(currentRow);\n }\n\n tableBody.appendChild(masterFragment);\n that._table.appendChild(tableBody);\n that.$.mainContainer.appendChild(that._table);\n\n that._tableBody = tableBody;\n }" ]
[ "0.75377023", "0.73833424", "0.68896383", "0.67572", "0.6748092", "0.67387784", "0.6619444", "0.65832704", "0.6501774", "0.64914566", "0.64770895", "0.6474412", "0.6446111", "0.6435074", "0.6425917", "0.6410774", "0.64088136", "0.640828", "0.63849884", "0.6360732", "0.63584137", "0.63294315", "0.63131964", "0.62929183", "0.629159", "0.6265934", "0.626087", "0.625175", "0.6249285", "0.6236975", "0.6231859", "0.6225837", "0.6225558", "0.6221066", "0.62082404", "0.62073255", "0.6193271", "0.61715776", "0.6171344", "0.61520797", "0.61404425", "0.6117045", "0.6105039", "0.6103351", "0.6086091", "0.6078711", "0.60621166", "0.60600764", "0.60539085", "0.6047257", "0.6047218", "0.6030153", "0.6023297", "0.6023261", "0.59973496", "0.5988326", "0.5980638", "0.59749967", "0.59749967", "0.59749967", "0.5971254", "0.5969859", "0.5968723", "0.59686786", "0.59670246", "0.59659183", "0.5961593", "0.5960752", "0.59605515", "0.5951892", "0.5946543", "0.5946543", "0.5946083", "0.59452", "0.5937192", "0.5935998", "0.593585", "0.59348613", "0.5934722", "0.5914088", "0.5910959", "0.5907959", "0.59051234", "0.5900654", "0.58997864", "0.5899", "0.5899", "0.58947814", "0.5888127", "0.5883184", "0.58695966", "0.5868932", "0.5868692", "0.5867221", "0.5864713", "0.5863559", "0.5860082", "0.5857491", "0.58569014", "0.5856115", "0.5855856" ]
0.0
-1
Update the time shown.
_update() { // Get time now const time = zbTime.getNow(); // If there is a current time if (this._currentTime) { // If nothing has changed then stop here if (this._currentTime.hour === time.hour && this._currentTime.minute === time.minute) return; } // Update current time this._currentTime = time; // Set show 24 hour clock let show24HourClock = false; // If there is a show 24 hour clock attribute if (this.hasAttribute('show24hour') === true) { // Set to show 24 hour clock show24HourClock = true; } // Set hour let hour = time.hour; // If showing 12 hour clock and over 12 hours if (show24HourClock === false && hour > 12) { // Minus 12 hours hour -= 12; } // Set digit numbers let digit1Number = Math.floor(hour / 10); const digit2Number = hour % 10; const digit3Number = Math.floor(time.minute / 10); const digit4Number = time.minute % 10; // If showing 12 hour clock and digit 1 number is zero if (show24HourClock === false && digit1Number === 0) { // Set the digit 1 number so that it hides the number digit1Number = -1; } // Set the digit lines this._setDigitLines(this._digit[0], digit1Number); this._setDigitLines(this._digit[1], digit2Number); this._setDigitLines(this._digit[2], digit3Number); this._setDigitLines(this._digit[3], digit4Number); // If 12 hour clock shown if (show24HourClock === false) { // If AM if (this._currentTime.hour < 12) { // Show AM this._amChildDomElement.className = 'ampm-child ampm-on'; this._pmChildDomElement.className = 'ampm-child ampm-off'; } else { // Show PM this._amChildDomElement.className = 'ampm-child ampm-off'; this._pmChildDomElement.className = 'ampm-child ampm-on'; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateDisplayTime() {\n\t\tvar date = new Date();\n\n\t\tvar hours = date.getHours();\n\t\tvar minutes = date.getMinutes();\n\t\tvar seconds = date.getSeconds();\n\t\tvar year = date.getFullYear();\n\t\tvar month = date.getMonth() + 1;\n\t\tvar day = date.getDate();\n\t\tvar ampm = \"AM\";\n\n\t\tif (hours > 11) {\n\t\t\tampm = \"PM\";\n\t\t}\n\n\t\tif (hours > 12) {\n\t\t\thours -=12;\n\t\t}\n\n\t\tif(minutes < 10) {\n\t\t\tminutes = \"0\" + minutes;\n\t\t}\n\n\t\tif (seconds < 10) {\n\t\t\tseconds = \"0\" + seconds;\n\t\t}\n\n\t\tvar displayTime = hours + \":\" + minutes + \":\" + seconds + \" \" + ampm;\n\n\t\t$(\"#displayTime\").html(displayTime)\n\t}", "function updateTime() {\n element.text(dateFilter(new Date(), format));\n }", "function updateTime() {\n element.text(dateFilter(new Date(), format));\n }", "function updateTime() {\n element.text(dateFilter(new Date(), format, dateformat));\n }", "function updateTime() {\n element.text(dateFilter(new Date(), format));\n }", "function updateTime() {\n element.text(dateFilter(new Date(), format));\n }", "function updateTime() {\n element.text(dateFilter(new Date(), format));\n }", "function updateTime() {\n\t element.text(dateFilter(new Date(), format));\n\t }", "function updateTime() {\r\n element.text(dateFilter(new Date(), format));\r\n }", "function updateTime() {\r\n const date = new Date();\r\n const hour = formatTime(date.getHours());\r\n const minutes = formatTime(date.getMinutes());\r\n const seconds = formatTime(date.getSeconds());\r\n\r\n display.innerText=`${hour} : ${minutes} : ${seconds}`\r\n}", "function updateTimeDisplay(newTime) {\n $(\".timer\").text(time);\n time = newTime;\n}", "function updateTimerDisplay(){\n // Update current time text display.\n $('#current-time').text(formatTime( player.getCurrentTime() ));\n $('#duration').text(formatTime( player.getDuration() ));\n }", "function updateTime() {\n const now = moment();\n const ourTime = now.format('MMMM Do YYYY, h:mm:ss a');\n // Print the time into the element that we set to clock\n clock.text(ourTime);\n}", "function updateTime() {\n let date = getToday();\n let hours = date.getHours();\n let minutes = date.getMinutes();\n let seconds = date.getSeconds();\n\n hours = addZero(hours);\n minutes = addZero(minutes);\n seconds = addZero(seconds);\n\n document.querySelector(\".date .time\").innerText = hours + \":\" + minutes + \":\" + seconds;\n // $('.date .time').text(`${hours}:${minutes}:${seconds}`);\n update = setTimeout(function () { updateTime() }, 500)\n}", "function updateTime() {\n var strHours = document.getElementById(\"str-hours\"),\n strConsole = document.getElementById(\"str-console\"),\n strMinutes = document.getElementById(\"str-minutes\"),\n datetime = tizen.time.getCurrentDateTime(),\n hour = datetime.getHours(),\n minute = datetime.getMinutes();\n\n strHours.innerHTML = hour;\n strMinutes.innerHTML = minute;\n\n if (minute < 10) {\n strMinutes.innerHTML = \"0\" + minute;\n }\n if (hour < 10) {\n \t\tstrHours.innerHTML = \"0\" + hour;\n }\n\n if (flagDigital) {\n strConsole.style.visibility = flagConsole ? \"visible\" : \"hidden\";\n flagConsole = !flagConsole;\n } else {\n strConsole.style.visibility = \"visible\";\n flagConsole = false;\n }\n }", "function showTime() {\n\t\ttry {\n\t\t\tvar hours = time.getUTCHours();\n\t\t\tvar minutes = time.getUTCMinutes();\n\t\t\tvar seconds = time.getUTCSeconds();\n\t\n\t\t\t// build the human-readable format\n\t\t\tvar timeValue = \"\" + ((hours > 12) ? hours - 12 : hours);\n\t\t\ttimeValue += ((minutes < 10) ? \":0\" : \":\") + minutes;\n\t\t\ttimeValue += ((seconds < 10) ? \":0\" : \":\") + seconds;\n\t\t\ttimeValue += (hours >= 12) ? \" pm\" : \" am\";\n\t\n\t\t\tvar clockElement;\n\t\t\tif ((piratequesting.sidebar) && (clockElement = sidebar.contentDocument.getElementById('servertime'))) {\n\t\t\t\tclockElement.setAttribute(\"value\", timeValue);\n\t\t\t}\n\t\t} \n\t\tcatch (e) {\n\t\t\tdumpError(e);\n\t\t}\t\n\t}", "onTimeChanged () {\n this.view.renderTimeAndDate();\n }", "async updateTimebar() {\n this.timeText = await this.time.getCurrentTime();\n this.tag('Time').patch({ text: { text: this.timeText } });\n }", "_updateTime() {\r\n // Determine what to append to time text content, and update time if required\r\n let append = \"\";\r\n if (this.levelNum <= MAX_LEVEL && !this.paused) {\r\n this.accumulatedTime += Date.now() - this.lastDate;\r\n }\r\n this.lastDate = Date.now();\r\n\r\n // Update the time value in the div\r\n let nowDate = new Date(this.accumulatedTime);\r\n let twoDigitFormat = new Intl.NumberFormat('en-US', {minimumIntegerDigits: 2});\r\n if (nowDate.getHours() - this.startHours > 0) {\r\n this.timerDisplay.textContent = `Time: ${nowDate.getHours() - this.startHours}:`+\r\n `${twoDigitFormat.format(nowDate.getMinutes())}:` +\r\n `${twoDigitFormat.format(nowDate.getSeconds())}${append}`;\r\n }\r\n else {\r\n this.timerDisplay.textContent = `Time: ${twoDigitFormat.format(nowDate.getMinutes())}:` +\r\n `${twoDigitFormat.format(nowDate.getSeconds())}${append}`;\r\n }\r\n }", "function updateTime() {\n\t\tvar dateTime = tizen.time.getCurrentDateTime(), secondToday = dateTime.getSeconds() + dateTime.getMinutes() * 60 + dateTime.getHours() * 3600,\n\t\tminDigitLeft = document.querySelector(\"#time-min-digit-left\"),\n\t\tminDigitRight = document.querySelector(\"#time-min-digit-right\"),\n\t\thourDigitLeft = document.querySelector(\"#time-hour-digit-left\"), \n\t\thourDigitRight = document.querySelector(\"#time-hour-digit-right\");\n\n\t\tvar minutesNow = (secondToday % 3600) / 60;\n\t\tvar hourNow = (secondToday / 3600);\n\t\tslideDigit(minDigitRight, minutesNow % 10.0);\n\t\tslideDigit(minDigitLeft, minutesNow / 10.0);\n\t\tslideDigit(hourDigitRight, hourNow % 10.0);\n\t\tslideDigit(hourDigitLeft, hourNow / 10.0);\n\t}", "function updateTime() {\n const date = new Date();\n const hours = date.getHours() >= 10 ? date.getHours() : \"0\" + date.getHours();\n const min =\n date.getMinutes() >= 10 ? date.getMinutes() : \"0\" + date.getMinutes();\n const sec =\n date.getSeconds() >= 10 ? date.getSeconds() : \"0\" + date.getSeconds();\n timeNav.textContent = hours + \":\" + min + \":\" + sec;\n}", "function updateTime() {\n var now = new Date(),\n minutes = now.getMinutes(),\n month = now.toLocaleString('default', { month: 'long' }),\n date = now.getDate() + ' ' + month;\n \n //Add leading zero to minutes below 10\n if (minutes < 10) minutes = '0' + minutes;\n\n //Concatinate the time\n var time = now.getHours() + ':' + minutes;\n\n //Show date and time on the page\n theDateNow.innerHTML = date;\n theTimeNow.innerHTML = time;\n\n //Show time only in the tab label\n document.title = time;\n }", "updateTime() {\n\t\tlet now = new Date().getTime();\n\t\tlet x = now - this.startTime;\n\t\tlet time = moment.duration(x);\n\t\tthis.elapsedTime = clc.xterm(242)(time.hours() + 'h ') + clc.xterm(242)(time.minutes() + 'm ') + clc.xterm(242)(time.seconds() + 's');\n\t}", "function updateTimerDisplay() {\n // Update current time text display.\n //$('#current-time').text(formatTime(player.getCurrentTime()))\n //$('#duration').text(formatTime(player.getDuration()))\n}", "set displayTime(time) {\n this._timeEl.innerHTML = time;\n }", "function updatetime() {\n time.innerHTML = new Date;\n \n}", "function updateTime() {\n var time = 0;\n if (global.startTime != null) {\n time = (new Date()).getTime() - global.startTime;\n time = (time/1000)|0;\n }\n var timeDiv = document.getElementById(\"timeDisplay\");\n timeDiv.innerHTML = formatTime(time);\n}", "function updateTime() {\n\n}", "refreshTime() {\n if (this._game.isRun()) {\n this._view.setValue(\"time\", this._game.timeElapsed);\n }\n }", "function updateTime() {\n let updatedTime = new Date().toLocaleTimeString();\n setTime(updatedTime);\n }", "function displayTime() {\n var time = moment().format('HH:mm:ss');\n $('#clock').html(time);\n setTimeout(displayTime, 1000);\n }", "function setTimeDisplay() {\n timeDisplay.textContent = formattedFocusTime;\n}", "function updateTime() {\n time -= 1000;\n showTime(); \n}", "function updateTime() {\n let m = String(new Date().getMinutes());\n let h = String(new Date().getHours());\n if (h.length == 1) {\n h = \"0\" + h;\n }\n if (m.length == 1) {\n m = \"0\" + m;\n }\n var time = h + \":\" + m;\n document.getElementById(\"time\").innerHTML = time;\n}", "function updateTime() {\n const newTime = new Date().toLocaleTimeString();\n setTime(newTime);\n }", "function updateTime() {\n var nowTime = moment().format('LTS');\n $(\"#currentTime\").html(nowTime);\n}", "function displayTime() {\n var today = new Date();\n \n //gathers information about current hour, min and sec. \n //Add zero at the head if it is a single digit number.\n var currentHour = addZero(today.getHours());\n var currentMin = addZero(today.getMinutes());\n var currentSec = addZero(today.getSeconds());\n \n // for formatting the display.\n hourElement.innerHTML = currentHour + \":\";\n minElement.innerHTML = currentMin + \":\";\n secElement.innerHTML = currentSec;\n }", "function updateTime(nTime){\n // function to update time\n var showTime=\"\";\n var h=Math.floor(nTime/3600);\n var m=Math.floor(nTime/60-h*60);\n var s=Math.floor(nTime%60);\n //console.log(h);\n //console.log(m);\n //console.log(s);\n if(h!=0){\n if(h<10)\n showTime+=\"0\"+h.toString();\n else\n showTime+=h.toString();\n }\n else\n showTime+=\"00\";\n if(m!=0){\n showTime+=\":\";\n if(m<10)\n showTime+=\"0\"+m.toString();\n else\n showTime+=m.toString();\n }\n else\n showTime+=\":00\";\n if(s!=0){\n showTime+=\":\";\n if(s<10)\n showTime+=\"0\"+s.toString();\n else\n showTime+=s.toString();\n }\n else\n showTime+=\":00\";\n\n $('#time').text(showTime);\n }", "showTime(time) {\n const current = new Date(time.time);\n\n const currentMonth = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"][current.getMonth()];\n const currentDay = current.getDate();\n const currentYear = current.getFullYear();\n\n const curTime = ui.formatTime(current);\n\n\n this.sunrise.innerHTML = ui.formatTime(new Date(time.sunrise));\n this.sunset.innerHTML = ui.formatTime(new Date(time.sunset));\n this.currentTime.innerHTML = `${curTime}, ${currentMonth} ${currentDay}, ${currentYear}`;\n }", "function updateTime() {\r\n getWeatherInfo();\r\n var currentTimeStamp = new Date();\r\n var currentMonth = getMonth();\r\n var currentDay = getDate();\r\n var currentDate = currentTimeStamp.getDate();\r\n var currentHour = currentTimeStamp.getHours();\r\n var currentMin = currentTimeStamp.getMinutes();\r\n // Last updated time\r\n $(\"#update-time\").text(currentHour + ':' + currentMin);\r\n $(\".date-display\").text(currentDay + ', ' + currentMonth +' ' + currentDate );\r\n }", "function updateTimeDisplay()\n{\n\t//the following code for getting the current beat time was written by melonking - https://wiki.melonland.net/swatch_time\n\t//get date in UTC/GMT\n var date = new Date();\n var hours = date.getUTCHours();\n var minutes = date.getUTCMinutes();\n var seconds = date.getUTCSeconds();\n var milliseconds = date.getUTCMilliseconds();\n //add hour to get time in Switzerland\n hours = (hours + 1) % 24;\n //time in seconds\n var timeInMilliseconds = ((hours * 60 + minutes) * 60 + seconds) * 1000 + milliseconds;\n //there are 86.4 seconds in a beat\n var millisecondsInABeat = 86400;\n //calculate beats to two decimal places\n\tvar current_beat_time = Math.abs(timeInMilliseconds / millisecondsInABeat).toFixed(2).padStart(6, \"0\");\n\t\n\t//display current beat time\n\tdocument.getElementById(\"current-beats\").childNodes[0].textContent = current_beat_time.split(\".\")[0];\n\tdocument.getElementById(\"current-centibeats\").innerText = current_beat_time.split(\".\")[1];\n}", "function updateTime() {\n\t\tlet time = $(\"#time\").text();\n\t\tlet hour = parseInt(time.substring(0, 2));\n\t\tlet min = parseInt(time.substring(3, 5));\n\t\tmin += TIME_INTERVAL;\n\t\tif (min >= 60) {\n\t\t\thour += 1;\n\t\t\tmin -= 60;\n\t\t}\n\t\tif (min < 10) {\n\t\t\tmin = \"0\" + min;\n\t\t}\n\t\tif (hour < 10) {\n\t\t\thour = \"0\" + hour;\n\t\t}\n\t\tif (hour >= 24) {\n\t\t\thour -= 24;\n\t\t}\n\t\ttime = \"\" + hour + \":\" + min;\n\t\t$(\"#time\").text(time);\n\t}", "function update() {\n $(\"#currentT-input\").html(moment().format(\"H:mm:ss\"));\n}", "function displayTime() {\n var rightNow = moment().format('MMM DD, YYYY [at] hh:mm:ss a');\n timeDisplayEl.text(rightNow);\n}", "function update_time_setting (panel, time) {\n\tpanel.innerHTML = time;\n}", "function updateTimerDisplay(){\n // Update current time text display.\n $('#current-time').text(formatTime(player.getCurrentTime() ));\n $('#duration').text(formatTime( player.getDuration() ));\n}", "function updateTimeDisplay()\n{\n // Get the current time in seconds and then get the difference from the stop seconds.\n var diff = globalStopSeconds - currentSeconds();\n\n // Set the time on the screen.\n $(\"#timer-display\").text( secondsToMinutes( diff));\n\n // Update the sand column graph. \n sandColumnUpdate( diff);\n\n}", "function showTime() {\n // get the time\n let tdy = new Date();\n let hrs = tdy.getHours();\n let min = tdy.getMinutes();\n let sec = tdy.getSeconds();\n\n // display AM or PM\n const amPm = hrs > 12 ? \"PM\" : \"AM\";\n\n // set 12 hr format\n hrs = hrs % 12 || 12;\n\n // add Zero in min and sec\n function addZero(e) {\n return (parseInt(e, 10) < 10 ? \"0\" : \"\") + e;\n }\n time.innerHTML = `${hrs}<span>:</span>${addZero(min)}<span>:</span>${addZero(sec)}<span> </span>${amPm}`;\n setTimeout(showTime, 1000);\n}", "function updateClock() {\n let today = new Date();\n time = hours_with_leading_zeros(today) + \":\" + minutes_with_leading_zeros(today);\n\n clockLabel.text = time;\n datum.text = dateview;\n }", "_onTimeupdate () {\n this.emit('timeupdate', this.getCurrentTime())\n }", "_onTimeupdate () {\n this.emit('timeupdate', this.getCurrentTime())\n }", "function updateTimerDisplay(){\n // Update current time text display.\n $('#current-time').text(formatTime( r.getCurrentTime() ));\n $('#duration').text(formatTime( r.getDuration() ));\n}", "function updateTime() {\n document.getElementById('uren_minuten').innerHTML = moment().format('H:mm');\n document.getElementById('dag_datum').innerHTML = moment().format('dddd, MMMM Do');\n document.getElementById(\"tijd\").classList.add('fadeInDown');\n}", "function updateClock() {\n\tdocument.getElementById(\"time\").innerHTML = timeSinceStart();\n}", "function displayTime() {\n //Calculate the number of minutes and seconds based on the current time\n var min = Math.floor(currentTime / 60);\n var sec = Math.floor(currentTime % 60);\n \n //Add a 0 to the front of the second when appropriate\n if (sec < 10) {\n sec = \"0\" + sec;\n }\n \n $(\"#time-text\").text(min + \":\" + sec);\n }", "function displayTime() {\n var rightNow = moment().format('LLLL');\n currentDayEl.text(rightNow);\n}", "function updateTime() {\n scorePanel.playTime = Math.trunc((performance.now() - scorePanel.startTime) / 1000);\n $(\".time\").text(scorePanel.playTime.toString().padStart(3, \"0\").concat(\" seconds\"));\n}", "function displayTime() {\n $(\"tbody\").empty();\n setInterval(displayTime, 10 * 1000);\n $(\"#currentTime\").html(\"<h2>\" + moment().format(\"hh:mm a\") + \"</h2>\");\n displayTrain();\n }", "function displayTime() {\n var curr = moment().format(\"MM-DD-YYYY HH:mm:ss\");\n currentDayEl.text(curr);\n}", "function updateTime() {\n let d = new Date();\n let hours;\n if (d.getHours() > 12)\n hours = (d.getHours() - 12 + \"\")\n else if (d.getHours() > 0)\n hours = (d.getHours() + \"\")\n else\n hours = '12';\n let minutes = (d.getMinutes() + '').padStart(2, 0);\n let seconds = (d.getSeconds() + '').padStart(2, 0);\n let amPm = (d.getHours > 12) ? 'PM' : 'AM';\n let timeString = hours + ':' + minutes + ':' + seconds + ':' + amPm;\n document.getElementById('currentTime').innerHTML = timeString;\n}", "function updateTime() {\n let currentTime = moment().format('MMM DD, YYYY  hh:mm:ss A');\n\n // Only if the dev console time div exists should this function loop\n if($('#dev-console-time').length) {\n // set the content of the element with the ID time to the formatted string\n $('#dev-console-time').text(currentTime);\n // call this function again in 1000ms\n setTimeout(updateTime, 1000);\n }\n}", "function displayCurrentTime() {\n\tsetInterval(function(){\n\t\t$('#current-time').html(moment().format('hh:mm A'))\n\t }, 1000);\n\t}", "function updateCurrentTime() {\n $('#current_time').html(formatTime(getCurrentTime()));\n}", "display(){\n $('#timer').text(timer.hours + \":\" + timer.minutes + \":\"+ timer.secondes);\n }", "function showLastUpdateTime(){\n var currentDate = new Date();\n var day = currentDate.getDate();\n\tvar month = currentDate.getMonth() + 1;\n\tvar year = currentDate.getFullYear();\n\tvar hours = currentDate.getHours();\n\tvar minutes = currentDate.getMinutes();\n\tif (minutes < 10) {\n minutes = \"0\" + minutes;\n }\n\tvar suffix = \"AM\";\n\tif (hours >= 12) {\n suffix = \"PM\";\n\t if (hours != 12){\n hours = hours - 12;\n }\n\t} else if (hours === 0) {\n hours = 12;\n\t}\n\t$('#last-update').text( month + \"/\" + day + \"/\" + year + \" at \" + hours + \":\" + minutes + \" \" + suffix);\n}", "function showTime() {\n\n var d = new Date();\n\n if (d.getMinutes().length < 2) {\n currTime = monthNames[d.getMonth()] + '.' + d.getDate() + '.' + d.getFullYear() + ' | ' + d.getHours() + ':0' + d.getMinutes();\n } else {\n currTime = monthNames[d.getMonth()] + '.' + d.getDate() + '.' + d.getFullYear() + ' | ' + d.getHours() + ':' + d.getMinutes();\n }\n\n $('.time').html(currTime);\n }", "function hourUpdate(){\n var timeReadable = moment().format('MMMM Do YYYY, h:mm:ss a');\n $('#mainHead1').children().last().html(\"<h6>\" + timeReadable + \"</h6>\");\n \n }", "function showTime(format24 = Storage.loadFormat24()){\r\n let today = new Date(),\r\n hour = today.getHours(),\r\n min = today.getMinutes(),\r\n sec = today.getSeconds();\r\n \r\n let amPm = hour >= 12 ? 'PM' : 'AM';\r\n \r\n //add zeros\r\n hour = addZero(hour)\r\n min = addZero(min)\r\n sec = addZero(sec)\r\n\r\n //12hr format\r\n if(format24 === \"false\"){\r\n hour = hour % 12 || 12\r\n }else{\r\n }\r\n \r\n if(Storage.loadClock() === \"currentTime\"){\r\n time.innerHTML = `${hour}<span>:</span>${min}<span>:</span>${sec} ${format24 === \"true\" ? '' : amPm}`; \r\n }\r\n \r\n const refresh = function (){\r\n showTime()\r\n } \r\n\r\n setTimeout(refresh, 100)\r\n }", "function displayTime() {\n var rightNow = moment().format(\"MMM DD, YYYY [:] hh:mm:ss a\");\n timeDisplayEl.text(rightNow);\n}", "function showTime(){\n // let today=new Date(2020,06,10,08,33,30);{Testing purpose}\n let today=new Date(),\n date=today.getDate(),\n hour=today.getHours(),\n min=today.getMinutes(),\n sec=today.getSeconds();\n\n //Set AM or PM using ternanary operator(Shortend)\n const amPm=hour >= 12 ? 'PM' :'AM' ;\n\n //12 hour format\n hour = hour % 12 || 12;\n time.innerHTML=`${hour}<span>:</span>${addZero(min)}<span>:</span>${addZero(sec)} ${showAmPm ? amPm :''}`;\n setTimeout(showTime,1000); \n\n }", "updateTime() {\n\t\tthis.setState({\n\t\t\ttime: hrOfDay(),\n\t\t\tday: timeOfDay()\n\t\t});\n\t}", "function refreshTime() {\n\t\t\tvar now = getTime();\n\t\t\tvar date = { \n\t\t\t\t\t'en': now.day + ', ' + now.month + ' ' + now.date + '.' ,\n\t\t\t\t\t'de': now.day + ', ' + now.date + '. ' + now.month \n\t\t\t};\n\t\t\t$('#date').html(date[lang]);\n\n\t\t\t// 24h format all langs\n\t\t\t$('#time').html(\"<span class='hour'>\" + now.hour + \":</span>\" + \"<span class='minute'>\" + now.minute + \"</span>\" );\n\t\t}", "function displayCurrentTime() {\n setInterval(function(){\n $('#current-time').html(moment().format('HH:mm'))\n }, 1000);\n }", "function updateCurrentTime() {\n elapsedSeconds++;\n $('.current-time').text(getTimeString(elapsedSeconds));\n }", "function currentTime() {\n var timeNow = moment().format('h:mm a')\n $(\"#currentTime\").text(timeNow)\n }", "function displayTime() {\n let time = new Date();\n document.getElementById(\"timeNow\").innerHTML = time;\n}", "function updateTime() {\n //Fetch the state from the main class\n let state = ipcRenderer.sendSync('state');\n\n let left = state.time_left;\n if (!state.paused) left -= new Date().getTime() - state.status_changed;\n\n document.getElementById(\"timeleft\").textContent = formatTime(left);\n}", "function updateTime(distance){\n //calculate minutes and seconds from the milliseconds\n let seconds = Math.floor((distance % (1000 * 60)) / 1000);\n let minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));\n\n //edit label text\n timeLabel.text = `${minutes}:${seconds}`;\n}", "function showTime() {\n let today = new Date(),\n hour = today.getHours(),\n min = today.getMinutes(),\n seconds = today.getSeconds();\n\n //Set AM or PM\n const amOrPm = hour >= 12 ? \"PM\" : \"AM\";\n\n //Format to 12 hours\n hour = hour % 12 || 12;\n console.log(time);\n //Outputting time\n time.innerHTML = `${hour} <span>:</span> ${min} <span>:</span> ${seconds}`;\n\n setTimeout(showTime, 1000);\n}", "function updateClock() {\n let today = new Date();\n let hours = today.getHours();\n let mins = util.zeroPad(today.getMinutes());\n\n myLabel.text = `${hours}:${mins}`;\n \n triggerDownload();\n}", "function timeRefresh() {\n var currentTime = new Date();\n hour = currentTime.getHours();\n minute = currentTime.getMinutes();\n if(hour > 11){ period = \"PM\" } else { period = \"AM\" };\n if(hour > 12){ hour -= 12 };\n if(hour == 0){ hour = 12 };\n if(minute < 10){ minute = \"0\" + minute }\n $(\"#hour\").text(hour);\n $(\"#minute\").text(minute + \" \" + period );\n setTimeout(timeRefresh, 1000);\n }", "function displayTime() {\n\t\t// Get the current time.\n\t var now = new Date();\n\t var h = now.getHours() > 12 ? now.getHours() % 12 : now.getHours();\n\t var m = now.getMinutes();\n\t var s = now.getSeconds();\n\n\t // Create a formatted string for the time.\n\t var timeString = (h < 10 ? \"\" : \"\") + now.toLocaleTimeString();\n\n\t // Set the time label's value to the time string.\n\t document.getElementById(\"current-time\").innerHTML = timeString;\n\t\t\n\t\t\n\t\t// Draw the clock using SVG\n\t\tfunction svgClock() {\n\t\t\t// Get current time.. again\n\t\t\tvar now = new Date();\n\t\t\tvar h, m, s;\n\t\t\th = 30 * ((now.getHours() % 12) + now.getMinutes() / 60);\n\t\t\tm = 6 * now.getMinutes();\n\t\t\ts = 6 * now.getSeconds();\n\n\t\t\t// Find pointers of the clock, rotate\n\t\t\tdocument.getElementById('h_pointer').setAttribute('transform', 'rotate(' + h + ', 50, 50)');\n\t\t\tdocument.getElementById('m_pointer').setAttribute('transform', 'rotate(' + m + ', 50, 50)'); \n\t\t\tdocument.getElementById('s_pointer').setAttribute('transform', 'rotate(' + s + ', 50, 50)');\n\t\t\t\n\t\t\t// Loop every second\n\t\t\tsetTimeout(svgClock, 1000);\n\t\t}\n\t svgClock();\n\t}", "function updateTimer() {\n\t\t\tvar timeString = formatTime(currentTime);\n\t\t\t$stopwatch.html(timeString);\n\t\t\tcurrentTime += incrementTime;\n\t\t}", "function timeUpdate() {\n (setInterval(function () {\n currentTime = moment().format('HH');\n updatePlanner()\n }, 1000))\n}", "function updateTimeElapsed() {\n const time = formatTime(Math.round(video.currentTime));\n timeElapsed.innerText = `${time.minutes}:${time.seconds}`;\n timeElapsed.setAttribute('datetime', `${time.minutes}m ${time.seconds}s`)\n}", "function displayTime() {\n let hours = Math.floor(secondCount/3600);\n let minutes = Math.floor((secondCount % 3600)/60);\n let seconds = Math.floor(secondCount % 60)\n\n // Display a leading zero if the values are less than ten\n let displayHours = (hours < 10) ? '0' + hours : hours;\n let displayMinutes = (minutes < 10) ? '0' + minutes : minutes;\n let displaySeconds = (seconds < 10) ? '0' + seconds : seconds;\n\n setTotalTime(secondCount)\n setTimeLapse(displayHours + ':' + displayMinutes + ':' + displaySeconds)\n\n secondCount++;\n }", "function displayTime() {\n currDate = moment().format(\"dddd, MMMM Do YYYY, h:mm:ss a\");\n currentDayEl.html(currDate);\n currM = moment().format('m');\n currh = parseInt(moment().format(\"H\"));\n if(parseInt(currM)+0 === 0 && currh > prevHour){ /// This check is set the active hour automatically\n setBGClass();\n }\n}", "function updateTime() {\n var now = new Date();\n var minutes = now.getMinutes()\n document.getElementById(\"menubarClock\").innerHTML = now.getHours() + \".\" + (minutes > 9 ? '' : '0') + minutes;\n}", "function updateClock(){\n var ahora = new Date();\n var hora = ahora.getHours();\n\tif(hora < 10) hora = \"0\" + hora;\n var min = ahora.getMinutes();\n\tif(min < 10) min = \"0\" + min;\n var sec = ahora.getSeconds();\n\tif(sec < 10) sec = \"0\" + sec;\n/* Se muestra por pantalla el reloj actualizando por segundo */\n\tclock.html(hora + \" : \" + min + \" : \" + sec);}", "function showTime() {\r\n // stocam in variabila time un string cu ora curenta obtinut din libraria moment.js\r\n const time = moment().format(\"HH:mm:ss\");\r\n // orice e in elementul clockContainer va fi rescris.\r\n clockContainer.innerHTML = time;\r\n // trimitem functia ca parametru in metoda requestAnimationFrame de pe obiectul window.\r\n window.requestAnimationFrame(showTime);\r\n}", "function updateTime(){\n setTimeContent(\"timer\");\n}", "displayTime() {\n if(app === 1){\n this.d1.value = this.twoDigitNum(stopwatch.t1);\n this.d2.value = this.twoDigitNum(stopwatch.t2);\n this.d3.value = this.twoDigitNum(stopwatch.t3);\n }\n else{\n this.d1.value = this.twoDigitNum(timer.t1);\n this.d2.value = this.twoDigitNum(timer.t2);\n this.d3.value = this.twoDigitNum(timer.t3);\n }\n }", "function refreshClock() {\n $('#timer').html(CustomTime.getTime);\n}", "function printTime()\n\t{\n\t\tvar time = getTime();\n\n\t\t// Print time\n\t\ttaskline.obj.time_timeday.innerHTML = time.hour + ':' + time.min;\n\t}", "function setTimeString(){\n let strEls = Toolbar.curTime.toUTCString().split(\":\");\n strEls.pop();\n Quas.getEl(\".post-publish-time-text\").text(strEls.join(\":\"));\n}", "function showTime() {\r\n\r\n var timeShow = document.getElementById('time');\r\n\r\n let hours = newData.getHours();\r\n if (hours < 10) hours = '0' + hours;\r\n time.children[0].innerHTML = hours;\r\n\r\n let minutes = newData.getMinutes();\r\n if (minutes < 10) minutes = '0' + minutes;\r\n time.children[1].innerHTML = minutes;\r\n\r\n let seconds = newData.getSeconds();\r\n if (seconds < 10) seconds = '0' + seconds;\r\n time.children[2].innerHTML = seconds;\r\n\r\n// console.log(`${hours}:${minutes}:${seconds}`);\r\n}", "function showTime() {\n let today = new Date(),\n hour = today.getHours(),\n min = today.getMinutes(),\n sec = today.getSeconds();\n weekDay = today.getDay();\n day = today.getDate();\n month = today.getMonth();\n\n\n // Set AM or PM\n //const amPm = hour >= 12 ? 'PM' : 'AM';\n\n // 12hr Format\n // hour = hour % 12 || 12;\n\n // Output Time\n time.innerHTML = `${hour}<span>:</span>${addZero(min)}<span>:</span>${addZero(\n sec\n )}`;\n date.innerHTML = `${DAYS[weekDay]}<span> </span>${day}<span> </span>${MONTHS[month]}`;\n //${showAmPm ? amPm : ''}`;\n\n setTimeout(showTime, 1000);\n}", "function updateTime() {\n\n\t\t\t//Set the time & date for the current timezone\n\t\t\t$scope.currentTime = moment().format('HH:mm');\n\t\t\t$scope.date = moment().format(\"DD\");\n\t\t\t$scope.month = moment().format(\"MMMM\");\n\t\t\t$scope.day = moment().format(\"dddd\");\n \n\t\t\t//Set the time for the different timezones\n\t\t\t$scope.AlekTime = moment().format('HH:mm');\n\t\t\t$scope.RussiaTime = moment().tz('Europe/Moscow').format('HH:mm');\n\t\t\t$scope.TokyoTime = moment().tz('Asia/Tokyo').format('HH:mm');\n\t\t\t$scope.$apply();\n\t\t}", "function update() {\n clock += change();\n render();\n }", "function updateTime() {\n var datetime = tizen.time.getCurrentDateTime(),\n hour = datetime.getHours(),\n minute = datetime.getMinutes(),\n second = datetime.getSeconds();\n\n // update the hour/minute/second hands and shadows.\n rotateElement((hour + (minute / 60) + (second / 3600)) * 30, \"body-hr-hand\");\n rotateElement((hour + (minute / 60) + (second / 3600)) * 30, \"body-hr-hand-shadow\");\n rotateElement((minute + second / 60) * 6, \"body-min-hand\");\n rotateElement((minute + second / 60) * 6, \"body-min-hand-shadow\");\n }", "function updateTimeRemaining() {\n timeDisplay.innerHTML = `${Math.floor(time / 60000).toString().padStart(2, '0')}:${(Math.floor((time % 60000) / 1000).toFixed(0)).padStart(2, '0')}`;\n}" ]
[ "0.8220673", "0.81059754", "0.81059754", "0.81020766", "0.8086411", "0.80284166", "0.8005713", "0.79568255", "0.78277886", "0.7800676", "0.77455884", "0.7718477", "0.77026117", "0.76925457", "0.7666346", "0.7655977", "0.7650111", "0.7639872", "0.75995934", "0.7588122", "0.7583937", "0.7575101", "0.7543307", "0.75339746", "0.7522727", "0.75054187", "0.7480953", "0.7469955", "0.7394981", "0.73888457", "0.7388546", "0.73564684", "0.735237", "0.734776", "0.734746", "0.7335114", "0.7319779", "0.7308174", "0.7303049", "0.7302722", "0.7274108", "0.727271", "0.7272656", "0.72528404", "0.72494537", "0.72332823", "0.7221636", "0.7217427", "0.7217384", "0.7216881", "0.7216881", "0.7212201", "0.7210805", "0.71926636", "0.7172022", "0.71542835", "0.71396834", "0.7139259", "0.71388096", "0.713835", "0.7124096", "0.71183735", "0.7104114", "0.7095575", "0.708767", "0.7081047", "0.70787424", "0.70517427", "0.7046154", "0.70416033", "0.70413995", "0.70194125", "0.7009429", "0.70094216", "0.70067", "0.70004994", "0.6998459", "0.6977382", "0.697179", "0.6968713", "0.69611335", "0.6951705", "0.69510317", "0.6943158", "0.693771", "0.6936014", "0.6933661", "0.691686", "0.69116807", "0.689584", "0.68890315", "0.68860614", "0.6882086", "0.68820494", "0.68810546", "0.6874227", "0.68717223", "0.6867298", "0.68592757", "0.68564963", "0.68557984" ]
0.0
-1
Write password to the password input
function writePassword() { var password = generatePassword(); var passwordText = document.querySelector("#password"); passwordText.value = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writePassword() {}", "function writePassword() {\n var password = getPasswordOptions();\n var passwordText = document.querySelector('#password');\n \n passwordText.value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n generatePassword()\n }", "function writePassword() {\n var password = buildPassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n \n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n \n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n var passwordLen = getpasswordLength();\n var options = getPasswordOptionSet();\n\n\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = makePassword(passwordLen, options);\n\n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n }", "function writePassword() {\n let password = generatePassword(passwordlength).join(\"\");\n let passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n getUserInputs();\n\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n // Reset variables\n passwordLength = 0;\n selectedCharacters = \"\";\n includeLowercase = false;\n includeUppercase = false;\n includeNumbers = false;\n includeSpecialChar = false;\n}", "function writePassword() {\n\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n var length = getPasswordLength();\n length = parseInt(length);\n ensureCharacterType();\n var password = generatePassword(length);\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n var password = generatePassword()\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n }", "function writePassword() {\n var passwordReqs = {};\n passwordReqs = passReqs(passwordReqs);\n var password = generatePassword(passwordReqs);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n // Only set the new password if one was actually generated. Otherwise, keep the previous password on the screen.\n if (passwordText !== \"\") {\n passwordText.value = password;\n }\n}", "function writePassword() {\n let newOptions = { ...options };\n setOptions(newOptions);\n var password = generatePassword(newOptions);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n\tvar passwordText = document.querySelector('#password');\n\n\tpasswordText.value = finalPassword;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n //prompt(password)\n }", "function _3writePassword(password) {\n console.log(\"writing password\")\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n \n}", "function writePassword() {\n const password = generatePassword();\n const passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n const password = generatePassword();\n const passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n var criteria = passwordCriteria();\n var password = generatePassword(criteria);\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n \n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n \n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n \n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n \n }", "function writePassword() {\n var password = generatePassword();\n // If password is empty string, return without printing\n if (!password) {\n return;\n }\n var passwordText = document.querySelector('#password');\n\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n if (password !== undefined) {\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = generatePassword();\n if (password) {\n var passwordText = document.querySelector('#password');\n\n passwordText.value = password;\n }\n}", "function writePassword () {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\")\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword().join(\"\");\n // console.log(password);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = pwCriteria();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword(password) {\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n }", "function writePassword() {\n var userPassword = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = userPassword;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n return;\n}", "function writePassword() {\n var password = createPassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\r\n\r\n var password = generatePassword(),\r\n passwordText = document.querySelector(\"#password\");\r\n\r\n passwordText.value = password;\r\n \r\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if(password) {\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector('#password');\n\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n passwordText.value = password;\n passwordEngine.reset();\n}", "function writePassword() {\n var password = generatePassword();\n\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n // clears password variables in case user doesn't click clear button before generating a new password\n passCreate = \"\";\n password = \"\";\n}" ]
[ "0.8859371", "0.85438496", "0.8511671", "0.8501158", "0.8490387", "0.848501", "0.8472282", "0.8468989", "0.845468", "0.8444224", "0.84319127", "0.8420268", "0.8419394", "0.84066415", "0.8404136", "0.8400749", "0.8393203", "0.83766234", "0.83703816", "0.83647054", "0.83603424", "0.8358673", "0.8357686", "0.83554924", "0.83541465", "0.83414394", "0.83414394", "0.8302459", "0.8293421", "0.8293421", "0.8293421", "0.8293421", "0.8288117", "0.8275098", "0.8270063", "0.826217", "0.8257003", "0.82562834", "0.8252705", "0.8251089", "0.82508415", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.82453203", "0.8244358", "0.8244358", "0.8244358", "0.8241027", "0.8239416", "0.82390976", "0.82369494", "0.8232926", "0.8230595", "0.8230366", "0.8230204", "0.8230204", "0.82287234" ]
0.0
-1
Function to randomize the contents of an array using a FisherYates shuffle.
function shuffle(array) { var m = array.length, t, i; while (m) { i = Math.floor(Math.random() * m--); t = array[m]; array[m] = array[i]; array[i] = t; } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fisherYates( array ){\n var count = array.length,\n randomnumber,\n temp;\n let lastTime = performance.now();\n while( count ){\n randomnumber = Math.random() * count-- | 0;\n temp = array[count];\n array[count] = array[randomnumber];\n array[randomnumber] = temp\n if (count % 10000 === 0) {\n const currentTime = performance.now();\n const time = currentTime - lastTime;\n lastTime = currentTime;\n parentPort.postMessage({ completed: false, words: array.length - count, tpw: time / 10000 });\n }\n }\n}", "function fisherYates ( myArray ) {\r var i = myArray.length;\r if ( i == 0 ) return false;\r while ( --i ) {\r var j = Math.floor( Math.random() * ( i + 1 ) );\r var tempi = myArray[i];\r var tempj = myArray[j];\r myArray[i] = tempj;\r myArray[j] = tempi;\r }\r}", "function fisherYatesShuffle(arr) {\n for (var i = arr.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n [arr[i], arr[j]] = [arr[j], arr[i]]; \n }\n}", "function fisherYates(a) {\n\tfor (var i = a.length - 1; i > 0; i--) {\n\t\t\tvar j = Math.floor(Math.random() * (i + 1));\n\t\t\tvar temp = a[i];\n\t\t\ta[i] = a[j];\n\t\t\ta[j] = temp;\n\t}\n\treturn a;\n}", "static shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n }", "function shuffle(arr) {\n var length = arr.length, i, temp, randomIndex;\n\n for (i = 0; i < length; i++) {\n randomIndex = getRandomInt(i, length - 1);\n temp = arr[i];\n arr[i] = arr[randomIndex];\n arr[randomIndex] = temp;\n }\n}", "function shuffleArray(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(srandom() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n return array;\n}", "function shuffle(array) {\n var j, x, i;\n for (i = array.length - 1; i > 0; i--) {\n j = Math.floor(Math.random() * (i + 1));\n x = array[i];\n array[i] = array[j];\n array[j] = x;\n }\n return array;\n}", "function fisherYates (myArray) {\n var i = myArray.length;\n if ( i == 0 ) return false;\n while ( --i ) {\n var j = Math.floor( Math.random() * ( i + 1 ) );\n var tempi = myArray[i];\n var tempj = myArray[j];\n myArray[i] = tempj;\n myArray[j] = tempi;\n }\n }", "function shuffle(array) {\n var m = array.length, t, i;\n while (m) {\n i = Math.floor(Math.random() * m--);\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n return array;\n}", "function fisherYates (myArray) {\n var i = myArray.length, j, tempi, tempj;\n if (i === 0) {\n return;\n }\n while (--i) {\n j = Math.floor(Math.random() * (i + 1));\n tempi = myArray[i];\n tempj = myArray[j];\n myArray[i] = tempj;\n myArray[j] = tempi;\n }\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n }", "function shuffle(array){\n\t\t\t\t\t\t\t\t \tvar currentIndex = array.length;\n\t\t\t\t\t\t\t\t \tvar temporaryValue;\n\t\t\t\t\t\t\t\t \t//var randIndex;\n\n\t\t\t\t\t\t\t\t \twhile (currentIndex > 0){\n\t\t\t\t\t\t\t\t \t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\t\t\t\t\t\t\t \t\tcurrentIndex --;\n\n\t\t\t\t\t\t\t\t \t\ttemporaryValue = array[currentIndex];\n\t\t\t\t\t\t\t\t \t\tarray[currentIndex] = array[randomIndex];\n\t\t\t\t\t\t\t\t \t\tarray[randomIndex] = temporaryValue;\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t \t\treturn array;\n}", "function shuffle( arr )\n{\n var pos, tmp;\n\t\n for( var i = 0; i < arr.length; i++ )\n {\n pos = Math.round( Math.random() * ( arr.length - 1 ) );\n tmp = arr[pos];\n arr[pos] = arr[i];\n arr[i] = tmp;\n }\n return arr;\n}", "function shuffle(array) {\n //Shuffle array using the Fisher-Yates method\n //https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle\n var m = array.length, t, i;\n\n // While there remain elements to shuffle…\n while (m) {\n\n // Pick a remaining element…\n i = Math.floor(Math.random() * m--);\n\n // And swap it with the current element.\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n\tarray.sort(function() { return 0.5 - Math.random() });\n}", "function shuffle(array) {\n\n\tlet currIndex = array.length;\n\tlet tempVal, randomIndex;\n\n\twhile (currIndex !== 0) {\n\n\t\trandomIndex = Math.floor(Math.random() * currIndex);\n\t\tcurrIndex -= 1;\n\n\t\ttempVal = array[currIndex];\n\t\tarray[currIndex] = array[randomIndex];\n\t\tarray[randomIndex] = tempVal;\n\t}\n\n\treturn array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n }", "function shuffle(array) {\n\t\tvar random = array.length,\n\t\t\ttemp,\n\t\t\tindexs;\n\t\twhile (random) {\n\t\t\tindex = Math.floor(Math.random() * random--);\n\t\t\ttemp = array[random];\n\t\t\tarray[random] = array[index];\n\t\t\tarray[index] = temp;\n\t\t}\n\t\treturn array;\n\t}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function fisherYates (myArray) {\n var i = myArray.length;\n if ( i == 0 ) return false;\n while ( --i ) {\n var j = Math.floor( Math.random() * ( i + 1 ) );\n var tempi = myArray[i];\n var tempj = myArray[j];\n cards[i] = tempj;\n cards[j] = tempi;\n }\n}", "function shuffle(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * i);\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n return array;\n }", "function shuffle(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n return array;\n }", "function shuffle(array) {\r\n var currentIndex = array.length, temporaryValue, randomIndex;\r\n while (0 !== currentIndex) {\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex -= 1;\r\n temporaryValue = array[currentIndex];\r\n array[currentIndex] = array[randomIndex];\r\n array[randomIndex] = temporaryValue;\r\n }\r\n\r\n return array;\r\n}", "function shuffle(array) {\n var m = array.length, t, i;\n while (m) {\n i = Math.floor(Math.random() * m--);\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n return array;\n}", "shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n }", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function fisherYates(array, seed) {\n var _a;\n var length = array.length;\n // need to clone array or we'd be editing original as we goo\n var shuffled = array.slice();\n for (var i = (length - 1); i > 0; i -= 1) {\n var randomIndex = void 0;\n if (seed) {\n randomIndex = Math.floor(seed() * (i + 1));\n }\n else {\n randomIndex = Math.floor(Math.random() * (i + 1));\n }\n _a = [shuffled[randomIndex], shuffled[i]], shuffled[i] = _a[0], shuffled[randomIndex] = _a[1];\n }\n return shuffled;\n}", "function fisherYates(array, seed) {\n var _a;\n var length = array.length;\n // need to clone array or we'd be editing original as we goo\n var shuffled = array.slice();\n for (var i = (length - 1); i > 0; i -= 1) {\n var randomIndex = void 0;\n if (seed) {\n randomIndex = Math.floor(seed() * (i + 1));\n }\n else {\n randomIndex = Math.floor(Math.random() * (i + 1));\n }\n _a = [shuffled[randomIndex], shuffled[i]], shuffled[i] = _a[0], shuffled[randomIndex] = _a[1];\n }\n return shuffled;\n}", "function shuffle (array) {\n \n var currentIndex = array.length;\n var temporaryValue;\n var randomIndex;\n \n while (0 !== currentIndex) {\n \n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n \n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n \n }\n \n return array;\n \n}", "function shuffle(array) {\n let ran = Math.floor(Math.random() * array.length);\n for (let i = 0; i < array.length - 1; i++) {\n swap(array, i, ran);\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n \n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n \n return array;\n}", "function shuffle(array)\n{\n var currentIndex = array.length, temporaryValue, randomIndex; \n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1; \n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n } \n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n }", "function shuffle(arr) {\n var j, x, i;\n for (i = arr.length - 1; i > 0; i--) {\n j = Math.floor(Math.random() * (i + 1));\n x = arr[i];\n arr[i] = arr[j];\n arr[j] = x;\n }\n return arr;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n }", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(ary) {\n var i = ary.length;\n\n while(i > 0) {\n var j = Random.integerWithinRange(0, --i);\n var tmp = ary[i];\n ary[i] = ary[j];\n ary[j] = tmp;\n }\n\n return ary;\n }", "function shuffle(array) {\n\tvar currentIndex = array.length,\n\t\ttemporaryValue, randomIndex;\n\twhile (currentIndex !== 0) {\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\treturn array;\n}", "function shuffle(array) {\n\tvar currentIndex = array.length, temporaryValue, randomIndex;\n\n\twhile (currentIndex !== 0) {\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\treturn array;\n}", "function shuffle(array){\n\tvar currentIndex = array.length;\n\tvar temporaryValue;\n\t//var randIndex;\n\n\twhile (currentIndex > 0){\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex --;\n\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\t\treturn array;\n}", "function shuffle(array){\n\tvar currentIndex = array.length;\n\tvar temporaryValue;\n\t//var randIndex;\n\n\twhile (currentIndex > 0){\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex --;\n\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\t\treturn array;\n}", "function shuffle(array){\n\tvar currentIndex = array.length;\n\tvar temporaryValue;\n\t//var randIndex;\n\n\twhile (currentIndex > 0){\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex --;\n\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\t\treturn array;\n}", "function shuffle(array) {\r\n var currentIndex = array.length, temporaryValue, randomIndex;\r\n\r\n while (currentIndex !== 0) {\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex -= 1;\r\n temporaryValue = array[currentIndex];\r\n array[currentIndex] = array[randomIndex];\r\n array[randomIndex] = temporaryValue;\r\n }\r\n return array;\r\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n\tfor (var i = array.length-1; i > 0; i--) {\n\t\tvar rand = Math.floor(Math.random() * (i + 1));\n\t\tvar temp = array[i];\n\t\tarray[i] = array[rand];\n\t\tarray[rand] = temp;\n\t}\n\treturn array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n }", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n return array;\n}", "function shuffle(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n return array;\n}", "function shuffle(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue,\n randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue,\n randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\r\n var currentIndex = array.length, temporaryValue, randomIndex;\r\n\r\n while (currentIndex !== 0) {\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex -= 1;\r\n temporaryValue = array[currentIndex];\r\n array[currentIndex] = array[randomIndex];\r\n array[randomIndex] = temporaryValue;\r\n }\r\n\r\n return array;\r\n}", "function shuffle(arr){\n\t\t\t\t\t\t for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x);\n\t\t\t\t\t\t return arr;\n\t\t\t\t\t\t}", "function shuffle(array) {\n\t\tvar currentIndex = array.length, temporaryValue, randomIndex;\n\n\t\twhile (currentIndex !== 0) {\n\t\t\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\t\t\tcurrentIndex -= 1;\n\t\t\t\ttemporaryValue = array[currentIndex];\n\t\t\t\tarray[currentIndex] = array[randomIndex];\n\t\t\t\tarray[randomIndex] = temporaryValue;\n\t\t\t}\n\n\t\t return array;\n}", "function shuffle(array) {\n\tvar currentIndex = array.length, temporaryValue, randomIndex;\n\n\twhile (currentIndex !== 0) {\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\n\treturn array;\n}", "function shuffle(array) {\n\tvar currentIndex = array.length, temporaryValue, randomIndex;\n\n\twhile (currentIndex !== 0) {\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\n\treturn array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n console.log(\"shuffled\");\n return array;\n }", "function shuffle(array) {\r\n var currentIndex = array.length,\r\n temporaryValue, randomIndex;\r\n\r\n while (currentIndex !== 0) {\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex -= 1;\r\n temporaryValue = array[currentIndex];\r\n array[currentIndex] = array[randomIndex];\r\n array[randomIndex] = temporaryValue;\r\n }\r\n\r\n return array;\r\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex ;\n\n while (0 !== currentIndex) {\n\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "shuffleArray(array){\n var count = array.length,\n randomnumber,\n temp;\n while( count ){\n randomnumber = Math.random() * count-- | 0;\n temp = array[count];\n array[count] = array[randomnumber];\n array[randomnumber] = temp;\n }\n return array;\n }", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n }", "function shuffle(array) {\n for(var counter=array.length-1; counter > 0; counter--) {\n var index = Math.floor(Math.random() * counter);\n var temp = array[counter];\n array[counter] = array[index];\n array[index] = temp;\n }\n return array;\n }", "function shuffle(array) {\n const { length } = array;\n for (let index = 0; index < length; index++) {\n const newIndex = Math.floor(Math.random() * length);\n swap(array, index, newIndex);\n }\n return array;\n}", "function shuffle(array) {\n//randomizes the order of the figures in the array\n let currentIndex = array.length, randomIndex;\n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex--;\n [array[currentIndex], array[randomIndex]] = [\n array[randomIndex], array[currentIndex]];\n }\n return array;\n}", "function shuffle(array) {\n\tvar currentIndex = array.length,\n\t\ttemporaryValue, randomIndex;\n\n\twhile (currentIndex !== 0) {\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\n\treturn array;\n}", "function shuffle(arr) {\n for (var i = 0; i < arr.length; ++i) {\n var randomIndex = Math.floor(Math.random() * arr.length);\n swap(arr, i, randomIndex);\n }\n\n return arr;\n }", "function shuffle(array) {\n let currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle (array) {\r\n var i = 0\r\n , j = 0\r\n , temp = null\r\n\r\n for (i = array.length - 1; i > 0; i -= 1) {\r\n j = Math.floor(Math.random() * (i + 1))\r\n temp = array[i]\r\n array[i] = array[j]\r\n array[j] = temp\r\n }\r\n }", "function shuffle(array) {\n\tvar currentIndex = array.length,\n\t\ttemporaryValue, randomIndex;\n\t// to shuffle randomly\n\twhile (currentIndex !== 0) {\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\n\t\tcurrentIndex -= 1;\n\t\ttemporaryValue = array[currentIndex];\n\t\tarray[currentIndex] = array[randomIndex];\n\t\tarray[randomIndex] = temporaryValue;\n\t}\n\treturn array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n return array;\n}", "function shuffle(array) {\r\n var currentIndex = array.length,\r\n temporaryValue, randomIndex;\r\n\r\n // While there remain elements to shuffle...\r\n while (0 !== currentIndex) {\r\n\r\n // Pick a remaining element...\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n\r\n currentIndex -= 1;\r\n\r\n // And swap it with the current element.\r\n temporaryValue = array[currentIndex];\r\n array[currentIndex] = array[randomIndex];\r\n array[randomIndex] = temporaryValue;\r\n }\r\n\r\n return array;\r\n }", "function shuffle(array) {\n let currentIndex = array.length,\n temporaryValue, randomIndex;\n\n while (currentIndex !== 0) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n var currentIndex = array.length, temporaryValue, randomIndex ;\n\n while (0 !== currentIndex) {\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}", "function shuffle(array) {\n if(!(array instanceof Array)) {return 'Please pass an array.'}\n let temp;\n for(let i = 0; i < array.length; i++) {\n let toIndex = Math.floor(Math.random() * array.length);\n temp = array[toIndex];\n array[toIndex] = array[i];\n array[i] = temp;\n };\n}", "shuffleArray(array) {\n for(var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n }", "function shuffle(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}", "function shuffle(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}", "function shuffle(array) {\n let result = array.map(el => el);\n let counter = result.length;\n\n while (counter > 0) {\n let index = Math.floor(Math.random() * counter);\n counter--;\n\n let temp = result[counter];\n result[counter] = result[index];\n result[index] = temp;\n }\n\n return result;\n}" ]
[ "0.79371905", "0.79177195", "0.7914589", "0.78819424", "0.7864475", "0.7863797", "0.7858038", "0.7857936", "0.78462774", "0.7832736", "0.7829921", "0.78258395", "0.78240955", "0.78211397", "0.78141314", "0.7805906", "0.7805508", "0.78050596", "0.7803428", "0.7800158", "0.77931577", "0.778695", "0.7781994", "0.77777255", "0.77729845", "0.77711713", "0.77662873", "0.776028", "0.776028", "0.77574754", "0.77574754", "0.7753103", "0.7752479", "0.77451295", "0.7744086", "0.7738342", "0.77376264", "0.77360386", "0.7734256", "0.77332664", "0.7729135", "0.7724788", "0.7722089", "0.772187", "0.772187", "0.772187", "0.7719165", "0.77186054", "0.77165765", "0.77165765", "0.77165765", "0.77165765", "0.77165765", "0.77165765", "0.77165765", "0.77165765", "0.77160144", "0.7714704", "0.771245", "0.77122086", "0.77122086", "0.7712022", "0.7712022", "0.7712022", "0.77118427", "0.77118427", "0.7711241", "0.7710796", "0.7710397", "0.7709707", "0.7709707", "0.770681", "0.7705612", "0.7704095", "0.770127", "0.7694802", "0.7690779", "0.7685846", "0.76851267", "0.7684529", "0.7684418", "0.7681304", "0.7680751", "0.7680361", "0.7676307", "0.7676307", "0.7676307", "0.7676307", "0.7675042", "0.7675042", "0.7675042", "0.7675042", "0.7672621", "0.7671616", "0.7670047", "0.76671046", "0.76670307", "0.76666605", "0.76666605", "0.7664606" ]
0.7824302
12
Function to create random integer
function getRandomInt(max) { return Math.floor(Math.random() * Math.floor(max)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateNumber() {\n return Math.floor(Math.random() * 256);\n }", "function getRandomInt(){\n return Math.floor(Math.random() * 10);\n}", "function randomInt_1_10(){\n\treturn Math.floor(Math.random()*(10-1))+1;\n}", "function getRandomNumber () {}", "function randomint(){\n\tvar x = Math.floor(Math.random()*9);\n\treturn x;\n}", "function randomNumberGenerator() {\n\treturn (Math.floor(((Math.random() * 9) + 1)));\n}", "function getRandomNumber() {\n return String.fromCharCode(Math.floor(Math.random() * 10) + 48)\n}", "function getRandomNumber() {\n return String.fromCharCode(Math.floor(Math.random() * 10) + 48);\n}", "static generateRandomInteger() {\n var int_ = Math.floor(0 + Math.random() * (1 + 1 - 0))\n switch (int_) {\n case 0:\n return -1.2;\n break;\n case 1:\n return 1.2;\n break\n }\n }", "function getRandomNum() {\n return Math.floor(1 + Math.random() * 10);\n}", "function generateRandomlyNumber(){\n\treturn Math.floor(Math.random()*10)\n}", "function getNumber(){\n return (1 + Math.floor(48 * Math.random()));\n}", "function randomNumber(int) {\n return Math.floor(Math.random() * int);\n }", "function generaNumero(num) {\n\n nRandom = parseInt(Math.random() * num + 1);\n\n return nRandom;\n}", "function getRandomNumber(){\n return String.fromCharCode(Math.floor(Math.random()*10)+48);\n}", "function genNum() {\n // 198 = 99 - (-99)\n return Math.floor((Math.random() * 198) - 99);\n}", "function crearNumeroAleatorio() {\n let number = Math.round(Math.random() * 10000);\n\n return number;\n}", "function randomNumberGenerator() {\n return Math.floor(Math.random() * 102) + 19;\n}", "function randomNumGen() {\n return Math.floor(Math.random() * 102) + 19;\n }", "function generateNum() {\n\treturn Math.floor(Math.random()*100)\n}", "function randomNumber() {\n return Math.floor(Math.random() * 256);\n}", "function randomNumber() {\n return Math.floor((Math.random() * 10) + 1)\n }", "function randomNumber() {\n return Math.floor(Math.random() * 10 + 1);\n}", "function randomNumber() {\n return Math.floor((Math.random() * 10) + 1)\n}", "function randomNumber() {\n return Math.floor((Math.random() * 10) + 1)\n}", "function randomNumber() {\n return Math.floor((Math.random() * 10) + 1)\n}", "function randomNumber() {\n return Math.floor((Math.random() * 10) + 1)\n}", "function randomNumber() {\n return Math.floor((Math.random() * 10) + 1)\n}", "function randomNumber() {\n return Math.floor((Math.random() * 10) + 1)\n}", "function randomNumber() {\n return Math.floor((Math.random() * 10) + 1)\n}", "function randNumber () {\n\treturn Math.floor(Math.random() * 10);\n}", "function randomNumberGenerator(){\n const randomNumber = Math.floor(Math.random() * 10) + 0;\n return randomNumber;\n}", "function randomNum(){\n return Math.floor(Math.random() * 256)\n}", "generateRandomNumber (){\n let number = Math.floor((Math.random() * 10) + 1);\n return number;\n }", "function generateNumber() {\n return 5;\n}", "function generoiId() {\n\n let id = '';\n\n for (let i = 0; i < 16; i++) {\n id = id + (Math.floor(Math.random() * 10));\n }\n\n return parseInt(id);\n}", "function randomNum_1_10(){\n\treturn Math.random()*(10-1)+1;\n}", "function generateNumber() {\n // random number picker that uses ascii knowledge of numbers\n\n var value = Math.floor(Math.random() * (57 - 48) + 48);\n return String.fromCharCode(value);\n}", "function createId(){\n return Math.floor(Math.random() * 10000)\n}", "function genRandom(a) {\n return parseInt(Math.random()*a);\n}", "function getRandomNr() {\n return Math.floor(Math.random() * 10) + 300\n}", "function randomNumberGenerator(){\n return Math.floor(Math.random()*1000);\n }", "function randomNumberGenerator(){\n return (10+ Math.floor(Math.random()*(99-10+1)));\n}", "function createID() {\n return Math.floor(Math.random() * 100000000000);\n}", "function generateRandNum()\n{\n return Math.ceil(Math.random() * 10)\n}", "function randomNumber() {\n return Math.floor(Math.random() * 10) + 1;\n\n}", "function randomInteger(n) {\n\treturn Math.floor(Math.random()*n);\n}", "function generateRandomNumber(){\n return Math.floor((Math.random()*100)+1);\n }", "function randomInteger(n) {\n return Math.floor(Math.random()*n);\n}", "function getRandomInt() {\n\treturn Math.floor(Math.random() * (120-19+1))+19; \n}", "function randomInt(n){\n return Math.floor(Math.random() * n)\n}", "function randomNumber(){\n return (Math.round(1 * Math.random()) + 1);\n }", "function getRandomNumber () {\n return Math.floor(Math.random() * 256);\n}", "function getRandomNum () {\n return Math.floor(Math.random() * 17) + 16\n }", "function generateNumber() {\n result = Math.floor(Math.random() * 4) + 1\n return result\n}", "function randomInteger(integer) {\n return Math.floor(Math.random() * integer);\n}", "function random_id() {\n\treturn ('' + Math.floor((Math.random() * 100000) + 1));\n}", "function randomNumberGenerator(){\n return Math.floor(Math.random()*1000);\n}", "function generateRandomNumber(){\n return Math.random();\n}", "function getRandomInt(num) {\n return Math.floor(Math.random() * num);\n}", "function getRandomNumber() {\n return String.fromCharCode(Math.floor(Math.random() * 10) + 48);\n // same as getRandomLower with different charCodes \n}", "function generate_id(){\n var id=(Math.floor(Math.random() * 100000000));\n if(id<10000000){\n id=\"0\"+id.toString();\n return id;}\n else{\n id=id.toString();\n return id;}\n}", "function getRandomNum(){\n var number = Math.floor(Math.random() * 9) + 1;\n return number;\n}", "function generateRandomNumber(num){\r\n return Math.floor(Math.random() * num)\r\n}", "function Random_getNumber () {\n if ( !_isaac_weak_seeded || _isaac_counter >= 0x10000000000 )\n Random_weak_seed();\n\n var n = ( 0x100000 * _isaac_rand() + ( _isaac_rand() >>> 12 ) ) / 0x10000000000000;\n _isaac_counter += 2;\n\n return n;\n}", "function randInt() {\n return Math.floor(Math.random()*3);\n}", "function randNum(){\n\tvar num = Math.floor(Math.random() * 9) +1 ;\n\treturn num;\n\n}", "function randInt(n) {\n return Math.floor(Math.random() * n);\n}", "static random() {\r\n return BigIntHelper.read8(RandomHelper.generate(8), 0);\r\n }", "function createRandomCounter() {\n var randomCounter = mathRand(10) + 20;\n return randomCounter;\n}", "function randomInteger(n) {\n return Math.floor(Math.random() * (n + 1));\n}", "function createId(){\n return Math.round(Math.random()*1000000);\n }", "function randomNr() {\n return Math.floor(Math.random() * 9999);\n}", "function r(r){return (\"0\"+Math.floor(Math.random()*r).toString(16)).substr(-2)}", "function produceNumber() { \n var charCase = String.fromCharCode(Math.floor(Math.random() * 10 + 48))\n return charCase\n }", "function generateNumber() {\n return _.shuffle([1, 2, 3, 4, 5, 6, 7, 8, 9]).slice(0, 4);\n}", "generateRandomNumber() {\n return this.generateRandom(0, 10);\n }", "function generateID() {\n return Math.floor(Math.random() * 100000000);\n}", "function genNum(){\n\trandomNum = Math.floor(Math.random() * Math.floor(numberMax + numberMin)) \n}", "function genrand_int31() {\r\n //c//return (genrand_int32()>>1);\r\n return (genrand_int32()>>>1);\r\n }", "function returnRandomNumber(){\n return Math.floor(Math.random() * 1084);\n}", "function randomNumber() {\r\n return Math.random;\r\n}", "function getRandomInt(int) {\n return Math.floor(Math.random() * Math.floor(int));\n}", "function getRandomInteger(100000, 1000000) {\n return Math.floor(Math.random() * (1000000 - 100000) ) + 100000;\n}", "function randomNumber() {\n return Math.random() * 10;\n}", "function generateID() {\r\n return Math.floor(Math.random() * 100000000);\r\n}", "function numerorandom () {\r\n return Math.floor(Math.random() * 5) + 1;\r\n}", "function generateNum() {\n return Math.round(Math.random() * 100);\n}", "function randomNumber() {\n return (Math.round(Math.random()*100)+1);\n }", "function randomNum(){\n return Math.floor(Math.random() * 14);\n}", "function randint(lo, hi) { return lo + Math.floor(Math.random() * (hi - lo + 1)); }", "function getRandomInt() {\r\n return Math.floor(Math.random() * 2)\r\n }", "randomLikeGenerator() {\n return Math.floor(Math.random() * 10) + 1\n }", "static getRandomInt() {\n return Math.floor(Math.random() * Math.floor(7));\n }", "function getRandomIdBase() {\n return Math.round(Math.random() * 9);\n}", "function generaNumero(){\n let numero = Math.floor(Math.random() * 4 ) + 1;\n return numero;\n}", "function generate() {\n\treturn (Math.random() * 1e18).toString(32).slice(0, 11);\n}", "function randomNumber(){\n let rand = Math.floor(Math.random()*10);\n return(rand); \n}", "function getRandomInteger_zero_100() {\n return (Math.floor((Math.random()*100)+1));\n}", "function randInt(n)\n{\n\treturn Math.floor((Math.random() * n) + 1);\n}", "function generateRandomNumber () {\n return Math.floor(Math.random() * 100) + 1\n}" ]
[ "0.80871224", "0.78889674", "0.786766", "0.78554755", "0.78318495", "0.7823074", "0.7811263", "0.7799612", "0.77730757", "0.7770198", "0.7757815", "0.7737801", "0.7731033", "0.7724623", "0.7718095", "0.77123886", "0.7706171", "0.7704853", "0.7704505", "0.7671307", "0.766843", "0.76656777", "0.7654471", "0.76424044", "0.76424044", "0.76424044", "0.76424044", "0.76424044", "0.76424044", "0.76424044", "0.7622723", "0.7605813", "0.76051503", "0.7600661", "0.7591754", "0.7590466", "0.75832903", "0.7581357", "0.7574148", "0.75711673", "0.7565242", "0.756156", "0.7558948", "0.7554944", "0.755022", "0.75426704", "0.7541713", "0.75397205", "0.7531947", "0.7519933", "0.7512875", "0.7508801", "0.7507739", "0.75071144", "0.75047255", "0.7472225", "0.74619293", "0.74587464", "0.74554604", "0.7451126", "0.7445935", "0.74413025", "0.7439231", "0.7435715", "0.74343455", "0.7431703", "0.7423178", "0.74163884", "0.7415221", "0.7412677", "0.7408659", "0.73979825", "0.73905337", "0.7387235", "0.7383576", "0.7380624", "0.7374263", "0.73733413", "0.7372864", "0.737258", "0.73706466", "0.73591924", "0.7358858", "0.73534906", "0.7343677", "0.7335691", "0.7331703", "0.7330312", "0.7328715", "0.7328312", "0.7327493", "0.7326523", "0.7326098", "0.73232573", "0.7319876", "0.7312698", "0.73062366", "0.73054427", "0.73050386", "0.7302395", "0.73012054" ]
0.0
-1
start in null instead of false to start with spinner
componentWillMount() { firebase.initializeApp( { apiKey: Config.API_KEY, authDomain: Config.AUTH_DOMAIN, databaseURL: Config.DATABASE_URL, projectId: Config.PROJECT_ID, storageBucket: Config.STORAGE_BUCKET, messagingSenderId: Config.MESSAGING_SENDER_ID }); firebase.auth().onAuthStateChanged((user) => { if (user) { this.setState({ loggedIn: true }); } else { this.setState({ loggedIn: false }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showSpinner(){\n \tspinTarget.show();\n\t\tspinner.spin(spinTarget[0]);\n }", "function spinner_modifier(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous!==this.element.val()){this._trigger(\"change\")}}}", "function spinner_modifier(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous!==this.element.val()){this._trigger(\"change\");}};}", "function spinner_modifier(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous !== this.element.val()){this._trigger(\"change\");}};}", "get showSpinner() {\n return this.isLoading || this.isSaving;\n }", "function customSpinner() {\n\t$(\".spinner\").spinner({\n\t\tnumberFormat: \"n\",\n\t\tmin: 0\n\t});\n}", "function startSpin(btn) {\n btn.data('orgtxt', btn.html());\n btn.css('width', btn.outerWidth());\n btn.html('<i class=\"fa fa-spinner fa-spin\"></i>');\n btn.prop(\"disabled\", true);\n}", "_initQuantitySpinner() {\n $('#spinnerQuantity').spinner();\n }", "function showSpinner() {\n spinner.start();\n overlay.show();\n }", "function showSpinner() {\n\t\t\tclear();\n\t\t\tdiv.update(spinner);\n\t\t\tspinnerVisible = true;\n\t\t\tmove();\n\t\t}", "function spinner_start() {\n $(\"#refreshicon\").addClass(\"spin\");\n }", "loading(value) {\n if (value) {\n //this.buttonElements.prop('disabled', true);\n //this.loadingContainer.fadeIn(250);\n console.log('animation start!');\n console.log(this.loadingContainer);\n this.spinner.spin(this.loadingContainer);\n }\n else {\n //this.buttonElements.prop('disabled', false);\n //this.loadingContainer.fadeOut(250);\n this.spinner.stop();\n }\n }", "onSpinnerShown_() {\n if (this.scanInProgress_) {\n this.listContainer_.endBatchUpdates();\n this.listContainer_.startBatchUpdates();\n }\n }", "function showLoadingSpinner(){\n loader.hidden = false;\n quoteContainer.hidden = true;\n}", "renderSpinner() {\n const { isLoading } = this.props;\n if (isLoading === true) {\n return (\n <Spinner />\n );\n } else {\n return false;\n }\n }", "toggleSpinner() {\r\n this.setState({\r\n showSpinner: !this.state.showSpinner\r\n });\r\n }", "function spinnerModifer(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous !== this.element.val()){this._trigger(\"change\");}};}", "function spinnerModifer(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous!==this.element.val()){this._trigger(\"change\");}};}", "function spinnerModifer(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous!==this.element.val()){this._trigger(\"change\");}};}", "function spinnerModifer(fn){return function(){var previous=this.element.val();fn.apply(this,arguments);this._refresh();if(previous!==this.element.val()){this._trigger(\"change\");}};}", "function showSpinner(enable) {\n if (enable)\n document.getElementById('loader').style.display = 'block'\n else\n document.getElementById('loader').style.display = 'none'\n}", "loader() {\n if (this.state.loader) {\n return (\n <View>\n <Spinner visible={this.state.loader} textContent={\"\"} textStyle={{ color: Colors.header_red }} color={Colors.header_red} />\n </View>\n )\n }\n }", "function showSpinner() {\n\t\t$('.spinner').show();\n\t}", "function page_spinner_start() {\n $(document.createElement(\"div\")).attr('id','page_spinner').text('Working...').prependTo('body').show(100);\n}", "function setSpinner(show) {\n var display = show ? \"block\" : \"none\";\n loadingSpinner.setAttribute(\"style\", \"display:\" + display);\n }", "function showSpinnerInfinite() {\n button.style.display=\"none\";\n hide_show.style.display=\"none\";\n spinner.className = \"show\";\n setTimeout(() => {\n spinner.className = spinner.className.replace(\"show\", \"\");\n button.style.display=\"block\";\n hide_show.style.display=\"block\";\n }, 100000000);\n}", "function showSpinner() {\n // Directions tab shows its own spinner, with slightly different placement.\n // When explore tab content (places list) displays within the directions tab,\n // the directions tab handles showing/hiding its own spinner around it.\n if (tabControl.isTabShowing(tabControl.TABS.DIRECTIONS)) {\n return;\n }\n $(options.selectors.placesContent).addClass('hidden');\n $(options.selectors.spinner).removeClass('hidden');\n }", "function showHideSpinner(show) {\n\tdocument.getElementById('LoadingSpinner').style.visibility = (show) ? \"visible\" : \"hidden\";\n if (show) { document.body.style.cursor = 'progress'; } else { document.body.style.cursor = 'default';} \n}", "startLoading() {\r\n if (this.state.isLoading) {\r\n this.setState({ showLoading: true });\r\n }\r\n clearInterval(this.timer);\r\n }", "fetchDataStart(){\n this.hideDropDown();\n this.showLoader();\n }", "function setSpinner(isActive){\n\tconst spinner = document.querySelector(\"#searchSpinner\"); // find the HTML element in DOM and assign that value to spinner\n\tif (isActive){\n\t\t// if parameter true, activate spinner\n\t\tspinner.classList.add(\"active\");\n\t} else {\n\t\t// if parameter false (actually \"if parameter is not true\"), deactivate spinner\n\t\tspinner.classList.remove(\"active\");\n\t}\n}", "function showSpinner(e){\r\n spinner.style.display = \"block\";\r\n setTimeout(calculation,3000);\r\n e.preventDefault();\r\n }", "_onChange() {\n super._onChange();\n this.__toggleSpinnerButtonsState();\n }", "showSpinner () {\n this.spinnerEl.classList.add('active');\n }", "function startSpin () {\t\t\n\t\t// start each reel spinning\n\t\t$('.slot-one').addClass('spinning1');\n\t\t$('.slot-two').addClass('spinning2');\n\t\t$('.slot-three').addClass('spinning3');\t\t\n\t\t// stop reels\n\t\tstopSpin();\n\t}", "backToStart() { this.setState({ step: 1, isLoading: false }); }", "function show_or_hide_spinner(showOrHide, msg=null){\n if (showOrHide === true){\n var target = $(\"body\");\n var spinner = new Spinner().spin();\n target.append(spinner.el);\n console.log(spinner.el);\n\n if (msg != null){\n $(\"#loading_message p\")[0].innerHTML = msg;\n } \n\n $(\"#loading\").show(); \n }\n else{ \n $(\"div.spinner\").remove();\n $(\"#loading\").hide(); \n }\n}", "function startSpinner() {\n let slot1 = document.getElementById('slot1');\n let slot2 = document.getElementById('slot2');\n let slot3 = document.getElementById('slot3');\n if (spin === true) {\n slot1.innerHTML = `${Math.floor(Math.random() * 8.999999) + 1}`;\n slot2.innerHTML = `${Math.floor(Math.random() * 9.999999)}`;\n slot3.innerHTML = `${Math.floor(Math.random() * 9.999999)}`;\n setTimeout(startSpinner, 100);\n } else {\n targetNum = parseInt(slot1.innerText + slot2.innerText + slot3.innerText);\n }\n}", "function clickSpinner(){\r\n if(open){\r\n clickMenuClose();\r\n }\r\n else{\r\n clickMenuOpen();\r\n }\r\n}", "function addSpinner () {\n spinner = new CanvasLoader(\"spinner\");\n spinner.setShape(\"spiral\");\n spinner.setDiameter(90);\n spinner.setDensity(90);\n spinner.setRange(1);\n spinner.setSpeed(4);\n spinner.setColor(\"#333333\");\n // As its hidden and not rendering by default we have to call its show() method\n spinner.show();\n // We use the jQuery fadeIn method to slowly fade in the preloader\n $(\"#spinner\").fadeIn(\"slow\");\n }", "function InitSpinner() {\n $(document).ajaxSend(function () {\n $('#divSpinner').show();\n }).ajaxComplete(function () {\n $('#divSpinner').hide();\n }).ajaxError(function (e, xhr) {\n // do something on ajax error\n });\n}", "function createSpinner(id, options) {\n jq(\"#\" + id).spinit(options);\n}", "function MatProgressSpinnerDefaultOptions() {}", "function startLoading() {\n vm.loading = true;\n }", "allowApiSpinner() {\n this.allowSpinnerWhenCallingAStitchApi = true;\n }", "onSpinStart() {\n this.spinButton.prop( \"disabled\", true );\n console.log('Spinning');\n }", "function initNumberSpinner1() {\n if (!$.fn.TouchSpin) { return; }\n var $el = $('.number-spinner1');\n $el.not('.has-spinner').TouchSpin({\n verticalbuttons: true,\n min: 0,\n max: 99999,\n step: $el.data('step') || 1,\n decimals: $el.data('decimals') || 0\n }).addClass('has-spinner');\n}", "function stopSpinner() {\n spin = false;\n stopButton.classList.add('display-none');\n inputContainer.classList.toggle('dynamic-height');\n createFormHolder();\n createInputRow();\n createDoneButton();\n}", "function addSpinner(selector, boolean) {\n $(selector)\n .prepend(`<span class=\"spinner-grow spinner-grow-sm\" role=\"status\" aria-hidden=\"true\"></span> `)\n .attr(\"disabled\", boolean);\n}", "function loading() {\n\n var opts = {\n lines: 13, // The number of lines to draw\n length: 7, // The length of each line\n width: 4, // The line thickness\n radius: 10, // The radius of the inner circle\n corners: 1, // Corner roundness (0..1)\n rotate: 0, // The rotation offset\n color: '#000', // #rgb or #rrggbb\n speed: 1, // Rounds per second\n trail: 60, // Afterglow percentage\n shadow: false, // Whether to render a shadow\n hwaccel: false, // Whether to use hardware acceleration\n className: 'spinner', // The CSS class to assign to the spinner\n zIndex: 2e9, // The z-index (defaults to 2000000000)\n top: 'auto', // Top position relative to parent in px\n left: 'auto' // Left position relative to parent in px\n };\n\n var target = document.getElementById('spinner');\n var spinner = new Spinner(opts).spin(target);\n\n}", "function _start() {\n if (!$animate) {\n $animate = $injector.get('$animate');\n }\n\n var $parent = $document.find($parentSelector);\n $timeout.cancel(completeTimeout);\n\n // do not continually broadcast the started event:\n if (started) {\n return;\n }\n\n $rootScope.$broadcast('cfpLoadingBar:started');\n started = true;\n\n if (includeBar) {\n $animate.enter(loadingBarContainer, $parent);\n }\n\n if (includeSpinner) {\n $animate.enter(spinner, $parent);\n }\n\n _set(startSize);\n }", "function stopSpinner(){\n $('.spinner-container').hide();\n}", "function spinnerIsVisible() {\n\t\t\treturn spinnerVisible;\n\t\t}", "function startLoadingIndicator(){\r\n\t$('#svg').showLoading();\r\n\t$('#list').showLoading();\r\n}", "DisplaySpinn(){\n let spinn=this.state.dataSpinn[this.state.value]\n if (spinn>=0){\n return(\n <Icon2 name=\"spinner-rotate-forward\" size={spinn*4} color='green'/>\n )\n }else{\n return(\n <Icon2 name=\"spinner-rotate-forward\" size={spinn*4} color='red'/>\n )\n }\n }", "function loadingState(bool) {\n if (bool) {\n $('#spinner').removeClass('d-none')\n } else {\n $('#spinner').addClass('d-none')\n }\n}", "function showLoadingSpinner() {\n $('.demo-loading')\n .css({'display': 'block', 'opacity': 0.1})\n .animate({'opacity' : 1}, 300);\n }", "function startRunning(){\n loadingView.toggleClass(\"d-none\")\n loadView(\"none\")\n running=true\n }", "startLoading() {\n this.setState({\n startLoading: true,\n });\n }", "startLoading() {\n this.setState({\n startLoading: true,\n });\n }", "function changeSpinner(element, state) {\n if (state == 'show' || state == 'display') {\n $($(element).find('.rest-scaffold-spinner')[0]).show();\n } else {\n $($(element).find('.rest-scaffold-spinner')[0]).hide();\n }\n}", "isLoading() {\n if (this.props.loading) {\n return (\n <Spinner\n name=\"three-bounce\"\n style={{\n display: \"flex\",\n color: \"#FFA3D4\",\n justifyContent: \"center\",\n margin: \"40px\"\n }}\n />\n );\n }\n }", "_onLoadStart() {\n this.setState({\n isLoading: true,\n animationScanLine: false\n });\n }", "function _start() {\n if (!$animate) {\n $animate = $injector.get('$animate');\n }\n\n var $parent = $document.find($parentSelector).eq(0);\n $timeout.cancel(completeTimeout);\n\n // do not continually broadcast the started event:\n if (started) {\n return;\n }\n\n $rootScope.$broadcast('cfpLoadingBar:started');\n started = true;\n\n if (includeBar) {\n $animate.enter(loadingBarContainer, $parent, angular.element($parent[0].lastChild));\n }\n\n if (includeSpinner) {\n $animate.enter(spinner, $parent, angular.element($parent[0].lastChild));\n }\n\n _set(startSize);\n }", "function initLoadingSpinner() {\n // Using jQuery instead of $ due to a conflict with Prototype in the forums and on main site.\n \n jQuery('.button.loader').append('<span class=\"loading\" style=\"display:block;\"></span>');\n jQuery('span.loading').hide();\n var isLoading = 0;\n jQuery('.button.loader button').not('.disabled').click(function(){\n var parent = jQuery(this).parent('.button.loader');\n if(isLoading == 0){\n parent.find('.button-content *').addClass('invisible');\n parent.find('span.loading').show();\n parent.addClass('inprogress');\n isLoading++\n }\n });\n jQuery('a.button.loader').not('.disabled').click(function(){\n var parent = jQuery(this).parent('.button.loader');\n if(isLoading == 0){\n jQuery(this).find('.button-content *').addClass('invisible');\n jQuery(this).find('span.loading').show();\n parent.removeClass('inprogress');\n isLoading++\n }\n });\n}", "function showSpinner() {\n button.style.display=\"none\";\n hide_show.style.display=\"none\";\n spinner.className = \"show\";\n setTimeout(() => {\n spinner.className = spinner.className.replace(\"show\", \"\");\n button.style.display=\"block\";\n hide_show.style.display=\"block\";\n }, 4000);\n}", "function _createSpinner(context, name, type, min = 1, max = 12) {\n var spinner = \"<div class=\\\"\" + type + \" float\\\">\"; // Opening Div\n // Top \"Spinner\" Arrow\n spinner += \"<span class=\\\"up spin_control\\\" id=\\\"\"\n + name + \"_\" + type +\"_up\\\"></span>\";\n // Input field to hold the number\n spinner += \"<input type=\\\"number\\\" min=\\\"1\\\" max=\\\"12\\\"\" +\n \" value=\\\"1\\\" class=\\\"float\\\" id=\\\"\" + name + \"_\" + type + \"\\\"/>\";\n // Bottom \"Spinner\" Arrow\n spinner += \"<span class=\\\"down spin_control\\\" id=\\\"\" + \n name + \"_\" + type + \"_down\\\"></span>\";\n spinner += \"</div>\"; // Closing Div\n\n // Append all \"Spinner\" elements to the control passed in the context\n $(context).append(spinner);\n\n // Increment Function\n $(\"#\" + name + \"_\" + type +\"_up\").click(function(){\n incVal(\"#\" + name + \"_\" + type, max, min);\n updateTime(name);\n });\n\n // Decrement Function\n $(\"#\" + name + \"_\" + type + \"_down\").click(function(){\n decVal(\"#\" + name + \"_\" + type, min, max);\n updateTime(name);\n });\n }", "generateSpinnerElement()\n {\n let emptyDivKey = Object.keys(this.numberOfEmptyDivForSpinner).find(element => element === this.options.spinnerIcon);\n\n let emptyDivElement = this.generateEmptyDivElement(this.numberOfEmptyDivForSpinner[emptyDivKey]);\n\n this.spinner = `<div style=\"color: ${this.options.spinnerColor}\" class=\"la-${ this.options.spinnerIcon } la-${this.options.spinnerSize}\">${ emptyDivElement }</div>`\n }", "function progressStart() {\r\n\r\n\t$('#progress-start').one('inview', function (event, visible) {\r\n\t if (visible == true) {\r\n\t \tinit_progressBar(2500);\r\n\t }\r\n\t});\r\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}", "function startLoading() {\n //TODO\n}", "function spinner(action, location) {\n\t\tvar $spinner;\n\t\tvar spinner_class = '.wrap-spinner';\n\t\tif (location !== undefined) {\n\t\t\tspinner_class += '.js-spinner-' + location; \n\t\t}\n\n\t\t$spinner = $(spinner_class);\n\n\t\tswitch(action) {\n\t\t\tcase('on'):\n\t\t\t\t$spinner.removeClass('hidden');\n\t\t\t\tbreak;\n\n\t\t\tcase('off'):\n\t\t\t\t$spinner.addClass('hidden');\n\t\t\t\tbreak;\n\t\t}\n\t}", "function spinner_modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"onChange\" );\n\t\t}\n\t};\n}", "function estaGirando(){\r\n\treturn idsSpinners.length > 0;\r\n}", "function loderFunction() {\n $ionicLoading.show({\n template: '<ion-spinner icon=\"bubbles\" class=\"spinner-balanced\"></ion-spinner>'\n });\n }", "function _start() {\n if (!$animate) {\n $animate = $injector.get('$animate');\n }\n\n var $parent = $document.find($parentSelector).eq(0);\n $timeout.cancel(completeTimeout);\n\n // do not continually broadcast the started event:\n if (started) {\n return;\n }\n\n $rootScope.$broadcast('cfpLoadingBar:started');\n started = true;\n\n if (includeBar) {\n $animate.enter(loadingBarContainer, $parent, angular.element($parent[0].lastChild));\n }\n\n if (includeSpinner) {\n $animate.enter(spinner, $parent, angular.element($parent[0].lastChild));\n }\n\n _set(startSize);\n }", "function _start() {\n if (!$animate) {\n $animate = $injector.get('$animate');\n }\n\n var $parent = $document.find($parentSelector).eq(0);\n $timeout.cancel(completeTimeout);\n\n // do not continually broadcast the started event:\n if (started) {\n return;\n }\n\n $rootScope.$broadcast('cfpLoadingBar:started');\n started = true;\n\n if (includeBar) {\n $animate.enter(loadingBarContainer, $parent, angular.element($parent[0].lastChild));\n }\n\n if (includeSpinner) {\n $animate.enter(spinner, $parent, angular.element($parent[0].lastChild));\n }\n\n _set(startSize);\n }", "function _start() {\n if (!$animate) {\n $animate = $injector.get('$animate');\n }\n\n var $parent = $document.find($parentSelector).eq(0);\n $timeout.cancel(completeTimeout);\n\n // do not continually broadcast the started event:\n if (started) {\n return;\n }\n\n $rootScope.$broadcast('cfpLoadingBar:started');\n started = true;\n\n if (includeBar) {\n $animate.enter(loadingBarContainer, $parent, angular.element($parent[0].lastChild));\n }\n\n if (includeSpinner) {\n $animate.enter(spinner, $parent, angular.element($parent[0].lastChild));\n }\n\n _set(startSize);\n }", "onSyncStart() {\n this.ui.sync.toggleClass('animate-spin', true);\n }", "showLoading() {\n if (!this._isEnabled) {\n return;\n }\n this._isSearching = true;\n }", "bookTestDriveSlot()\n {\n this.loadSpinner=true;\n\n let startMeter = this.startMeterReading ? parseFloat(this.startMeterReading) : 0.0;\n let endMeter = this.endMeterReading ? parseFloat(this.endMeterReading) : 0.0;\n\n if(this.isCommercial && (endMeter < startMeter)){\n let error_Msg = 'End Meter Reading should be greater than Start Meter Reading';\n this.tostMessage( error_Msg, 1, 'Error', 0);\n this.loadSpinner=false;\n return;\n }\n\n const allValid = [...this.template.querySelectorAll('lightning-combobox')]\n .reduce((validSoFar, inputCmp) => {\n inputCmp.reportValidity();\n return validSoFar && inputCmp.checkValidity();\n }, true);\n let dealerEmpId='';\n if(this.userDetail.fields.Dealer_Employee_Code__c.value!==null && this.userDetail.fields.Dealer_Employee_Code__c.value!==undefined && this.userDetail.fields.Dealer_Employee_Code__c.value.includes('_'))\n {\n dealerEmpId=this.userDetail.fields.Dealer_Employee_Code__c.value.split('_')[1];\n }\n if(this.testDriveType==='S')\n {\n console.log(this.loadSpinner);\n console.log(allValid);\n if(this.selectedSlot===undefined || this.selectedSlot.length===0 || this.selectedSlot==='')\n {\n this.template.querySelector('c-multi-select-cmp').setPickListName(this.selectedSlot);\n this.loadSpinner=false;\n }\n else if(this.selectedDate!==undefined && this.selectedDate!=='' && allValid){\n console.log('Inside Else if');\n //this.loadSpinner=true;\n this.bookingDate=this.selectedDate;\n if(this.selectedSlot.length===1)\n {\n this.startTime=this.selectedSlot[0].Name.split(' to ')[0];\n this.endTime=this.selectedSlot[0].Name.split(' to ')[1];\n }\n else if(this.selectedSlot.length>1)\n {\n this.startTime=this.selectedSlot[0].Name.split(' to ')[0];\n this.endTime=this.selectedSlot[this.selectedSlot.length-1].Name.split(' to ')[1];\n }\n \n let tdrd={\n \"optType\" : this.testDriveType,\n \"mspin\": this.record.fields.DSE_MSPIN__c.value,\n \"model\": this.selectedVariant, \n \"variant\": this.variantSelected,\n \"location\": this.loc,\n \"status\":this.testDriveType==='C'?\"COMPLETED\":\"RESERVED\", //\"RESERVED\",\n \"owner\": \"1\",\n \"enquiryId\": this.record.fields.DMS_Enquiry_Name__c.value, //\"19000050\",\n \"salesPersonId\": dealerEmpId,//\"EMP2096\",\n \"scheduleStartTime\": this.bookingDate+'T'+this.startTime+':00.090Z',\n \"scheduleEndTime\": this.bookingDate+'T'+this.endTime+':00.090Z' ,\n \"duration\":0,\n \"drivenKM\" : this.testDriveType==='C'?this.kmDriven:0,\n \"signature\": false,\n \"vin\": this.vin,\n \"orgId\": 1,\n \"salesforceId\": \"\" \n };\n console.log(tdrd);\n this.callBookTestDriveAPI(tdrd);\n }\n else{\n //console.log('Inside else');\n this.loadSpinner=false;\n }\n \n }\n else{\n\n const allValidCreate = [...this.template.querySelectorAll('lightning-input')]\n .reduce((validSoFar, inputCmp) => {\n inputCmp.reportValidity();\n return validSoFar && inputCmp.checkValidity();\n }, true);\n const allValidCreateSatisfied = [...this.template.querySelectorAll('lightning-radio-group')]\n .reduce((validSoFar, inputCmp) => {\n inputCmp.reportValidity();\n return validSoFar && inputCmp.checkValidity();\n }, true);\n const checkTextAreaFeedBack = [...this.template.querySelectorAll('lightning-textarea')]\n .reduce((validSoFar, inputCmp) => {\n inputCmp.reportValidity();\n return validSoFar && inputCmp.checkValidity();\n }, true);\n console.log(this.todayDate);\n console.log(this.sTime);\n console.log(this.eTime);\n if(allValidCreate && this.padTOuched===true && allValidCreateSatisfied && checkTextAreaFeedBack)\n {\n let dateSplit=this.todayDate.split('-');\n let startTimeSplit=this.startTime.split(':');\n let endTimeSplit=this.endTime.split(':');\n this.dateTimeDiff=Math.abs(new Date(dateSplit[0], dateSplit[1], dateSplit[2], endTimeSplit[0], endTimeSplit[1], '00', '00')- new Date(dateSplit[0], dateSplit[1], dateSplit[2], startTimeSplit[0], startTimeSplit[1], '00', '00'));\n this.dateTimeDiff=Math.floor((this.dateTimeDiff/1000)/60);\n let tdrd={\n \"optType\" : this.testDriveType,\n \"mspin\": this.record.fields.DSE_MSPIN__c.value,\n \"model\": this.selectedVariant, \n \"variant\": this.variantSelected,\n \"location\": this.loc,\n \"status\":this.testDriveType==='C'?\"COMPLETED\":\"RESERVED\", //\"RESERVED\",\n \"owner\": \"1\",\n \"enquiryId\": this.record.fields.DMS_Enquiry_Name__c.value, //\"19000050\",\n \"salesPersonId\": dealerEmpId,\n \"scheduleStartTime\": this.todayDate+'T'+this.startTime+'Z',\n \"scheduleEndTime\": this.todayDate+'T'+this.endTime+'Z' ,\n \"duration\": this.dateTimeDiff,\n \"drivenKM\" : this.kmDriven,\n \"signature\": false,\n \"startReading\": startMeter,\n \"endReading\": endMeter,\n \"isLoad\": this.loadedTestDrive ? \"Y\" : \"N\",\n \"orgId\": 1,\n \"salesforceId\": \"\" \n };\n this.callBookTestDriveAPI(tdrd);\n }\n else{\n this.tostMessage(missingFieldnSignature,0,'Error','');\n this.loadSpinner=false;\n }\n \n }\n //this.loadSpinner=false;\n \n }", "function _createSpinner() {\n this.spinner = new ImageSurface({\n size: [36, 36],\n properties: {\n display: 'none'\n }\n });\n \n this.spinner.setContent('./img/spinner.gif');\n \n this.spinnerMod = new Modifier({\n origin: [0.5, 0.5]\n });\n \n this._add(this.spinnerMod).add(this.spinner);\n}", "function _showLoader() {\r\n spinner.classList.add('fa', 'fa-refresh', 'fa-spin');\r\n spinner.style.marginRight = \"8px\";\r\n }", "function set_loading_spinner(button, spinner) {\n button.prop('disabled', true);\n\n // First, figure out by how much the button needs to be lengthened.\n var width = button.width();\n var obj = {width: 0};\n\n // Do the transformation.\n var transform = anime({\n targets: obj,\n width: spinner.outerWidth(true),\n round: 1,\n easing: 'easeInOutQuart',\n update: function() {\n button.width(width + obj.width);\n },\n complete: function(anim) {\n spinner.show();\n }\n });\n}", "start() {\n let hr = Number(this.selectHr.value);\n let mins = Number(this.selectMin.value);\n let secs = Number(this.selectSec.value);\n this.updateTimer(hr, mins, secs);\n this.disabledElements();\n }", "hideSpinner_() {\n if (this.spinnerHideCallback_) {\n this.spinnerHideCallback_();\n this.spinnerHideCallback_ = null;\n }\n }", "startSearch() {\n if (!this._isEnabled) {\n return;\n }\n this.showLoading();\n }", "function _onStateChangeStart() {\n vm.isLoading = true;\n }", "setStartValue(value) {\n this.setState({ startValue: value });\n this.checkEndValue(value);\n }", "function spinnerModifer( fn ) {\n return function() {\n var previous = this.element.val();\n fn.apply( this, arguments );\n this._refresh();\n if ( previous !== this.element.val() ) {\n this._trigger( \"change\" );\n }\n };\n}", "function startSpin(whatSpinner, direction)\n{\n\tdocument.thisLoop = setInterval(function ()\n\t{\n\t\tnextStep(whatSpinner, direction);\n\t}, 125); //125 ms\n}" ]
[ "0.6735049", "0.66097325", "0.65607125", "0.65552855", "0.652931", "0.64487964", "0.6442305", "0.63579625", "0.63573855", "0.6344712", "0.6260593", "0.62505543", "0.621469", "0.6212818", "0.62084234", "0.62026036", "0.61600375", "0.6154299", "0.6154299", "0.6154299", "0.6152682", "0.61317796", "0.6125038", "0.6083824", "0.6081236", "0.60258836", "0.60072273", "0.59896904", "0.5938816", "0.59369713", "0.5929823", "0.59123254", "0.58978677", "0.58855796", "0.58752924", "0.58750826", "0.58655286", "0.5860689", "0.58500487", "0.58495134", "0.5848338", "0.58395654", "0.58231705", "0.5820741", "0.5816698", "0.58073497", "0.5802912", "0.5777059", "0.5751965", "0.5743169", "0.5740109", "0.5734121", "0.5722994", "0.57198864", "0.567867", "0.5671396", "0.5667541", "0.5660728", "0.56574756", "0.56574756", "0.56514686", "0.5639329", "0.5633156", "0.56305647", "0.56301093", "0.5619186", "0.560052", "0.55970687", "0.5595657", "0.55835545", "0.55835545", "0.55835545", "0.55835545", "0.55835545", "0.55835545", "0.55835545", "0.55835545", "0.55835545", "0.55835545", "0.55835545", "0.5580695", "0.5576709", "0.5576331", "0.55740535", "0.5571514", "0.55556285", "0.55556285", "0.55556285", "0.5537635", "0.55267656", "0.5506952", "0.54919606", "0.54902446", "0.54879254", "0.54864603", "0.54747987", "0.5472652", "0.5467975", "0.5464765", "0.5460682", "0.5455473" ]
0.0
-1
Like user by ID. sender_id is generated from localStorage, receiver_id is typed in in frontend
function likeUser(like) { return new Promise((resolve, reject) => { var sql = `INSERT INTO [GK7].likes (sender_id, receiver_id) VALUES (@sender_id, @receiver_id)` const request = new Request(sql, (err) => { if (err) { reject(err) console.log(err) } }); request.addParameter('sender_id', TYPES.Int, like.sender_id) request.addParameter('receiver_id', TYPES.Int, like.receiver_id) request.on('requestCompleted', (row) => { resolve('Like inserted', row) console.log('like inserted') // checkMatch() }); connection.execSql(request); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function like() {\n LikeService.post(vm.user.username, $stateParams.id, vm.currentUser)\n .then(() => {\n loadLikes();\n vm.isLiked = true;\n\n // send notification to the given user\n if (vm.user._id != vm.currentUser._id) {\n socket.emit('notification', {'to': vm.user._id, 'from': vm.currentUser._id, 'author': vm.currentUser.username, 'type': 'like', imageid: $stateParams.id});\n }\n });\n }", "async function handleLike(id){\n await api.post(`/devs/${id}/likes`, null, { \n headers: {user: match.params.id}\n }); // Parametros do post (url, corpo, headers), nesse caso o corpo é vazio\n\n setUsers(users.filter(user => user._id != id));\n }", "function handleLike(event) {\n $(this).preventDefault();\n likeTweet(this.attr('id'));\n }", "function likeUser(e) {\n // debugger\n let match = {\n 'liker_id': 2,\n 'liked_id': e.currentTarget.dataset.userId\n // 'liker_id': 2,\n // 'liked_id': e.currentTarget.dataset.userId\n }\n // debugger\n fetch(\"http://localhost:3000/matches\", {\n method: \"POST\", \n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(match)\n }).then(res => res.json())\n .then(result => console.log(result))\n\n}", "async like(params) {\n const { fromUser, toUser } = params;\n if (await this.checkLikeExist(params) === true) {\n await mysqlUtil.query(\n 'DELETE FROM `like`\\\n WHERE fromUser = ? \\\n AND toUser = ?',\n [fromUser, toUser]\n );\n await User.decrementLikeCount(toUser);\n } else {\n await mysqlUtil.query(\n 'INSERT INTO `like` \\\n (fromUser, toUser) \\\n VALUES (?, ?);',\n [fromUser, toUser]\n );\n await User.incrementLikeCount(toUser);\n }\n }", "onLikeClick(newsId, userId, isNewsLiked, likeId) {\n if (!isNewsLiked) {\n this.props.addLike(newsId, userId, 'show');\n } else {\n this.props.removeLike(newsId, likeId, 'show');\n }\n }", "like(messageId) {\n if (!user.user) {\n return\n }\n return likeMessage({\n variables: {\n userId: user.user.id,\n messageId,\n dummy: getDummy(),\n },\n\n update: (store, { data: newData }) => {\n // Read the data from our cache for this query.\n const data = store.readQuery({\n query: GetMessages,\n variables: {\n slug,\n userId: user.user && user.user.id,\n }\n })\n console.log('[MessageList like > update] proxy query data', data)\n console.log('[MessageList like > update] newData', newData)\n // Add our comment from the mutation to the end.\n // data.comments.push(submitComment)\n // Write our data back to the cache.\n // store.writeQuery({ query: CommentAppQuery, data })\n },\n })\n }", "function likeTweet(tweet_id) {\n $.post({\n url: '/tweets/like',\n data: {_id: \"5cded97f9aa945112dafb8f9\"},\n success: (data) => {\n const tweet = $('#' + tweet_id);\n tweet.addClass('liked');\n $(tweet).children('')\n }\n });\n }", "function likeEvent() {\n const likeInfo = {};\n if ($('#user-exists').length <= 0) return;\n\n const like = $(this);\n let likeCount = parseInt(like.find('span').text(), 10);\n const eventLink = like.parent().parent().parent().next()\n .find('.event-card__title a')\n .attr('href');\n likeInfo['event_code'] = eventLink.split('/').pop();\n\n if (like.hasClass('like')) {\n likeInfo['like'] = false;\n like.find('img').attr('src', '/img/params/unlike.svg');\n like.removeClass('like');\n likeCount -= 1;\n like.find('span').text(likeCount);\n } else {\n likeInfo['like'] = true;\n like.find('img').attr('src', '/img/params/like.svg');\n like.addClass('like');\n likeCount += 1;\n like.find('span').text(likeCount);\n }\n $.ajax({\n url: '/like/change',\n type: 'POST',\n dataType: 'json',\n data: JSON.stringify(likeInfo),\n });\n }", "findUserLike(likes) {\n const { user } = this.props;\n if (likes && Object.values(likes).includes(user.id)) {\n return true;\n }\n return false\n }", "function handleLike() {\n // setLike(!like);\n // setDislike(false);\n\n fetch(`http://localhost:3000/watchList/${id}`, {\n method: \"PATCH\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n likeButton: !likeButton,\n dislikeButton: false,\n }),\n })\n .then((resp) => resp.json())\n .then((data) =>\n onEditMovie(data.id, data.likeButton, data.dislikeButton)\n );\n }", "function doLike(btn) {\n $(\"#\" + btn.id).css(\"visibility\", \"hidden\");\n let dislikeBTN = btn.getAttribute(\"dislikeid\")\n $(\"#\" + dislikeBTN).css(\"visibility\", \"visible\");\n\n let msgId = btn.getAttribute(\"msg-id\");\n\n let api = \"../api/Messages/DoLike/\" + msgId + \"/\" + currentUserId;\n ajaxCall(\"POST\", api, \"\", MsgSuccessCB, ErrorCB);\n}", "function getuserliked(id,liked){\n\n var userinfo = JSON.parse(localStorage.getItem('token')); \n \n postListConnectUserLiked(userinfo,id,liked).then(response =>{\n \n console.log('Muy Bien');\n \n }) \n .catch(error =>{\n console.log('Error',error)\n // location.href=\"./registrarse.html\";\n \n });\n}", "function addLike($id, btn) {\n\tvar arrData = {\"message\" : $id};\n\tsendRequest(\"ajaxAddLike\", function(response,status,ajaxObj) {\n\t\t$(btn).find(\"span\").html(response);\n\t}, arrData);\n}", "function Post_like_to_db(post_id, id_user, val)\n {\n $.ajax({\n type: \"POST\",\n url: \"../../Controller/users_controller.php\",\n data: { mabaidang_thich: post_id, manguoidung_thich: id_user, giatri01: val},\n success: function(data){\n // document.getElementById(\"kt\").innerHTML = \"da like\";\n }\n });\n\n }", "function addLikeById(quoteId){\n button = document.querySelector(`[data-like-id=\"${quoteId}\"]`)\n button.innerText = `Likes: ${parseInt(button.innerText.split(\": \")[1])+1}`\n }", "function like_by_kerane(name)\n{\n $.post(\"../connections_page_file/add_like_to_db.php\",\n {like_account: name}\n );\n}", "'ADD_REPLY_LIKE'(state, id) {\n var vid = state.videos.filter(video => {\n return video.vidId == id.videoId\n })[0]\n var com = vid.comments.filter(comment => {\n return comment.idComment == id.commentId\n })[0]\n var reply = com.replies.filter(rep => {\n return rep.idReply == id.replyId\n })[0]\n reply.likes++\n com.replies.splice((com.replies.length - 1) - reply.idReply, 1, reply)\n vid.comments.splice((vid.comments.length - 1) - com.idComment, 1, com)\n videos.splice(vid.vidId, 1, vid)\n }", "function checkLike(req, res) {\n var noteId = req.params.noteId;\n var userId = req.params.userId;\n if(noteId.length <10){\n noteModel\n .checkApiLike(noteId, userId)\n .then(function (score) {\n res.json(score);\n });\n }else{\n noteModel\n .checkOwnLike(noteId, userId)\n .then(function (score) {\n res.json(score);\n });\n }\n }", "generateLike(itemObject) {\n const {likes} = this.props;\n const {currentUser} = this.props;\n let imgSrc = window.imageUrls.heartIcon;\n if (currentUser) {\n itemObject.likeIds.forEach(likeId => {\n if (likes[`${likeId}`].author_id === currentUser.id) {\n imgSrc = window.imageUrls.heartIconLiked;\n return imgSrc;\n }\n });\n }\n return imgSrc;\n }", "function likeClicked() {\n chrome.runtime.sendMessage({ \"button\": \"like\", \"id\": data[currentIndex]._id });\n data[currentIndex].points += 1\n setPoints();\n}", "function addLikes() {\n if (propLike?.includes(user.username)) {\n let index = propLike.indexOf(user.username);\n let removeLike = [\n ...propLike.slice(0, index),\n ...propLike.slice(index + 1),\n ];\n setLikeGet(removeLike);\n setPropLike(removeLike);\n setRedLike(\"\");\n\n addToLike(eventid, removeLike);\n } else {\n let likesArr = [...propLike, `${user.username}`];\n\n setLikeGet(likesArr);\n setPropLike(likesArr);\n setRedLike(\"red\");\n addToLike(eventid, likesArr);\n }\n }", "function likeMessage(messageId, callback) {\n\tvar url = BASE_URL + '/messages/' + currentChat + '/' + messageId + '/like' + '?token=' + user_access_key;\n\trequest({\n\t\turl: url,\n\t\tmethod: 'POST'\n\t}, function(er, respn, bdy) {\n\t\tif(!er) {\n\t\t\tcallback();\n\t\t} else {\n\t\t\tterm.red(\"Uh oh\");\n\t\t}\n\t});\n}", "function like(a){\n let likes = parseInt($(a).parent().children('div').text())\n let like_id =$(a).data('listingid')\n likes += 1;\n $(a).parent().children('div').text(likes);\n $.ajax({\n url:'/like',\n type:'POST',\n contentType: 'application/json;charset=UTF-8',\n dataType:\"json\",\n data: JSON.stringify({'ListingID':like_id,\n 'Likes': likes})\n });\n}", "async function handleLiking() {\n\n // redirecting to log in page if user is not signing/unregistered with an account\n if (checkEmail === 'no email') {\n return history.push(\"/log-in\")\n } else {\n setlikeState(!likeState);\n \n // extracting medId from path URL to use later, as document ID when fetching from the firebase\n const location = window.location.href.split(\"/\");\n const medId = location[location.length - 1];\n\n const reviewRef = db\n .collection(\"drug\")\n .doc(medId)\n .collection(\"Review\")\n .doc(reviewId);\n \n // increment or decrement the like number and keep track of which user like the comment\n if (!likeState) {\n reviewRef.update({\n likeNumber: update.increment(1),\n });\n\n reviewRef.update({\n likeUsers: update.arrayUnion(currentUser.email),\n });\n\n setlikeNumber(likeNumber + 1);\n\n } else if (likeState) {\n reviewRef.update({\n likeNumber: update.increment(-1),\n });\n\n reviewRef.update({\n likeUsers: update.arrayRemove(currentUser.email),\n });\n\n setlikeNumber(likeNumber - 1);\n }\n\n const userRef = db\n .collection(\"User\")\n .doc(reviewId)\n .collection(\"Review\")\n .doc(medId);\n\n // update the like and which user like the comment in the user collection\n if (!likeState) {\n userRef.update({\n likeNumber: update.increment(1),\n });\n\n setlikeNumber(likeNumber + 1);\n\n } else if (likeState) {\n userRef.update({\n likeNumber: update.increment(-1),\n });\n\n setlikeNumber(likeNumber - 1);\n }\n }\n }", "function likePost(client, id, callBack){\n client.HGET(\"posts\", id, function(err, reply){\n var post = JSON.parse(reply)\n post.likes++\n client.HSET(\"posts\", id, JSON.stringify(post), callBack)\n })\n}", "function handleLikebtn() {\n setIsLike( !isLiked )\n \n }", "function likeSheet() {\n if($rootScope.currentUser == null){\n vm.returnData = \"Log in to continue\";\n }else{\n NoteService\n .checkIfUserLiked(vm.noteId, $rootScope.currentUser._id)\n .then(function (response) {\n if(response.data == null){\n NoteService\n .likeSheet(vm.noteId)\n .then(function (response) {\n vm.userLiked = 1;\n },function (error) {\n console.log(error);\n });\n }else{\n var likers = response.data.liker;\n for(i=0; i<likers.length ; i++){\n if(likers[i] == $rootScope.currentUser._id){\n vm.userLiked = 1;\n }\n }if(vm.userLiked == 0){\n NoteService\n .likeSheet(vm.noteId)\n .then(function (response) {\n vm.userLiked = 1;\n },function (error) {\n console.log(error);\n });\n }\n }\n\n });\n }\n }", "async likePost(_, { postId }, context) {\n const { username } = checkAuth(context)\n const post = await findPost(postId)\n\n const userLiked = username => like => like.username === username\n const likeOrUnlike = R.ifElse(\n R.find(userLiked(username)), // Condition\n R.reject(userLiked(username)), // onTrue\n R.append({ username }) // onFalse\n )\n\n post.likes = likeOrUnlike(post.likes)\n return formatPost(await post.save())\n }", "findUserLike(likes) {\n const { auth } = this.props;\n if (likes.filter(like => like.user === auth.user.id).length > 0) {\n // if the user was in likes array\n return true;\n } else {\n return false;\n }\n }", "function Infor_like_rating(post_id, num_like, num_rate)\n {\n\n $.ajax({\n type: \"POST\",\n url: \"../../Controller/users_controller.php\",\n data: {postcode_infor_user_like_rating: post_id},\n success: function(data)\n {\n var True, index, length, infor_obj = JSON.parse(data);\n True = 0;\n length = Object.keys(infor_obj).length;\n document.getElementById(\"nguoilikebaidang\").innerHTML = \"\";\n for(index = 0; index < num_like; index++){\n if(user_id == infor_obj[index].user_id){\n True = 1;\n }else{\n document.getElementById(\"nguoilikebaidang\").innerHTML += Help_like(infor_obj[index].user_id, infor_obj[index].avatar, infor_obj[index].name, infor_obj[index].mail);\n }\n }\n\n if(True == 1) document.getElementById(\"soluongthich\").innerHTML = \"Bạn và \"+(num_like - 1)+\" người khác đã thích bài đăng này\";\n else document.getElementById(\"soluongthich\").innerHTML = num_like + \" người đã thích bài đăng này\";\n\n True = 0;\n document.getElementById(\"nguoidanhgiabaidang\").innerHTML = \"\";\n for(index = num_like; index < length; index++){\n if(user_id == infor_obj[index].user_id){\n True = 1;\n }else{\n document.getElementById(\"nguoidanhgiabaidang\").innerHTML += Help_rating(infor_obj[index].user_id, infor_obj[index].avatar, infor_obj[index].name, infor_obj[index].mail, infor_obj[index].star);\n }\n }\n\n if(True == 1) document.getElementById(\"soluongdanhgia\").innerHTML = \"Bạn và \"+(num_rate - 1)+\" người khác đã đánh giá bài đăng này\";\n else document.getElementById(\"soluongdanhgia\").innerHTML = num_rate + \" người đã đáng giá bài đăng này\";\n\n }\n });\n\n }", "async function checkliked(id_Post,id_User){\n await Like.find({id_post:id_Post}).forEach(function () {\n if(id_user == id_User ) return true;\n });\n return false;\n}", "async function doLike () {\n try {\n // await ig.login(username, password);\n let medias = await ig.getTimeLineFeed();\n medias.map(async ({ node }) => {\n let now = new Date().getTime();\n let fourHours = 3600 * 4 * 1000;\n let mediaTimePost = node.taken_at_timestamp * 1000;\n if (mediaTimePost >= now - fourHours) {\n if (!node.viewer_has_liked) {\n await ig.like(node.id);\n }\n }\n });\n } catch (error) {\n console.error(error);\n }\n setTimeout(doLike, TIMEOUT);\n}", "likeOrdislike()\n {\n const dbChange = new XMLHttpRequest;\n dbChange.onreadystatechange = () => {\n if (dbChange.readyState == 4 && dbChange.status == 200) {\n const result = JSON.parse(dbChange.responseText);\n if(result[0] == true)\n {\n const icon = document.querySelector(\"#haiku\"+this.id+\" .post-like\");\n switch(this.likeStatus)\n {\n case true:\n {\n this.likeStatus = false;\n this.likes--;\n icon.style.backgroundImage = \"url('img/icons/heart_normal.svg')\";\n saveLikesData(this.id, \"remove\");\n break;\n }\n case false:\n {\n this.likeStatus = true;\n this.likes++;\n icon.style.backgroundImage = \"url('img/icons/heart_full_normal.svg')\";\n saveLikesData(this.id, \"add\");\n break;\n }\n }\n document.querySelector(\"#haiku\"+this.id+\" .post-like span\").textContent = this.likes;\n }\n showCommunicate(result);\n }\n };\n dbChange.open(\"POST\", \"../resources/haiku_like.php\", true);\n dbChange.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n if(this.likeStatus == true)\n dbChange.send(\"like=false&hid=\"+this.id);\n else\n dbChange.send(\"like=true&hid=\"+this.id);\n }", "function registraLikeMascota(id_dispositivo,id_usuario_instagram,id_foto_instagram){\n\tvar usuarioLikeFotoURI = \"usuario-like-foto\";\n\tvar db = firebase.database();\n\tvar usuarioLikeFoto = db.ref(usuarioLikeFotoURI).push();\n\n\tusuarioLikeFoto.set({\n\t\tid_dispositivo : id_dispositivo,\n\t\tid_usuario_instagram: id_usuario_instagram,\n\t\tid_foto_instagram : id_foto_instagram\n\t});\n}", "function showLikeAuthor(photoId) {\n var xmlhttp = getXmlHttp(),\n data = new FormData();\n\n xmlhttp.open('POST', '/like/showUser/', true);\n xmlhttp.onreadystatechange = function () {\n if (xmlhttp.readyState == 4) {\n if (xmlhttp.status == 200) {\n var html = xmlhttp.responseText,\n container = document.getElementsByClassName(\"likeAuthor\")[0];\n container.setAttribute(\"class\", modifyClassList(container.getAttribute(\"class\"), \"delete\", \"hiddenElement\"));\n container.innerHTML = html;\n var photos = document.querySelectorAll(\".likeAuthor img\");\n //change the position of div\n container.style.left = document.getElementsByClassName(\"likeContainer\")[0].offsetLeft + \"px\";\n }\n }\n }\n data.append('photoId', photoId);\n xmlhttp.send(data);\n }", "function likePost(req,res){\n\tlet user_id = req.params.userId;\n\tlet post_id = req.body.postId;\n\n\tif(user_id && post_id){\n\t\tUser.likePost([post_id, user_id], (results)=>{\n\t\t\tres.json(results);\n\t\t});\n\t}\n\telse{\n\t\tres.status(400).send(\"Need user id and post id\");\n\t}\n}", "handleLike(event) {\n const params = {\n tweetid: event.currentTarget.dataset.tweetid,\n username: this.props.username\n };\n const options = {\n method: 'POST',\n body: JSON.stringify(params)\n };\n\n fetch(\"http://localhost:4000/like\", options)\n .then(res => res.json())\n .then(res => { });\n\n this.componentDidMount();\n }", "function SendLikeUpdate(props){\n const userLikesArticle = userDataValue.likedArticles.includes(props._id);\n\n //we want to patch the user\n async function sendData(valueToSend){\n try{\n await axios.patch(`/api/users/${userDataValue._id}`, valueToSend);\n }catch(error){\n console.log('error', error);\n }\n }\n\n //if the user data and the new value are contradictory, update user\n if(props.newVal !== userLikesArticle){\n let likedArticles = userDataValue.likedArticles;\n\n //if the new value is to add the article, then send the updated article\n if(props.newVal){\n likedArticles.push(props._id);\n }else{\n //else, send the liked articles without the disliked article ...it should remove the article in question\n\n const index = likedArticles.indexOf(props._id);\n if(index > -1){\n likedArticles.splice(index, 1);\n }else{\n //oddly enough, we didn't find the article in the array\n return;\n }\n }\n\n userDataUpdate({...userDataValue, \"likedArticles\":likedArticles});\n sendData({likedArticles:likedArticles});\n }\n }", "function Like(like,id)\n{ \n var userdata=JSON.parse(localStorage.getItem('Api'));\n \n console.log(id,userdata);\n fetch(`http://68.183.27.173:8080/post/${id}/like`,{\n method: (like == true) ? 'DELETE': 'PUT',\n headers:{\n 'Content-Type':'application/json',\n 'Authorization':`Bearer ${userdata.token}`\n\n }\n })\n .then((response)=>{\n GetlistPost();\n }).catch(error=>console.log(\"Error:\",error));\n\n \n\n}", "async likePost(_, { postId }, context, __) {\n const { username } = checkAuth(context);\n\n const post = await Post.findById(postId);\n\n if (post) {\n if (post.likes.find((like) => like.username === username)) {\n // if post already liked, then unlike it by removing the like\n // from the array and returning a new array using filter\n\n post.likes = post.likes.filter((like) => like.username !== username);\n } else {\n // if post is not previously liked, add a like by pushing a new\n // like object into the post.likes[] array\n\n post.likes.push({\n username,\n timeStamp: new Date().toISOString(),\n });\n }\n } else {\n // error safety net, just in case\n\n throw new UserInputError(\"Post not found\");\n }\n // once the post is either liked or unliked, save the post as\n // is in MongoDB, then return the post\n\n await post.save();\n return post;\n }", "addLike(id, title, author, img) {\n const like = { id, title, author, img };\n\n this.likes.push(like);\n\n // Persist data in localstorage\n this.persistData();\n return like;\n }", "function onMessage (message, sender, sendResponse) {\n // New likes triggered from a tab\n if (message.type && message.type == 'updateLike') {\n $('.fbus-count').text(message.likes);\n // New likes triggered from a tab\n } else if (message.type && message.type == 'updateLikesLimit') {\n $('.fbus-limit').text(message.likesLimit);\n // A like has been blocked due to reaching daily limit\n } else if (message.type && message.type == 'likeBlocked') {\n alert('Sorry, no more likes for you today!');\n }\n }", "function submitLike(event) {\n alert('Like Bn Pressed');\n // TODO Objective 10: send post-n id via AJAX POST to like_view (reload page upon success)\n}", "async addLike(likeId) {\n try {\n let result = await this.axiosInstance.post(\"/likes\", likeId);\n return result;\n } catch (err) {\n helpMeInstructor(err);\n return err;\n }\n }", "checkUserLike(likes) {\n const { auth } = this.props;\n\n if (likes.filter(like => like.user === auth.user.id).length > 0) {\n return true;\n } else {\n return false;\n }\n }", "function do_like_to_blog(blogId, user) {\n Blog.findOne({\n id: blogId,\n }, function (err, result) {\n if (err) throw err;\n if (!result) return {\n status: false,\n message: \"Blog doesn't exists\"\n };\n else {\n result.likes.count++;\n result.likes.users.push(user);\n var index = result.unlikes.users.indexOf(user);\n if (index > -1) {\n result.unlikes.users.splice(index, 1);\n result.unlikes.count--;\n }\n Blog.findOneAndUpdate({\n id: result.id\n }, result, function (err, result) {\n return {\n status: true,\n message: \"Liked successfully\"\n };\n });\n }\n });\n}", "function commentLike(id) {\n \n $.ajaxSetup({\n headers: {\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n }\n });\n\n const type = \"POST\";\n const toSend = {\n id,\n \"_token\": $('meta[name=\"csrf-token\"]').attr('content')\n };\n\n const link = '/commentlike';\n\n $.ajax({\n type: type,\n url: link,\n data: toSend,\n dataType: 'json',\n success: function (data) {\n $(`#comment_info_${id}`).html(`<div class='alert alert-success alert-dismissable'><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>Post has Been Liked ${toSend.flag}</div>`);\n console.log(`Post Successfully Liked:${data} as ${toSend.flag}`);\n },\n error: function (data) {\n $(`#comment_info_${id}`).html(`<div class='alert alert-danger alert-dismissable'><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button> ${data.responseText}</div>`);\n console.log(`Error: ${JSON.stringify(data)}`)\n }\n });\n }", "function like(likable_id, likable_type, likable, post_id, type) {\n\n axios.post('/like/add',\n {\n likable_id : likable_id,\n likable_type: likable_type,\n likable : likable,\n post_id : post_id,\n type : type\n }\n ).then(function (response) {\n\n //Message de confirmation\n if(likable){\n Materialize.toast('\"J\\'aime\" ajouté', 4000);\n }else{\n Materialize.toast('\"J\\'aime\" retiré', 4000);\n }\n\n //Reload du post\n axios.post('/post/getOne',{id:post_id}).then(function (response) {\n document.getElementById('zone-post-' + post_id).innerHTML = response.data;\n afterGetPost();\n });\n });\n\n}", "function like(uid, numLikes, usersLiked) {\n console.log(\"like() called\");\n // Users newly likes this review.\n // Add highlight to thumbs up\n $(\"#like-\" + uid).addClass(\"primary-dark-color\");\n // Increment number of likes. Add to DOM\n var incrementNumLikes = numLikes + 1;\n addTextToDom(incrementNumLikes.toString(), \"num-likes-\" + uid);\n // Update numLikes in Firestore. Add uid from usersLiked if not already included\n if (!usersLiked.includes(uid)) {\n usersLiked.push(uid);\n updateDocumentUsingDocId(\"reviews\", uid, {\"numLikes\": incrementNumLikes, \"usersLiked\": usersLiked});\n } else {\n updateDocumentUsingDocId(\"reviews\", uid, {\"numLikes\": incrementNumLikes});\n }\n}", "likeUser(likeUsername){\n this.likedUsers.push(likeUsername);\n }", "function addLikes() {\r\n commentLike.addEventListener('click', event => {\r\n event.preventDefault();\r\n let likeId = event.target.alt;\r\n axios.put(`https://project-1-api.herokuapp.com/comments/${likeId}/like${apiKey}`, \"\")\r\n .then(response => {\r\n let newLike = Number(commentLike.nextSibling.innerText);\r\n commentLike.nextSibling.innerText = newLike + 1;\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n })\r\n \r\n })\r\n }", "async function renderNewTweet(data, element) {\r\n // awaiting all recent tweets and users personally like tweet ids\r\n\r\n let compare = await getUserLikes(localStorage.getItem('uid'));\r\n\r\n // stored value for if tweet is liked or not\r\n let bool = false;\r\n\r\n for (let i = 0; i < data.length; i++ ) {\r\n if (compare != undefined) {\r\n for (let j = 0; j < compare.length; j++) {\r\n if (data[i].id == compare[j].id) {\r\n bool = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (data[i] != {} || data[i] != undefined) {\r\n await renderTweetBody(data[i], element, bool);\r\n }\r\n\r\n bool = false;\r\n }\r\n}", "function likeUser(bool) {\n xhr = new XMLHttpRequest();\n var url = document.querySelector('#url').value;\n if (bool == true)\n url += '/like';\n else\n url += '/unlike';\n xhr.open(\"POST\", url, true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.onreadystatechange = function () {\n if (xhr.readyState == 4 && xhr.status == 200) {\n console.log('Like/Dislike is working!');\n }\n }\n xhr.send();\n }", "async likeBlog (req, res) {\n\n try {\n const blog = await Blog.findById( req.body._id )\n\n const user = await User.findById({user: req.user.username})\n\n /* if(user.username === blog.createdBy) {\n return res.status(400).send('you cannot like your own post')\n }\n\n /*if(blog.likedBy.includes(user.username)) {\n return res.json({success: false, message: 'you have already liked this post'})\n }*/\n\n if(blog.dislikedBy.includes(user.username)) {\n blog.dislikes--\n const arrayIndex = blog.dislikedBy.indexOf(user.username)\n blog.dislikedBy.splice(arrayIndex, 1)\n blog.likes++\n blog.likedBy.push(user.username)\n\n await blog.save()\n\n res.json({success: true, message: 'blog liked'})\n } else {\n\n blog.likes++\n blog.likedBy.push(user.username)\n\n await blog.save()\n\n res.json({success: true, message: 'blog liked'}) \n }\n } catch (error) {\n res.status(400).send(error)\n }\n }", "function likePhoto(id,imgName,ownerId) {\n\n fetch(`/like_photo/${id}/${imgName}/${ownerId}`,{method:'POST','Content-Type': 'application/json'})\n .then(res => res.json())\n .then(function(data){\n debugger;\n\n if(data.bLiked)\n {\n document.getElementById(\"heart_id_\"+imgName).style.fill = \"red\";\n }\n else {\n document.getElementById(\"heart_id_\"+imgName).style.fill = \"gainsboro\";\n }\n\n document.getElementById(imgName+'_likes').innerHTML = data.likes;\n })\n .catch((err) => {\n alert(\"Error\");\n })\n}", "function likeBlog(_id) {\n $.ajax(apiUrl + _id + '/like', {\n type: \"POST\",\n success: (result) => { }\n });\n}", "function clickheart(event)\n{\n var children = event.getElementsByTagName('span');\n var photoid = event.parentNode.parentNode.id;//the id of photo, user this to update\n if (children[1].style.display == \"inline-block\" && children[2].style.display == \"none\")//if empty\n {\n children[1].style.display = \"none\";\n children[2].style.display = \"inline-block\";\n /**\n * like +1 with the photoid given above\n * insert a message in table 'like' with the photoid and userid\n **/\n $.ajax({\n // The URL for the request\n url: \"/gourylls/found/like\",\n // The data to send (will be converted to a query string)\n data: {picID: photoid},\n // Whether this is a POST or GET request\n type: \"POST\",\n error: function (xhr, status, errorThrown) {\n alert(\"Sorry, there was a problem!\");\n console.log(\"Error: \" + errorThrown);\n console.log(\"Status: \" + status);\n console.dir(xhr);\n }\n // Code to run regardless of success or failure\n });\n\n }\n else if (children[1].style.display == \"none\" && children[2].style.display == \"inline-block\")//if full\n {\n children[1].style.display = \"inline-block\";\n children[2].style.display = \"none\";\n //alert(photoid);\n /**\n * like -1 with the photoid given above \n * delete the message in table 'like' with the photoid and userid\n **/\n $.ajax({\n // The URL for the request\n url: \"/gourylls/found/dislike\",\n // The data to send (will be converted to a query string)\n data: {picID: photoid},\n // Whether this is a POST or GET request\n type: \"POST\",\n error: function (xhr, status, errorThrown) {\n alert(\"Sorry, there was a problem!\");\n console.log(\"Error: \" + errorThrown);\n console.log(\"Status: \" + status);\n console.dir(xhr);\n }\n // Code to run regardless of success or failure\n });\n }\n}", "unlike(messageId) {\n if (!user.user) {\n return\n }\n return unlikeMessage({\n variables: {\n userId: user.user.id,\n messageId,\n dummy: getDummy(),\n }\n })\n }", "function likeSong(){\n\tvar favorite_song_request = \"http://developer.echonest.com/api/v4/playlist/dynamic/feedback?api_key=7VI2RLSXC4GBPF6S7&format=json&session_id=\" + session_id + \"&favorite_song=last\";\n\t$.getJSON(favorite_song_request + \"&_=\" + Math.floor(Math.random()*1000000), function(data) {\n\t\tif (data.response.status.message === \"Success\"){\n\t\t\tconsole.log(\"Like successufully\");\n\t\t\tconsole.log(data);\n\t\t}\n\t});\n}", "async function darLike() {\n if (user) {\n db.collection(\"Likes\")\n .doc(eventId)\n .set({\n eventId\n });\n\n await likesQuery().set({ eventId });\n sumarLike();\n setGusto(true);\n }\n }", "function verifLike(indexUser, sauceLike, userId) {\n console.log(\"entrer dans verif like \");\n if (indexUser >= 0 && userId == sauceLike.usersLiked[indexUser]) {\n var retour = true;\n console.log(\"Userid dans userliked : \" + userId);\n\n } else {\n\n var retour = false;\n\n }\n\n console.log(\"Sortie verif like : \" + retour);\n return retour;\n}", "function handleCardLike(card) {\n //console.log(currentUser);\n const isLiked = card.likes.some(i => i === currentUser._id);\n \n api.changeLikeCardStatus(card._id, isLiked)\n .then((newCard) => {\n const newCards = cards.map((c) => c._id === card._id ? newCard.data : c);\n setCards(newCards);\n })\n .catch(err => console.log(\"Error: \" + err));\n }", "function setupLike(likeId, UserClient) {\n var elems = $('.my-heart.' + likeId);\n //request coresponde api\n amplify.request({\n resourceId: \"ToggleLike\",\n data: {\n id:likeId\n },\n success: function (data) {\n elems.children(\".glyphicon\").toggleClass(\"glyphicon-heart\").toggleClass(\"glyphicon-heart-empty\");\n if (elems.children(\".glyphicon\").hasClass(\"glyphicon-heart\"))\n {\n elems.attr(\"title\", \"撤销点赞\");\n }\n else\n {\n elems.attr(\"title\", \"点赞\");\n }\n elems.children(\".LrfTimes\").text(data.LrfCount);\n },\n error: function (data) {//the ip location nork working\n if (UserClient == \"Browser\") {\n $(\"#loginModal\").modal(\"show\");\n }\n console.log(\"require log in\");\n }\n });\n}", "async function setLike(poiID, like) {\n let answer = await request.updateLike(\n \"poi\",\n poiID,\n like,\n getTokenSilently,\n loginWithRedirect\n );\n\n return answer;\n }", "addLike(id, title, author, img)\n {\n const like = \n {\n id,\n title,\n author,\n img\n };\n\n this.likes.push(like);\n\n // Whenever we change the likes array,\n // we should save it to local storage\n // so we can persist our data even\n // when pages reload (using localstorage)\n this.persistData();\n\n return like;\n }", "function Help_like(user_id, avatar, name, vnumail)\n {\n var ele = '<tbody>';\n ele += '<td><img src = \"../'+avatar+'\" class=\"thumbnail\" alt=\"Loi\" width=\"50\" height=\"50\"></td>';\n ele += '<td><div style=\"margin-left:-10%; \"><p style=\"font-size: 125%;\">'+name+'</p>';\n ele += '<p style=\"font-size: 80%;\">'+vnumail+'</p></div></td>';\n ele += '<td><button type=\"button\" class=\"btn btn-primary\" style=\"margin-top: 8%;\">Nhắn tin</button></td>';\n ele += '</tbody>';\n ele+= '<input type=\"hidden\" id = \"anthongtindanhgia\" value = '+user_id+'>';\n\n return ele;\n }", "function likeSheet(req,res) {\n var noteId = req.params.noteId;\n var user = req.user;\n var userId = user._id;\n if(noteId.length <10){\n noteModel\n .findApiNoteComment(noteId)\n .then(function (response) {\n if (response == null) {\n noteModel\n .addLike(noteId, userId)\n .then(function (response) {\n userModel\n .likeSheet(userId, noteId)\n .then(function (response) {\n res.send(200);\n });\n });\n } else { \n noteModel\n .pushApiLike(noteId, userId)\n .then(function (response) {\n userModel\n .likeSheet(userId, noteId)\n .then(function (response) {\n res.send(200);\n });\n });\n }\n });\n }else{\n noteModel\n .pushOwnLike(noteId, userId)\n .then(function (response) {\n userModel\n .likeSheet(userId, noteId)\n .then(function (response) {\n res.send(200);\n });\n });\n }\n }", "function sendLikes(response, postID, commentNum) {\n\n // If the like is on a comment take the comment ID\n if (commentNum != null) {\n for (likeID = 0; likeID < 10000; likeID++) {\n if (!response.data[postID].likes.data\n .hasOwnProperty(likeID))\n break;\n console.log(\"Comment like: \" + response.data[postID].likes.data[likeID].name);\n }\n } else {\n for (likeID = 0; likeID < 10000; likeID++) {\n if (!response.data[postID].hasOwnProperty('likes') || !response.data[postID].likes.data\n .hasOwnProperty(likeID))\n break;\n /*\n * console.log(\"Post \" + postID + \" like: \" +\n * response.data[postID].likes.data[post].name);\n */\n\n var mappingInfo = getUserMapping(response.data[postID].likes.data[likeID].id);\n\n var stmt = {\n \"actor\": {\n \"mbox\": \"mailto:\" + mappingInfo[0],\n \"name\": response.data[postID].likes.data[likeID].name\n },\n \"verb\": {\n \"id\": \"http://activitystrea.ms/schema/1.0/like\",\n \"display\": {\n \"en-US\": \"liked\"\n }\n },\n \"object\": {\n \t\"id\": \"http://adlnet.gov/exapi/activities/media\",\n \"definition\": {\n \"name\": {\n \"en-US\": \"media\"\n }\n }\n\n }\n\n\n }\n\n // Send to central LRS\n var conf = {\n \"auth\": \"Basic \" + toBase64(document.getElementById(\"LRSUser\").value + ':' + document.getElementById(\"LRSPass\").value),\n };\n ADL.XAPIWrapper.changeConfig(conf);\n\n var resp_obj = ADL.XAPIWrapper.sendStatement(stmt);\n ADL.XAPIWrapper.log(\"[\" + resp_obj.id + \"]: \" + resp_obj.xhr.status + \" - \" + resp_obj.xhr.statusText);\n\n // Change to users' LRS & Send\n var conf = {\n \"auth\": \"Basic \" + toBase64(mappingInfo[1] + ':' + mappingInfo[2]),\n };\n ADL.XAPIWrapper.changeConfig(conf);\n\n var resp_obj = ADL.XAPIWrapper.sendStatement(stmt);\n ADL.XAPIWrapper.log(\"[\" + resp_obj.id + \"]: \" + resp_obj.xhr.status + \" - \" + resp_obj.xhr.statusText);\n\n // Increment comment counter for graph\n likesScraped++;\n\n }\n\n }\n\n}", "function postUser(e, book){ \n\n e.preventDefault()\n let show = document.getElementById('show-panel')\n let newObj = {id: 1, username: \"Peter\"}\n let ul = e.target.nextElementSibling\n let nuUl= document.createElement('ul')\n let new_id = parseInt(e.target.id) \n\n \n\nif (book.users.filter(users => users.id === newObj.id).length > 0){\n alert(\"You already liked this book!\"); \n \n }\n else{ \n let newUser = book.users.push(newObj)\n fetch(`http://localhost:3000/books/${new_id}`, {\n method: 'PATCH',\n headers:{\n 'Content-Type': \"application/json\",\n Accept: \"application/json\"\n },\n body: JSON.stringify({\n users: book.users\n })\n })\n \n .then(resp => resp.json())\n .then(data => { \n show.removeChild(ul)\n nuUl.id = data.id\n \n newUser = getUsers(data, data.users, nuUl)\n \n show.appendChild(newUser) \n })\n \n }\n }", "function LikeArtistById(req, res) {\n\tvar artistResult = mongoConnection.queryFromMongoDB('Artists', {'id': req.body.artistId});\n\tartistResult.then(async function (result) {\n\t\tif (result.length < 1) {\n\t\t\tres.status(404).send('The artist with the ID ' + req.body.artistId + \" was not found!\");\n\t\t}\n\t\telse {\n\t\t\t//if (req.session.token == null){\n\t\t\t//\tres.status(401).send('You are unauthorized! Please login!');\n\t\t\t//}\n\t\t\t//else{\n\t\t\t\t//var email = req.session.token.email;\n\n\t\t\t\t// REPLACE THE EMAIL WITH req.session.token.email IT SHOULD WORK IF YOU'RE USING A REAL WEB APP!\n\t\t\t\tvar user = await mongoConnection.queryFromMongoDB('users', {'email': '[email protected]'});\n\t\t\t\t//var user = await mongoConnection.queryFromMongoDB('users', {'email': email});\n\n\t\t\t\tvar likedArtists = user[0].likedArtists;\n\t\t\t\tif (likedArtists === undefined) {\n\t\t\t\t\tlikedArtists = [];\n\t\t\t\t}\n\n\t\t\t\tvar unlikedArtists = user[0].unlikedArtists;\n\t\t\t\tif (unlikedArtists === undefined) {\n\t\t\t\t\tunlikedArtists = [];\n\t\t\t\t}\n\n\t\t\t\tvar length = likedArtists.length;\n\t\t\t\tlikedArtists.push(req.body.artistId);\n\t\t\t\tlikedArtists = arrayUnique(likedArtists);\n\t\t\t\t\n\t\t\t\t// Add the artist to the liked artists\n\t\t\t\tif (length !== likedArtists.length) {\n\t\t\t\t\tif (result[0].likes === undefined) { result[0].likes = 0; }\n\n\t\t\t\t\tresult[0].likes++;\n\t\t\t\t\tawait mongoConnection.updateMongoDB('Artists', {'id': req.body.artistId}, {likes: result[0].likes});\n\t\t\t\t}\n\n\t\t\t\t// Remove the liked artist from the unlike artists if exists\n\t\t\t\tvar index = unlikedArtists.indexOf(req.body.artistId);\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tunlikedArtists.splice(index, 1);\n\t\t\t\t\tif (result[0].unlikes === undefined) { result[0].unlikes = 1; }\n\t\t\t\t\tresult[0].unlikes--;\n\t\t\t\t\tawait mongoConnection.updateMongoDB('Artists', {'id': req.body.artistId}, {unlikes: result[0].unlikes});\n\t\t\t\t}\n\n\t\t\t\t// REPLACE THE EMAIL WITH req.session.token.email IT SHOULD WORK IF YOU'RE USING A REAL WEB APP!\n\t\t\t\t//await mongoConnection.updateMongoDB('users', {'email': email}, {likedArtists: likedArtists});\n\t\t\t\tawait mongoConnection.updateMongoDB('users', {'email': \"[email protected]\"}, {likedArtists: likedArtists, unlikedArtists: unlikedArtists});\n\n\t\t\t\tres.status(200).send('Liked artist ' + req.body.artistId);\n\t\t\t//}\n\t\t}\n\t});\n}", "function likeToy(event){\n let pTag = event.target.previousElementSibling\n const likeEl = pTag.innerText.split(' ')[0]\n let intLike = parseInt(likeEl) + 1\n\n const formData = {\n likes: intLike\n }\n\n const reqObj = {\n method: 'PATCH',\n headers: {\n \"Content-Type\": \"application/json\"\n // Accept: \"application/json\"\n },\n body: JSON.stringify(formData)\n }\n fetch(`http://localhost:3000/toys/${event.target.parentNode.id}`, reqObj)\n .then(resp => resp.json())\n .then(toy => toy)\n\n if (intLike === 1){\n pTag.innerText = `${intLike} Like`\n } else {\n pTag.innerText = `${intLike} Likes`\n }\n }", "function addLikes(likes, id) {\n let span1 = document.getElementById(`span-${id}`)\n //configs for fetch request\n let config = {\n method: 'PATCH',\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\"likes\": likes})\n }\n //fetch request to modify the database\n fetch(quoteUrl + `/${id}`, config)\n .then(response => response.json())\n .then(data => {span1.textContent = data.likes})\n}", "function addLike(event) {\n let likesElement = event.target.previousSibling\n let likesCount = likesElement.innerHTML.split(\" \")[0]\n let updatedLikes = parseInt(likesCount) + 1\n \n // Data that needs to be sent to the back end in the form of a patch\n let formData = {\n likes: updatedLikes\n }\n\n let formObj = {\n method: \"PATCH\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n },\n body: JSON.stringify(formData)\n }\n \n fetch(`http://localhost:3000/toys/${event.target.parentNode.id}`, formObj)\n .then(response => response.json())\n .then(likes => likes)\n\n likesElement.innerText = `${updatedLikes} Likes`\n\n }", "async function isLiked(rec_id) {\n const response = await axios.get(`/meals/${rec_id}/check-if-like`);\n // const response = await axios.get(`/meals/${rec_id}/check-if-like`);\n\n if (response.data.result === \"like\") {\n return true;\n }\n else {\n return false;\n }\n }", "function createLikeListener(){\n toyContainer.addEventListener('click', event => {\n if (event.target.className === 'like-btn') {\n const likes = event.target.previousSibling.innerText.split(' ')[0]\n const id = event.target.dataset.id\n\n const reqObj = {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ likes: parseInt(likes) + 1})\n }\n\n fetch(`http://localhost:3000/toys/${id}`, reqObj)\n .then(resp => resp.json())\n .then(toyObj => {\n event.target.previousSibling.innerText = `${toyObj.likes} Likes`\n })\n }\n })\n\n}", "function do_like_to_reply(blogId, commentId, replyId, user) {\n Blog.findOne({\n id: blogId,\n }, function (err, result) {\n if (err) throw err;\n if (!result) return {\n status: false,\n message: \"Reply doesn't exists\"\n };\n else\n result.comments.comment.forEach(comment => {\n if (comment._id == commentId) {\n comment.replies.forEach(reply => {\n if (reply._id == replyId) {\n reply.likes.count++;\n reply.likes.users.push(user);\n var index = reply.unlikes.users.indexOf(user);\n if (index > -1) {\n reply.unlikes.users.splice(index, 1);\n reply.unlikes.count--;\n }\n Blog.findOneAndUpdate({\n id: result.id\n }, result, function (err, result) {\n return {\n status: true,\n message: \"Liked successfully\"\n };\n });\n }\n });\n }\n });\n });\n}", "function handleLikes() {\n // Get a random number\n let randomNumber = Math.random();\n // To make it unpredictable, only change the likes if =>\n if (randomNumber < REVEAL_PROBABILITY) {\n defineLikes();\n }\n}", "like() {\r\n return this.getItem().then(i => {\r\n return i.like();\r\n });\r\n }", "postLike(token,id)\n {\n var myHeaders = new Headers();\n myHeaders.append('Content-Type', 'application/json');\n myHeaders.append('accept', 'application/json');\n myHeaders.append('Authorization',`Bearer ${token}`);\n\n var myInit = { \n method: 'PUT',\n headers: myHeaders\n };\n \n return this.makeAPIRequest('post/like?id='+id,myInit);\n }", "function addLikeonMedia(evt) {\n const selectedMediaId = +evt.currentTarget.dataset.mediaId;\n const selectedMedialike = evt.currentTarget.previousElementSibling;\n\n const selectedMedia = photographer.media.find(\n (media) => media.id === selectedMediaId\n );\n photographer.addLike(selectedMedia);\n\n addTextContent(selectedMedialike, selectedMedia.likes);\n displayLikesNumber();\n}", "'ADD_REPLY_DISLIKE'(state, id) {\n var vid = state.videos.filter(video => {\n return video.vidId == id.videoId\n })[0]\n var com = vid.comments.filter(comment => {\n return comment.idComment == id.commentId\n })[0]\n var reply = com.replies.filter(rep => {\n return rep.idReply == id.replyId\n })[0]\n reply.dislikes++\n com.replies.splice((com.replies.length - 1) - reply.idReply, 1, reply)\n vid.comments.splice((vid.comments.length - 1) - com.idComment, 1, com)\n videos.splice(vid.vidId, 1, vid)\n }", "async function likeAndFollowSearch(){\r\n var userInfo = localStorage.getItem('user');\r\n var data = JSON.parse(userInfo);\r\n var obj = {UserId:data.UserId, Search:find.value};\r\n var js = JSON.stringify(obj);\r\n \r\n const response = await fetch(buildPath('api/searchsetfollowingandlikeddate'), {method:'POST', body:js,headers:{'Content-Type': 'application/json'}});\r\n var res = JSON.parse(await response.text());\r\n var likeAndFollowing = [];\r\n\r\n for(var i = 0; i < res.length; i++){\r\n var data = res[i].Creator;\r\n var obj2 = {UserId:data};\r\n js = JSON.stringify(obj2);\r\n \r\n try{\r\n const response2 = await fetch(buildPath('api/infouser'), {method:'POST', body:js,headers:{'Content-Type': 'application/json'}});\r\n var res2 = JSON.parse(await response2.text());\r\n likeAndFollowing.push({Name:res[i].Name, Creator:res2.Username, Id:res[i]._id, userID:res2._id});\r\n }\r\n catch(e){\r\n return\r\n }\r\n setQuizzes(likeAndFollowing);\r\n }\r\n }", "postMessage(name, messsage) {\n if (this.findUser(name)) {\n this.findUser(name).addTweet(messsage);\n }\n else {\n const newUser = this.addUser(name);\n newUser.addTweet(messsage);\n }\n }", "liked(charity){\n this.render()\n const new_loggedUser = this.state.loggedUser\n if(charity.id){\n new_loggedUser.favorites.push(charity)\n }\n console.log(new_loggedUser)\n this.setState({\n loggedUser: new_loggedUser\n })\n this.changePage('charitiesSearch')\n }", "function likes(event) {\n let id = image.id;\n console.log('like button confirmation', id)\n\n axios.put(`/gallery/like/${id}`)\n .then((response) => {\n console.log('testing', response)\n getImg();\n })\n .catch(error => {\n console.log('PUT error', error)\n })\n }// end likes", "function do_like_to_comment(blogId, commentId, user) {\n Blog.findOne({\n id: blogId,\n }, function (err, result) {\n if (err) throw err;\n if (!result) return {\n status: false,\n message: \"Comment doesn't exists\"\n };\n else\n result.comments.comment.forEach(comment => {\n if (comment._id == commentId) {\n comment.likes.count++;\n comment.likes.users.push(user);\n var index = comment.unlikes.users.indexOf(user);\n if (index > -1) {\n comment.unlikes.users.splice(index, 1);\n comment.unlikes.count--;\n }\n Blog.findOneAndUpdate({\n id: result.id\n }, result, function (err, result) {\n return {\n status: true,\n message: \"Liked successfully\"\n };\n });\n }\n });\n });\n}", "function likes(id) {\n var deferred = $q.defer();\n\n $http.post(blogUrl + '/blog/like/' + id).then (\n\n function(response) {\n deferred.resolve(response.data);\n }, \n function (errResponse) {\n deferred.reject(errResponse);\n }\n );\n return deferred.promise;\n }", "function postLike() {\n FB.api(\n 'https://graph.facebook.com/me/og.likes',\n 'post',\n { object: objectToLike,\n privacy: {'value': 'SELF'} },\n function(response) {\n if (!response) {\n alert('Error occurred.');\n } else if (response.error) {\n document.getElementById('result').innerHTML =\n 'Error: ' + response.error.message;\n } else {\n document.getElementById('result').innerHTML =\n '<a href=\\\"https://www.facebook.com/me/activity/' +\n response.id + '\\\">' +\n 'Story created. ID is ' +\n response.id + '</a>';\n }\n }\n );\n }", "attemptLike() {\n\t\tthis.btns.like.click();\n\t}", "function checklikes(a){var b=\"process=4&post=\"+a,c=$(\"#like-count-\"+a);$.ajax({type:\"POST\",url:\"postpub\",data:b,beforeSend:function(){c.removeClass(\"animated flash\")},success:function(a){c.html(a+\" Me Gusta\").addClass(\"animated flash\")},error:function(){}})}", "async function likeFunc(element) {\n // unlike it\n // console.log('here'); \n if(element.data.isLiked) {\n const result1 = await axios({\n method: 'put',\n url: 'https://comp426fa19.cs.unc.edu/a09/tweets/' + element.data.id + '/unlike',\n withCredentials: true,\n });\n \n document.getElementById(element.data.id + \"like\").innerHTML = parseInt(document.getElementById(element.data.id + \"like\").innerHTML) - 1; \n // $('#'+ element.data.id + likebutton).css(\"color\", \"#E89E9D\"); \n // console.log(document.getElementById(element.data.id + \"like\").innerHTML); \n $('#'+ element.data.id + \"likebutton\").css(\"background-color\", \"white\"); \n element.data.isLiked = false; \n } else {\n const result = await axios({\n method: 'put',\n url: 'https://comp426fa19.cs.unc.edu/a09/tweets/' + element.data.id + '/like',\n withCredentials: true,\n });\n\n document.getElementById(element.data.id + \"like\").innerHTML = parseInt(document.getElementById(element.data.id + \"like\").innerHTML) + 1; \n // console.log(document.getElementById(element.data.id + \"like\").innerHTML); \n $('#'+ element.data.id + \"likebutton\").css(\"background-color\", \"#DD7975\"); \n element.data.isLiked = true; \n }\n\n}", "function addLike(event) {\nlet userLikes = document.querySelector(\"#likes\")\nconsole.log(userLikes);\n\n// this closes my addLike function\n}", "function likePost(id , bIsLike , sQuestions){\n //put the loading screen on\n loadingScreen(); \n \n //determine the url\n var sUrl = null;\n if (bIsLike){\n sUrl = '/filemanager/rateup/'\n }\n else{\n sUrl = '/filemanager/ratedown/'\n }\n\n //create the object to send \n var obj=new Object();\n obj.id = id;\n obj.questions = sQuestions;\n \n //send it via jquery and update rating\n $.ajax({\n type: \"POST\",\n url: sUrl,\n dataType: \"json\",\n data: obj ,\n success: function(res) {\n if(res.items[0].status ==='success'){\n //$(\"#likes_\"+ id).text((parseInt($(\"#likes_\"+ id).text()) + 1));\n //$(\"#elfinder_tdup_\" + id).html('<img src=\"/img/like_off.png\" width=\"16\" height=\"16\" />');\n //$(\"#elfinder_tddown_\" + id).html('<img src=\"/img/unlike_off.png\" width=\"16\" height=\"16\" />');\n if (res.items[0].data == 0){\n setSuccessToSuccess();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n \n //increase the like or dislike \n if(bIsLike){\n $('#filebrowser_like_' + id).text(parseInt(jQuery.trim($('#filebrowser_like_' + id).text())) + 1);\n }\n else{\n $('#filebrowser_dislike_' + id).text(parseInt(jQuery.trim($('#filebrowser_like_' + id).text())) + 1);\n }\n \n //create a disabled pictures and remove the anchors\n $(\"#filebrowser_likeimg_\" + id).html('<img src=\"/img/like_off.png\" width=\"24\" height=\"20\" />');\n $(\"#filebrowser_dislikeimg_\" + id).html('<img src=\"/img/unlike_off.png\" width=\"24\" height=\"20\" />');\n }\n else{\n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n if(res.items[0].data == 1){\n $('#error').text('Params Error');\n }\n if(res.items[0].data == 2){\n $('#error').text('You can only rate a file once');\n }\n if(res.items[0].data == 3){\n $('#error').text('No such post');\n }\n }\n \n }\n \n //removeLoadingGlassScreen();\n },\n error: function(res) { \n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n \n //display success failure screen\n displaySuccessFailure();\n \n $(\"#error\").text(\"Connection failure! Try again\");\n }\n });\n}", "function likeSpecific() {\n\t\t\tvar userlinks = [];\n\t\t\tjQuery.ajaxSetup({\n\t\t\t async: false\n\t\t\t});\n\t\t\ttry {\n\t\t document.getElementsByClassName('PageNav')[0].getAttribute('data-last')\n\t\t var pages = parseInt(document.getElementsByClassName('PageNav')[0].getAttribute('data-last')) + 2;\n\t\t } catch (err) {\n\t\t var pages = 1;\n\t\t }\n\t\t\tvar modalProgress = $('<div></div>');\n\t\t\tvar progressModal;\n\t\t\tfunction getSpecificUserLinks() {\n\t\t\t\tjQuery.ajaxSetup({\n\t\t\t \tasync: false\n\t\t\t\t});\n\t\t\t\tfor (i = 1; i <= pages; i++) {\n\t\t\t\t\t$.get(url + 'page-' + i, function(data) {\n\t\t\t\t\t\t$.expr[\":\"].contains = $.expr.createPseudo(function(arg) {\n\t\t\t\t\t\t return function( elem ) {\n\t\t\t\t\t\t return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;\n\t\t\t\t\t\t };\n\t\t\t\t\t\t});\n\t\t\t\t\t\t$(data.replace(/<img[^>]*>/g,\"\")).find(\"li:contains(\"+name+\")\").each(function() {\n\t\t\t\t\t\t\tuserlinks.push($(this).find('a[class=\"LikeLink item control like\"]').attr('href'));\n\t\t\t\t\t\t\tconsole.log($(this).find('a[class=\"LikeLink item control like\"]').attr('href'))\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tmodalProgress.text('Checking Page '+i+' of '+pages+'...');\n\t\t\t\t}\n\t\t\t\tlikeSpecificLinks();\n\t\t\t}\n\n\t\t\tfunction likeSpecificLinks() {\n\t\t\t var numbLinks = userlinks.length + 2;\n\t\t\t for (t = 0; t <= numbLinks; t++) {\n\t\t\t var token = document.getElementsByName('_xfToken')[0].getAttribute('value')\n\t\t\t jQuery.ajaxSetup({\n\t\t\t async: false\n\t\t\t });\n\t\t\t $.post(userlinks[t], {\n\t\t\t _xfToken: token,\n\t\t\t _xfNoRedirect: 1,\n\t\t\t _xfResponseType: 'json'\n\t\t\t }, function(data) {});\n\t\t\t\t\tmodalProgress.text('Liking '+t+'/'+numbLinks+' ('+Math.round(t*100/numbLinks)+'%)');\n\t\t\t }\n\t\t\t}\n\t\t var url = '/' + window.location.pathname.split('/')[1] + '/' + window.location.pathname.split('/')[2] + '/';\n\t\t\tvar usernameInput = $('<input type=\"text\" style=\"width:100%;\"/>');\n\t\t\tnew modal('Enter username', usernameInput, {\n\t\t\t\t'Like!': {\n\t\t\t\t\ttype: 'red',\n\t\t\t\t\tclick: function(){\n\t\t\t\t\t\tthis.close();\n\t\t\t\t\t\tprogressModal = new modal('Liking..', modalProgress, {});\n\t\t\t\t\t\tname = usernameInput.val();\n\t\t\t\t\t\tgetSpecificUserLinks();\n\t\t\t\t\t\tprogressModal.methods.close();\n\t\t\t\t\t\talert('done');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'Cancel': {\n\t\t\t\t\ttype: 'grey',\n\t\t\t\t\tclick: function(){\n\t\t\t\t\t\tthis.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function likeVideo(userId, postId) {\n var url = '../updateVideoLikes';\n var token = $('input[name=_token]').val();\n var data = {postId: postId, userId: userId};\n $.ajax({\n url: url,\n headers: {'X-CSRF-TOKEN': token},\n data: data,\n type: 'POST',\n datatype: 'JSON',\n success: function (resp) {\n if (!resp.alreadyLike) {\n var totalLikes = $('#vidTotalLikes').html();\n $('#vidTotalLikes').html('');\n $('#vidTotalLikes').html(parseInt(totalLikes) + parseInt(1));\n $('#videoLikeSpan').css('color', '#359261');\n $('#videoUnlikeSpan').css('color', '#666666');\n var totalUnLikes = $('#vidTotalUnLikes').html();\n if (totalUnLikes > 0) {\n $('#vidTotalUnLikes').html('');\n $('#vidTotalUnLikes').html(parseInt(totalUnLikes) - parseInt(1));\n }\n }\n }\n });\n}", "function sharemyprofile()\n{\n\tif(window.localStorage['loggedin']=='1'){\n\t\tvar user_data = JSON.parse(window.localStorage['userdata']);\n\t\tvar typeUser = \"sitter\";\n\t\tif(window.localStorage['user_type']== \"user_parent\")\n\t\t\ttypeUser = \"parent\";\n\t\twindow.plugins.socialsharing.share(user_data.firstname+': Mon profil',\n\t null,\n\t null,\n\t 'http://codeuridea.net/kidssitter/'+typeUser+user_data.id)\n\t }\n}", "function likePost(e) {\n const enableDataCollection = e.data.enableDataCollection;\n let target = $(event.target);\n // Determine if the comment is being LIKED or UNLIKED based on the initial\n // button color. Red = UNLIKE, Not Red = LIKE.\n if (target.closest('.ui.like.button').hasClass(\"red\")) {\n // Since the button was already red, this button press is an UNLIKE action.\n // Remove red color from like button and decrease the displayed like count\n target.closest('.ui.like.button').removeClass(\"red\");\n const label = $(this).closest('.ui.like.button')\n .next(\"a.ui.basic.red.left.pointing.label.count\");\n label.html(function(i, val) { return val * 1 - 1 });\n } else {\n // Since the button was not red, this button press is a LIKE action\n // Add red color to like button and increase the displayed like count\n target.closest('.ui.like.button').addClass(\"red\");\n var label = $(this).next(\"a.ui.basic.red.left.pointing.label.count\");\n label.html(function(i, val) { return val * 1 + 1 });\n // Store information about the action\n let pathArrayForHeader = window.location.pathname.split('/');\n let currentPageForHeader = pathArrayForHeader[1];\n let currentModuleForHeader = pathArrayForHeader[2];\n let postID = $(this).closest(\".ui.card\").attr(\"postID\");\n let actionType = getActionType(currentPageForHeader);\n let like = Date.now();\n if (actionType === \"free play\" || enableDataCollection) {\n $.post(\"/feed\", {\n actionType: actionType,\n postID: postID,\n modual: currentModuleForHeader,\n like: like,\n _csrf: $('meta[name=\"csrf-token\"]').attr('content')\n });\n }\n }\n}", "function onSendClick(){\n setUserId(userIdInputRef.current.value);\n }", "function attachLikes() {\n $(\".buttonLike\").on('click', function(){\n let resourceId = $(this).attr(\"name\")\n event.preventDefault();\n //$(this).css('color', 'red') //Changes heart to red\n //Sends Ajax Request\n $.ajax({\n url: `planetLHL/resources/${resourceId}/likes`,\n type: `POST`,\n data:{\n resourceId: `${resourceId}`,\n },\n success: function(result) {\n $.getJSON(\"/planetLHL/resources\").then((result) => {\n\n renderResources(result)\n\n\n })\n }\n });\n });\n}" ]
[ "0.7226867", "0.6882414", "0.6686427", "0.6437629", "0.63383657", "0.62563604", "0.6171645", "0.6171558", "0.61456615", "0.6130881", "0.6097248", "0.60502404", "0.60463125", "0.6009326", "0.5979843", "0.5970867", "0.59693384", "0.5932927", "0.59296644", "0.5920503", "0.5914498", "0.5908872", "0.58992505", "0.58690214", "0.5866941", "0.58524597", "0.5830406", "0.58278316", "0.5813072", "0.579375", "0.57934207", "0.57925594", "0.5790935", "0.57787764", "0.5760938", "0.5755827", "0.5755205", "0.57539946", "0.57494634", "0.5746742", "0.5727583", "0.57244474", "0.5713708", "0.57069206", "0.5687909", "0.568685", "0.5684147", "0.5682369", "0.5677158", "0.56628317", "0.56605136", "0.56543106", "0.56507665", "0.5650499", "0.56478053", "0.56470853", "0.5646305", "0.5643736", "0.5640187", "0.56387883", "0.5615571", "0.5613176", "0.5612458", "0.5601529", "0.5600162", "0.55992323", "0.55934215", "0.5587844", "0.5585451", "0.5565716", "0.5563175", "0.5546397", "0.55349034", "0.5524852", "0.5518974", "0.5516038", "0.5514849", "0.55093056", "0.5508449", "0.55069965", "0.54957783", "0.54881614", "0.54802686", "0.5472387", "0.54713166", "0.54689145", "0.54687274", "0.5465947", "0.5456024", "0.5436895", "0.5436045", "0.54329354", "0.5432223", "0.5430982", "0.5430671", "0.5427535", "0.5426056", "0.5424856", "0.5424765", "0.5417921" ]
0.61116666
10
Boot up the Native Messaging and establish a connection with the host, indicated by hostName
function connect() { var hostName = "com.google.chrome.example.echo"; port = chrome.runtime.connectNative(hostName); port.onMessage.addListener(onNativeMessage); port.onDisconnect.addListener(onDisconnected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connect() {\n\t\tthis._communicator.connect();\n\t}", "function connect() {\n console.log(\"Connecting to `\" + localStorage.broker + \"` on port `\" + localStorage.port + \"`\");\n var clientId = \"myclientid_\" + parseInt(Math.random() * 100, 10);\n\n client = new Messaging.Client(localStorage.broker,\n parseInt(localStorage.port),\n clientId);\n client.onConnectionLost = onConnectionLost;\n client.onMessageArrived = onMessageArrived;\n\n var connectOptions = new Object();\n connectOptions.useSSL = false;\n connectOptions.cleanSession = true;\n connectOptions.onSuccess = onConnect;\n if (localStorage.username != \"\") {\n connectOptions.userName = localStorage.username;\n }\n if (localStorage.password != \"\") {\n connectOptions.password = localStorage.password;\n }\n client.connect(connectOptions);\n}", "function connect()\n{\n console.log(\"Connecting to `\" + localStorage.broker + \"` on port `\" + localStorage.port + \"`\");\n var clientId = \"myclientid_\" + parseInt(Math.random() * 100, 10);\n\n client = new Messaging.Client(localStorage.broker,\n parseInt(localStorage.port),\n clientId);\n client.onConnectionLost = onConnectionLost;\n client.onMessageArrived = onMessageArrived;\n\n var connectOptions = new Object();\n connectOptions.useSSL = false;\n connectOptions.cleanSession = true;\n connectOptions.onSuccess = onConnect;\n if (localStorage.username != \"\") {\n connectOptions.userName = localStorage.username;\n }\n if (localStorage.password != \"\") {\n connectOptions.password = localStorage.password;\n }\n client.connect(connectOptions);\n}", "function connect()\n{\n console.log(\"Connecting to `\" + localStorage.broker + \"` on port `\" + localStorage.port + \"`\");\n var clientId = \"myclientid_\" + parseInt(Math.random() * 100, 10);\n\n client = new Messaging.Client(localStorage.broker,\n parseInt(localStorage.port),\n clientId);\n client.onConnectionLost = onConnectionLost;\n client.onMessageArrived = onMessageArrived;\n\n var connectOptions = new Object();\n connectOptions.useSSL = false;\n connectOptions.cleanSession = true;\n connectOptions.onSuccess = onConnect;\n if (localStorage.username != \"\") {\n connectOptions.userName = localStorage.username;\n }\n if (localStorage.password != \"\") {\n connectOptions.password = localStorage.password;\n }\n client.connect(connectOptions);\n}", "function startPeerCommunications(peerName) {\n\n // start server with port zero so it will get new port for us.\n startServerSocket(0);\n\n serverport = server.address().port;\n console.log(\" server listens port :\" + serverport);\n\n Mobile('StartBroadcasting').callNative(peerName, serverport, function (err) {\n console.log(\"StartPeerCommunications returned : \" + err + \", port: \" + port);\n if (err != null && err.length > 0) {\n Mobile('ShowToast').callNative(\"Can not Start boardcasting: \" + err, true, function () {\n //callback(arguments);\n });\n }\n });\n }", "async connect() {\n this._mav = await this._getMavlinkInstance();\n this._socket = await this._getSocket();\n this._registerMessageListener();\n this._registerSocketListener();\n }", "connect() {\n communicator.sendMessage('connected');\n }", "function spConnect() {\n\n // use 'PushManager' to request a new PushServer URL endpoint for 'Mail' notifications:\n endpointRequest = navigator.push.register();\n // the DOMRequest returns 'successfully':\n endpointRequest.onsuccess = function( event ) {\n // extract the endpoint object from the event:\n endpoint = event.target.result;\n\n // if it is the first registration, need to register\n // the 'pushEndpoint' with the UnifiedPush server.\n if ( endpoint.pushEndpoint ) {\n // assemble the metadata for registration with the UnifiedPush server\n var metadata = {\n deviceToken: mailEndpoint.channelID,\n simplePushEndpoint: mailEndpoint.pushEndpoint\n };\n\n var settings = {\n success: function() {\n //success handler\n alert('Success')\n },\n error: function() {\n //error handler\n }\n };\n\n settings.metadata = metadata;\n\n // register with the server\n UPClient.registerWithPushServer(settings);\n } else {\n console.log(\"'Endpoint' was already registered!\");\n }\n };\n // set the notification handler:\n navigator.setMessageHandler( \"push\", function( message ) {\n if ( message.channelID === mailEndpoint.channelID ) {\n // let's react on the endpoint\n }\n });\n }", "function startServer(){\n listDevices.startAttendaceServer(UserName);\n startMessageServer();\n console.log('did');\n}", "function ConnectToDevice(address) {\n\n var tmpAddress = address;\n Mobile('Connect').callNative(address, function (err, port) {\n console.log(\"ConnectToDevice called with port \" + port + \", error: \" + err);\n\n if (err != null && err.length > 0) {\n Mobile('ShowToast').callNative(\"Can not Connect: \" + err, true, function () {\n //callback(arguments);\n });\n }else if (port > 0){\n console.log(\"Starting client socket at : \" + port);\n startClientSocket(port,tmpAddress);\n }\n });\n }", "function init () {\n log.info('Hyperion Remote starting...')\n createSSDPHandler()\n createWebsocketHandler()\n createWindow()\n}", "connectToHost (host, cb) {\n if (host.Host === 'localhost') {\n setImmediate(() => {\n this.client = redis.createClient()\n this.client.on('ready', () => {\n cb()\n })\n })\n } else {\n this.connectToRemoteHost(host, cb)\n }\n }", "function Connect ()\n{\n\tvar DeviceName = GetProjectPartName ();\n\tTargetInterface.message (\"## Connect to \" + DeviceName);\n\tTargetInterface.message (\"## Connect to \" + DeviceName + \" - done\");\n}", "start () {\n\t\tthis._logger.info(`Connecting to ${this.host}...`)\n\t\tthis._params.host = this.host\n\t\tthis._connection.connect(this._params)\n\t\tthis.started = true\n\t}", "function attach_socket() {\n var wsUri = \"ws://\" + window.location.hostname + \"/controller\";\n update_connection_status(\"Connection to \" + wsUri + \" ...\")\n websocket = new WebSocket(wsUri);\n websocket.onopen = function (evt) { onOpen(evt) };\n websocket.onclose = function (evt) { onClose(evt) };\n websocket.onmessage = function (evt) { onMessage(evt) };\n websocket.onerror = function (evt) { onError(evt) };\n}", "function init() {\n\t\t_startBridge(_bridgePort);\n\t}", "initiateConnect(connectedAs) {\n\t\tthis.setState({connectedAs});\n\t\t\n\t\t// now open up the socket to the server\n\t\ttry {\n\t\t\tthis.clientConnection = new clientConnection(connectedAs);\t\t\n\t\t} catch (ex) {\n\t\t\n\t\t}\n\t}", "function preInititiation(){\n\tsignalServer = new WebSocket(signalServerURL); // Set to local websocket for now\n\tsignalServer.binaryType = \"arraybuffer\";\n\n\tvar peerMediaElements = document.getElementById(\"peer-media-banner\");\n\tvar peerMediaDiv = document.createElement(\"div\");\n\tvar peerMediaVideo = document.createElement(\"img\");\n\tpeerMediaVideo.setAttribute(\"class\", \"z-depth-5\");\n\tpeerMediaVideo.setAttribute(\"height\", \"150\");\n\tpeerMediaVideo.src = avatarPath;\n\tpeerMediaVideo.id = \"user-media-\"+peerID;\n\tpeerMediaDiv.setAttribute(\"class\", \"col s4\");\n\tpeerMediaDiv.appendChild(peerMediaVideo);\n\tpeerMediaElements.appendChild(peerMediaDiv);\n\n\t\tif (peerID != senderID){\n\t\t\tcurrentPeer = 0; // Since server ID of the host will always be 0 for a new room\n\t\t\t// addPeer(); // Will resume this function while on the feature of video calling\n\t\t\tconsole.log(\"initiating connection with host peer\")\n\t\t\t// initiatePeerConnection(peerID);\n\t\t}else{\n\t\t\tnavigator.getUserMedia(constraints, function(stream){\n\t\t\t\tlocalStream = stream;\n\t\t\t\tconsole.log(localStream);\n\t\t\t\tgotLocalStream(localStream, currentPeer);\n\t\t\t}, fallbackUserMedia);\n\t\t\tconsole.log(signalServer.readyState);\n\t\t\t// signalServer.send(JSON.stringify({\"addRoom\": true, \"roomID\": peerID}));\n\t\t}\n\t// };\n\t// }, 2000);\n}", "function connect()\r\n {\r\n statusEl.textContent = `Connecting to ${settings.ip}:${settings.port}`;\r\n\r\n ws = new WebSocket(`ws://${settings.ip}:${settings.port}`);\r\n ws.addEventListener('open', e => {\r\n connectionEl.classList.add('active');\r\n statusEl.textContent = `Connected`;\r\n // screenAwaker.enable();\r\n });\r\n ws.addEventListener('close', e => {\r\n connectionEl.classList.remove('active');\r\n statusEl.textContent = `Connection lost: ${e.reason}`;\r\n // screenAwaker.disable();\r\n });\r\n ws.addEventListener('error', e => {\r\n connectionEl.classList.remove('active');\r\n statusEl.textContent = `Connection error`;\r\n setTimeout( connect, 3000 );\r\n });\r\n ws.addEventListener('message', e => {\r\n const msg = JSON.parse(e.data);\r\n if (msg.type === 'settings') {\r\n settings = { ...settings, ...(msg.payload) };\r\n console.log(`Settings: ${settings}`);\r\n }\r\n else if (msg.type === 'flash') {\r\n console.log('Flash');\r\n targetEl.classList.remove('invisible');\r\n setTimeout(hideTarget, settings.duration);\r\n }\r\n });\r\n }", "function setup(){\n\t\n\n\t//Make sure to change the IP\n\tvar ros = new ROSLIB.Ros({\n\t\t//Use the localhost one if running in on the laptop only\n\t\t//Use the local IP if accessing it from tablet\n\t\t\n\t\t//url: 'ws://192.168.0.21:9090'\n\t\turl: 'ws://192.168.8.217:9090'\n\t\t//url: 'ws://192.168.5.159:9090'\n\t\t//url: 'ws://localhost:9090'\n\t\t//url: 'ws://10.120.114.241:9090'\n\t\t//url: 'ws://172.20.10.3:9090'\n\t});\n\n\tros.on('connection',function(){\n\t\tconsole.log('Connecting to websocket server.');\n\t});\n\n\tros.on('error',function(error){\n\t\tconsole.log('Error connecting to websocket server: ', error);\n\t});\n\n\tros.on('close',function(){\n\t\tconsole.log('Connection to websocket closed.');\n\t});\n\n\tmain_topic = new ROSLIB.Topic({\n\t\tros: ros,\n\t\tname: '/Game_MAKI',\n\t\tmessageType: 'std_msgs/String'\n\n\t});\n\n\tstart_breathing();\n}", "connect() {\n this.ws = new WebSocket(this.host);\n this.ws.on('open', this.onConnect.bind(this));\n this.ws.on('close', this.onDisconnect.bind(this));\n this.ws.on('error', this.onError.bind(this));\n }", "function start() {\n\tsocket.connect(port, host);\n}", "function connect_() {\n if (channel) {\n // If there is already an existing channel, close the existing ports.\n channel.port1.close();\n channel.port2.close();\n channel = null;\n }\n\n channel = new MessageChannel();\n window.postMessage(\n PORT_SETUP_MSG, '*' /* target origin */,\n [channel.port2] /* transfer */);\n channel.port1.onmessage = function(event) {\n if (event.data == DISCONNECT_MSG) {\n channel = null;\n }\n try {\n var message = JSON.parse(event.data);\n if (message['id'] && callbackMap_[message['id']]) {\n callbackMap_[message['id']](message);\n delete callbackMap_[message['id']];\n }\n } catch (e) {\n }\n };\n }", "initialiseChat() {\n this.waitForSocketConnection(() => {\n WebSocketInstance.fetchMessages(\n this.props.username,\n this.props.chat.chatId\n );\n });\n WebSocketInstance.connect(this.props.chat.chatId);\n }", "function onhostconnect(err, result) {\n if (err) return fn(err);\n\n var socket = result.socket;\n\n var s = socket;\n if (opts.secureEndpoint) {\n // since the proxy is connecting to an SSL server, we have\n // to upgrade this socket connection to an SSL connection\n if (!tls) tls = __webpack_require__(16);\n opts.socket = socket;\n opts.servername = opts.host;\n opts.host = null;\n opts.hostname = null;\n opts.port = null;\n s = tls.connect(opts);\n }\n\n fn(null, s);\n }", "function ConnectWbemServer(hostName, strClass, dictProperties)\n{\n\tconsole.log(\"ConnectWbemServer hostName=\"+hostName+\" strClass=\"+strClass);\n\n\t// If a machine name given in the XID before \"@\".\n\tif(hostName != \"\" ) {\n\t\tconsole.log(\"ConnectWbemServer: WMI connect to explicit hostName:\"+hostName);\n\t\treturn CreateWbemConnector(hostName);\n\t}\n\n\t// Possibly other cases depending on the class name.\n\tvar wmiHostname = dictProperties[\"Name\"];\n\tconsole.log(\"ConnectWbemServer: strClass=\"+strClass+\" wmiHostname=\"+wmiHostname);\n\tif( ( strClass == \"CIM_ComputerSystem\") && ( ! IsBrowserHostname(wmiHostname) ))\n\t{\n\t\tvar remoteHostname = dictProperties[\"Name\"];\n\t\tconsole.log(\"ConnectWbemServer: WMI connect to CIM_ComputerSystem remoteHostname=\"+remoteHostname);\n\t\treturn CreateWbemConnector(remoteHostname);\n\t}\n\n\tconsole.log(\"ConnectWbemServer: WMI connect local\");\n\treturn CreateWbemConnector(\".\");\n\t//svcWbem = wbemLocat.ConnectServer(\".\", \"root\\\\cimv2\");\n\t//return svcWbem;\n}", "function connect() {\n var target = $(\"#target-id\").val();\n conn = peer.connect(target);\n conn.on(\"open\", function () {\n updateConnectedTo(target);\n prepareMessaging();\n conn.on(\"data\", function (data) {\n displayMessage(data.message, data.timestamp, conn.peer);\n });\n console.log(conn);\n });\n}", "async connect(){\n\t\ttry {\n\t\t\tthis.token = await Global.key('token');\n\t\t\tLogger.info(\"Connecting to Ably message service...\");\n\t\t\tthis.client = new Ably.Realtime({\n\t\t\t\tclientId: Global.mac, \n\t\t\t\ttoken: this.token,\n\t\t\t\tauthUrl: 'https://mystayapp.ngrok.io/devices/v1/tokens', \n\t\t\t\tauthMethod: 'POST',\n\t\t\t\tauthHeaders: {\n\t\t\t\t\t'x-device-id': Global.mac\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Here we are setting up the various listeners for Ably realtime\n\t\t\t// client connection state events:\n\t\t\t// https://ably.com/documentation/realtime/connection\n\t\t\t// These should all be bound to this class in order\n\t\t\t// to call methods on the class itself:\n\n\t\t\tthis.client.connection.on(this.stateChange.bind(this));\n\t\t\tthis.client.connection.on('connected', this.connected.bind(this));\n\t\t\tthis.client.connection.on('disconnected', this.disconnected.bind(this));\n\n\t\t} catch(err){\n\t\t\tLogger.error(err);\n\t\t}\n\t}", "publishMasterHost() {\n this.log.info('Bonjour: Casting Master mode server on port: '+this.settings.WEBSERVER_PORT+' name: '+this.masterServiceName);\n this.mastetService = this.bonjour.publish({ name: this.masterServiceName, type: 'piLaz0rTag', port: this.settings.WEBSERVER_PORT })\n }", "function initiateConnection() {\n localPeer = new Peer();\n localPeer.remoteHandshake = sendHandshakeToRemote;\n\n // Data channels\n localPeer.useDataChannel = true;\n localPeer.dataChannel.outbound_onOpen = outboundChannelStatusChange;\n localPeer.dataChannel.outbound_onClose = outboundChannelStatusChange;\n localPeer.dataChannel.inbound_onMessage = messageFromRemote;\n\n // Initialize for a new connection, including generating an offer\n localPeer.InitializeConnection();\n}", "function connectFHEMserver() {\n logger.info(\"fhem: start connection to fhem server\");\n clearTimeout(reconnectTimeout);\n fhemSocket.connect({ port: params.fhemPort, host: params.fhemHost });\n}", "function connect() {\n if (!started && localStream && channelReady) {\n createPeerConnection();\n started = true;\n peerConn.createOffer(setLocalAndSendMessage, createOfferFailed, mediaConstraints);\n } else {\n alert(\"Local stream not running yet - try again.\");\n }\n}", "function invokeApp() {\n\n const divResult = document.getElementById('result_area');\n divResult.innerHTML = 'invoke';\n\n // --- continue ---\n const port = chrome.runtime.connectNative('kick_ping');\n port.onMessage.addListener((response) => {\n const str = JSON.stringify(response);\n console.log(\"Result: \" + str);\n\n divResult.innerHTML += ('<br>' + str);\n });\n port.onDisconnect.addListener(function() {\n console.log(\"Disconnected\");\n divResult.innerHTML += ('<br>--DISCONNECTED--');\n });\n\n /*--\n // --- onece ---\n const ret = chrome.runtime.sendNativeMessage('kick_ps',\n {},\n function(response) {\n const str = JSON.stringify(response);\n console.log(\"Result: \" + str);\n divResult.innerText = 'result: ' + str;\n }\n );\n console.log('Ret:', ret);\n ---*/\n\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(topic);\n message = new Messaging.Message(\"webClient connected\");\n message.destinationName = topic;\n client.send(message);\n }", "function _init() {\n if (!host) {\n log.error(LOG_PREFIX, 'No hostname provided.');\n return;\n }\n _wsURL = host;\n if ((host.indexOf('ws://') === -1) && (host.indexOf('wss://') === -1)) {\n _wsURL = `ws://${host}`;\n }\n log.init(LOG_PREFIX, _wsURL);\n _connect();\n }", "repickHost() {\n this.host = null;\n var newHostId = Object.keys(this.socketNames)[0];\n this.host = newHostId ? newHostId : null;\n }", "connect() {\n this.hub = signalhub(this.channel, [ CONSTANTS.SIGNAL_SERVER ]);\n this.sw = swarm(this.hub, this.options);\n }", "connect(connectCallback) {\n if (typeof connectCallback === 'function') {\n this.once('connect', () => {\n this.logger.debug(\n {\n tnx: 'smtp'\n },\n 'SMTP handshake finished'\n );\n connectCallback();\n });\n\n const isDestroyedMessage = this._isDestroyedMessage('connect');\n if (isDestroyedMessage) {\n return connectCallback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'CONN'));\n }\n }\n\n let opts = {\n port: this.port,\n host: this.host,\n allowInternalNetworkInterfaces: this.allowInternalNetworkInterfaces,\n timeout: this.options.dnsTimeout || DNS_TIMEOUT\n };\n\n if (this.options.localAddress) {\n opts.localAddress = this.options.localAddress;\n }\n\n let setupConnectionHandlers = () => {\n this._connectionTimeout = setTimeout(() => {\n this._onError('Connection timeout', 'ETIMEDOUT', false, 'CONN');\n }, this.options.connectionTimeout || CONNECTION_TIMEOUT);\n\n this._socket.on('error', this._onSocketError);\n };\n\n if (this.options.connection) {\n // connection is already opened\n this._socket = this.options.connection;\n if (this.secureConnection && !this.alreadySecured) {\n setImmediate(() =>\n this._upgradeConnection(err => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'CONN');\n return;\n }\n this._onConnect();\n })\n );\n } else {\n setImmediate(() => this._onConnect());\n }\n return;\n } else if (this.options.socket) {\n // socket object is set up but not yet connected\n this._socket = this.options.socket;\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket.connect(this.port, this.host, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else if (this.secureConnection) {\n // connect using tls\n if (this.options.tls) {\n Object.keys(this.options.tls).forEach(key => {\n opts[key] = this.options.tls[key];\n });\n }\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = tls.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else {\n // connect using plaintext\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved.cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved.cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = net.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n }\n }", "setHostSocketAndNotify(socket) {\n this.hostSocket = socket;\n this.hostSocket.emit('playerBecomeHost', {});\n }", "function connect() {\n \t\t\tvar deferred = _core.Deferred();\n \t\t\tconsole.log(\"Attempting to connect...\");\n \t\t\tvar c = null,\n \t\t\t\tix = -1,\n \t\t\t\thandshakeComplete = false,\n \t\t\t\t_\n\n \t\t\tfunction tryNext() {\n \t\t\t\tix+=1;\n \t\t\t\tif (ix < _preferredClients.length) {\n\n \t\t\t\t\tc = new _preferredClients[ix].class(_preferredClients[ix].name);\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\tc.start(_uri, settings.hubs, {\n \t\t\t\t\t\tparseMessage : parseMessage,\n \t\t\t\t\t\tconnectionId : _connection ? _connection.getConnectionId() : null\n \t\t\t\t\t})\n \t\t\t\t\t\t.done(function(e) {\n\n \t\t\t\t\t\t\tconsole.warn(\"CONNECTION STABLISHED!\")\n\n \t\t\t\t\t\t\tc.onclose = function() {\n \t\t\t\t\t\t\t\tconsole.error(\"Connection was lost!!!! NOOOO!\");\n \t\t\t\t\t\t\t};\n\n \t\t\t\t\t\t\tif (_connection) {\n \t\t\t\t\t\t\t\tconsole.warn(\"[OOAOAAO] An existing connection exists! MÖÖÖRGE!\");\n \t\t\t\t\t\t\t}\n\n \t\t\t\t\t\t\t/// Connection successful.\n \t\t\t\t\t\t\t/// Hand over the connection lifecycle to a new OringConnection\n \t\t\t\t\t\t\t_connection = Object.create(OringConnection);\n \t\t\t\t\t\t\t_connection.onclose = function() {\n \t\t\t\t\t\t\t\tconsole.warn(\"_connection closed\");\n \t\t\t\t\t\t\t\tsetTimeout(connect, 50);\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t_connection.start(c, function(context) {\n \t\t\t\t\t\t\t\tconsole.warn(\"context\", context);\n \t\t\t\t\t\t\t\tdeferred.resolve(context);\n \t\t\t\t\t\t\t});\t\n\n \t\t\t\t\t\t\tif (e.message) {\n \t\t\t\t\t\t\t\t_connection.onmessage(e.message);\n \t\t\t\t\t\t\t}\n\n \t\t\t\t\t\t})\n \t\t\t\t\t\t.fail(function() {\n \t\t\t\t\t\t\tconsole.warn(\"Noo, \" + _preferredClients[ix].name + \" failed\");\n \t\t\t\t\t\t\ttryNext();\n \t\t\t\t\t\t});\n\n \t\t\t\t} else {\n \t\t\t\t\tconsole.log(\"All connection attempts failed. Will soon retry...\");\n \t\t\t\t\tdeferred.reject();\n \t\t\t\t}\n \t\t\t}\n\n \t\t\ttryNext();\n\n \t\t\treturn deferred.promise();\n \t}", "start() {\n this.setupDoorbellSocket();\n this.setupMQTT();\n this.initLogin();\n }", "connect(connectCallback) {\n if (typeof connectCallback === 'function') {\n this.once('connect', () => {\n this.logger.debug(\n {\n tnx: 'smtp'\n },\n 'SMTP handshake finished'\n );\n connectCallback();\n });\n\n const isDestroyedMessage = this._isDestroyedMessage('connect');\n if (isDestroyedMessage) {\n return connectCallback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'CONN'));\n }\n }\n\n let opts = {\n port: this.port,\n host: this.host\n };\n\n if (this.options.localAddress) {\n opts.localAddress = this.options.localAddress;\n }\n\n let setupConnectionHandlers = () => {\n this._connectionTimeout = setTimeout(() => {\n this._onError('Connection timeout', 'ETIMEDOUT', false, 'CONN');\n }, this.options.connectionTimeout || CONNECTION_TIMEOUT);\n\n this._socket.on('error', this._onSocketError);\n };\n\n if (this.options.connection) {\n // connection is already opened\n this._socket = this.options.connection;\n if (this.secureConnection && !this.alreadySecured) {\n setImmediate(() =>\n this._upgradeConnection(err => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'CONN');\n return;\n }\n this._onConnect();\n })\n );\n } else {\n setImmediate(() => this._onConnect());\n }\n return;\n } else if (this.options.socket) {\n // socket object is set up but not yet connected\n this._socket = this.options.socket;\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved._cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved._cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket.connect(this.port, this.host, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else if (this.secureConnection) {\n // connect using tls\n if (this.options.tls) {\n Object.keys(this.options.tls).forEach(key => {\n opts[key] = this.options.tls[key];\n });\n }\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved._cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved._cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = tls.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else {\n // connect using plaintext\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved._cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved._cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = net.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n }\n }", "connect(connectCallback) {\n if (typeof connectCallback === 'function') {\n this.once('connect', () => {\n this.logger.debug(\n {\n tnx: 'smtp'\n },\n 'SMTP handshake finished'\n );\n connectCallback();\n });\n\n const isDestroyedMessage = this._isDestroyedMessage('connect');\n if (isDestroyedMessage) {\n return connectCallback(this._formatError(isDestroyedMessage, 'ECONNECTION', false, 'CONN'));\n }\n }\n\n let opts = {\n port: this.port,\n host: this.host\n };\n\n if (this.options.localAddress) {\n opts.localAddress = this.options.localAddress;\n }\n\n let setupConnectionHandlers = () => {\n this._connectionTimeout = setTimeout(() => {\n this._onError('Connection timeout', 'ETIMEDOUT', false, 'CONN');\n }, this.options.connectionTimeout || CONNECTION_TIMEOUT);\n\n this._socket.on('error', this._onSocketError);\n };\n\n if (this.options.connection) {\n // connection is already opened\n this._socket = this.options.connection;\n if (this.secureConnection && !this.alreadySecured) {\n setImmediate(() =>\n this._upgradeConnection(err => {\n if (err) {\n this._onError(new Error('Error initiating TLS - ' + (err.message || err)), 'ETLS', false, 'CONN');\n return;\n }\n this._onConnect();\n })\n );\n } else {\n setImmediate(() => this._onConnect());\n }\n return;\n } else if (this.options.socket) {\n // socket object is set up but not yet connected\n this._socket = this.options.socket;\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved._cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved._cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket.connect(this.port, this.host, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else if (this.secureConnection) {\n // connect using tls\n if (this.options.tls) {\n Object.keys(this.options.tls).forEach(key => {\n opts[key] = this.options.tls[key];\n });\n }\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved._cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved._cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = tls.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n } else {\n // connect using plaintext\n return shared.resolveHostname(opts, (err, resolved) => {\n if (err) {\n return setImmediate(() => this._onError(err, 'EDNS', false, 'CONN'));\n }\n this.logger.debug(\n {\n tnx: 'dns',\n source: opts.host,\n resolved: resolved.host,\n cached: !!resolved._cached\n },\n 'Resolved %s as %s [cache %s]',\n opts.host,\n resolved.host,\n resolved._cached ? 'hit' : 'miss'\n );\n Object.keys(resolved).forEach(key => {\n if (key.charAt(0) !== '_' && resolved[key]) {\n opts[key] = resolved[key];\n }\n });\n try {\n this._socket = net.connect(opts, () => {\n this._socket.setKeepAlive(true);\n this._onConnect();\n });\n setupConnectionHandlers();\n } catch (E) {\n return setImmediate(() => this._onError(E, 'ECONNECTION', false, 'CONN'));\n }\n });\n }\n }", "function makeConnection () {\n console.log('makeConnection');\n client.connect(port, host);\n }", "connect() {\n window.addEventListener('message', this.onConnectionMessageHandler);\n }", "function sendNativeMessage(message) {\n // If port is open, send message\n if (port) {\n port.postMessage(message);\n console.log(\"Sent message: \" + JSON.stringify(message));\n }\n // Else, start up a connection and then send the message\n else {\n connect();\n port.postMessage(message);\n console.log(\"Sent message: \" + JSON.stringify(message));\n }\n}", "function passConnect(host, num) {\n console.log('Create new primary connection to ' + host + ' with ' + num);\n wsList[num] = new WebSocketHandler(host, num);\n wsList[num].connect();\n nextPrimaryCon = num;\n console.log('Make ' + num + 'as next primaryCon');\n /*\n * Closing privious primary connection mayn't a good idea, coz player\n * doesn't quite from that location immediately\n */\n}", "function java_socket_bridge_ready(){\n\tjava_socket_bridge_ready_flag = true;\n}", "connect() {\n throw new Error(\n 'The Message Bus is not currently supported in browser environments'\n );\n }", "async _start() {\n const options = {\n host: this.host,\n port: this.port,\n secure: this.secure,\n useHostName: this.useHostName,\n alterPath: this.alterPath\n };\n try {\n // fetch the WebSocket debugger URL\n const url = await this._fetchDebuggerURL(options);\n // allow the user to alter the URL\n const urlObject = parseUrl(url);\n urlObject.pathname = options.alterPath(urlObject.pathname);\n this.webSocketUrl = formatUrl(urlObject);\n // update the connection parameters using the debugging URL\n options.host = urlObject.hostname;\n options.port = urlObject.port || options.port;\n // fetch the protocol and prepare the API\n const protocol = await this._fetchProtocol(options);\n api.prepare(this, protocol);\n // finally connect to the WebSocket\n await this._connectToWebSocket();\n // since the handler is executed synchronously, the emit() must be\n // performed in the next tick so that uncaught errors in the client code\n // are not intercepted by the Promise mechanism and therefore reported\n // via the 'error' event\n process.nextTick(() => {\n this._notifier.emit('connect', this);\n });\n } catch (err) {\n this._notifier.emit('error', err);\n }\n }", "function __init__(host, port, topic, ssl) {\n\t\t// Once a connection has been made, make a subscription and send a message.\n\t\tvar tmp_timeout;\n\t\ttry {\n\t\t\tif (tmp_timeout) {\n\t\t\t\tclearTimeout(tmp_timeout);\n\t\t\t}\n\t\t\tvar clientID = 'iot-' + uuid('hex');\n\t\t\tvar client = new Paho.MQTT.Client(host, Number(port), clientID);\n\t\t\tvar options = {\n\t\t\t\tuseSSL: ssl,\n\t\t\t\ttimeout: 60,\n\t\t\t\tuserName: 'notify',\n\t\t\t\tpassword: 'abcd@123456',\n\t\t\t\tcleanSession: true,\n\t\t\t\tonSuccess: function () {\n\t\t\t\t\tclient.subscribe(topic);\n\t\t\t\t},\n\t\t\t\tonFailure: doFail\n\t\t\t};\n\t\t\tclient.onConnectionLost = onConnectionLost;\n\t\t\tclient.onMessageArrived = onMessageArrived;\n\t\t\tclient.connect(options);\n\t\t} catch (e) {\n\t\t\tsetTimeout(function () {\n\t\t\t\t__init__(host, port);\n\t\t\t}, 10000);\n\t\t}\n\t}", "function connect(host) {\n if (websocket === undefined) {\n websocket = new WebSocket(host);\n }\n\n websocket.onopen = function() {\n // chrome.storage.local.get([\"username\"], function(data) {\n // websocket.send(JSON.stringify({userLoginId: data.username}));\n // });\n\n data = {\n\t\t \"method\":\"SUBSCRIBE\",\n\t\t \"params\": [\n\t\t \"rvnusdt@aggTrade\",\n\t\t \"shibusdt@aggTrade\",\n\t\t \"dogeusdt@aggTrade\",\n\t\t \"btcusdt@aggTrade\",\n\t\t \"beamusdt@aggTrade\"\n\t\t ],\n\t\t \"id\": id\n\t\t};\n\t\twebsocket.send(JSON.stringify(data)); //将消息发送到服务端\n };\n\n websocket.onmessage = function (event) {\n // var received_msg = JSON.parse(event.data);\n // var demoNotificationOptions = {\n // type: \"basic\",\n // title: received_msg.subject,\n // message: received_msg.message,\n // iconUrl: \"images/demo-icon.png\"\n // }\n data = JSON.parse(event.data);\n var sendData = {\n };\n\t\tif (data.s == 'SHIBUSDT') {\n\t\t\tsendData.coin = \"SHIB\";\n\t\t\tsendData.price = data.p;\n\t\t\t// $('#shib').html(data.p);\n\t\t}\n\t\tif (data.s == 'RVNUSDT') {\n\t\t\tsendData.coin = \"RVN\";\n\t\t\tsendData.price = data.p;\n\t\t\t// $('#rvn').html(data.p);\n\t\t}\n\t\tif (data.s == 'DOGEUSDT') {\n\t\t\tsendData.coin = \"DOGE\";\n\t\t\tsendData.price = data.p;\n\t\t\t// $('#rvn').html(data.p);\n\t\t}\n\t\tif (data.s == 'BTCUSDT') {\n\t\t\tsendData.coin = \"BTC\";\n\t\t\tsendData.price = data.p;\n\t\t\t// $('#rvn').html(data.p);\n\t\t}\n\t\tif (data.s == 'BEAMUSDT') {\n\t\t\tsendData.coin = \"BEAM\";\n\t\t\tsendData.price = data.p;\n\t\t\t// $('#rvn').html(data.p);\n\t\t}\n\t\t// chrome.tabs.query({active: true, currentWindow: true}, function(tabs){\n\t\t// chrome.tabs.sendMessage(tabs[0].id, {action: sendData}, function(response) {}); \n\t\t// });\n\t\t\n\t\t// chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n\t\t// chrome.tabs.sendMessage(tabs[0].id, sendData, function(response) { });\n\t\t// });\n\n\t\t// alert(JSON.stringify(sendData));\n\t\tvar port = chrome.runtime.connect({name: \"coinStatus\"});//通道名称\n\t\tport.onDisconnect.addListener(function() {\n\t var ignoreError = chrome.runtime.lastError;\n\t console.log(\"onDisconnect\");\n });\n\n\t\tport.postMessage(sendData);//发送消息\n\t\t// port.onMessage.addListener(function(msg) {//监听消息\n\t\t// \tconsole.log(msg);\n\t\t// // if (msg.question == \"Who's there?\")\n\t\t// // port.postMessage({answer: \"yisheng\"});\n\t\t// // else if (msg.question == \"Madame who?\")\n\t\t// // port.postMessage({answer: \"Madame... Bovary\"});\n\t\t// });\n\t\t// chrome.runtime.onMessage.addListener(function (request,sender,callback) {\n\t\t// \tconsole.log(request);\n\t\t// \tconsole.log(sender);\n\t\t// callback(sendData);\n\t\t// });\n\t\t// chrome.notifications.create(\"\", sendData);\n // updateData();\n };\n\n //If the websocket is closed but the session is still active, create new connection again\n websocket.onclose = function() {\n \treq = {\n\t\t \"method\": \"UNSUBSCRIBE\",\n\t\t \"params\": [\n\t\t \"rvnusdt@aggTrade\",\n\t\t \"shibusdt@aggTrade\",\n\t\t \"dogeusdt@aggTrade\",\n\t\t \"btcusdt@aggTrade\",\n\t\t \"beamusdt@aggTrade\"\n\t\t ],\n\t\t \"id\": id\n\t\t}\n\t\twebsocket.send(JSON.stringify(data));\n websocket = undefined;\n chrome.storage.local.get(['demo_session'], function(data) {\n if (data.demo_session) {\n createWebSocketConnection();\n }\n });\n };\n}", "connect() {\n log.info('connection constructing.');\n const WebSocketServer = WebSocket.Server;\n const wss = new WebSocketServer({\n port: PORT\n });\n\n wss.on('connection', (ws) => {\n log.info('connection established.');\n this.ws = ws;\n ws.on('message', this.handleMessage);\n });\n\n listener.subscribe('_send', this.send.bind(this));\n }", "async connect () {\n try {\n await new Promise((resolve, reject) => {\n if (this.connection.destroyed) reject(new Error('The socket is destroyed.'));\n\n const onError = err => {\n this.connection.off('error', onError);\n this.connection.off('connect', onConnected);\n reject(err);\n };\n \n const onConnected = () => {\n this.connection.off('error', onError);\n this.connection.off('connect', onConnected);\n resolve();\n };\n \n this.connection.once('error', onError);\n this.connection.once('connect', onConnected);\n\n const { host, port } = core.settings.get('remote')\n this.connection.connect({\n host, \n port, \n rejectUnauthorized: false\n });\n });\n\n this._initialize()\n\n this.connection.on('data', data => this._connectionProtocol.chuck(data))\n this.connection.once('close', () => this.disconnect())\n } catch (error) {\n core.console.showMessage({\n message: `Failed connecting to the remote host. ${error.message}.`,\n withStatus: true,\n type: 'error'\n })\n }\n }", "function ConnectToServer () {\n Network.Connect(\"127.0.0.1\", 25000);\n}", "function connectionOpen() {\n //socket.send(\"Connection with Server. Подключение установлено обоюдно, отлично!\");\n console.log(\"Connected\");\n main();\n}", "function start() {\n // TEST - TODO turn off when not testing\n //if(document.domain==\"localhost\"){websock = new WebSocket('ws://10.203.1.197/ws');}\n if (document.domain == \"localhost\"){websock = new WebSocket('ws://10.203.1.23/ws')}\n else { \n websock = new WebSocket('ws://' + window.location.hostname + '/ws'); \n };\n\n websock.onopen = function(evt) { \n console.log('websock open'); \n };\n websock.onclose = function(evt) { \n console.log('websock close'); \n alert(\"This control panel is no longer connected to the device. Please close this window and reopen the control panel.\");\n return 0;\n }; \n websock.onerror = function (evt) { console.log(evt); };\n websock.onmessage = function (evt) {\n\n var payload = evt.data;\n if (payload.indexOf(\"~*~*\") < 0) {\n if (payload.indexOf('{\"fishyDevices\"') == 0) {\n processJSON(payload);\n } else {\n console.log(payload);\n }\n } else {\n dealWithMessagePayload(payload);\n }\n };\n}", "function proxyRemoteConnect() {\n client.proxyBusObject = new ClientBusObject(client.busAtt, OBJECT_PATH);\n client.proxyBusObject.proxyBusObject.introspectRemoteObjectAsync(null).then(function (introResult) {\n if (AllJoyn.QStatus.er_OK == introResult.status) {\n OutputLine(\"Introspection of the service bus object was successful.\");\n client.proxyBusObject.callPingMethod();\n } else {\n OutputLine(\"Introspection of the service bus object was unsuccessful.\");\n client.busAtt.leaveSession(sessionId);\n }\n });\n }", "connect() {\n\t\tthis.log.info('webOS - connected to TV');\n\t\tthis.getTvInformation();\n\t\tthis.connected = true;\n\t\tthis.subscribeToServices();\n\t}", "connectToRemoteHost (host, cb) {\n let config = {\n host: host.Hostname,\n dstPort: DST_PORT,\n localPort: LOCAL_PORT,\n username: host.User,\n agent: process.env.SSH_AUTH_SOCK\n }\n this.tunnel = tunnel(config, (err) => {\n if (err) return cb(err)\n this.client = redis.createClient(config.localPort)\n this.client.on('ready', () => {\n cb()\n })\n })\n }", "async connect() {\n /* Connect to the database and to Redis */\n this._publisher = redis.createClient(this._options.redisOptions);\n this._subscriber = redis.createClient(this._options.redisOptions);\n this._publisher.on(\"error\", e => {\n console.error(\"Error \" + e);\n });\n this._subscriber.on(\"error\", e => {\n console.error(\"Error \" + e);\n });\n debug('Connected to Redis.');\n\n /* Connect to MongoDB */\n this._db = await MoxLtHome._connectToDb(this._options.dbConnectionString);\n debug('Connected to MongoDB.');\n\n /* Fetch the relevant house */\n this._house = await House.findOne({ _id: this._options.homeId });\n if (!this._house) {\n this._db.close();\n this._publisher.quit();\n throw new Error('Could not find the house with the ID ' + this._options.homeId + '. Did you set it up using MoxLtHome::createHome()?');\n }\n\n debug('Fetched house (id = ' + this._options.homeId + '): ' + this._house.name);\n \n /* Create MOX client */\n this._client = new MoxLtClient(\n /* clientIpAddress: */ this._house.clientIpAddress || \"\",\n /* clientPort: */ this._house.clientPort || 6666,\n /* serverIpAddress: */ this._house.serverIpAddress,\n /* serverPort: */ this._house.serverPort\n );\n this._client.on('received', this._resolveMessage.bind(this));\n await this._client.connect();\n debug('Connected to MOX Server.');\n\n /* Schedule an updater task to update the state of our devices */\n this._updaterTask = setInterval(this._updateInvalidatedAccessories.bind(this), MoxLtHome.STATUS_UPDATE_INTERVAL);\n\n /* Subscribe to Redis events */\n this._subscriber.on(\"message\", this._handleRedisMessage.bind(this));\n this._subscriber.subscribe(PubSubEvents.SERVER_SUB_INTERACT);\n\n /* Publish events */\n this.emit('connect');\n this._publisher.publish(PubSubEvents.SERVER_PUB_CONNECTED, JSON.stringify(this._options.homeId));\n }", "function connect(msg)\n{\n reset();\n if (msg)\n {\n connectMsg = msg;\n }\n chrome.hid.getDevices(device_info, onDeviceFound);\n}", "function setup() {\n // server.authenticate = authenticate;\n // server.authorizePublish = authorizePublish;\n // server.authorizeSubscribe = authorizeSubscribe;\n log.info('Mosca server is up and running on '+env.mhost+':'+env.mport+' for mqtt and '+env.mhost+':'+env.hport+' for websocket');\n\n}", "function start() {\n // in case we fail over to a new server,\n // listen for wsock-open events\n openListener = wss.addOpenListener(wsOpen);\n wss.sendEvent('topo2Start');\n $log.debug('topo2 comms started');\n }", "function setupSockets() {\r\n\t\tgame = gameEngine.returnSystem( 'game' );\r\n\t\t\r\n\t\tplayerShip = game.returnShip( shipId );\r\n\t\t\r\n\t\ttoken = {};\r\n\t\ttoken.name = playerShip['displayName'];\r\n\t\ttoken.game = 0;\r\n\t\ttoken.ship = playerShip['id'];\r\n\t\t\r\n\t\tsocket = connectToServer();\r\n\t\t\r\n\t\tif(socket !== undefined) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tsetupSocketTransfers();\t\t\t\r\n\t\t\t}, 1500);\r\n\t\t} else {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tsocket = finishConnection();\r\n\t\t\t\tsetupSocketTransfers();\r\n\t\t\t}, 1500);\r\n\t\t}\r\n\t}", "function connectionInitialzation(opts, connection, attributes){\n\n var connID = connection.id;\n\n debug(\"Initializing IPC Subscription!!!\", core.uuid, opts.groups, connID);\n\n attributes.force(\"ipc\");\n\n connection.symbolicOwners = {};\n redisClient.incr(\"totalCurrentCount\");\n addRoute(\"ntvMsg\"+connID, \"NTV:\"+connID+\":MSG\", handleMessageToNativeConnection);\n\n redisClient.hset(\"samsaara:connectionOwners\", connID, core.uuid, function (err, reply){\n attributes.initialized(null, \"ipc\");\n }); \n}", "start() {\n // maybe add routine for removing old messages still in queue to avoid backup\n // on catastrophic neighbor failures\n var node = this._node;\n this._active = true;\n this._connecting = true;\n this._ipc.connectToNet(node.id(), node.host(), node.port());\n this._ipc.of[node.id()].on(\"connect\", this._handleConnect.bind(this));\n this._ipc.of[node.id()].on(\"disconnect\", this._handleDisconnect.bind(this));\n }", "function bt_OnConnect(ok) {\n if (!ok) {\n console.log(\"BT ERROR!\");\n bt.Connect(\"HC-05\"); // Try to reconnect again\n } else if (ok)\n console.log(\"BT Successful\");\n}", "function doConnect() {\n\t\tif (typeof(name) == null) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (io !== undefined) {\n\t\t\t\tsocket = io.connect('ws://'+host+':'+port+'/');\n\t\t\t\tsynSocketID();\n\t\t\t\tsocket.on('connect', function (evt) { \n\t\t\t\t\tconsole.log(\"Connection opened\");\n\t\t\t\t\tonOpen(evt);\n\t\t\t\t\tsocket.on('disconnect', function (evt) { onDisconnect(evt) });\n\t\t\t\t\tsocket.on('message', function (evt) { onMessage(evt) });\n\t\t\t\t\tsocket.on('error', function (evt) { onError(evt) });\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t$('.connectionState').text(\"Not connected\");\n\t\t\t$('.connectionState').removeClass('connected');\n\t\t}\n\t}", "_onConnect () {\n this._ble.startNotifications(\n BoostBLE.service,\n BoostBLE.characteristic,\n this._onMessage\n );\n this._pingDeviceId = window.setInterval(this._pingDevice, BoostPingInterval);\n\n // Send a request for firmware version.\n setTimeout(() => {\n const command = [\n 0x00, // Hub ID\n BoostMessage.HUB_PROPERTIES,\n BoostHubProperty.FW_VERSION,\n BoostHubPropertyOperation.REQUEST_UPDATE\n ];\n command.unshift(command.length + 1);\n this.send(BoostBLE.characteristic, command, false);\n }, 500);\n\n }", "function BonjourPlugin() {\n }", "start(cb) {\n let app = require('../pomelo').app;\n let self = this;\n\n let gensocket = function(socket) {\n let hybridsocket = new HybridSocket(curId++, socket);\n hybridsocket.on('handshake', self.handshake.handle.bind(self.handshake, hybridsocket));\n hybridsocket.on('heartbeat', self.heartbeat.handle.bind(self.heartbeat, hybridsocket));\n hybridsocket.on('disconnect', self.heartbeat.clear.bind(self.heartbeat, hybridsocket.id));\n hybridsocket.on('closing', Kick.handle.bind(null, hybridsocket));\n self.emit('connection', hybridsocket);\n };\n\n this.connector = app.components.__connector__.connector;\n this.dictionary = app.components.__dictionary__;\n this.protobuf = app.components.__protobuf__;\n this.decodeIO_protobuf = app.components.__decodeIO__protobuf__;\n\n if(!this.ssl) {\n this.listeningServer = net.createServer();\n } else {\n this.listeningServer = tls.createServer(this.ssl);\n }\n this.switcher = new Switcher(this.listeningServer, self.opts);\n\n this.switcher.on('connection', function(socket) {\n gensocket(socket);\n });\n\n if(!!this.distinctHost) {\n this.listeningServer.listen(this.port, this.host);\n } else {\n this.listeningServer.listen(this.port);\n }\n\n process.nextTick(cb);\n }", "function _initialise(ipAdress, port) {\n console.log(\"STM ARM Client initialisation...\");\n\n ipAdress = ipAdress.split(\" \").join(\"\");\n armClient.connect(port, ipAdress, function() {\n console.log(\"\\nSTM ARM Client connected on \" + ipAdress + \":\" + port);\n });\n armClient.on(\"error\", function(err) {\n console.error(err);\n });\n}", "connect() {\n if (this.status !== Constants.VoiceStatus.RECONNECTING) {\n if (this.sockets.ws) throw new Error('There is already an existing WebSocket connection.');\n if (this.sockets.udp) throw new Error('There is already an existing UDP connection.');\n }\n\n if (this.sockets.ws) this.sockets.ws.shutdown();\n if (this.sockets.udp) this.sockets.udp.shutdown();\n\n this.sockets.ws = new VoiceWebSocket(this);\n this.sockets.udp = new VoiceUDP(this);\n\n const { ws, udp } = this.sockets;\n\n ws.on('error', err => this.emit('error', err));\n udp.on('error', err => this.emit('error', err));\n ws.on('ready', this.onReady.bind(this));\n ws.on('sessionDescription', this.onSessionDescription.bind(this));\n ws.on('startSpeaking', this.onStartSpeaking.bind(this));\n }", "function CreateWbemConnector(hostName){\n\tconsole.log(\"CreateWbemConnector hostName=\"+hostName);\n\treturn {\n\t\tm_hostLocat: hostName,\n\t\tm_funcLocat: function() {\n\t\t\t// This object is a Microsoft extension and is supported in Internet Explorer only,\n\t\t\t// not in Windows 8.x Store apps.\n\t\t\tvar wbemLocat = new ActiveXObject(\"WbemScripting.SWbemLocator\");\n\n\t\t\tif(hostName == \".\") {\n\t\t\t\treturn wbemLocat.ConnectServer(\".\", \"root\\\\cimv2\" );\n\t\t\t} else {\n\t\t\t\tvar userPass = GetUserPass(hostName);\n\t\t\t\treturn wbemLocat.ConnectServer(hostName, \"root\\\\cimv2\", userPass.m_user, userPass.m_pass);\n\t\t\t}\n\t\t}\n\t};\n} // CreateWbemConnector", "function connect() {\n\t\t\tvar deferred = _core.Deferred();\n\t\t\tconsole.log(\"Attempting to connect...\");\n\t\t\tvar c = null,\n\t\t\t\tix = -1,\n\t\t\t\thandshakeComplete = false,\n\t\t\t\t_\n\n\t\t\tfunction tryNext() {\n\t\t\t\tix+=1;\n\t\t\t\tif (ix < _preferredClients.length) {\n\n\t\t\t\t\tc = new _preferredClients[ix].class(_preferredClients[ix].name);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tc.start(_uri, settings.hubs, {\n\t\t\t\t\t\tparseMessage : parseMessage,\n\t\t\t\t\t\tconnectionId : _connection ? _connection.getConnectionId() : null\n\t\t\t\t\t})\n\t\t\t\t\t\t.done(function(e) {\n\n\t\t\t\t\t\t\tconsole.warn(\"CONNECTION STABLISHED!\")\n\n\t\t\t\t\t\t\tc.onclose = function() {\n\t\t\t\t\t\t\t\tconsole.error(\"Connection was lost!!!! NOOOO!\");\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tif (_connection) {\n\t\t\t\t\t\t\t\tconsole.warn(\"[OOAOAAO] An existing connection exists! MÖÖÖRGE!\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/// Connection successful.\n\t\t\t\t\t\t\t/// Hand over the connection lifecycle to a new OringConnection\n\t\t\t\t\t\t\t_connection = Object.create(OringConnection);\n\t\t\t\t\t\t\t_connection.onclose = function() {\n\t\t\t\t\t\t\t\tconsole.warn(\"_connection closed\");\n\t\t\t\t\t\t\t\tsetTimeout(connect, 50);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_connection.start(c, function(context) {\n\t\t\t\t\t\t\t\tconsole.warn(\"context\", context);\n\t\t\t\t\t\t\t\tdeferred.resolve(context);\n\t\t\t\t\t\t\t});\t\n\n\t\t\t\t\t\t\tif (e.message) {\n\t\t\t\t\t\t\t\t_connection.onmessage(e.message);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail(function() {\n\t\t\t\t\t\t\tconsole.warn(\"Noo, \" + _preferredClients[ix].name + \" failed\");\n\t\t\t\t\t\t\ttryNext();\n\t\t\t\t\t\t});\n\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"All connection attempts failed. Will soon retry...\");\n\t\t\t\t\tdeferred.reject();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttryNext();\n\n\t\t\treturn deferred.promise();\n\t}", "wsConnect() {\n\n\t\tconst socketUrl = 'ws://localhost:8989/ws';\n\t\t// const socketUrl = 'ws://192.168.1.68:8888/ws';\n\t\t// const socketUrl = 'ws://192.168.1.68:8888/ws';\n\n\t\tthis.SPJS.ws = new WebSocket(socketUrl);\n\n\t\tthis.SPJS.ws.onopen = () => this.onSpjsOpen();\n\t\tthis.SPJS.ws.onmessage = evt => this.onSpjsMessage(evt.data);\n\t\tthis.SPJS.ws.onerror = error => this.onSpjsError(error);\n\t\tthis.SPJS.ws.onclose = () => this.onSpjsClose();\n\n\t}", "__broker_setup() {\n this.mqttServer.authenticate = this.__broker_auth;\n this.mqttServer.authorizePublish = this.__broker_allow_pub;\n this.mqttServer.authorizeSubscribe = this.__broker_allow_sub;\n this.mqttServer.on('clientConnected', this.__broker_connected);\n this.mqttServer.on('published', this.__broker_published);\n this.mqttServer.on('subscribed', this.__broker_subscribed);\n this.mqttServer.on('unsubscribed', this.__broker_unsubscribed); \n this.mqttServer.on('clientDisconnecting', this.__broker_disconnecting);\n this.mqttServer.on('clientDisconnected', this.__broker_disconnected);\n if (this.readyCallback != null) {\n this.readyCallback(); // indicates that we are ready\n }\n console.log('[MQTT] Mosca server is up and running on port ' + this.mqttPort);\n }", "function initWebSocket() {\n var gateway = `ws://${window.location.hostname}/ws`;\n console.log(gateway)\n websocket = new WebSocket(gateway);\n websocket.onopen = onWebSocketOpen;\n websocket.onclose = onWebSocketClose;\n websocket.onmessage = onWebSocketMessage;\n}", "function attach ( connection, socket ) \n{\n\tvar self = connection;\n\n\tself.hssSocket = socket;\n\tself.name = \"hss:\"+socket.remoteAddress;\n\n\t\n\tsocket.on('error', function () {\n\t\tself.onRemoteClose ();\n\t});\n\n\tsocket.on('end', function () {\n\t\tself.onRemoteClose ();\n\t});\n\n\tself.readyToSend = function () {\n\t\treturn !!socket;\n\t}\n\n\tself.send = function ( msg ) {\n\t\tvar content = new Buffer( JSON.stringify( msg ) );\n\t\tvar header = new Buffer( 4 );\n\n\t\theader.writeUInt32BE( content.length, 0 );\n\t\tsocket.write( Buffer.concat( [ header, content ] ) );\n\n\n\n\t\treturn true;\n\t}\n\n\tself._close = function () {\n\t\tif ( socket )\n\t\t\tsocket.destroy();\n\t\tsocket = null;\n\t}\n\n\n\tself.attach ();\n\t//console.log ( self.name, 'Accepted HSS connection' );\n\n\tself.push();\n}", "function connect() {\n\tif(!conn || !conn.connected) {\n\t\tclient.connect('ws://'+ config.address + ':' + config.port + '/', 'echo-protocol');\n\t}\n}", "function connect(){\n connection.connect(function(err) {\n // console.log(\"connected as id \" + connection.threadId);\n if (err) throw err;\n });\n }", "function connect(){\n connection.connect(function(err) {\n // console.log(\"connected as id \" + connection.threadId);\n if (err) throw err;\n });\n }", "connect() {\n if (this.status !== Constants.VoiceStatus.RECONNECTING) {\n if (this.sockets.ws) throw new Error('There is already an existing WebSocket connection.');\n if (this.sockets.udp) throw new Error('There is already an existing UDP connection.');\n }\n\n if (this.sockets.ws) this.sockets.ws.shutdown();\n if (this.sockets.udp) this.sockets.udp.shutdown();\n\n this.sockets.ws = new VoiceWebSocket(this);\n this.sockets.udp = new VoiceUDP(this);\n\n const { ws, udp } = this.sockets;\n\n ws.on('error', err => this.emit('error', err));\n udp.on('error', err => this.emit('error', err));\n ws.on('ready', this.onReady.bind(this));\n ws.on('sessionDescription', this.onSessionDescription.bind(this));\n ws.on('speaking', this.onSpeaking.bind(this));\n }", "function connectCallback() {\n\tclient.publish('JackIOT/yo', 'hello world', publishCallback); // publish a message to a topic, JackIOT/yo\n\tclient.subscribe('JackIOT/yo', clientSub); \n}", "function connect_to_server() {\n\tvar connected = false;\n\tconnect();\n\n\tfunction connect() {\n\t\tvar wsUri = null;\n\t\tif (document.location.protocol === 'https:') {\n\t\t\twsTxt = '[wss]';\n\t\t\twsUri = 'wss://' + document.location.hostname + ':' + document.location.port;\n\t\t} else {\n\t\t\twsUri = 'ws://' + document.location.hostname + ':' + document.location.port;\n\t\t}\n\t\tconsole.log(wsTxt + ' Connecting to websocket', wsUri);\n\n\t\tws = new WebSocket(wsUri);\n\t\tws.onopen = function (evt) { onOpen(evt); };\n\t\tws.onclose = function (evt) { onClose(evt); };\n\t\tws.onmessage = function (evt) { onMessage(evt); };\n\t\tws.onerror = function (evt) { onError(evt); };\n\t}\n\n\tfunction onOpen(evt) {\n\t\tconsole.log(wsTxt + ' CONNECTED');\n\t\taddshow_notification(build_notification(false, 'Connected to Marbles application'), false);\n\t\tconnected = true;\n\t}\n\n\tfunction onClose(evt) {\n\t\tconsole.log(wsTxt + ' DISCONNECTED', evt);\n\t\tconnected = false;\n\t\taddshow_notification(build_notification(true, 'Lost connection to Marbles application'), true);\n\t\tsetTimeout(function () { connect(); }, 5000);\t\t\t\t\t//try again one more time, server restarts are quick\n\t}\n\n\tfunction onMessage(msg) {\n\t\ttry {\n\t\t\tvar msgObj = JSON.parse(msg.data);\n\n\t\t\t//marbles\n\t\t\tif (msgObj.msg === 'everything') {\n\t\t\t\tconsole.log(wsTxt + ' rec', msgObj.msg, msgObj);\n\t\t\t\tclearTimeout(getEverythingWatchdog);\n\t\t\t\tclearTimeout(pendingTransaction);\n\t\t\t\t$('#appStartingText').hide();\n\t\t\t\tclear_trash();\n\t\t\t\tbuild_user_panels(msgObj.everything.owners);\n\t\t\t\tfor (var i in msgObj.everything.marbles) {\n\t\t\t\t\tpopulate_users_marbles(msgObj.everything.marbles[i]);\n\t\t\t\t}\n\n\t\t\t\tstart_up = false;\n\t\t\t\t$('.marblesWrap').each(function () {\n\t\t\t\t\tif ($(this).find('.innerMarbleWrap').find('.ball').length === 0) {\n\t\t\t\t\t\t$(this).find('.noMarblesMsg').show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// block\n\t\t\telse if (msgObj.msg === 'block') {\n\t\t\t\tconsole.log(wsTxt + ' rec', msgObj.msg, ': ledger blockheight', msgObj.block_height);\n\t\t\t\tif (msgObj.block_delay) block_ui_delay = msgObj.block_delay * 2;\t\t\t\t// should be longer than block delay\n\t\t\t\tnew_block(msgObj.block_height);\t\t\t\t\t\t\t\t\t\t\t\t\t// send to blockchain.js\n\t\t\t\t\n\t\t\t\tif ($('#auditContentWrap').is(':visible')) {\n\t\t\t\t\tvar obj = {\n\t\t\t\t\t\ttype: 'audit',\n\t\t\t\t\t\tmarble_id: auditingMarble.id\n\t\t\t\t\t};\n\t\t\t\t\tws.send(JSON.stringify(obj));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//transaction error\n\t\t\telse if (msgObj.msg === 'tx_error') {\n\t\t\t\tconsole.log(wsTxt + ' rec', msgObj.msg, msgObj);\n\t\t\t\tif (msgObj.e) {\n\t\t\t\t\tvar err_msg = (msgObj.e.parsed) ? msgObj.e.parsed : msgObj.e;\n\t\t\t\t\taddshow_notification(build_notification(true, escapeHtml(err_msg)), true);\n\t\t\t\t\t$('#txStoryErrorTxt').html(err_msg);\n\t\t\t\t\t$('#txStoryErrorWrap').show();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//app startup state\n\t\t\telse if (msgObj.msg === 'app_state') {\n\t\t\t\tconsole.log(wsTxt + ' rec', msgObj.msg, msgObj);\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tshow_start_up_step(msgObj);\n\t\t\t\t}, 1000);\n\t\t\t}\n\n\t\t\t//tx state\n\t\t\telse if (msgObj.msg === 'tx_step') {\n\t\t\t\tconsole.log(\"ok2\");\n\t\t\t\tconsole.log(wsTxt + ' rec', msgObj.msg, msgObj);\n\t\t\t\tshow_tx_step(msgObj);\n\t\t\t}\n\n\t\t\t//general error\n\t\t\telse if (msgObj.msg === 'error') {\n\t\t\t\tconsole.log(wsTxt + ' rec', msgObj.msg, msgObj);\n\t\t\t\tif (msgObj.e) {\n\t\t\t\t\taddshow_notification(build_notification(true, escapeHtml(msgObj.e.parsed)), true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'chainstats'){\n\t\t\t\tconsole.log('rec', msgObj.msg, ': ledger blockheight', msgObj.chainstats.height, 'block', msgObj.blockstats.height);\n\t\t\t\tvar e = formatDate(msgObj.blockstats.transactions[0].timestamp.seconds * 1000, '%M/%d/%Y &nbsp;%I:%m%P');\n\t\t\t\t$('#blockdate').html('<span style=\"color:#fff\">TIME</span>&nbsp;&nbsp;' + e + ' UTC');\n\t\t\t\tvar temp = {\n\t\t\t\t\t\t\t\tid: msgObj.blockstats.height, \n\t\t\t\t\t\t\t\tblockstats: msgObj.blockstats\n\t\t\t\t\t\t\t};\n\t\t\t\tnew_block(temp);\t\t\t\t\t\t\t\t//send to blockchain.js\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'new_account'){\n\t\t\t\t$('#user1wrap').append(\"<p>Create [account]:\"+msgObj.ac_id+\" [short name]:\"+msgObj.ac_short_name+\"</p>\");\t\n\t\t\t\ttmp_account='<div id=\"acnoti_'+msgObj.ac_id+'\"><p><span style=\"color:#FF0;\">A new account has been created:</span><br>'+\n\t\t\t\t\"[account]:\"+msgObj.ac_id+\"<br>[short name]:\"+msgObj.ac_short_name+\n\t\t\t\t\"<br>[status]:\"+msgObj.ac_status+\"<br>[term date]:\"+msgObj.term_date+\n\t\t\t\t\"<br>[inception date]:\"+msgObj.inception_date+\"<br>[region]:\"+msgObj.ac_region+\n\t\t\t\t\"<br>[sub region]:\"+msgObj.ac_sub_region+\"<br>[country domicile]:\"+msgObj.cod_country_domicile+\n\t\t\t\t\"<br>[liq method]:\"+msgObj.liq_method+\"<br>[contracting entity]:\"+msgObj.contracting_entity+\n\t\t\t\t\"<br>[mgn entity]:\"+msgObj.mgn_entity+\"<br>[account legal name]:\"+msgObj.ac_legal_name+\n\t\t\t\t\"<br>[manager name]:\"+msgObj.manager_name+\"<br>[cod_ccy_base]:\"+msgObj.cod_ccy_base+\n\t\t\t\t\"<br>[long name]:\"+msgObj.long_name+\"<br>[mandate id]:\"+msgObj.mandate_id+\n\t\t\t\t\"<br>[client id]:\"+msgObj.client_id+\"<br>[custodian name]:\"+msgObj.custodian_name+\n\t\t\t\t\"<br>[sub_mandate_id]:\"+msgObj.sub_mandate_id+\"<br>[transfer_agent_name]:\"+msgObj.transfer_agent_name+\n\t\t\t\t\"<br>[trust_bank]:\"+msgObj.trust_bank+\"<br>[re_trust_bank]:\"+msgObj.re_trust_bank+\n\t\t\t\t\"<br>[last_updated_by]:\"+msgObj.last_updated_by+\"<br>[last_approved_by]:\"+msgObj.last_approved_by+\n\t\t\t\t\"<br>[last_update_date]:\"+msgObj.last_update_date+'</p><button type=\"button\" id=\"del_ac'+msgObj.ac_id+'\">delete</button><hr /></div>';\n\t\t\t\t$('#ac_history').append(tmp_account);\n\t\t\t\t$('#user1wrap').append(\"<p>Create new account:\"+msgObj.ac_id+\" [short name]:\"+msgObj.ac_short_name+\"</p>\");\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'new_ac_trade'){\n\t\t\t\t$('#user1wrap').append(\"<p>account trades:\"+msgObj.ac_id+\" [lvts]:\"+msgObj.lvts+\"</p>\");\t\t\t\n\t\t\t\ttmp_actrade='<div id=\"actranoti_'+msgObj.ac_id+'\"><p><span style=\"color:#FF0;\">An account trade has been created:</span><br>'+\n\t\t\t\t\"[account id]:\"+msgObj.ac_id+\"<br>[lvts]:\"+msgObj.lvts+\n\t\t\t\t\"<br>[calypso]:\"+msgObj.calypso+\"<br>[aladdin]:\"+msgObj.aladdin+\n\t\t\t\t\"<br>[trade start date]:\"+msgObj.trade_start_date+\"<br>[equity]:\"+msgObj.equity+\n\t\t\t\t'<br>[fixed_income]:'+msgObj.fixed_income+'</p><button type=\"button\" id=\"del_actra'+msgObj.ac_id+'\">delete</button><hr /></div>';\n\t\t\t\t$('#actrade_history').append(tmp_actrade);\n\t\t\t\t$('#user1wrap').append(\"<p>Create new ac_trade:\"+msgObj.ac_id+\" [lvts]:\"+msgObj.lvts+\"</p>\");\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'new_ac_benchmark'){\n\t\t\t\t$('#user1wrap').append(\"<p>account benchmarks:\"+msgObj.ac_id+\" [benchmark_id]:\"+msgObj.benchmark_id+\"</p>\");\t\t\n\t\t \ttmp_acbench='<div id=\"acbennoti_'+msgObj.ac_id+'\"><p><span style=\"color:#FF0;\">An account benchmark has been created:</span><br>'+\n\t\t\t\t\"[account id]:\"+msgObj.ac_id+\"<br>[benchmark_id]:\"+msgObj.benchmark_id+\n\t\t\t\t\"<br>[source]:\"+msgObj.source+\"<br>[name]:\"+msgObj.name+\n\t\t\t\t\"<br>[currency]:\"+msgObj.currency+\"<br>[primary_flag]:\"+msgObj.primary_flag+\n\t\t\t\t\"<br>[start_date]:\"+msgObj.start_date+\"<br>[end_date]:\"+msgObj.end_date+\n\t\t\t\t\"<br>[benchmark_reference_id]:\"+msgObj.benchmark_reference_id+\"<br>[benchmark_reference_id_source]:\"+msgObj.benchmark_reference_id_source\n\t\t\t\t+'</p><button type=\"button\" id=\"del_acben'+msgObj.ac_id+'\">delete</button><hr /></div>';\n\t\t\t\t$('#acbench_history').append(tmp_acbench);\n\t\t\t\t$('#user1wrap').append(\"<p>Create new ac_benchmark:\"+msgObj.ac_id+\" [benchmark id]:\"+msgObj.benchmark_id+\"</p>\");\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'new_benchmark'){\n\t\t\t\t$('#user1wrap').append(\"<p>benchmarks:\"+msgObj.benchmark_id+\" [name]:\"+msgObj.name+\"</p>\");\t\t\n\t\t\t \ttmp_bench='<div id=\"benchnoti_'+msgObj.benchmark_id+'\"><p><span style=\"color:#FF0;\">An account trade has been created:</span><br>'+\n\t\t\t\t\"[benchmark_id]:\"+msgObj.benchmark_id+\"<br>[id_source]:\"+msgObj.id_source+\n\t\t\t\t\"<br>[name]:\"+msgObj.name+\"<br>[currency]:\"+msgObj.currency+\n\t\t\t\t\"<br>[benchmark_reference_id]:\"+msgObj.benchmark_reference_id+\"<br>[benchmark_reference_id_source]:\"+msgObj.benchmark_reference_id_source\n\t\t\t\t+'</p><button type=\"button\" id=\"del_bench'+msgObj.benchmark_id+'\">delete</button><hr /></div>';\t\n\t\t\t\t$('#bench_history').append(tmp_bench);\n\t\t\t\t$('#user1wrap').append(\"<p>Create new be nchmark:\"+msgObj.benchmark_id+\" [name]:\"+msgObj.name+\"</p>\");\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'account'){\n\t\t\t\tconsole.log(\"accounts from database\");\n\t\t\t\t\n\t\t\t\tconsole.log(msgObj.ac_short_name);\n\t\t\t\tvar click = {\n\t\t\t\t\t\thash: $('input[name=\"hash1\"]').is(':checked'),\n\t\t\t\t\t\tac_id: $('input[name=\"ac_id0\"]').is(':checked'),\n\t\t\t\t\t\tac_short_name: $('input[name=\"ac_short_name0\"]').is(':checked'),\n\t\t\t\t\t\tac_status: $('input[name=\"status0\"]').is(':checked'),\n\t\t\t\t\t\tterm_date: $('input[name=\"term_date0\"]').is(':checked'),\n\t\t\t\t\t\tinception_date: $('input[name=\"inception_date0\"]').is(':checked'),\n\t\t\t\t\t\tac_region: $('input[name=\"ac_region0\"]').is(':checked'),\n\t\t\t\t\t\tac_sub_region: $('input[name=\"ac_sub_region0\"]').is(':checked'),\n\t\t\t\t\t\tcod_country_domicile: $('input[name=\"cod_country_domicile0\"]').is(':checked'),\n\t\t\t\t\t\tliq_method: $('input[name=\"liq_method0\"]').is(':checked'),\n\t\t\t\t\t\tcontracting_entity: $('input[name=\"contract_entity0\"]').is(':checked'),\n\t\t\t\t\t\tmgn_entity: $('input[name=\"mgn_entity0\"]').is(':checked'),\n\t\t\t\t\t\tac_legal_name: $('input[name=\"ac_legal_name0\"]').is(':checked'),\n\t\t\t\t\t\tmanager_name: $('input[name=\"manager_name0\"]').is(':checked'),\n\t\t\t\t\t\tcod_ccy_base: $('input[name=\"cod_ccy_base0\"]').is(':checked'),\n\t\t\t\t\t\tlong_name: $('input[name=\"long_name0\"]').is(':checked'),\n\t\t\t\t\t\tmandate_id: $('input[name=\"mandate_id0\"]').is(':checked'),\n\t\t\t\t\t\tclient_id: $('input[name=\"client_id0\"]').is(':checked'),\n\t\t\t\t\t\tcustodian_name: $('input[name=\"custodian_name0\"]').is(':checked'),\n\t\t\t\t\t\tsub_mandate_id: $('input[name=\"sub_mandate_id0\"]').is(':checked'),\n\t\t\t\t\t\ttransfer_agent_name: $('input[name=\"transfer_agent_name0\"]').is(':checked'),\n\t\t\t\t\t\ttrust_bank: $('input[name=\"trust_bank0\"]').is(':checked'),\n\t\t\t\t\t\tre_trust_bank: $('input[name=\"re_trust_bank0\"]').is(':checked'),\n\t\t\t\t\t\tlast_updated_by: $('input[name=\"last_updated_by0\"]').is(':checked'),\n\t\t\t\t\t\tlast_approved_by: $('input[name=\"last_approved_by0\"]').is(':checked'),\n\t\t\t\t\t\tlast_update_date: $('input[name=\"last_update_date0\"]').is(':checked')\n\t\t\t\t\t};\n\n\t\t\t\tvar tmp_data = {\n\t\t\t\t\t\thash: msgObj.sha_value,\n\t\t\t\t\t\tac_id: msgObj.ac_id,\n\t\t\t\t\t\tac_short_name: msgObj.ac_short_name,\n\t\t\t\t\t\tac_status: msgObj.status,\n\t\t\t\t\t\tterm_date: msgObj.term_date,\n\t\t\t\t\t\tinception_date: msgObj.inception_date,\n\t\t\t\t\t\tac_region: msgObj.ac_region,\n\t\t\t\t\t\tac_sub_region: msgObj.ac_sub_region,\n\t\t\t\t\t\tcod_country_domicile: msgObj.cod_country_domicile,\n\t\t\t\t\t\tliq_method: msgObj.liq_method,\n\t\t\t\t\t\tcontracting_entity: msgObj.contracting_entity,\n\t\t\t\t\t\tmgn_entity: msgObj.mgn_entity,\n\t\t\t\t\t\tac_legal_name: msgObj.ac_legal_name,\n\t\t\t\t\t\tmanager_name: msgObj.manager_name,\n\t\t\t\t\t\tcod_ccy_base: msgObj.cod_ccy_base,\n\t\t\t\t\t\tlong_name: msgObj.long_name,\n\t\t\t\t\t\tmandate_id: msgObj.mandate_id,\n\t\t\t\t\t\tclient_id: msgObj.client_id,\n\t\t\t\t\t\tcustodian_name: msgObj.custodian_name,\n\t\t\t\t\t\tsub_mandate_id: msgObj.sub_mandate_id,\n\t\t\t\t\t\ttransfer_agent_name: msgObj.transfer_agent_name,\n\t\t\t\t\t\ttrust_bank: msgObj.trust_bank,\n\t\t\t\t\t\tre_trust_bank: msgObj.re_trust_bank,\n\t\t\t\t\t\tlast_updated_by: msgObj.last_updated_by,\n\t\t\t\t\t\tlast_approved_by: msgObj.last_approved_by,\n\t\t\t\t\t\tlast_update_date: msgObj.last_update_date\n\t\t\t\t\t};\n\n\t\t\t\tvar title ={\n\t\t\t\t\t\thash: \"[sha_value]:\",\n\t\t\t\t\t\tac_id: \"[account]:\",\n\t\t\t\t\t\tac_short_name: \"[short name]:\",\n\t\t\t\t\t\tac_status: \"[status]:\",\n\t\t\t\t\t\tterm_date: \"[term date]:\",\n\t\t\t\t\t\tinception_date: \"[inception date]:\",\n\t\t\t\t\t\tac_region: \"[region]:\",\n\t\t\t\t\t\tac_sub_region: \"[sub region]\",\n\t\t\t\t\t\tcod_country_domicile: \"[country_domicile]:\",\n\t\t\t\t\t\tliq_method: \"[liq method]:\",\n\t\t\t\t\t\tcontracting_entity: \"[contracting entity]:\",\n\t\t\t\t\t\tmgn_entity: \"[mgn entity]:\",\n\t\t\t\t\t\tac_legal_name: \"[account legal name]:\",\n\t\t\t\t\t\tmanager_name: \"[manager name]:\",\n\t\t\t\t\t\tcod_ccy_base: \"[cod_ccy_base]:\",\n\t\t\t\t\t\tlong_name: \"[long name]:\",\n\t\t\t\t\t\tmandate_id: \"[mandate id]:\",\n\t\t\t\t\t\tclient_id: \"[client id]:\",\n\t\t\t\t\t\tcustodian_name: \"[custodian name]:\",\n\t\t\t\t\t\tsub_mandate_id: \"[sub_mandate_id]:\",\n\t\t\t\t\t\ttransfer_agent_name: \"[transfer_agent_name]:\",\n\t\t\t\t\t\ttrust_bank: \"[trust bank]:\",\n\t\t\t\t\t\tre_trust_bank: \"[re_trust_bank]:\",\n\t\t\t\t\t\tlast_updated_by: \"[last_updated_by]:\",\n\t\t\t\t\t\tlast_approved_by: \"[last_approved_by]:\",\n\t\t\t\t\t\tlast_update_date: \"[last_update_date]:\"\n\t\t\t\t}\n\t\t\t\tbase = '<div><hr>';\n\t\t\t\tfor (var s in click){\n\t\t\t\t\tif (click[s]){\n\t\t\t\t\t\tbase = base + \"<br>\" + title[s] + tmp_data[s];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbase = base + '<hr /></div>';\n\t\t\t\t$('#data_history').append(base);\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'ac_trade'){\n\t\t\t\tconsole.log(\"actrade from database\");\n\t\t\t\tvar click = {\n\t\t\t\t\t\thash: $('input[name=\"hash2\"]').is(':checked'),\n\t\t\t\t\t\tac_id: $('input[name=\"t_ac_id0\"]').is(':checked'),\n\t\t\t\t\t\tlvts: $('input[name=\"lvts0\"]').is(':checked'),\n\t\t\t\t\t\tcalypso: $('input[name=\"calypso0\"]').is(':checked'),\n\t\t\t\t\t\taladdin: $('input[name=\"aladdin0\"]').is(':checked'),\n\t\t\t\t\t\ttrade_start_date: $('input[name=\"t_start_date0\"]').is(':checked'),\n\t\t\t\t\t\tequity: $('input[name=\"equity0\"]').is(':checked'),\n\t\t\t\t\t\tfixed_income: $('input[name=\"fixed_income0\"]').is(':checked')\n\t\t\t\t\t};\n\n\t\t\t\tvar tmp_data = {\n\t\t\t\t\t\thash: msgObj.sha_value,\n\t\t\t\t\t\tac_id: msgObj.ac_id,\n\t\t\t\t\t\tlvts: msgObj.lvts,\n\t\t\t\t\t\tcalypso: msgObj.calypso,\n\t\t\t\t\t\taladdin: msgObj.aladdin,\n\t\t\t\t\t\ttrade_start_date: msgObj.trade_start_date,\n\t\t\t\t\t\tequity: msgObj.equity,\n\t\t\t\t\t\tfixed_income: msgObj.fixed_income\n\t\t\t\t\t};\n\n\t\t\t\tvar title ={\n\t\t\t\t\t\thash: \"[sha_value]:\",\n\t\t\t\t\t\tac_id: \"[account]:\",\n\t\t\t\t\t\tlvts: \"[lvts]:\",\n\t\t\t\t\t\tcalypso: \"[calypso]:\",\n\t\t\t\t\t\taladdin: \"[aladdin]:\",\n\t\t\t\t\t\ttrade_start_date: \"[trade start date]:\",\n\t\t\t\t\t\tequity: \"[equity]:\",\n\t\t\t\t\t\tfixed_income: \"[fixed income]:\"\n\t\t\t\t}\n\n\t\t\t\tbase = '<div><hr>';\n\t\t\t\tfor (var s in click){\n\t\t\t\t\tif (click[s]){\n\t\t\t\t\t\tbase = base + \"<br>\" + title[s] + tmp_data[s];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbase = base + '<hr /></div>';\n\t\t\t\t$('#data_history').append(base);\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'ac_benchmark'){\n\t\t\t\tconsole.log(\"ac_benchmarks from database\");\n\t\t\t\tvar click = {\n\t\t\t\t\t\thash: $('input[name=\"hash3\"]').is(':checked'),\n\t\t\t\t\t\tac_id: $('input[name=\"ben_ac_id0\"]').is(':checked'), \n\t\t\t\t\t\tbenchmark_id: $('input[name=\"aben_id0\"]').is(':checked'),\n\t\t\t\t\t\tsource: $('input[name=\"aben_source0\"]').is(':checked'),\n\t\t\t\t\t\tname: $('input[name=\"aben_name0\"]').is(':checked'),\n\t\t\t\t\t\tcurrency: $('input[name=\"aben_currency0\"]').is(':checked'),\n\t\t\t\t\t\tprimary_flag: $('input[name=\"aben_pri_flag0\"]').is(':checked'),\n\t\t\t\t\t\tstart_date: $('input[name=\"aben_startdate0\"]').is(':checked'),\n\t\t\t\t\t\tend_date: $('input[name=\"aben_enddate0\"]').is(':checked'),\n\t\t\t\t\t\tbenchmark_reference_id: $('input[name=\"aben_ref_id0\"]').is(':checked'),\n\t\t\t\t\t\tbenchmark_reference_id_source: $('input[name=\"aben_ref_id_src0\"]').is(':checked')\n\t\t\t\t\t};\n\n\t\t\t\tvar tmp_data = {\n\t\t\t\t\t\thash: msgObj.sha_value,\n\t\t\t\t\t\tac_id: msgObj.ac_id,\n\t\t\t\t\t\tbenchmark_id: msgObj.benchmark_id,\n\t\t\t\t\t\tsource: msgObj.source,\n\t\t\t\t\t\tname: msgObj.name,\n\t\t\t\t\t\tcurrency: msgObj.currency,\n\t\t\t\t\t\tprimary_flag: msgObj.primary_flag,\n\t\t\t\t\t\tstart_date: msgObj.start_date,\n\t\t\t\t\t\tend_date: msgObj.end_date,\n\t\t\t\t\t\tbenchmark_reference_id: msgObj.benchmark_reference_id,\n\t\t\t\t\t\tbenchmark_reference_id_source: msgObj.benchmark_reference_id_source\n\t\t\t\t\t};\n\n\t\t\t\tvar title ={\n\t\t\t\t\t\thash: \"[hash value]:\",\n\t\t\t\t\t\tac_id: \"[account]\",\n\t\t\t\t\t\tbenchmark_id: \"[benchmark id]:\",\n\t\t\t\t\t\tsource: \"[source]:\",\n\t\t\t\t\t\tname: \"[name]:\",\n\t\t\t\t\t\tcurrency: \"[currency]:\",\n\t\t\t\t\t\tprimary_flag: \"[primary flag]:\",\n\t\t\t\t\t\tstart_date: \"[start date]:\",\n\t\t\t\t\t\tend_date: \"[end date]:\",\n\t\t\t\t\t\tbenchmark_reference_id: \"[benchmark reference id]:\",\n\t\t\t\t\t\tbenchmark_reference_id_source: \"[benchmark reference id source]:\"\n\t\t\t\t}\n\n\t\t\t\tbase = '<div><hr>';\n\t\t\t\tfor (var s in click){;\n\t\t\t\t\tif (click[s]){\n\t\t\t\t\t\tbase = base + \"<br>\" + title[s] + tmp_data[s];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbase = base + '<hr /></div>';\n\t\t\t\t$('#data_history').append(base);\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'benchmarks'){\n\t\t\t\tconsole.log(\"benchmarks from database\");\n\t\t\t\tvar click = {\n\t\t\t\t\t\thash: $('input[name=\"hash4\"]').is(':checked'),\n\t\t\t\t\t\tbenchmark_id: $('input[name=\"benchmark_id0\"]').is(':checked'),\n\t\t\t\t\t\tid_source: $('input[name=\"ben_id_src0\"]').is(':checked'),\n\t\t\t\t\t\tname: $('input[name=\"ben_name0\"]').is(':checked'),\n\t\t\t\t\t\tcurrency: $('input[name=\"ben_currency0\"]').is(':checked'),\n\t\t\t\t\t\tbenchmark_reference_id: $('input[name=\"ben_ref_id0\"]').is(':checked'),\n\t\t\t\t\t\tbenchmark_reference_id_source: $('input[name=\"ben_ref_id_src0\"]').is(':checked')\n\t\t\t\t};\n\n\t\t\t\tvar tmp_data = {\n\t\t\t\t\t\thash: msgObj.sha_value,\n\t\t\t\t\t\tbenchmark_id: msgObj.benchmark_id,\n\t\t\t\t\t\tid_source: msgObj.id_source,\n\t\t\t\t\t\tname: msgObj.name,\n\t\t\t\t\t\tcurrency: msgObj.currency,\n\t\t\t\t\t\tbenchmark_reference_id: msgObj.benchmark_reference_id,\n\t\t\t\t\t\tbenchmark_reference_id_source: msgObj.benchmark_reference_id_source\n\t\t\t\t};\n\n\t\t\t\tvar title ={\n\t\t\t\t\t\thash: \"[hash value]:\",\n\t\t\t\t\t\tbenchmark_id: \"[benchmark id]:\",\n\t\t\t\t\t\tid_source: \"[id_source]:\",\n\t\t\t\t\t\tname: \"[name]:\",\n\t\t\t\t\t\tcurrency: \"[currency]:\",\n\t\t\t\t\t\tbenchmark_reference_id: \"[benchmark reference id]:\",\n\t\t\t\t\t\tbenchmark_reference_id_source: \"[benchmark reference id source]:\"\n\t\t\t\t}\n\n\t\t\t\tbase = '<div><hr>';\n\t\t\t\tfor (var s in click){\n\t\t\t\t\tif (click[s]){\n\t\t\t\t\t\tbase = base + \"<br>\" + title[s] + tmp_data[s];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbase = base + '<hr /></div>';\n\t\t\t\t$('#data_history').append(base);\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'untreated_account'){\n\t\t\t\tconsole.log(\"untreated account from database\"); //ac_check_noti_'+msgObj.ac_id+'\n\t\t\t\tvar un_account = '<div id=\"ac_check_noti_'+msgObj.ac_id+'\"><hr/><span style=\"color:#FF0;\">A new account has been created:</span><br>'+\"[sha_value]:\"+msgObj.sha_value+\n \"<br>[account]:\"+msgObj.ac_id+\"<br>[short name]:\"+msgObj.ac_short_name+\n \"<br>[status]:\"+msgObj.status+\"<br>[term date]:\"+msgObj.term_date+\n \"<br>[inception date]:\"+msgObj.inception_date+\"<br>[region]:\"+msgObj.ac_region+\n \"<br>[sub region]:\"+msgObj.ac_sub_region+\"<br>[country domicile]:\"+msgObj.cod_country_domicile+\n \"<br>[liq method]:\"+msgObj.liq_method+\"<br>[contracting entity]:\"+msgObj.contracting_entity+\n \"<br>[mgn entity]:\"+msgObj.mgn_entity+\"<br>[account legal name]:\"+msgObj.ac_legal_name+\n \"<br>[manager name]:\"+msgObj.manager_name+\"<br>[cod_ccy_base]:\"+msgObj.cod_ccy_base+\n \"<br>[long name]:\"+msgObj.long_name+\"<br>[mandate id]:\"+msgObj.mandate_id+\n \"<br>[client id]:\"+msgObj.client_id+\"<br>[custodian name]:\"+msgObj.custodian_name+\n \"<br>[sub_mandate_id]:\"+msgObj.sub_mandate_id+\"<br>[transfer_agent_name]:\"+msgObj.transfer_agent_name+\n \"<br>[trust_bank]:\"+msgObj.trust_bank+\"<br>[re_trust_bank]:\"+msgObj.re_trust_bank+\n \"<br>[last_updated_by]:\"+msgObj.last_updated_by+\"<br>[last_approved_by]:\"+msgObj.last_approved_by+\n \"<br>[last_update_date]:\"+msgObj.last_update_date+\n\t\t\t\t\t'<br><br><button type=\"button\" id=\"ac_accept_'+msgObj.ac_id+'\">accept</button>'+\n '&nbsp;&nbsp;&nbsp;<button type=\"button\" id=\"ac_decline_'+msgObj.ac_id+'\">decline</button><br><br><br><br><br>'+\n\t\t\t\t\t'<hr/></div>';\n\t\t\t\t$('#ac_check_notice').append(un_account);\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'untreated_ac_trade') {\n console.log(\"untreated ac_trade from database\"); //ac_check_noti_'+msgObj.ac_id+'\n\t\t\t\tvar un_ac_trade = '<div id=\"actranoti_'+msgObj.ac_id+'\"><p><span style=\"color:#FF0;\">An account trade has been created:</span><br>'+\n \"[account id]:\"+msgObj.ac_id+\"<br>[lvts]:\"+msgObj.lvts+\n \"<br>[calypso]:\"+msgObj.calypso+\"<br>[aladdin]:\"+msgObj.aladdin+\n \"<br>[trade start date]:\"+msgObj.trade_start_date+\"<br>[equity]:\"+msgObj.equity+\n '<br>[fixed_income]:'+msgObj.fixed_income+\n\t\t\t\t\t'</p><br><button type=\"button\" id=\"actra_accept_'+msgObj.ac_id+'\">accept</button>'+\n '&nbsp;&nbsp;&nbsp;<button type=\"button\" id=\"actra_decline_'+msgObj.ac_id+'\">decline</button>'+\n '<hr/></div>';\n\t\t\t\t$('#actrade_check_notice').append(un_ac_trade);\n }\n\n else if (msgObj.msg === 'untreated_ac_benchmark') {\n\t\t\t\tconsole.log(\"untreated account benchmark from db\");\n\t\t\t\tvar obj = '<div id=\"acbennoti_'+msgObj.ac_id+'\"><p><span style=\"color:#FF0;\">An account benchmark has been created:</span><br>'+\n \"[account id]:\"+msgObj.ac_id+\"<br>[benchmark_id]:\"+msgObj.benchmark_id+\n \"<br>[source]:\"+msgObj.source+\"<br>[name]:\"+msgObj.name+\n \"<br>[currency]:\"+msgObj.currency+\"<br>[primary_flag]:\"+msgObj.primary_flag+\n \"<br>[start_date]:\"+msgObj.start_date+\"<br>[end_date]:\"+msgObj.end_date+\n \"<br>[benchmark_reference_id]:\"+msgObj.benchmark_reference_id+\"<br>[benchmark_reference_id_source]:\"+msgObj.benchmark_reference_id_source +\n '</p><br><button type=\"button\" id=\"acben_accept_'+msgObj.ac_id+'\">accept</button>'+\n '&nbsp;&nbsp;&nbsp;<button type=\"button\" id=\"acben_decline_'+msgObj.ac_id+'\">decline</button><br/>'+\n '<hr/></div>';\n\t\t\t\t$('#acbench_check_noti').append(obj);\n\t\t\t}\n\n\t\t\telse if (msgObj.msg === 'untreated_benchmarks') {\n console.log(\"untreated benchmarks from db\");\n var obj = '<div id=\"benchnoti_'+msgObj.benchmark_id+'\"><p><span style=\"color:#FF0;\">A benchmarks has been created:</span><br>'+\n \"[benchmark_id]:\"+msgObj.benchmark_id+\"<br>[id_source]:\"+msgObj.id_source+\n \"<br>[name]:\"+msgObj.name+\"<br>[currency]:\"+msgObj.currency+\n \"<br>[benchmark_reference_id]:\"+msgObj.benchmark_reference_id+\"<br>[benchmark_reference_id_source]:\"+msgObj.benchmark_reference_id_source +\n '</p><br><button type=\"button\" id=\"bench_accept_'+msgObj.benchmark_id+'\">accept</button>'+\n '&nbsp;&nbsp;&nbsp;<button type=\"button\" id=\"bench_decline_'+msgObj.benchmark_id+'\">decline</button>'+\n '<hr/></div>';\n\t\t\t\t$('#bench_check_noti').append(obj);\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'newAccepted_account'){\n\t\t\t\tconsole.log(\"new accepted account from database\");\n var obj='<div id=\"acnoti_'+msgObj.ac_id+'\"><p><span style=\"color:#FF0;\">A new account has been created:</span><br>'+\n \"[account]:\"+msgObj.ac_id+\"<br>[short name]:\"+msgObj.ac_short_name+\n \"<br>[status]:\"+msgObj.status+\"<br>[term date]:\"+msgObj.term_date+\n \"<br>[inception date]:\"+msgObj.inception_date+\"<br>[region]:\"+msgObj.ac_region+\n \"<br>[sub region]:\"+msgObj.ac_sub_region+\"<br>[country domicile]:\"+msgObj.cod_country_domicile+\n \"<br>[liq method]:\"+msgObj.liq_method+\"<br>[contracting entity]:\"+msgObj.contracting_entity+\n \"<br>[mgn entity]:\"+msgObj.mgn_entity+\"<br>[account legal name]:\"+msgObj.ac_legal_name+\n \"<br>[manager name]:\"+msgObj.manager_name+\"<br>[cod_ccy_base]:\"+msgObj.cod_ccy_base+\n \"<br>[long name]:\"+msgObj.long_name+\"<br>[mandate id]:\"+msgObj.mandate_id+\n \"<br>[client id]:\"+msgObj.client_id+\"<br>[custodian name]:\"+msgObj.custodian_name+\n \"<br>[sub_mandate_id]:\"+msgObj.sub_mandate_id+\"<br>[transfer_agent_name]:\"+msgObj.transfer_agent_name+\n \"<br>[trust_bank]:\"+msgObj.trust_bank+\"<br>[re_trust_bank]:\"+msgObj.re_trust_bank+\n \"<br>[last_updated_by]:\"+msgObj.last_updated_by+\"<br>[last_approved_by]:\"+msgObj.last_approved_by+\n \"<br>[last_update_date]:\"+msgObj.last_update_date+'</p><button type=\"button\" id=\"del_ac'+msgObj.ac_id+'\">OK, I know</button><hr /></div>';\n // $('#ac_check_notice').append(tmp_account);\n\t\t\t\t$('#actrade_mak_noti').append(obj);\n\t\t\t}\n\n\t\t\telse if(msgObj.msg === 'newAccepted_actrade'){\n console.log(\"new accepted account_trade from database\");\n var obj = '<div id=\"actranoti_'+msgObj.ac_id+'\"><p><span style=\"color:#FF0;\">An account trade has been created:</span><br>'+\n \"[account id]:\"+msgObj.ac_id+\"<br>[lvts]:\"+msgObj.lvts+\n \"<br>[calypso]:\"+msgObj.calypso+\"<br>[aladdin]:\"+msgObj.aladdin+\n \"<br>[trade start date]:\"+msgObj.trade_start_date+\"<br>[equity]:\"+msgObj.equity+\n '<br>[fixed_income]:'+msgObj.fixed_income+'</p><button type=\"button\" id=\"del_actra'+msgObj.ac_id+'\">OK, I know</button><hr /></div>';\n $('#acbench_mak_noti').append(obj);\n }\n\n else if(msgObj.msg === 'newAccepted_acben') {\n console.log(\"new accepted account benchmark from database\");\n var obj = '<div id=\"acbennoti_'+msgObj.ac_id+'\"><p><span style=\"color:#FF0;\">An account benchmark has been created:</span><br>'+\n \"[account id]:\"+msgObj.ac_id+\"<br>[benchmark_id]:\"+msgObj.benchmark_id+\n \"<br>[source]:\"+msgObj.source+\"<br>[name]:\"+msgObj.name+\n \"<br>[currency]:\"+msgObj.currency+\"<br>[primary_flag]:\"+msgObj.primary_flag+\n \"<br>[start_date]:\"+msgObj.start_date+\"<br>[end_date]:\"+msgObj.end_date+\n \"<br>[benchmark_reference_id]:\"+msgObj.benchmark_reference_id+\"<br>[benchmark_reference_id_source]:\"+msgObj.benchmark_reference_id_source\n +'</p><button type=\"button\" id=\"del_acben'+msgObj.ac_id+'\">OK, I know</button><hr /></div>';\n $('#bench_mak_noti').append(obj);\n\t\t\t}\n\n else if(msgObj.msg === 'validity') {\n ws.send(JSON.stringify(msgObj));\n }\n\n else if(msgObj.msg === 're_validity'){\n console.log(\"account data validity\");\n if (msgObj.table_name == 'account') {\n var account_notice = '<div><hr/><h4>' + \"[IP_ADDRESS]\" + msgObj.ip_source + '<br/>' + \"[NOTICE!] Data in Table `account` changed!\" + '<br/>' + \"[HASH VALUE] \" + msgObj.sha_value + '</h4><hr/></div>';\n $('#ac_data_validity_notice').append(account_notice);\n }\n\n else if (msgObj.table_name == 'ac_trade'){\n var account_notice = '<div><hr/><h4>' + \"[IP_ADDRESS]\" + msgObj.ip_source + '<br/>' + \"[NOTICE!] Data in Table `ac_trade` changed!\" + '<br/>' + \"[HASH VALUE] \" + msgObj.sha_value + '</h4><hr/></div>';\n $('#actra_validity_notice').append(account_notice);\n\t\t\t\t}\n\n\t\t\t\telse if (msgObj.table_name == 'ac_benchmark') {\n var account_notice = '<div><hr/><h4>' + \"[IP_ADDRESS]\" + msgObj.ip_source + '<br/>' + \"[NOTICE!] Data in Table `ac_benchmark` changed!\" + '<br/>' + \"[HASH VALUE] \" + msgObj.sha_value + '</h4><hr/></div>';\n $('#acben_validity_notice').append(account_notice);\n\t\t\t\t}\n\n\t\t\t\telse if (msgObj.table_name == 'benchmarks'){\n var account_notice = '<div><hr/><h4>' + \"[IP_ADDRESS]\" + msgObj.ip_source + '<br/>' + \"[NOTICE!] Data in Table `benchmarks` changed!\" + '<br/>' + \"[HASH VALUE] \" + msgObj.sha_value + '</h4><hr/></div>';\n $('#bench_validity_notice').append(account_notice);\n\t\t\t\t}\n\n else if(msgObj.table_name == 'unknown'){\n var notice = '<div><hr/><h4>' + \"[IP_ADDRESS]\" + msgObj.ip_source + '<br/>' + \"[NOTICE!] Can not find the hash value in Table `\" + msgObj.show_location + \"`! Data changed!\" + '<br/>' + \"[HASH VALUE] \" + msgObj.sha_value + '</h4><hr/></div>';\n if(msgObj.show_location == 'account') {\n $('#ac_data_validity_notice').append(notice);\n }\n\n else if(msgObj.show_location == 'ac_trade'){\n \t$('#actra_validity_notice').append(notice);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(msgObj.show_location == 'ac_benchmark') {\n $('#acben_validity_notice').append(notice);\n\t\t\t\t\t}\n\n else if(msgObj.show_location == 'benchmarks') {\n $('#bench_validity_notice').append(notice);\n }\n\t\t\t\t}\n }\n\n\t\t\t//unknown\n\t\t\telse console.log(wsTxt + ' rec', msgObj.msg, msgObj);\n\t\t}\n\t\tcatch (e) {\n\t\t\tconsole.log(wsTxt + ' error handling a ws message', e);\n\t\t}\n\t}\n\n\tfunction onError(evt) {\n\t\tconsole.log(wsTxt + ' ERROR ', evt);\n\t}\n}", "function connect_lan() {\n connect(\"192.168.1.100\");\n}", "function connect() {\n var socket = new SockJS(URL_SERVER + '/short_url');\n stompClient = Stomp.over(socket);\n stompClient.connect({}, function (frame) {\n console.info('Connected: ' + frame);\n stompClient.subscribe('/user/url_shortener/short_url', function (response) {\n dealMessageFromServer(JSON.parse(response.body));\n });\n });\n}", "run() {\n this.reset();\n this.socket = net.createConnection({\n 'host': this.host.address, \n 'port': this.port,\n }).setKeepAlive(true); // .setNoDelay(true)\n this.socket.on('connect', this.onConnect);\n this.socket.on('error', this.onError);\n this.socket.on('data', this.onData);\n this.socket.on('close', this.onClose);\n }", "connectRelay() {\n var params, peer_ip, ref;\n dbg('Connecting to relay...');\n // Get a remote IP address from the PeerConnection, if possible. Add it to\n // the WebSocket URL's query string if available.\n // MDN marks remoteDescription as \"experimental\". However the other two\n // options, currentRemoteDescription and pendingRemoteDescription, which\n // are not marked experimental, were undefined when I tried them in Firefox\n // 52.2.0.\n // https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/remoteDescription\n peer_ip = Parse.ipFromSDP((ref = this.pc.remoteDescription) != null ? ref.sdp : void 0);\n params = [];\n if (peer_ip != null) {\n params.push([\"client_ip\", peer_ip]);\n }\n var relay = this.relay = WS.makeWebsocket(this.relayAddr, params);\n this.relay.label = 'websocket-relay';\n this.relay.onopen = () => {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = 0;\n }\n log(relay.label + ' connected!');\n return snowflake.ui.setStatus('connected');\n };\n this.relay.onclose = () => {\n log(relay.label + ' closed.');\n snowflake.ui.setStatus('disconnected.');\n snowflake.ui.setActive(false);\n this.flush();\n return this.close();\n };\n this.relay.onerror = this.onError;\n this.relay.onmessage = this.onRelayToClientMessage;\n // TODO: Better websocket timeout handling.\n return this.timer = setTimeout((() => {\n if (0 === this.timer) {\n return;\n }\n log(relay.label + ' timed out connecting.');\n return relay.onclose();\n }), 5000);\n }", "function createConnectionConfig(host, rosbridgeport, mjpegserverport)\n{\n return {\n Host: host,\n RosbridgePort: rosbridgeport,\n MjpegServerPort: mjpegserverport\n };\n}", "function wsConnect() {\r\n\tconsole.log('connecting: ', wsUri);\r\n\tws = new WebSocket(wsUri);\r\n\r\n\tws.onmessage = async function (msg) {\r\n\t\tvar msg = JSON.parse(msg.data);\r\n\t\tconsole.log(msg);\r\n\t\tawait topicsDispatch(msg);\r\n\t};\r\n\r\n\tws.onopen = function () {\r\n\t\tconsole.log('connected');\r\n\t};\r\n\r\n\tws.onclose = function () {\r\n\t\tsetTimeout(wsConnect, 3000);\r\n\t};\r\n}", "function onConnectCallback() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"connected\");\r\n client.publish(\"lightControl1\", \"connected\", 0, false); //publish a message to the broker\r\n client.publish(\"lightControl2\", \"connected\", 0, false); //publish a message to the broker\r\n}", "connect() { socket_connect(this) }", "async connect(timeout = INTERACTION_TIMEOUT) {\n // assume well connection if connected once\n // if (this.cosmosApp) return\n\n // const transport = await TransportWebUSB.create(timeout)\n // const cosmosLedgerApp = new CosmosApp(transport)\n\n // this.cosmosApp = cosmosLedgerApp\n\n // await this.isSendingData()\n // await this.isReady()\n }", "function _start(isCaller, gumConstraints) {\n pc = new RTCPeerConnection(configuration);\n\n // send any ice candidates to the other peer\n pc.onicecandidate = function (evt) {\n if (evt.candidate) {\n sendMessage(JSON.stringify({\"candidate\": evt.candidate}));\n }\n };\n\n pc.oniceconnectionstatechange = function (evt) {\n };\n\n // once remote stream arrives, show it in the remote video element\n pc.onaddstream = function (evt) {\n if (!remoteVideo.src) {\n remoteVideo.src = URL.createObjectURL(evt.stream);\n } else if (!screenVideo.src) {\n screenVideo.src = URL.createObjectURL(evt.stream);\n }\n\n console.log('Received remote stream. ULTIMATE SUCCESS!');\n };\n\n // get the local stream, show it in the local video element and send it\n navigator.getUserMedia(gumConstraints, function (stream) {\n localVideo.src = URL.createObjectURL(stream);\n console.log('Adding local stream', stream);\n pc.addStream(stream);\n\n if (isCaller) {\n pc.createOffer(gotOfferDescription, createOfferFailure);\n }\n else {\n pc.createAnswer(gotAnswerDescription, createAnswerFailure);\n }\n }, function (err) {\n console.log('gUM error: ', err);\n });\n}", "function connect (cb){\n var c = new Connection();\n c.on('ready', function(){\n cb(null, c); \n });\n var ipport = config.ipport.split(':');\n var host = ipport[0];\n var port = (ipport.length > 1) ? ipport[1] : 22;\n\n console.log(\"Connecting to \" + host + \" \" + port);\n \n c.connect({\n host: host,\n port : port,\n username: config.username,\n privateKey: fs.readFileSync(config.keyPath)\n });\n\n}", "onConnect() {\n console.log(\"connected to broker\");\n this.client.subscribe(\"common/reply\");\n this.emit('onConnected');\n }", "function startSSHy() {\n // Initialise the window title\n //document.title = \"SSHy Client\";\n\n // Opens the websocket!\n ws = new WebSocket(wsproxyURL, 'base64');\n\n // Sets up websocket listeners\n ws.onopen = function(e) {\n transport = new SSHyClient.Transport(ws);\n\n\t\t/*\n\t\t!! Enables or disables RSA Host checking !!\n\t\tSince Linuxzoo changes host every time there is no reason to use it\n\t\t*/\n\n\t\ttransport.settings.rsaCheckEnabled = false;\n };\n\t// Send all recieved messages to SSHyClient.Transport.handle()\n ws.onmessage = function(e) {\n\t\t// Convert the recieved data from base64 to a string\n transport.parceler.handle(atob(e.data));\n };\n\t// Whenever the websocket is closed make sure to display an error if appropriate\n ws.onclose = function(e) {\n\t\tif(term){\n\t\t\t// Don't display an error if SSH transport has already detected a graceful exit\n\t\t\tif(transport.closing){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tterm.write('\\n\\n\\rWebsocket connection to ' + transport.auth.hostname + ' was unexpectedly closed.');\n\t\t\t// If there is no keepAliveInterval then inform users they can use it\n\t\t\tif(!transport.settings.keepAliveInterval){\n\t\t\t\tterm.write('\\n\\n\\rThis was likely caused by he remote SSH server timing out the session due to inactivity.\\r\\n- Session Keep Alive interval can be set in the settings to prevent this behaviour.');\n\t\t\t}\n\t\t} else {\n\t\t\t// Since no terminal exists we need to initialse one before being able to write the error\n termInit();\n term.write('WebSocket connection failed: Error in connection establishment: code ' + e.code);\n\t\t}\n };\n\t// Just a little abstraction from ws.send\n\tws.sendB64 = function(e){\n\t\tthis.send(btoa(e));\n\n\t\ttransport.parceler.transmitData += e.length;\n\t\ttransport.settings.setNetTraffic(transport.parceler.transmitData, false);\n\t};\n}", "connect () {\n return new Promise((resolve, reject) => {\n if (this.socket && this.socket.readyState === 1) {\n resolve()\n return\n }\n\n console.log(`Connecting to chat server at ${config.address}`)\n\n try {\n this.socket = new window.WebSocket(config.address)\n } catch (e) {\n reject(e)\n }\n\n this.socket.addEventListener('open', () => {\n let data = {username: 'Server', data: 'Connected.'}\n this.printMessage(data)\n resolve()\n })\n\n this.socket.addEventListener('onerror', e => {\n let data = {username: 'Server', data: e}\n this.printMessage(data)\n })\n\n this.socket.addEventListener('message', e => {\n let msg = JSON.parse(e.data)\n if (msg.type === 'message') {\n this.printMessage(msg)\n }\n })\n })\n }" ]
[ "0.5986448", "0.58668643", "0.5841325", "0.5841325", "0.5785808", "0.57438385", "0.5655347", "0.5622621", "0.56021273", "0.55080324", "0.54482317", "0.54211783", "0.5416453", "0.54157996", "0.5405801", "0.535047", "0.53294265", "0.5316533", "0.5309893", "0.5305062", "0.5300018", "0.5291534", "0.5269527", "0.5265193", "0.5258431", "0.52440464", "0.5237755", "0.52336985", "0.5225178", "0.52211404", "0.52106", "0.5210535", "0.520801", "0.518667", "0.51864356", "0.5167117", "0.51465535", "0.51404953", "0.51378864", "0.5120066", "0.5117938", "0.5081606", "0.5081606", "0.5080227", "0.5078531", "0.50743216", "0.50697833", "0.5067637", "0.50649685", "0.505923", "0.5056334", "0.5052134", "0.5050324", "0.50483334", "0.50324386", "0.50307345", "0.5018709", "0.5013695", "0.50136536", "0.5006749", "0.5004701", "0.5004282", "0.50029457", "0.50005", "0.49982435", "0.4994986", "0.49926203", "0.4992183", "0.49896646", "0.49865645", "0.49635202", "0.4962505", "0.49603862", "0.49577853", "0.49477604", "0.49470037", "0.49420106", "0.4941679", "0.49336568", "0.49312693", "0.493002", "0.4929139", "0.4929139", "0.4924739", "0.49203047", "0.49194014", "0.49190328", "0.49187452", "0.4917457", "0.49164987", "0.49119407", "0.4911801", "0.49006388", "0.48992944", "0.48988476", "0.48917875", "0.48898983", "0.48891908", "0.48819417", "0.48759827" ]
0.60736364
0
Send a Native Message to the Python Application, containing the URL of the current tab
function sendNativeMessage(message) { // If port is open, send message if (port) { port.postMessage(message); console.log("Sent message: " + JSON.stringify(message)); } // Else, start up a connection and then send the message else { connect(); port.postMessage(message); console.log("Sent message: " + JSON.stringify(message)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendMessageToActiveTab(message, function_) {\n browser.tabs.query({\n currentWindow: true,\n active: true\n }).then(tabs => {\n for (let tab of tabs) {\n browser.tabs.sendMessage(\n tab.id,\n message\n ).then(response => {\n function_(response.url);\n }).catch(onError);\n }\n }).catch(onError);\n }", "sendMessage(message) {\r\n this.currentPanel.webview.postMessage(message);\r\n }", "function sendMessageExtension (payload) {\n window.postMessage({\n direction: \"browser-to-extension\",\n message: payload\n }, \"*\")\n //page will have to listen for results!\n}", "function popup() {\n chrome.tabs.query({\n currentWindow: true, active: true,\n }, (tabs) => {\n const activeTab = tabs[0];\n chrome.runtime.sendMessage({ url: activeTab.url });\n });\n}", "function sendAddonMessage (msg) {\r\n browser.runtime.sendMessage(\r\n\t{source: \"background\",\r\n\t content: msg\r\n\t}\r\n ).then(handleMsgResponse, handleMsgError);\r\n}", "function sendUrl() {\n var url = qUrl;\n java.getUrl(url);\n}", "openRequestInTab() {\n let win = Services.wm.getMostRecentWindow();\n win.openUILinkIn(this.selectedRequest.url, \"tab\", { relatedToCurrent: true });\n }", "function sendURL(x){\n console.log(x);\n //var url = urlSplit(x[i].href);\n chrome.runtime.sendMessage({'url': x}, function(response) {\n console.log(response);\n });\n}", "function sendHelperMessage(msg) {\n var port = chrome.runtime.connect({ name: 'popup' });\n port.postMessage(msg);\n port.onMessage.addListener(function (response) {\n console.log('Got response message: ', response);\n });\n}", "function sendMessage(message) {\n chrome.tabs.sendMessage(myTab, message)\n}", "function sendRequestToCurrentTab(msg) {\n chrome.tabs.getSelected(null, function(tab) {\n chrome.tabs.sendRequest(tab.id, {\n name: msg\n }, function() {});\n });\t\n}", "function sendAddonMessage (msg) {\n browser.runtime.sendMessage(\n\t{source: \"sidebar:\"+myWindowId,\n\t content: msg\n\t}\n ).then(handleMsgResponse, handleMsgError);\n}", "function sendMessageToTab(msg) {\n try {\n chrome.tabs.sendMessage(\n msg.tabId,\n msg,\n (response) => {\n msg.callback(response)\n }\n );\n } catch(e) {\n console.log('Window is not active', e);\n }\n }", "function sendMessage(url) {\n io.sockets.emit('show', { show: url });\n}", "function gotoPlaying() {\n \n let message = {command:'Switch to playing tab'}\n browser.runtime.sendMessage(message)\n .then(val => { console.log('switched to playing:',val) })\n .catch(err=> {console.log('Error in going to playing tab:',err);})\n \n \n}", "send(...args) {\n this.window.webContents.send(...args);\n }", "function linkHandler ( info, tab ) {\n sendItem( { 'message': info.linkUrl } );\n}", "function postApp(message) {\n window.parent.postMessage(message, \"*\");\n}", "sendLoadMessage(appName) {\n var msg = {\n type: \"onLoad\",\n url: getAppUrl(appName)\n };\n if (window.parent) {\n window.parent.postMessage(msg, \"*\");\n }\n }", "function sendHelperMessage (msg) {\n var port = (chrome.runtime.connect : any)({ name: 'popup' })\n port.postMessage(msg)\n port.onMessage.addListener((response) => {\n log.log('Got response message: ', response)\n })\n}", "function respond(request, tabId){\n\tchrome.tabs.sendMessage(tabId, {message: request}, function(response) {console.log(response.backMessage)})\n}", "function sendRequest(request){\n\tchrome.runtime.sendMessage({message: request}, function(response) {console.log(response.backMessage);});\n}", "_onClickUrl(urlLink) {\n //Alert.alert(\"clicked\");\n Linking.openURL(\"http://\"+urlLink);\n \n }", "function sendMessageToContentJS(message, callback) {\n chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n chrome.tabs.sendMessage(tabs[0].id, message, callback);\n });\n}", "function sendMessage(message) {\n console.log('Background - Sending data...', message);\n\n chrome.tabs.query({ url: \"https://programare.vaccinare-covid.gov.ro/*\" }, function (tabs) {\n chrome.tabs.sendMessage(tabs[0].id, message);\n });\n}", "openInternetDetailDialog_() {\n chrome.send('launchInternetDetailDialog');\n }", "checkPage() {\r\n chrome.runtime.sendMessage({ \"domain\": `*://${window.location.hostname}/*` });\r\n }", "function buttonClicked(tab) {\n let message = {\n text: 'hello',\n };\n\n chrome.tabs.sendMessage(tab.id, message.text);\n}", "function sendNativeMessage(msg) {\n port.postMessage(msg);\n}", "function sendMsg(tabs) {\n let tab = tabs[0];\n let msg = {\n content: \"clicked\",\n };\n\n chrome.tabs.sendMessage(tab.id, msg);\n console.log(\"[INFO] Message sent to content script\");\n}", "function send(message) {\n\tif (INTERFACE === 'devtools') {\n\t\tconst messageWithTabId = Object.assign({}, message, {\n\t\t\tfrom: browser.devtools.inspectedWindow.tabId\n\t\t})\n\t\tport.postMessage(messageWithTabId)\n\t} else {\n\t\tbrowser.tabs.query({ active: true, currentWindow: true }, tabs => {\n\t\t\tbrowser.tabs.sendMessage(tabs[0].id, message)\n\t\t})\n\t}\n}", "function messagePageScript() {\n window.postMessage({\n direction: \"from-content-script\",\n message: \"Message from the content script\"\n }, \"https://mdn.github.io\");\n}", "function sendUpdatedSettings () {\n browser.tabs.query({currentWindow: true, active: true}, function (tabs){\n var activeTab = tabs[0];\n browser.tabs.sendMessage(activeTab.id, {\"message\": settings});\n });\n}", "function getURL()\n{\n\treturn safari.application.activeBrowserWindow.activeTab.url;\n}", "function handleMessage(request, sender, sendResponse) {\n if (request.action == \"callback\") {\n\thandleResponse(request);\n\treturn;\n }\n \n if (request.action == \"getLinks\") {\n\tconsole.log(\"Message from the background script: \" + request.action);\n\t\n\tvar expandId = url_domain(request.tabUrl);\n\tif (expands[expandId] == null || expands[expandId] == undefined) {\n\t\texpands[expandId] = {};\n\t}\n\t\t\n\tfunction callback(message) {\n\t\t//here, we have the result of the \"getStatus\" action, or of the original \"getLinks\" result if already computed\n\t\tvar status = statuses[message.tabId];\n\t\tif (status != null && status != undefined) {\n\t\t\tvar result = { \"action\": \"callback\", \"tabId\" : message.tabId, \"tabUrl\" : message.tabUrl, \"status\": status, \"expands\": expands[expandId] };\n\t\t\thandleMessage(result);\n\t\t\t//Send to popups a callback action. (it can raise an error if there is no popup though)\n\t\t\tbrowser.runtime.sendMessage(result);\n\t\t}\n\t};\n\t\n\tfunction storeNewStatus(message) {\n\t\t//here, we have the result of the \"getStatus\" action.\n\t\tstatuses[message.tabId] = message.status;\n\t\tcallback(message);\n\t};\n\t\n\tfunction handleError(error) {\n\t\t//console.log(`Error: ${error}`);\n\t\tstoreNewStatus( { \"tabId\" : request.tabId, \"status\": [] } );\n\t}\n\t \n\tvar status = statuses[request.tabId];\n\tif (status == null || status == undefined) {\n\t\tvar sending = browser.tabs.sendMessage(request.tabId, { \"action\": \"getStatus\", \"tabId\" : request.tabId, \"tabUrl\" : request.tabUrl, \"expands\": expands[expandId] } );\n\t\tsending.then(storeNewStatus, handleError);\n\t\tsendResponse({\"response\": \"wait\", \"action\" : request.action }); \n\t\t\n\t} else if (request.kind != undefined && request.kind != null && status[kind] == undefined) {\n\t\tvar sending = browser.tabs.sendMessage(request.tabId, { \"action\": \"getStatus\", \"tabId\" : request.tabId, \"tabUrl\" : request.tabUrl, \"expands\": expands[expandId] } );\n\t\tsending.then(storeNewStatus, handleError);\n\t\tsendResponse({\"response\": \"wait\", \"action\" : request.action });\n\t\t\n\t} else {\n\t\tcallback(request);\n\t\tsendResponse({\"response\": \"wait\", \"action\" : request.action }); \n\t}\n\t\n } else if (request.action == \"switchExpand\") {\n \n\tvar status = statuses[request.tabId];\n\tvar expandId = url_domain(request.tabUrl);\n\tif (expands[expandId] == null || expands[expandId] == undefined) {\n\t\texpands[expandId] = {};\n\t}\n\tvar kind = request.kind;\n\tif (expands[expandId][kind] == null || expands[expandId][kind] == undefined) {\n\t\texpands[expandId][kind] = false;\n\t}\n\texpands[expandId][kind] = !expands[expandId][kind];\n\t\n\tsendResponse({\"response\": \"switched\", \"action\" : request.action, \"tabId\": request.tabId, \"tabUrl\" : request.tabUrl, \"kind\": request.kind, \"value\": expands[expandId][kind] });\n }\n}", "function output(message) {\n browser.runtime.sendMessage({ action: 'output', message });\n}", "function sendToTab(tabId, eventName, listenerId, payload) {\n window.webkit.messageHandlers.content.postMessage({\n tabId,\n eventName,\n listenerId,\n payload\n });\n}", "function triggerFromFrontEnd(tabs) {\r\n browser.tabs.sendMessage(tabs[0].id, {\r\n command: \"run\",\r\n });\r\n }", "function sendAddonMsgShowBkmk (wId, tabId, bnId) {\r\n browser.runtime.sendMessage(\r\n\t{source: \"background\",\r\n\t content: \"showBookmark\",\r\n\t wId: wId,\r\n\t tabId: tabId,\r\n\t bnId: bnId\r\n\t}\r\n ).then(handleMsgResponse, handleMsgError);\r\n}", "function sendMessage(url, csrf) {\n // Make a simple request:\n chrome.runtime.sendMessage(\n {screenshot: {\n 'user_id': 123,\n 'project_id': 123,\n 'url': url,\n 'csrf': csrf,\n }},\n function(response) {}\n );\n}", "function useIntent() {\n\n tryWebkitApproach();\n // window.location = g_intent;\n }", "function HandleMessages(event)\n{\n DebugMessage(\"Background-Process get command '\" + event.data.cmd + \"'\");\n switch(event.data.cmd)\n { \n // Load Preferences\n case 'Preferences':\n if( opera.extension.tabs.create )\n opera.extension.tabs.create({\n url:\"./options.html\",\n focused:true\n });\n break;\n \n // Load Message-Link in new Tab\n case 'LoadLink':\n \n // Always use https\n var link = event.data.lnk.replace(/^http:\\/\\//i, 'https://');\n \n // Use HTML-Mode if option is set\n if(widget.preferences['basicMode'] && widget.preferences['basicMode'] === \"on\")\n link = link.replace(/\\/u\\//i, '/h/');\n \n DebugMessage(\"Open link: \" + link);\n \n // Open now in new tab\n if( opera.extension.tabs.create )\n opera.extension.tabs.create({\n url:link,\n focused:true\n });\n break;\n \n // Refresh now (without callback)\n case 'Refresh_NoCallback':\n \n // Reset timer\n window.clearTimeout(UpdateTimer); \n \n // Sets alternate icon\n // (we do this here, because this Message comes from Option-Page)\n if(widget.preferences['theme'] != 'standard')\n MyButton.icon = \"css/\" + widget.preferences['theme'] + \"/img/toolbar-icon-18px.png\";\n else\n MyButton.icon = \"img/toolbar-icon-18px.png\";\n \n // then update the Accounts\n Update();\n \n // Refresh now (with callback)\n case 'Refresh':\n // reset timer\n window.clearTimeout(UpdateTimer);\n\n // At first send the current state to the source\n // (quicker)\n SendMessagesToSource(event.source);\n\n // then update the Accounts\n Update(event.source);\n\n break;\n \n // Only return currrent messages to source (No Refresh) \n case 'GetCurrentMessages':\n SendMessagesToSource(event.source);\n break; \n \n // Compose Mail\n case 'ComposeMail':\n if( opera.extension.tabs.create )\n opera.extension.tabs.create({\n url:\"https://mail.google.com/mail/?#compose\",\n focused:true\n });\n break;\n \n // Sets new Popup-Height\n case 'SetPopupSize':\n // Only change size if it is different to avoid flicker\n if(Number(MyButton.popup.height) != Number(event.data.height))\n MyButton.popup.height = event.data.height;\n break;\n \n // MessageAction (mark as read, achive, delete, ...)\n case 'MessageAction':\n MessageAction(event.data.uid, event.data.anum, event.data.action, event.source);\n break;\n \n // Debug-Message\n case 'DebugMessage':\n if(widget.preferences['debugMode'] && widget.preferences['debugMode'] === \"on\") \n opera.postError(event.data.msg);\n break;\n\n // Do nothing\n default:\n DebugMessage(\"Unknown Command from Menu -> \" + event.data.cmd, \"error\");\n }\n}", "function openUrl(url){\n const shell = require('electron').shell;\n shell.openExternal(url);\n}", "function connectToContentPage(tabID) {\r\n if (inExtensionPage) {\r\n // messaging with chrome.runtime.Port.sendMessage and chrome.runtime.Port.onMessage\r\n port = chrome.tabs.connect(tabID, {name:\"popup window\"});\r\n port.onMessage.addListener(onContentPageMessage);\r\n } else {\r\n // messaging with window.postMessage and window.addEventListner(\"message\", function )\r\n port = {\r\n postMessage: function(msg) {\r\n window.top.postMessage(msg, \"*\");\r\n }\r\n };\r\n // onMessage is in function window.addEventListener at about line 21\r\n }\r\n \r\n port.postMessage({method:\"GetAllMessages\"});\r\n}", "function Send_URL(URL){\r\n var attribute={};\r\n\t\t attribute.hasDate =new Date().format(\"yyyy-MM-dd h:mm:ss\");\r\n //attribute.begin = (new Date()).getTime();\r\n //attribute.end = (new Date()).getTime();\r\n attribute.hasType=\"Ouverture_Page\";\r\n attribute.hasSubject=\"obsel of action Website_visited \";\r\n attribute.hasDocument_URL = URL;\r\n\t\t attribute.hasDocument_Title = document.title;\r\n\t kango.dispatchMessage('obsel',attribute);\r\n }", "function sendMessage(word) {\n chrome.runtime.sendMessage(word);\n}", "function onClickHandler(info, tab) {\n console.log('info:',info.selectionText);\n console.log('tab:',tab);\n var newURL = \"http://olam.in/Dictionary/en_ml/\"+info.selectionText;\n chrome.tabs.create({ url: newURL },function(res){\n console.log('res:',res);\n chrome.tabs.getSelected(res.windowId, function(response){\n console.log('response:',response);\n })\n });\n \n // chrome.windows.create({'url': 'redirect.html','width':300,'height':300,'left':500,'top':200,'type': 'popup'}, function(window) {\n // chrome.runtime.sendMessage({ details: \"test messge\" }, function(response) {\n // console.log('response:',response);\n // });\n // });\n \n}", "function sendMessage(message, value) {\n chrome.tabs.query({\n active: true,\n currentWindow: true\n }, function (tabs) {\n chrome.tabs.sendMessage(tabs[0].id, {\n [message]: value\n });\n });\n}", "function send(text) {\n chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) {\n chrome.tabs.sendMessage(tabs[0].id, text, function (response) {\n console.log(response.farewell);\n });\n });\n}", "openMessenger() {\n Linking.openURL('fb://messaging/' + FACEBOOK_ID);\n }", "onMessageFromWebView(message) {\n message = JSON.parse(message);\n if (message.appTag === \"renewal\") {\n switch (message.event) {\n /* TODO: Send these events */\n case \"load\" :\n console.log(JSON.stringify(message));\n break;\n case \"scroll\" :\n console.log(JSON.stringify(message));\n break;\n }\n }\n }", "function navigate(docId, inNewTab) {\n chrome.runtime.sendMessage({\"url\": docId, \"newTab\": inNewTab});\n}", "function handleAddonMessage (request, sender, sendResponse) {\r\n try{ // Use a try catch structure, as any exception will be caught as an error response to calling part\r\n\t// When coming from background:\r\n\t// sender.url: moz-extension://28a2a188-53d6-4f91-8974-07cd0d612f9e/_generated_background_page.html\r\n\t// When coming from sidebar:\r\n\t// sender.url: moz-extension://28a2a188-53d6-4f91-8974-07cd0d612f9e/sidebar/panel.html\r\n\tlet msg = request.content;\r\nif (options.traceEnabled) {\r\n console.log(\"Got message <<\"+msg+\">> from \"+request.source+\" in background\");\r\n console.log(\" sender.tab: \"+sender.tab);\r\n console.log(\" sender.frameId: \"+sender.frameId);\r\n console.log(\" sender.id: \"+sender.id);\r\n console.log(\" sender.url: \"+sender.url);\r\n console.log(\" sender.tlsChannelId: \"+sender.tlsChannelId);\r\n}\r\n\r\n\tif (msg.startsWith(\"saveCurBnId\")) {\r\n\t let windowId = parseInt(request.source.slice(8), 10);\r\n\t saveCurBnId(windowId, request.bnId);\r\n\t}\r\n\telse if (msg.startsWith(\"Close:\")) { // Private window closing - De-register it\r\n\t \t\t\t\t\t\t\t\t\t // In fact, this message never comes :-(\r\n\t \t\t\t\t\t\t\t\t\t // So have to poll such pages ...\r\n\t let windowId = parseInt(msg.slice(6), 10);\r\n\t closeSidebar(windowId);\r\n\t}\r\n\telse if (msg.startsWith(\"savedOptions\")) { // Option page changed something to options, reload them\r\n\t // Look at what changed\r\n\t let pauseFavicons_option_old = options.pauseFavicons;\r\n\t let disableFavicons_option_old = options.disableFavicons;\r\n\t let enableCookies_option_old = options.enableCookies;\r\n\t let enableFlipFlop_option_old = options.enableFlipFlop;\r\n\t let advancedClick_option_old = options.advancedClick;\r\n\t let showPath_option_old = options.showPath;\r\n\t let closeSearch_option_old = options.closeSearch;\r\n\t let openTree_option_old = options.openTree;\r\n\t let noffapisearch_option_old = options.noffapisearch;\r\n\t let searchOnEnter_option_old = options.searchOnEnter;\r\n\t let reversePath_option_old = options.reversePath;\r\n\t let closeSibblingFolders_option_old = options.closeSibblingFolders;\r\n\t let rememberSizes_option_old = options.rememberSizes;\r\n\t let searchHeight_option_old = options.searchHeight;\r\n\t let setFontSize_option_old = options.setFontSize;\r\n\t let fontSize_option_old = options.fontSize;\r\n\t let setFontBold_option_old = options.setFontBold;\r\n\t let setSpaceSize_option_old = options.setSpaceSize;\r\n\t let spaceSize_option_old = options.spaceSize;\r\n\t let matchTheme_option_old = options.matchTheme;\r\n\t let setColors_option_old = options.setColors;\r\n\t let textColor_option_old = options.textColor;\r\n\t let bckgndColor_option_old = options.bckgndColor;\r\n\t let altFldrImg_option_old = options.altFldrImg;\r\n\t let useAltFldr_option_old = options.useAltFldr;\r\n\t let altNoFavImg_option_old = options.altNoFavImg;\r\n\t let useAltNoFav_option_old = options.useAltNoFav;\r\n\t let trashEnabled_option_old = options.trashEnabled;\r\n\t let trashVisible_option_old = options.trashVisible;\r\n\t let traceEnabled_option_old = options.traceEnabled;\r\n\t refreshOptionsLStore()\r\n\t .then(\r\n\t\tfunction () {\r\n\t\t let SFSChanged;\r\n//\t\t let FSChanged;\r\n\t\t let SSSChanged;\r\n//\t\t let SSChanged;\r\n\t\t if (pauseFavicons_option_old != options.pauseFavicons) {\r\n\t\t\tif (options.pauseFavicons) {\r\n\t\t\t // Stop queued favicon fetching\r\n\t\t\t faviconWorkerPostMessage({data: [\"stopfetching\"]});\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t // Rescan tree to trigger fetching favicon, and save it\r\n\t\t\t countBookmarks = countFolders = countSeparators = countOddities = countFetchFav = countNoFavicon = 0;\r\n\t\t\t scanBNTree(rootBN, faviconWorkerPostMessage);\r\n\t\t\t}\r\n\t\t\t// Signal to others the change in option\r\n\t\t\tsendAddonMessage(\"savedOptions\");\r\n\t\t }\r\n\t\t else if (disableFavicons_option_old != options.disableFavicons) {\r\n\t\t\t// Stop queued favicon fetching\r\n\t\t\tfaviconWorkerPostMessage({data: [\"stopfetching\"]});\r\n\r\n\t\t\t// Rescan tree to either clear favicons or trigger fetching them, and save it\r\n\t\t\tcountBookmarks = countFolders = countSeparators = countOddities = countFetchFav = countNoFavicon = 0;\r\n\t\t\tscanBNTree(rootBN, faviconWorkerPostMessage);\r\n\t\t\tsaveBNList();\r\n\r\n\t\t\t// Change to DFF requires a full reload of all sidebars\r\n\t\t\tsendAddonMessage(\"reload\");\r\n\t\t }\r\n\t\t else if ((SFSChanged = (setFontSize_option_old != options.setFontSize))\r\n\t\t\t \t || (fontSize_option_old != options.fontSize)\r\n\t\t \t\t ) {\r\n\t\t\tif ((SFSChanged && !options.setFontSize\r\n\t\t\t\t\t\t\t&& (fontSize_option_old != DfltFontSize)\r\n\t\t\t\t)\t\t\t\t// SFS changed state to unset, refresh only if FS changed\r\n\t\t\t\t|| !SFSChanged\t// Only the fontSize changed, which can happen only when SFS is set\r\n\t\t\t ) {\r\n\t\t\t // Change to FS requires a full reload of all sidebars\r\n\t\t\t sendAddonMessage(\"reload\");\r\n\t\t\t}\r\n\t\t }\r\n\t\t else if (setFontBold_option_old != options.setFontBold) {\r\n\t\t\t// Change to font weight requires a full reload of all sidebars\r\n\t\t\tsendAddonMessage(\"reload\");\r\n\t\t }\r\n\t\t else if ((SSSChanged = (setSpaceSize_option_old != options.setSpaceSize))\r\n\t\t\t \t || (spaceSize_option_old != options.spaceSize)\r\n\t\t \t\t ) {\r\n\t\t\tif ((SSSChanged && !options.setSpaceSize\r\n\t\t\t\t\t\t\t&& (spaceSize_option_old != DfltSpaceSize)\r\n\t\t\t\t)\t\t\t\t// SFS changed state to unset, refresh only if FS changed\r\n\t\t\t\t|| !SSSChanged\t// Only the fontSize changed, which can happen only when SFS is set\r\n\t\t\t ) {\r\n\t\t\t // Change to SS requires a full reload of all sidebars\r\n\t\t\t sendAddonMessage(\"reload\");\r\n\t\t\t}\r\n\t\t }\r\n\t\t else if (trashEnabled_option_old != options.trashEnabled) {\r\n\t\t\t// Create or delete the BSP2 trash folder, as required\r\n\t\t\tif (options.trashEnabled) { // Create BSP2 trash folder, if not already existing (else trim it)\r\n\t\t\t createBSP2TrashFolder();\r\n \t\t\t}\r\n\t\t\telse { // Delete BSP2 trash folder and all its content\r\n\t\t\t removeBSP2TrashFolder();\r\n\t\t\t}\r\n\t\t\tsendAddonMessage(\"savedOptions\");\r\n\t\t }\r\n\t\t else if ((enableCookies_option_old != options.enableCookies)\r\n\t\t\t \t || (enableFlipFlop_option_old != options.enableFlipFlop)\r\n\t\t\t \t || (advancedClick_option_old != options.advancedClick)\r\n\t\t\t \t || (showPath_option_old != options.showPath)\r\n\t\t\t \t || (closeSearch_option_old != options.closeSearch)\r\n\t\t\t \t || (openTree_option_old != options.openTree)\r\n\t\t\t\t || (noffapisearch_option_old != options.noffapisearch)\r\n\t\t\t \t || (searchOnEnter_option_old != options.searchOnEnter)\r\n\t\t\t \t || (reversePath_option_old != options.reversePath)\r\n\t\t\t \t || (closeSibblingFolders_option_old != options.closeSibblingFolders)\r\n\t\t\t \t || (rememberSizes_option_old != options.rememberSizes)\r\n\t\t\t \t || (searchHeight_option_old != options.searchHeight)\r\n\t\t\t\t || (trashVisible_option_old != options.trashVisible)\r\n\t\t\t || (traceEnabled_option_old != options.traceEnabled)\r\n\t\t\t || (matchTheme_option_old != options.matchTheme)\r\n\t\t\t || (setColors_option_old != options.setColors)\r\n\t\t\t || (options.setColors && ((textColor_option_old != options.textColor)\r\n\t\t\t \t \t\t\t\t\t\t|| (bckgndColor_option_old != options.bckgndColor)\r\n\t\t\t \t \t\t\t\t\t )\r\n\t\t\t \t )\r\n\t\t\t || ((options.useAltFldr && (altFldrImg_option_old != options.altFldrImg))\r\n\t\t\t\t \t || (useAltFldr_option_old != options.useAltFldr)\r\n\t\t\t\t \t )\r\n\t\t\t || ((options.useAltNoFav && (altNoFavImg_option_old != options.altNoFavImg))\r\n\t\t\t\t \t || (useAltNoFav_option_old != options.useAltNoFav)\r\n\t\t\t\t \t )\r\n\t\t\t ) { // Those options only require a re-read and some minor actions\r\n\t\t\tsendAddonMessage(\"savedOptions\");\r\n\t\t }\r\n\t\t}\r\n\t )\r\n\t .catch( // Asynchronous, like .then\r\n\t\tfunction (err) {\r\n\t\t let msg = \"Error on processing addon message : \"+err;\r\n\t\t console.log(msg);\r\n\t\t if (err != undefined) {\r\n\t\t\tlet fn = err.fileName;\r\n\t\t\tif (fn == undefined) fn = err.filename; // Not constant :-( Some errors have filename, and others have fileName \r\n\t\t\tconsole.log(\"fileName: \"+fn);\r\n\t\t\tconsole.log(\"lineNumber: \"+err.lineNumber);\r\n\t\t }\r\n\t\t}\r\n\t );\r\n\t}\r\n\telse if (msg.startsWith(\"savedSearchOptions\")) { // Reload them all\r\n\t refreshOptionsLStore()\r\n\t .then(\r\n\t\tfunction () {\r\n\t\t // Signal to others the change in option\r\n\t\t sendAddonMessage(\"savedSearchOptions\");\r\n\t\t}\r\n\t )\r\n\t .catch( // Asynchronous, like .then\r\n\t\tfunction (err) {\r\n\t\t let msg = \"Error on processing savedSearchOptions : \"+err;\r\n\t\t console.log(msg);\r\n\t\t if (err != undefined) {\r\n\t\t\tlet fn = err.fileName;\r\n\t\t\tif (fn == undefined) fn = err.filename; // Not constant :-( Some errors have filename, and others have fileName \r\n\t\t\tconsole.log(\"fileName: \"+fn);\r\n\t\t\tconsole.log(\"lineNumber: \"+err.lineNumber);\r\n\t\t }\r\n\t\t}\r\n\t );\r\n\t}\r\n\telse if (msg.startsWith(\"refetchFav\")) { // Option page \"Re-fetch all unsuccessful favicons\" button was pressed\r\n\t refetchFav();\r\n\t}\r\n\telse if (msg.startsWith(\"reloadFFAPI\")) { // Option page \"Reload tree from FF API\" button was pressed,\r\n\t \t\t\t\t\t\t\t\t\t\t // or an anomaly was detected.\r\n\t reloadFFAPI(msg == \"reloadFFAPI_auto\");\r\n\t}\r\n\telse if (msg.startsWith(\"resetSizes\")) { // Option page reset sizes button was pressed\r\n\t // Relay to sidebars\r\n\t sendAddonMessage(\"resetSizes\");\r\n\t}\r\n\telse if (msg.startsWith(\"resetMigr16x16\")) { // Option page \"Reset 16x16 migration\" button was pressed\r\n\t // Remove the VersionImg16 flag from structureVersion\r\n\t let pos = structureVersion.indexOf(VersionImg16);\r\n\t if (pos != -1) { // Remove the flag\r\n\t\tstructureVersion = structureVersion.slice(0, pos)\r\n\t\t\t\t\t\t + structureVersion.slice(pos + VersionImg16.length);\r\n\t\tmigr16x16Open = true; // Reset to allow next migration signal to work\r\n\t\t// Do not send any signal to add-ons. Migration is triggered when loading a new sidebar and displaying\r\n\t }\r\n\t}\r\n\telse if (msg.startsWith(\"signalMigrate16x16\")) { // A private window sidebar sent a list of favicons to migrate\r\n\t signalMigrate16x16(request.list, request.len);\r\n\t}\r\n\telse if (msg.startsWith(\"getFavicon\")) { // A private window sidebar asks us to fetch / refresh a favicon\r\n\t faviconWorkerPostMessage({data: request.postMsg});\r\n\t}\r\n\telse if (msg.startsWith(\"refreshMostVisited\")) { // Opening the most visited special folder => refresh it\r\n\t triggerRefreshMostVisited();\r\n\t}\r\n\telse if (msg.startsWith(\"refreshRecentBkmks\")) { // Opening the most visited special folder => refresh it\r\n\t triggerRecentRefreshBkmks();\r\n\t}\r\n\telse if (msg.startsWith(\"sort:\")) { // Sort a folder contents by name\r\n\t let BN_id = msg.substring(5); // Get bookmark item Id\r\n\t sortFolder(BN_id);\r\n\t}\r\n\telse if (msg.startsWith(\"clearHistory\")) { // Clear bookmark history and BSP2 trash, sent from options page\r\n\t historyListClear(curHNList);\r\n\t BN_folderClean(bsp2TrashFldrBN);\r\n\t // Save new current info\r\n\t saveBNList();\r\n\t}\r\n\telse if (msg.startsWith(\"recordHistoryMulti\")) { // Record a multipple operation in hitory\r\n\t recordHistoryMulti(request.operation, request.id_list);\r\n\t}\r\n \r\n\t// Answer\r\n\tif (msg.startsWith(\"New:\")) { // New private window sidebar opening - Register it\r\n\t let windowId = parseInt(msg.slice(4), 10);\r\n\t privateSidebarsList[windowId] = windowId;\r\n\t let bnId = newSidebar(windowId);\r\n\t // Start private windows sidebar tracking, except if FF56 as we cannot track sidebar status in that version\r\n\t if ((sidebarScanIntervalId == undefined) && !beforeFF57) {\r\n\t\tsidebarScanIntervalId = setInterval(scanSidebars, SidebarScanInterval);\r\n\t }\r\n\t sendResponse(\r\n\t\t{content: \"savedCurBnId\",\r\n\t\t bnId: bnId\r\n\t\t}\r\n\t );\r\n\t}\r\n\telse if (msg.startsWith(\"getCurBNList\")) {\r\n\t let json = BN_serialize(curBNList[0]);\r\n\t sendResponse(\r\n\t\t{content: \"getCurBNList\",\r\n\t\t json: json,\r\n\t\t countBookmarks: countBookmarks,\r\n\t\t countFetchFav: countFetchFav,\r\n\t\t countNoFavicon: countNoFavicon,\r\n\t\t countFolders: countFolders,\r\n\t\t countSeparators: countSeparators,\r\n\t\t countOddities: countOddities,\r\n\t\t mostVisitedBNId: mostVisitedBNId,\r\n\t\t recentTagBNId: recentTagBNId, \r\n\t\t recentBkmkBNId: recentBkmkBNId,\r\n\t\t bsp2TrashFldrBNId: bsp2TrashFldrBNId\r\n\t\t}\r\n\t );\r\n\t json = undefined;\r\n\t}\r\n\telse if (msg.startsWith(\"getCurHNList\")) {\r\n\t let json = historyListSerialize(curHNList);\r\n\t sendResponse(\r\n\t\t{content: \"getCurHNList\",\r\n\t\t json: json\r\n\t\t}\r\n\t );\r\n\t json = undefined;\r\n\t}\r\n\telse if (msg.startsWith(\"getStats\")) { // Asked to send stats only\r\n\t sendResponse(\r\n\t\t{content: \"getStats\",\r\n\t\t countBookmarks: countBookmarks,\r\n\t\t countFetchFav: countFetchFav,\r\n\t\t countNoFavicon: countNoFavicon,\r\n\t\t countFolders: countFolders,\r\n\t\t countSeparators: countSeparators,\r\n\t\t countOddities: countOddities\r\n\t\t}\r\n\t );\r\n\t}\r\n\telse if (ready && msg.startsWith(\"getBackground\")) { // Asked to resend ready message .. if we are ready\r\n\t sendResponse(\r\n\t\t{content: \"Ready\"\t\t\r\n\t\t}\r\n\t );\r\n\t}\r\n\telse {\r\n\t sendResponse(\r\n\t\t{content: \"Background response to \"+request.source\t\t\r\n\t\t}\r\n\t );\r\n\t}\r\n }\r\n catch (error) {\r\n\tconsole.log(\"Error processing message: \"+request.content);\r\n\tif (error != undefined) {\r\n\t console.log(\"message: \"+error.message);\r\n\t let fn = error.fileName;\r\n\t if (fn == undefined) fn = error.filename; // Not constant :-( Some errors have filename, and others have fileName \r\n\t console.log(\"fileName: \"+fn);\r\n\t console.log(\"lineNumber: \"+error.lineNumber);\r\n//console.log(\" keys: \"+Object.keys(error));\r\n//console.log(\" values: \"+Object.values(error));\r\n\t}\r\n }\r\n}", "function sendWindow() {\r\n\tsendWriteAction(actualMessage);\r\n}", "function OpenExternalURL(inURL) {\n\tif(nativeApp==false) {\n\t\t//Just open it in a new tab\n\t\twindow.open(inURL,'_blank');\n\t} else {\n\tsend(\"openURL\", {\n url: inURL\n })\n\t}\n}", "spawn() {\n window.open(window.location);\n }", "function handleMessage(message, port)\n{\n let tabId = port.sender.tab.id;\n\n switch (message.event) {\n case \"Playing\": {\n playingTabs.addTab(tabId);\n console.log(`Tab ${tabId} is now playing`);\n break;\n }\n case \"Stopped\": {\n playingTabs.removeTab(tabId);\n console.log(`Tab ${tabId} is now stopped`);\n break;\n }\n case \"Update\": {\n if (tabId != playingTabs.getActiveTab())\n return;\n\n // Send update to Rich Presence\n sendMessageToNativeApp({request: \"Update\", title: message.title, artist: message.artist, album: message.album, finishTimestamp: message.finishTimestamp});\n console.log(`Tab ${tabId} Update: ${message.title}, ${message.artist}, ${message.album} , ${message.finishTimestamp}`)\n break;\n }\n }\n}", "showWebsite() {\n require('electron').shell.openExternal('https://codef0x.dev');\n }", "openTheUrlInsideNewTab(url) {\r\n //browser.waitForAngular(false);\r\n browser.executeScript(`window.open (\"${url}\") `)\r\n }", "function invokeApp() {\n\n const divResult = document.getElementById('result_area');\n divResult.innerHTML = 'invoke';\n\n // --- continue ---\n const port = chrome.runtime.connectNative('kick_ping');\n port.onMessage.addListener((response) => {\n const str = JSON.stringify(response);\n console.log(\"Result: \" + str);\n\n divResult.innerHTML += ('<br>' + str);\n });\n port.onDisconnect.addListener(function() {\n console.log(\"Disconnected\");\n divResult.innerHTML += ('<br>--DISCONNECTED--');\n });\n\n /*--\n // --- onece ---\n const ret = chrome.runtime.sendNativeMessage('kick_ps',\n {},\n function(response) {\n const str = JSON.stringify(response);\n console.log(\"Result: \" + str);\n divResult.innerText = 'result: ' + str;\n }\n );\n console.log('Ret:', ret);\n ---*/\n\n}", "function executeGetPayload( URL )\n{\n exec( 'window.location.href = \"' + URL + '\"' ).then( () => {\n // focus the input again for comfort\n // TODO: not working. fix that...\n setTimeout( () => { payloadInput.focus() }, 100 );\n });\n}", "async function copyLink(url, tab) {\n\n const title = tab.title;\n\n console.log(\"about to send copy message. title: \" + title + \" url: \" + url);\n chrome.tabs.sendMessage(tab.id, {greeting: \"copy\", title: title, url: url}, function(response) {\n console.log(response);\n });\n}", "function receivedMessage(message, sender, sendResponse) {\n switch (message.type) {\n case 'enterPiP':\n var myWindow = window.open(\"\", \"\", \"width=200,height=100,titlebar=no,toolbar=no,statusbar=no,menubar=no\");\n myWindow.document.write(iframe[0].outerHTML);\n myWindow.document.body.onblur = () => {\n myWindow.focus();\n \n // Needed because the focus method does not work all of the time.\n setTimeout(function(){console.log(\"hey\");myWindow.focus();}, 800);\n }\n break;\n \n default:\n console.error(\"ERROR: Unrecognized message type.\");\n break;\n } \n}", "function sendMessageActiveTab(msg, callbackfn) {\n chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n chrome.tabs.sendMessage(tabs[0].id, msg, callbackfn);\n });\n}", "function post(window, url, data) {\n const editor = window.open(url);\n const wait = 10000;\n const step = 250;\n let count = ~~(wait / step);\n function listen(evt) {\n if (evt.source === editor) {\n count = 0;\n window.removeEventListener('message', listen, false);\n }\n }\n window.addEventListener('message', listen, false);\n // send message\n // periodically resend until ack received or timeout\n function send() {\n if (count <= 0) {\n return;\n }\n editor.postMessage(data, '*');\n setTimeout(send, step);\n count -= 1;\n }\n setTimeout(send, step);\n }", "function __WEBPACK_DEFAULT_EXPORT__(window, url, data) {\n const editor = window.open(url);\n const wait = 10000;\n const step = 250;\n // eslint-disable-next-line no-bitwise\n let count = ~~(wait / step);\n function listen(evt) {\n if (evt.source === editor) {\n count = 0;\n window.removeEventListener('message', listen, false);\n }\n }\n window.addEventListener('message', listen, false);\n // send message\n // periodically resend until ack received or timeout\n function send() {\n if (count <= 0) {\n return;\n }\n editor.postMessage(data, '*');\n setTimeout(send, step);\n count -= 1;\n }\n setTimeout(send, step);\n}", "function openUrl(url){\n\n if(url!=\"\"){\n \n // ABRINDO A URL\n //cordova.InAppBrowser.open(url, '_system', 'location=yes');\n cordova.InAppBrowser.open(url, '_blank', 'location=yes,toolbarcolor=#00dff2,hidden=no,hardwareback=no,toolbarposition=top');\n\n /*\n\n CAPTURAR A URL DO NAVEGADOR IN APP\n\n You can get the url from javascript on any of the inAppBrowser events (loadstart, loadstop, loaderror, exit)\n\n var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');\n var myCallback = function(event) { alert(event.url); }\n ref.addEventListener('loadstart', myCallback);\n\n\n But for the \"bookmark\" button, I think you will need to edit the inAppBrowser plugin to add a native button, and as you will use a native button and you will use native code, you can get the url with\n\n webView.getOriginalUrl();\n\n */\n\n }\n\n}", "function openBrowser(args) {\n utilityModule.openUrl(\"https://newsapi.org\");\n}", "async function sayHello(e) {\n\n // send message to background script\n // we \"await\" a response, which the message variable will be set to when it is recieved\n let message = await browser.runtime.sendMessage({\n type: \"hello\"\n });\n\n // log message to the debug console (in-page)\n console.log(\"Message from the background script:\", message);\n}", "function on_message(request, sender, sendResponse) {\n\n if (request.load_completed) {\n var state = bgpage.getState(tabid);\n build_popup(bgpage.get_tab_network_requests(tabid), tab_url,\n state);\n } else if (request.attach_error) {\n// showErr(\"Devtools is active - please close it\");\n showErr(request.attach_error);\n }\n}", "function sendMessage(msg, fn){\n\n console.log('message');\n\n chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n\n chrome.tabs.sendMessage(tabs[0].id, msg, fn);\n });\n}", "function sendObjectToInspectedPage(message) {\n message.tabId = chrome.devtools.inspectedWindow.tabId;\n chrome.extension.sendMessage(message);\n}", "function _sendMsgCurrentTab( successCallback ) {\n chrome.tabs.query( { active: true, currentWindow: true }, function( tabs ) {\n successCallback( tabs[ 0 ].id );\n });\n }", "function viewChat(instance_id, url)\n{\n props = 'toolbar=0,scrollbars=0,location=0,status=0,resizable=1,menubar=0,width=584,height=410';\n win = window.open('','Chat',props);\n win.document.writeln('<html>');\n win.document.writeln('<head><title>' + ICtxgopub.pe_txt11 +'</title></head>');\n win.document.writeln('<body>');\n win.document.writeln('<applet codebase=\"'+url+'\" archive=\"../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0/multichat.jar\" CODE=\"GUIClient.class\" width=\"562\" height=\"385\" align=\"BOTTOM\">');\n win.document.writeln('<param name=\"CABBASE\" value=\"multichat.cab\">');\n win.document.writeln('<param name=\"roomid\" value=\"'+instance_id+'\">');\n win.document.writeln('</applet>');\n win.document.writeln('</body></html>');\n}", "function openwebview(sender_psid) {\n let response = {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"button\",\n text: \"Hello Umthunzi Farmer! Please click the link below.\",\n buttons: [{\n type: \"web_url\",\n // url: SERVER_URL + \"/options\",\n // url: process.env.SERVER_URL,\n url: \"https://umthunzi.justusvoigt.com\",\n title: \"Open Veggi Mart\",\n webview_height_ratio: \"full\",\n messenger_extensions: true\n }]\n }\n }\n };\n return response;\n }", "function loadURL()\n{\n exec( 'window.location.href' ).then( URL => {\n URL = URL.slice( 0, -1 );\n payloadInput.value = decodeURI( URL );\n loadPostData();\n loadReferer();\n });\n}", "openWhatsApp() {\n Linking.openURL('whatsapp://send?phone=' + PHONE_NUMBER);\n }", "function postMessageToDisplay(message) {\n if (targetOrigin == null) {\n if (window.location.origin == \"file://\") {\n console.warn(\"Caution: messages between windows are insecure (running as local file)\")\n targetOrigin = \"*\";\n } else {\n targetOrigin = window.location.href;\n }\n }\n displayWindow.postMessage(message, targetOrigin);\n}", "function message(activeTabId, payload) {\n\t\tchrome.tabs.sendMessage(activeTabId, {message: payload} );\n\t}", "function handleOpenURL(url) {\n var parameters = url.toUpperCase().split(\"//\");\n\tconsole.log(parameters);\n\tif(parameters[1].indexOf(\"HCODE\")>=0){\n\t\tvar temp=parameters[1].split(\"=\");\n\t\tinviteCode=temp[1];\n\t}else{\n\t\tinviteCode = parameters[1].toUpperCase();\n\t}\n console.log('inviteCode=' + inviteCode);\n closeWindows();\n waitForLocation(inviteCode);\n}", "function callbackOnExecuteScript() {\n console.log(\"tabID \" + tabId);\n chrome.tabs.sendMessage(tabId, message);\n }", "async function sendLink(event) {\n let body = {\n token: APP_TOKEN,\n user: USER_KEY,\n title: \"Link Shared via Firefox\",\n message: TITLE,\n html: 1,\n url: URL_FULL,\n url_title: URL\n }\n let selectedDevices = document.querySelector('#device-selection').value\n if (selectedDevices !== \"\") {\n body.device = selectedDevices\n }\n let req = new Request('https://api.pushover.net/1/messages.json', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n redirect: 'follow',\n referrer: 'client',\n body: JSON.stringify(body)\n });\n let res = await fetch(req).then(response => response.json())\n if (res.status === 1) {\n // Success\n successfulSend();\n } else {\n // Failure\n if (res.errors[0]) {\n res.message = res.errors[0]\n } else {\n res.message = \"an unknown error occurred\"\n }\n reportExecuteScriptError(res);\n }\n console.log(res);\n\n}", "url() {\n return this.win.location.href;\n }", "function messaging( message, callback ) {\n chrome.runtime.sendMessage( message, callback );\n }", "function nativeBrowser(segmentID)\n{\n\t\t//#ifdef desktopweb\n\t\t\tvar imgDetail_link = gDesktopWebURL;\n\t\t//#else\n\t\t\tvar imgDetail_link = segmentID[\"selectedItems\"][0][\"imgDetailLink\"];\t\n\t\t//#endif\t\t\n\t\tkony.application.openURL(imgDetail_link);\n}", "function connect() {\n var hostName = \"com.google.chrome.example.echo\";\n port = chrome.runtime.connectNative(hostName);\n port.onMessage.addListener(onNativeMessage);\n port.onDisconnect.addListener(onDisconnected);\n}", "function networkSend(){\nchrome.tabs.executeScript(null, {file: \"content.js\"});\n}", "function sendAction(action, data) {\n\tif (data == undefined) data = {};\n\tif (typeof data !== 'object') data = {value: data};\n\tdata.action = action;\n\tdata.url = window.location.href;\n\tif (sameFrame) {\n\t\tappScope.$broadcast('action', data);\n\t} else {\n\t\tbackPort.postMessage(data);\n\t}\n}", "function openLink(url)\n{\n navigator.app.loadUrl(url, { openExternal:true } );\n}", "function openPingfmKeyPage(event)\n{\n widget.openURL('http://ping.fm/key/');\n}", "function sendMessages(){\n var message = {\n action: \"ivalid\",\n data: \"data\"\n }\n\n //postMessage is a function defined on the window object of an iframe\n let win = iframe.contentWindow;\n //You can also get the iframe from the window.frames object if you give it a name attribute\n win = window.frames.iframe.contentWindow;\n \n //The data that is sent needs to be a string for compatibility with IE\n //Syntax is postMessage(data, targetOrigin)\n win.postMessage(JSON.stringify(message), \"http://example.com\")\n}", "function notificationClicked(n_id) {\n console.log(\"The notification '\" + n_id + \"' was clicked\" );\n console.log('Notification - title :'+options.title + ' |Message: '+options.message +options.notID);\n var newURL = options.message.parseURL([0]);\n var newURLstr = newURL.toString();\n //console.log('parsed results: '+newURL);\n //console.log('converted to string: '+newURLstr);\n\n console.log(newURLstr.substring(0,4));\n if (newURLstr.substring(0,4) == \"http\") {//test for http before opening new tab\n console.log('http found, opening url in new tab: '+ newURLstr);\n chrome.tabs.create({ url: newURLstr });\n }\n else{\n console.log('no url to open, ignoring click');\n }\n}", "function messageBackground(message) {\n console.log(\"Message to background\");\n console.log(message);\n try {\n port_to_background.postMessage(message);\n } catch (e) {\n port_to_background = chrome.runtime.connect({\n name: 'popup > background'\n });\n port_to_background.onDisconnect.addListener(function(msg) {\n port_to_background = null;\n port_from_background = null;\n });\n port_to_background.postMessage(message);\n }\n}", "function sendMessage(s,hwnd){\r\n\t\thwnd = (hwnd || window.top);\r\n\t\t//alert(s);\r\n\t\ttry {\r\n\t\t\thwnd.location.hash = s;\r\n\t\t} catch (e) {\r\n\t\t\thwnd.location.href = \"http://apps.facebook.com/?#\"+s;\t\r\n\t\t}\r\n\t}", "async function sendResponse(msgObj){\n\t\tconsole.debug(\"[DEBUG] Response message: \", msgObj);\n\t\tlet query = browser.tabs.query({active: true, currentWindow: true});\n\t\tquery.then((tabs) => {\n\t\t\tfor (let tab of tabs){\n\t\t\t\tif (tab.url === msgObj.taburl){\n\t\t\t\t\tbrowser.tabs.sendMessage(tab.id, msgObj);\n\t\t\t\t}\n\t\t\t}\n\t\t}, handleError);\n\t}", "function send(name, data) {\n if (!win) throw Error('not ready!');\n win.postMessage({\n name: name,\n data: data\n }, 'http://tracking.hcd.com:3000')\n}", "function sendMessage(target, page, title) {\n if ('twitter' === target) {\n document.location.href = `https://twitter.com/intent/tweet?original_referer=${encodeURI(page)}&text=${encodeURI(title) + ' @DevMindFr'}&tw_p=tweetbutton&url=${encodeURI(page)}`;\n }\n else if ('linkedin' === target) {\n document.location.href = `https://www.linkedin.com/shareArticle?mini=true&url=${encodeURI(page)}&text=${encodeURI(title)}`;\n }\n }", "onOpenUrl (event, url, options) {\n if (prefs.get('links-in-browser')) {\n log('on renderer open-url, externally', url);\n shell.openExternal(url);\n } else {\n log('on renderer open-url, new window', url);\n const newWindow = new BrowserWindow(options);\n newWindow.loadURL(url);\n }\n }", "function hotlink(name){\n ipcRenderer.send('hotlink',name); \n}", "function IETabNotifyListener(event) {\n\tvar evt = document.createEvent(\"MessageEvent\");\n\tevt.initMessageEvent(\"ContainerMessage\", true, true, event.data, document.location.href, 0, window);\n\tdocument.dispatchEvent(evt);\n}", "function handleAddonMessage (request, sender, sendResponse) {\n try{ // Use a try catch structure, as any exception will be caught as an error response to calling part\n\tlet source = request.source;\n\tif (source == \"background\") { // Ignore message from other sidebars\n\t // When coming from background:\n\t // sender.url: moz-extension://28a2a188-53d6-4f91-8974-07cd0d612f9e/_generated_background_page.html\n\t // When coming from sidebar:\n\t // sender.url: moz-extension://28a2a188-53d6-4f91-8974-07cd0d612f9e/sidebar/panel.html\n\t let msg = request.content;\nif (options.traceEnabled) {\n console.log(\"Got message <<\"+msg+\">> from \"+request.source+\" in \"+myWindowId);\n console.log(\" sender.tab: \"+sender.tab);\n console.log(\" sender.frameId: \"+sender.frameId);\n console.log(\" sender.id: \"+sender.id);\n console.log(\" sender.url: \"+sender.url);\n console.log(\" sender.tlsChannelId: \"+sender.tlsChannelId);\n}\n\n\t if (msg == \"Ready\") { // Background initialization is ready\n\t\tbackgroundReady = true; // Signal background ready for private windows for asking curBNList\n\t\tif (waitingInitBckgnd) { // We were waiting for it to continue\nif (options.traceEnabled) {\n console.log(\"Background is Ready 2\");\n}\n\t\t f_initializeNext();\n\t\t}\n\t }\n\t else if (msg.startsWith(\"savedOptions\")) { // Option page changed something to options, reload them\n\t\t// Look at what changed\n//\t\tlet enableCookies_option_old = options.enableCookies;\n//\t\tlet enableFlipFlop_option_old = options.enableFlipFlop;\n\t\tlet advancedClick_option_old = options.advancedClick;\n\t\tlet showPath_option_old = options.showPath;\n//\t\tlet closeSearch_option_old = options.closeSearch;\n//\t\tlet noffapisearch_option_old = options.noffapisearch;\n\t\tlet reversePath_option_old = options.reversePath;\n\t\tlet rememberSizes_option_old = options.rememberSizes;\n\t\tlet searchHeight_option_old = options.searchHeight;\n//\t\tlet openTree_option_old = options.openTree;\n\t\tlet matchTheme_option_old = options.matchTheme;\n\t\tlet setColors_option_old = options.setColors;\n\t\tlet textColor_option_old = options.textColorn;\n\t\tlet bckgndColor_option_old = options.bckgndColor;\n//\t\tlet closeSibblingFolders_option_old = options.closeSibblingFolders;\n\t\tlet altFldrImg_option_old = options.altFldrImg;\n\t\tlet useAltFldr_option_old = options.useAltFldr;\n\t\tlet altNoFavImg_option_old = options.altNoFavImg;\n\t\tlet useAltNoFav_option_old = options.useAltNoFav;\n\t\tlet trashVisible_option_old = options.trashVisible;\n\t\tlet traceEnabled_option_old = options.traceEnabled;\n\n\t\t// Function to process option changes\n\t\tfunction changedOptions () {\n\t\t // If advanced click option changed, update rbkmitem_b class cursor\n\t\t if (advancedClick_option_old != options.advancedClick) {\n\t\t\tsetRBkmkItemBCursor(options.advancedClick);\n\t\t }\n\t\t // If a show path option changed, update any open search result \n\t\t if ((showPath_option_old != options.showPath)\n\t\t\t || (reversePath_option_old != options.reversePath)\n\t\t\t ) {\n\t\t\t// Trigger an update as results can change, if there is a search active\n\t\t\ttriggerUpdate();\n\t\t }\n\t\t if ((rememberSizes_option_old != options.rememberSizes)\n\t\t\t && (options.rememberSizes == false)) {\n\t\t\t// To reset the height to CSS default (\"20%\"), just set\n\t\t\tSearchResult.style.height = \"\";\n\t\t }\n\t\t if (searchHeight_option_old != options.searchHeight) {\n\t\t\tSearchResult.style.height = options.searchHeight; \n\t\t }\n\t\t // If match FF theme option changed\n\t\t if (matchTheme_option_old != options.matchTheme) {\n\t\t\tif (options.matchTheme) {\n\t\t\t // Align colors with window theme \n\t\t\t browser.theme.getCurrent(myWindowId)\n\t\t\t .then(setPanelColors);\n\n\t\t\t // Register listener\n\t\t\t browser.theme.onUpdated.addListener(themeRefreshedHandler);\n\t\t\t}\n\t\t\telse {\n\t\t\t resetPanelColors();\n\n\t\t\t // Remove listener\n\t\t\t browser.theme.onUpdated.removeListener(themeRefreshedHandler);\n\t\t\t}\n\t\t }\n\t\t // If set colors option changed, or if one of the colors changed while that option is set\n\t\t if (setColors_option_old != options.setColors\n\t\t\t || (options.setColors && ((textColor_option_old != options.textColor)\n\t\t\t\t\t\t\t\t\t || (bckgndColor_option_old != options.bckgndColor)\n\t\t\t\t \t\t\t\t\t )\n\t\t\t\t )\n\t\t\t ) {\n\t\t\tif (options.setColors) {\n\t\t\t // Align colors with chosen ones \n\t\t\t setPanelColorsTB(options.textColor, options.bckgndColor);\n\t\t\t}\n\t\t\telse { // Cannot change while machTheme option is set, so no theme to match, reset ..\n\t\t\t resetPanelColors();\n\t\t\t}\n\t\t }\n\t\t // If folder image options changed\n\t\t if ((options.useAltFldr && (altFldrImg_option_old != options.altFldrImg))\n\t\t\t || (useAltFldr_option_old != options.useAltFldr)\n\t\t\t ) {\n\t\t\tsetPanelFolderImg(options.useAltFldr, options.altFldrImg);\n\t\t }\n\t\t // If no-favicon image options changed\n\t\t if ((options.useAltNoFav && (altNoFavImg_option_old != options.altNoFavImg))\n\t\t\t || (useAltNoFav_option_old != options.useAltNoFav)\n\t\t\t ) {\n\t\t\tsetPanelNoFaviconImg(options.useAltNoFav, options.altNoFavImg);\n\t\t }\n\t\t // If BSP2 trash folder visibility changed\n\t\t if (trashVisible_option_old != options.trashVisible) {\n\t\t\tif (options.trashVisible) { // Insert BSP2 trash foder and all its children, with handling of parent twistie\n\t\t\t // Get parent of BSP2 Trash folder BN\n\t\t\t let BN = curBNList[bsp2TrashFldrBNId];\n\t\t\t let parentId = BN.parentId;\n\t\t\t let parentBN = curBNList[parentId];\n\t\t\t let parentRow = curRowList[parentId];\n\n\t\t\t // Retrieve row position where to insert.\n\t\t\t // Introduce robustness in case the BN tree is empty and index is not 0, as that seems to occur some times\n\t\t\t let children = parentBN.children;\n\t\t\t let index = BN_getIndex(BN, parentBN);\n \t\t\t if ((index == 0) || (children == undefined)) { // Insert just after parent row\n\t\t\t\t// Note that this also takes care of the case where parent had so far no child\n\t\t\t\tinsertRowIndex = parentRow.rowIndex + 1; // Can be at end of bookmarks table\n\t\t\t }\n\t\t\t else { // Insert just after previous row\n\t\t\t\tlet previousBN = BN_lastDescendant(children[index-1]);\n\t\t\t\tlet row = curRowList[previousBN.id];\n\t\t\t\tinsertRowIndex = row.rowIndex + 1; // Can be at end of bookmarks table\n\t\t\t }\n\n\t\t\t // We got the insertion point, proceed to insertion\n\t\t\t insertBkmks(BN, parentRow);\n\t\t\t}\n\t\t\telse { // Delete all BSP2 trash folder and its children, if any (with cleanup and handling od parent twistie)\n\t\t\t removeBkmks(curRowList[bsp2TrashFldrBNId], true);\n\t\t\t}\n\n\t\t\t// Trigger an update as results can change, if there is a search active\n\t\t\ttriggerUpdate();\n\t\t }\n\t\t // If trace option changed\n\t\t if (traceEnabled_option_old != options.traceEnabled) {\n\t\t\tTracePlace.hidden = !options.traceEnabled;\n\t\t }\n\t\t}\n\n\t\t// Refresh options\n\t\tif ((backgroundPage == undefined) || (backgroundPage.ready == undefined)) { // Load by ourselves\n\t\t refreshOptionsLStore()\n\t\t .then(changedOptions)\n\t\t .catch( // Asynchronous, like .then\n\t\t\tfunction (err) {\n\t\t\t let msg = \"Error on processing changedOptions : \"+err;\n\t\t\t console.log(msg);\n\t\t\t if (err != undefined) {\n\t\t\t\tlet fn = err.fileName;\n\t\t\t\tif (fn == undefined) fn = err.filename; // Not constant :-( Some errors have filename, and others have fileName \n\t\t\t\tconsole.log(\"fileName: \"+fn);\n\t\t\t\tconsole.log(\"lineNumber: \"+err.lineNumber);\n\t\t\t }\n\t\t\t}\n\t\t );\n\t\t}\n\t\telse { // Bacground page is accessible, all was loaded inside it, so get from there\n\t\t refreshOptionsBgnd(backgroundPage);\n\t\t changedOptions();\n\t\t}\n\t }\n\t else if (msg.startsWith(\"savedSearchOptions\")) { // Reload and process search options\n\t\t// Refresh options\n\t\tif ((backgroundPage == undefined) || (backgroundPage.ready == undefined)) { // Load by ourselves\n\t\t refreshOptionsLStore()\n\t\t .then(setSearchOptions)\n\t\t .catch( // Asynchronous, like .then\n\t\t\tfunction (err) {\n\t\t\t let msg = \"Error on processing changedOptions : \"+err;\n\t\t\t console.log(msg);\n\t\t\t if (err != undefined) {\n\t\t\t\tlet fn = err.fileName;\n\t\t\t\tif (fn == undefined) fn = err.filename; // Not constant :-( Some errors have filename, and others have fileName \n\t\t\t\tconsole.log(\"fileName: \"+fn);\n\t\t\t\tconsole.log(\"lineNumber: \"+err.lineNumber);\n\t\t\t }\n\t\t\t}\n\t\t );\n\t\t}\n\t\telse { // Bacground page is accessible, all was loaded inside it, so get from there\n\t\t refreshOptionsBgnd(backgroundPage);\n\t\t setSearchOptions();\n\t\t}\n\t }\n\t else if (msg.startsWith(\"resetSizes\")) { // Option page reset sizes button was pressed\n\t\t// Reset of search pane height\n\t\tSearchResult.style.height = \"\";\n\t }\n\t else if (msg.startsWith(\"notifFFReload\")) { // Signal we are manually reloading bookmarks, preventing all interaction until reload\n\t\tNotifReloadStyle.visibility = \"visible\";\n\t }\n\t else if (msg.startsWith(\"notifAutoFFReload\")) { // Signal we are reloading bookmarks, preventing all interaction until reload\n\t\tNotifAutoReloadStyle.visibility = \"visible\";\n\t }\n\t else if (msg.startsWith(\"reload\")) { // Reload ourselves\n\t\twindow.location.reload();\n\t }\n\t else if (msg.startsWith(\"asyncFavicon\")) { // Got a favicon uri to display\n\t\tlet bnId = request.bnId;\n\t\tlet uri = request.uri;\n\t\tif (backgroundPage == undefined) { // If we are in a private window, we have our own copy of curBNList\n\t\t // Maintain it up to date\n\t\t curBNList[bnId].faviconUri = uri;\n\t\t}\n\n\t\t// Set image\n\t\tlet row = curRowList[bnId]; // Retrieve row holding the icon\n//trace(\"BN.id: \"+bnId+\" index: \"+row.rowIndex+\" Row id: \"+row.dataset.id+\" uri: \"+uri);\n\t\tif (row != undefined) { // May happen on most visited and recent bookmarks when they are not yet ready\n\t\t let bkmkitem = row.firstElementChild.firstElementChild;\n\t\t let oldImg = bkmkitem.firstElementChild;\n\t\t let cn = oldImg.className;\n\t\t if (uri == \"/icons/nofavicon.png\") {\n\t\t\tif ((cn == undefined) || !cn.includes(\"nofavicon\")) { // Change to nofavicon only if not already a nofavicon\n\t\t\t let tmpElem = document.createElement(\"div\");\n\t\t\t tmpElem.classList.add(\"nofavicon\");\n\t\t\t tmpElem.draggable = false; // True by default for <img>\n\t\t\t bkmkitem.replaceChild(tmpElem, oldImg);\n\t\t\t}\n\t\t }\n\t\t else {\n\t\t\tif ((cn != undefined) && cn.includes(\"nofavicon\")) { // Change type from <div> to <img> if it was a nofavicon\n\t\t\t let tmpElem = document.createElement(\"img\"); // Assuming it is an HTMLImageElement\n\t\t\t tmpElem.classList.add(\"favicon\");\n\t\t\t tmpElem.draggable = false; // True by default for <img>\n\t\t\t tmpElem.src = uri;\n\t\t\t bkmkitem.replaceChild(tmpElem, oldImg);\n\t\t\t}\n\t\t\telse {\n\t\t\t oldImg.src = uri;\n\t\t\t}\n\t\t }\n\t\t}\n//\t\telse {\n//consolde.log(\"null row for: \"+bnId);\n//\t\t}\n\n\t\t// Call refresh search if there is one active to update any result with that BTN\n\t\trefreshFaviconSearch(bnId, uri);\n\t }\n\t else if (msg.startsWith(\"showBookmark\")) { // Demand to show a bookmark originating from BSP2 icon context menu\n\t\tlet wId = request.wId;\n\t\tlet tabId = request.tabId;\n\t\tlet bnId = request.bnId;\n\t\tif (myWindowId == wId) { // This is for us\nconsole.log(\"Received message in \"+wId+\" to show \"+bnId+\" for tab \"+tabId);\n\t\t // Use the search mode to allow coming back to normal view after show\n\t\t // This consists in disabling the searchbox and putting some text in it to reflect the action,\n\t\t // then execute a search and show for bnId\n\t\t SearchTextInput.disabled = true;\n\t\t SearchTextInput.value = \"<show bookmark for tab \"+tabId+\">\";\n\t\t enableCancelSearch();\n\t\t let bn = curBNList[bnId]; // We are protected already, by checking bnId before sending the message\n\t\t displayResults([bn]);\n\t\t let row = curRowList[bnId];\n\t\t let wasRowVisible = showRow(bnId, row);\n\t\t if (!wasRowVisible) {\n\t\t\t// If we have the options.openTree active, then we necessarily changed some folder state\n\t\t\t// => save it.\n\t\t\tif (options.openTree) {\n\t\t\t saveFldrOpen();\n\t\t\t}\n\t\t\telse { // Else show special action on context menu\n\t\t\t cursor.cell.classList.add(Reshidden); // Show special menu to open parent folders\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t else if (msg.startsWith(\"bkmkCreated\")) { // Got a BN subtree to add to display\n\t\tbkmkCreated(BN_deserialize(request.newtree), request.index);\n\t }\n\t else if (msg.startsWith(\"bkmkRemoved\")) {\n\t\tbkmkRemoved(request.bnId);\n\t }\n\t else if (msg.startsWith(\"bkmkChanged\")) {\n\t\tbkmkChanged(request.bnId, request.isBookmark, request.title, request.url, request.uri);\n\t }\n\t else if (msg.startsWith(\"bkmkMoved\")) {\n\t\tbkmkMoved(request.bnId, request.curParentId, request.targetParentId, request.targetIndex);\n\t }\n\t else if (msg.startsWith(\"bkmkReordered\")) {\n\t\tbkmkReordered(request.bnId, request.reorderInfo);\n\t }\n\t else if (msg.startsWith(\"recentBkmkBNId\")) { // Recreated (typically on restore bookmarks), so note the id\n\t\trecentBkmkBNId = request.bnId;\n\t }\n\t else if (msg.startsWith(\"mostVisitedBNId\")) { // Recreated (typically on restore bookmarks), so note the id\n\t\tmostVisitedBNId = request.bnId;\n\t }\n\t else if (msg.startsWith(\"recentTagBNId\")) { // Recreated (typically on restore bookmarks), so note the id\n\t\trecentTagBNId = request.bnId;\n\t }\n\t else if (msg.startsWith(\"bsp2TrashFldrBNId\")) { // Recreated, so note the id\n\t\tbsp2TrashFldrBNId = request.bnId;\n\t }\n\n\t // Answer (only to background task, to not perturbate dialog between another sidebar or add-on window, and background)\n\t sendResponse(\n\t\t{content: \"Sidebar:\"+myWindowId+\" response to \"+request.source\t\t\n\t\t}\n\t );\n\t}\n }\n catch (error) {\n\tconsole.log(\"Error processing message: \"+request.content);\n\tif (error != undefined) {\n\t console.log(\"message: \"+error.message);\n\t let fn = error.fileName;\n\t if (fn == undefined) fn = error.filename; // Not constant :-( Some errors have filename, and others have fileName \n\t console.log(\"fileName: \"+fn);\n\t console.log(\"lineNumber: \"+error.lineNumber);\n\t}\n }\n}" ]
[ "0.66210353", "0.65937024", "0.6558327", "0.6447561", "0.64204913", "0.6333605", "0.63186896", "0.62911415", "0.6269889", "0.6247669", "0.62449896", "0.6198687", "0.61555487", "0.61379516", "0.61308444", "0.61081505", "0.60728145", "0.6053696", "0.60473967", "0.604059", "0.6031444", "0.6022644", "0.6006105", "0.6004579", "0.59981555", "0.5991242", "0.5956226", "0.594402", "0.5937258", "0.5928391", "0.59268564", "0.59201694", "0.5920029", "0.59022653", "0.5892224", "0.58818513", "0.58723", "0.5867093", "0.5861373", "0.58605295", "0.58547556", "0.585433", "0.5842815", "0.58407086", "0.58110476", "0.5802838", "0.5795531", "0.57929254", "0.5780561", "0.5775932", "0.5775713", "0.5775198", "0.5771952", "0.5767982", "0.57593435", "0.5758079", "0.5735362", "0.57326007", "0.5731367", "0.57264775", "0.5723247", "0.57148266", "0.57053876", "0.5695917", "0.5689026", "0.56816983", "0.56810296", "0.5680007", "0.56788564", "0.5666956", "0.5664056", "0.56616515", "0.5642605", "0.5638331", "0.56309706", "0.562837", "0.5620635", "0.56108695", "0.5606781", "0.5603222", "0.5597372", "0.5591465", "0.5591349", "0.5574011", "0.55717397", "0.5571067", "0.55699176", "0.5566861", "0.55662984", "0.5562728", "0.55617744", "0.5558491", "0.55578244", "0.5547095", "0.55403346", "0.55319613", "0.553108", "0.55288863", "0.5528094", "0.5525083", "0.5521093" ]
0.0
-1
When it receives a message, update the fields accordingly
function onNativeMessage(message) { document.getElementById('username').value = message['username']; document.getElementById('passwd').value = message['password']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messageChanged(event) {\r\n var value = (event ? event.target.value : undefined);\r\n // Update data\r\n updateMessage(value);\r\n // Update settings\r\n settings.msg = value;\r\n piSaveSettings();\r\n }", "function handleMessageChange(event) {\n const name = event.target.name\n const value = event.target.value\n\n const data = {\n ...userMessage,\n [name]: value\n }\n updateUserMessage(data)\n }", "update() {\n MessagingModule.updateMessage(this.conversation, this.uuid, this.text, this.payload);\n }", "handleMessage(message) {\n console.log('lmsDemo2: message received:' + JSON.stringify(message));\n if(message.FromWhom == 'lmsdemo1'){\n this.msgrcvd = message.ValuePass;\n }\n }", "function onChange() {\n self.onBodyUpdate({ $body: self.message.textBody });\n }", "function messagereceivedHandler(e) {\n var messageSize = e.detail.length;\n for (var i = 0; i < messageSize; i++) {\n for (var key in e.detail[i].data) {\n switch (key) {\n case Messages.ServerStarted:\n serverStarted = true;\n break;\n case Messages.MyMusicIsPlaying:\n isMusicPlaying = true;\n smtc.playbackStatus = MediaPlaybackStatus.playing;\n break;\n case Messages.CurrentSongName:\n\n document.getElementById(\"curr-song-name\").innerText = e.data.first().current.value;\n break;\n case Messages.CurrentSong:\n updateCurrentSong(e.detail[i].data[key]);\n break;\n }\n }\n }\n}", "UPDATE_MESSAGE(state, message) {\n state.synced.message = message;\n }", "onUpdateRequest(msg) {\n super.onUpdateRequest(msg);\n this.updated.emit();\n }", "function handleEditedMessage(updateID, editedMessage) {}", "function onMessageRecieved(who, msgType, content) {\n\n switch(msgType) {\n case \"telepointer_info\":\n updateTelepointer(content);\n break;\n case \"inform_my_details_to_all_other_clients\":\n addNewClientToAllOccupantsDetails(content);\n updateOnlineStatusOfClients(all_occupants_details);\n\n //update the audio call button label\n updateAudioCallerBtnLabels(all_occupants_details);\n break;\n case \"disconnected\":\n alert(\"Disconnected : \" + content);\n break;\n case \"chat_room_msg\":\n addToChatRoomConversation(content);\n break;\n case \"P2P_MSG\":\n onP2pMsgReceived(content);\n break;\n case \"floor_owner_changed\":\n onFloorOwnerChanged(content);\n break;\n case \"new_floor_request\":\n onNewFloorRequest(content);\n break;\n case \"release_floor\":\n onFloorRelease(content.newFloorOwner);\n break;\n case \"remote_module_addition\":\n onRemoteModuleAddition(content);\n break;\n case \"moduleSettingsChanged\":\n onModuleSettingsChanged(content);\n break;\n case \"remote_draw\":\n remoteAddClick(content);\n break;\n case \"workflow_obj_new_link_drawn\":\n addNewLinkToWorkflowObject(content);\n break;\n case \"workflow_obj_selection_moved\":\n workflowObjSelectionMoved(content);\n break;\n case \"workflow_obj_selection_node_delete\":\n workflowObjRemoveNode(content);\n break;\n case \"workflow_obj_selection_link_delete\":\n workflowObjRemoveLink(content);\n break;\n }\n}", "addNewMessage(username, content, type) {\n let oldName = this.state.currentUser.name;\n if (oldName !== username){\n var check = {\n type : 'postNotification',\n content : `${oldName} changed their name to ${username}`\n }\n // Changes the oldName to the new Username\n oldName = username\n this.connection.send(JSON.stringify(check))\n }\n const message = {\n type,\n id: UUID.v4(),\n username,\n content,\n userColor: this.state.userColor\n };\n this.connection.send(JSON.stringify(message));\n\n }", "function updateChatBoard(res, createdMessage) {\n // socketIO.emit('updateOutput', data);\n Message.findById(createdMessage._id)\n .populate('author')\n .populate('receiverID')\n .then((newMessage) => {\n // console.log(\"newMessage\", newMessage)\n newMessage.author.password = undefined;\n newMessage.receiverID.password = undefined;\n\n res.status(200).json(newMessage);\n })\n .catch((err) => console.log(`Error while Sending updated message ${err}`));\n}", "function savedata(){\n var message = messageField.value;\n\n messagesRef.push({fieldName:'messageField', text:message});\n messageField.value = '';\n }", "function gotMessage(message, sender, sendResponse) {\n let keys = Object.keys(message);\n keys.forEach((key) => {\n switch (key) {\n case \"setPageBGColor\":\n changeBGColor(message[key]);\n persist(key, message[key]);\n break;\n case \"setAllFontsColors\":\n changeAllFontsColors(message[key]);\n persist(key, message[key]);\n break;\n case \"setIconsColor\":\n changeIconsColor(message[key]);\n persist(key, message[key]);\n break;\n default:\n // alert(\"Found No Function\");\n }\n });\n}", "onReceive(obj) {\n const newMessage = {\n _id: Date.now(),\n text: obj.text || obj,\n user: {\n _id: 2,\n name: 'Porty',\n avatar: 'https://pbs.twimg.com/profile_images/692354435738161152/UAkVM9-p.png'\n },\n image: obj.image || null\n }\n\n // ActionsMessages.addMessage(newMessage, (newMessage) => {\n // this.setState((previousState) => {\n // return {\n // messages: GiftedChat.append(previousState.messages, newMessage),\n // typingText: null\n // };\n // });\n // });\n this.setState((previousState) => {\n return {\n messages: GiftedChat.append(previousState.messages, newMessage),\n typingText: null\n };\n });\n }", "function handleMessage(){\n if(currentRoom != old){\n \n var message = $('.chat-input input').val().trim();\n if(message){\n // send the message to the server with the room name\n var msg = new Messaging.Message(JSON.stringify({nickname: nickname, message: message, timestamp: Date.now()}));\n msg.destinationName = atopicName(currentRoom);\n msg.qos = 1;\n mqttClient.send(msg);\n \n $('.chat-input input').val('');\n } \n }}", "function onMessageRecieved(who, msgType, content) {\n\n switch(msgType) {\n case \"telepointer_info\":\n updateTelepointer(content);\n break;\n case \"inform_my_details_to_all_other_clients\":\n addNewClientToAllOccupantsDetails(content);\n updateOnlineStatusOfClients(all_occupants_details);\n break;\n case \"disconnected\":\n alert(\"Disconnected : \" + content);\n break;\n case \"chat_room_msg\":\n addToChatRoomConversation(content);\n break;\n case \"floor_owner_changed\":\n onFloorOwnerChanged(content);\n break;\n case \"new_floor_request\":\n onNewFloorRequest(content);\n break;\n case \"release_floor\":\n onFloorRelease();\n break;\n case \"remote_module_addition\":\n onRemoteModuleAddition(content);\n break;\n case \"moduleSettingsChanged\":\n onModuleSettingsChanged(content);\n break;\n\n\n\n\n }\n}", "handleChange(message) {\n this.setState({newTraceMessage: message})\n }", "buildMessageObject() {\n let id = document.querySelector(\"#entryId\").value\n let userId = document.querySelector(\"#userMessageId\").value\n userId = parseInt(userId)\n let messageObject = {\n \"userId\": userId,\n \"message\": document.querySelector(\"#message__Field\").value,\n \"date\": new Date()\n }\n //POSTs a new message to JSON\n if (document.querySelector(\"#entryId\").value === \"\") {\n API.PostNewMessage(messageObject)\n .then(() => {\n messaging.getAllMessages()\n shared.clearDataField()\n document.querySelector(\".select__box\").value = 0\n })\n }\n //PUT, updates an existing message in JSON\n else if (document.querySelector(\"#entryId\").value !== \"\") {\n API.editExistingMessage (messageObject, id)\n .then(() => {\n messaging.getAllMessages()\n shared.clearDataField()\n document.querySelector(\".select__box\").value = 0\n })\n }\n }", "handleMessage(e){\n\n console.log(\"received message with id: \", e.data.id, \"; message was: \", e);\n\n switch (e.data.id) {\n\n case \"quantization\":\n this._quantOpt = e.data.quantOpt;\n this._quantBits = e.data.quantBits;\n break;\n\n case \"reverseK\":\n this._reverseKOpt = e.data.reverseKOpt;\n break;\n\n case \"perfectSynth\":\n this._perfectSynthOpt = e.data.perfectSynthOpt;\n break;\n\n case \"resampling\":\n this._resamplingFactor = e.data.resampFactor;\n this._resampler.update(this._resamplingFactor);\n break;\n\n case \"voicedThreshold\":\n this._confidenceTonalThreshold = e.data.voicedThreshold;\n break;\n\n case \"pitchFactor\":\n this._pitchFactor = e.data.pitchFactor;\n break;\n\n case \"voiceMap\":\n // Voiced / Unvoiced Synthesis\n this._unvoicedMix = e.data.unvoicedMix;\n this._confidenceTonalThreshold = e.data.voicedThreshold;\n // Resampling (vocal tract length)\n if (e.data.vocalTractFactor != this._resamplingFactor){\n this._resamplingFactor = e.data.vocalTractFactor;\n this._resampler.update(this._resamplingFactor);\n }\n // Pitch modifier\n this._pitchFactor = e.data.pitchFactor;\n // Vibrato\n //e.data.vibratoEffect;\n break;\n\n case \"options\":\n // Receive all options\n this._perfectSynthOpt = e.data.perfectSynthOpt;\n this._quantOpt = e.data.quantOpt;\n this._quantBits = e.data.quantBits;\n this._reverseKOpt = e.data.reverseKOpt;\n if (e.data.vocalTractFactor != this._resamplingFactor){\n this._resamplingFactor = e.data.vocalTractFactor;\n this._resampler.update(this._resamplingFactor);\n }\n this._confidenceTonalThreshold = e.data.voicedThreshold;\n this._pitchFactor = e.data.pitchFactor;\n break;\n\n\n default: // any unknown ID: log the message ID\n console.log(\"unknown message received:\")\n console.log(e.data)\n }\n }", "_onMessageSubmitA() {\n const message = this._getInput();\n if (message && message.length) {\n this.messages.push(message);\n this.requestUpdate();\n }\n }", "updateFieldMessages (strings, field, path, source, tone) {\n const messages = this.get('messages').filter(o => o.field !== field ||\n o.path !== path ||\n o.tone !== tone ||\n o.source !== source)\n Ember.makeArray(strings).forEach(body => {\n messages.push({\n field,\n body,\n path,\n source,\n tone,\n })\n })\n this.set('messages', messages)\n }", "function updateMessage(message) {\r\n if (message != \"\") {\r\n $('#messagesDisplay').val(message.responseJSON.message);\r\n }\r\n}", "function receive(frm, message) {\n message.from = frm;\n debug('message received: ' + JSON.stringify(message));\n commit('voteRecord', message);\n return true;\n}", "function handleChange(e){\n messageForm[e.target.name] = e.target.value;\n setMesssageForm({...messageForm})\n }", "onUpdateRequest(msg) {\n if (this._content) {\n MessageLoop.sendMessage(this._content, msg);\n }\n }", "function addTextFields(msg) {\n var i;\n msg.payload.talkerId_text = msg.payload.talkerId;\n for (i=0;i<talkerId_enum.length;i++) {\n if (talkerId_enum[i].id==msg.payload.talkerId) {\n msg.payload.talkerId_text = talkerId_enum[i].desc;\n break;\n }\n }\n msg.payload.sentenceId_text = msg.payload.sentenceId;\n for (i=0;i<sentenceId_enum.length;i++) {\n if (sentenceId_enum[i].id==msg.payload.sentenceId) {\n msg.payload.sentenceId_text = sentenceId_enum[i].desc;\n break;\n }\n }\n if (!isNaN(msg.payload.messageType)){\n msg.payload.messageType_text = textFor(messageType_enum,msg.payload.messageType);\n }\n if (!isNaN(msg.payload.navigationStatus)){\n msg.payload.navigationStatus_text = textFor(navigationStatus_enum,msg.payload.navigationStatus);\n }\n if (!isNaN(msg.payload.turningDirection)){\n msg.payload.turningDirection_text = textFor(turningDirection_enum,msg.payload.turningDirection+1);\n }\n if (!isNaN(msg.payload.positioningSystemStatus)){\n msg.payload.positioningSystemStatus_text = textFor(positioningSystemStatus_enum,msg.payload.positioningSystemStatus);\n }\n if (!isNaN(msg.payload.manoeuvre)){\n msg.payload.manoeuvre_text = textFor(manoeuvre_enum,msg.payload.manoeuvre);\n }\n if (!isNaN(msg.payload.shipType)){\n msg.payload.shipType_text = textFor(shipType_enum,msg.payload.shipType);\n }\n if (!isNaN(msg.payload.fixType)){\n msg.payload.fixType_text = textFor(fixType_enum,msg.payload.fixType);\n }\n if (!isNaN(msg.payload.navAid)){\n msg.payload.navAid_text = textFor(navAid_enum,msg.payload.navAid);\n }\n if (!isNaN(msg.payload.txrxMode)){\n msg.payload.txrxMode_text = textFor(txrxMode_enum,msg.payload.txrxMode);\n }\n if (!isNaN(msg.payload.airPressureTrend)){\n msg.payload.airPressureTrend_text = textFor(airPressureTrend_enum,msg.payload.airPressureTrend);\n }\n if (!isNaN(msg.payload.waterLevelTrend)){\n msg.payload.waterLevelTrend_text = textFor(waterLevelTrend_enum,msg.payload.waterLevelTrend);\n }\n if (!isNaN(msg.payload.precipitationType)){\n msg.payload.precipitationType_text = textFor(precipitationType_enum,msg.payload.precipitationType);\n }\n if (!isNaN(msg.payload.seaState)) {\n msg.payload.seaState_text = textFor(seaState_enum,msg.payload.seaState);\n }\n if (!isNaN(msg.payload.inlandVesselType)) {\n msg.payload.inlandVesselType_text = unexpected;\n for (i=0;i<inlandVesselType_enum.length;i++) {\n if (inlandVesselType_enum[i].id==msg.payload.inlandVesselType) {\n msg.payload.inlandVesselType_text = inlandVesselType_enum[i].desc;\n break;\n }\n }\n }\n}", "[types.SOCKET_ONMESSAGE] (state, message) {\n let payload = JSON.parse(message.data).payload\n let error = payload.error\n if (error) {\n console.error(error)\n return\n }\n let data = payload.data\n if (data === null) return\n state.message = data.message ? data.message : '-'\n state.eventNumber = data.event_number ? data.event_number : '-'\n state.virtualClockSeed = data.virtual_clock ? moment(data.virtual_clock, moment.ISO_8601) : null\n state.virtualClockRate = data.clock_speed ? data.clock_speed : 0\n state.stateChangeTimestamp = data.created ? moment(data.created, moment.ISO_8601) : null\n }", "function handleMessage(message) {\n var an_id = uuidv1();\n var obj = JSON.parse(message);\n obj['id'] = an_id;\n\n switch(obj['type']) {\n case \"postMessage\":\n obj['type'] = 'incomingMessage';\n console.log('incomingMessage');\n break;\n\n case \"postNotification\":\n obj['type'] = 'incomingNotification';\n console.log('incomingNotification')\n obj['message'] = obj.username + ' has changed their name to ' + obj.newName;\n obj['username'] = obj.newName;\n break;\n\n default:\n console.log('default')\n }\n\n contents = JSON.stringify(obj);\n broadcastMessage(contents);\n}", "function additionalInformation(event, senderId) {\n allSenders[senderId].states++;\n allSenders[senderId].aboutMe = event.message.text; \n sendFBmessage.sendQuickReplies(senderId, saveText, -1, model.answerVariants.savePostback);\n}", "update() {\r\n this.sendDetail();\r\n }", "function Message() {\n\t/* Status (changed): Unchanged, Added, Removed, Count\n\t\tWe should mark each Hit in the message with what has changed. The count change should be sent with this.\n\t\tThe message will also tell the client whether or not to pop-up the notification.\t*/\n}", "saveAndSendMessage() {\n const { user, contact, apikey } = this.props.location.state;\n const textmessage = this.state.text;\n const msg = {\n id: uuid(),\n from: user.id,\n to: contact.id,\n msg: textmessage,\n timestamp: new Date()\n };\n console.log(msg);\n store.write(() => {\n store.create(\"Message\", msg);\n });\n\n if (this.state.text) {\n this.handleInput(\"\");\n Realpub.emit(`chat::send::message::to::${user.id}`, msg);\n }\n }", "onKeyUp(field, value){\n\t\t//const newMessage = {type: 'message', uuid: uuidv4(), username: this.state.currentUser, [field]: value};\n //sendText(this.state.userSocket, newMessage);\n console.log(\"onKeyUp\", field, value)\n }", "onReceivedMessage(messages) {\n if (this._isMounted) {\n this.setState((previousState) => {\n return {\n messages: GiftedChat.append(previousState.messages, messages),\n };\n });\n this.updateTimeOfLastReadMessage();\n }\n }", "function onMessageArrived(message) {\n // console.log(\"onMessageArrived\");\n // console.log(\"onMessageArrived:\" + message.payloadString);\n\n payload = JSON.parse(message.payloadString);\n\n handleMessage( // in updateDom.js\n JSON.stringify(\n payload.state.desired\n )\n );\n\n\n} // close onMessageArrive", "newMessage() {\n this.setState({ to: \"\", text: \"\", send: true });\n }", "messageReceived(message) {\n\t\tMessage.create({\n\t\t\tuser: this.user,\n\t\t\tbody: message\n\t\t}).then((res) => {\n\t\t\tres.user = this.user;\n\t\t\tthis.io.emit('message', res);\n\t\t});\n\t}", "function messagesUpdated() {\n\n updateMessageLayers();\n\n if (scope.detailsMap) {\n updateLabelLayer();\n }\n\n if (scope.fitExtent) {\n var extent = ol.extent.createEmpty();\n ol.extent.extend(extent, nwLayer.getSource().getExtent());\n ol.extent.extend(extent, nmLayer.getSource().getExtent());\n if (!ol.extent.isEmpty(extent)) {\n map.getView().fit(extent, {\n padding: [5, 5, 5, 5],\n size: map.getSize(),\n maxZoom: maxZoom\n });\n } else if (scope.rootArea && scope.rootArea.latitude\n && scope.rootArea.longitude && scope.rootArea.zoomLevel) {\n // Update the map center and zoom\n var center = MapService.fromLonLat([ scope.rootArea.longitude, scope.rootArea.latitude ]);\n map.getView().setCenter(center);\n map.getView().setZoom(scope.rootArea.zoomLevel);\n }\n }\n }", "function handleMessage(message) {\n let uUid = uuidv1();\n message = JSON.parse(message);\n let msg = {\n id: uUid,\n type: message.type,\n username: message.username,\n content: message.content,\n oldUsername: message.oldUsername,\n userCount: userCount,\n isConnected: 'User has connected.',\n isDisconnected: 'User has disconnected.'\n }\n broadcastMessage(msg);\n}", "handleMessageChange(e) {\n const name = e.target.name;\n const value = e.target.value;\n this.setState({\n userMessage: value,\n }, () => { this.validateField(name, value) });\n }", "function onMessageArrived(message) {\r\n console.log(\"onMessageArrived:\" + message.payloadString);\r\n if (message.destinationName == 'State') {\r\n\r\n }\r\n if (message.destinationName == 'Content') {\r\n\r\n }\r\n\r\n }", "handleOnPlayerMessage(player) {\n let _this = this;\n\n // handle on message\n player.socket.on(\"message\", function (message) {\n let _data = JSON.parse(message);\n\n if (_data.messageType === MESSAGE_TYPE.CLIENT_CHAT) {\n let _playerDisplayName = player.id;\n if (player.playerName) {\n _playerDisplayName = player.playerName;\n }\n let _message = new Message(MESSAGE_TYPE.CLIENT_CHAT);\n _message.content = _playerDisplayName + \" : \" + _data.content;\n _this.sendAll(JSON.stringify(_message));\n } else if (_data.messageType === MESSAGE_TYPE.CLIENT_CARD) {\n // Karte in der Logik verarbeiten.\n scopaLogic.processPlayerMessage(_data, _this);\n } else if (_data.messageType === MESSAGE_TYPE.CLIENT_STATE) {\n // Name und ID des Spielers setzen\n player.playerName = _data.playerName;\n player.playerId = _data.playerId;\n console.log(\"Spielername: \" + _data.playerName + \" Spieler ID\" + _data.playerId);\n }else if (_data.messageType === MESSAGE_TYPE.CLIENT_RESTART) {\n scopaLogic.startGame();\n }\n });\n }", "_onMessageSubmitB() {\n const message = this._getInput();\n if (message && message.length) {\n this.messages = [...this.messages, message];\n }\n }", "function handleStreamUpate(message) {\r\n\r\n // check to see if this update is from us in this session\r\n // the first 8 bytes of the ID is sent in the message, so compare against just those bytes\r\n if (session.id.indexOf(message.macId) === 0) {\r\n\r\n // update by my own self in this browser - no op\r\n\r\n } else {\r\n\r\n switch (message.object) {\r\n\r\n case 'projects':\r\n updateProjects(message);\r\n break;\r\n\r\n case 'project':\r\n updateProject(message);\r\n break;\r\n\r\n case 'tasks':\r\n updateTasks(message);\r\n break;\r\n\r\n case 'task':\r\n updateTask(message);\r\n break;\r\n\r\n case 'details':\r\n updateDetails(message);\r\n break;\r\n\r\n case 'profile':\r\n case 'user':\r\n updateProfile(message);\r\n break;\r\n\r\n case 'contacts':\r\n updateContacts(message);\r\n break;\r\n\r\n case 'tips':\r\n updateTips(message);\r\n break;\r\n\r\n case 'suggestions':\r\n updateSuggestions(message);\r\n break;\r\n\r\n // also not used 'storage', 'prefs' ... \r\n\r\n }\r\n\r\n }\r\n\r\n }", "_handleMessage(msg) {\n let data = {};\n try {\n data = JSON.parse(msg);\n } catch (e) {\n console.log(\"[LiveModel] message was not json: \", msg);\n }\n\n // TODO: if fileupdated ...\n\n // Trigger a reload of the mode. We have to add the nocache query parameter so that p5 will refetch the file from source. We also need to make sure the filename ends in .obj so that loadModel will accept it.\n this.model = loadModel(this.filePath + \"?nocache=\" + Date.now() + \".\" + this.extension);\n }", "function onMessageArrived(message) {\n console.log(message.destinationName\t+ \" : \"+message.payloadString);\n if(message.destinationName == house.topics.weather){ update_bed_with_msg(\"weather\",JSON.parse(message.payloadString)); }\n else if(message.destinationName == house.topics.heater){ update_bed_with_msg(\"heater\",message.payloadString); }\n else if(message.destinationName == house.topics.heater_status){ update_bed_with_msg(\"status\",message.payloadString); }\n else if(message.destinationName == house.topics.timer){ update_bed_with_msg(\"timer\",message.payloadString); }\n else if(message.destinationName == house.topics.level){ update_bed_with_msg(\"level\",message.payloadString); }\n else if(message.destinationName == house.topics.relay_status){ update_bed_with_msg(\"relay\",message.payloadString); }\n else if(message.destinationName == house.topics.relay_power){ update_bed_with_msg(\"power\",message.payloadString); }\n}", "function updateMessage() {\n document.getElementById('targetMessage').innerHTML = document.getElementById('message-field').value;\n document.getElementById('message-field').value = \"\"\n document.getElementById('noel').innerHTML = document.getElementById('name-field').value;\n document.getElementById('name-field').value = \"\"\n}", "receiveServerUpdate(data) {\n\t\t/* Keep a copy of the numerical values. */\n\t\tthis.score = data.score;\n\t\tthis.high = data.high;\n\t\tthis.level = data.level;\n\t\tthis.lines = data.lines;\n\n\t\t/* Upate the text boxes. */\n\t\tthis._updateLevelLinesBox();\n\t\tthis._updateScoreBox();\n\n\t\t/* Update the grid and the statistics. */\n\t\tthis.grid.receiveServerUpdate(data.grid);\n\t\tthis.statBox.receiveServerUpdate(data.stats);\n\n\t\t/* Update the piece and the next piece. */\n\t\tthis.piece.receiveServerUpdate(data.piece);\n\t\tthis.nextPiece = new Piece(data.nextPiece);\n\t\tthis.nextPieceBox.updatePiece(this.nextPiece);\n\t}", "generateMessage (callback) {\n\t\tthis.updatedAt = Date.now();\n\t\tthis.updateStream(error => {\n\t\t\tif (error) { return callback(error); }\n\t\t\tthis.message = {\n\t\t\t\tuser: {\n\t\t\t\t\t_id: this.currentUser.user.id,\t// DEPRECATE ME\n\t\t\t\t\tid: this.currentUser.user.id,\n\t\t\t\t\t$unset: {\n\t\t\t\t\t\t[`lastReads.${this.stream.id}`]: true\n\t\t\t\t\t},\n\t\t\t\t\t$set: {\n\t\t\t\t\t\tversion: 7\n\t\t\t\t\t},\n\t\t\t\t\t$version: {\n\t\t\t\t\t\tbefore: 6,\n\t\t\t\t\t\tafter: 7\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tcallback();\n\t\t});\n\t}", "_updateMessage() {\n this.clear();\n this.push(this._PACKAGE_PREFIX +\n utils_1.number2HexString(this._opts.type) +\n utils_1.boolean2HexString(this._opts.showTime) +\n utils_1.boolean2HexString(this._opts.showWeather) +\n utils_1.boolean2HexString(this._opts.showTemp) +\n utils_1.boolean2HexString(this._opts.showCalendar) +\n utils_1.color2HexString(this._color));\n }", "function receiveMessage(event) {\n // Parse the message.\n var msg = JSON.parse(event.data);\n \n switch (msg.messageType) {\n case 1: // Add\n addModel(msg.modelHandle, msg.floatArrayData, msg.stringData);\n break;\n case 2: // Remove\n removeModel(msg.modelHandle);\n onCurrentModelChange();\n break;\n case 3: // Move\n moveModel(msg.modelHandle, msg.floatArrayData);\n break;\n case 4: // Rotate\n rotateModel(msg.modelHandle, msg.floatArrayData);\n break;\n case 5: // Scale\n scaleModel(msg.modelHandle, msg.floatArrayData);\n break;\n default: // Unknown message\n console.log(\"Invalid Message.\");\n }\n}", "saveNewMessage(message) {\n if(message) {\n const { currentUser } = this.state;\n const newMessage = {\n type: \"newMessage\",\n username: currentUser,\n content: message\n };\n this.socket.send(JSON.stringify(newMessage));\n }\n }", "updateChatMessageList(event){\n\t\tsocket.emit('typing', 'customer typing...');\n\t\t// 13 is the Enter keycode\n\t\tif (event.keyCode === 13) {\n\t\t\tlet message = {\n\t\t\t\ttext: event.target.value,\n\t\t\t\ttype: 'sender',\n\t\t\t\thumanized_time: moment().fromNow(),\n\t\t\t\tmachine_time: moment().format('MMMM Do YYYY, hh:mm:ss') \n\n\t\t\t};\n\t\t\tthis.props.newMessage(message);\n\t\t\tsocket.emit('chat message', message);\n\t\t\tevent.target.value = \"\";\n\t\t\tevent.preventDefault();\n\t\t};\n\t}", "handleEdit() {\n this.message(this.newText());\n this.isEditPending(true);\n this.isEditingOpen(false);\n return updateMessage(this.id, {\n state: this.state().slug,\n message: this.newText(),\n author: this.app.author(),\n }).then((newMessage) => {\n this.updateWith(newMessage);\n return this.isEditPending(false);\n });\n }", "handleSendMessage() {\n this.props.sendMessageAction({\n \"userId\": this.state.to,\n \"fromNumber\": this.props.profile.mobile,\n \"text\": this.state.text,\n \"read\": false,\n \"sentDate\": new Date().getTime()\n });\n }", "function messageTransmit (message) { // eslint-disable-line no-unused-vars\n soField.value = ['User \"' + message.user + '\": ' + message.message, soField.value].join('\\n');\n }", "function entityMessageReceiver(event) {\n // validate that this is an entityMessage\n if (-1 === event.data.indexOf('entityMessage')) return\n var message = JSON.parse(event.data)\n var uuid = message.uuid\n var entity = entities[uuid]\n switch (message.type) {\n case 'error':\n var value = message.value\n setEntityState(entity,'error')\n console.log('an entity threw an error -',uuid,value)\n break\n case 'setPosition':\n var value = message.value\n setPosition(entity,value)\n break\n case 'setRotation':\n var value = message.value\n setRotation(entity,value)\n break\n case 'move':\n var value = message.value\n move(entity,value)\n break\n case 'rotate':\n var value = message.value\n rotate(entity,value)\n break\n }\n }", "changeMessage(message){\n this.setState({messageInput: message});\n }", "function _update_message(transcribed_text){\n $(message_input_id).val(transcribed_text)\n autosize.update($(message_input_id))\n }", "markAsRead() {\n this.props.setMessagesAsRead({\n _1: this.props.pair.sender,\n _2: this.props.pair.receiver\n });\n }", "function updateMessage(){\n // get the value of the input box\n let newMessage = $('#message-input').val();\n // if there is a value..\n if(newMessage && newMessage.length > 0){\n // create a transaction to the blockchain from the contract creator address\n instance.update.sendTransaction(newMessage, {from: \"0xa48f2e0be8ab5a04a5eb1f86ead1923f03a207fd\", gas: 30000000}, function(error, result){\n // if it fails\n if(error){\n alert(\"Error in sendtransaction\");\n }\n // if it succeeds \n else{\n // create a timeout to check the value on the blockchain\n setTimeout(function(){\n getMessage(function (error, result) {\n // if there's a problem getting the new value from the blockchain..\n if (error) {\n console.error(\"Could not get article:\", error);\n return;\n }\n // if it's successful then update the value of #message with the result\n $('#message').html(result);\n });\n // timeout in 1k miliseconds\n }, 1000);\n }\n });\n }\n else{\n alert(\"newMessage is not defined\");\n }\n }", "receive(message) {\n this.log(\"Received: \"+message);\n var obj = JSON.parse(message);\n if (\"object\" in obj){\n this.processEvent(obj.object,obj.changes);\n } else if (\"Add\" in obj ) {\n for ( i=0; i< obj.Add.objects.length; i++ ) {\n // this.log(\"adding \"+i+\":\"+obj);\n this.addObject(obj.Add.objects[i]);\n }\n this.log(\"added \"+obj.Add.objects.length+\" scene size \"+this.scene.size);\n } else if (\"Remove\" in obj) {\n for ( var i=0; i< obj.Remove.objects.length; i++ ) {\n this.removeObject(obj.Remove.objects[i]);\n }\n } else if (\"ERROR\" in obj){\n // TODO: error listener(s)\n this.log(obj.ERROR);\n this.errorListeners.forEach((listener)=>listener(obj.ERROR));\n } else if ( \"Welcome\" in obj) {\n var welcome = obj.Welcome;\n if ( ! this.me ) {\n // FIXME: Uncaught TypeError: Cannot assign to read only property of function class\n let client = new User();\n this.me = Object.assign(client,welcome.client.User);\n }\n this.welcomeListeners.forEach((listener)=>listener(welcome));\n if ( welcome.permanents ) {\n welcome.permanents.forEach( o => this.addObject(o));\n }\n } else if ( \"response\" in obj) {\n this.log(\"Response to command\");\n if ( typeof this.responseListener === 'function') {\n var callback = this.responseListener;\n this.responseListener = null;\n callback(obj);\n }\n } else {\n this.log(\"ERROR: unknown message type\");\n }\n }", "function process_data_message(data_dict) {\n var data_str = JSON.stringify(data_dict);\n var new_fields = {};\n\n //console.log('Got new data message: ' + data_str);\n for (var field_name in data_dict) {\n var value = data_dict[field_name];\n switch (field_name) {\n ////////////////////////////////////////////////////\n // If we've got a cruise definition update\n case 'status:cruise_definition':\n // We will have been handed a list of [timestamp, cruise_definition]\n // pairs. Fetch the last cruise definition in the list.\n var cruise_timestamp = value[value.length-1][0];\n if (cruise_timestamp <= global_last_cruise_timestamp) {\n // We've already seen this cruise definition or a more recent\n // one. Ignore it.\n console.log('Got stale cruise definition - skipping...');\n continue;\n }\n global_last_cruise_timestamp = cruise_timestamp;\n var cruise_definition = value[value.length-1][1];\n\n // Make sure this definition has all the parts we need\n if (!cruise_definition.modes) {\n console.log('Cruise definition has no modes - ignoring.');\n break;\n }\n if (!cruise_definition.active_mode) {\n console.log('Cruise definition has no active mode - ignoring.');\n break;\n }\n if (!cruise_definition.loggers) {\n console.log('Cruise definition has no loggers - ignoring.');\n break;\n }\n\n ////////////////////////////////\n // Update the cruise id\n document.getElementById('cruise_id').innerHTML = cruise_definition['cruise_id'];\n\n ////////////////////////////////\n // Now update the cruise modes\n var modes = cruise_definition.modes;\n global_active_mode = cruise_definition.active_mode;\n\n var mode_selector = document.getElementById('select_mode');\n mode_selector.setAttribute('onchange', 'highlight_select_mode()');\n\n // Check whether modes have changed\n var modes_changed = (mode_selector.length !== modes.length);\n if (!modes_changed) {\n for (var m_i = 0; m_i < mode_selector.length; m_i++) {\n if (mode_selector[m_i].value !== modes[m_i]) {\n modes_changed = true;\n break;\n }\n }\n }\n\n // If modes have changed, delete old and redraw new\n if (modes_changed) {\n mode_selector.style.backgroundColor = 'white'\n // Remove all old mode options\n while (mode_selector.length) {\n mode_selector.remove(0);\n }\n for (m_i = 0; m_i < modes.length; m_i++) {\n var mode_name = modes[m_i];\n var opt = document.createElement('option');\n opt.setAttribute('id', 'mode_' + mode_name);\n opt.innerHTML = mode_name;\n\n if (mode_name == global_active_mode) {\n opt.setAttribute('selected', true);\n }\n mode_selector.appendChild(opt);\n }\n }\n\n ////////////////////////////////\n // Now update loggers\n var loggers = cruise_definition.loggers;\n\n // Has the actual list of loggers changed? If not, only update\n // what has changed.\n if (array_keys_match(global_loggers, loggers)) {\n for (var logger_name in loggers) {\n var button = document.getElementById(logger_name + '_config_button');\n button.innerHTML = loggers[logger_name].active;\n }\n break;\n }\n\n ////////////////////////////////\n // If the list of loggers has changed, we need to rebuild the\n // list. Begin by emptying out table rows except for header row.\n var table = document.getElementById('logger_table_body');\n var row_count = table.rows.length;\n var keep_first_num_rows = 1;\n for (var i = keep_first_num_rows; i < row_count; i++) {\n table.deleteRow(keep_first_num_rows);\n }\n\n // Stash our new logger list in the globals, then update the\n // loggers, creating one new row for each.\n global_loggers = loggers;\n for (var logger_name in loggers) {\n //console.log('setting up logger ' + logger_name);\n var logger = loggers[logger_name];\n\n // table row creation\n var tr = document.createElement('tr');\n tr.setAttribute('id', logger_name + '_row');\n\n var name_td = document.createElement('td');\n name_td.setAttribute('id', logger_name + '_td');\n tr.appendChild(name_td);\n name_td.innerHTML = logger_name;\n\n var config_td = document.createElement('td');\n config_td.setAttribute('id', logger_name + '_config_td');\n\n var button = document.createElement('button');\n button.setAttribute('id', logger_name + '_config_button');\n button.setAttribute('type', 'submit');\n button.innerHTML = logger.active;\n\n // Disable if user is not authenticated\n //if (! USER_AUTHENTICATED) {\n // button.setAttribute('disabled', true);\n //}\n button.setAttribute('onclick',\n 'open_edit_config(event, \\'' + logger_name + '\\')');\n config_td.appendChild(button);\n tr.appendChild(config_td);\n\n var stderr_td = document.createElement('td');\n var stderr_div = document.createElement('div');\n\n stderr_div.setAttribute('id', logger_name + '_stderr');\n stderr_div.setAttribute('style', 'height:30px;background-color:white;min-width:0px;padding:0px;overflow-y:auto;');\n stderr_div.style.fontSize = 'small';\n stderr_td.appendChild(stderr_div);\n tr.appendChild(stderr_td);\n table.appendChild(tr);\n\n // Also, since we now have a new logger, we'll want to subscribe\n // to stderr updates for it.\n new_fields['stderr:logger:' + logger_name] = {'seconds':88000};\n }\n\n break;\n\n ////////////////////////////////////////////////////\n // If we've got a logger status update.\n // value will be [[ timestamp, {status_dict} ]], where status_dict will\n // be a dict of logger_name:status pairs. 'status' will be an array of:\n // logger_name: {\n // config: config_name_string,\n // errors: [list of error strings],\n // failed: bool\n // pid: number or null if not running\n // running: ternary value:\n // true: we're running and is supposed to be\n // false: not running and is supposed to be\n // null: not running and not supposed to be\n // }\n case 'status:logger_status':\n reset_status_timeout(); // We've gotten a status update\n\n // Display logger section, if it's not already showing\n // TODO: optimize this so we don't do it every time.\n document.getElementById('empty_loggers').style.display = 'none';\n document.getElementById('status_and_loggers').style.display = 'block';\n\n var [timestamp, status_array] = value[0];\n var logger_status_timestamp = value[value.length-1][0];\n if (logger_status_timestamp <= global_last_logger_status_timestamp) {\n // We've already seen this logger status or a more recent\n // one. Ignore it.\n console.log('Got stale logger status - skipping...');\n continue;\n }\n global_last_logger_status_timestamp = logger_status_timestamp;\n\n for (var logger_name in status_array) {\n var logger_status = status_array[logger_name];\n var button = document.getElementById(logger_name + '_config_button');\n if (button == undefined) {\n continue;\n }\n button.innerHTML = logger_status.config;\n if (logger_status.status == 'RUNNING') {\n button.style.backgroundColor = \"lightgreen\";\n } else if (logger_status.status == 'EXITED') {\n button.style.backgroundColor = \"lightgray\";\n } else if (logger_status.status == \"STARTING\") {\n button.style.backgroundColor = \"khaki\";\n } else if (logger_status.status == \"BACKOFF\") {\n button.style.backgroundColor = \"gold\";\n } else if (logger_status.status == 'FATAL') {\n button.style.backgroundColor = \"red\";\n } else {\n button.style.backgroundColor = \"white\";\n }\n }\n break;\n\n ////////////////////////////////////////////////////\n // If something else, see if it's a logger status update\n default:\n var logger_stderr_prefix = 'stderr:logger:';\n\n if (field_name.indexOf(logger_stderr_prefix) == 0) {\n var logger_name = field_name.substr(logger_stderr_prefix.length);\n add_to_stderr(logger_name, value);\n continue;\n }\n }\n }\n // Do we have new field subscriptions? Create the subscription request.\n // But make sure we keep listening for future logger_list, mode_list\n // mode updates.\n if (Object.keys(new_fields).length) {\n new_fields['status:cruise_definition'] = {'seconds':-1};\n new_fields['status:logger_status'] = {'seconds':-1};\n\n var subscribe_message = {'type':'subscribe', 'fields':new_fields};\n send(subscribe_message);\n }\n}", "function onMessage(evt) {\n\t\t// Update the marks on the map\n\t\tvar data = JSON.parse(evt);\n\t\tswitch(data.type) {\n\t\t\tcase 'location':\n\t\t\t\t//noty({text: 'Incoming: New coordinates for geolocations.'});\n\t\t\t\tif (controller == \"Geolocations\") {\n\t\t\t\t\tupdateMarkers(data);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'update':\n\t\t\t\tif (data.section == \"events\") {\n\t\t\t\t\tnoty({text: 'Your event '+data.title+\" has been updated!\", type: 'information'});\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'history':\n\t\t\t\tincomingChatMessage(data);\n\t\t\t\tbreak;\n\n\t\t\tcase 'message':\n\t\t\t\tincomingChatMessage(data);\n\t\t\t\tbreak;\n\t\t}\n\t}", "sendStatusChanges() {\n this.fieldSlaveChannel.postMessage(\n new Message(\n FIELD_STATUS_WATCHER,\n {\n data: {\n fieldStatusPatch: this.fieldModel.status,\n },\n },\n ),\n );\n }", "function messageChangeHandler(/*msgs*/) {\n this.views.messages.render(this.model.messages);\n var count = document.querySelector('footer .messages-count');\n //console.log(this.model.messages.length + ' message' + (this.model.messages.length > 1 ? 's' : ''));\n count.textContent = 'Showing ' \n + this.model.messages.length.toLocaleString(this.model.locale)\n + ' message' \n + (this.model.messages.length > 1 ? 's' : '')\n + ' of ' + this.model.total.toLocaleString(this.model.locale);\n }", "function handleMessageEdit(event) {\n const { value } = event.target;\n setMessage(() => (value));\n }", "handleMessage(message){\n console.log(COMPONENT +' handleMessage()', message);\n if(message.TYPE === 'OrderItems' ){\n this.handleAddProduct(message.Array);\n }else if(message.TYPE === 'Confirmation'){\n this.disabled = true;\n\n /* Refresh record data. */\n refreshApex(this.getRecordResponse);\n }\n }", "function handleChannelMessage(message) {\n var json = $.parseJSON(message.data);\n if (json.action == \"updateElement\") {\n if (json.id == \"playlist\") {\n updatePlaylist(json.html);\n } else {\n $('#' + json.id).html(json.html);\n handleUpdatesTo(json.id);\n }\n }\n }", "updateField(stateStr, event) {\n\t\tif ((stateStr === 'message' && event.target.value.length < MESSAGE) || (stateStr === 'email' && event.target.value.length < EMAIL) || (stateStr === 'verification' && event.target.value.length < VERIFICATION)) {\n\t\t\tthis.setState({\n\t\t\t\t[stateStr]: {\n\t\t\t\t\tvalue: event.target.value,\n\t\t\t\t\terror: this.state[stateStr].error\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "handleSendingMessages(message) {\n console.log(\"Action Recognized --> \", message)\n if (message) {\n if (this.isColorCommand(message)) {\n this.socket.emit(\"change color\", message.split(\" \")[1])\n }\n else if (this.isUsernameChangeCommand(message)) {\n this.socket.emit(\"change username\", message.slice(7, message.length-1));\n }\n else {\n console.log(\"Message from client --> \", message)\n this.socket.emit(\"chat message\", message, this.state.username, this.state.color);\n }\n }\n }", "onReceivedMessage(messages) {\n this._storeMessages(messages);\n }", "onMessageChange(event) {\n this.setState({\n message: event.target.value\n })\n }", "function onMessageArrived(message) {\n console.log(message.destinationName)\n\n if (message.destinationName == \"unoesc/led_1\")\n alterar_badge_led(\"spanled1\", message.payloadString)\n\n if (message.destinationName == \"unoesc/trancar_1\")\n alterar_badge_led(\"spantranca1\", message.payloadString)\n\n if (message.destinationName == \"unoesc/led_2\")\n alterar_badge_led(\"spanled2\", message.payloadString)\n\n if (message.destinationName == \"unoesc/trancar_2\")\n alterar_badge_led(\"spantranca2\", message.payloadString)\n\n if (message.destinationName == \"unoesc/led_3\")\n alterar_badge_led(\"spanled3\", message.payloadString)\n\n if (message.destinationName == \"unoesc/trancar_3\")\n alterar_badge_led(\"spantranca3\", message.payloadString)\n\n if (message.destinationName == \"unoesc/sensor_1\")\n alterar_badge_sensor_alarme(\"spanpresenca1\", message.payloadString)\n\n if (message.destinationName == \"unoesc/sensor_2\")\n alterar_badge_sensor_alarme(\"spanpresenca2\", message.payloadString)\n\n if (message.destinationName == \"unoesc/sensor_3\")\n alterar_badge_sensor_alarme(\"spanpresenca3\", message.payloadString)\n\n if (message.destinationName == \"unoesc/buzzer\")\n alterar_badge_buzzer(\"status_buzzer\", message.payloadString)\n\n verificarAtividade(message.destinationName)\n}", "function onMessageArrived(message) {\r\n Men2Recv=message.payloadString;\r\n console.log(Men2Recv);\r\n accion(Men2Recv);\r\n}", "async function handleSend(newMessage = []) {\n const text = newMessage[0].text;\n await firestore()\n .collection('users')\n .doc(user.uid)\n .collection('CHATS')\n .doc(contact._id)\n .collection('MESSAGES')\n .add({\n text,\n createdAt: new Date().getTime(),\n user: {\n _id: user.uid,\n name: user.displayName,\n avatar: user.photoURL,\n },\n pending: true,\n source: true,\n received:false,\n unread:0\n });\n }", "function handleMessage(event) {\r\n\t\t//console.log('Received message: ' + event.data);\r\n\t\tvar data = JSON.parse(event.data);\r\n\t\thandleReceiveData(data);\r\n\t}", "function userMsgProp(msg)\n{\n $messages = $('.messages');\n message = new Message({\n text: msg,\n messageside: 'right'\n });\n message.draw();\n $messages.animate({scrollTop: $messages.prop('scrollHeight')}, 100);\n $('#input').val('');\n}", "handleMessages(messages) {\n\n }", "function newRecievedMessage(messageText) {\n\n\t// Variable storing the message with the \"\" removed\n\tvar removedQuotes = messageText.replace(/[\"\"]/g,\"\");\n\t\n\t// Determining options type\n\tselectOne = removedQuotes.startsWith(\"single\");\n\tselectLang = removedQuotes.startsWith(\"lang\");\n\tselectOption = removedQuotes.startsWith(\"option\");\n\n\tif(removedQuotes.startsWith(\"text\")){\n\t\t$('input').show();\n\t\t$('#submit').show();\n\t} else if (removedQuotes.startsWith(\"multiple\"))\n\t{\n\t\tconsole.log(\"MULTIPLE\")\n\t\t$('#submit').show();\n\t\tselectMultiple = true;\n\t}\n\n\t// update the last message recieved variable for storage in the database\n\t// lastRecievedMessage = removedQuotes;\n\t// console.log(lastRecievedMessage)\n\t// If the message contains a <ar then it is a message\n\t// whose responses are buttons\n\tif(removedQuotes.includes(\"<ar\"))\n\t{\n\t\tbuttonResponse(removedQuotes);\t\n\t}\n\n\t// if the message contains only <br then it is a multi line message\n\telse if (removedQuotes.includes(\"<br\")) \n\t{\n\t\tmultiMessage(removedQuotes);\n\t} \n\n\t// There arent multiple messages to be sent, or message with buttons\n\telse\n\t{\t\n\t\t// Show the typing indicator\n\t\tshowLoading();\n\n\t\t// After 3 seconds call the createNewMessage function\n\t\tsetTimeout(function() {\n\t\t\tcreateNewMessage(removedQuotes);\n\t\t}, DEFAULT_TIME_DELAY);\n\t}\n}", "handleChange(data){\r\n this.setState({\r\n input: data.target.value,\r\n messages: this.state.messages\r\n })\r\n }", "dataMessage () {\n\t if (this.fin) {\n\t const messageLength = this.messageLength;\n\t const fragments = this.fragments;\n\n\t this.totalPayloadLength = 0;\n\t this.messageLength = 0;\n\t this.fragmented = 0;\n\t this.fragments = [];\n\n\t if (this.opcode === 2) {\n\t var data;\n\n\t if (this.binaryType === 'nodebuffer') {\n\t data = toBuffer(fragments, messageLength);\n\t } else if (this.binaryType === 'arraybuffer') {\n\t data = toArrayBuffer(toBuffer(fragments, messageLength));\n\t } else {\n\t data = fragments;\n\t }\n\n\t this.onmessage(data, { masked: this.masked, binary: true });\n\t } else {\n\t const buf = toBuffer(fragments, messageLength);\n\n\t if (!isValidUTF8(buf)) {\n\t this.error(new Error('invalid utf8 sequence'), 1007);\n\t return;\n\t }\n\n\t this.onmessage(buf.toString(), { masked: this.masked });\n\t }\n\t }\n\n\t this.state = GET_INFO;\n\t }", "function onMessageArrived(message) {\n console.log(message.destinationName, ' -- ', message.payloadString);\n\n if (message.destinationName == \"X\"){\n posX = message.payloadString;\n }\n if (message.destinationName == \"Y\"){\n posY = message.payloadString;\n console.log(message.payloadString);\n }\n if (message.destinationName == \"smile\"){\n heartEyes();\n }\n updateEyes(posX, posY);\n\n}", "function handle_msg(msg, clock_time)\r\n{\r\n // add to recorded_data if recording is on\r\n\r\n if (recording_on)\r\n {\r\n recorded_records.push(JSON.stringify(msg));\r\n }\r\n\r\n var sensor_id = msg[RECORD_INDEX];\r\n\r\n console.log(\"Got message: \"+JSON.stringify(msg));\r\n\r\n // If an existing entry in 'sensors' has this key, then update\r\n // otherwise create new entry.\r\n if (sensors.hasOwnProperty(sensor_id))\r\n {\r\n update_sensor(msg, clock_time);\r\n }\r\n else\r\n {\r\n init_sensor(msg, clock_time);\r\n }\r\n\r\n}", "systemMessage(oldUser, newUser) {\n const newMessageObj = {\n type: 'system',\n content: oldUser + ' changed their name to ' + newUser + '.'\n };\n this.socket.send(JSON.stringify(newMessageObj));\n this.setState({currentUser: {name: newUser}});\n }", "function onMessageArrived(message) {\n var data = message.payloadString.split(',');\n var today = new Date();\n var time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();\n console.log(\"onMessageArrived: \" + data[0] + \" and \" +data[1]);\n document.getElementById(\"messages\").innerHTML = '<h3>'+ data[0] +'</h3>';\n document.getElementById(\"messages1\").innerHTML = '<h3>'+ data[1] +'</h3>';\n document.getElementById(\"waktunow\").innerHTML = '<p>'+ date +' '+ time +'</p>';\n sendData(data[0], data[1]);\n addData(time, data[0]);\n addData1(time, data[1]);\n}", "recieveMessage(message) {\r\n console.log(message);\r\n\r\n if (!(\"type\" in message)) return;\r\n\r\n if (message.type === \"getGitUserAndEmail\") this.getGitUserAndEmail(message);\r\n else if (message.type === \"setGitUserAndEmail\") this.setGitUserAndEmail(message);\r\n else if (message.type === \"initRepo\") this.initRepo(message);\r\n else if (message.type === \"cloneRepo\") this.cloneRepo(message);\r\n else if (message.type === \"stage\") this.stage(message);\r\n else if (message.type === \"unstage\") this.unstage(message);\r\n else if (message.type === \"discard\") this.discard(message);\r\n else if (message.type === \"commit\") this.commit(message);\r\n else if (message.type === \"branch\") this.branch(message);\r\n else if (message.type === \"checkout\") this.checkout(message);\r\n else if (message.type === \"merge\") this.merge(message);\r\n else if (message.type === \"getLocalBranches\") this.getLocalBranches(message);\r\n else if (message.type === \"getRemoteBranches\") this.getRemoteBranches(message);\r\n else if (message.type === \"getRemote\") this.getRemote(message);\r\n else if (message.type === \"setRemote\") this.setRemote(message);\r\n else if (message.type === \"fetch\") this.fetch(message);\r\n else if (message.type === \"push\") this.push(message);\r\n else if (message.type === \"pull\") this.pull(message);\r\n else if (message.type === \"rebase\") this.rebase(message);\r\n else if (message.type === \"reset\") this.reset(message);\r\n else if (message.type === \"stash\") this.stash(message);\r\n else if (message.type === \"listStash\") this.listStash(message);\r\n else if (message.type === \"popStash\") this.popStash(message);\r\n else if (message.type === \"dropStash\") this.dropStash(message);\r\n else if (message.type === \"getCommits\") this.getCommits(message);\r\n else if (message.type === \"getStagedFiles\") this.getStagedFiles(message);\r\n else if (message.type === \"getChangedFiles\") this.getChangedFiles(message);\r\n }", "function onMessageReceived(event){\n\t\ttry{\n\t\t\tvar message = event.data;\n\t\t\tvar json = JSON.parse(message);\n\t\t\t\n\t\t\tif(json.errorMessage){\n\t\t\t\tconsole.log(\"Error message received from server (control unit), error message was: \" + json.errorMessage);\n\t\t\t}else if(json.propertyName && json.propertyValue !== undefined){\n\t\t\t\tsetPropertyValue(json.propertyName, json.propertyValue);\n\t\t\t}else if(json.methodName && json.methodParameters){\n\t\t\t\tcallMethod(json.methodName, json.methodParameters);\n\t\t\t}else{\n\t\t\t\tconsole.log(\"Invalid incoming data from server, expected data to contain propertyName and propertyValue\");\n\t\t\t}\n\t\t}catch(e){\n\t\t\tconsole.log(\"onMessageReceived, Exception occured with message: \" + e.message);\n\t\t\tconsole.log(e.stack);\n\t\t}\n\t}", "_onWrite () {\n this._decrementSendingMessageCounter()\n }", "messageHandler(message) {\n let id = message.id,\n senderId = (message.sender) ? message.sender.id : 0,\n sender = (message.sender) ? message.sender : null,\n dateTimeMoment = moment(message.date_time_created),\n type = message.type\n\n let newDate = dateTimeMoment.format('YYYY-MM-DD')\n if(this.room.lastDate !== newDate && this.room.lastDate){\n this.setDate(this.room.lastDate)\n }\n\n if(!this.room.firstDate)\n this.room.firstDate = newDate\n\n if(this.room.firstSender === null)\n this.room.firstSender = senderId\n\n if(!this.room.firstMessage)\n this.room.firstMessage = id\n\n\n let speaker = !(this.room.lastSender === senderId && this.room.lastSender !== null)\n let messageTemplate = this.getMessageTemplate({\n id: id,\n type: type,\n message: message.message.message.replace(/\\n/g, '<br />'),\n sender: sender,\n time: dateTimeMoment.format('HH:mm')\n }, speaker)\n\n this.container.append(messageTemplate)\n\n this.room.lastMessage = id\n this.room.lastSender = senderId\n this.room.lastDate = dateTimeMoment.format('YYYY-MM-DD')\n }", "function onMessageArrived(message) {\n //console.log(message);\n //console.log(message.destinationName);\n \n if (message.destinationName == (\"WebDeliver:\"+userID)) {\n data_bike = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"chemin:\"+userID)) {\n data_chemin = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"map:\"+userID)) {\n //console.log(message.payloadString);\n data_map = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"client:\"+userID)) {\n data_client = JSON.parse(message.payloadString);\n hasMap++;\n\t}\n\tif (message.destinationName == (\"timeDelivery:\"+userID)) {\n\t\t$(\".info\").removeClass(\"hide\");\n\t\tdata_time = int(JSON.parse(message.payloadString));\n\t\t$(\"#time\").text(data_time);\n\t\tvar timeOrder = setInterval(function (){\n\t\t\tif ($(\"#time\").text() <=1) {\n\t\t\t\tclearInterval(timeOrder);\n\t\t\t\t$(\"#time\").text(\"1\");\n\t\t\t}\n\t\t\t$(\"#time\").text($(\"#time\").text()-1);\n\t\t\t\n\t\t},1000); //toutes les 10 secondes\n hasMap++;\n }\n }", "componentWillReceiveProps (props) {\n let message = props.message;\n message.read = true;\n MessagesStorage.put(message);\n }", "function messageHandler (msg) {\n\ttry {\n\t var command = JSON.parse(msg.getData());\n\t switch (command.Name) {\n\t\tcase 'SetTemperature':\n\t\t var temperatura = command.Parameters.Temperatura;\n\t\t console.log (\"\")\n\t\t console.log (\">>>>>> Receiving command <SetTemperature>. Toggling the relay\");\n\t\t console.log (\"\")\n\t\t relayDevice.toggle ()\n\t\t client.complete(msg, printErrorFor('complete'));\n\t\t break;\n\t\tdefault:\n\t\t console.error('Unknown command: ' + command.Name);\n\t\t client.reject(msg, printErrorFor('complete'));\n\t\t break;\n\t }\n\t}\n\tcatch (err) {\n\t printErrorFor('parse received message')(err);\n\t client.reject(msg, printErrorFor('reject'));\n\t}\n}", "_newMessage(message) {\n this.messages.push(message);\n this.emitChange();\n }", "handleMessage(message) {\n console.log('Came to handleMessage in SubscriberLWC. Message: ' + message.textMessage);\n this.receivedMessage = message.textMessage;\n }", "handleSendMessage() {\n alert('Message send with success !');\n this.setState({newMessageTitle: ''});\n this.setState({newMessageContent: ''});\n this.setState({selectedContact: 0});\n }", "dataMessage () {\n if (this.fin) {\n const messageLength = this.messageLength;\n const fragments = this.fragments;\n\n this.totalPayloadLength = 0;\n this.messageLength = 0;\n this.fragmented = 0;\n this.fragments = [];\n\n if (this.opcode === 2) {\n var data;\n\n if (this.binaryType === 'nodebuffer') {\n data = toBuffer(fragments, messageLength);\n } else if (this.binaryType === 'arraybuffer') {\n data = toArrayBuffer(toBuffer(fragments, messageLength));\n } else {\n data = fragments;\n }\n\n this.onmessage(data, { masked: this.masked, binary: true });\n } else {\n const buf = toBuffer(fragments, messageLength);\n\n if (!isValidUTF8(buf)) {\n this.error(new Error('invalid utf8 sequence'), 1007);\n return;\n }\n\n this.onmessage(buf.toString(), { masked: this.masked });\n }\n }\n\n this.state = GET_INFO;\n }", "function handleMessage(request) {\n log.log('[' + id + '] handle message:', request, request.type);\n if (request.type == 'recording') {\n recording = request.value;\n } else if (request.type == 'params') {\n updateParams(request.value);\n } else if (request.type == 'wait') {\n checkWait(request.target);\n } else if (request.type == 'propertyReplacement') {\n\tpropertyReplacement(request);\n } else if (request.type == 'type') {\n\ttype(request);\n } else if (request.type == 'select') {\n\tselect(request);\n } else if (request.type == 'copy') {\n\tcopy(request);\n } else if (request.type == 'paste') {\n\tpaste(request);\n } else if (request.type == 'event') {\n simulate(request);\n } else if (request.type == 'snapshot') {\n port.postMessage({type: 'snapshot', value: snapshotDom(document)});\n } else if (request.type == 'reset') {\n reset();\n } else if (request.type == 'url') {\n port.postMessage({type: 'url', value: document.URL});\n }\n}", "function setMessage(processedMsg) {\n \tgenerateMessage(null, processedMsg.created, processedMsg.message)\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n let readings = JSON.parse(message.payloadString);\n $('#pi1_timestamp').text(readings['pi1_timestamp']);\n $('#illuminance_value').text(readings['illuminance']);\n $('#temperature_value').text(readings['temperature']);\n $('#humidity_value').text(readings['humidity']);\n localStorage.setItem('illuminance', readings['illuminance']);\n localStorage.setItem('temperature', readings['temperature']);\n localStorage.setItem('humidity', readings['humidity']);\n localStorage.setItem('pi1_timestamp', readings['pi1_timestamp']);\n enableDisable('pi1');\n }" ]
[ "0.68784744", "0.6605492", "0.65390354", "0.6449496", "0.641622", "0.6282208", "0.62541574", "0.61743677", "0.6152933", "0.61390966", "0.61259294", "0.6114855", "0.6113724", "0.6100701", "0.6077725", "0.6067522", "0.605933", "0.6027558", "0.59991044", "0.5992268", "0.59915566", "0.59896576", "0.5986755", "0.5983527", "0.5976045", "0.5966613", "0.5966484", "0.59563506", "0.5938306", "0.59193134", "0.59040976", "0.5903501", "0.5901108", "0.5899456", "0.58960307", "0.5890353", "0.5886236", "0.5885005", "0.5871403", "0.5862426", "0.586108", "0.5859392", "0.5858316", "0.5852184", "0.5842796", "0.5830753", "0.5827634", "0.5824732", "0.5806346", "0.58061224", "0.5788935", "0.578531", "0.57815135", "0.575873", "0.57523346", "0.575207", "0.574251", "0.5742468", "0.57409966", "0.5733131", "0.5727195", "0.5723034", "0.5713886", "0.5706484", "0.56994236", "0.56960416", "0.56944335", "0.56931245", "0.5692215", "0.56780976", "0.5677333", "0.567702", "0.56760156", "0.5671491", "0.5668788", "0.56612283", "0.5657761", "0.5656427", "0.5655632", "0.5642652", "0.5638558", "0.5635096", "0.56339383", "0.56333905", "0.56283426", "0.5628246", "0.56252295", "0.56243366", "0.5624113", "0.5623617", "0.56159425", "0.5615388", "0.5614856", "0.561195", "0.5611022", "0.56088305", "0.56044406", "0.55985934", "0.5590384", "0.5579818", "0.5579759" ]
0.0
-1
When disconnected from host, set port to null value so that it may reconnect at the next request
function onDisconnected() { console.log("Failed to connect: " + chrome.runtime.lastError.message); port = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static set port(value) {}", "repickHost() {\n this.host = null;\n var newHostId = Object.keys(this.socketNames)[0];\n this.host = newHostId ? newHostId : null;\n }", "reset() {\n this.socket = this._newSocket();\n }", "get port() { return this._port; }", "reassignHostSocket() {\n this.hostSocket = undefined;\n\n if (this.playerMap.getActivePlayerCount() > 0) {\n this.setHostSocketAndNotify(this.playerMap.getActivePlayerList()[0].socket);\n }\n }", "disconnect() {\n if (this.proto == 'tcp') {\n this._api.disconnect(this.socketId);\n }\n }", "static get port() {}", "constructor(host = 'localhost', port = 4444) {\n\t\tsuper()\n\n\t\tthis.debug = false\n\t\tthis.host = host\n\t\tthis.port = port\n\n\t\tthis._connecting = null\n\t\tthis._idCounter = 1\n\t\tthis._promises = {}\n\t\tthis._socket = undefined\n\t}", "close() {\n if (this.connectStream) {\n this.connectStream.cancel();\n this.connectStream = null;\n }\n\n this.serverAddress = null;\n this.hostname = null;\n this.address = null;\n this.callbacks = null;\n this.creds = null;\n }", "reset() {\n const protocol = this.getBestProtocolMatch();\n\n this.setHangingProtocol(protocol);\n }", "setPort(port) {\n if (port === undefined || port === null || port === \"\") {\n this._port = undefined;\n }\n else {\n this.set(port.toString(), \"PORT\");\n }\n }", "setPort(port) {\n if (port === undefined || port === null || port === \"\") {\n this._port = undefined;\n }\n else {\n this.set(port.toString(), \"PORT\");\n }\n }", "SOCKET_RECONNECT_DECLINED(state) {\n // eslint-disable-next-line\n console.log(\"%c socket_on_reconnect_declined\", \"color:green\");\n // TODO: Find way to reset whole state\n // state.user = null;\n state.userId = null;\n state.name = null;\n state.color = null;\n state.users = [];\n state.broadcastMessages = [];\n state.rooms = null;\n state.messages = [];\n state.room = null;\n state.isHost = false;\n router.push(\"/login\");\n }", "_reset() {\n this.log(\"Closing connections.\");\n this._stopTrackingTask();\n this._partialResponse = \"\";\n this._closeSocket(this._socket);\n this._closeSocket(this._dataSocket);\n // Set a new socket instance to make reconnecting possible.\n this.socket = new Socket();\n }", "@action\n modulePortFinishedConnecting() {\n if (get(this, 'connectingToPort')) {\n this.addConnection(get(this, 'connectingFromPort'), get(this, 'connectingToPort'));\n }\n set(this, 'connectingFromPort', null);\n set(this, 'connectingToPort', null);\n }", "function stripPortNumber(host) {\r\n\t\t\t\treturn host.split(':')[0];\r\n\t\t\t}", "function resetConnection() {\n //close socket\n GEPPETTO.MessageSocket.close();\n //clear message handlers, all tests within module should have performed by time method it's called\n GEPPETTO.MessageSocket.clearHandlers();\n //connect to socket again for next test\n GEPPETTO.MessageSocket.connect(GEPPETTO.MessageSocket.protocol + window.location.host + '/' + window.BUNDLE_CONTEXT_PATH + '/GeppettoServlet');\n }", "constructor() {\n this.conn = null;\n this.log = util.log.dialer();\n }", "removeConnectTimeout() {\r\n var self = this;\r\n clearTimeout(self.connectTimeout);\r\n }", "disconnect() {\n this.shouldReconnect = false;\n this._listenersMap = new Map();\n this.closeAllConnections()\n }", "reconnect() {\n if ( this.socket )\n {\n this.socket.close();\n delete this.socket;\n }\n\n this.connect();\n }", "constructor () {\n this.conn = null\n this.log = util.log.dialer()\n }", "constructor () {\n this.conn = null\n this.log = util.log.dialer()\n }", "disconnect() {\n window.removeEventListener('message', this.onConnectionMessageHandler);\n this.closePort();\n }", "_resetState() {\n this.anonymousConnectionFailed = false;\n this.connectionFailed = false;\n this.lastErrorMsg = undefined;\n this.disconnectInProgress = undefined;\n }", "constructor(port) {\n this.port = port;\n }", "disconnect() {\n this.connection.destroy()\n }", "_resetState() {\n this.anonymousConnectionFailed = false;\n this.connectionFailed = false;\n this.lastErrorMsg = undefined;\n this.disconnectInProgress = undefined;\n }", "reset() {\n this.heartbeatTask && clearInterval(this.heartbeatTask);\n this.heartbeatTask = null;\n this.healthCheck && clearInterval(this.healthCheck);\n this.healthCheck = null;\n (this.socket \n && this.socket.unref().end().destroy() \n && (this.socket = null));\n this.buffer = Buffer.alloc(0);\n this.totalLength = -1;\n }", "function disconnect(){\r\n\tconn.disconnect();\r\n}", "socketClose() {\n console.log('sock close');\n\n GlobalVars.reset();\n this.reset();\n\n this.reconnect();\n }", "ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "setPort(value) {\n return super.put(\"port\", value);\n }", "function onPortDisconnect (port) {\r\n if (port.error) {\r\n console.log('disconnected with error', port.error);\r\n }\r\n state.port = null;\r\n\r\n // Fail all ongoing jobs.\r\n state.jobs.forEach(job => {\r\n if ((job.state === 'waiting') || (job.state === 'active')) {\r\n job.ended(1, 'native app disconnected unexpectedly.');\r\n }\r\n });\r\n}", "stopConnecting()\n {\n this.connecting = false;\n }", "close() {\n if (this.listener) {\n this.listener.cancel();\n this.listener = null;\n }\n \n this.rpc = null;\n this.serverAddress = null;\n this.creds = null;\n this.session = null;\n this.sourceHandlers = null;\n this.keyHandlers = null;\n this.connected = false;\n }", "onDisconnect(socket) {\n\n }", "function disconnect() {\n conn.close();\n conn = null;\n}", "function freePort (callback) {\n var server = net.createServer();\n var port = 0;\n\n server.on('listening', function () {\n port = server.address().port;\n server.close();\n });\n server.on('close', function () {\n callback(null, port);\n });\n\n server.listen(0, '127.0.0.1');\n}", "ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "destroy() {\n this.socket.destroy();\n }", "changePort(port) {\n\n\t\t// check type\n\t\tif (typeof port == \"number\" || typeof port == \"string\") {\n\n\t\t\tthis.#_socket.close();\t\t\n\n\t\t\tthis.#_port = port;\n\t\t\tif(this.#_useSecureConnection) this.#_websocketurl = 'wss://' + this.#_ip + ':' + this.#_port;\n\t\t\telse this.#_websocketurl = 'ws://' + this.#_ip + ':' + this.#_port;\n\t\t\tconsole.log('trying to connect to: ' + this.#_websocketurl);\n\n\t\t\tthis.startAugmentaWebsocket();\n\t\t\t\n\t\t} else {\n\t\t\tconsole.log(\"port must be a string or number\")\n\t\t}\n\n\t}", "disconnect() {\n\t\tthis.debug('disconnect');\n\t\tif(!this._socket) return;\n\n\t\tif(this._reconnectTimer) {\n\t\t\tclearTimeout(this._reconnectTimer);\n\t\t\tthis._reconnectTimer = null;\n\t\t}\n\t\tif(this.__netstatTimer) {\n\t\t\tclearInterval(this.__netstatTimer);\n\t\t\tthis.__netstatTimer = null;\n\t\t\tthis._measureSpeed();\n\t\t}\n\n\t\tif(this._socket.destroyed) return;\n\n\t\tthis._beforeDisconnect && this._beforeDisconnect();\n\n\t\tthis._socket.removeAllListeners('end');\n\t\tthis._socket.removeAllListeners('close');\n\t\tthis._socket.destroy();\n\t\tthis._connected = false;\n\n\t\tthis.emit('disconnected');\n\t\tthis.status = \"Disconnected\";\n\t}", "ondisconnect() {\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "function onConnect () {\n peer.removeListener('error', onError)\n peer.removeListener('connect', onConnect)\n }", "function onConnect () {\n peer.removeListener('error', onError)\n peer.removeListener('connect', onConnect)\n }", "disconnect() { socket_close(this) }", "disconnect() { }", "disconnect() { }", "disconnect() { }", "function onPortDisconnect() {\n window.removeEventListener('message', onHookMessage);\n }", "_onClose() {\n this._socket = null;\n this._osk = null;\n this._connectedAt = 0;\n }", "function resetPeerConn() {\n delete require.cache[\n require.resolve('../../../app/scripts/webrtc/peer-connection')\n ];\n peerConn = require('../../../app/scripts/webrtc/peer-connection');\n}", "disconnect() {\n\t\tif (this.client === undefined) {\n\t\t\treturn\n\t\t}\n\t\tthis.client.disconnect()\n\t\tthis.portalId = undefined\n\t\tthis.client.end()\n\t}", "constructor() {\n super(1, 'Transporter');\n this.serverLostMessage = 'Server Connection Lost: Reconnecting...';\n this.url = false;\n this.busy = false;\n this.stop = true;\n this._serverInterruptView = false;\n this._clientEvalError = false;\n this._busyFlushTimeout = false;\n }", "function onDisconnect() {\n pruneConnectionsMap();\n}", "SOCKET_RECONNECT() {\n // console.info(state, count);\n }", "clear () {\n this.connection = null;\n this.vm = null;\n this.username = null;\n this.projectId = null;\n if (this._connectionTimeout) {\n clearTimeout(this._connectionTimeout);\n this._connectionTimeout = null;\n }\n this.connectionAttempts = 0;\n }", "function resetFirewallToPreviousState(port) {\n if (process.platform != 'win32') {\n return\n }\n const BLOCK_CONNECTION_ON_PORT_COMMAND = `netsh advfirewall firewall delete rule name=\"Pastty\" dir=in protocol=TCP localport=${port}`\n cmd.runCommand(BLOCK_CONNECTION_ON_PORT_COMMAND)\n}", "onClose() {\n if (!this.dead) this.client.setTimeout(this.connect.bind(this), this.attempts * 1000);\n }", "function disconnect() {\r\n\t\t console.log('disconnect!');\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED,\r\n\t\t onConnectionSuccess);\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_FAILED,\r\n\t\t onConnectionFailed);\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED,\r\n\t\t disconnect);\r\n\t\t}", "disconnect() {\n if (!this.stopped) {\n this.socket.disconnect();\n this.stopped = true;\n }\n }", "disconnect(){}", "setHost(host) {\n if (!host) {\n this._host = undefined;\n }\n else {\n this.set(host, \"SCHEME_OR_HOST\");\n }\n }", "setHost(host) {\n if (!host) {\n this._host = undefined;\n }\n else {\n this.set(host, \"SCHEME_OR_HOST\");\n }\n }", "disconnect () {\n // close all data tunnel\n this.userTunnel.off();\n this.messageTunnel.off();\n this.channelStatusTunnel.off();\n this.removeAllListeners();\n }", "disconnected() {}", "onDisconnected() {\n if (!this.connected) return\n this.multiplexer.stop()\n // We need to unset the id in order to receive an immediate response with new\n // client id when reconnecting.\n this.id = undefined\n this.connected = false\n log('disconnected')\n this.emit('disconnected')\n }", "cancel () {\n this._buf = null\n this._dataState = 0\n this._clearTimeout()\n\n if (!this.socket) return\n\n this.isConnected = false\n this.socket.removeAllListeners()\n this.socket.destroy()\n this.socket.unref()\n\n this.socket = null\n }", "handleDisconnection() {}", "SOCKET_RECONNECT() {\n //console.info(state, count);\n }", "function resetState() {\n webSockOpts = undefined;\n ws = null;\n wsUp = false;\n host = undefined;\n url = undefined;\n pendingEvents = [];\n handlers = {};\n clusterNodes = [];\n clusterIndex = -1;\n glyphs = [];\n connectRetries = 0;\n openListeners = {};\n nextListenerId = 1;\n }", "killServer(port) {\n port = port.toString();\n\n let temp = this.servers[port];\n\n setTimeout(() => {\n this.waitingServers[port] = temp;\n this.waitingPorts.push(port);\n }, Math.floor(Math.random() * this.MAX_PROCESS_TIME));\n delete this.servers[port];\n }", "function removeConnection() {\n\t\tthis.originPort.remove();\n\t\tthis.destinationPort.remove();\n\t\tdocument.getElementById(MAP).removeChild(document.getElementById(this.id));\n\t}", "offsocket() {\n return socket.off('res');\n }", "disconnect() {\n console.log(\"disconnect!\");\n this.connection.removeEventListener(\n JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED,\n this.onConnectionSuccess.bind(this)\n );\n this.connection.removeEventListener(\n JitsiMeetJS.events.connection.CONNECTION_FAILED,\n this.onConnectionFailed.bind(this)\n );\n this.connection.removeEventListener(\n JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED,\n this.disconnect.bind(this)\n );\n\n this.disconnectedFunction();\n }", "constructor() {\n this.network = null;\n }", "static UnregisterHost() {}", "function getPort () {\n return _port++;\n}", "reset() {\n this.portIndex = 0;\n this.results = [];\n this.error = null;\n this.prepare(true);\n }", "disconnect() {\n try {\n if (this._connector) {\n this._connector.$disconnect();\n }\n } catch(e) {\n /* ignore any error */\n }\n }", "disconnect() {\n let _this = this;\n\n _this._continuousOpen = false;\n if (_this._sock) {\n _this._sendClose();\n }\n }", "function closeConnection() {\n nativeAppPort.disconnect();\n}", "function stop(callback) {\n searchForExisting(function(port) {\n if (port) {\n var client = tcp.connect({port:port}, function() {\n client.write(new Buffer([0,0,0]));\n client.end();\n });\n client.on('close', function() {\n callback();\n });\n } else {\n callback();\n }\n });\n}", "function reconnect () {\n if (connection.killed) {\n return;\n }\n\n // Make sure the connection is closed...\n try {\n connection.client.end();\n } catch (e) {}\n\n // Remove this from the available connections.\n self.connections = _.reject(self.connections, {port: port, host: host});\n connection.killed = true;\n\n // Wait and reconnect.\n setTimeout(function () {\n self.addConnection(port, host);\n }, config.check_interval);\n }", "function getPort(){\n\t\treturn this.port;\n\t}", "function reset_timeout() {\n\n // Get rid of old timeout (if any)\n window.clearTimeout(receive_timeout);\n\n // Set new timeout\n receive_timeout = window.setTimeout(function () {\n close_tunnel(new Status(Status.Code.UPSTREAM_TIMEOUT, \"Server timeout.\"));\n }, tunnel.receiveTimeout);\n\n }", "disconnect() {\n // Clean the listener.\n this.lightSensor.listen(undefined);\n return this._client.cleanup()\n .catch(err => {\n console.log(err);\n });\n }", "freeSocket(variable) {\n this.scope_var_socket_map.set(variable, undefined);\n }", "set listenerPort(port) {\n if(typeof port != 'number') {\n port = Number.parseInt(port);\n }\n if(port) {\n this._listenerPort = port;\n } else {\n this._listenerPort = kDefaultListenerPort;\n }\n }", "function removePort() {\n\t\tthis.ne.removePort(this);\n\t\tdocument.getElementById(this.ne.id).removeChild(document.getElementById(this.id));\n\t}", "shutdown() {\n this.connectionManager.shutdown();\n }", "function socketOnError() {\n this.destroy();\n}", "function socketOnError() {\n this.destroy();\n}", "function socketOnError() {\n this.destroy();\n}", "function clientDisconnect() {\r\n delete clients[connection.remoteAddress];\r\n console.log('connection closed: ' + remoteAddress + \" \" + now.getHours() + \":\" + now.getMinutes() + \":\" + now.getSeconds());\r\n\r\n\r\n }", "resetAddress() {\n delete this.network.address;\n }", "function socketOnError () {\n this.destroy();\n}" ]
[ "0.66604096", "0.6570076", "0.64096314", "0.6310094", "0.6273757", "0.6256183", "0.6221901", "0.6196667", "0.6173534", "0.6066822", "0.6055589", "0.6055589", "0.6052514", "0.6027057", "0.60181713", "0.60075426", "0.5991197", "0.5986552", "0.5976626", "0.5960655", "0.59246415", "0.59179485", "0.59179485", "0.5914387", "0.5906173", "0.5888545", "0.5886876", "0.5881348", "0.5870695", "0.5854486", "0.5840871", "0.58119655", "0.5802761", "0.5748364", "0.57435536", "0.57384694", "0.5734225", "0.57148755", "0.56944317", "0.56935203", "0.56881917", "0.56881917", "0.5682569", "0.5666665", "0.56377137", "0.56274146", "0.56265026", "0.56265026", "0.56249917", "0.5619538", "0.5619538", "0.5619538", "0.56087166", "0.56051177", "0.560116", "0.558464", "0.55801535", "0.55717593", "0.55600953", "0.55541164", "0.55479795", "0.55401534", "0.5531599", "0.55298775", "0.55287874", "0.55284405", "0.55284405", "0.5527912", "0.5522543", "0.5517708", "0.551708", "0.55162907", "0.54940975", "0.54918766", "0.5465018", "0.54522735", "0.5447695", "0.54400223", "0.54392517", "0.54342353", "0.54228187", "0.54199404", "0.5413936", "0.540098", "0.53980374", "0.539399", "0.5392737", "0.53888905", "0.53885746", "0.5386103", "0.53751475", "0.5373535", "0.5372427", "0.53718054", "0.53644747", "0.53644747", "0.53644747", "0.5361086", "0.5354075", "0.53414935" ]
0.6781185
0
Flip between a hidden password field and a regular text field
function showPassword() { let button = document.getElementById('show-button'); let password_field = document.getElementById('passwd'); // If currently showing the password if (password_field.type == 'text') { password_field.type = 'password'; button.innerHTML = 'Show'; } else { password_field.type = 'text'; button.innerHTML = 'Hide'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showHiddenPassword() {\n let passwordInputField = document.getElementById(\"password\");\n if (passwordInputField.type === \"password\") {\n passwordInputField.type = \"text\";\n } else {\n passwordInputField.type = \"password\";\n }\n}", "function showHidePass() {\n var x = document.getElementById(\"show-password\");\n if (x.type === \"password\") {\n x.type = \"text\";\n } else {\n x.type = \"password\";\n }\n}", "function toggle_pw_field(e){\n e.preventDefault();\n\n var pw_field = document.getElementById('signup__password');\n if( pw_field.type=='password' ){\n pw_field.type = 'text';\n\n } else {\n pw_field.type = 'password';\n }\n\n return false;\n}", "function togglePassword()\n{\n var passwordField = document.getElementById('inputPassword');\n if(passwordField.type === \"password\")\n {\n passwordField.type = \"text\";\n }\n else\n {\n passwordField.type = \"password\";\n }\n}", "function showPassword(password) {\n $(\"input\").prev(\"p\").show(200);\n $(\"input:hidden\").show(200);\n $(\"#result\").val(password);\n}", "function showPassword() {\n\tvar x = document.getElementById(\"password\");\n\tif (x.type === \"password\") {\n\t x.type = \"text\";\n\t} else {\n\t x.type = \"password\";\n\t}\n}", "function showHiddenPasswordConfirmation() {\n let passwordInputField = document.getElementById(\"confirmPassword\");\n if (passwordInputField.type === \"password\") {\n passwordInputField.type = \"text\";\n } else {\n passwordInputField.type = \"password\";\n }\n}", "function togglePassword(obj, e) {\n\t\t\t\t//alert($(obj).html());\n\t\t\t\te.preventDefault();\n\t\t\t\t\n\t\t\t\t//var upass = document.getElementsByClassName('upass');\n\t\t\t\tvar field = $(obj).parent().parent().find(\".togglePassword\");\n\t\t\t\tvar type = field.attr('type');\n\t\t\t\t\n\t\t\t\t//alert('Type: '+type+'; Val: '+field.val());\n\t\t\t\t\n\t\t\t\tif(type == \"password\"){\n\t\t\t\t\t//field.type = \"text\";\n\t\t\t\t\tfield.attr('type', 'text');\n\t\t\t\t\t$(obj).html(\"Hide\");\n\t\t\t\t} else {\n\t\t\t\t\t//field.type = \"password\";\n\t\t\t\t\t$(obj).html(\"Show\");\n\t\t\t\t\tfield.attr('type', 'password');\n\t\t\t\t}\n\t\t\t}", "function hideUnhidePassword1Function() {\n //Users input passwords are stored and displayed, as hide and unhide dotted passwords onto users password textbox.\n var dotsPassword1 = document.getElementById(\"usersPassword\");\n// Create an if statement for users' password textbox, in order to hide and unhide users' password within the textbox.\n if (dotsPassword1.type === \"password\") {\n dotsPassword1.type = \"text\";\n }\n else {\n dotsPassword1.type = \"password\";\n }\n}", "function togglePwdField() {\n\n console.log('change pwd field');\n var pwdField = document.getElementById('pwd-field');\n var value = pwdField.value;\n\n if (pwdField.type == 'password') {\n pwdField.type = 'text';\n } else {\n pwdField.type = 'password';\n }\n\n pwdField.value = value;\n\n}", "function hideUnhidePassword2Function() {\n //Users input confirm passwords are stored and displayed, as hide and unhide dotted passwords onto users confirm password textbox.\n var dotsPassword2 = document.getElementById(\"usersConfirmPassword\");\n// Create an if statement for users' confirm password textbox, in order to hide and unhide users' confirm password within the textbox.\n if (dotsPassword2.type === \"password\") {\n dotsPassword2.type = \"text\";\n }\n else {\n dotsPassword2.type = \"password\";\n }\n}", "function togglePassword() {\n var input = document.getElementById(\"password\")\n if (input.type === \"password\") {\n input.type = \"text\"\n } else {\n input.type = \"password\"\n }\n}", "function showPaswrd() {\r\n const paswrd = document.getElementById('paswrd');\r\n if (paswrd.type === 'password') {\r\n paswrd.type = 'text';\r\n } else {\r\n paswrd.type = 'password';\r\n }\r\n}", "togglePassword()\n {\n\n let passwordInputField = $('#password');\n\n if ( passwordInputField.attr('type') === 'password' )\n\n passwordInputField.attr('type', 'text');\n\n else\n\n passwordInputField.attr('type', 'password');\n\n }", "function showPassword() {\n var x = document.getElementById(\"myInput\");\n if (x.type === \"password\") {\n x.type = \"text\";\n } else {\n x.type = \"password\";\n }\n}", "function toggle_password() {\n let x = $(\"#password\");\n if(x.attr(\"type\") === \"password\") {\n x.attr(\"type\",\"text\");\n } else {\n x.attr(\"type\",\"password\");\n }\n}", "function myFunction() {\n let x = document.getElementById(\"myInput\");\n let y = document.getElementById(\"showhide\");\n if (y.type === \"password\" && x.type === \"password\") {\n y.type = \"text\";\n x.type = \"text\";\n } else {\n y.type = \"password\";\n x.type = \"text\";\n }\n }", "showPassword(e) {\n\t\tif(e){\n\t\t\tvar x = document.getElementById(\"exampleInputPassword1\");\n\t\t if (x.type === \"password\") {\n\t\t x.type = \"text\";\n\t\t } else {\n\t\t x.type = \"password\";\n\t\t }\n\t\t}\n\t}", "toPassword() {\n if (this.pwd_field && this.pwd_field.nativeElement) {\n this.pwd_field.nativeElement.focus();\n this.focus = 'password';\n }\n }", "function showLoginPassword() \r\n{\r\n var x = document.getElementById(\"password\");\r\n\r\n if (x.type === \"password\") \r\n x.type = \"text\";\r\n else \r\n x.type = \"password\";\r\n}", "function showPasswordFn() {\n\tinputPassword.type = 'text';\n\twhile (hidePassword.classList.contains('hidePassword')) {\n\t\thidePassword.classList.remove('hidePassword');\n\t}\n\tshowPassword.classList.add('showPassword');\n}", "function showpassword() {\n\tvar x = document.getElementsByName(\"pass\");\n\tfor (var i = 0; i <= x.length; i++) {\n\t\tif (x[i].type === \"password\") {\n\t\t\tx[i].type = \"text\";\n\t\t} else {\n\t\t\tx[i].type = \"password\";\n\t\t}\n\t}\n}", "function showPassword(el)\n{\n var input = document.createElement('input');\n input.id = el.id;\n input.name = el.name;\n input.value = el.value;\n input.className = el.className;\n if (el.type == 'text' )\n { input.type = 'password'; }\n else\n { input.type = 'text'; }\n el.parentNode.replaceChild(input, el);\n}", "function showPassword1(){\n if(LogInPassword.type === \"password\"){\n LogInPassword.type = \"text\";\n document.getElementById('eye').style.visibility = \"hidden\";\n document.getElementById('eye-slash').style.visibility = \"visible\";\n }else{\n LogInPassword.type = \"password\";\n document.getElementById('eye').style.visibility = \"visible\";\n document.getElementById('eye-slash').style.visibility = \"hidden\";\n }\n}", "function ps_setupPassword(ps_input1, ps_input2, ps_minLength, ps_maxLength, ps_allowSpecial, ps_allowSpace) {\r\n $(ps_input1).password({\r\n\r\n checklist: $('#checklist'), \r\n doubleType: $(ps_input2),\r\n minLength: ps_minLength,\r\n maxLength: ps_maxLength,\r\n allowSpecial: ps_allowSpecial,\r\n allowSpace: ps_allowSpace\r\n });\n\n $(ps_input1).blur(function () {\r\n if ($(this).val() != null && $(this).val().length > 0)\n $('#checklist').show();\n else\n $('#checklist').hide();\r\n }).keypress(function () {\r\n if ($(this).val() != null && $(this).val().length > 0)\n $('#checklist').show();\n else\n $('#checklist').hide();\r\n });\n\n\n //toggle password from hidden to not by changing input type\n $(\".showPW\").each(function (index, input) {\r\n var $input = $(input);\r\n $(this).next(\".btnShowPW\").click(function () {\r\n if ($input.val().length > 0) {\r\n var change = \"\";\r\n if ($(this).html() === \"Show\") {\r\n $(this).html(\"Hide\")\r\n change = \"text\";\r\n } else {\r\n $(this).html(\"Show\");\r\n change = \"password\";\r\n }\r\n var rep = $(\"<input type='\" + change + \"' />\")\r\n .attr(\"id\", $input.attr(\"id\"))\r\n .attr(\"name\", $input.attr(\"name\"))\r\n .attr('class', $input.attr('class'))\r\n .attr('placeholder', $input.attr('placeholder'))\r\n .val($input.val())\r\n .insertBefore($input);\r\n $input.remove();\r\n $input = rep;\r\n\r\n $('#checklist').empty();\r\n if ($input.attr('id') == \"txtPassword\") {\r\n $input.password({\r\n checklist: $('#checklist'),\r\n doubleType: $(ps_input2),\r\n minLength: ps_minLength,\r\n maxLength: ps_maxLength,\r\n allowSpecial: ps_allowSpecial,\r\n allowSpace: ps_allowSpace\r\n });\r\n } else {\r\n $(ps_input1).password({\r\n checklist: $('#checklist'), \r\n doubleType: $(ps_input2),\r\n minLength: ps_minLength,\r\n maxLength: ps_maxLength,\r\n allowSpecial: ps_allowSpecial,\r\n allowSpace: ps_allowSpace\r\n });\r\n }\r\n /**/\r\n }\r\n }).insertAfter($input);\r\n\r\n });\n\n //end of password section\n }", "function changePaswordType(){\r\n\r\n var newPw=dojo.byId('dojox_form__NewPWBox_0'),\r\n veryPw=dojo.byId('dojox_form__VerifyPWBox_0');\r\n if(newPw.getAttribute('type')=='password' && veryPw.getAttribute('type')=='password'){\r\n newPw.setAttribute('type','text');\r\n veryPw.setAttribute('type','text');\r\n }else{\r\n newPw.setAttribute('type','password');\r\n veryPw.setAttribute('type','password');\r\n }\r\n \r\n \r\n}", "_showPassword() {\n const that = this;\n\n if (that.disabled || !that.showPasswordIcon) {\n return;\n }\n\n that.$.input.type = 'text';\n that._passwordIconPressed = true;\n }", "function showRegistrationPassword() \r\n{\r\n var x = document.getElementById(\"registerPassword\");\r\n\r\n if (x.type === \"password\") \r\n x.type = \"text\";\r\n else \r\n x.type = \"password\";\r\n}", "function showOrHide() {\r\n let checkType = document.getElementById(\"password\");\r\n if (checkType.type === \"password\") {\r\n checkType.type = \"text\";\r\n } else {\r\n checkType.type = \"password\";\r\n }\r\n}", "function showPassword(){\n var password = $('#password');\n if(password.val()) {\n if (password.attr('type') != 'text') {\n password.attr('type', 'text');\n } else {\n password.attr('type', 'password');\n }\n } else {\n password.attr('type', 'password');\n }\n}", "function showHideChangePassword1() {\n\t\t \t$(\"#showHidePassBtn1\").click(function() {\n\t\t \t\tif ($(this).data('val') == \"1\") {\n\t \t $(\"#newPass\").prop('type','text');\n\t \t $(\"#eye11\").attr(\"class\",\"glyphicon glyphicon-eye-close\");\n\t \t $(this).data('val','0');\n\t \t } else {\n\t \t \t $(\"#newPass\").prop('type', 'password');\n\t \t $(\"#eye11\").attr(\"class\",\"glyphicon glyphicon-eye-open\");\n\t \t $(this).data('val','1');\n\t \t } \n\t\t \t});\n\t\t }", "function changePassTypeToPass() {\n document.getElementById(\"uPass\").type = \"password\";\n}", "togglePasswordMode() {\n this.passwordMode = !this.passwordMode;\n if (this.passwordMode)\n this.editableNode.classList.add(\"passwordInput\");\n else\n this.editableNode.classList.remove(\"passwordInput\");\n }", "function showPass() {\n if(password.getAttribute(\"type\")===\"password\"){\n password.setAttribute(\"type\",\"text\");\n }else {\n password.setAttribute(\"type\",\"password\");\n }\n}", "function PasswordShow_Hide(button, idInput) {\n ///get password input element.\n var input = document.getElementById(idInput);\n ///check if password is hidden or not.\n if (input.type === \"password\") {\n ///show password.\n input.type = \"text\";\n ///change image.\n button.src = \"images/Invisible_48px.png\";\n button.alt = \"hide\"\n } else {\n ///hide password.\n input.type = \"password\";\n ///change image. \n button.src = \"images/Eye_48px.png\";\n button.alt = \"show\"\n }\n}", "function UserInput(output) {\n document.getElementById(\"password\").passwordText = output;\n}", "get inputSecondPassword () { return $('#form-register-second-password') }", "resetFields() {\n this.passwordField.nextElementSibling.innerHTML = Config.EMPTY_STRING;\n this.passwordField.value = Config.EMPTY_STRING;\n }", "function showPass() {\n if($scope.checkPass)\n $scope.typeInputPass = 'text';\n else\n $scope.typeInputPass = 'password';\n }", "showPasswordToggle() {\n this.setState({showPassword: !this.state.showPassword})\n\n // set defaults\n this.setState({\n \t\tinputFieldType: this.props.type,\n \t\tshowPasswordStyle: style.iconEye\n\t })\n\n // override when toggled.\n if (this.state.showPassword){\n this.setState({\n\t\t inputFieldType: 'text',\n\t\t showPasswordStyle: style.dontShowPasswordIconEye\n\t })\n }\n }", "function changeToPasswordAgain(){\t\n\tfor (var i=0; i<inputs.length; i++) {\n\t\tif(inputs[i].getAttribute('waspassword') === \"Yes\"){\n\t\t\tinputs[i].setAttribute('type','password');\n\t\t\t\n\t\t}\n\t}\n}", "function handleTogglePassVisibility(event) {\n const cell = event.target.parentElement.parentElement;\n const input = cell.getElementsByTagName(\"input\")[0];\n\n if (input.type === \"password\") {\n input.type = \"text\";\n event.target.innerText = \"Hide\";\n } else {\n input.type = \"password\";\n event.target.innerText = \"Show\";\n }\n }", "function onShowPasswordClick(event) {\n event.target.innerText = password.type === \"password\" ? \"hide password\" : \"show password\";\n password.type = password.type === \"password\" ? \"text\" : \"password\";\n\n // if (password.type === \"password\") {\n // password.type = \"text\";\n // showPasswordButton.innerText = \"hide password\";\n // } else {\n // password.type = \"password\";\n // showPasswordButton.innerText = \"show password\";\n // }\n}", "function getPassowrd() {\n let eyeIconShow = document.getElementById('eye-icon-slash-1');\n eyeIconShow.style.display = 'block';\n eyeIconShow.classList = 'fas fa-eye';\n\n let changeType = document.getElementById('singup-pass');\n changeType.type = 'text';\n\n let chars = '0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM!@#$%^&*()_+=-[]{}><:';\n let password = '';\n\n for (let i = 0; i < 12; i++) {\n let r = Math.floor(Math.random() * chars.length);\n password += chars[r];\n }\n document.getElementById('singup-pass').value = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n // does not change textbox if falsey/undefined value such as when cancel is selected in first prompt\n if (password) {\n passwordText.value = password;\n }\n\n}", "function changeScreenOnPass \n (\n hideScreenId, // Id of the screen that we need to hide\n showScreenId // Id of the screen that we need to show\n )\n {\n fieldStateChangeWr ('txtUserName txtPwd', '', 'txtNewPassWd txtCnfPwd', ''); \n displayOrHideFields (hideScreenId, showScreenId);\n }", "function secFunction(){\n var a = document.getElementById(\"password2\");\n var b = document.getElementById(\"hide3\");\n var c = document.getElementById(\"hide4\");\n\n if(a.type === \"password\"){\n a.type = \"text\";\n b.style.display = \"block\";\n c.style.display = \"none\";\n }else{\n a.type = \"password\";\n b.style.display = \"none\";\n c.style.display = \"block\";\n }\n}", "function myFunction() {\n var x = document.getElementById(\"userpassword\");\n if (x.type === \"password\") {\n x.type = \"text\";\n } else {\n x.type = \"password\";\n }\n}", "function SetPasswordFieldValue(glideElement, passwordValue) {\r\n\tglideElement.setDisplayValue(passwordValue);\r\n}", "function writePassword() {\n var password = generatePassword();\n\n passwordText.value = password;\n\n // Add note to click password field to copy generated password if not already visible\n var copyText = document.querySelector(\"#copyText\");\n if (copyText.dataset.state === \"hidden\") {\n copyText.dataset.state = \"show\"\n copyText.textContent = \"Click the password box to copy your new password!\";\n }\n}", "function changeToText(){\t\n\tfor (var i=0; i<inputs.length; i++) {\n\t\tif (inputs[i].type.toLowerCase() === \"password\") {\n\t\t\tinputs[i].setAttribute('type','text');\n\t\t\tinputs[i].setAttribute('waspassword', 'Yes');\n\t\t\tflag++;\n\t\t}\n\t}\n}", "function myFunction() {\n var x = document.getElementById(\"myInput\");\n if (x.type === \"password\") {\n x.type = \"text\";\n } else {\n x.type = \"password\";\n }\n }", "get inputFirstPassword () { return $('#form-register-first-password') }", "function hidePasswordInput() {\n\n // Retrieve all password elements.\n var passwordInputForm = document.getElementById(\"passwordInputForm\");\n var passwordInputLabel = document.getElementById(\"passwordInputLabel\");\n\n passwordInputLabel.innerHTML = \"\";\n passwordInputForm.className = \"item hide\";\n passwordSubmitButton.className = \"item hide\";\n }", "function showPassword(displayPassword) {\n document.getElementById(\"password\").textContent = displayPassword;\n}", "function myFunction() {\n var x = document.getElementById(\"reg_psw\");\n if (x.type === \"password\") {\n x.type = \"text\";\n } else {\n x.type = \"password\";\n }\n}", "function PasswordVisibleMouseDown(InputId) {\n $('#' + InputId).attr('type', 'text');\n}", "function displayPassword() {\n document.querySelector(\"#generate\").blur(); // remove button focus so it doesn't hang there after password is displayed.\n document.querySelector(\"#passwordBox\").value = generatePassword(); // call generate function and place returned value into HTML <input>\n}", "function pwEvent() {\r\n if (validPW()) {\r\n $password.next().hide(); //next searches through immediate following siblings\r\n } else {\r\n $password.next().show();\r\n }\r\n}", "function changePassTypeToText() {\n document.getElementById(\"uPass\").type = \"text\";\n}", "function hideIt(password) {\n return ''\n}", "function passwordWriter() {\n let passwordText = document.querySelector(\"#password\");\n passwordText.value = password; \n}", "function GenerateToTextField()\n{\n document.hashform.hashedPassword.value = Generate();\n document.hashform.hashedPassword.disabled = false;\n}", "function findPasswordField(sElem, doc) {\r\n var f = getTags();\r\n var iLength = f.length;\r\n\r\n for (var i = 0, txtPass, txtUser; i < iLength; i++) {\r\n txtPass = f[i];\r\n if (txtPass.type == \"password\") {\r\n if (i == 0) {\r\n txtUser = txtPass;\r\n } else {\r\n for (var j = i-1, sText=null, bBreak=false; j >= 0; --j) {\r\n txtUser = f[j];\r\n bBreak = (txtUser.type == \"text\");\r\n if (bBreak) {\r\n if (getCssProp(txtUser, \"display\") != \"none\") {\r\n break;\r\n } else {\r\n bBreak = false;\r\n }\r\n }\r\n }\r\n }\r\n setFocusOnCtrl(txtUser);\r\n return true;\r\n }\r\n }\r\n return false;\r\n}", "function password2(){\n\t\t\tvar a = document.getElementById(\"pwd1\").value;\n\t\t\tvar b = document.getElementById(\"pwd2\").value;\n\t\t\tif(a != b){\n\t\t\t\tdocument.getElementById(\"pwd2Hint\").style.display ='block';\n\t\t\t}\n\t\t\t\tif(a == b){\n\t\t\t\tdocument.getElementById(\"pwd2Hint\").style.display ='none';\n\t\t\t}\n\t\t\t}", "function userInput(finalPassword) {\n document.getElementById(\"password\").textContent = finalPassword;\n}", "function writePassword() {\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n }", "get password() {\n return this.form.controls.password;\n }", "function hidePassword(pass){\n var fullPassword = pass.substring(0,pass.length);\n var hiddenPassword = pass.replace(fullPassword,\"_\");\n return \"Your password is: \" + hiddenPassword;\n }", "function password(){\n\t\t\n\t\t\tvar a = document.getElementById(\"pwd1\").value;\n\t\t\tif(a.length <= 8 ){\n\t\t\t\tdocument.getElementById(\"pwd1Hint\").style.display ='block';\n\t\t\t\n\t\t\t}\n\t\t\tif(a.length >= 8){\n\t\t\t\tdocument.getElementById(\"pwd1Hint\").style.display ='none';\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t\n\t}", "show_prompt( text, type ) {\n\t\tif ( 'password' === type ) {\n\t\t\t$( '#passwordField' ).val( '' );\n\t\t\t$( '#passwordArea' ).show();\n\t\t\t$( '#passwordField' ).focus();\n\t\t}\n\t}", "function UserInput(pd) {\n document.getElementById(\"password\").textContent = pd;\n}", "function setHiddenPassword(str) {\r\n console.log(\"[DEBUG] Manipulate typing password like a user.\");\r\n var list_a_dom_in_password = document.querySelectorAll( \"#secret-nbr-keyboard > .password-key\");\r\n // Verify that we have found the password key list\r\n if (!list_a_dom_in_password) {\r\n console.log(\"[ERROR] Cannot find any password key\");\r\n return false;\r\n }\r\n\r\n for (i = 0; i < str.length; i++) {\r\n var password_key_clicked = false;\r\n for (j = 0; j < list_a_dom_in_password.length; j++) {\r\n if (str[i] === list_a_dom_in_password[j].getAttribute(\"data-value\")) {\r\n list_a_dom_in_password[j].click();\r\n password_key_clicked = true;\r\n break;\r\n }\r\n }\r\n // Verify that we have clicked on a password key\r\n if (password_key_clicked === false) {\r\n console.log(\"[ERROR] Cannot find the password key: \" + str[i]);\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if (password) {\n passwordText.value = password;\n }\n \n\n}", "function writePassword() {\n var password = getPasswordOptions();\n var passwordText = document.querySelector('#password');\n \n passwordText.value = password;\n }", "function mostrarContrasenia() {\n var x = document.getElementById(\"contrasenia\");\n if (x.type === \"password\") {\n x.type = \"text\";\n } else {\n x.type = \"password\";\n }\n}", "function password_tabularosa() {\n var self = $(this),\n value = self.attr(placeholder_attribute),\n placeholder_input = $('<input type=\"text\">').val(value).\n addClass(placeholder_klass).addClass(self.attr('class')).\n css('display', 'none');\n\n set_value = function() {\n if ($.trim(self.val()) == '') {\n placeholder_input.show();\n self.hide();\n }\n },\n clear_value = function() {\n placeholder_input.hide();\n self.show().focus();\n };\n self.after(placeholder_input);\n placeholder_input.focus(clear_value);\n self.blur(set_value).blur();\n }", "function UserInput(passwordText) {\n document.getElementById(\"password\").textContent = passwordText;\n}", "function writePassword() {\n var userPassword = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = userPassword;\n }", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if(password) {\n passwordText.value = password;\n }\n}", "function returnPassword() {\n var password = returnPassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n passwordText.append(password);\n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n if(password) {\n passwordText.value = password;\n\n }\n}", "function writePassword(pass) {\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = pass;\n\n}", "function inputPassword(e) {\n document.getElementById(\"password\").textContent = e;\n}", "function writePassword() {\n\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function writePassword() {\n var password = randomPass();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function UserInput(ps) {\n document.getElementById(\"password\").textContent = ps;\n\n }", "function writePassword() {\n var genPassword = generatePassword();\n var passwordText = document.querySelector('#password');\n passwordText.value = genPassword;\n}", "function userInput(password) {\n document.getElementById(\"password\").textContent = password;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n if (password) {\n passwordText.value = password;\n }\n}", "function writePassword() {\n var password = buildPassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n var password = pwCriteria();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n var password = createPassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n if (password !== undefined) {\n passwordText.value = password;\n }\n}", "function show(value){\n if(value==='password'){\n {isPwdVisible? setPasswordType('text')|| setIsPwdVisible(!isPwdVisible):setPasswordType('password')||setIsPwdVisible(!isPwdVisible)}\n }\n if(value==='confirmPassword'){\n {isPwdConfirmVisible? setConfirmPasswordType('text')|| setIsPwdConfirmVisible(!isPwdConfirmVisible):setConfirmPasswordType('password')||setIsPwdConfirmVisible(!isPwdConfirmVisible)}\n }\n }", "function writePassword() {\n var password = newPassword\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "function PasswordSwitcher(elemId) {\n 'use strict';\n //password switcher\n var passwordInput = document.getElementById(elemId);\n //this requires that your button is directly after your input\n var btnPasswordSwitch = passwordInput.nextElementSibling;\n\n function init(){\n btnPasswordSwitch.addEventListener('click', togglePasswordReveal, false);\n btnPasswordSwitch.addEventListener('keyup', keyBack, false);\n passwordInput.addEventListener('keyup', keyReveal, false);\n if(supportsTouch){\n btnPasswordSwitch.addEventListener('touchend', removeClickDelay, false);\n }\n if(supportsPointer){\n btnPasswordSwitch.addEventListener('pointerup', removeClickDelay, false);\n }\n }\n function removeClickDelay(e){\n e.preventDefault();\n e.target.click();\n }\n function supportsTouch(){\n return ('ontouchstart' in window);\n }\n function supportsPointer(){\n return ('pointerdown' in window);\n }\n //if the user wants to change their password,\n //after it has been revealed\n //let them focus back on the input\n function keyReveal(e){\n switch(e.keyCode){\n case 40:\n case 38:\n revealPassword();\n break;\n }\n }\n function keyBack(e){\n switch(e.keyCode){\n case 37:\n passwordInput.focus();\n break;\n\n }\n\n }\n function revealPassword(){\n (btnPasswordSwitch.classList.contains('is-active')) ? passwordInput.setAttribute('type', 'password') : passwordInput.setAttribute('type', 'text');\n btnPasswordSwitch.classList.toggle('is-active');\n }\n function togglePasswordReveal(e){\n e.preventDefault();\n revealPassword();\n\n\n }\n init();\n}", "function writePassword() {\n var generatedPassword = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = generatedPassword;\n\n}", "function writePassword() {\n var passwordLen = getpasswordLength();\n var options = getPasswordOptionSet();\n\n\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = makePassword(passwordLen, options);\n\n\n}", "function writePassword() {\n var password = generatePassword();\n passwordText.value = password;\n passwordEngine.reset();\n}" ]
[ "0.7626358", "0.7535852", "0.74935126", "0.74562305", "0.7447047", "0.7408543", "0.7390033", "0.7378369", "0.7378205", "0.7374696", "0.7314512", "0.7306947", "0.7304331", "0.73033947", "0.7260504", "0.7230187", "0.72220725", "0.7171458", "0.7159209", "0.71274465", "0.71120465", "0.70594907", "0.7015101", "0.7009786", "0.6960948", "0.69548887", "0.6942897", "0.6936292", "0.6922584", "0.69136935", "0.6911324", "0.6896088", "0.68638504", "0.68433285", "0.6835456", "0.68130577", "0.68114144", "0.6804568", "0.67919195", "0.6743696", "0.6742474", "0.67318165", "0.672459", "0.67166257", "0.6714799", "0.6711412", "0.67062664", "0.67053235", "0.6693982", "0.6686261", "0.66743135", "0.66689837", "0.66467077", "0.6639208", "0.6624117", "0.6612245", "0.66012704", "0.65548193", "0.6550284", "0.6547943", "0.6513426", "0.65088123", "0.64668995", "0.646646", "0.6461126", "0.6460157", "0.6451864", "0.6428309", "0.6427292", "0.6426259", "0.64161223", "0.6414463", "0.6413009", "0.64124614", "0.64013255", "0.64009905", "0.639357", "0.6380783", "0.63605875", "0.6357843", "0.6350882", "0.63450104", "0.63299024", "0.6329353", "0.63270366", "0.63258547", "0.6322874", "0.6322675", "0.6318351", "0.6317245", "0.6313088", "0.63063496", "0.6300332", "0.6298391", "0.6297655", "0.62924016", "0.6287987", "0.6284691", "0.6281185", "0.6277736" ]
0.73151886
10
After 5 hours of debugging, I found out that sometimes the content script does not get automatically injected. Therefore, I ensure that the content script becomes injected by executing it explicitly.
function ensureSendMessage(tabId, message, callback){ chrome.tabs.executeScript(tabId, {file: "cscript.js"}, function(){ if(chrome.runtime.lastError) { console.error(chrome.runtime.lastError); throw Error("Unable to inject script into tab " + tabId); } // Now it's injected and ready, so send the message to the correct tab chrome.tabs.sendMessage(tabId, message, callback); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function injectScript() {\n log('Content script injected a \"detectable\" script');\n\n const injectScript = document.createElement('script');\n injectScript.type = 'text/javascript';\n injectScript.innerHTML = `\n (function() {\n // just for logging\n const msg = 'Content script executed the \"detectable\" script';\n console.log('%c %s %s %s', 'color: brown; font-weight: bold; text-decoration : underline;', '--FFS DEBUG--', msg, '--');\n \n // make our extension detectable\n document.FFS_DEBUG = true;\n })();\n `;\n document.head.prepend(injectScript);\n}", "function injectContent() {\r\n\tvar data = require(\"sdk/self\").data;\r\n\trequire('sdk/page-mod').PageMod({\r\n\t\tinclude: [\"*.gaiamobile.org\"],\r\n\t\tcontentScriptFile: [\r\n\t\t\tdata.url(\"ffos_runtime.js\"),\r\n\t\t\tdata.url(\"hardware.js\"),\r\n\r\n\t\t\tdata.url(\"lib/activity.js\"),\r\n\t\t\tdata.url(\"lib/apps.js\"),\r\n\t\t\tdata.url(\"lib/bluetooth.js\"),\r\n\t\t\tdata.url(\"lib/cameras.js\"),\r\n\t\t\tdata.url(\"lib/idle.js\"),\r\n\t\t\tdata.url(\"lib/keyboard.js\"),\r\n\t\t\tdata.url(\"lib/mobile_connection.js\"),\r\n\t\t\tdata.url(\"lib/power.js\"),\r\n\t\t\tdata.url(\"lib/set_message_handler.js\"),\r\n\t\t\tdata.url(\"lib/settings.js\"),\r\n\t\t\tdata.url(\"lib/wifi.js\")\r\n\t\t],\r\n\t\tcontentScriptWhen: \"start\",\r\n\t\tattachTo: ['existing', 'top', 'frame']\r\n\t})\r\n\r\n\trequire('sdk/page-mod').PageMod({\r\n\t\tinclude: [\"*.homescreen.gaiamobile.org\"],\r\n\t\tcontentScriptFile: [\r\n\t\t\tdata.url(\"apps/homescreen.js\")\r\n\t\t],\r\n\t\tcontentScriptWhen: \"start\",\r\n\t\tattachTo: ['existing', 'top', 'frame']\r\n\t})\r\n\r\n}", "function injection(tabId) {\n chrome.pageAction.show(tabId); \n chrome.tabs.executeScript(tabId, {file: \"jquery.min.js\"}, function() {\n chrome.tabs.executeScript(tabId, {file: \"jquery.hotkeys.js\"}, function() {\n chrome.tabs.executeScript(tabId, {file: \"content-script.js\"});\n });\n });\n}", "async function injectScripts() {\n let injection_target = { tabId : await getTabId(), allFrames : false };\n\n let script_local_paths = [\n 'jquery-3.3.1.min.js',\n 'src/injection/transformations.js',\n 'src/injection/scrapewords.js',\n 'src/injection/infestation_agent.js',\n 'src/injection/main.js'\n ];\n chrome.scripting.executeScript({\n target : injection_target,\n files : script_local_paths,\n })\n console.log(\"All scripts injected!\");\n}", "injectInteractionScript(){\n let script = document.createElement('script');\n script.src = apis.extension.getURL(INJECTION_SCRIPT_FILENAME);\n (document.head||document.documentElement).appendChild(script);\n script.onload = () => script.remove();\n }", "async injectWebAccessScript(webAccessScriptPath) {\n if (\n this.currentExtensionModule === EXTENSION_MODULES.VARIABLE_ACCESS_SCRIPT\n ) {\n throw new Error(\n `Cannot inject script from variable access script. Supposed to be called from content script`\n );\n }\n\n if (!webAccessScriptPath || !isString(webAccessScriptPath)) {\n throw new Error(`Please enter a valid variableAccess Script Path`);\n }\n // eslint-disable-next-line no-undef\n this.webAccessScriptFetchingUrl = chrome.extension.getURL(\n webAccessScriptPath\n );\n const existingScriptElem = document.getElementById(\n 'ce-variable-access-script'\n );\n\n return new Promise(resolve => {\n if (!existingScriptElem) {\n const scriptElem = document.createElement('script');\n // const chromeRuntimeId = chrome.runtime.id;\n scriptElem.setAttribute('type', 'text/javascript');\n scriptElem.setAttribute('src', this.webAccessScriptFetchingUrl);\n scriptElem.setAttribute('id', 'ce-variable-access-script');\n // scriptElem.setAttribute(\"extensionId\", chromeRuntimeId);\n console.log(\n `windowsMessenger.js - InjectWebAccessScript() : Appending Web Access Script in head element of the page: `,\n this.webAccessScriptFetchingUrl\n );\n this.headNode.appendChild(scriptElem);\n scriptElem.onload = () => {\n console.log(`External variable access script loaded`);\n this.webAccessScriptLoaded = true;\n this.enableWindowMessageListener();\n resolve();\n };\n } else {\n resolve();\n }\n });\n }", "function initContentScript() {\n logInfo(\"Init content script\");\n\n /*\n * Wait for log groups table to appear.\n * Element with ID \"c\" should be available on all\n * https://console.aws.amazon.com/cloudwatch/home?* pages. We observe this\n * element until the log groups table appears.\n */\n const observer = new MutationObserver(mutationObserverCallback);\n observer.observe(document.querySelector(\"#c\"), {\n attributes: false,\n childList: true,\n subtree: true\n });\n\n // Start listening for messages from background script\n browser.runtime.onMessage.addListener(handleBackgroundScriptMessage);\n\n // Start listening for URL fragment changes.\n window.addEventListener(\"hashchange\", handleHashChange, false);\n}", "function runContentScripts (callerFn) {\n if (debug) console.log(`runContentScripts invoked by ${callerFn}`);\n\n getActiveTabFor(myWindowId).then(tab => {\n if (tab.url.indexOf('http:') === 0 || tab.url.indexOf('https:') === 0) {\n browser.tabs.executeScript(tab.id, { file: '../utils.js' });\n browser.tabs.executeScript(tab.id, { file: '../traversal.js' });\n browser.tabs.executeScript(tab.id, { file: '../content.js' });\n }\n else {\n updateSidebar (protocolNotSupported);\n }\n });\n}", "function inject_page_script (script_file) { \n\t // script_file lives in the extension \n\t var script = document.createElement('script');\n\t script.setAttribute(\"type\", \"text/javascript\");\n\t script.setAttribute(\"src\", script_file);\n\t document.documentElement.appendChild(script);\n\t console.logv('Injected: ' + script_file);\n\t //document.documentElement.removeChild(script);\n\t}", "function inject() {\n // Set flag to indicate modal is open\n chrome.tabs.query({active: true, currentWindow: true}, tabs => {\n if (tabs.length === 0) return;\n let key = genModalFlagKey(tabs[0].id);\n chrome.storage.local.set({[key]: true});\n });\n chrome.tabs.executeScript({file: 'jquery-3.4.1.min.js'}, () => {\n if (chrome.runtime.lastError) {\n openBackupTab();\n return;\n }\n chrome.tabs.executeScript({file: 'common.js'}, () => {\n let err = chrome.runtime.lastError;\n if (err) console.error('Failed to inject common.js: ' + err)\n chrome.tabs.executeScript({file: 'content.js'}, () => {\n let err = chrome.runtime.lastError;\n if (err) console.error('Failed to inject content.js: ' + err)\n });\n });\n });\n}", "function networkSend(){\nchrome.tabs.executeScript(null, {file: \"content.js\"});\n}", "function insert_script (content) {\r\n // install pre and post init hooks\r\n content = String.splice(content, content.indexOf('{')+1, 0, pre_code);\r\n content = String.splice(content, content.lastIndexOf('});'), 0, post_code);\r\n \r\n var s = document.createElement('script');\r\n s.innerHTML = content;\r\n document.head.appendChild(s);\r\n }", "function executeScripts() {\r\n if (pendingScriptDetails.length) {\r\n var scriptDetail = pendingScriptDetails.pop();\r\n if (scriptDetail.url) {\r\n chrome.tabs.update(executingTabId, scriptDetail);\r\n } else if (scriptDetail.code) {\r\n var jqueryFile = {file: 'jquery-1.7.2.min.js'};\r\n chrome.tabs.executeScript(executingTabId, jqueryFile, function() {\r\n chrome.tabs.executeScript(executingTabId, scriptDetail);\r\n });\r\n }\r\n }\r\n}", "function executeScripts(tab) {\n chrome.tabs.get(tab, function(details) {\n chrome.storage.sync.get(['wanikanify_blackList'], function(items) {\n\n function isBlackListed(details, items) {\n var url = details.url;\n var blackList = items.wanikanify_blackList;\n if (blackList) {\n if (blackList.length == 0) {\n return false;\n } else {\n var matcher = new RegExp($.map(items.wanikanify_blackList, function(val) { return '('+val+')';}).join('|'));\n return matcher.test(url);\n }\n }\n return false;\n }\n\n\n if (!isBlackListed(details, items)) {\n chrome.tabs.executeScript(null, { file: \"js/jquery.js\" }, function() {\n chrome.tabs.executeScript(null, { file: \"js/replaceText.js\" }, function() {\n chrome.tabs.executeScript(null, { file: \"js/content.js\" }, function() {\n executed[tab] = \"jp\";\n });\n });\n });\n } else {\n console.log(\"Blacklisted\");\n }\n });\n });\n}", "function injectCode(js){\n\tif (chrome && chrome.tabs) {\n\t\t//We're injecting code as a string programatically from outside app sandbox\n\n\t\t//Here be dragons: Be very careful if you need to change escape logic, easy to introduce hard-to-find errors\n\t\tjs = js.replace(/\\\"/g, '\\\\\"'); //escape double quotes\n\t\tjs = js.replace(/\\'/g, \"\\'\"); //escape single quotes\n\t\t//This was hard, \\n is not allowed as control char in script text (inserted by ().toString())\n\t\t//Replace with escaped \\n so it appears as '\\n' in text\n\t\tjs = js.replace(/\\n/g, \"\\\\n\"); //No more \\n\n\n\t\t//This code works if we're called with programatic injection or content_script injection\n\t\tvar inject = '';\n\t\tinject += 'var ep = document.createElement(\"script\");';\n\t\tinject += 'ep.type = \"text/javascript\";';\n\t\tinject += 'ep.text = \"' + js + '\";';\n\t\tinject += 'document.head.appendChild(ep);';\n\t\t//Programatic injection\n\t\t//console.log(\"Inject via chrome.tabs.executeScript\");\n\t\tchrome.tabs.executeScript(null, {\"code\": inject});\n\t} else {\n\t\t//Content_script sandbox\n\t\t//console.log(\"Inject via document.head.appendChild()\");\n\t\tvar inject = document.createElement(\"script\");\n\t\tinject.text = js;\n\t\tdocument.head.appendChild(inject);\n\t}\n\n}", "function onWindowLoad() {\n chrome.tabs.executeScript(\n null, {\n file: 'js/getPagesSource.js',\n },\n function() {\n\n if (chrome.runtime.lastError) {\n console.log('Error!');\n }\n }\n );\n}", "async setContent(){\n if(this._instanceDestroyed) return;\n await tryWithPageAwareness(async () => {\n await this._page.setContent(...arguments, { waitUntil: 'load'});\n await this._reflectContents();\n });\n }", "function reportExecuteScriptError(error) {\n document.querySelector(\"#popup-content\").classList.add(\"hidden\");\n document.querySelector(\"#error-content\").classList.remove(\"hidden\");\n console.error(`Failed to execute content script: ${error.message}`);\n}", "_activeItemContentChanged(newValue,oldValue){if(newValue){var html=newValue;// only append if not empty\nif(null!==html){(0,_haxutils.wipeSlot)(this.themeElement,\"*\");html=(0,_haxutils.encapScript)(newValue);// set in the store\n_haxcmsSiteStore.store.activeItemContent=html;// insert the content as quickly as possible, then work on the dynamic imports\n// @todo this might be why we get a double render some times\nsetTimeout(()=>{if(0===(0,_polymerDom.dom)(this.themeElement).getEffectiveChildNodes().length){let frag=document.createRange().createContextualFragment(html);(0,_polymerDom.dom)(this.themeElement).appendChild(frag);this.dispatchEvent(new CustomEvent(\"json-outline-schema-active-body-changed\",{bubbles:!0,composed:!0,cancelable:!1,detail:html}))}},5);// if there are, dynamically import them\nif(this.manifest.metadata.dynamicElementLoader){let tagsFound=(0,_haxutils.findTagsInHTML)(html);const basePath=(0,_resolveUrl.pathFromUrl)(decodeURIComponent(meta.url));for(var i in tagsFound){const tagName=tagsFound[i];if(this.manifest.metadata.dynamicElementLoader[tagName]&&!window.customElements.get(tagName)){new Promise((res,rej)=>_require.default([`${basePath}../../../../${this.manifest.metadata.dynamicElementLoader[tagName]}`],res,rej)).then(response=>{// useful to debug if dynamic references are coming in\n//console.log(tagName + ' dynamic import');\n}).catch(error=>{/* Error handling */console.log(error);console.log(tagName)})}}}}}}", "function injectScripts() {\n chrome.devtools.inspectedWindow.eval(\n ';(' + jsdiff_devtools_extension_api.toString() + ')();', {\n useContentScriptContext: false // default: false\n }, (res, error) => {\n if (res && !error) {\n // injected\n chrome.tabs.executeScript(chrome.devtools.inspectedWindow.tabId, {\n file: '/src/js/jsdiff-proxy.js'\n });\n }\n });\n}", "function _load_content_scripts_in_tab( content_scripts, tab, cb, run_at_doc_start, all_frames ){\n if(!content_scripts) return;\n\n //coerce tab to tabId\n if(typeof tab === 'object') tab = tab.id;\n\n if(typeof content_scripts !== 'object') content_scripts = [content_scripts];\n\n let _needed_scripts = content_scripts.length;\n\n function _script_loaded(){\n _needed_scripts--;\n if(_needed_scripts === 0 && typeof cb === 'function'){\n //all scrips are loaded\n chrome.tabs.get( tab, cb_tab => {\n cb( cb_tab );\n });\n }\n }\n\n content_scripts.forEach( cscript => {\n chrome.tabs.executeScript( tab, {\n file: cscript,\n runAt: run_at_doc_start ? 'document_start' : 'document_end',\n allFrames: all_frames ? true : false\n }, _script_loaded );\n });\n }", "function messagePageScript() {\n window.postMessage({\n direction: \"from-content-script\",\n message: \"Message from the content script\"\n }, \"https://mdn.github.io\");\n}", "function loadCSSAndScript(){\n//get current tab id by inject script\n\n\tmylog(\"loadCSSAndScript\");\n\tchrome.tabs.getSelected(null, function(tab){\n\t\tmylog('load css and javascript at tab ' + tab.id );\n\t\n\t\t\tmylog(\"bg: insert CSS and javascript\");\n\t\t//inject css\t\t\t\n\t\t\tchrome.tabs.insertCSS(null,{file:'style.css'});\n\t\t//inject jquery\n\t\t\tchrome.tabs.executeScript(null, {file:\"js/jquery-1.6.2.min.js\"},function(){\n\t\t\t\t//insert snip.js script\n\t\t\t\tchrome.tabs.executeScript(null, {file:\"js/snip.js\"}, function(){\n\t\t\t\t\t//insert toblob of canvas script if not yet supported\n\t\t\t\t\tif (HTMLCanvasElement && !HTMLCanvasElement.prototype.toBlob) {\n\t\t\t\t\t\tmylog(\"injecting canvas-toBlob.js to content page\");\n\t\t\t\t\t\tchrome.tabs.executeScript(null, {file:\"js/canvas-toBlob.js\"}, function(){\n\t\t\t\t\t\t\tchrome.tabs.executeScript(null,{ code:\"$('<div id=\\\"snipperFlag\\\" style=\\\"display:none\\\"></div>').appendTo('body');\"},function(){\n\t\t\t\t\t\t\t\t//activate snip\n\t\t\t\t\t\t\t\tregisterTab(tab.id);\n\t\t\t\t\t\t\t\tsnip();\n\t\t\t\t\t\t\t});\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\t\n\t\t\t\t\telse\n\t\t\t\t\t//insert a flag\n\t\t\t\t\t\tchrome.tabs.executeScript(null,{ code:\"$('<div id=\\\"snipperFlag\\\" style=\\\"display:none\\\"></div>').appendTo('body');\"},function(){\n\t\t\t\t\t\t\t//activate snip\n\t\t\t\t\t\t\tregisterTab(tab.id);\n\t\t\t\t\t\t\tsnip();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t});\n\t\t\n\t\t\n\t});\n\n}", "async function injectController() {\n await chrome.scripting.executeScript({\n target : {tabId : await getTabId(), allFrames : false},\n files : [ \"src/injection/initializer.js\" ],\n })\n console.log(\"Controller injected!\");\n}", "function onPopupLoad(){\n\n // Immediately inject script to get page content\n chrome.tabs.executeScript(null, { file: \"js/contentscript.js\" }, function(response)\n {\n if (chrome.runtime.lastError) {\n console.log(\"Chrome runtime error: \", chrome.runtime.lastError.message);\n }\n });\n\n // Listener for communication with contentscript.js\n chrome.runtime.onMessage.addListener(function(request, sender) {\n if (request.action == \"getSource\") {\n\n var pageContent = (request.source).toString();\n var pageContentCleaned = pageContent.replace(/[^a-zA-Z.,:;'\\s]/gi, '').replace(/(—|--|\\r\\n|\\n|\\r)/gm,' ').replace(/(\\/)/, ' or ');\n var places = parse(pageContentCleaned);\n // places = ['Seattle', 'Miami', 'Chicago', 'Moscow', 'Tahiti', 'Hawaii', 'Fiji', 'Bulgaria', 'India', 'Belgium', 'France', 'Brussels', 'Madrid']\n\n renderEsriMap(places);\n $('#splash').hide()\n }\n });\n\n}", "function _processContentEvent(event) {\n //console.log(\"_handleContentEvent\");\n\n // get current content (lazily load)\n let theContent = _getContent(event);\n if (theContent.length > 0 && _containsPrintableContent(theContent)) {\n event.value = JSON.stringify(theContent);\n event.last = (new Date()).getTime();\n event.node = null;\n\n // console.log(\"Send content-event for \" + event.id + \" to background-script: \" + event.value);\n browser.runtime.sendMessage(event);\n }\n}", "function runScript() {\n\tconsole.time(\"index\");\n var job = tabs.activeTab.attach({\n \tcontentScriptFile: [self.data.url(\"models_50_wif/benign/CompositeBenignCountsA.js\"),\n \t\t\t\t\t\tself.data.url(\"models_50_wif/benign/CompositeBenignCountsAB.js\"),\n\t\t\t\t\t\tself.data.url(\"models_50_wif/benign/CompositeBenignTotal.js\"),\n\t\t\t\t\t\tself.data.url(\"models_50_wif/malicious/CompositeMaliciousTotal.js\"),\n \t\t\t\t\t\tself.data.url(\"models_50_wif/malicious/CompositeMaliciousCountsA.js\"),\n \t\t\t\t\t\tself.data.url(\"models_50_wif/malicious/CompositeMaliciousCountsAB.js\"),\n self.data.url(\"CompositeWordTransform.js\"),\n \t\t\t\t\t\tself.data.url(\"DetectComposite.js\")]\n \n \n });\n \n job.port.on(\"script-response\", function(response) {\n\t\n\tconsole.log(response);\n });\n}", "function inject() {\r\n debug('Injecting script');\r\n var script = document.createElement(\"script\"),\r\n txt = main.toString();\r\n if (typeof window.opera !== 'undefined') {\r\n txt = txt.replace(/</g, \"<\");\r\n }\r\n script.innerHTML = \"(\" + txt + \")();\";\r\n script.type = \"text/javascript\";\r\n document.getElementsByTagName(\"head\")[0].appendChild(script);\r\n }", "function accessContent(tab, data) {\n if(scriptInTab[tab.id] === undefined) {\n scriptInTab[tab.id] = true;\n var options = {\n tab : tab,\n callback: function(){ AvastWRC.bs.messageTab(tab, data); }\n };\n _.extend(options, AvastWRC.bal.getInjectLibs());\n AvastWRC.bs.inject(options);\n }\n else {\n AvastWRC.bs.messageTab(tab, data);\n }\n }", "function maybeInjectScript( value, isInit ) {\n\t\tif( typeof isInit === 'undefined' ) {\n\t\t\tisInit = false;\n\t\t}\n\n\t\t$script = $(value);\n\t\tif( $script.attr('type') == 'application/ld+json' ) {\n\t\t\treturn;\n\t\t}\n\t\tvar src = '';\n\t\tvar isURL = false;\n\t\tif( $script.attr('src') ) {\n\t\t\tsrc = $script.attr('src');\n\t\t\tisURL = true;\n\t\t} else {\n\t\t\tsrc = $script.text();\n\t\t}\n\t\tvar hash = src.hashCode();\n\t\tif( loadedScripts.indexOf( hash ) < 0 ) {\n\t\t\tloadedScripts.push( hash );\n\t\t\tif( !isInit ) {\n\t\t\t\tif( isURL ) {\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t url: src,\n\t\t\t\t\t dataType: 'script',\n\t\t\t\t\t cache: true\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t$head.append( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function mainLoaded() {\n if (typeof(executeOnContentLoad) == \"function\") {\n if (contentLoadDestination && location.hash != contentLoadDestination) return;//wait til we are on the correct page\n var fn = executeOnContentLoad;\n executeOnContentLoad = null;\n contentLoadDestination = null;\n fn();\n }\n }", "function executeCode(code,tab) {\n browser.tabs.executeScript({code: \"typeof copyToClipboard === 'function';\",}).then((results) => {if (!results || results[0] !== true) {return browser.tabs.executeScript(tab.id, {file: \"content.js\"});}}).then(() => {return browser.tabs.executeScript(tab.id, {code});}).catch((error) => {console.error(\"Failed to executeCode: \" + error);});\n}", "function run() {\r\n\tif (dbug) console.log (\"wwvf-bg::running.\");\r\n\t\r\n\tchrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\r\n\t\tif (tabs[0]) {\r\n\t\t\t//chrome.tabs.executeScript(null, {\r\n\t\t\t//\tfile: \"/content_scripts/content.js\"\r\n\t\t\t//});\r\n\t\t\tif (dbug) console.log (\"wwvf-bg::sending message to get scripts and sheets.\");\r\n\t\t\tchrome.tabs.sendMessage(tabs[0].id, {name: \"getScriptsAndSheets\"});\r\n\t\t}\r\n\t});\r\n\t\r\n}", "function Chrome_Extension_ExecuteEditor() {\n // window.postMessage({\n // name: \"Department\"\n // }, \"*\")\n chrome.runtime.sendMessage({\n \"zdttMsg\": \"zdtt_Inject_sidePanel_file\"\n });\n chrome.runtime.sendMessage({\n \"message\": \"previewMode\"\n });\n}", "function loaded() {\n var cur_tab_url = chrome.extension.getBackgroundPage().CurrentTabUrl();\n if (/https:/.test(cur_tab_url)) {\n document.getElementById(\"not_ready_alert\").innerHTML =\n \"You can't grab snippets from secure webpages.\";\n } else if (!/http:/.test(cur_tab_url)) {\n document.getElementById(\"not_ready_alert\").innerHTML =\n \"You can't grab snippets from this page.\";\n } else { // http\n checkReadyness();\n }\n\n if (chrome.extension.getBackgroundPage().isFirstActivationOrNewRelease()) {\n document.getElementById('standard_actions').style.display = 'none';\n document.getElementById('update_notifications').style.display = '';\n }\n}", "function updateContent() {\n function updateTab(tabs) {\n if (tabs[0]) {\n currentTab = tabs[0];\n console.log(\"updateTabs\");\n \n // executeScript(currentTab);\n loadFoundWords(currentTab);\n }\n }\n\n var gettingActiveTab = browser.tabs.query({active: true, currentWindow: true});\n gettingActiveTab.then(updateTab);\n}", "function sendDataToContentScript(data)\n{\n if(isSecure && secureTabId)\n {\n chrome.tabs.sendMessage(secureTabId, {type: \"submit_data\", data: data});\n }\n}", "function injectAllScript()\n{\n // add in the lists\n injectScript( chrome.extension.getURL( '/src/lib/lists/gamejournopros.js' ), 'body' );\n injectScript( chrome.extension.getURL( '/src/lib/lists/journolist.js' ), 'body' );\n injectScript( chrome.extension.getURL( '/src/lib/lists/gamechanger-salon.js' ), 'body' );\n injectScript( chrome.extension.getURL( '/src/lib/lists/gawker.js' ), 'body' );\n\n injectScript( chrome.extension.getURL( '/src/lib/inject.js' ), 'body' );\n // site rules\n injectScript( chrome.extension.getURL( '/src/lib/sites.js' ), 'body' );\n}", "async function subtestContentScriptRegister(message, ...permissions) {\n let extension = ExtensionTestUtils.loadExtension({\n files: {\n \"background.js\": async () => {\n await browser.contentScripts.register({\n matches: [\"<all_urls>\"],\n css: [{ file: \"test.css\" }],\n js: [{ file: \"test.js\" }],\n matchAboutBlank: true,\n });\n\n browser.test.notifyPass(\"finished\");\n },\n \"test.css\": \"body { background-color: red; }\",\n \"test.js\": () => {\n document.body.querySelector(\".moz-text-flowed\").textContent +=\n \"Hey look, the script ran!\";\n },\n \"utils.js\": await getUtilsJS(),\n },\n manifest: {\n background: { scripts: [\"utils.js\", \"background.js\"] },\n permissions,\n },\n });\n\n await extension.startup();\n\n await extension.awaitFinish(\"finished\");\n await checkMessageBody(\n {\n backgroundColor: \"rgba(0, 0, 0, 0)\",\n textContent: \"\",\n },\n message\n );\n\n await extension.unload();\n}", "function alpacaTreasureIsland() {\n console.log(\"launched TI\")\n chrome.windows.getCurrent(function (currentWindow) {\n chrome.tabs.query({active: true, windowId: currentWindow.id},\n function(activeTabs) {\n chrome.tabs.executeScript(\n activeTabs[0].id, {file: 'alpacaTreasureIsland.js', allFrames: true});\n });\n }); \n}", "async function loadExtraScripts() {\n}", "function inject(){\n chrome.tabs.insertCSS(null, {file: \"./css/style.css\"})\n chrome.tabs.executeScript(null, {file: './js/foreground.js'});\n\n}", "onOpen () {\n // Inject any client scripts\n this.clientScripts.forEach(script => {\n this.page.injectJs(script)\n })\n }", "function executeIt() {\n \n \n //An example of how to dynamically change the popup. (e.g. activate a CSS file.)\n document.getElementById('popupCSS').disabled = false;\n \n \n //Query the active tab.\n chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n var activeTab = tabs[0];\n \n \n //An example of how to programmatically inject CSS into a webpage.\n chrome.tabs.insertCSS({file:\"content.css\"});\n \n \n //Send a message to a content script that is associated with the webpage.\n chrome.tabs.sendMessage(activeTab.id, {\"message\": \"pressedExecute\"});\n });\n}", "_onProcessReplaceableContent() {}", "function reportExecuteScriptError(error) {\n document.querySelector(\"#popup-content\").classList.add(\"d-none\");\n document.querySelector(\"#error-content\").classList.remove(\"d-none\");\n console.error(`Failed to execute fill form content script: ${error.message}`);\n}", "function evalScript (content) {\n var script = document.createElement('script');\n\n document.head.appendChild(script);\n script.appendChild(document.createTextNode(content));\n\n return script;\n}", "function injectDataGrabber(tab) {\r\n const urlToMatch = /https:\\/\\/keep.google.com\\/u\\/0\\/#NOTE\\/(\\d\\.)*/;\r\n\r\n if (urlToMatch.test(tab.url)) {\r\n chrome.tabs.executeScript(tab.id, {\r\n file: 'content-grabber.js'\r\n });\r\n } else {\r\n alert('Wrong page to grab data!');\r\n }\r\n }", "function UpdateScriptContentService($log, $sce, $filter) {\n return {\n update: function (selector, content) {\n if (!document) {\n $log.error('updateMeta: document is not available!');\n return;\n }\n\n if (!selector) {\n $log.error('updateMeta: please provide a selector');\n return;\n }\n\n var element = document.querySelector(selector);\n if(element){\n var trustedContent = $sce.trustAsHtml($filter('json')(content));\n element.outerHTML = '<script type=\"application/ld+json\">' + trustedContent + '</script>';\n }\n }\n };\n }", "constructor()\r\n {\r\n // Set up Log, and set up STOP listener.\r\n super(C.LOG_SRC.CONTENT_PEEPER);\r\n\r\n // Send a message to the background when window load is complete.\r\n var setWindowLoadComplete = () => {\r\n window.removeEventListener(C.EVT.LOAD, setWindowLoadComplete, false);\r\n this.loadComplete = true;\r\n\r\n //this.lm(('Content Tab\\'s Window.load() fired.');\r\n\r\n chrome.runtime.sendMessage(\r\n new ContentPeeperMessage(\r\n 'ContentPeeper window load',\r\n document.location.href,\r\n document.documentElement.outerHTML,\r\n )\r\n );\r\n };\r\n window.addEventListener(C.EVT.LOAD, setWindowLoadComplete, false);\r\n\r\n // Send a message to the background when document load is complete.\r\n var setDocLoadComplete = () => {\r\n if (document.readyState === C.EVT.COMPLETE) {\r\n document.removeEventListener(C.EVT.RSC, setDocLoadComplete, false);\r\n this.loadComplete = true;\r\n\r\n // Send the message with the doc's URL and HTML to Gimme's backend.\r\n chrome.runtime.sendMessage(\r\n new ContentPeeperMessage(\r\n 'ContentPeeper doc complete',\r\n document.location.href,\r\n document.documentElement.outerHTML\r\n )\r\n );\r\n }\r\n };\r\n document.addEventListener(C.EVT.RSC, setDocLoadComplete, false);\r\n\r\n // Do the content-peeping around for the backend when it messages us.\r\n chrome.runtime.onMessage.addListener((req, sender, res) => {\r\n this.peepAroundOnceContentLoaded(req, sender, res, false);\r\n });\r\n\r\n // Set the static instance.\r\n ContentPeeper.instance = this;\r\n }", "function sendMessageToContentJS(message, callback) {\n chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n chrome.tabs.sendMessage(tabs[0].id, message, callback);\n });\n}", "function reportExecuteScriptError(error) {\n document.querySelector(\"#popup-content\").classList.add(\"hidden\");\n document.querySelector(\"#error-content\").classList.remove(\"hidden\");\n console.error(`Failed to execute CourseSel content script: ${error.message}`);\n return \"ok\";\n}", "function injectNewScript(file, content) {\n // Make both items an array of lines.\n const lines = file.split('\\n');\n const contentLines = content.split('\\n');\n\n // Will store the index positions for the open and close <script> tags.\n let open;\n let close;\n\n lines.forEach((line, i) => {\n // Test each line to find the opening <script...> tag\n if (reScriptOpen.test(line)) {\n open = i + 1; // Add one so the index includes the matched <script>\n return;\n }\n // Test each line to find the closing </script> tag\n if (reScriptClose.test(line)) {\n close = i - 1; // Take one away to ensure inclusion of </script>\n return;\n }\n });\n\n // Everything up to and including the opening <script> tag.\n const top = lines.slice(0, open);\n // Everything from (inclusively) the </script> tag to EOF.\n const bottom = lines.slice(close);\n\n // Combine the three arrays and append the newline Vue files need.\n return [...top, ...contentLines, ...bottom].join('\\n');\n}", "function injectJSFile(context) {\n\tif (context == null || context.filename == null)\n\t\treturn;\n\tvar manifest = chrome.runtime.getManifest();\n\t//console.log(manifest);\n\t//Make sure file is in manifest\n\tif ($.inArray(context.filename, manifest.web_accessible_resources) == -1) {\n\t\tconsole.error(\"injectJS: Filename must be in manifest web_accessible_resources\");\n\t\treturn;\n\t}\n\t\n\tvar chromeExtId = chrome.i18n.getMessage(\"@@extension_id\");\n\tvar inject = document.createElement(\"script\");\n\tinject.text = '';\n\tinject.src = 'chrome-extension://' + chromeExtId + '/' + context.filename;\n\n\tdocument.head.appendChild(inject);\t\n}", "function init() {\r\n installDialog();\r\n document.addEventListener('keydown', handleKeyDownEvent);\r\n chrome.runtime.onMessage.addListener((request) => {\r\n injectCodeSnippet(request['code']);\r\n });\r\n}", "updateDom(props) {\n if(document.getElementById(\"chrome\")){\n let updateRequestFromBackgroundScript = { \n type: props.type,\n payload: props.payload\n };\n //console.log(\"UPDATING DOM!!!!!!!!!\",updateRequestFromBackgroundScript);\n document.getElementById(\"chrome\").innerHTML= JSON.stringify(updateRequestFromBackgroundScript);\n }\n }", "function reportExecuteScriptError(error) {\n errorPage()\n console.error(`Failed to execute navigate content script: ${error.message}`);\n}", "function InjectHerbie(tid, callback) {\n// if (tabstack.indexOf(tid) >= 0) {\n// chrome.tabs.sendMessage(tid, \"Show\", callback);\n// return;\n// }\n\n tabstack.push(tid);\n chrome.tabs.executeScript(tid, {file: \"dist/jquery.min.js\"}, function() {\n chrome.tabs.executeScript(tid, {file: \"dist/jquery.simulate.js\" }, function() {\n chrome.tabs.executeScript(tid, {file: \"dist/bililiteRange.js\" }, function() {\n chrome.tabs.executeScript(tid, {file: \"dist/jquery.simulate.ext.js\" }, function() {\n chrome.tabs.executeScript(tid, {file: \"dist/jquery.simulate.drag-n-drop.js\" }, function() {\n chrome.tabs.executeScript(tid, {file: \"dist/jquery.simulate.key-sequence.js\" }, function() {\n chrome.tabs.executeScript(tid, {file: \"dist/jquery.simulate.key-combo.js\" }, function() {\n chrome.tabs.executeScript(tid, {file: \"herbie/inspector.js\" }, function() {\n chrome.tabs.executeScript(tid, {file: \"herbie/herbie.js\" }, function() {\n chrome.tabs.executeScript(tid, {file: \"content.js\" }, function() {\n if (callback) callback();\n });\n });\n });\n });\n });\n });\n });\n });\n });\n });\n}", "function reportExecuteScriptError(error) {\n document.querySelector('#popup-content').classList.add('hidden');\n document.querySelector('#error-content').classList.remove('hidden');\n console.error(`Failed to execute archiver content script: ${error.message}`);\n}", "injectWidget(){\n var id = parseInt(this.state.id)-1;\n const script = document.createElement(\"script\");\n script.src = \"https://test-ancil-overlay.herokuapp.com/v1/funnel/display.js?agent_id=test&session_id=\"+id;\n console.log(script.src)\n script.async = true;\n document.body.appendChild(script);\n }", "function inject(o) {\r\n if (head = document.evaluate(\"//head\", document, null, 9, null).singleNodeValue) {\r\n s = document.createElement('script');\r\n s.innerHTML = o;\r\n head.appendChild(s);\r\n }\r\n}", "function loadContent(file) {\r\n var head=document.getElementsByTagName('head').item(0);\r\n var scriptTag=document.getElementById('loadScript');\r\n if(scriptTag)head.removeChild(scriptTag);\r\n script=document.createElement('script');\r\n script.src=file;\r\n script.type='text/javascript';\r\n script.id='loadScript';\r\n head.appendChild(script);\r\n setTimeout(load,1000)\r\n }", "static loadScript() {\n //Si notre script n'est pas en train de charger\n if (!Video.scriptIsLoading) {\n Video.scriptIsLoading = true; //Charger le script\n\n const script = document.createElement('script'); //Crée la balise script\n script.src = 'https://www.youtube.com/iframe_api'; //Changer sa propriété src pour celui du youtube\n document.body.appendChild(script); //Injecter la balise script dans le body\n }\n }", "onContentDomReady(event) {\r\n // Stub\r\n }", "function contentScriptWorker() {\n runtime.sendMessage({\n type: SIGN_CONNECT\n }, function (msg) {\n return console.info(msg);\n });\n runtime.onMessage.addListener(function (_ref) {\n var type = _ref.type,\n payload = _ref.payload;\n\n switch (type) {\n case SIGN_RELOAD:\n logger(\"Detected Changes. Reloading ...\");\n reloadPage && window.location.reload();\n break;\n\n case SIGN_LOG:\n console.info(payload);\n break;\n }\n });\n } // ======================== Called only on background scripts ============================= //", "createScript() {\n if (this.htmlElementsDom.getElementsByClassName(\"microfrontend_script\") != null) {\n\n for (let el of this.htmlElementsDom.getElementsByClassName(\"microfrontend_script\")) {\n let script = document.createElement(\"script\")\n script.setAttribute(\"type\", 'module');\n script.src = el.src;\n this.appendChild(script);\n }\n }\n\n }", "function on_dom_content_loaded () {\n //remove this handler\n document.removeEventListener(\"DOMContentLoaded\", on_dom_content_loaded, false);\n\n //call the onLoad function\n Survana.Workflow.OnPageLoad();\n }", "flushNonScript() {\n let bodyChildren = document.body.children;\n for (let i=0; i<bodyChildren.length; i++){\n let el = bodyChildren[i];\n if (el.tagName !== 'SCRIPT') {\n document.body.removeChild(el);\n }\n }\n }", "function InjectedScriptHostClass()\n{\n}", "function InjectedScriptHostClass()\n{\n}", "function loadMyContent () {\n // do your page operations here\n}", "function contentScriptWorker() {\n runtime.sendMessage({\n type: SIGN_CONNECT\n }).then(function (msg) {\n return console.info(msg);\n });\n runtime.onMessage.addListener(function (_ref) {\n var type = _ref.type,\n payload = _ref.payload;\n\n switch (type) {\n case SIGN_RELOAD:\n logger(\"Detected Changes. Reloading ...\");\n reloadPage && window.location.reload();\n break;\n\n case SIGN_LOG:\n console.info(payload);\n break;\n }\n });\n } // ======================== Called only on background scripts ============================= //", "function contentScriptWorker() {\n runtime.sendMessage({\n type: SIGN_CONNECT\n }).then(function (msg) {\n return console.info(msg);\n });\n runtime.onMessage.addListener(function (_ref) {\n var type = _ref.type,\n payload = _ref.payload;\n\n switch (type) {\n case SIGN_RELOAD:\n logger(\"Detected Changes. Reloading ...\");\n reloadPage && window.location.reload();\n break;\n\n case SIGN_LOG:\n console.info(payload);\n break;\n }\n });\n } // ======================== Called only on background scripts ============================= //", "function injectScript(script)\n {\n var curPage = obj.getPage();\n var tmpLibraryPath = curPage.libraryPath;\n\n curPage.libraryPath = obj.getModulesPath();\n\n if (!curPage.injectJs(script)) {\n curPage.libraryPath = tmpLibraryPath;\n throw 'Cannot inject: \"' + script + '\"';\n }\n\n curPage.libraryPath = tmpLibraryPath;\n }", "function loadScripts(){\n renderer.setIPC();\n inject.uglifyScripts();\n inject.injectScripts();\n}", "initScript() {\n if (!this.element.dataset.scripturl) {\n return;\n }\n\n const cachebuster = new Date().getTime();\n const url = `${this.element.dataset.scripturl}?component_id=${this.id}#${cachebuster}`\n const newScriptTag = document.createElement('script');\n newScriptTag.setAttribute('defer', '');\n newScriptTag.setAttribute('type', 'module');\n newScriptTag.setAttribute('src', url);\n \n\n this.script = document.head.appendChild(newScriptTag);\n }", "function injectScript(f) {\n var actualCode = '(' + f + ')();';\n var script = document.createElement('script');\n script.textContent = actualCode;\n (document.body||document.documentElement).appendChild(script);\n script.parentNode.removeChild(script);\n}", "function cb_contentLoaded(cb) {}", "unloadContent() {\n // TODO: Unload any non ContentManager content here\n }", "updateSiteScript(siteScriptUpdateInfo, content) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (content) {\r\n siteScriptUpdateInfo.Content = JSON.stringify(content);\r\n }\r\n return yield this.clone(SiteScripts$1, \"UpdateSiteScript\").execute({ updateInfo: siteScriptUpdateInfo });\r\n });\r\n }", "onReplacePartialDom(content, qs) {\n const replacementContent = content.html.querySelector(qs);\n const target = this.getElement().querySelector(qs);\n target.parentNode.replaceChild(replacementContent, target);\n\n this.parseContent(replacementContent);\n this.evalScripts(content.scripts);\n this.evalModules(content.modules);\n }", "static async manage() {\n if (!!!_PROPERTIES_.get(this))\n _PROPERTIES_.set(this, Object.create(null))\n\n // document.currentScript still works when called from a non-module script.\n let script = _PROPERTIES_.get(this).script = document.currentScript;\n\n await this.template;\n\n let tag = this.is;\n if (script.hasAttribute('tagname'))\n tag = script.getAttribute('tagname') || tag;\n\n customElements.define(tag, this);\n\n }", "function injectJS( link ) {\n\tvar script = document.createElement( 'script' );\n\tscript.type = 'text/javascript';\n\tscript.src = link;\n\tdocument.documentElement.appendChild( script );\n}", "function SafeScript(){}", "function execEditorContent() {\n noerror()\n execute(editor.getValue() + ';');\n }", "addComponentContent() {\r\n // this without polyfill\r\n // const importDoc = document.currentScript.ownerDocument; // importee\r\n\r\n console.log(this.getAttribute('src'))\r\n const importDoc = document._currentScript.ownerDocument; // importee\r\n this.template = importDoc.querySelector('template').cloneNode(true)\r\n console.log(this.template)\r\n this.getTemplate()\r\n\r\n }", "function xSmartLoadScript(url)\r\n{\r\n var loadedBefore = false;\r\n if (typeof(xLoadedList) != \"undefined\") {\r\n for (i=0; i<xLoadedList.length; i++) {\r\n if (xLoadedList[i] == url) {\r\n loadedBefore = true;\r\n break;\r\n }\r\n }\r\n }\r\n if (document.createElement && document.getElementsByTagName && !loadedBefore) {\r\n var s = document.createElement('script');\r\n var h = document.getElementsByTagName('head');\r\n if (s && h.length) {\r\n s.src = url;\r\n h[0].appendChild(s);\r\n if (typeof(xLoadedList) == \"undefined\") xLoadedList = new Array();\r\n xLoadedList.push(url);\r\n }\r\n }\r\n}", "function cantAffordOverlay(tab, siteData) {\n var opacity = Vars.UserData.TranspartOverlay ? \"0.85\" : \"1\";\n var imageURLNoPass = chrome.runtime.getURL(\"/img/siteKeeper3.png\");\n chrome.tabs.insertCSS({\n code: `\n .noPass:after { background-image:url(\"` + imageURLNoPass + `\"); }\n .noPass::before {background-color:rgba(0,0,0,`+ opacity + `)}`\n });\n\n chrome.tabs.executeScript(tab.id, {\n file: 'pageOverlay.js'\n }, function (tab) {\n chrome.tabs.executeScript(tab.id, {\n code: `\n document.getElementById(\"SitekeeperOverlay\").style.display = 'block'; \n document.getElementById(\"payToPass_btn\").style.display = 'none';\n document.getElementById(\"SitekeeperOverlay\").setAttribute(\"data-html\",\"You can't afford to visit ` + siteData.hostname + `\\\\n You shall not pass! \");\n document.getElementById(\"SitekeeperOverlay\").className = \"noPass\"; `\n });\n });\n}", "function allScriptsLoaded() {\n trace('allScriptsLoaded', TraceLevel.DEBUG);\n CWS.curState = WidgetState.INITIAL;\n CWS.flags.scriptsLoaded = true;\n if (CWS.flags.htmlLoaded) allWidgetStuffLoaded();\n }", "init() {\n document.addEventListener('DOMContentLoaded', this.loadContent);\n }", "async function subtestContentScriptManifest(message, ...permissions) {\n let extension = ExtensionTestUtils.loadExtension({\n files: {\n \"test.css\": \"body { background-color: red; }\",\n \"test.js\": () => {\n document.body.textContent += \"Hey look, the script ran!\";\n },\n },\n manifest: {\n permissions,\n content_scripts: [\n {\n matches: [\"<all_urls>\"],\n css: [\"test.css\"],\n js: [\"test.js\"],\n match_about_blank: true,\n match_origin_as_fallback: true,\n },\n ],\n },\n });\n\n // match_origin_as_fallback is not implemented yet. Bug 1475831.\n ExtensionTestUtils.failOnSchemaWarnings(false);\n await extension.startup();\n ExtensionTestUtils.failOnSchemaWarnings(true);\n\n await checkMessageBody(\n {\n backgroundColor: \"rgba(0, 0, 0, 0)\",\n textContent: \"\",\n },\n message\n );\n\n await extension.unload();\n}", "async function loadScript(path, callback) {\r\n\tlet element = document.createElement('script');\r\n\telement.className = \"citation-ext-script\";\r\n\telement.src = chrome.runtime.getURL(path);\r\n\r\n\tdocument.body.appendChild(element);\r\n\r\n\treturn new Promise((resolve, reject) => {\r\n\t\telement.onload = () => {\r\n\t\t\tif(typeof callback === 'function') callback();\r\n\t\t\tresolve();\r\n\t\t}\r\n\t});\r\n}", "injectScripts () {\n debug('inject scripts', arguments)\n Array.slice(arguments).forEach(script => {\n this.clientScripts.push(script)\n })\n }", "unloadContent() {\n // TODO: Unload any non ContentManager content here\n }", "createSiteScript(title, description, content) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return yield this.clone(SiteScripts$1, `CreateSiteScript(Title=@title,Description=@desc)?@title='${encodeURIComponent(title)}'&@desc='${encodeURIComponent(description)}'`)\r\n .execute(content);\r\n });\r\n }", "function getPageInfo(callback) \n { \n // Add the callback to the queue\n callbacks.push(callback); \n\n // Injects the content script into the current page \n chrome.tabs.executeScript(null, { file: \"content_script.js\" }); \n }", "function loadScript() {\n var tag = document.createElement('script');\n\n tag.src = \"https://www.youtube.com/iframe_api\";\n var firstScriptTag = document.getElementsByTagName('script')[0];\n firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n }", "function contentDomReady( domWindow )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( !frameLoaded )\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\tframeLoaded = 0;\r\n\r\n\t\t\t\t\t\teditor.fire( 'ariaWidget', iframe );\r\n\r\n\t\t\t\t\t\tvar domDocument = domWindow.document,\r\n\t\t\t\t\t\t\tbody = domDocument.body;\r\n\r\n\t\t\t\t\t\t// Remove this script from the DOM.\r\n\t\t\t\t\t\tvar script = domDocument.getElementById( \"cke_actscrpt\" );\r\n\t\t\t\t\t\tscript && script.parentNode.removeChild( script );\r\n\r\n\t\t\t\t\t\tbody.spellcheck = !editor.config.disableNativeSpellChecker;\r\n\r\n\t\t\t\t\t\tvar editable = !editor.readOnly;\r\n\r\n\t\t\t\t\t\tif ( CKEDITOR.env.ie )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Don't display the focus border.\r\n\t\t\t\t\t\t\tbody.hideFocus = true;\r\n\r\n\t\t\t\t\t\t\t// Disable and re-enable the body to avoid IE from\r\n\t\t\t\t\t\t\t// taking the editing focus at startup. (#141 / #523)\r\n\t\t\t\t\t\t\tbody.disabled = true;\r\n\t\t\t\t\t\t\tbody.contentEditable = editable;\r\n\t\t\t\t\t\t\tbody.removeAttribute( 'disabled' );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Avoid opening design mode in a frame window thread,\r\n\t\t\t\t\t\t\t// which will cause host page scrolling.(#4397)\r\n\t\t\t\t\t\t\tsetTimeout( function()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// Prefer 'contentEditable' instead of 'designMode'. (#3593)\r\n\t\t\t\t\t\t\t\tif ( CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900\r\n\t\t\t\t\t\t\t\t\t\t|| CKEDITOR.env.opera )\r\n\t\t\t\t\t\t\t\t\tdomDocument.$.body.contentEditable = editable;\r\n\t\t\t\t\t\t\t\telse if ( CKEDITOR.env.webkit )\r\n\t\t\t\t\t\t\t\t\tdomDocument.$.body.parentNode.contentEditable = editable;\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tdomDocument.$.designMode = editable? 'off' : 'on';\r\n\t\t\t\t\t\t\t}, 0 );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\teditable && CKEDITOR.env.gecko && CKEDITOR.tools.setTimeout( activateEditing, 0, null, editor );\r\n\r\n\t\t\t\t\t\tdomWindow\t= editor.window\t= new CKEDITOR.dom.window( domWindow );\r\n\t\t\t\t\t\tdomDocument\t= editor.document\t= new CKEDITOR.dom.document( domDocument );\r\n\r\n\t\t\t\t\t\teditable && domDocument.on( 'dblclick', function( evt )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar element = evt.data.getTarget(),\r\n\t\t\t\t\t\t\t\tdata = { element : element, dialog : '' };\r\n\t\t\t\t\t\t\teditor.fire( 'doubleclick', data );\r\n\t\t\t\t\t\t\tdata.dialog && editor.openDialog( data.dialog );\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// Prevent automatic submission in IE #6336\r\n\t\t\t\t\t\tCKEDITOR.env.ie && domDocument.on( 'click', function( evt )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar element = evt.data.getTarget();\r\n\t\t\t\t\t\t\tif ( element.is( 'input' ) )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar type = element.getAttribute( 'type' );\r\n\t\t\t\t\t\t\t\tif ( type == 'submit' || type == 'reset' )\r\n\t\t\t\t\t\t\t\t\tevt.data.preventDefault();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// Gecko/Webkit need some help when selecting control type elements. (#3448)\r\n\t\t\t\t\t\tif ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdomDocument.on( 'mousedown', function( ev )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar control = ev.data.getTarget();\r\n\t\t\t\t\t\t\t\tif ( control.is( 'img', 'hr', 'input', 'textarea', 'select' ) )\r\n\t\t\t\t\t\t\t\t\teditor.getSelection().selectElement( control );\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif ( CKEDITOR.env.gecko )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdomDocument.on( 'mouseup', function( ev )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif ( ev.data.$.button == 2 )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tvar target = ev.data.getTarget();\r\n\r\n\t\t\t\t\t\t\t\t\t// Prevent right click from selecting an empty block even\r\n\t\t\t\t\t\t\t\t\t// when selection is anchored inside it. (#5845)\r\n\t\t\t\t\t\t\t\t\tif ( !target.getOuterHtml().replace( emptyParagraphRegexp, '' ) )\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tvar range = new CKEDITOR.dom.range( domDocument );\r\n\t\t\t\t\t\t\t\t\t\trange.moveToElementEditStart( target );\r\n\t\t\t\t\t\t\t\t\t\trange.select( true );\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Prevent the browser opening links in read-only blocks. (#6032)\r\n\t\t\t\t\t\tdomDocument.on( 'click', function( ev )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tev = ev.data;\r\n\t\t\t\t\t\t\t\tif ( ev.getTarget().is( 'a' ) && ev.$.button != 2 )\r\n\t\t\t\t\t\t\t\t\tev.preventDefault();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t// Webkit: avoid from editing form control elements content.\r\n\t\t\t\t\t\tif ( CKEDITOR.env.webkit )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Mark that cursor will right blinking (#7113).\r\n\t\t\t\t\t\t\tdomDocument.on( 'mousedown', function() { wasFocused = 1; } );\r\n\t\t\t\t\t\t\t// Prevent from tick checkbox/radiobox/select\r\n\t\t\t\t\t\t\tdomDocument.on( 'click', function( ev )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif ( ev.data.getTarget().is( 'input', 'select' ) )\r\n\t\t\t\t\t\t\t\t\tev.data.preventDefault();\r\n\t\t\t\t\t\t\t} );\r\n\r\n\t\t\t\t\t\t\t// Prevent from editig textfield/textarea value.\r\n\t\t\t\t\t\t\tdomDocument.on( 'mouseup', function( ev )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif ( ev.data.getTarget().is( 'input', 'textarea' ) )\r\n\t\t\t\t\t\t\t\t\tev.data.preventDefault();\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// IE standard compliant in editing frame doesn't focus the editor when\r\n\t\t\t\t\t\t// clicking outside actual content, manually apply the focus. (#1659)\r\n\t\t\t\t\t\tif ( editable &&\r\n\t\t\t\t\t\t\t\tCKEDITOR.env.ie && domDocument.$.compatMode == 'CSS1Compat'\r\n\t\t\t\t\t\t\t\t|| CKEDITOR.env.gecko\r\n\t\t\t\t\t\t\t\t|| CKEDITOR.env.opera )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar htmlElement = domDocument.getDocumentElement();\r\n\t\t\t\t\t\t\thtmlElement.on( 'mousedown', function( evt )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// Setting focus directly on editor doesn't work, we\r\n\t\t\t\t\t\t\t\t// have to use here a temporary element to 'redirect'\r\n\t\t\t\t\t\t\t\t// the focus.\r\n\t\t\t\t\t\t\t\tif ( evt.data.getTarget().equals( htmlElement ) )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif ( CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900 )\r\n\t\t\t\t\t\t\t\t\t\tblinkCursor();\r\n\t\t\t\t\t\t\t\t\tfocusGrabber.focus();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tvar focusTarget = CKEDITOR.env.ie ? iframe : domWindow;\r\n\t\t\t\t\t\tfocusTarget.on( 'blur', function()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\teditor.focusManager.blur();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tvar wasFocused;\r\n\r\n\t\t\t\t\t\tfocusTarget.on( 'focus', function()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar doc = editor.document;\r\n\r\n\t\t\t\t\t\t\t\tif ( editable && CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900 )\r\n\t\t\t\t\t\t\t\t\tblinkCursor();\r\n\t\t\t\t\t\t\t\telse if ( CKEDITOR.env.opera )\r\n\t\t\t\t\t\t\t\t\tdoc.getBody().focus();\r\n\t\t\t\t\t\t\t\t// Webkit needs focus for the first time on the HTML element. (#6153)\r\n\t\t\t\t\t\t\t\telse if ( CKEDITOR.env.webkit )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif ( !wasFocused )\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\teditor.document.getDocumentElement().focus();\r\n\t\t\t\t\t\t\t\t\t\twasFocused = 1;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\teditor.focusManager.focus();\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tvar keystrokeHandler = editor.keystrokeHandler;\r\n\t\t\t\t\t\t// Prevent backspace from navigating off the page.\r\n\t\t\t\t\t\tkeystrokeHandler.blockedKeystrokes[ 8 ] = !editable;\r\n\t\t\t\t\t\tkeystrokeHandler.attach( domDocument );\r\n\r\n\t\t\t\t\t\tdomDocument.getDocumentElement().addClass( domDocument.$.compatMode );\r\n\t\t\t\t\t\t// Override keystroke behaviors.\r\n\t\t\t\t\t\teditable && domDocument.on( 'keydown', function( evt )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar keyCode = evt.data.getKeystroke();\r\n\r\n\t\t\t\t\t\t\t// Backspace OR Delete.\r\n\t\t\t\t\t\t\tif ( keyCode in { 8 : 1, 46 : 1 } )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar sel = editor.getSelection(),\r\n\t\t\t\t\t\t\t\t\tselected = sel.getSelectedElement(),\r\n\t\t\t\t\t\t\t\t\trange = sel.getRanges()[ 0 ];\r\n\r\n\t\t\t\t\t\t\t\t// Override keystrokes which should have deletion behavior\r\n\t\t\t\t\t\t\t\t// on fully selected element . (#4047) (#7645)\r\n\t\t\t\t\t\t\t\tif ( selected )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t// Make undo snapshot.\r\n\t\t\t\t\t\t\t\t\teditor.fire( 'saveSnapshot' );\r\n\r\n\t\t\t\t\t\t\t\t\t// Delete any element that 'hasLayout' (e.g. hr,table) in IE8 will\r\n\t\t\t\t\t\t\t\t\t// break up the selection, safely manage it here. (#4795)\r\n\t\t\t\t\t\t\t\t\trange.moveToPosition( selected, CKEDITOR.POSITION_BEFORE_START );\r\n\t\t\t\t\t\t\t\t\t// Remove the control manually.\r\n\t\t\t\t\t\t\t\t\tselected.remove();\r\n\t\t\t\t\t\t\t\t\trange.select();\r\n\r\n\t\t\t\t\t\t\t\t\teditor.fire( 'saveSnapshot' );\r\n\r\n\t\t\t\t\t\t\t\t\tevt.data.preventDefault();\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} );\r\n\r\n\t\t\t\t\t\t// PageUp/PageDown scrolling is broken in document\r\n\t\t\t\t\t\t// with standard doctype, manually fix it. (#4736)\r\n\t\t\t\t\t\tif ( CKEDITOR.env.ie && domDocument.$.compatMode == 'CSS1Compat' )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvar pageUpDownKeys = { 33 : 1, 34 : 1 };\r\n\t\t\t\t\t\t\tdomDocument.on( 'keydown', function( evt )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif ( evt.data.getKeystroke() in pageUpDownKeys )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tsetTimeout( function ()\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\teditor.getSelection().scrollIntoView();\r\n\t\t\t\t\t\t\t\t\t}, 0 );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Prevent IE from leaving new paragraph after deleting all contents in body. (#6966)\r\n\t\t\t\t\t\tif ( CKEDITOR.env.ie && editor.config.enterMode != CKEDITOR.ENTER_P )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdomDocument.on( 'selectionchange', function()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar body = domDocument.getBody(),\r\n\t\t\t\t\t\t\t\t\trange = editor.getSelection().getRanges()[ 0 ];\r\n\r\n\t\t\t\t\t\t\t\tif ( body.getHtml().match( /^<p>&nbsp;<\\/p>$/i )\r\n\t\t\t\t\t\t\t\t\t&& range.startContainer.equals( body ) )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t// Avoid the ambiguity from a real user cursor position.\r\n\t\t\t\t\t\t\t\t\tsetTimeout( function ()\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\trange = editor.getSelection().getRanges()[ 0 ];\r\n\t\t\t\t\t\t\t\t\t\tif ( !range.startContainer.equals ( 'body' ) )\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tbody.getFirst().remove( 1 );\r\n\t\t\t\t\t\t\t\t\t\t\trange.moveToElementEditEnd( body );\r\n\t\t\t\t\t\t\t\t\t\t\trange.select( 1 );\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}, 0 );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Adds the document body as a context menu target.\r\n\t\t\t\t\t\tif ( editor.contextMenu )\r\n\t\t\t\t\t\t\teditor.contextMenu.addTarget( domDocument, editor.config.browserContextMenuOnCtrl !== false );\r\n\r\n\t\t\t\t\t\tsetTimeout( function()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\teditor.fire( 'contentDom' );\r\n\r\n\t\t\t\t\t\t\t\tif ( fireMode )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\teditor.mode = 'wysiwyg';\r\n\t\t\t\t\t\t\t\t\teditor.fire( 'mode', { previousMode : editor._.previousMode } );\r\n\t\t\t\t\t\t\t\t\tfireMode = false;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tisLoadingData = false;\r\n\r\n\t\t\t\t\t\t\t\tif ( isPendingFocus )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\teditor.focus();\r\n\t\t\t\t\t\t\t\t\tisPendingFocus = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tsetTimeout( function()\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\teditor.fire( 'dataReady' );\r\n\t\t\t\t\t\t\t\t}, 0 );\r\n\r\n\t\t\t\t\t\t\t\t// IE, Opera and Safari may not support it and throw errors.\r\n\t\t\t\t\t\t\t\ttry { editor.document.$.execCommand( 'enableInlineTableEditing', false, !editor.config.disableNativeTableHandles ); } catch(e) {}\r\n\t\t\t\t\t\t\t\tif ( editor.config.disableObjectResizing )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\teditor.document.$.execCommand( 'enableObjectResizing', false, false );\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcatch(e)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t// For browsers in which the above method failed, we can cancel the resizing on the fly (#4208)\r\n\t\t\t\t\t\t\t\t\t\teditor.document.getBody().on( CKEDITOR.env.ie ? 'resizestart' : 'resize', function( evt )\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tevt.data.preventDefault();\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\t * IE BUG: IE might have rendered the iframe with invisible contents.\r\n\t\t\t\t\t\t\t\t * (#3623). Push some inconsequential CSS style changes to force IE to\r\n\t\t\t\t\t\t\t\t * refresh it.\r\n\t\t\t\t\t\t\t\t *\r\n\t\t\t\t\t\t\t\t * Also, for some unknown reasons, short timeouts (e.g. 100ms) do not\r\n\t\t\t\t\t\t\t\t * fix the problem. :(\r\n\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\tif ( CKEDITOR.env.ie )\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tsetTimeout( function()\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tif ( editor.document )\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar $body = editor.document.$.body;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$body.runtimeStyle.marginBottom = '0px';\r\n\t\t\t\t\t\t\t\t\t\t\t\t$body.runtimeStyle.marginBottom = '';\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000 );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t0 );\r\n\t\t\t\t\t}", "function Start() {\n // local variable\n let title = document.title;\n\n ///Displaying to console to confirm that the javascript file works.\n console.log(\n \"%c javascript works, Nice\",\n \"font-weight:bold; font-size: 20px;\"\n );\n console.log(\n \"%c ----------------------------\",\n \"font-weight:bold; font-size: 20px;\"\n );\n console.log(\"Title: \" + title);\n console.log();\n\n ///try catch any possible error!\n //Try various functions and if any of them doesn't exists, \n //it skips to catch block and then displays the content from the catch block.\n try {\n switch (title) {\n case \"COMP125 - Home\":\n content.HomeContent();\n\n break;\n\n case \"COMP125 - About\":\n content.AboutContent();\n break;\n\n case \"COMP125 - Contact\":\n content.ContactContent();\n break;\n\n default:\n throw \"Title not Defined\";\n break;\n }\n } catch (err) {\n console.log(err);\n console.warn(\"Oops\");\n }\n\n //injecting files by calling function\n insertHTML(\"../Scripts/View/content/header.html\", \"header\");\n insertHTML(\"../Scripts/View/content/footer.html\", \"footer\");\n }", "function backgroundInit() {\n storage( 'currentTab', null );\n // When Chrome displays any tab, show the pageAction\n // icon in that tab's addressbar.\n var handleTabEvents = function( tab ) {\n storage( 'currentTab', tab.id || tab );\n chrome.pageAction.show( tab.id || tab );\n isAuthenticated( {\n 'isAuthed': function () { clearPopup(); },\n 'notAuthed': function () { setPopup(); },\n 'error': function () { setPopup(); }\n } );\n };\n chrome.tabs.onSelectionChanged.addListener( handleTabEvents );\n chrome.tabs.onUpdated.addListener( handleTabEvents );\n chrome.tabs.getSelected( null, handleTabEvents );\n\n var handleClickEvents = function( response, tab ) {\n animatedIcon.stop();\n switch ( response.status ) {\n case STATUS_CREATED:\n chrome.pageAction.setIcon( {\n \"tabId\": tab.id,\n \"path\": \"success.png\"\n } );\n break;\n case STATUS_BADREQUEST:\n case STATUS_ERROR:\n case STATUS_FORBIDDEN:\n default:\n chrome.pageAction.setIcon( {\n \"tabId\": tab.id,\n \"path\": \"failure.png\"\n } );\n break;\n }\n };\n chrome.pageAction.onClicked.addListener( function ( tab ) {\n var response = sendURL( tab, handleClickEvents );\n } );\n\n // Listen for messages from the injected content script\n chrome.extension.onRequest.addListener(\n function( request, sender, sendResponse ) {\n if ( request.action === \"sendToInstapaper\" ) {\n sendURL( sender.tab, handleClickEvents );\n }\n sendResponse( {} );\n }\n );\n }" ]
[ "0.6764311", "0.67226905", "0.6652307", "0.65300083", "0.648088", "0.63694453", "0.6362446", "0.6333144", "0.60529995", "0.6031968", "0.598077", "0.5952544", "0.59380627", "0.59284914", "0.5928205", "0.5913311", "0.5912139", "0.5906892", "0.5904725", "0.5849885", "0.58398265", "0.5819825", "0.5819484", "0.5767933", "0.5764308", "0.5665053", "0.5638326", "0.5628309", "0.5602533", "0.55993515", "0.55928165", "0.5583734", "0.55545187", "0.5554092", "0.5541185", "0.5536809", "0.55248064", "0.551376", "0.54976493", "0.54890746", "0.54818237", "0.54762626", "0.546158", "0.54582644", "0.5454407", "0.54483294", "0.5420822", "0.5416289", "0.54085135", "0.5405343", "0.539867", "0.53765875", "0.5364932", "0.5360399", "0.5352708", "0.53513676", "0.5338716", "0.53332776", "0.53245276", "0.53192616", "0.53103817", "0.530561", "0.52984124", "0.52960104", "0.5293575", "0.5278404", "0.5269391", "0.5254789", "0.5252897", "0.5252897", "0.5245611", "0.5245017", "0.5245017", "0.5242907", "0.52342206", "0.5230288", "0.5229327", "0.52169085", "0.5216355", "0.52157325", "0.5214571", "0.5213281", "0.517456", "0.5152729", "0.5142067", "0.5133262", "0.51140195", "0.5111709", "0.51107234", "0.510796", "0.5094302", "0.5088852", "0.50853455", "0.50795346", "0.50784755", "0.507842", "0.5072834", "0.50704986", "0.5064274", "0.5058369" ]
0.5210339
82
Search Bar Dont Touch
function myFunction() { input = document.getElementById("myInput"); filter = input.value.toUpperCase(); table = document.getElementById("donorContents"); tr = table.getElementsByTagName("tr"); for (i = 0; i < tr.length; i++) { td = tr[i].getElementsByTagName("td")[0]; if (td) { txtValue = td.textContent || td.innerText; if (txtValue.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchthis(e){\n $.search.value = \"keyword to search\";\n $.search.blur();\n focused = false;\n needclear = true;\n}", "function focusSearchBoxListener(){ $('#query').val('').focus() }", "search(e){\n \n\t e.preventDefault();\n\t let input = document.querySelector('#photo-search');\n\t let term = input.value;\n\t \n\t if(term.length > 2){\t\t \n\t\t input.classList.add('searching');\n\t\t this.container.classList.add('loading');\n\t\t this.search_term = term;\n\t\t this.is_search = true;\n\t\t this.doSearch(this.search_term);\t\t \n\t } else {\t\t \n\t\t input.focus();\t\t \n\t }\n\t \n }", "onActionClickSearchBar() {\n this.search(this.state.search)\n }", "function do_search() {\n var query = input_box.val().toLowerCase();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= settings.minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, settings.searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function do_search() {\n var query = input_box.val().toLowerCase();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= settings.minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, settings.searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "search() {\n this.trigger('search', {\n element: this.searchBar,\n query: this.searchBar.value\n });\n }", "function searchInput() {\n \t\t\tvar i,\n \t\t\t item,\n \t\t\t searchText = moduleSearch.value.toLowerCase(),\n \t\t\t listItems = dropDownList.children;\n\n \t\t\tfor (i = 0; i < listItems.length; i++) {\n \t\t\t\titem = listItems[i];\n \t\t\t\tif (!searchText || item.textContent.toLowerCase().indexOf(searchText) > -1) {\n \t\t\t\t\titem.style.display = \"\";\n \t\t\t\t} else {\n \t\t\t\t\titem.style.display = \"none\";\n \t\t\t\t}\n \t\t\t}\n \t\t}", "clickSearchBox(event) {\n if (!this.isSearching()) {\n this.startSearching();\n }\n }", "function search() {\r\n let searchTerm = id(\"search-term\").value.trim();\r\n if (searchTerm !== \"\") {\r\n id(\"home\").disabled = false;\r\n loadBooks(\"&search=\" + searchTerm);\r\n }\r\n }", "function onSearchInput(e){\n //event? Yes? Set querey to whats in the search box. No? Set querey to nothing\n e \n ? setSearchString(e.target.value)\n : setSearchString('');\n console.log(`search input detected`)\n\n }", "function userNormalSearch(e){\n\te.preventDefault();\n\tsearchTerm = $('#search').val().trim(); \n\tuserSearch();\n}", "function manualSearch(e) {\n let term = document.querySelector(\"#searchTerm\").value;\n term = term.trim();\n if (term.length < 1) return;\n manualSearchData(term.toLowerCase());\n}", "function onSearch() {\n var wasActive = !!activeSearch\n activeSearch = searchBox.value\n if (!wasActive) {\n viewer.addFilter(searchFilter)\n }\n clearOption.style.visibility = \"visible\"\n onSearchBlur()\n viewer.filter()\n refreshFilterPane()\n }", "onSearch(e) {\n let term = e.target.value;\n // Clear the current projects/samples selection\n this.props.resetSelection();\n this.props.search(term);\n }", "onTextInput(event) {\r\n this.searchValue = event.target.value;\r\n if (this.searchValue.trim().length >= 1) {\r\n this.showSearchBoxList = true;\r\n const apiEndpoint = `${process.env.GOOGLE_PLACE_API_URL}${this.apiKey}&types=(${this.searchType})&language=${dxp.i18n.languages[0]}&input=${this.searchValue}`;\r\n this.getData(apiEndpoint).then(async (data) => {\r\n if (data) {\r\n this.filterItemsJson = data;\r\n if (this.filterItemsJson['predictions']) {\r\n this.filterItemsJson = this.filterItemsJson['predictions'];\r\n }\r\n if (this.filterItemsJson.length) {\r\n this.responseFlag = true;\r\n }\r\n }\r\n });\r\n }\r\n if (this.showSearchBoxList === false) {\r\n this.showSearchBoxList = !this.showSearchBoxList;\r\n }\r\n }", "function do_search() {\n var query = input_box.val();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= $(input).data(\"settings\").minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, $(input).data(\"settings\").searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function do_search() {\n var query = input_box.val();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= $(input).data(\"settings\").minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, $(input).data(\"settings\").searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function do_search() {\n var query = input_box.val();\n\n if(query && query.length) {\n if(selected_token) {\n deselect_token($(selected_token), POSITION.AFTER);\n }\n\n if(query.length >= $(input).data(\"settings\").minChars) {\n show_dropdown_searching();\n clearTimeout(timeout);\n\n timeout = setTimeout(function(){\n run_search(query);\n }, $(input).data(\"settings\").searchDelay);\n } else {\n hide_dropdown();\n }\n }\n }", "function topNavSearch() {\n\n\t\tvar topNavSearch = $('.top-nav-search-wrap'),\n\t\t\ttopnavSearchX = topNavSearch.children('div').find('i');\n\n\t\tif ( topNavSearch.length > 0 ) {\n\n\t\t\ttopNavSearch.children('div').width( sidebarTop.children('div').outerWidth() );\n\t\t\ttopnavSearchX.attr( 'class', 'fa fa-times search-icon' );\n\n\t\t\ttopNavSearch.children('a').on('click', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\ttopNavSearch.children('div').fadeIn();\n\t\t\t});\n\n\t\t\ttopnavSearchX.on('click', function() {\n\t\t\t\ttopNavSearch.children('div').fadeOut();\n\t\t\t});\n\n\t\t}\n\n\t}", "function searchThis(e) {\n $('#searchbox').val($(e).text());\n FJS.filter();\n}", "function responsive_autocomplete() {\n if(is_device.any()) {\n $('.search-bar input').on('focusin', function() {\n $('html, body').animate({ scrollTop: $('.search-bar').offset().top }, 'slow');\n });\n } else {\n $('.search-bar input').off('focusin');\n }\n}", "function onSearchFocus() {\n if (activeSearch) {\n searchButton.className = \"pivot_searchbtn\"\n // pop up the suggestions as if we had pressed a key\n onSearchKeyPress({})\n } else {\n searchForm.className = \"\"\n searchBox.value = \"\"\n }\n /* note that this must be on mousedown, not onclick!\n mousedown on this element happens before blur on the text box,\n but before click on this element. we change the text box's contents\n on blur, so using mousedown is the easiest solution. */\n searchButton.onmousedown = onSearch\n }", "searchinputCallback(event) {\n const inputVal = this.locationInput;\n if (inputVal) {\n this.getListQuery(inputVal);\n }\n else {\n this.queryItems = [];\n if (this.userSelectedOption) {\n this.userQuerySubmit('false');\n }\n this.userSelectedOption = '';\n if (this.settings.showRecentSearch) {\n this.showRecentSearch();\n }\n else {\n this.dropdownOpen = false;\n }\n }\n }", "search(){\n // Condition checks if nothing has been input when first entering website and clicking the button or when something is typed and then deleted\n // returns out of method if this is the case as there will be no results\n if(this.state === null || this.state.term === ''){\n return;\n }\n\n // Calls the passed down event handler search function from App.js\n this.props.onSearch(this.state.term);\n }", "search(value) {\n this.ux.input.value = value;\n this.ux.input.focus();\n this.onInputChanged();\n }", "search(e) {\n //NOTE You dont need to change this method\n e.preventDefault();\n _showLoading()\n try {\n SongService.getMusicByQuery(e.target.query.value);\n } catch (error) {\n console.error(error);\n }\n }", "function searchBarHander(e) {\n let inputText = e.target.value.toLowerCase();\n // Filtering the list based on user's input in Search bar\n toDoList.filter(function (task) {\n let taskText = task.text;\n let taskId = task.idNum;\n let element = document.querySelector(\n \"[data-task-id=\" + CSS.escape(taskId) + \"]\"\n );\n // if the user's input was found in the list, show that, and hide others\n if (taskText.toLowerCase().indexOf(inputText) != -1) {\n element.style.display = \"grid\";\n } else {\n element.style.display = \"none\";\n }\n });\n}", "function search () {\n let searchInput = document.querySelector('#search-bar');\n\n searchInput.addEventListener('input', function () {\n // Adds a Bootstrap class.\n let pokemonList = document.querySelectorAll('.group-list-item');\n let searchText = searchInput.value.toLowerCase();\n\n pokemonList.forEach(function (pokemon) {\n if (pokemon.innerText.toLowerCase().indexOf(searchText) > -1) {\n pokemon.style.display = '';\n } else {\n pokemon.style.display = 'none';\n }\n });\n });\n }", "function emitSearch(event){ if (event.which == 13) {addSearch();}}", "function searchOnKeyUp(e) {\n // Filter out up, down, esc keys\n const keyCode = e.keyCode;\n const cannotBe = [40, 38, 27];\n const isSearchBar = e.target.id === \"search-bar\";\n const keyIsNotWrong = !cannotBe.includes(keyCode);\n if (isSearchBar && keyIsNotWrong) {\n // Try to run a search\n runSearch(e);\n }\n}", "function search(){\n $('.search-small').click(function(){\n $('.nav-search').fadeIn();\n })\n $(\".nav-search\").click(function(){\n $(this).fadeOut();\n })\n $(\".closesearch\").click(function(){\n $(\".nav-search\").fadeOut();\n })\n $(\".nav-search .form-control\").click(function(e){\n e.stopPropagation();\n })\n}", "function onBlur() {\n // only focus out when there is no text inside search bar, else, dont focus out\n if (searchVal.current.value === \"\") {\n setSearchIconClick(false);\n }\n }", "function search() {\n var query_value = $('input#searchbar').val();\n $('b#search-string').html(query_value);\n if(query_value !== ''){\n $.ajax({\n type: \"POST\",\n url: \"/g5quality_2.0/search.php\",\n data: { query: query_value },\n cache: false,\n success: function(html){\n $(\"ul#results\").html(html);\n }\n });\n }return false;\n }", "function setSearch() {\r\n\tconst btn=document.querySelector('#searchbtn');\r\n\tbtn.addEventListener('click', searchCraft);\r\n\tconst bar = document.querySelector('#searchbar');\r\n\tbar.addEventListener(\"keyup\", function(event) {\r\n if (event.key === \"Enter\"|event.keyCode === 13) {\r\n searchCraft(event);\r\n\t }\r\n\t});\r\n}", "function search(e) {\n const input = e.currentTarget.value.toLocaleLowerCase();\n const search_div = document.querySelector('#activity #filter-search');\n const cards_div = document.querySelector('#activity #filter-cards');\n const filter_container = document.querySelector('#activity .filter-container');\n\n if (input.length === 0) {\n clearSearch(e);\n } else {\n if (search_div.dataset.visible !== 'visible') {\n search_div.dataset.visible = 'visible';\n cards_div.dataset.visible = 'hidden';\n filter_container.dataset.visible = 'hidden';\n }\n for (let key of search_div.querySelectorAll('.activity-row .agent')) {\n if (key.textContent.toLocaleLowerCase().includes(input)) {\n key.closest('.activity-row').dataset.active = 'true';\n } else key.closest('.activity-row').dataset.active = 'false';\n }\n }\n}", "function doSearchOnPopup() {\n var quickSearchPopUpTextBox = vm.searchQuery.replace(/<\\/?[^>]+>/gi, ' ');\n doSearch(quickSearchPopUpTextBox);\n }", "function doSearchOnPopup() {\n var quickSearchPopUpTextBox = vm.searchQuery.replace(/<\\/?[^>]+>/gi, ' ');\n doSearch(quickSearchPopUpTextBox);\n }", "function searchBar() {\n\t$(\".page-header\").append(\"<div class=\\\"searchBar\\\"><input type=\\\"text\\\" id=\\\"myInput\\\" placeholder=\\\"Search for names..\\\"></div>\");\n\t$(\"#myInput\").keyup(function () {\n\t let filter = $(this).val();\n\t\t $(\".student-item\").each(function () {\n\t\t if ($(this).text().search(new RegExp(filter, \"i\")) < 0 && $(this).attr(\"id\") !== \"page\") {\n\t\t $(this).hide();\n\t\t } else {\n\t\t \t$(\".null\").remove();\n\t\t $(this).show()\n\t\t }\n\t\t });\n\t\t \tif($('.student-item').children(':visible').length < 1 && $('.null').length === 0)\t {\t\n\t\t \t\t\t$(\".student-list\").prepend(\"<h1 class=\\\"null\\\">no matches</h1>\");\n\t\t\t\t} \n\n\t\t\t\t//if input box has no input, recreate first page with 10 elements\n\t\t\t\trestorePage(filter);\n\t});\n\n}", "function initSearch() {\n var searchInput=$(\"#search-input\");\n var magnifier=$(\"#magnifier\");\n var filmWrapper=$(\".film-wrapper\");\n var seriesWrapper=$(\".series-wrapper\");\n var myQuery;\n\n searchInput.on('keydown',function(e) {\n if (e.which == 13) {\n myQuery=searchInput.val();\n searchApi(myQuery);\n searchInput.val(\"\");\n }\n });\n\n magnifier.click(function() {\n myQuery=searchInput.val();\n searchApi(myQuery);\n searchInput.val(\"\");\n });\n}", "function Search() {\n\n if (stackMenu.classList.contains('openStackMenu')) {\n document.getElementById('category').click();\n \n //document.getElementById('menuInputMob').click();\n }\n if (document.getElementById(\"searchIcon\").getAttribute('class') === 'searchClose') {\n var mag = document.getElementById(\"mag\");\n var searchClose = document.getElementById(\"searchClose\");\n var myInput = document.getElementById(\"myInput\");\n $(mag).delay(50).fadeIn(50);\n $(searchClose).fadeOut(50);\n document.getElementById(\"myInput\").value = \"\";\n var input = document.querySelector('#myInput');\n var table2 = document.querySelector('#blog');\n searchTableI(table2, input);\n document.getElementById(\"searchIcon\").setAttribute('class','searchIcon');\n searchBloggerClear();\n bloggerFilterPos();\n $('#blog').scrollTop(0);\n $('#searchFlag').fadeOut(10);\n }\n else {\n if (document.getElementById(\"searchIcon\").getAttribute('class') === 'searchIcon') {\n if (document.getElementById(\"myInput\").value === \"\") {\n var input = document.querySelector('#myInput');\n var table2 = document.querySelector('#blog');\n searchTableI(table2, input);\n $(myInput).blur();\n searchBloggerClear();\n bloggerFilterPos();\n $('#blog').scrollTop(0);\n $('#searchFlag').fadeOut(10);\n }\n else {\n var mag = document.getElementById(\"mag\");\n var searchClose = document.getElementById(\"searchClose\");\n var myInput = document.getElementById(\"myInput\");\n console.log(myInput.value);\n $(mag).fadeOut(50);\n $(searchClose).delay(50).fadeIn(50);\n document.getElementById(\"searchIcon\").setAttribute('class','searchClose');\n $(myInput).blur();\n var input = document.querySelector('#myInput');\n var table2 = document.querySelector('#blog');\n searchTableI(table2, input);\n searchBlogger();\n bloggerFilterPos();\n $('#blog').scrollTop(0);\n $('#searchFlag').fadeIn(10).css(\"display\",\"inline-block\");\n }}\n }}", "function search() {\n\t\n}", "function searchEventListener() {\n\t$(\"#searchbtn\").click(function() {\n\t\tif ($(\"#searchbox\").val() != '') {\n\t\t\tsearchNewspapers($(\"#searchbox\").val());\n\t\t}\n\t});\n}", "function search(input, trigger, searchType, parentUL) {\n\n if (input.length === 0 || input.toLowerCase() === SN.Global.Settings.placeHolder.toLowerCase()) {\n return false;\n }\n var url, searchWindow;\n if (SN.Global.Settings.searchHandler) {\n resetSearchBox();\n SN.Global.Settings.searchHandler(input, trigger, searchType);\n } else {\n $('#search-box').blur();\n url = getSearchUrl(parentUL) + encodeURI(input);\n searchWindow = window.open(url, '_blank');\n searchWindow.focus();\n resetSearchBox();\n }\n }", "locationSearch() {\n if (this.$locationInput.val()) {\n $('.spinner-zone').show();\n IndexSearchObj.searchYelp();\n this.focusBlur();\n }\n }", "startSearch() {\n if (!this._isEnabled) {\n return;\n }\n this.showLoading();\n }", "handleSearchBar()\n {\n this._page = 1;\n this._searchBar = $(\"#searchBar\").val();\n this.getBooks();\n }", "focusSearchBar() {\n const searchInputEl = this.searchBarContainer && \n this.searchBarContainer.querySelector('.js-yext-query');\n searchInputEl && searchInputEl.focus();\n }", "function onSearchTerm(evt) {\n var text = evt.target.value;\n doSearch(text, $('#types .btn-primary').text());\n }", "function menu_search_focus(f) {\n\tif (f) {\n\t\t// prevent focus on the menu search box when the search page is active\n\t\tif (current == \"Special::Search\") {\n//\t\tff_fix_focus();\n\t\t\td$('string_to_search').focus();\n\t\t} else {\n\t\t\twoas.ui.focus_textbox();\n\t\t}\n\t} else {\n\t\tif (current != \"Special::Search\")\n\t\t\twoas.ui.blur_textbox();\n\t}\n}", "function handleSearch(from) {\n if (from === 'clear') {\n setFiltered_Devices([]);\n setSearchText('');\n setSearchTextLength(0);\n } else {\n if (searchtext.toString().trim() === '') {\n setFiltered_Devices([]);\n } else {\n setLoading(true);\n setSearchTextLength(searchtext.toString().trim());\n const _devicesArray = _devices;\n const _filteredArray = _devicesArray.filter(item =>\n item.deviceBrandName.includes(searchtext.toString().trim()),\n );\n if (_filteredArray.length > 0) {\n setFiltered_Devices(_filteredArray);\n } else {\n setFiltered_Devices([]);\n }\n }\n setLoading(false);\n }\n }", "function filterFavoritesViaSearchBar(event) {\n event.preventDefault();\n let input = [];\n let lowerCaseInput = favoritesSearchBar.value.toLowerCase();\n let lowerCaseNoSpacesInput = lowerCaseInput.replace(/ +/g, ' ');\n input.push(lowerCaseNoSpacesInput);\n user.filterFavsByNameOrIngredient(input);\n populateFavoritesPageAfterSearch();\n favoritesSearchBar.value = '';\n}", "function searchVenue(){\n\t\t$(\"#query\").click(function(){\n\t\t\t$(this).val(\"\");\n\t\t});\n\n\t\t$(\"#query\").blur(function(){\n\t\t\tif ($(this).val() == \"\") {\n\t\t\t\t$(this).val(\"Example: Ninja Japanese Restaurant\");\n\t\t\t}\n\t\t\n\t\t\tif ($(this).val() != \"Example: Ninja Japanese Restaurant\") {\n\t\t\t\t$(this).addClass(\"focus\");\n\t\t\t} else {\n\t\t\t\t$(this).removeClass(\"focus\");\n\t\t\t}\n\t\t});\n\n\t\t//Submit search query and call to getVenues\n\t\t$(\"#searchform\").submit(function(event){\n\t\t\tevent.preventDefault();\n\t\t\tif (!lat) {\n\t\t\t\tnavigator.geolocation.getCurrentPosition(getLocation);\n\t\t\t} else {\n\t\t\t\tgetVenues();\n\t\t\t}\t\t\n\t\t});\n\n\t}", "function enableSearch() {\n if (id(\"search-term\").value.trim() !== \"\") {\n id(\"search-btn\").disabled = false;\n id(\"search-btn\").addEventListener(\"click\", searchPosts);\n }\n }", "onConfirmSearchBar() {\n //this.search(this.state.search)\n }", "function search(){\n\t\t$(\"#mySearch\").on(\"keyup\", function() {\n\t\t\tvar value = $(this).val().toLowerCase();\n\t\t\t$(\".table-device tbody tr\").filter(function() {\n\t\t\t $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);\n\t\t\t});\n\t\t });\n\t}", "function appsSearch() {\n\n\n var _search_input = ga('#s_search');\n var _input_timeout;\n\n var _searchGetResult = function(_this) {\n\n if($.trim(_this.val())) {\n ga('#apps_search').removeClass('ui_search_field_empty').addClass('ui_search_loading');\n var _by_genre = _this.data('searcgcateg');\n var send = jAjax('/cmd.php', 'post', 'cmd=searchInApps&genre=' + escape(_by_genre) + '&key=' + _this.val());\n send.done(function(data) {\n ga('#apps_search').removeClass('ui_search_loading');\n if(data === '0') {\n\n return displayErr(lang.err_tehnic);\n\n } else {\n\n ga('.apps_list_content').hide();\n\n ga('#apps_search_res').remove();\n ga('.apps_list_content').after(data);\n\n }\n });\n\n } else {\n ga('#apps_search').addClass('ui_search_field_empty');\n ga('#apps_search_res').remove();\n ga('.apps_list_content').show();\n }\n\n }\n\n\n _search_input.off('keyup.appsSearch').on('keyup.appsSearch', function(e) {\n e.preventDefault();\n e.stopPropagation();\n var _this = ga(this);\n clearTimeout(_input_timeout);\n _input_timeout = setTimeout(function() {\n clearTimeout(_input_timeout);\n _searchGetResult(ga(_this));\n }, 500);\n\n });\n _search_input.off('keypress.appsSearch,keydown.appsSearch').on('keypress.appsSearch,keydown.appsSearch', function(e) {\n\n clearTimeout(_input_timeout);\n });\n}", "function searchFocus() {\n \t\t\tif (dropDown.style.display !== \"none\") {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tdropDown.style.display = \"block\";\n \t\t\taddEvent(document$$1, \"click\", hideHandler);\n \t\t\taddEvent(document$$1, \"keydown\", hideHandler);\n\n \t\t\t// Hide on Escape keydown or outside-container click\n \t\t\tfunction hideHandler(e) {\n \t\t\t\tvar inContainer = moduleFilter.contains(e.target);\n\n \t\t\t\tif (e.keyCode === 27 || !inContainer) {\n \t\t\t\t\tif (e.keyCode === 27 && inContainer) {\n \t\t\t\t\t\tmoduleSearch.focus();\n \t\t\t\t\t}\n \t\t\t\t\tdropDown.style.display = \"none\";\n \t\t\t\t\tremoveEvent(document$$1, \"click\", hideHandler);\n \t\t\t\t\tremoveEvent(document$$1, \"keydown\", hideHandler);\n \t\t\t\t\tmoduleSearch.value = \"\";\n \t\t\t\t\tsearchInput();\n \t\t\t\t}\n \t\t\t}\n \t\t}", "search(event){\n this.placeService.textSearch({\n query: `${event.target.value}`,\n type: 'airport'\n }, this.handleSuggestions);\n }", "function buttonSearch(){\n\tsearchTerm = this.attributes[2].value; \n\tsearchTerm = searchTerm.replace(/\\s+/g, '+').toLowerCase();\n\t\t\n \tdisplayGifs ();\n}", "function onSearchButton(event) {\n if (\n event.target.label ==\n gSearchBundle.GetStringFromName(\"labelForSearchButton\")\n ) {\n onSearch();\n } else {\n onSearchStop();\n }\n}", "function pressKey(event){\n var enterKey=event.keyCode;\n if(enterKey===13){\n if($(\"#searchBox\").val()==\"\"){\n event.preventDefault();\n $(\"#searchResults\").html(\"Type something first you silly duck.\");\n }else{\n event.preventDefault();\n findSearch();\n }}}", "search(e) {\n //NOTE You dont need to change this method\n e.preventDefault();\n try {\n songService.getMusicByQuery(e.target.query.value);\n } catch (error) {\n console.error(error);\n }\n }", "onSearchInput(evt) {\n this.setState({ searchTerm: evt.target.value, didAtLeastOneSearch: true });\n\n clearTimeout(this.searchDebounce);\n this.searchDebounce = setTimeout(async () => {\n const rez = await this.search();\n this.setState({ searchOffset: 0, searchResults: rez });\n }, 100);\n }", "function handleSearch() {\n\n\tvar value = $(\"#searchBox\").val();\n\t\n\tif(value != null && value != \"\") {\n\t\tsearchStationForName(value);\n\t}\n\n}", "function searchBarInputEventHandler()\n{\n\tvar\tsearchBarId = document.getElementById(\"searchBar\");\n\tsearchResults = [];\n\tvar searchFor = searchBarId.value.toLowerCase();\n\n\t// If there is actually something typed in the searchbar\n\tif(searchFor.length > 0)\n\t{\n\t\tsearching = true;\n\n\t\tcontactObjectLoop: for(contactObject in contactArray)\n\t\t{\n\t\t\t// If First and Last Name Both Match\n\t\t\tif((contactArray[contactObject].firstName.toLowerCase() + \" \" + contactArray[contactObject].lastName.toLowerCase()).search(searchFor) > -1)\n\t\t\t{\n\t\t\t\tsearchResults.push(contactArray[contactObject]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// If Only One Property Matches\n\t\t\t\tcontactPropertyLoop: for(contactProperty in contactArray[contactObject])\n\t\t\t\t{\n\t\t\t\t\tif(typeof contactArray[contactObject][contactProperty] === \"string\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif(contactArray[contactObject][contactProperty].toLowerCase().search(searchFor) > -1 && contactProperty != \"notes\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Add the contact that contained the property to the searchResults Array\n\t\t\t\t\t\t\t// as long as that property is of type string, and is not the \"notes\" property\n\t\t\t\t\t\t\tsearchResults.push(contactArray[contactObject]);\n\t\t\t\t\t\t\tbreak contactPropertyLoop;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tsearching = false;\n\t}\n\tupdateContactList();\n}", "function onSearchBlur() {\n if (activeSearch) {\n searchBox.value = activeSearch\n searchButton.className = \"pivot_searchbtn pivot_clrsearch\"\n searchButton.onmousedown = clearSearch\n } else {\n searchForm.className = \"pivot_watermark\"\n searchBox.value = \"Search...\"\n searchButton.onmousedown = null\n }\n searchSuggestions.innerHTML = \"\"\n currentSuggestion = -1\n suggestionsCount = 0\n }", "function search(evt){\r\n\r\n if (evt){\r\n // don't search if pressing keys to navigate the list\r\n switch(evt.which){\r\n case 13:\r\n case 37:\r\n case 38:\r\n case 40:\r\n evt.preventDefault();\r\n evt.stopPropagation();\r\n return false; \r\n break;\r\n }\r\n }\r\n\r\n var searchstring = plugin.pcwInput.val();\r\n\r\n if (searchstring == ''){\r\n return;\r\n }\r\n\r\n // store the search string\r\n plugin.pcwInput.data('search-text',searchstring);\r\n\r\n if ($.trim(searchstring) == ''){\r\n return false;\r\n }\r\n \r\n $.ajax({\r\n url: constants.searchURL.replace('{{key}}', plugin.config.apikey) + searchstring,\r\n type: 'GET',\r\n dataType: 'jsonp',\r\n success: function(data){\r\n \r\n var addresses = data.predictions;\r\n\r\n if (addresses.length > 0){\r\n\r\n if (addresses.length == 1){\r\n // go straight to browse ??\r\n //browse(addresses[0][1]);\r\n }\r\n\r\n plugin.pcwAddressBrowse.trigger('hide');\r\n plugin.pcwAddressSelect.html('');\r\n\r\n // check searchstring is still current.\r\n if (searchstring === plugin.pcwInput.val()){\r\n \r\n // add the addresses to the Select drop down\r\n $.each(addresses, function(index, value){\r\n var listitem = $('<li></li>');\r\n var css = (value.complete) ? 'finish' : 'browse';\r\n var listitemlink = $('<a href=\"#\" class=\"'+css+'\">'+value.prediction+'</a>').data((value.complete)?'finish-id':'browse-id',value.refs);\r\n\r\n plugin.pcwAddressSelect.append(listitem.append(listitemlink)).trigger('show');\r\n\r\n });\r\n\r\n }\r\n\r\n }else{\r\n // try and filter any results we already have ??\r\n //filter(plugin.pcwAddressSelect, evt);\r\n }\r\n\r\n },\r\n error: function() { debug('Search failed',2) },\r\n timeout: 2000\r\n });\r\n }", "onSearch() {\n try {\n const searchText = this.getSearchHash();\n if (searchText === this.priorSearchText)\n return;\n this.engine.search(searchText);\n this.priorSearchText = searchText;\n }\n catch (ex) {\n this.publish(\"error\", ex.message);\n }\n }", "search(keyCode){\n if( !keyCode )\n return;\n \n if( keyCode === 13 && this.inputString){\n this.setSearchBarPos();\n this.setState({\n googleSearchQuery : this.inputString,\n uploadedData : '',\n fileName : '',\n errorMsg : '',\n });\n }\n\n }", "search(e) {\n //NOTE You dont need to change this method\n e.preventDefault();\n try {\n SongsService.getMusicByQuery(e.target.query.value);\n } catch (error) {\n console.error(error);\n }\n }", "function active(){\n\tvar searchBar = document.getElementById(\"searchBar\");\n\n\tif(searchBar.value == \"Search...\"){\n\t\tsearchBar.value = \"\";\n\t\tsearchBar.placeholder = \"Search...\"\n\t}\n}", "function handleSearchV1() {\n jQuery('.header-v5 .search-button').click(function () {\n jQuery('.header-v5 .search-open').slideDown();\n });\n\n jQuery('.header-v5 .search-close').click(function () {\n jQuery('.header-v5 .search-open').slideUp();\n });\n\n jQuery(window).scroll(function(){\n if(jQuery(this).scrollTop() > 1) jQuery('.header-v5 .search-open').fadeOut('fast');\n });\n }", "function handleEnterKeyDownInSearchBox() {\n var value = $(idSearchBoxJQ).val();\n\n var item = isValueAMatchInLookupItems(value);\n\n //If it is match we select the item\n if (item !== null) {\n selectItem(item);\n\n } else {\n if (useAutoCompleteOnKeyPress == false) {\n populateResults();\n }\n\n }\n\n\n }", "function search() {\n let search_text = $search_text.value;\n decide_search(search_text)\n}", "openSearch() {\n this.element_main.style.visibility = \"visible\"; // show search box\n this.element_input.focus(); // put focus in input box so you can just start typing\n this.visible = true; // search visible\n }", "function inputGotFocus() {\r\n\tthis.value = '';\r\n\tsetSearchButtonEnabled(false);\r\n}", "function handleSearchV2() {\n $(\".blog-topbar .search-btn\").on(\"click\", function() {\n if (jQuery(\".topbar-search-block\").hasClass(\"topbar-search-visible\")) {\n jQuery(\".topbar-search-block\").slideUp();\n jQuery(\".topbar-search-block\").removeClass(\"topbar-search-visible\");\n } else {\n jQuery(\".topbar-search-block\").slideDown();\n jQuery(\".topbar-search-block\").addClass(\"topbar-search-visible\");\n }\n });\n $(\".blog-topbar .search-close\").on(\"click\", function() {\n jQuery(\".topbar-search-block\").slideUp();\n jQuery(\".topbar-search-block\").removeClass(\"topbar-search-visible\");\n });\n jQuery(window).scroll(function() {\n jQuery(\".topbar-search-block\").slideUp();\n jQuery(\".topbar-search-block\").removeClass(\"topbar-search-visible\");\n });\n }", "function showInputSearch() {\n var inputIcon = document.querySelector(\".header__search-icon\");\n var inputField = document.querySelector(\".header__search-input\");\n inputIcon.addEventListener(\"click\", function () {\n inputField.classList.toggle(\"active\");\n });\n } //handle different independent tabs on one page", "function handleSearch(e) {\n e.preventDefault();\n let input = document.getElementById('networkSearch');\n\t\tlet search = input.value;\n\t\tprops.handleSearch(search);\n\t\tinput.value = '';\n }", "get searchBar() { return $('[name=\"q\"]') }", "function animateSearch() {\n const searchSection = document.querySelector('section');\n const searchInput = document.querySelector('input');\n if (searchInput.value === '') {\n return;\n }\n if (searchSection.className.includes('top')) {\n return;\n }\n return searchSection.classList.add('top');\n}", "function userSearch(e) {\n if (e.keyCode == \"13\") {\n search();\n } else if (e.type == \"click\") {\n search();\n };\n\n function search() {\n\n const searchValue = $(\"#inputValue\").val().trim();\n searchWeather(searchValue);\n searchHistoryBtn(searchValue);\n\n // -------------------------- Save to Local Storage ---------------------------------------\n const userInput = $(this).siblings(\"#inputValue\").val();\n localStorage.setItem(searchValue, userInput);\n\n };\n\n }", "function handleSearch(e) {\n const value = e.target.value;\n const filtered = tasks.filter(item => item.tarefa.toLowerCase().includes(value.toLowerCase()));\n setRendTasks(filtered);\n setSearch(value);\n }", "function onSearchKeyPress(e) {\n switch (e.keyCode) {\n case 38:\n // up arrow\n updateSuggestion(currentSuggestion - 1)\n break\n case 40:\n // down arrow\n updateSuggestion(currentSuggestion + 1)\n break\n case 13:\n // enter. it'll submit the form, but let's unfocus the text box first.\n inputElmt.focus()\n break\n default:\n nextSearch = searchBox.value\n var searchResults = viewer.runSearch(nextSearch, true)\n searchSuggestions.innerHTML = \"\"\n currentSuggestion = -1\n suggestionsCount = 0\n addWordWheelResults(searchResults.front)\n addWordWheelResults(searchResults.rest)\n }\n }", "function hideSearch() {\n\tdisplaying_search = false;\n\t$.search_overlay.zIndex = 0;\n\t$.lists_container.scrollEnabled = true;\n\t$.search_textfield.blur();\n\t$.search_textfield.value = '';\n\n\tvar animation = Ti.UI.createAnimation({\n\t\ttop: -70,\n\t\tduration: 250\n\t});\n\tif (OS_ANDROID) {\n\t\tanimation.addEventListener('complete', function(e){\n\t\t\t$.search_textfield.hide();\t\n\t\t});\n\t}\n\t$.container.animate(animation);\n}", "function handleSearchKeystroke(event) {\r\n searchText = document.getElementById('search').value.toLowerCase().trim();\r\n let matchingBooks = allBooks.filter(book => book.title.toLowerCase().includes(searchText) || book.author.toLowerCase().includes(searchText));\r\n removeBooksFromDOM();\r\n matchingBooks.forEach(function (book) {\r\n insertNewBook(book.id, book.title, book.author, book.subject, book.photoURL, book.vendorURL, book.favorite);\r\n });\r\n applyEventListeners();\r\n}", "bindFocus(input){\n input.onfocus = event => {\n if (document.activeElement != this.focusedInput){\n clearResults();\n this.focusedInput = input;\n if ( event.target.value.length > 0 ){\n this.timer = setTimeout( () => this.search(event), 100);\n }\n }\n };\n }", "function searching() {\n $('.searchboxfield').on('input', function () { // connect to the div named searchboxfield\n var $targets = $('.urbacard'); // \n $targets.show();\n //debugger;\n var text = $(this).val().toLowerCase();\n if (text) {\n $targets.filter(':visible').each(function () {\n //debugger;\n mylog(mylogdiv, text);\n var $target = $(this);\n var $matches = 0;\n // Search only in targeted element\n $target.find('h2, h3, h4, p').add($target).each(function () {\n tmp = $(this).text().toLowerCase().indexOf(\"\" + text + \"\");\n //debugger;\n if ($(this).text().toLowerCase().indexOf(\"\" + text + \"\") !== -1) {\n // debugger;\n $matches++;\n }\n });\n if ($matches === 0) {\n // debugger;\n $target.hide();\n }\n });\n }\n\n });\n\n\n}", "function initSearchBar() {\n var category = $('select#search-category').val();\n var placeholder = CONFIG.search_placeholder[category];\n var search = $('input#mapsearch');\n var width = $(window).width();\n if (width < 768) {\n if (search.hasClass('collapsed')) return;\n search.addClass('collapsed');\n setTimeout(function() { search.attr('placeholder','') }, 300);\n search.siblings().find('span.glyphicon-search').on('click', function() {\n search.toggleClass('collapsed');\n if (search.hasClass('collapsed')) {\n setTimeout(function() {\n search.attr('placeholder','');\n search.val('');\n }, 300);\n } else {\n search.attr('placeholder',placeholder);\n // search.off('click');\n }\n });\n } else {\n search.removeClass('collapsed');\n search.attr('placeholder',placeholder);\n }\n}", "function onclickForSearchButton(event)\n{\n //console.log(event);\n \n var q = document.getElementById('search-query').value; //escape here?\n \n //some kanji searches are going to be legitimately only one char.\n //we need a trim() function instead...\n if(q.length < 1)\n {\n return;\n }\n \n buttonSpinnerVisible(true);\n \n var matches = doEdictQueryOn(q);\n}", "function setQuery(event) { \r\n if(event.keyCode == 13) { //13 è l'unicode che corrisponde al tasto INVIO\r\n getResults(srchBar.value); //in input la città e in output le informazioni\r\n srchBar.value = \"\";\r\n circleBtnSearch.setAttribute(\"class\", \"not-active\");\r\n srchbar.hidden = !srchbar.hidden;\r\n }\r\n}", "function inactive(){\n\tvar searchBar = document.getElementById(\"searchBar\");\n\n\tif(searchBar.value == \"Search...\"){\n\t\tsearchBar.value = \"Search...\";\n\t\tsearchBar.placeholder = \"\";\n\t}\n}", "function search(input, resultList) {\n if (input.value.length > 3 && input === document.activeElement) {\n ajaxcall(input.value, resultList);\n }\n else {\n hideList(resultList);\n }\n}", "function find() {\n const searchInput = document\n .querySelector('#search-bar')\n .value.toUpperCase();\n const fullList = document.querySelectorAll('.pokedex-list__item');\n\n fullList.forEach(function (entry) {\n if (entry.innerText.toUpperCase().indexOf(searchInput) > -1) {\n entry.style.display = '';\n } else {\n entry.style.display = 'none';\n }\n });\n }", "function custom_search() {\n var searchdata = document.getElementById(\"searchFilter\").value;\n if (searchdata == null || searchdata == \"\") {\n if (config.data[0].platform == 'ios' || config.data[0].platform == 'android') {\n navigator.notification.alert(locale.message.alert[\"message_when_empty_search\"], function() {}, config.data[0].app_name, locale.message.button[\"close\"]);\n } else {\n alert(locale.message.alert[\"message_when_empty_search\"]);\n }\n } else {\n searchdata = Base64.encode(searchdata);\n localStorage[config.data[0].storage_key+\"_search_data_value\"] = searchdata;\n var dirPath = dirname(location.href);\n var fullPath = dirPath + \"/search.html?search-data=\" + searchdata;\n window.location = fullPath;\n }\n}", "function handleSearchTermChange(event) {\n\t\tconst value = event.target.value;\n\n\t\t// 1. Change value tag input & check !onSubmit props\n\t\tsetSearchTerm(value);\n\t\tif (!onSubmit) return;\n\n\t\t// 2. Clear item at 1st render\n\t\tif (typingTimeoutRef.current) {\n\t\t\tclearTimeout(typingTimeoutRef.current);\t\t\t\n\t\t}\n\n\t\t// 3. After 300ms and stop typing => filter item\n\t\ttypingTimeoutRef.current = setTimeout(() => {\n\t\t\tconst formValues = {\n\t\t\t\tsearchTerm: value,\n\t\t\t};\n\t\t\tonSubmit(formValues);\n\t\t}, 300);\n\t}", "function displayNewSearchResults(event) {\n let searchTerm = event.target.value;\n let currentSearch = giphy[\"query\"][\"q\"];\n if (searchTerm !== currentSearch && searchTerm !== \"\") {\n giphy[\"query\"][\"q\"] = searchTerm;\n updateOffset(true);\n update();\n }\n}", "function searchQuery(){\n\t// clear the previous search results\n\t$(\"#content\").html(\"\");\n\t// get the query from the search box\n\tvar query = $(\"#searchBox\").val().replace(\" \", \"%20\");\n\tdisplaySearchResults(query);\n\t// clear search box for next query\n\t$(\"#searchBox\").val(\"\");\n}", "function onSearch(keyword) {\n renderSearchInput(keyword);//if user clicked and not typed\n keyword = keyword.toLowerCase().trim();\n setImgsForDisplay(keyword);\n const images = getImages();\n const isNothingFound = images.every(img => img.isHidden);\n if (isNothingFound) setAllImgsForDisplay();\n renderImgs();\n}", "function searchHandler(e) {\n \"use strict\";\n // Prevent default form action\n e.preventDefault();\n showFilteredBreeds();\n}" ]
[ "0.74653494", "0.7185204", "0.71799463", "0.7064914", "0.70223504", "0.70223504", "0.7007839", "0.69741684", "0.6968857", "0.69623065", "0.69113153", "0.6891925", "0.68889374", "0.6871818", "0.6863558", "0.6846418", "0.68369764", "0.68369764", "0.68369764", "0.6825098", "0.68218833", "0.6799819", "0.67756444", "0.6758578", "0.67514014", "0.67430335", "0.67392343", "0.67380595", "0.67251384", "0.66869503", "0.667196", "0.6662064", "0.665414", "0.6646948", "0.66342825", "0.66065377", "0.6606308", "0.6606308", "0.66045296", "0.6600128", "0.65967983", "0.6590581", "0.6589732", "0.6585624", "0.65834993", "0.6577047", "0.6566707", "0.655363", "0.6546832", "0.6538905", "0.6536278", "0.6534361", "0.65305805", "0.6529184", "0.65259844", "0.65228224", "0.65215033", "0.6519626", "0.6507824", "0.6498869", "0.64987767", "0.6495431", "0.64854157", "0.6483869", "0.64827174", "0.6480669", "0.647613", "0.6468596", "0.6460854", "0.6452842", "0.6449119", "0.6437971", "0.6437856", "0.64330184", "0.64288163", "0.6427822", "0.64263356", "0.64242625", "0.64227", "0.6420713", "0.6420702", "0.6420157", "0.6411965", "0.6407858", "0.64075285", "0.64059746", "0.64023733", "0.6398574", "0.6391504", "0.63885826", "0.6386324", "0.63852006", "0.63793135", "0.637817", "0.6376005", "0.63680804", "0.6366914", "0.6362081", "0.6354999", "0.63533723", "0.63495827" ]
0.0
-1
const comments_data = comments.comments;
render() { if (this.props.comments !== []) { return ( <Fragment> <AddComment /> <div className='container-sm '> {this.props.comments.map(comment => ( <div className=' card border-secondary mb-3' key={comment.id} > <div className="card-header"> <div className="text-info">@ {comment.author} </div> </div> <div className="card-body mx-4"> <div>{comment.content}</div> <div className=" font-weight-light text-muted text-right mr-5">{comment.created_at}</div> </div> </div> ))} </div> </Fragment> ) } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAll() {\n return {\n comments: _comments\n };\n }", "getComments(){\n\n }", "_getComments() {\n const caption = this.caption.value.trim();\n\n if (!caption) return {};\n\n const { uid, username } = this.props.currentUser;\n const commentId = generateID('comment-');\n console.log(this.props.currentUser);\n\n return {\n [commentId]: {\n id: commentId,\n value: caption,\n author: username,\n authorId: uid,\n created: (new Date()).toISOString()\n }\n };\n }", "get comments() {\n\t\treturn this.__comments;\n\t}", "serializeComment(comment) {\n return {\n id: comment.id,\n commentText: xss(comment.comment_text),\n authorId: comment.author_id,\n authorName: comment.author_name,\n parkCode: comment.park_code,\n dateSubmitted: comment.date_submitted\n };\n }", "comments(comment) {\n // console.log(`Incoming comment: ${comment.text}`)\n }", "get comments() {\r\n return new Comments(this);\r\n }", "function fetchComments() {\n fetch(`https://sneaker-db.herokuapp.com//api/v1/comments/`)\n .then(r => r.json())\n .then((data) => {\n allComments = data\n viewComments()\n })\n}", "function Comment(){\n this.id;\n this.user_id;\n this.entry_id;\n this.date;\n this.text;\n}", "_getComments(){\n // repo\n // call REST api resources (AJAX request)\n const commentList = [\n {author : \"First\", body : \"This is first comment!!!\" },\n {author : \"Second\", body : \"This is second comment!!!\" },\n {author : \"Third\", body : \"This is third comment!!!\" },\n ];\n\n // return a JSX Code\n // loop through all comments and generate a Comment component\n return commentList.map(comment => {\n return (<Comment author={comment.author} body={comment.body} />);\n });\n }", "async acquireComment({ params, response }) {\n try {\n const comments = await Database.from(\"comments\").where({\n PostID: params.postID\n });\n let data = [];\n for (let index in comments) {\n let commentContent = new Object();\n let comment = comments[index];\n let member = await Member.find(comment.MemberID);\n comment.userEmail = member.email;\n\n commentContent.comment = comment.comment;\n commentContent.commentUser = comment.userEmail;\n data.push(commentContent);\n }\n return response.json({ data: data });\n } catch (error) {\n console.log(error);\n }\n }", "constructor(data) {\n this.comments = data.comments;\n this.points = data.points;\n this.author = data.author;\n this.title = data.title;\n this.uri = data.uri;\n this.rank = data.rank;\n }", "getcomment(ref) {\n return apiClient.get(`films/comment/${ref}`)\n }", "function getComments() {\n\t\t\t// Gets an array of all user comments from the public shared object (wave) \n\t\t\tvar commentsToRender = wave.getState().get('comments') === null ? [] : wave.getState().get('comments');\n\n\t\t\treturn commentsToRender;\n\t\t}", "function getComments() {\n console.log(\"getComments\");\n fetch('/data')\n .then(response => response.json())\n .then((comments) => {\n var comment_content = '';\n for (var i = 0; i < comments.length; i++) {\n comment_content = comment_content + comment_item_code;\n comment_content = comment_content + comments[i].userName;\n comment_content = comment_content + comment_name_code;\n comment_content = comment_content + comments[i].currentTime;\n comment_content = comment_content + comment_time_code;\n comment_content = comment_content + comments[i].commentText;\n comment_content = comment_content + comment_text_code;\n }\n console.log(comment_content);\n document.getElementById('comment-list').innerHTML = comment_content;\n });\n}", "@computed get getCommentObject() {\n return this.commentObject;\n }", "get comment() {\n\t\treturn this.__comment;\n\t}", "get comment() {\n\t\treturn this.__comment;\n\t}", "async createComment(comment) {\n let res = await fetch(`/comments`, {credentials: 'include', method: 'POST', body: JSON.stringify(comment), headers: {'Content-Type': 'application/json'}})\n let v = await res.json()\n return v\n }", "formatComments(username, content, rating ) {\n let updatedComments = [];\n if(this.props.blog.comments) {\n this.props.blog.comments.forEach(comment => {\n updatedComments.push({author: comment.author, content: comment.content, rating: comment.rating});\n })\n }\n updatedComments.push({author: username, content: content, rating: rating}); \n return updatedComments;\n }", "function getComments(){\n fetch('/data').then(response => response.json()).then((comments) => {\n const historyEl = document.getElementById('history');\n console.log(comments + \" and \" + comments.length);\n for(i=0; i<comments.length; i++){\n addCommentToDom(historyEl, comments[i]);\n }\n });\n }", "function getComments() {\n $http.get(CONFIG.API_BSE_URL+'resources/' + $stateParams.id + '/comments')\n .success(function(response){\n $scope.comments = response.data.comments;\n });\n }", "commentCreated(data, AllPosts) {\n const { commentId, PostId, comment } = data;\n AllPosts[PostId].comments[commentId] = data;\n return AllPosts[PostId];\n }", "_getComments() {\n // Get the list of comments from the state.\n const commentsList = this.state.comments;\n // Return an array of sub-components.\n if (commentsList.length > 0) {\n return commentsList.map((comment) => {\n return <Comment subject = {comment.subject} changed = {comment.changed} key = {comment.cid}/>\n });\n }\n return ( <p> {Drupal.t('No comments.')} </p>\n );\n }", "async getComment(commentID) {\n let res = await fetch(`/comments/${commentID}`, {credentials: 'include', headers: {'Content-Type': 'application/json'}})\n let v = await res.json()\n let u = await fetch(`/users/${v.author}`, {credentials: 'include', headers: {'Content-Type': 'application/json'}})\n let user = await u.json()\n v.author = user.name\n return v\n }", "static toJSONString(comment) {\r\n return `{ \r\n \"id\" : \"${comment.id}\",\r\n \"name\" : \"${comment.name}\",\r\n \"content\" : \"${comment.content}\",\r\n \"parentId\" : \"${comment.parentId}\",\r\n \"childrenIds\" : \"${JSON.stringify(comment.childrenIds)}\", \r\n \"blogId\" : \"${comment.blogId}\",\r\n \"image\" : \"${comment.image}\",\r\n \"lastUpdated\": \"${comment.lastUpdated}\"\r\n }`;\r\n }", "get comments() {\n return this._comments || User.defaults.comments;\n }", "get comment() {\n return this.getStringAttribute('comment');\n }", "getPostComments() {\n fetchComments( this.state.comments.kids )\n .then( postComments => {\n window.console.log( 'COMMENTS: ', postComments );\n\n this.setState(({ comments }) => ({\n comments: {\n ...comments,\n posts: postComments\n }\n }));\n } )\n .catch( ({ message }) => {\n this.setState({\n error: message,\n loading: false\n });\n });\n }", "function getComment(){\n fetch('http://jsonplaceholder.typicode.com/comments')\n .then((res) => res.json())\n .then((data) => {\n let outPoutComment = `<h2 class=\"bb-4\">Comment</h2>`;\n data.forEach((comm) =>{\n outPoutComment += `\n <ul class=\"list-group mb-3\">\n <li class=\"list-group-item\">Id: ${comm.id}</li>\n <li class=\"list-group-item\">Name: ${comm.name}</li>\n <li class=\"list-group-item\">Email: ${comm.email}</li>\n <li class=\"list-group-item\">Body: ${comm.body}</li>\n </ul>\n `;\n });\n document.getElementById('output').innerHTML = outPoutComment;\n })\n .catch((err) => console.log(err));\n}", "comments(parent, args, { db }, info) {\n return db.comments;\n }", "function getState() {\n\treturn {\n\t\tdata: CommentsStore.getComments(),\n\t\ttotal: CommentsStore.getTotal(),\n\t\tpagination: CommentsStore.getPaginationLimit(),\n\t};\n}", "getData() {\n \n return {\n \n } \n }", "getCommentsForPost() {\n const id = this.props.data.id\n let hasComments = Boolean(this.props.comments && this.props.comments[id])\n if(hasComments) {\n console.log(\"hey we have comments!\")\n const _comments = this.props.comments[id]\n return _comments ? _comments.map(l =>\n <Comment\n className = 'comments'\n key={l.id} data={l}\n voteOnComment={this.props.voteOnComment}\n editComment={this.props.editComment}\n deleteCommentById={this.props.deleteCommentById}\n />) : null\n }\n }", "function getComments (){\n JobService.GetAllComments( vm.workData.JobOfferId)\n .then( function(response){\n\n vm.comments = response.data;\n processComments();\n\n }, function(response){\n console.log(\"no sirvió\")\n })\n }", "getAllCommentsOfPost(bid, pid, callback) {\n var request = gapi.client.request({\n method: 'GET',\n path: pathBlogs + '/' + bid + '/posts/' + pid + '/comments'\n })\n\n request.execute((result) => {\n if (result.items) {\n const commentArray = result.items.map(el => new Comment(el.id, el.blog.id, el.post.id, el.author.displayName, el.published, el.updated, el.content))\n console.log(result.items);\n callback(commentArray)\n } else {\n callback()\n }\n })\n }", "function LoadComments() {\n const [comments, setComments] = useState([]);\n\n useEffect(() => {\n fetch(\"https://jsonplaceholder.typicode.com/comments\")\n .then(response => response.json())\n .then(data => setComments(data))\n }, [])\n return (\n <div>\n <h2>Load Comments</h2>\n {\n comments.map(comment => <Comments name = {comment.name} email = {comment.email} body = {comment.body}></Comments>)\n }\n </div>\n )\n}", "function getComments () {\n return new Promise(function (resolve, reject) {\n setTimeout(function(){\n resolve(comments)\n }, 1000)\n })\n}", "function getAllComments(){\n\n db.many(`\n SELECT * FROM comments;\n `)\n .then((comments) => {\n comments.forEach((comment => {\n console.log(`${comment.comment}`)\n }))\n })\n .catch((e) => {\n console.log(e)\n })\n}", "async getComments() {\n let results;\n try {\n results = await Comments.findAll();\n } catch (e) {\n console.log(e);\n }\n\n return results;\n }", "function Comment() {\n const data = {\n userName: 'Nanda Ei Tun',\n text: 'No delivery to Vancouver?',\n profileUrl: 'https://writestylesonline.com/wp-content/uploads/2018/11/MIchele-Circle-11.2018.png',\n replys: [\n {\n userName: 'Si Thu Win',\n profileUrl: 'https://writestylesonline.com/wp-content/uploads/2018/11/MIchele-Circle-11.2018.png',\n text: 'you may get adter 14 days quarantine lol'\n }\n ]\n };\n return (\n <div className=\"App\">\n comment --> {data.userName}\n <DataProvider value={data}>\n <Content />\n </DataProvider>\n </div>\n );\n}", "_getComments() {\n // Get the list of comments from the state.\n const commentsList = this.state.comments;\n // Return an array of sub-components.\n if (commentsList.length > 0) {\n return commentsList.map((comment) => {\n return <Comment\n subject={comment.subject}\n changed={comment.changed}\n key={comment.cid}\n />\n });\n }\n return (\n <p>{Drupal.t('No comments.')}</p>\n );\n }", "getData() {\n \n return {\n \n } \n }", "function getComments(image_id) {\n return db.allAsync('SELECT * FROM comments WHERE image_id = ?', image_id)\n .map(function(c) {\n return objectAssign({}, c, { timestamp: fixTimestamp(c.timestamp)});\n });\n}", "function convertComment (comment) {\n if (!comment) {\n return null;\n }\n\n return {\n \"type\": \"comment\",\n \"issue\": comment.issue,\n \"url\": comment.url\n };\n}", "async function getAllComments() {\n let commentsList = new Array();\n\n // Wait for server response in data servlet\n const response = await fetch('/data');\n await response.json().then(comments => {\n for(var comment of comments) {\n // Add each comment into list\n commentsList.push(comment);\n }\n })\n\n // Return generated list\n return commentsList;\n}", "async getAllComments() {\n const commentCollection = await comments();\n const commentList = await commentCollection.find({}).toArray();\n if (!commentList) throw 'No comments in system!';\n return commentList;\n }", "getComment() {\n if (this.props.paused){\n return\n }\n fetch(`/api/v1/games/${this.props.gameid}/comments`, {\n credentials: \"same-origin\"\n })\n .then(response => { return response.json()})\n .then(body => {\n\n this.setState({ game: body.game, comments: body.comments,\n arrayOfUsers: body.users, currentuser: body.user,\n redteamMembers: body.redteamMembers, blackteamMembers: body.blackteamMembers})\n })\n }", "getData() {\n return {};\n }", "function all_comments(){\r\n\treturn this.getChildren('Comment',{},{sort:{date:'asc'}});\r\n}", "async function fetchComments (post, callback) {\n // Get this post's comments\n const comments = await r.getSubmission(post).expandReplies({ limit: 10, depth: 3 })\n\n // Add the comment bodies to list\n const AllComments = []\n // console.log('comment0: ', comments.comments[0])\n for (const comment of comments.comments) {\n var com = {}\n com.author = comment.author.name\n com.body = comment.body\n com.body_html = comment.body_html\n com.permalink = comment.permalink\n com.score = comment.score\n com.subreddit = comment.subreddit_name_prefixed\n com.timestamp = comment.created_utc // .created also an optino\n com.depth = comment.depth\n com.guildings = comment.guildings\n\n AllComments.push(com)\n }\n return AllComments\n}", "function GetCommentsFromFamily() {\n fetch('https://gentle-ridge-58844.herokuapp.com/family', {\n method: 'get',\n headers: {'content-type': 'application/json'},\n })\n .then(data => data.json())\n .then(res => CreateComment(res.forEach(obj => CreateComment(obj))))\n .catch(console.log);\n}", "function loadComments() {\n fetch('/data').then((response) => response.json()).then((comments) => {\n const commentListElement = document.getElementById('comments-container');\n comments.forEach((comment) => {\n commentListElement.appendChild(createCommentElement(comment.name,\n comment.message, comment.time));\n });\n });\n}", "async function frontComments() {\n const CommentsText = [];\n const OwnId = []; //frontcomments own id\n const ParentId = []; //or storyid\n const Ownkids = []; //front comment kids\n const kidolen = [];\n const [, kidos, Title, Url] = await StoriesOnFrontPage();\n\n const allkids = [].concat(...kidos);\n\n const requests = allkids.map((x) =>\n fetch(`https://hacker-news.firebaseio.com/v0/item/${x}.json?print=pretty`)\n );\n const response = await Promise.all(requests);\n const filter = await Promise.all(response.map((res) => res.json()));\n\n for (const [k, v] of filter.entries()) {\n if (v.deleted !== true) {\n CommentsText.push(v.text);\n OwnId.push(v.id);\n ParentId.push(v.parent);\n Ownkids.push(v.kids);\n } else {\n OwnId.push(v.id);\n ParentId.push(v.parent);\n }\n }\n\n return [OwnId, ParentId, Ownkids, CommentsText, kidolen];\n //OwnId:frontcomments own id\n //ParentId:or storyid\n //Ownkids:kids of front comment\n}", "function comment() {\n fetch(\"https://jsonplaceholder.typicode.com/comments\")\n .then((res) => res.json())\n .then((data) => {\n let comments = \"\";\n data.forEach(function (users) {\n comments += `<ul class=\"comment\">\n <div>${users.email}</div>\n <div>${users.body}</div>\n </ul>`;\n });\n document.getElementById(\"commentz\").innerHTML = comments;\n });\n}", "static fromApi(comment) {\n return new NotesItemModel(\n comment.CandidatePoolCommentSummary.Author.FirstName,\n comment.CandidatePoolCommentSummary.Author.Surname,\n comment.CandidatePoolCommentSummary.Author.PhotoThumbMini,\n comment.CandidatePoolCommentSummary.CommentDate,\n comment.CandidatePoolCommentSummary.Comment,\n comment.CandidatePoolCommentSummary.Reaction,\n comment.EntityActions\n );\n }", "function CommentList() {\n _s();\n\n const {\n threadId\n } = Object(react_router_dom__WEBPACK_IMPORTED_MODULE_4__[\"useParams\"])();\n const {\n currentUser\n } = Object(_authentication_context_AuthContext__WEBPACK_IMPORTED_MODULE_7__[\"useAuth\"])();\n const {\n comments,\n setComments,\n getComments\n } = Object(_context_CommentContext__WEBPACK_IMPORTED_MODULE_6__[\"useComment\"])();\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n setComments([]);\n getComments(threadId);\n }, []);\n return /*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"jsxDEV\"])(\"div\", {\n children: [comments.length > 0 ? comments.map((comment, index) => {\n return /*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"jsxDEV\"])(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"Fragment\"], {\n children: [/*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"jsxDEV\"])(_CommentItem__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n commentItem: comment\n }, comment.doc_id, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 25\n }, this), /*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"jsxDEV\"])(_material_ui_core__WEBPACK_IMPORTED_MODULE_3__[\"Divider\"], {}, index, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 25\n }, this)]\n }, void 0, true);\n }) : /*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"jsxDEV\"])(\"div\", {\n className: \"first-comment\",\n children: /*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"jsxDEV\"])(\"h2\", {\n children: \"Be the first to comment!\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 13\n }, this), currentUser ? /*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"jsxDEV\"])(_CommentInput__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n setComments: setComments,\n fetchComments: getComments\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 17\n }, this) : /*#__PURE__*/Object(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_8__[\"jsxDEV\"])(\"div\", {\n style: {\n marginBottom: \"60vh\"\n }\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 18\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 9\n }, this);\n}", "async function getComments(id, userID){\n //Only give comments if that person is registered or the course is public\n const course = await Course.findOne({\"comments\": id});\n const person = await User.findOne({\"_id\": userID});\n if ((!person.courses.includes(course._id)) && !course.public){\n return [];\n }\n const data = await Post.findOne({\"_id\": id});\n return data.commentContent;\n}", "function parseCommentFromDB(results){ \n if (debug){console.log(\"parseCommentFromDB() -> Called\");}\n if(results == null || results == undefined){\n var comment = null;\n } else {\n var comment = new Comment;\n comment.id = results.comment_pk;\n comment.user_id = results.comment_entry_fk;\n comment.entry_id = results.comment_user_fk;\n comment.date = results.comment_date;\n comment.text = results.comment_text;\n }\n return comment; \n }", "function wrangleComments() {\n const userComments = {};\n qsa('.comments').forEach(function (comment) {\n const links = qsa('.smallcopy a', comment);\n if (links.length) {\n const userId = links[0].href.split('/').pop();\n const commentId = links[links[1].classList.contains('staff') ? 2 : 1].href;\n userComments[userId] = userComments[userId] || [];\n userComments[userId].push(commentId);\n comment.setAttribute('data-userid', userId);\n }\n });\n return reduceUserComments(userComments);\n }", "getData () {\n }", "async getComments() {\n try {\n if (!this.API || !this.issue || this.isLoadingComments)\n return;\n this.isLoadingComments = true;\n const comments = await this.API.getComments({\n accessToken: this.accessToken,\n issueId: this.issue.id,\n query: this.query,\n });\n this.comments = comments;\n if (this.query.page !== comments.page) {\n this.query.page = comments.page;\n }\n if (this.query.perPage !== comments.perPage) {\n this.query.perPage = comments.perPage;\n }\n return comments;\n }\n catch (e) {\n if (e.response &&\n [401, 403].includes(e.response.status) &&\n !this.isLogined) {\n this.isLoginRequired = true;\n }\n else {\n this.$emit('error', e);\n throw e;\n }\n }\n finally {\n this.isLoadingComments = false;\n }\n }", "async function collectComments(){\n comments = []; // reset posts to 0 / initialize to a list\n await firebase.database().ref('comments')\n .once('value', x => {\n x.forEach(data => {\n comments.push(data.val()); //push the data to the list\n })\n });\n}", "static processData(comments) {\n const commentDictionary = {};\n\n for (let i = 0; i < comments.length; i++) {\n const comment = comments[i];\n const commentRange = comment.line_range.split(\",\");\n\n for (let i = 0; i < commentRange.length; i++) {\n if (commentRange[i] in commentDictionary) {\n commentDictionary[commentRange[i]].push(\n comment.id\n );\n } else {\n commentDictionary[commentRange[i]] = [comment.id]\n }\n }\n }\n return commentDictionary;\n }", "static getAllCommentByPublicationId(publication_id) {\n return new Promise((next) => {\n db.query(\"SELECT comment.id as id,comment.content_text as contentComment,comment.file1 as fileComment, comment.register_date as dates, CONCAT(user.name, ' ', user.firstname) as nomComment, user.emailcrypt as emailComment, user.profil as profilComment, role_user.name as promotion_nameComment FROM comment LEFT JOIN user ON comment.user_id = user.id LEFT JOIN role_user ON user.range_id = role_user.id WHERE comment.publication_id = ? ORDER BY id DESC\", [parseInt(publication_id, 10)])\n .then((results)=>{\n for(let i in results){\n results[i].contentComment = ent.decode(results[i].contentComment);\n continue;\n }\n next(results);\n }).catch((error) => next(error));\n })\n }", "getAllcomments(slug) {\n return HelperClass.getRequest(`/articles/comments/${slug}`);\n }", "function approved_comments(){\r\n\treturn this.getChildren('Comment',{'approved':'true'},{sort:{date:'asc'}});\r\n}", "@computed get getMovieComments() {\n return this.movieComments;\n }", "onSubscribeComments(json) {\n const commentArray = JSON.parse(json.comments);\n const immutableCommentList = Immutable.List(JSON.parse(json.comments));\n\n this.setState({\n serverResponse: {\n event: 'subscribe comments',\n status: 'ok',\n timestamp: new Date()\n },\n databaseOffline: false,\n comments: this.sort(immutableCommentList, this.state.sortSettings.comparator)\n });\n }", "function getComments() {\n let comments;\n if(localStorage.getItem('comments') === null) {\n comments = [];\n } else {\n comments = JSON.parse(localStorage.getItem('comments'));\n }\n\n comments.forEach(function(comment) {\n // Create li element\n const li = document.createElement('li');\n // Add class\n li.className = 'collection-item';\n // Create text node and append tp li\n li.appendChild(document.createTextNode(comment));\n // Create new link element\n const link = document.createElement('a');\n // Add class\n link.className = 'delete-item secondary-content';\n // Add icon html\n link.innerHTML = '<i class=\"fa fa-\"></i>';\n // Append the link to li\n li.appendChild(link);\n\n // Append li to ul\n commentList.appendChild(li);\n\n });\n \n console.log(comments);\n}", "_fetchData() {\n jQuery.ajax({\n url: this.props.url,\n dataType: 'json',\n success: (comments) => this.setState({\n comments\n }),\n error: (xhr, status, err) => {\n console.error(this.props.url, status, err.toString());\n }\n });\n }", "comments(parent, args, ctx, info) {\n // 'Post' Object data -> is present in 'parent' argument in comments() method\n return COMMENTS_DATA.filter(comment => {\n return comment.post === parent.id\n })\n }", "function formatecomment(comments){\n if(comments === null){\n let commentstomail = 'No se han dejado comentarios para esta reserva';\n return commentstomail\n } else {\n let commentstomail = comments\n return commentstomail\n }\n }", "function getCommentData(postId) {\n const $ASYNC = false;\n const $URL = `${$HEROKU_URL}/api/v1/comments/parentComment/post/${postId}`;\n const $VERB = 'GET';\n const $DATATYPE = 'json';\n let commentsResultArray = {};\n\n $.ajax({\n async: $ASYNC,\n type: $VERB,\n url: $URL,\n dataType: $DATATYPE,\n success: function (comments) {\n commentsResultArray = comments;\n }\n });\n return commentsResultArray;\n}", "handleComments(event) {\n this.feedbackComments = event.detail.value;\n }", "getAll(slug) {\n return this._$http({\n url: `${this._AppConstants.api}/foods/${slug}/comments`,\n method: 'GET',\n }).then((res) => res.data.comments);\n\n }", "function getComments() {\n\t\t$.ajax({ \n\t\t\turl: '/comments', type: 'GET', dataType: 'json',\n\t\t\tsuccess: (data) => {\n\t\t\t\tcomments = ''\n\t\t\t\tfor (const c of data){\n\t\t\t\t\tcomments = \n\t\t\t\t\t\t`<br><div id=comment>`+\n\t\t\t\t\t\t\t`<div id=name>`+\n\t\t\t\t\t\t\t\tc.name + ' — ' + c.datetime + \n\t\t\t\t\t\t\t`</div>` + \n\t\t\t\t\t\t\t`<div id=message>`+\n\t\t\t\t\t\t\t\tc.comment + \n\t\t\t\t\t\t\t`</div>` + \n\t\t\t\t\t\t`<br><hr></div>` +\n\t\t\t\t\t\tcomments\n\t\t\t\t}\n\t\t\t\t$('#comments').html(comments)\n\t\t\t\t$('#commentCount').html(data.length + (data.length==1 ? ' comment' : ' comments'))\n\t\t}})\t\n\t}", "componentDidMount() {\n this.getComments()\n }", "_fetchData() {\n jQuery.ajax({\n url: this.props.url,\n dataType: 'json',\n success: (comments) => this.setState({comments}),\n error: (xhr, status, err) => {\n console.error(this.props.url, status, err.toString());\n }\n });\n }", "function previewComment(){\n f = document.getElementById('add-comment-form');\n \n title= f['title'].value;\n description = f['description'].value;\n type=$('#add-comment-form input:checked')[0].value;\n if(type==\"Other\")\n type=f['other'].value;\n f.reset();\n tmpComment = new Comment(title, description, type, 0);\n console.log(tmpComment);\n return tmpComment;\n}", "getAllComments(knex) {\n return knex.select(\"*\").from(\"comments\");\n }", "renderComment(comment){\n const {admin_email, content, cid} = comment;\n return (\n <div key={'comment-'+cid}>\n <Typography type=\"body2\" gutterBottom>\n {this.getTechnicalName(admin_email)}\n <br/>\n {admin_email} \n </Typography>\n <Typography type=\"body1\" gutterBottom>\n <span dangerouslySetInnerHTML={{__html: content}}></span>\n </Typography>\n <Divider className={this.props.classes.divider}/>\n </div>\n )\n }", "AddCommentClickHandler(data) {\n if (this.state.comment === \"\") return;\n\n let dataList = [];\n for (let item of this.state.pageData) {\n let post = item;\n if (item.id === data.id) {\n post.user_comments = this.state.comment;\n post.user_commented = true;\n }\n dataList.push(post);\n }\n this.setState({ pageData: dataList });\n this.setState({ comment: \"\" });\n }", "onGetAllComments(json) {\n const commentArray = JSON.parse(json.comments);\n const immutableCommentList = Immutable.List(commentArray);\n\n this.setState({\n serverResponse: {\n event: 'comment getAll',\n status: 'ok',\n timestamp: new Date()\n },\n databaseOffline: false,\n comments: this.sort(immutableCommentList, this.state.sortSettings.comparator)\n });\n }", "function getChildCommentData(commentId) {\n const $ASYNC = false;\n const $URL = `${$HEROKU_URL}/api/v1/comments/childComments/comment/${commentId}`;\n const $VERB = 'GET';\n const $DATATYPE = 'json';\n let commentsResultArray = {};\n\n $.ajax({\n async: $ASYNC,\n type: $VERB,\n url: $URL,\n dataType: $DATATYPE,\n success: function (comments) {\n commentsResultArray = comments;\n }\n });\n return commentsResultArray;\n}", "load(data) {\n const { authorText, authorThumbnail, authorEndpoint, contentText, publishedTimeText, commentId, voteCount, authorIsChannelOwner, pinnedCommentBadge, replyCount, } = data.comment.commentRenderer;\n // Basic information\n this.id = commentId;\n this.content = contentText.runs.map((r) => r.text).join(\"\");\n this.publishDate = publishedTimeText.runs.shift().text;\n this.likeCount = +((voteCount === null || voteCount === void 0 ? void 0 : voteCount.simpleText) || 0);\n this.isAuthorChannelOwner = authorIsChannelOwner;\n this.isPinnedComment = !!pinnedCommentBadge;\n this.replyCount = replyCount;\n // Reply Continuation\n this.replies = [];\n this.replyContinuation = data.replies\n ? common_1.getContinuationFromItems(data.replies.commentRepliesRenderer.contents)\n : undefined;\n // Author\n const { browseId } = authorEndpoint.browseEndpoint;\n this.author = new _1.ChannelCompact({\n id: browseId,\n name: authorText.simpleText,\n thumbnails: new _1.Thumbnails().load(authorThumbnail.thumbnails),\n client: this.client,\n });\n return this;\n }", "static fromApi(comments) {\n let response = new NotesModel(\n comments.CandidatePoolCommentSummaryItemResults.map(note => { return NotesItemModel.fromApi(note);}),\n comments.EntityActions\n );\n return response;\n }", "function getStringForComments (comments){\n let tempstr = '';\n comments.forEach((a, index) => { \n tempstr += `* ${a.message} \\n written by:${a.nickName}\n ${getStringForCommentOnComment(a.commentOnComment)}\n`; \n });\n return tempstr;\n}", "async function fetchResultsJSON() {\n itemId = itemId.replace(/\\s/g, '%20');\n const api = `https://us-central1-involvement-api.cloudfunctions.net/capstoneApi/apps/Q6FJ5Iv0xZsu9v3INtJx/comments?item_id=${itemId}`;\n const response = await fetch(api);\n const results = await response.json();\n return results;\n }", "function api_get_comments(req, res) {\n Message.find({type : 'comment', parent : req.param('msg_id')}).sort({time:-1}).exec(function(err, messages) {\n\tif(!err && messages) {\n\t\tvar m = new Array();\n\n\t\tfor (var i = 0; i < messages.length; i++) {\n\t\t\tvar r = messages[i].toObject();\n\t\t\tr.id = messages[i]._id.toHexString();\n\t\t\tm.push(r);\n\t\t}\n\t\tres.json(200, m);\n\t} else if(err){\n res.json(500, {message : \"Error\"});\n }else{\n\t\tres.json(404, {message : \"Couldn't get comments for message \" + req.param('msg_id')});\n\t}\n });\n}", "function getcommentdata(){\n if(!getAmplifyValue(\"userID\"))\n {\n setAmplifyValue(\"referrer\",\"topic-detail.html\");\n window.location =\"login.html\";\n }\n var comment = {\ntopicID : \"\",\nmessage: \"\",\nchurchID: getAmplifyValue(\"churchID\"),\nUserID: getAmplifyValue(\"userID\"),\nlinks: []\n};\n //turns the form data into an object\n //sampling username here*remember to collect after acccounts \n \n comment.message=$(\"#commenttext\").val();\n comment.topicID=getAmplifyValue(\"choirpostid\");\n \n \n var numberoflinks=$('input[name=\"linktitle\"]').length;\n \n \nfor(i=0; i<numberoflinks; i++){\n comment.links.push({\n linkTitle: $('input[name=\"linktitle\"]')[i].value,\n url: $('input[name=\"link\"]')[i].value\n });\n\n}\n\n \npostcomment(comment);\n \n \n}", "function retrieveLikedComments(){\n let liked_comments = [];\n for(let i =0; i<liked_comments_id.length; i++){\n let j=0;\n while (j < comments.length){\n if(liked_comments_id[i] == comments[j].id){\n liked_comments.push(comments[j]);\n break;\n } else {\n j++;\n }\n }\n }\n displayLikedComments(liked_comments);\n}", "async function prefetchData () {\n let data = await fetch('https://jsonplaceholder.typicode.com/posts')\n posts = await data.json()\n data = await fetch('https://jsonplaceholder.typicode.com/comments')\n let comments = await data.json()\n\n comments.forEach(comment => {\n // convert post ID to string because the GET request for the comments API will come in as a string\n let postId = comment.postId.toString()\n if (commentMap.has(postId)) {\n let commentArr = commentMap.get(postId)\n commentArr.push(comment)\n commentMap.set(postId, commentArr)\n } else {\n commentMap.set(postId, [comment])\n }\n })\n}", "async function getComments(){\n\n const commentsRes = await axios.get(domain+\"/comments/\"+props.post._id);\n if (props.post.likes.includes( await user.userId)){\n setLikeBtnState(\"btn-like\");\n };\n //console.log(commentsRes.data)\n setComments(commentsRes.data)\n }", "async getCommentsForBoard(boardID) {\n let res = await fetch(`/boards/${boardID}/comments`, {credentials: 'include', headers: {'Content-Type': 'application/json'}})\n let v = await res.json()\n for(let c of v) {\n let u = await fetch(`/users/${c.author}`, {credentials: 'include', headers: {'Content-Type': 'application/json'}})\n let user = await u.json()\n c.author = user.name\n }\n return v\n }", "function mapStateToProps({ comments }, { id }) {\n return {\n body: comments[id].body,\n author: comments[id].author,\n parentId: comments[id].parentId\n }\n}", "parseComments(redditResponse) {\n const posts = redditResponse.data.children;\n const allComments = [];\n // Parse Posts\n posts.forEach((post) => {\n const data = post.data;\n // TODO: We should recurse and collect replies to this comment.\n const newComment = new _shared_classes__WEBPACK_IMPORTED_MODULE_3__[\"Comment\"](data.id, data.body_html);\n allComments.push(newComment);\n });\n return allComments;\n }", "function CreateDefaultOtherCommentsArray()\r\n{\r\n Alloy.Globals.ShedModeOtherComments =\r\n {\r\n \"TOPIC\": \"\" , // Empty\r\n \"OTHER_COMMENTS\": \"\" // Empty\r\n } ;\r\n}", "getReviewUpdateData () {\n\t\tconst data = {\n\t\t\ttitle: RandomString.generate(100),\n\t\t\ttext: RandomString.generate(100)\n\t\t};\n\t\treturn data;\n\t}", "componentDidMount() {\n axios\n .get(\"https://express-train.herokuapp.com/api/comments\")\n .then(response => this.setState({ comments: response.data }));\n }", "getData() { return this.doc.data; }" ]
[ "0.77555406", "0.7206142", "0.6863943", "0.67627776", "0.6723962", "0.66820943", "0.6641964", "0.6530375", "0.65296185", "0.65054595", "0.64678425", "0.64259714", "0.63972294", "0.6388312", "0.6386385", "0.6211964", "0.61944175", "0.61944175", "0.61881816", "0.6176987", "0.61564165", "0.61460274", "0.60979974", "0.60827035", "0.608022", "0.6072633", "0.6057709", "0.6049789", "0.604014", "0.602898", "0.60258996", "0.60070133", "0.59949553", "0.59899116", "0.5954693", "0.59385717", "0.5937608", "0.5931565", "0.59238595", "0.5902819", "0.58901143", "0.58862126", "0.5865923", "0.5865502", "0.5826315", "0.5821714", "0.58133554", "0.5810484", "0.58097005", "0.5792862", "0.5785459", "0.5773594", "0.57692397", "0.5767182", "0.5762566", "0.57602924", "0.57532597", "0.57451725", "0.5734425", "0.5730655", "0.5727939", "0.57257897", "0.5702218", "0.5699849", "0.5690719", "0.56818265", "0.5681774", "0.56673056", "0.5651243", "0.5651078", "0.5636805", "0.56055534", "0.5604303", "0.5596426", "0.55894995", "0.5584331", "0.557875", "0.5575934", "0.55673414", "0.555558", "0.55504453", "0.55418646", "0.5541783", "0.5539289", "0.5535288", "0.55346364", "0.5504733", "0.5500045", "0.5495166", "0.5491641", "0.5485055", "0.5473759", "0.5472069", "0.5464657", "0.5460112", "0.5459472", "0.54590666", "0.5453908", "0.54507893", "0.54498297", "0.5446482" ]
0.0
-1
take avg speed in min
componentWillReceiveProps(nextProps) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getAverageSpeed()\r\n {\r\n let endTime = Date.now()\r\n // Get elapsed time in seconds.\r\n let elapsedTime = (endTime - this._startTime) / 1000;\r\n\r\n // Return average speed in m/s.\r\n return this._totalDistance / elapsedTime;\r\n }", "averageSpeed(){\n var resultSpeed = this._distanceRan/this._timeTaken\n return resultSpeed.toFixed(2);\n }", "get averageSpeed()\r\n {\r\n // Return average speed in m/s.\r\n let speedValue = this._getAverageSpeed().toFixed(2);\r\n return speedValue.toString() + \" m/s\"\r\n }", "function avgWindSp () {\n\tvar array = map(list, function (c) {\n\t\treturn c.wind.speed;\n\t});\n\tvar sum = reduce(array, function (a, b) {\n\t\treturn a + b;\n\t});\n\treturn Math.round(100 * (sum / list.length)) / 100;\n}", "getAvgSpeed (trip) {\n // Gets average speed in km/h, duration is in minutes\n const avgSpeed = ((trip.distance / trip.duration) * 60)\n return avgSpeed\n }", "function avgLoTemp () {\n\tvar temps = map(list, function (c) {\n\t\treturn c.main.temp_min;\n\t});\n\tvar sum = reduce(temps, function (a, b) {\n\t\treturn a + b;\n\t});\n\treturn (sum / list.length);\n}", "keskiarvo() {\n let sum = this.state.timer20.reduce((previous, current) => current += previous);\n let avg = sum / this.state.timer20.length;\n return avg\n }", "getAllAvgSpeed (arr) {\n let totalSpeed = 0\n let allAvgSpeed = 0\n for (const trip of arr) {\n totalSpeed += this.getAvgSpeed(trip)\n }\n allAvgSpeed = totalSpeed / arr.length\n return allAvgSpeed\n }", "function calcSpeed(speeds) {\n var speed = new Array(speeds.length);\n for(i = 0; i < speeds.length; i++) {\n speed[i] = (parseFloat(speeds[i].amount));\n }\n var max = Math.max(...speed);\n var sum = speed.reduce((previous, current) => current += previous);\n var avg = sum / speed.length;\n \n document.getElementById('max-speed-value').innerHTML = Math.round(max);\n document.getElementById('avg-speed-value').innerHTML = Math.round(avg);\n}", "function avgTemp () {\n\tvar temps = map(list, function (c) {\n\t\treturn c.main.temp;\n\t});\n\tvar sum = reduce(temps, function (a, b) {\n\t\treturn a + b;\n\t});\n\treturn (sum / list.length);\n}", "average() {\n return this.buffer.reduce((accum, current) => accum + current) / this.size;\n }", "get horizontalSpeed () { \n if (this.pointers.length > 0) \n return this.pointers.reduce((sum, pointer) => {return sum+pointer.horizontalSpeed}, 0) / this.pointers.length;\n else\n return 0;\n }", "get speed () {\n if (this.pointers.length > 0)\n return (this.pointers.reduce((sum, pointer) => { return sum+pointer.speed}, 0) / this.pointers.length);\n else\n return 0;\n }", "function avgHiTemp () {\n\tvar temps = map(list, function (c) {\n\t\treturn c.main.temp_max;\n\t});\n\tvar sum = reduce(temps, function (a, b) {\n\t\treturn a + b;\n\t});\n\treturn (sum / list.length);\n}", "avg() {}", "function benchmark_mean(interval){\n return (((+interval[0]) + (+interval[1])) / 2).toFixed();\n }", "calcSpeed(){\n\treturn this.distance/(this.time/60);//miles per hour\n }", "getAverageTime(startStation, endStation) {\n let stationTimes = this.travelTime.get(`${startStation} ${endStation}`)\n\n return stationTimes[0] / stationTimes[1]\n }", "getMinSpeed(){\n\t\treturn 0;\n\t}", "function avgHumidity () {\n\tvar array = map(list, function (c) {\n\t\treturn c.main.humidity;\n\t});\n\tvar sum = reduce(array, function (a, b) {\n\t\treturn a + b;\n\t});\n\treturn Math.round(sum / list.length);\n}", "function get_MET(speed) {\n if ( 1 <= speed && speed < 3) {\n return 2;\n } else if ( 3 <= speed && speed < 4.1) {\n return 2.5;\n } else if ( 4.1 <= speed && speed < 5.1) {\n return 3.2;\n } else if ( 5.2 <= speed && speed < 6.4) {\n return 4.4;\n } else if ( 6.5 <= speed && speed < 7.2) {\n return 5.2;\n } else if ( 7.3 <= speed && speed < 8) {\n return 7;\n } else if ( 8.1 <= speed && speed < 9.6) {\n return 9;\n } else if ( 9.7 <= speed && speed < 10.7) {\n return 10.5;\n } else if ( 10.8 <= speed && speed < 11.2){\n return 11;\n } else if ( 11.3 <= speed && speed < 12.8){\n return 11.6;\n } else if ( 12.9 <= speed && speed < 13.8){\n return 12.3; \n } else if ( 13.9 <= speed && speed < 14.4){\n return 12.8; \n } else if ( 14.5 <= speed && speed < 16){\n return 14.5; \n } else if ( 16.1 <= speed && speed < 17.7){\n return 16; \n } else if ( 17.8 <= speed && speed < 19.3){\n return 19;\n } else if ( 19.4 <= speed && speed < 20.9){\n return 19.8; \n } else if ( 21 <= speed && speed < 22.5){\n return 23; \n } else {\n return 1;\n }\n}", "function getSpeed()\r\n {\r\n return speed;\r\n }", "function averageTime(total, numberOfElements) {\t\t\n\t\t\tvar avg = ( (total / 1000) / numberOfElements);\n\t\t\treturn avg;\n\t\t}", "function getCpuCurrentSpeedSync() {\n\n let cpus = os.cpus();\n let minFreq = 999999999;\n let maxFreq = 0;\n let avgFreq = 0;\n\n if (cpus.length) {\n for (let i in cpus) {\n if (cpus.hasOwnProperty(i)) {\n avgFreq = avgFreq + cpus[i].speed;\n if (cpus[i].speed > maxFreq) maxFreq = cpus[i].speed;\n if (cpus[i].speed < minFreq) minFreq = cpus[i].speed;\n }\n }\n avgFreq = avgFreq / cpus.length;\n return {\n min: parseFloat((minFreq / 1000).toFixed(2)),\n max: parseFloat((maxFreq / 1000).toFixed(2)),\n avg: parseFloat((avgFreq / 1000).toFixed(2))\n }\n } else {\n return {\n min: 0,\n max: 0,\n avg: 0\n }\n }\n}", "function cpuAverage() {\n var totalIdle = 0, totalTick = 0;\n var cpus = os.cpus();\n for(var i = 0, len = cpus.length; i < len; i++) {\n var cpu = cpus[i];\n for(type in cpu.times) {\n totalTick += cpu.times[type];\n } \n totalIdle += cpu.times.idle;\n }\n return {idle: totalIdle / cpus.length, total: totalTick / cpus.length};\n}", "static toMsecond(speed) {\n return speed / 3.6;\n }", "avg() {\n\t\tlet argArr = this.args;\n\t\tfunction avgSet(s,c,f) {\n\t\t\taverage: s;\n\t\t\tceiling: c;\n\t\t\tfloor: f;\n\t\t}\n\t\tlet evaluate = function() {\n\t\t\tlet sum = 0;\n\t\t\tfor(let c=0;c<argArr.length;c++) {\n\t\t\t\tsum += argArr[c];\n\t\t\t}\n\t\t\tsum /= argArr.length\n\t\t\tlet ceil = Math.ceil(sum)\n\t\t\tlet floor = Math.floor(sum)\n\n\t\t\tlet avg = avgSet(sum,ceil,floor); //{average:sum,ceiling:ceil,floor:floor}\n\t\t\treturn avg;\n\t\t};\n\t\t// console.log(evaluate())\n\t\tthis.record(`Evaluated avg: ${evaluate().average} | fxnCount: ${this.fxnCount} | avgCount: ${this.avgCount}`,evaluate());\n\t}", "get loopAverageDuration() {\n\n let total = 0;\n for(let i in this._loopDurations) {\n total += this._loopDurations[i];\n }\n\n return Math.round((total / this._loopDurations.length) * 100) / 100;\n }", "function cpuAverage() {\n var totalIdle = 0, totalTick = 0;\n var cpus = os.cpus();\n for (var i = 0, len = cpus.length; i < len; i++) {\n var cpu = cpus[i];\n for(type in cpu.times) {\n totalTick += cpu.times[type];\n }\n totalIdle += cpu.times.idle;\n }\n return {idle: totalIdle / cpus.length, total: totalTick / cpus.length};\n}", "function cpuAverage() {\n const cpus = os.cpus();\n //get ms in each mode, but this number is since reboot\n //so get it now and get it in 100ms and compare\n let idleMs = 0;\n let totalMs = 0;\n\n //lope through each core\n cpus.forEach((core) => {\n for (type in core.times) {\n totalMs += core.times[type];\n }\n idleMs += core.times.idle;\n });\n\n return {\n idle: idleMs / cpus.length,\n total: totalMs / cpus.length,\n };\n}", "function cpuAverage() {\n\n //Initialise sum of idle and time of cores and fetch CPU info\n var totalIdle = 0, totalTick = 0;\n var cpus = os.cpus();\n\n //Loop through CPU cores\n for(var i = 0, len = cpus.length; i < len; i++) {\n\n //Select CPU core\n var cpu = cpus[i];\n\n //Total up the time in the cores tick\n for(type in cpu.times) {\n totalTick += cpu.times[type];\n }\n\n //Total up the idle time of the core\n totalIdle += cpu.times.idle;\n }\n\n //Return the average Idle and Tick times\n return {idle: totalIdle / cpus.length, total: totalTick / cpus.length};\n}", "function getAccelerationRate(lastPt, mousePt) {\n let xpow = Math.pow(lastPt.x - mousePt.x, 2);\n let ypow = Math.pow(lastPt.y - mousePt.y, 2);\n let currentLength = Math.sqrt(xpow + ypow);\n let r = currentLength / (100 + currentLength) + 1.0;\n return r;\n }", "function calcSpeed(distance, time){\n return distance/time;\n}", "function averageAltitude() {\n let sum = 0;\n for (let i = 0; i < arrayAltitude.length; i++) {\n sum = sum + arrayAltitude[i];\n }\n let avgAltitude = (sum / arrayAltitude.length).toFixed(2);\n document.querySelector(\".avgAlt\").innerText = `${avgAltitude} km`;\n}", "getCpuAvg() {\n const cpus = os.cpus();\n \n let totalIdle = 0;\n let totalTicks = 0;\n\n /**\n * For each CPUs we will loop though \n * and calculate the ticks and add them \n * together as totalTicks\n * \n * and add up all total idel times as totalIdel\n */\n\n for (let i = 0; i < cpus.length; i++) {\n let currentCPU = cpus[i];\n \n for (let t in currentCPU.times) {\n totalTicks += currentCPU.times[t];\n }\n\n totalIdle += currentCPU.times.idle;\n }\n\n return { \n idle: totalIdle / cpus.length, \n total: totalTicks / cpus.length \n }\n }", "function cpuAverage() {\n\n\t//Initialise sum of idle and time of cores and fetch CPU info\n\tvar totalIdle = 0, totalTick = 0;\n\tvar cpus = os.cpus();\n\n\t//Loop through CPU cores\n\tfor (var i = 0, len = cpus.length; i < len; i++) {\n\n\t\t//Select CPU core\n\t\tvar cpu = cpus[i];\n\n\t\t//Total up the time in the cores tick\n\t\tfor (type in cpu.times) {\n\t\t\ttotalTick += cpu.times[type];\n\t\t}\n\n\t\t//Total up the idle time of the core\n\t\ttotalIdle += cpu.times.idle;\n\t}\n\n\t//Return the average Idle and Tick times\n\treturn { idle: totalIdle / cpus.length, total: totalTick / cpus.length };\n}", "getSpeed() { return this.speed; }", "function speed() {\n\tif (count < 5) {\n\t\treturn 700;\n\t} else if (count < 13) {\n\t\treturn 650;\n\t} else {\n\t\treturn 600;\n\t}\n}", "getAverageRating() {\n let ratingsSum = this.ratings.reduce((accumulator, rating) => accumulator + rating);\n return ratingsSum / this.ratings.length;\n }", "avg(){\n let t=data[0];\n var avg;\n var sum;\n for(x=0;x<t.length; x++){\n sum=sum+t[x];\n }//for\n avg=sum/t.length;\n return avg;\n }", "mean() {\n return Utils.mean(this.series)\n }", "function msPerTick(speed) {\n return 1000.0/speed;\n }", "avg(arr) {\r\n let sum = 0;\r\n for(let i = 0; i < arr.length; i++){\r\n sum += parseFloat(arr[i]);\r\n }\r\n return sum / arr.length;\r\n }", "function average(points){\n var total=0\n for(var i=0; i<points.length-1; i++){\n distance = calcDistance(points[i].lat, points[i+1].lat, points[i].lng, points[i+1].lng)\n total+=distance;\n }\n return total/points.length;\n}", "getspeed() {\n\t\tif(this.vars.alive){\n\t\t\treturn distance(this.vars.x,this.vars.y,this.vars.px,this.vars.py);\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t}", "getMean() {\n // console.log(this.temperatures, this.sum, this.entries)\n return this.sum / this.entries;\n }", "static get minAttackTimeRange()\n {\n return utilities.sec2ms( MultichannelCompressorNode.minAttack );\n }", "calcAvgTotalHrs() {\n let sum = this.data.map(currentData => {\n return currentData.hoursSlept\n }).reduce((acc, hoursSlept) => acc + hoursSlept);\n\n return sum / this.data.length;\n }", "getAverageRating() {\n let ratingsSum = this.ratings.reduce((currentSum, rating) => currentSum + rating, 0);\n const lengthOfArray = this._ratings.length;\n return ratingsSum/lengthOfArray;\n }", "function getAverage() {\n $.get(`/api/songs/rated/${getPlaylistID()}`, (rated) => {\n rated.forEach((element) => {\n let a = element.pilot_rating;\n let b = element.copilot_rating;\n let c = (parseFloat(a) + parseFloat(b)) / 2;\n\n let average = {\n id: element.id,\n avg_rating: c,\n };\n\n $.ajax({\n method: \"PUT\",\n url: \"/api/songs\",\n data: average,\n });\n });\n }).then(calcPassing());\n }", "startCalcSpeed () {\n // calc rest time of backup\n this.lastTenData.length = 0\n this.startTime = new Date().getTime()\n let restTime = -1\n let lastRestTime = -1\n let beforeLastRestTime = -1\n clearInterval(this.timer)\n this.timer = setInterval(() => {\n const data = this.summary()\n this.lastTenData.unshift(data)\n\n // keep 10 data\n if (this.lastTenData.length > 10) this.lastTenData.length = 10\n\n const length = this.lastTenData.length\n // start calc restTime\n if (length > 1) {\n const deltaSize = this.lastTenData[0].transferSize - this.lastTenData[length - 1].transferSize\n const restTimeBySize = (data.size - data.completeSize) / deltaSize * (length - 1)\n\n const deltaCount = this.lastTenData[0].finishCount - this.lastTenData[length - 1].finishCount\n const restTimeByCount = (data.count - data.finishCount) / deltaCount * (length - 1)\n\n const usedTime = (new Date().getTime() - this.startTime) / 1000\n const restTimeByAllSize = (data.size - data.completeSize) * usedTime / data.transferSize\n const restTimeByAllCount = data.count * usedTime / data.finishCount - usedTime\n\n /* combine of restime by different method */\n restTime = Math.max(Math.min(restTimeBySize, restTimeByCount), Math.min(restTimeByAllSize, restTimeByAllCount))\n\n /* only use restTimeBySize */\n restTime = restTimeBySize\n // max restTime: 30 days\n restTime = Math.min(restTime, 2592000)\n /* average of the last 3 restTime */\n if (lastRestTime < 0 || beforeLastRestTime < 0) {\n lastRestTime = restTime\n beforeLastRestTime = restTime\n }\n restTime = (beforeLastRestTime + lastRestTime + restTime) / 3\n\n beforeLastRestTime = lastRestTime\n lastRestTime = restTime\n }\n\n const ltd = this.lastTenData\n const speed = ltd.length > 1 ? (ltd[0].transferSize - ltd[ltd.length - 1].transferSize) / ltd.length - 1 : 0\n\n const bProgress = data.count ? `${data.finishCount || 0}/${data.count}` : '--/--'\n\n const args = { speed, restTime: getLocaleRestTime(restTime), bProgress, ...data }\n webContents.getAllWebContents().forEach(contents => contents.send('BACKUP_MSG', args))\n }, 1000)\n }", "getRankScore () {\n let avg = 0\n for (let i=0; i<this.rankScore.length; i++) {\n avg += this.rankScore[i].value * (1 - ((Date.now() - this.scores[i].time))/Date.now())\n }\n return avg\n }", "function calculateAvgXpPerMin(playerTimelineData, gameLength) {\n const dataLength = Object.keys(playerTimelineData).length;\n\n return playerTimelineData[dataLength - 1].xp / (gameLength / 60);\n}", "function calcAvgActionTime() {\n\t\tif (!maxTime.actions) {\n\t\t\treturn 1;\n\t\t}\n\t\tavgActionTime = maxTime.time / maxTime.actions;\n\t}", "function avg(arr) {\n return arr.reduce((a,b) => +a + +b) / arr.length;\n }", "function get4Rmean() {\n var total = 0;\n for (var i = 0; i < R_buffer.length; i++) {\n total += R_buffer[i];\n }\n var avg = total / R_buffer.length;\n return avg;\n }", "averageMin(minutes) {\r\n if (minutes <= 60) {\r\n if (60 % minutes != 0) {\r\n throw \"Average bin must be factor of 60\"\r\n } else if (!this.data) {\r\n throw \"No data, query first\"\r\n } else if (!this.data[0].createdAt) {\r\n throw \"Need to request created at time\"\r\n }\r\n // Trim data to closest multiple of 'minutes'\r\n var trimNumber = (minutes - ((new Date(this.data[0].createdAt)).getUTCMinutes() % minutes));\r\n this.data.splice(0, trimNumber);\r\n } else {\r\n //hourly or daily?\r\n }\r\n // For every set of 'minutes' ,average all the collums of values\r\n var formattedData = [];\r\n var divisor = 0;\r\n // Start at the exact multiple of the minute from the first instance\r\n var startDate = new Date(this.data[0].dataValues.createdAt);\r\n startDate.setUTCSeconds(0, 0);\r\n\r\n for (var line in this.data) {\r\n if (line == 0) {\r\n // And push that first line into the array\r\n formattedData.push(this.data[line]);\r\n } else if (line == this.data.length - 1) {\r\n // Last line average remaing data\r\n average(line);\r\n } else if ((new Date(this.data[line].dataValues.createdAt)).getTime() - startDate < 60000 * minutes) {\r\n // If the diffrence between the start and current is less than average time, sum, and increase divisor\r\n for (key in this.data[line].dataValues) {\r\n formattedData[formattedData.length - 1][key] += this.data[line].dataValues[key];\r\n }\r\n // Increase the divisor\r\n divisor++;\r\n } else {\r\n average(line)\r\n // The start time + time has been passed, push a new line onto the formateed data stack\r\n formattedData.push(this.data[line]);\r\n // Finally increse the start date to the new start date, incrementing it by minutes\r\n startDate.setTime(startDate.getTime() + 60000 * minutes);\r\n }\r\n function average(line) {\r\n // Else divide by divisor, and place new item into array\r\n for (key in formattedData[formattedData.length - 1].dataValues) {\r\n // Can not divide by 0\r\n formattedData[formattedData.length - 1].dataValues[key] /= divisor + 1;\r\n }\r\n // Set the createdAt field to start time\r\n formattedData[formattedData.length - 1].dataValues.createdAt = new Date(startDate);\r\n // Reset divisor\r\n divisor = 0;\r\n }\r\n }\r\n\r\n // var maxDate = new Date(this.data[0].dataValues.createdAt);\r\n // maxDate.setUTCSeconds(0, 0);\r\n // var numSummed = 0;\r\n // for (var line in this.data) {\r\n // if ((new Date(this.data[line].dataValues.createdAt)).getTime() >= maxDate.getTime()) {\r\n // // // Set the maxDate as the timestamp of the old data\r\n // // console.log(formattedData[formattedData.length - 1].createdAt) = maxDate;\r\n // // The max date has been passed, push a new line onto the formateed data stack\r\n // formattedData.push(this.data[line]);\r\n // // Increase the max date by the number of minutes to average\r\n // maxDate.setTime(maxDate.getTime() + 60000 * minutes);\r\n // // Reset the number of values summed (should be in minutes)\r\n // numSummed = 1;\r\n // } else {\r\n // for (key in this.data[line].dataValues) {\r\n // if (key != \"createdAt\") {\r\n // formattedData[formattedData.length - 1][key] += this.data[line].dataValues[key];\r\n // }\r\n // }\r\n // numSummed++;\r\n // }\r\n // }\r\n this.data = formattedData;\r\n return this\r\n }", "average() {\n\n }", "average() {\n if (this.length)\n return this.reduce((accumulator, value) => accumulator + value, 0) / this.length;\n else\n return 0;\n }", "getAverageRating() {\n return this._ratings.reduce((a, b)=> a + b )/this._ratings.length\n }", "function vec_avg(vec){\n\tlet s = 0;\n\tfor(let i = 0; i < vec.length; i++)\n\t\ts += vec[i];\n\treturn s/vec.length;\n}", "getAverageRating() {\n let sumOfRatings = this.ratings.reduce((currentSum, rating) => currentSum + rating);\n const lengthOfArray = this.ratings.length;\n let average = sumOfRatings / lengthOfArray;\n return average;\n }", "function mapProgressToSpeed(progress) {\n\tif (progress <= 0.5) return progress * 2;\n\telse if(progress <= 0.75) return (progress * 4) - 1;\n\telse return -1/((progress - 1) * 2)\n}", "get mean(): number {\n if(this.alpha > 1) {\n return this.alpha * this.xm / (this.alpha - 1);\n }\n return Infinity;\n }", "function calculateSpeed(timeTaken, words) {\nvar minutes = timeTaken / 60;\nreturn (words / minutes).toFixed(0);\n}", "function calculateAverage() {\r\n var sum = 0;\r\n for (var i = 0; i < arguments.length; i++) {\r\n sum += arguments[i];\r\n }\r\n return sum / 4;\r\n }", "findAverageMass(humans) {\n const _humans = Object.keys(humans);\n let _total = 0;\n for(let human of _humans){\n if(humans[human].mass !== 'unknown') _total += parseInt(humans[human].mass);\n }\n return Math.floor(_total / _humans.length)\n }", "function getAvg(stats) {\n let total = 0;\n for (let i = 0; i < stats.length; i++) {\n total += Number(stats[i])\n }\n\n let avg = total / stats.length\n console.log(\"average\", avg)\n return avg\n }", "function speedIncrease() {\n if (score < 2500 && cnvsWidth < 600) {\n speed += 0.002;\n } else if (score < 2500 && cnvsWidth < 1200) {\n speed += 0.005;\n } else if (score < 2500) {\n speed += 0.007;\n } else if (score < 5000 && cnvsWidth < 600) {\n speed += 0.001;\n } else if (score < 5000 && cnvsWidth < 1200) {\n speed += 0.002;\n } else if (score < 5000) {\n speed += 0.002;\n } else if (score < 7500 && cnvsWidth < 600) {\n speed += 0.0005;\n } else if (score < 7500 && cnvsWidth < 1200) {\n speed += 0.0002;\n } else if (score < 7500) {\n speed += 0.001;\n }\n}", "function find_avg(arr) {\n\t\tvar sum = 0, avg;\n\t\tfor (var i = 0; i < arr.length; i++) {\n\t\t\tsum += arr[i];\n\t\t}\n\t\tavg = sum / arr.length;\n\t\treturn avg;\n\t}", "function ratesAverage (e){\n \n var mov = movies.map(e => {\n e.rate= Number(e.rate);\n return e\n}) ;\n\nvar avg = mov.reduce((sum, ele) => {\n return sum + ele.rate/ mov.length;\n},0)\n\navg = Math.round(avg * 100) /100\n \nreturn avg;\n \n}", "function getAverageLoadTime(data, key, count, endField, startField) {\n var sum = 0;\n\n for (var i = 1; i <= count; i++) {\n var index = key + \"_\" + i;\n\n //console.log(\"attempting to parse? \" + index )\n if (index in data) {\n var temp = JSON.parse(data[index]);\n var end = parseInt(temp[endField])\n var start = parseInt(temp[startField])\n sum += end - start;\n }\n }\n console.log(\"sum is \" + sum + \" avg is \" + (sum / count))\n return sum / count;\n}", "increaseSpeed() {\n\n this.speed = Math.max(this.speed - Snake.SPEED_INCREMENT, Snake.MAX_SPEED);\n\n }", "function ratesAverage (mov) {\n const sumRates = mov.reduce((acc, obj) => {\n if (! obj.rate) obj.rate = 0\n return acc + parseFloat(obj.rate) \n }, 0) \n return Number((sumRates/mov.length).toFixed(2))\n}", "average() {\n const length = this.length();\n let sum = 0;\n // this.traverse(function (node) {\n // sum += node.value;\n // });\n this.traverse(node => sum += node.value);\n\n return this.isEmpty() ? null : sum / length;\n }", "getSpeed() {\n return this.speed;\n }", "distance() {\n return this.speed * this.duration() / 3600000;\n }", "function ratesAverage(movies){\n\n let avg = movies.reduce((prev, current) => {\n return prev + current.rate\n\n }, 0) / movies.length\n\n return parseFloat(avg.toFixed(2))\n}", "function avg( x, size){\r\n//console.log(x[0])\r\nvar sum = 0;\r\nfor(var i=0;i<size;i++){\r\n\tvar t = parseInt(x[i], 10);\r\n sum+=t;\r\n}\r\nvar z = sum/size\r\n//console.log(\"avg : \" + z )\r\nreturn z;\r\n}", "function calculateAverageMovieRate(arr) {\n let average = arr.map(el => el.rate);\n //console.log(average);\n\n let sum = 0;\n for (let i = 0; i < average.length; i++){\n sum = sum + average[i];\n }\n return (sum / arr.length);\n }", "var(arr) {\r\n let av = this.avg(arr);\r\n let sum = 0;\r\n for (let i = 0; i < arr.length; i++) {\r\n sum += parseFloat(arr[i]) * parseFloat(arr[i]);\r\n }\r\n return sum / arr.length - av * av;\r\n }", "function calculateAverageMovieRate(someArray){\nconst sumValues = someArray.reduce((accumulator, value) => {\n return (accumulator + value.rate);\n }, 0);\nreturn sumValues / someArray.length;\n}", "function checkSpeed(speed) {\n\n let speedLimit = 70;\n let points = 0;\n let speedToSuspended = 12;\n let speedToPoint = Math.floor((speed - speedLimit) / 5)\n if (speedToPoint >= speedToSuspended) {\n return 'Your points of: ' + speedToPoint + ' is over the speed Limit so your licence is suspended'\n }\n else {\nreturn 'Your points of: ' + speedToPoint + ' points has been accumulated per your speed of: ' + speed;\n // for (let i = 0; i <= speedToPoint; i+=5) {\n // points += 1;\n \n }\n // return points;\n // }\n \n \n \n }", "function avgMile (list, sum, callback){\n var len = list.length;\n for (var i = 0; i< len; i++){\n if (list[i] < 40){\n sum += list[i];\n }\n }\n var avg = (sum/len);\n callback(null, avg);\n\n }", "function flightsAveragePrice(){\r\n\r\n for (let i in flights){\r\n averagePrice += flights[i].cost;\r\n }\r\n\r\n averagePrice /= flights.length;\r\n}", "function ratesAverage(movies){\n const sumRate = movies.reduce((accumulator, movie) => {\n const rate = parseFloat(movie.rate)\n //console.log(`Accumulator: ${accumulator}, Current rate: ${rate}`)\n return (accumulator + rate)\n }, 0)\n return parseFloat((sumRate / movies.length).toFixed(2))\n}", "function avgRate(st) {\n const keys = Object.keys(st);\n const sum = keys.reduce((acc, d) => {\n if (typeof st[d] !== 'string') {\n acc += st[d];\n }\n return acc;\n }, 0);\n return sum / keys.length;\n}", "Asmin(){\n return 0.0018*this.b*this.h\n }", "function avg(data){\n let sum = 0;\n for(let i = 0; i < data.size; i++) {\n sum+= data.products[i].price;\n }\n return sum / data.size;\n}", "function displaySpeed(speed) {\n\tlet returnSpeed = speed\n\tif(!isMetric()){\n\t\treturnSpeed = speed / 1.609\n\t}\n\t//rounding the speed\n\treturn Math.round(returnSpeed)\n}", "function stats()\r\n{\r\n\r\n\tvar sum = 0;\r\n\t// stole this from stachoverflow, thank and bug the guy there\r\n\tfor( var i = 0; i < incorrectTiming.length; i++ )\r\n\t{\r\n\t sum += parseInt( incorrectTiming[i], 10 );\r\n\t}\r\n\r\n\tavgIncorrect = sum/incorrectTiming.length;\r\n\r\n\tsum = 0;\r\n\tfor( var i = 0; i < correctTiming.length; i++ )\r\n\t{\r\n\t\t//console.log(correctTiming[i]);\r\n\t sum += parseInt( correctTiming[i], 10 ); \r\n\t}\r\n\r\n\tavgCorrect = sum/correctTiming.length;\r\n\r\n\tsum = 0;\r\n\tfor( var i = 0; i < controlTiming.length; i++ )\r\n\t{\r\n\t sum += parseInt( controlTiming[i], 10 );\r\n\t}\r\n\tavgControl = sum/controlTiming.length;\r\n\r\n\t//console.log(\"avgCorrect\" + avgCorrect);\r\n\t//console.log(\"avgIncorrect\" + avgIncorrect);\r\n\t//console.log(\"avgControl\" + avgControl);\r\n\r\n}", "function cariMean(arr){\n arr.sort(function(v1, v2){return v1 > v2});\n var cariHasil = (arr[0]+arr[arr.length - 1]) / 2;\n return Math.round(cariHasil);\n}", "function calcAccelerationInPixelsPerSecond(partLastPoses, lastTimestamps) {\n let lastVel = calcVelocityInPixelsPerSecond(partLastPoses.slice(0, -1), lastTimestamps)\n let currentVel = calcVelocityInPixelsPerSecond(partLastPoses, lastTimestamps)\n let accel = null\n if (lastTimestamps.length > 2 && lastVel != null && currentVel != null) { // we need three elements to run accel calcs(three positions)\n accel = (currentVel - lastVel) / (lastTimestamps[lastTimestamps.length - 1] - lastTimestamps[lastTimestamps.length - 2])\n }\n return accel//return 0 if the array is not large enough to calc acceleration \n}", "get mean(): number {\n if(this.beta > 1) {\n return this.alpha / (this.beta - 1);\n }\n return Infinity;\n }", "function speedIncrease() {\r\n if (score < 2500 && cnvsWidth < 600) {\r\n speed += 0.002;\r\n } else if (score < 2500 && cnvsWidth < 1200) {\r\n speed += 0.005;\r\n } else if (score < 2500) {\r\n speed += 0.007;\r\n } else if (score < 5000 && cnvsWidth < 600) {\r\n speed += 0.001;\r\n } else if (score < 5000 && cnvsWidth < 1200) {\r\n speed += 0.002;\r\n } else if (score < 5000) {\r\n speed += 0.002;\r\n } else if (score < 7500 && cnvsWidth < 600) {\r\n speed += 0.0005;\r\n } else if (score < 7500 && cnvsWidth < 1200) {\r\n speed += 0.0002;\r\n } else if (score < 7500) {\r\n speed += 0.001;\r\n }\r\n}", "function getSpeedX() {\n\t\treturn this.speedX;\n\t}", "function ratesAverage(movies) {\n\nlet sumOfRates = movies.map(movie => movie.rate).reduce((acc, cv) => acc + cv)\nreturn sumOfRates / movie.length\n}", "function ratesAverage(movies) {\n\n //return (movies.reduce((sum, movie) => sum + parseFloat(movie.rate), 0).toFixed(2) / movies.lenght)\n\n let x = movies.reduce((suma, movie) => {\n return suma + parseFloat(movie.rate)\n }, 0)\n return parseFloat((x / movies.length).toFixed(2));\n\n /*let y = 0;\n let x = movies.reduce((suma, movie) => {\n if(!movie.rate) {\n y++\n } else {\n return suma + parseFloat(movie.rate)\n }\n }, 0)\n return (x.toFixed(2) / movies.length - y);*/\n}", "average(){\n // If the list is empty, there's no average to calculate.\n if(this.isEmpty()){\n return 0;\n }\n\n // now, if the list isn't empty, we need to get to calculatin!\n let runner = this.head; // y'all know the deal with this one by now\n let sum = 0; // to keep track of the sum as we iterate through the list\n let length = 0; // to keep track of how many elements are in the SLL to calculate the average\n\n while(runner != null){ // we want to move runner, adding to the sum and length until we finish touching every node\n sum += runner.value; // add the runner's value to the sum\n length++; // increment the length\n runner = runner.next; // and move the runner to the next node\n }\n\n // now that we've finished running through the list, let's calculate the average and return it\n return sum/length;\n }", "function format_speed(speed) {\n return (Math.round(speed * 100) / 100) + \" km/h\";\n}", "function getAttackTime() {\n //TODO: Make this generic - pass in the APS as an argument\n return Math.round((1 / heroBaseStats.aps) * 1000);\n }" ]
[ "0.7375608", "0.7062403", "0.6942398", "0.6856782", "0.67140955", "0.664992", "0.65732014", "0.6550614", "0.64540654", "0.63804847", "0.628317", "0.6246495", "0.6246305", "0.6243768", "0.6196168", "0.6167225", "0.60871404", "0.60601366", "0.6036089", "0.60248196", "0.59943926", "0.59408957", "0.59405285", "0.59201473", "0.58996445", "0.5879471", "0.5862912", "0.584134", "0.58142245", "0.5808033", "0.580274", "0.5801921", "0.5793278", "0.578085", "0.57684684", "0.5749237", "0.5730057", "0.5726014", "0.57257855", "0.5714971", "0.5680656", "0.56804204", "0.5676934", "0.5666475", "0.56661814", "0.5653835", "0.56436443", "0.56395555", "0.56353265", "0.56307304", "0.561854", "0.5611999", "0.5592735", "0.5579823", "0.5578593", "0.55708313", "0.55597025", "0.5539773", "0.55350745", "0.55272096", "0.5523329", "0.55102766", "0.5496114", "0.54920477", "0.548842", "0.5486925", "0.5486383", "0.5466312", "0.54661435", "0.54614806", "0.5457947", "0.5457653", "0.5447476", "0.543559", "0.5429375", "0.5429078", "0.5428926", "0.542117", "0.54198194", "0.5413088", "0.54120106", "0.5409014", "0.54035896", "0.53981614", "0.5392488", "0.5389226", "0.5386044", "0.5384618", "0.53719324", "0.53629017", "0.53596747", "0.5355929", "0.53556573", "0.5351115", "0.5343693", "0.5334199", "0.533227", "0.53209704", "0.53199863", "0.5315903", "0.5314706" ]
0.0
-1
move_state return run state snake_state up: draw down:
constructor(cur) { this.cur = cur; this.state = "runnable"; this.move_state = "null"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function snakeMove() {\n\t\t\n\t\tif (snake.direction.x == UP.x && snake.direction.y == UP.y && NEXT_DIRECTION.x != DOWN.x && NEXT_DIRECTION.y != DOWN.y)\n\t\t\tsnake.direction = NEXT_DIRECTION;\n\n\t\tif (snake.direction.x == DOWN.x && snake.direction.y == DOWN.y && NEXT_DIRECTION.x != UP.x && NEXT_DIRECTION.y != UP.y)\n\t\t\tsnake.direction = NEXT_DIRECTION;\n\n\t\tif (snake.direction.x == LEFT.x && snake.direction.y == LEFT.y && NEXT_DIRECTION.x != RIGHT.x && NEXT_DIRECTION.y != RIGHT.y)\n\t\t\tsnake.direction = NEXT_DIRECTION;\n\n\t\tif (snake.direction.x == RIGHT.x && snake.direction.y == RIGHT.y && NEXT_DIRECTION.x != LEFT.x && NEXT_DIRECTION.y != LEFT.y)\n\t\t\tsnake.direction = NEXT_DIRECTION;\n\n\t\tsnake.move();\n\n\t\tif (!$scope.gameover) {\n\t\t\tredraw();\n\t\t\ttimer = setTimeout(function() { snakeMove(); } , GAME_SPEED);\n\t\t} else {\n\n\t\t\tgameOver();\n\t\t}\n\t}", "function moveUp(){ \n //paintSnake(x,10,\"#9c9\");\n paintSnake(x,y+10,\"#9c9\");\n paintSnake(x,y,\"black\");\n y = y - 10;\n return y;\n }", "function snake_change_direction(snk, dir) {\n $rt_addContract(snk, c1c4a0f57a2c3f1f88733420f6a3b3c6fc, \"motion.ts(73,40)\");\n return new DataClasses_1.DataClasses.Snake(dir, snk.segs);\n }", "function moveSnake() {\n switch(snake.moveDirection) {\n case \"LEFT\":\n if(nextMove(positionHeadLeft - BASE_UNIT, positionHeadTop)) {\n snake.pushCoordinates(positionHeadLeft, positionHeadTop);\n\n positionHeadLeft -= BASE_UNIT;\n document.getElementById(\"snakeHead\").style.left = positionHeadLeft.toString() + \"px\";\n\n snake.drawBody();\n }\n else endOfGame();\n break;\n\n case \"RIGHT\": \n if(nextMove(positionHeadLeft + BASE_UNIT, positionHeadTop)) {\n snake.pushCoordinates(positionHeadLeft, positionHeadTop);\n\n positionHeadLeft += BASE_UNIT;\n document.getElementById(\"snakeHead\").style.left = positionHeadLeft.toString() + \"px\";\n\n snake.drawBody();\n }\n else endOfGame();\n break;\n\n case \"UP\":\n if(nextMove(positionHeadLeft, positionHeadTop - BASE_UNIT)) {\n snake.pushCoordinates(positionHeadLeft, positionHeadTop);\n\n positionHeadTop -= BASE_UNIT;\n document.getElementById(\"snakeHead\").style.top = positionHeadTop.toString() + \"px\";\n\n snake.drawBody();\n }\n else endOfGame();\n break;\n\n case \"DOWN\":\n if(nextMove(positionHeadLeft, positionHeadTop + BASE_UNIT)) {\n snake.pushCoordinates(positionHeadLeft, positionHeadTop);\n\n positionHeadTop += BASE_UNIT;\n document.getElementById(\"snakeHead\").style.top = positionHeadTop.toString() + \"px\";\n\n snake.drawBody();\n }\n else endOfGame();\n break;\n }\n}", "changeDirection (direction) {\n let newState = Object.assign({}, this.state);\n if(direction === 'w' || direction === 'up'){\n newState.snake.direction = 'w';\n } else if(direction === 's' || direction === 'down'){\n newState.snake.direction = 's';\n } else if(direction === 'a' || direction === 'left'){\n newState.snake.direction = 'a';\n } else if(direction === 'd' || direction === 'right'){\n newState.snake.direction = 'd';\n }\n this.setState(newState);\n this.canvasMoveSnake();\n }", "function move(e){\n square[currentIndex].classList.remove('snake') // removing snake from the grid\n\n if(e.keyCode === 39){\n direction = 1// going right\n } else if(e.keyCode === 38){\n direction = -width// going up\n } else if(e.keyCode===37){\n direction = -1// going left\n } else if(e.keyCode===40){\n direction = +width// doing down\n }\n }", "function moveSnake() {\n\t\"use strict\";\n\t// Get snake head coordiantes.\n\tvar newRow = snakeHead.row;\n\tvar newCol = snakeHead.col;\n\t// Determine coordinate of new position.\n\tif (currDirection == up) {\n\t\tnewRow--;\n\t} else if (currDirection == left) {\n\t\tnewCol--;\n\t} else if (currDirection == right) {\n\t\tnewCol++;\n\t} else if (currDirection == down) {\n\t\tnewRow++;\n\t}\n\t// Move snake head to the new position.\n\tsnakeHead.move(newRow, newCol);\n\t// Reset the direction lock.\n\tdirectionLock = false;\n}", "function moveSnake() {\n $.each(snake, function (index, value) {\n snake[index].oldX = value.x;\n snake[index].oldY = value.y;\n\n // head\n if (index == 0) {\n if (keyPressed === down) {\n snake[index].y = value.y + blockSize;\n } else if (keyPressed === up) {\n snake[index].y = value.y - blockSize;\n } else if (keyPressed === right) {\n snake[index].x = value.x + blockSize;\n } else if (keyPressed === left) {\n snake[index].x = value.x - blockSize;\n }\n } \n // body\n else {\n snake[index].x = snake[index - 1].oldX;\n snake[index].y = snake[index - 1].oldY;\n }\n });\n }", "step() {\n /**\n * Move\n */\n if (Snake.state.state === 'start level') {\n /**\n * Snake crash with itself\n */\n if (this.isInTrace(this.actualPosition)) {\n this.crash()\n }\n\n /**\n * Snake Crash\n */\n if (this.actualPosition[0] === 0 && this.direction === 'left' ||\n this.actualPosition[1] === 0 && this.direction === 'up' ||\n this.actualPosition[0] > Snake.canvasBounds[0] && this.direction === 'right' ||\n this.actualPosition[1] > Snake.canvasBounds[1] && this.direction === 'down') {\n this.crash()\n }\n\n /**\n * Snake is full\n */\n if (this.length === (Snake.canvasBounds[0] * Snake.canvasBounds[1])) {\n this.full()\n }\n\n /**\n * Snake Detects a fruit\n */\n let target = Snake.match.target\n if (target[0] === this.actualPosition[0] && target[1] === this.actualPosition[1]) {\n this.eat()\n }\n if(this.direction !== 'stop') {\n this.move()\n }\n }\n }", "function move() {\n // check if move allowed & then eat food\n hitFood();\n hitBorder();\n hitSnake();\n // actually move the snake\n updatePositions();\n renderSnake();\n document.addEventListener(\"keydown\", turn);\n snake.canTurn = 1;\n}", "function moveSnake(direction) {\n\tif (!GAME_RUNNING) { return; }\n\tlet moveInfo = {\"gameWon\": false, \"gameLost\": false, \"fruitWasEaten\": false, \"newTailRow\": null, \"newTailCol\": null, \"previousTail\": null};\n\t//Figure out the appropriate increments for the snake head's row and column.\n\tlet incR, incC;\n\tswitch(DIRECTION) {\n\tcase UP: //Up\n\t\tincR = -1; incC = 0; \n\t\tbreak;\n\tcase RIGHT: //Right\n\t\tincR = 0; incC = 1; \n\t\tbreak;\n\tcase DOWN: //Down\n\t\tincR = 1; incC = 0; \n\t\tbreak;\n\tcase LEFT: //Left\n\t\tincR = 0; incC = -1; \n\t\tbreak;\n\t}\n\t\n\t//Grab the snake head's previous row and column.\n\tlet prevRow = SNAKE_LL.r\n\tlet prevCol = SNAKE_LL.c;\n\t//Change the snake head's position. But don't actually move the snake head just yet.\n\tSNAKE_LL.r += incR;\n\tSNAKE_LL.c += incC;\n\t//If the game is already won, no need to allow the player to move further.\n\tif (isGameWon()) { \n\t\t//Restore the snake head's position.\n\t\tSNAKE_LL.r = prevRow;\n\t\tSNAKE_LL.c = prevCol;\n\t\trotateSnakeSquare(prevRow, prevCol, DIRECTION);\n\t\tmoveInfo.gameWon = true; //Game win.\n\t\treturn moveInfo; \n\t}\n\t//If this new square results in losing the game (it isn't an empty square)...\n\tif (isDeathSquare(SNAKE_LL.r, SNAKE_LL.c)) { \n\t\t//Restore the snake head's position.\n\t\tSNAKE_LL.r = prevRow;\n\t\tSNAKE_LL.c = prevCol;\n\t\t//But rotate the head in the game-losing direction at least (to show the user where they went wrong).\n\t\trotateSnakeSquare(prevRow, prevCol, DIRECTION);\n\t\tmoveInfo.gameLost = true; //Game loss.\n\t\treturn moveInfo;\n\t}\n\t//Rotate the snake's head in the appropriate direction.\n\trotateSnakeSquare(SNAKE_LL.r, SNAKE_LL.c, DIRECTION);\n\trotateSnakeSquare(prevRow, prevCol, 0); //Rotate the previous square back to normal.\n\t\n\t//Now actually move the snake's head.\n\tSNAKE_BOARD_LOGICAL[prevRow][prevCol] = EMPTY;\n\t//But before wiping out the contents of the new head position with SNAKE_HEAD, check if a fruit was there.\n\tlet fruitWasEaten = (SNAKE_BOARD_LOGICAL[SNAKE_LL.r][SNAKE_LL.c] == FRUIT);\n\tmoveInfo.fruitWasEaten = fruitWasEaten;\n\tSNAKE_BOARD_LOGICAL[SNAKE_LL.r][SNAKE_LL.c] = SNAKE_HEAD;\n\t\n\t//Traverse through the snake linked list to have the rest of the body follow the head's lead.\n\tlet addNewTailInfo = moveSnakeBody(prevRow, prevCol);\n\tmoveInfo.newTailRow = addNewTailInfo.r;\n\tmoveInfo.newTailCol = addNewTailInfo.c;\n\tmoveInfo.previousTail = addNewTailInfo.previousTail;\n\t\n\treturn moveInfo;\n}", "function moveSnake(){\n\t\n\t// update the movement history of the snake so the snakeBody can follow\n\tsnakeBody[0].prevX = snakeBody[0].x;\n\tsnakeBody[0].prevY = snakeBody[0].y;\n\t\n\tif(direction == \"left\"){\t// left arrow key was pressed\t\t\n\t\tsnakeBody[0].x -= snakeSpeed;\t\t\n\t}\n\telse if(direction == \"up\"){\t// up key\t\t\n\t\tsnakeBody[0].y -= snakeSpeed;\n\t}\n\telse if(direction == \"right\"){\t// right key\t\t\n\t\tsnakeBody[0].x += snakeSpeed;\n\t}\t\t\n\telse if(direction == \"down\"){\t// down\t\t\n\t\tsnakeBody[0].y += snakeSpeed;\t\t\n\t}\t\n\t\n\tif(snakeBody.length > 1){\n\t\tmoveSnakeBody();\t\t\n\t}\n\tconsole.log(\"snakeBody[0] X: \" + snakeBody[0].x);\n\tconsole.log(\"snakeBody[0] Y: \" + snakeBody[0].y);\n}", "function move_snake(string) {\n\t\tvar nx = snake_array[0].x;\n \t\tvar ny = snake_array[0].y;\n\n\t\tswitch(string) {\n\t\t\tcase 'up': ny--; break;\n\t\t\tcase 'down': ny++; break;\n\t\t\tcase 'right': nx++; break;\n\t\t\tcase 'left': nx--; break;\n\t\t\tdefault: nx++; break;\t\n\t\t}\n\n\n\t\t//eat food\n\t\tif(nx == food_coordinates.x && ny == food_coordinates.y) {\n\t\t\tmake_food();\n\t\t\tdraw_food();\n\t\t\tscore++;\n\t\t\tsnake_array.unshift({x:nx,y:ny});\n\t\t} else {\n\t\t\tsnake_array.unshift({x:nx,y:ny});\n\t\t\tsnake_array_last = [];\n\t\t\tsnake_array_last.push(snake_array.pop());\n\t\t\t\n\t\t}\n\t\t\n\t}", "move(){\n for(let i = this.snake.length - 1; i > 0; i--){\n this.snake[i].style.left = `${this.snake[i - 1].offsetLeft}px`;\n this.snake[i].style.top = `${this.snake[i - 1].offsetTop}px`;\n }\n switch(this.direction){\n case LEFT:\n this.snakeHead.style.left = `${this.snakeHead.offsetLeft - this.cellWidth}px`;\n break;\n case UP:\n this.snakeHead.style.top = `${this.snakeHead.offsetTop - this.cellWidth}px`;\n break;\n case RIGHT:\n this.snakeHead.style.left = `${this.snakeHead.offsetLeft + this.cellWidth}px`;\n break;\n case DOWN:\n this.snakeHead.style.top = `${this.snakeHead.offsetTop + this.cellWidth}px`;\n break;\n }\n this.lastDirection = this.direction;\n }", "function movedown(){\n undraw();\n currentposition+=GRID_WIDTH;\n draw();\n freeze();\n console.log(down);\n }", "function move(snake) {\n\tvar h = snake.head,\n\t\td = snake.dir;\n\n\tif (snake.belly) {\n\t\tgrow(snake);\n\t} else if (snake.body.length) {\n\t\tvar back = snake.body.shift();\n\t\tsnake.body.push(back);\n\t\tplaceCell(back, h.x, h.y);\n\t}\n\tplaceCell(snake.head, h.x+d.x, h.y+d.y);\n\n}", "function changeSnakeDirection(event)\r\n {\r\n const keyPressed = event.keyCode;\r\n \r\n const isGoingUp = dy === -10;\r\n const isGoingDown = dy === 10;\r\n const isGoingLeft = dx === -10;\r\n const isGoingRight = dx === 10;\r\n\r\n if(keyPressed === LEFT_KEY && !isGoingRight)\r\n {\r\n dx = -10;\r\n dy = 0;\r\n }\r\n else if(keyPressed === UP_KEY && !isGoingDown)\r\n {\r\n dx = 0;\r\n dy = -10;\r\n }\r\n else if(keyPressed === RIGHT_KEY && !isGoingLeft)\r\n {\r\n dx = 10;\r\n dy = 0;\r\n }\r\n else if(keyPressed === DOWN_KEY && !isGoingUp)\r\n {\r\n dx = 0;\r\n dy = 10;\r\n }\r\n }", "move() {\n\n }", "function move(){\n\t\t\tvar head={x:snakeArr[snakeArr.length-1].x+dx,y:snakeArr[snakeArr.length-1].y+dy};\n\t\t\tsnakeArr.push(head);\n\t\t\tsnakeArr.shift();\n\t\t\tsnakeArr.forEach(function(e,i){paint(e.x,e.y,'white','black',cellW);});\n\t\t}", "move () {\n }", "function change_direction(){\n\tvar lastx = snake_array[snake_array.length-1].x;\n\tvar lasty = snake_array[snake_array.length-1].y;\n\tsnake_array[0] = {x: lastx, y: lasty, color: \"black\"};\n\tvar tail = snake_array.shift();\n\tif(d === \"left\"){\n\t\tsnake_array.push(tail);\n\t\tsnake_array[snake_array.length-1].x--;\n\t}\n\telse if(d === \"right\"){\n\t\tsnake_array.push(tail);\n\t\tsnake_array[snake_array.length-1].x++;\n\t}\n\telse if(d === \"up\"){\n\t\tsnake_array.push(tail);\n\t\tsnake_array[snake_array.length-1].y--;\n\t}\n\telse if(d === \"down\"){\n\t\tsnake_array.push(tail);\n\t\tsnake_array[snake_array.length-1].y++;\n\t}\n\thitItself(snake_array[snake_array.length-1]);\n\thitTheWall(snake_array[snake_array.length-1]);\n\tpaint_snake();\n\teat();\n\t// console.log(snake_array[snake_array.length - 1]);\n\n}", "function updateSnakeMovement() {\n let newPos = {x: snake.history[0].x, y: snake.history[0].y};\n toBeClearedFields.push(snake.history.pop());\n if (command !== null) {\n switch (command) {\n case \"LEFT\":\n newPos.x--;\n break;\n case \"UP\":\n newPos.y--;\n break;\n case \"RIGHT\":\n newPos.x++;\n break;\n case \"DOWN\":\n newPos.y++;\n break;\n }\n }\n snake.history.unshift(newPos);\n }", "move() {\n switch (this.machineTable[this.state][this.lastRead].move) {\n case directions.UP:\n return this.moveUp();\n case directions.RIGHT:\n return this.moveRight();\n case directions.DOWN:\n return this.moveDown();\n case directions.LEFT:\n return this.moveLeft();\n default:\n }\n }", "function moveSnake() {\n const head = {\n x: snake[0].x + dx,\n y: snake[0].y + dy\n };\n snake.unshift(head);\n\n let ate = snake[0].x === foodX && snake[0].y === foodY;\n\n if (ate) {\n createPickup();\n score += 10;\n updateScore(); // Updates the html element\n } else if (checkDeath()) {\n paused = true;\n dead = true;\n } else {\n snake.pop();\n }\n}", "_moveSnakeOneStep(){\n \n let newCol,newRow;\n newRow=this._snake[0].row;\n newCol=this._snake[0].col;\n switch(this._direction){\n case \"left\" : newCol-=1; break;\n case \"right\": newCol+=1;break;\n case \"up\": newRow-=1;break;\n case \"down\" : newRow+=1;break;\n default :break;\n }\n \n if(this._checkBounds(newRow,newCol) ==-1)return;\n \n this._snake.unshift({\n row:newRow,\n col:newCol\n });\n\n let isFruit = false;\n if(newRow==this._fruit[0].row && newCol == this._fruit[0].col){\n const fruit = document.getElementById(\"fruit-id\");\n this._screen.removeChild(fruit);\n this._addFruit();\n this._score++;\n this._scoreBoard.innerHTML=\"SCORE:\"+this._score;\n isFruit=true;\n }\n if(!isFruit){\n this._snake.pop();\n const toDelet=this._snakeBodyElems.pop();\n toDelet.parentNode.removeChild(toDelet);\n }\n const newHead = document.createElement(\"div\");\n newHead.className=\"box\";\n newHead.id = \"box-id\";\n newHead.style.top=this._snake[0].row*this._boxSize+\"px\";\n newHead.style.left=this._snake[0].col*this._boxSize+\"px\";\n this._screen.append(newHead);\n this._snakeBodyElems.unshift(newHead);\n \n }", "moveSnake(){\n\t\t\tlet head = this.growth[0];\n\t\t\tlet newHead;\n\t\t\t\n\t\t\t/*\n\t\t\tsets the current direction to next direction and updates the direction of \n\t\t\tthe snake to the latest pressed direction by the player.\n\t\t\t*/\n\t\t\tthis.currDirection = this.nextDirection;\n\t\t\tif(this.currDirection === 'right'){\n\t\t\t\tnewHead = new Roles(head.x + 1, head.y);\n\t\t\t}\n\t\t\telse if(this.currDirection === 'left'){\n\t\t\t\tnewHead = new Roles(head.x - 1, head.y);\n\t\t\t}\n\t\t\telse if(this.currDirection === 'down'){\n\t\t\t\tnewHead = new Roles(head.x, head.y + 1);\n\t\t\t}\n\t\t\telse if(this.currDirection === 'up'){\n\t\t\t\tnewHead = new Roles(head.x, head.y - 1);\n\t\t\t}\n\n\t\t\t//console.log(newHead);\n\n\t\t\t//checks if the snake has collided with itself or with the wall\n\t\t\tif(this.checkCollision(newHead)){\n\t\t\t\tendGame();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.growth.unshift(newHead);\n\n\t\t\t//checks if the position of the head of the snake and food are same\n\t\t\tif(newHead.checkCollisionRoles(foodObj.position)){\n\t\t\t\tupdateScore(++scoreValue);\n\t\t\t\tfoodObj.moveFood();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.growth.pop();\n\t\t\t}\n\n\t\t}", "genmove(state, cb) { /* {{{ */\n // Only relevent with persistent bots. Leave the setting on until we actually have requested a move.\n //\n this.firstmove = false;\n\n // Do this here so we only do it once, plus if there is a long delay between clock message and move message, we'll\n // subtract that missing time from what we tell the bot.\n //\n this.loadClock(state);\n\n this.command(\"genmove \" + this.game.my_color,\n (move) => {\n move = typeof(move) == \"string\" ? move.toLowerCase() : null;\n let resign = move == 'resign';\n let pass = move == 'pass';\n let x=-1, y=-1;\n if (!resign && !pass) {\n if (move && move[0]) {\n x = gtpchar2num(move[0]);\n y = state.width - parseInt(move.substr(1))\n } else {\n this.log(\"genmove failed, resigning\");\n resign = true;\n }\n }\n cb({'x': x, 'y': y, 'text': move, 'resign': resign, 'pass': pass});\n },\n null,\n true /* final command */\n )\n }", "function eventKeydown (e) {\n //left\n if (e.which === 37 && snake.dx === 0) {\n snake.dx = -grid\n snake.dy = 0\n }\n //up\n else if (e.which === 38 && snake.dy === 0) {\n snake.dy = -grid\n snake.dx = 0\n }\n //right\n else if (e.which === 39 && snake.dx === 0) {\n snake.dx = grid\n snake.dy = 0\n }\n // down\n else if (e.which === 40 && snake.dy === 0) {\n snake.dy = grid\n snake.dx = 0\n }\n }", "function drawSnake() {\n context.fillStyle = 'white';\n context.fillRect(0, 0, width, height);\n context.strokeStyle = 'black';\n context.strokeRect(0, 0, width, height);\n\n var headX = snake[0].x;\n var headY = snake[0].y;\n\n if(direction == 'right') {\n headX++;\n } else if(direction == 'left') {\n headX--;\n } else if(direction == 'up') {\n headY--;\n } else if(direction == 'down') {\n headY++;\n }\n\n if(headX == -1 || headX == width/cellSize || headY == -1 || headY == height/cellSize || collisionCheck(headX, headY, snake)) {\n init();\n return;\n }\n\n //function left() {\n // if(snake[0].x == 0) {\n // snake.forEach(function(segment) {\n // segment.draw();\n // });\n // } else {\n // snake.forEach(function(segment) {\n // segment.draw().moveLeft();\n // })\n // }\n //}\n //\n //function up() {\n // if(snake[0].y == 0){\n // snake.forEach(function(segment) {\n // segment.draw();\n // });\n // } else {\n // snake.forEach(function(segment) {\n // segment.draw().moveUp();\n // });\n // }\n //}\n //\n //function right() {\n // if(snake[0].x == canvas.width - snake[0].w) {\n // snake.forEach(function(segment) {\n // segment.draw();\n // })\n // } else {\n // snake.forEach(function(segment) {\n // segment.draw().moveRight();\n // })\n // }\n //}\n //\n //\n //function down() {\n // if(snake[0].y == canvas.height - snake[0].h) {\n // snake.forEach(function(segment) {\n // segment.draw();\n // });\n // } else {\n // snake.forEach(function(segment) {\n // segment.draw().moveDown();\n // });\n // }\n //}\n\n\n if(headX == target.x && headY == target.y) {\n var snakeBody = { x: headX, y: headY };\n score = score + 100;\n createTarget();\n } else {\n var snakeBody = snake.pop();\n snakeBody.x = headX;\n snakeBody.y = headY;\n }\n\n snake.unshift(snakeBody);\n\n for(var i = 0; i < snake.length; i++) {\n var c = snake[i];\n\n drawCell(c.x, c.y);\n }\n\n // Draw New Target\n drawCell(target.x, target.y);\n\n var scoreText = \"Score: \" + score;\n context.fillText(scoreText, 5, height-5);\n\n function drawCell(x, y) {\n context.fillStyle = 'white';\n context.fillRect(x * cellSize, y * cellSize, cellSize, cellSize);\n context.strokeStyle = 'black';\n context.strokeRect(x * cellSize, y * cellSize, cellSize, cellSize);\n }\n\n //Collision Check with Self\n function collisionCheck(x, y, array) {\n for(var i = 0; i < array.length; i++)\n {\n if(array[i].x == x && array[i].y == y)\n return true;\n }\n return false;\n }\n\n // KeyBoard Controls\n //function headPosition(e) {\n // key = e.keyCode;\n //\n // switch(key) {\n // case 37:\n // leftKey = 37;\n // break;\n // case 38:\n // upKey = 38;\n // break;\n // case 39:\n // rightKey = 39;\n // break;\n // case 40:\n // downKey = 40;\n // break;\n // }\n //}\n //\n //var direction;\n //\n //function moveSnake(direction) {\n // switch (direction) {\n // case leftKey:\n // console.log(\"Left\", head);\n // left();\n // break;\n // case upKey:\n // console.log(\"Up\", head);\n // up();\n // break;\n // case rightKey:\n // console.log(\"Right\", head);\n // right();\n // break;\n // case downKey:\n // console.log(\"Down\", head);\n // down();\n // break;\n // }\n //}\n //\n\n document.addEventListener('keydown', function(e) {\n var key = e.keyCode;\n\n if(key == 37 && direction != 'right') {\n direction = 'left';\n // Debugging Verify Head Locaiton\n console.log({ x: snake[0].x, y: snake[0].y });\n } else if (key == 38 && direction != 'down') {\n direction = \"up\";\n // Debugging Verify Head Locaiton\n console.log({ x: snake[0].x, y: snake[0].y });\n } else if(key == 39 && direction != 'left') {\n direction = 'right';\n // Debugging Verify Head Locaiton\n console.log({ x: snake[0].x, y: snake[0].y });\n } else if(key == 40 && direction != 'up') {\n direction = 'down';\n // Debugging Verify Head Locaiton\n console.log({ x: snake[0].x, y: snake[0].y });\n }\n })\n\n\n\n\n\n //\n //\n //window.requestAnimationFrame(function loop() {\n // context.clearRect(0, 0, canvas.width, canvas.height);\n //\n // document.addEventListener('keydown', function(e) {\n // if(e.keyCode === 37) {\n // direction = leftKey;\n // } else if(e.keyCode === 38) {\n // direction = upKey;\n // } else if(e.keyCode === 39) {\n // direction = rightKey;\n // } else if (e.keyCode === 40) {\n // direction = downKey;\n // }\n // });\n //\n // moveSnake(direction);\n // requestAnimationFrame(loop);\n //});\n\n\n\n}", "function move_snake(snake, direction, food) {\n if (direction === '') {\n return;\n }\n var head = snake[0].slice();\n var tail = snake.pop();\n if (direction === 'up') {\n head[0] -= 1;\n } else if (direction === 'down') {\n head[0] += 1;\n } else if (direction === 'left') {\n head[1] -= 1;\n } else if (direction === 'right') {\n head[1] += 1;\n }\n snake.unshift(head);\n\n var eaten = snake_food_intersects(snake, food);\n if (eaten !== null) {\n snake.push(tail);\n }\n}", "function moveDown(){\n undraw()\n currentPosition += width\n // gameOver()\n draw()\n freeze()\n }", "function gameLogic() {\n\n // Check if pressed direction is opposite of current direction\n var isReverseDir =\n (nextDir === Directions.UP && snakeDir === Directions.DOWN) ||\n (nextDir === Directions.DOWN && snakeDir === Directions.UP) ||\n (nextDir === Directions.RIGHT && snakeDir === Directions.LEFT) ||\n (nextDir === Directions.LEFT && snakeDir === Directions.RIGHT);\n\n // Change snake dir only if pressed direction is not reverse\n if (!isReverseDir) {\n snakeDir = nextDir;\n }\n\n var oldHead = snake[0]; // Get the position of the head\n \n // Position new head depending on snake direction\n if (snakeDir === Directions.UP)\n var newHead = { x: oldHead.x, y: oldHead.y - 1 };\n else if (snakeDir === Directions.DOWN)\n var newHead = { x: oldHead.x, y: oldHead.y + 1 };\n else if (snakeDir === Directions.LEFT)\n var newHead = { x: oldHead.x - 1, y: oldHead.y };\n else if (snakeDir === Directions.RIGHT)\n var newHead = { x: oldHead.x + 1, y: oldHead.y };\n\n // Add the new head to the front of snake \n snake.unshift(newHead)\n \n // Check if food is eaten\n var ateFood = newHead.x === food.x && newHead.y === food.y;\n\n if (ateFood) { // If the food is eaten then reposition food randomly\n food = {\n x: (Math.random() * 40) | 0,\n y: (Math.random() * 40) | 0\n };\n } else { \n // Remove the last part of the snake - this moves the snake\n // if food is eaten then we skip this part. This is how the \n // snake grows.\n snake.pop();\n }\n\n // Check if snake is dead\n var isDead = false; // initial value\n // Check if newHead is on any other snake part\n for (var i = 1; i < snake.length; i++) {\n if (newHead.x === snake[i].x && newHead.y === snake[i].y) {\n isDead = true;\n break;\n }\n }\n\n\n // Check if snake is out of bounds\n if (newHead.x < 0 || newHead.y < 0 || newHead.x >= 40 || newHead.y >= 40) {\n isDead = true;\n }\n\n // Stop the game if player is dead\n if (isDead) gameRunning = false;\n}", "move(){\n switch(this.direction){\n case \"n\":\n this.col-=1;\n this.direction=\"n\";\n break;\n case \"e\":\n this.row += 1;\n this.direction=\"e\"; \n break;\n case \"s\":\n this.col+=1;\n this.direction = \"s\";\n break;\n case \"w\":\n this. row -=1;\n this.direction=\"w\";\n }\n }", "function start(){\n /*Set your global variable rectangle to new rectangle\n us the width and height variable for snake as width and height*/\n \n //Set rectangle color to green\n \n /*Set position to\n x - half the width of screen minus half the width of snake\n y - half the height of the screen minus half height of snake\n */\n \n //Add your rectangle\n \n /*Set a timer calling your move function\n set delay to 40 ms*/\n \n /*Call your key down method with\n changeDir as an argument*/\n}", "function makeGameMove(isDnD){\n \t\n \t\tmove = angular.copy(moveOri);\n \t\tisChain = angular.copy(moveOri[3].set.value);\n \t\n \t\tif(isChain && chainValue.length === 0){\n \t\t\tchainValue = angular.copy(moveOri[4].set.value); // initial chainValue when first meet\n \t\t}\n \t\tif(isChain && chainValue.length > 2 && move[0].setTurn===undefined){ // end Match\n \t\t\tmove[0] = {setTurn:{turnIndex: $scope.turnIndex}};\n \t\t}\n \t\tif(isChain && chainValue.length > 2 && move[0].setTurn!==undefined){ // normal\n \t\t\tmove[0].setTurn.turnIndex = $scope.turnIndex;\n \t\t}\t\n \t\tif(isChain){ // change the shape of move\n \t\t\tvar row = move[2].set.value.row;\n \t\t\tvar col = move[2].set.value.col;\n \t\t\tmove[1].set.value[row][col] = 'a';\n \t\t\tmove[1].set.value[chainValue[1][0]][chainValue[1][1]] = $scope.turnIndex===0? 'O' : 'X';\n \t\t\tmove[1].set.value[chainValue[0][0]][chainValue[0][1]] = 'a';\n \t\t\tmove[2].set.value.oldrow = chainValue[0][0];\n \t\t\tmove[2].set.value.oldcol = chainValue[0][1];\n \t\t\tmove[2].set.value.row = chainValue[1][0];\n \t\t\tmove[2].set.value.col = chainValue[1][1];\n \t\t}\n \t\tif(chainValue.length > 2){\n \t\t\tchainValue.reverse();\n \t\t\tchainValue.pop();\n \t\t\tchainValue.reverse();\t\n \t\t}else{\n \t\tmoveOri[3].set.value = false;\n \t\tmove[0] = moveOri[0];\n \t\tisChain = false;\n \t\tchainValue = [];\n \t\t}\n \t\tsetAll();\t\n \t\t$timeout(function(){\n \t\t\tconsole.log(\"timeout happens! \");\n \t\t\tgameService.makeMove(move);},500);\n \t\t\n \t\t\n }", "move() {\n }", "function update() {\n\tframes++;\n\n\t// changing direction of the snake depending on which keys\n\t// that are pressed\n\tif (keystate[KEY_LEFT] && snake.direction !== RIGHT) {\n\t\tsnake.direction = LEFT;\n\t}\n\tif (keystate[KEY_UP] && snake.direction !== DOWN) {\n\t\tsnake.direction = UP;\n\t}\n\tif (keystate[KEY_RIGHT] && snake.direction !== LEFT) {\n\t\tsnake.direction = RIGHT;\n\t}\n\tif (keystate[KEY_DOWN] && snake.direction !== UP) {\n\t\tsnake.direction = DOWN;\n\t}\n\n\t// each five frames update the game state.\n\tif (frames%5 === 0) {\n\t\t// pop the last element from the snake queue i.e. the\n\t\t// head\n\t\tvar nx = snake.last.x;\n\t\tvar ny = snake.last.y;\n\n\t\t// updates the position depending on the snake direction\n\t\tswitch (snake.direction) {\n\t\t\tcase LEFT:\n\t\t\t\tnx--;\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tny--;\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tnx++;\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\tny++;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// checks all gameover conditions\n\t\tif (0 > nx || nx > grid.width-1 ||\n\t\t\t0 > ny || ny > grid.height-1 ||\n\t\t\tgrid.get(nx, ny) === SNAKE\n\t\t) {\n\t\t\treturn init();\n\t\t}\n\n\t\t// check wheter the new position are on the fruit item\n\t\tif (grid.get(nx, ny) === FRUIT) {\n\t\t\t// increment the score and sets a new fruit position\n\t\t\tscore++;\n\t\t\tsetFood();\n\t\t} else {\n\t\t\t// take out the first item from the snake queue i.e\n\t\t\t// the tail and remove id from grid\n\t\t\tvar tail = snake.remove();\n\t\t\tgrid.set(EMPTY, tail.x, tail.y);\n\t\t}\n\n\t\t// add a snake id at the new position and append it to \n\t\t// the snake queue\n\t\tgrid.set(SNAKE, nx, ny);\n\t\tsnake.insert(nx, ny);\n\t}\n}", "moveSnake(){\r\n switch (this.snakeDirection) {\r\n case this.left:\r\n --this.snakeHeadPosition;\r\n const snakeOnLeft = this.snakeHeadPosition % this.row === this.row - 1 || this.snakeHeadPosition < 0;\r\n if (snakeOnLeft) {\r\n this.snakeHeadPosition = this.snakeHeadPosition + this.row;\r\n }\r\n break;\r\n case this.up:\r\n this.snakeHeadPosition = this.snakeHeadPosition - this.row;\r\n const snakeOnUp = this.snakeHeadPosition < 0;\r\n if (snakeOnUp) {\r\n this.snakeHeadPosition = this.snakeHeadPosition + this.containerRow;\r\n }\r\n break;\r\n case this.right:\r\n ++this.snakeHeadPosition;\r\n const snakeOnRight = this.snakeHeadPosition % this.row === 0;\r\n if (snakeOnRight) {\r\n this.snakeHeadPosition = this.snakeHeadPosition - this.row;\r\n }\r\n break;\r\n case this.down:\r\n this.snakeHeadPosition = this.snakeHeadPosition + this.row;\r\n const snakeOnDown = this.snakeHeadPosition > this.containerRow - 1;\r\n if (snakeOnDown) {\r\n this.snakeHeadPosition = this.snakeHeadPosition - this.containerRow;\r\n }\r\n break;\r\n default: break;\r\n }\r\n\r\n let nextSnakeHeadPixel = gameBoard[this.snakeHeadPosition];\r\n\r\n // if snake it bites itself:\r\n if (nextSnakeHeadPixel.classList.contains(\"snakeBodyPixel\")) {\r\n clearInterval(this.moveSnakeInterval);\r\n window.location.reload();\r\n }\r\n\r\n nextSnakeHeadPixel.classList.add(\"snakeBodyPixel\");\r\n\r\n setTimeout(() => {\r\n nextSnakeHeadPixel.classList.remove(\"snakeBodyPixel\");\r\n }, this.snakeLength);\r\n\r\n // Eat food.\r\n if (this.snakeHeadPosition === this.foodPosition) {\r\n this.snakeLength = this.snakeLength + 100;\r\n this.createFood();\r\n }\r\n }", "move() { }", "move() { }", "function moveSnake(direction) {\n // get y, x coordinates of head cell\n let [y, x] = snake[0].split(\"-\").map(Number);\n\n // get y.x of new head from the direction\n if (direction === \"UP\") y -= 1;\n else if (direction === \"DOWN\") y += 1;\n else if (direction === \"LEFT\") x -= 1;\n else if (direction === \"RIGHT\") x += 1;\n\n // check for crash into wall\n if (x < 0 || x >= NCOLS || y < 0 || y >= NROWS) {\n return endGame(\"Game over: crashed into wall\");\n }\n\n // draw the new head\n let newHead = y + \"-\" + x;\n setCellStyle(\"snake\", newHead);\n\n // if new head collides with snake, end game\n if (snake.includes(newHead)) {\n return endGame(\"Game over: crashed into self\");\n }\n\n // add new head to start of snake\n snake.unshift(newHead);\n\n // handle eating/not eating a pellet\n if (pellets.delete(newHead)) {\n // ate pellet: don't delete tail (snake grows), replace pellet\n addPellet();\n } else {\n // didn't eat pellet: pop off tail & remove style from table cell\n setCellStyle(null, snake.pop());\n }\n}", "move() {\n if (this.crashed) {\n return;\n }\n if (this.direction == 1) {\n this.y -= settings.step;\n }\n else if (this.direction == 2) {\n this.x += settings.step;\n }\n else if (this.direction == 3) {\n this.y += settings.step;\n }\n else if (this.direction == 4) {\n this.x -= settings.step;\n }\n }", "function swapDown(state) {\n let blankPOS = findBlankCell(state)\n return swap(state, { y: blankPOS.y + 1, x: blankPOS.x })\n}", "function tryToMove (direction) {\r\n\t\r\n\t// location before move\r\n\tlet oldLocation = currentLocationOfHorse;\r\n\r\n\t// class of location before move\r\n\tlet oldClassName = gridBoxes[oldLocation].className;\r\n\r\n\tlet nextLocation = 0;\t// location we wish to move to\r\n\t//let nextClass = \"\"; \t// class of location we wish to move to\r\n\r\n\tlet nextLocation2 = 0;\r\n\tlet nextClass2 = \"\";\r\n\r\n\tlet newClass = \"\"; \t// new class to switch to if move successful\r\n\t\r\n\tnextClass = gridBoxes[nextLocation].className;\r\n\t\r\n\tswitch (direction) {\r\n\t\tcase \"left\" : \r\n\t\t\tnextLocation = currentLocationOfHorse - 1; \r\n\t\t\tbreak;\r\n\r\n\t\tcase \"right\" : \r\n\t\t\tnextLocation = currentLocationOfHorse + 1;\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"up\" : \r\n\t\t\tnextLocation = currentLocationOfHorse - widthOfBoard;\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"down\" : \r\n\t\t\tnextLocation = currentLocationOfHorse + widthOfBoard;\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"none\":\r\n\t\t\tnextLocation = currentLocationOfHorse;\r\n\t\t\treturn;\r\n\t} // switch\r\n\r\n\t\tnextClass = gridBoxes[nextLocation].className;\r\n\r\n\tif (gameOn == true && onFence == false) {\t\r\n\t\t// if the obstacle is not passable, don't move\r\n\t\tif (noPassObstacles.includes(nextClass)) { return; };\r\n\r\n\t\t// if it's a fence, and there's no rider, don't move\r\n\t\tif (!riderOn && nextClass.includes(\"fence\")) { return; };\r\n\r\n\t\t// if there's a fence, move 2 spaces with animation\r\n\t\t\tif (nextClass.includes(\"fence\")) {\r\n\r\n\t\t\t\t// rider must be on to jump\r\n\t\t\t\tif (riderOn) {\r\n\r\n\t\t\t\t\tgridBoxes[currentLocationOfHorse].className = \"\";\r\n\t\t\t\t\toldClassName = gridBoxes[nextLocation].className;\r\n\r\n\t\t\t\t\t// set values according to direction\r\n\t\t\t\t\tif (direction == \"left\") {\r\n\t\t\t\t\t\tnextClass = \"jumpleft\";\r\n\t\t\t\t\t\tnextClass2 = \"horserideleft\";\r\n\t\t\t\t\t\tnextLocation2 = nextLocation - 1;\r\n\t\t\t\t\t} else if (direction == \"right\") {\r\n\t\t\t\t\t\tnextClass = \"jumpright\";\r\n\t\t\t\t\t\tnextClass2 = \"horserideright\";\r\n\t\t\t\t\t\tnextLocation2 = nextLocation + 1;\r\n\t\t\t\t\t} else if (direction == \"up\") {\r\n\t\t\t\t\t\tnextClass = \"jumpup\";\r\n\t\t\t\t\t\tnextClass2 = \"horserideup\";\r\n\t\t\t\t\t\tnextLocation2 = nextLocation - widthOfBoard;\r\n\t\t\t\t\t} else if (direction == \"down\") {\r\n\t\t\t\t\t\tnextClass = \"jumpdown\";\r\n\t\t\t\t\t\tnextClass2 = \"horseridedown\";\r\n\t\t\t\t\t\tnextLocation2 = nextLocation + widthOfBoard;\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t// show horse jumping\r\n\t\t\t\t\tgridBoxes[nextLocation].className = nextClass;\r\n\t\t\t\t\tonFence = true;\r\n\r\n\t\t\t\t\tsetTimeout (function() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// set jump back to just a fence\r\n\t\t\t\t\t\tgridBoxes[nextLocation].className = oldClassName;\r\n\r\n\t\t\t\t\t\t// update current location of the horse to be 2 spaces past take off\r\n\t\t\t\t\t\tcurrentLocationOfHorse = nextLocation2;\r\n\r\n\t\t\t\t\t\t// get class of box after jump\r\n\t\t\t\t\t\tnextClass = gridBoxes[currentLocationOfHorse].className;\r\n\r\n\t\t\t\t\t\t// show horse and rider after landing\r\n\t\t\t\t\t\tgridBoxes[currentLocationOfHorse].className = nextClass2;\r\n\r\n\t\t\t\t\t\t// document.addEventListener(\"keydown\", e);\r\n\r\n\t\t\t\t\t\t// if next box is a flag, go up a level\r\n\t\t\t\t\t\tlevelUp(nextClass);\r\n\t\t\t\t\t\tonFence = false;\r\n\r\n\t\t\t\t\t}, 350); //350\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn; \r\n\r\n\t\t\t\t} // if rider on\r\n\r\n\t\t\t} // if class has fence\r\n\r\n\r\n\t\t// if there's a rider, add rider\r\n\t\tif (nextClass == \"rider\") {\r\n\t\t\triderOn = true;\r\n\t\t} // if\r\n\r\n\t\t// if there's a bridge in the old location, keep it\r\n\t\tif (oldClassName.includes(\"bridge\")) {\r\n\t\t\tgridBoxes[oldLocation].className = \"bridge\";\r\n\t\t} else {\r\n\t\t\tgridBoxes[oldLocation].className = \"\";\r\n\t\t} // else\r\n\r\n\t\t// build name of new class\r\n\t\tnewClass = (riderOn) ? \"horseride\" : \"horse\";\r\n\t\tnewClass += direction;\r\n\r\n\t\t// if there is a bridge in the next location, keep it\r\n\t\tif (gridBoxes[nextLocation].classList.contains(\"bridge\")) {\r\n\t\t\tnewClass += \" bridge\";\r\n\t\t}\r\n\r\n\t\t// move 1 space\r\n\t\tcurrentLocationOfHorse = nextLocation;\r\n\t\tgridBoxes[currentLocationOfHorse].className = newClass;\r\n\r\n\t\t// if it is an enemy\r\n\t\tif (nextClass.includes(\"enemy\")) {\r\n\t\t\tstopGame(\"hitEnemy\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// move up a level if needed\r\n\t\tlevelUp(nextClass);\r\n\t} // if GameOn\r\n} // tryToMove", "function snakeDirection(direction) {\n\n switch(direction) {\n\n case \"right\": \n \n // collision detection with right border\n if (snake[0].x >= canvas.width - unit) \n { \n gameOver();\n }\n else \n {\n // predefined function that adds a new object with new coordinates to the start of the snake array\n snake.unshift({ x: snake[0].x += unit, y: snake[0].y});\n }\n break;\n\n case \"down\": \n\n // collision detection with bottom border\n if (snake[0].y >= canvas.height - unit)\n {\n gameOver();\n }\n else \n {\n snake.unshift({ x: snake[0].x, y: snake[0].y += unit});\n }\n break;\n\n case \"up\": \n \n // collision detection with upper border, which in this case is the score line, not the canvas border\n if (snake[0].y === upperCollision) \n {\n gameOver();\n }\n else \n {\n snake.unshift({ x: snake[0].x, y: snake[0].y -= unit});\n }\n break;\n\n case \"left\": \n \n // collision detection with left border\n if (snake[0].x === 0) \n {\n gameOver();\n }\n else \n {\n snake.unshift({ x: snake[0].x -= unit, y: snake[0].y});\n }\n break;\n }\n}", "function control(e) {\r\n squares[currentIndex].classList.remove(\"snake\") //REMOVES THE CLASS OF SNAKE\r\n\r\n if (e.keyCode === 39){\r\n direction = 1 // RIGHT ARROW MOVES SNAKE RIGHT 1 DIV\r\n } else if (e.keyCode === 38){\r\n direction = -width // UP ARROW MOVES SNAKE UP BY MAKING SNAKE GO BACK 10 DIVS\r\n } else if(e.keyCode === 37){\r\n direction = -1 // LEFT ARROW MOVES SNAKE LEFT 1 DIV\r\n } else if(e.keyCode === 40){\r\n direction = +width //DOWN MOVES SNAKE DOWN BY 10 DIVS FROM CURRENT POSITION \r\n }\r\n }", "function handleKeyUp(event) {\n if (event.keyCode === 38) {\n // set direction to UP\n snake.updateDirection(0,-1);\n } else if (event.keyCode === 40) {\n // set direction to DOWN\n snake.updateDirection(0,1);\n } else if (event.keyCode === 37) {\n // set direction to LEFT\n snake.updateDirection(-1,0);\n } else if (event.keyCode === 39) {\n // set direction to RIGHT\n snake.updateDirection(1,0);\n }\n // REFERENCE FOR DIRECTIONS:\n // UP: xDirection: 0, yDirection: -1\n // DOWN: xDirection: 0, yDirection: 1\n // LEFT: xDirection: -1, yDirection: 0\n // RIGHT: xDirection: 1, yDirection: 0\n}", "function control(e) {\n //removing snake from a square\n squares[currentIndex].classList.remove('snake')\n\n //movement of the snake\n if(e.keyCode === 39) {\n direction = 1 // move the snake to the right if right arrow is pressed\n } else if (e.keyCode === 38) {\n direction = -width // move the snake up one width if the up arrow is pressed\n } else if (e.keyCode === 37) {\n direction = -1 // move the snake to the left if left arrow is pressed\n } else if (e.keyCode === 40) {\n direction = width // if down arrow is pressed move the snake down one width\n }\n\n\n }", "function keyPressed() {\n if(keyCode === UP_ARROW) {\n \tsnake.direction(0,-1);\n }\n if(keyCode === DOWN_ARROW) {\n \tsnake.direction(0,1);\n }\n if(keyCode === LEFT_ARROW) {\n \tsnake.direction(-1,0);\n }\n if(keyCode === RIGHT_ARROW) {\n \tsnake.direction(1,0);\n }\n \n}", "function move(dir)\n{\n //airconsole.message(AirConsole.SCREEN, { move: amount })\n airconsole.message(AirConsole.SCREEN, { direction: dir });\n $(\".arrow\").removeClass(\"active\");\n if (dir != 'S') {\n $(\".arrow\" + dir).addClass(\"active\");\n }\n}", "function change_direction(event){\r\n const LEFT_KEY = 37;\r\n const RIGHT_KEY = 39;\r\n const UP_KEY = 38;\r\n const DOWN_KEY = 40;\r\n \r\n // Prevent the snake from reversing\r\n // change these values depending on the difficulty.\r\n if (changing_direction) return;\r\n changing_direction = true;\r\n const keyPressed = event.keyCode;\r\n const goingUp = dy === -10;\r\n const goingDown = dy === 10;\r\n const goingRight = dx === 10;\r\n const goingLeft = dx === -10;\r\n if (keyPressed === LEFT_KEY && !goingRight) {\r\n dx = -10;\r\n dy = 0;\r\n }\r\n if (keyPressed === UP_KEY && !goingDown) {\r\n dx = 0;\r\n dy = -10;\r\n }\r\n if (keyPressed === RIGHT_KEY && !goingLeft) {\r\n dx = 10;\r\n dy = 0;\r\n }\r\n if (keyPressed === DOWN_KEY && !goingUp) {\r\n dx = 0;\r\n dy = 10;\r\n }\r\n\r\n}", "up () {\n let first = this.props.game.getTileList();\n this.props.game.board.moveTileUp();\n let second = this.props.game.getTileList();\n if (this.moveWasLegal(first, second) === false) {\n this.updateBoard();\n return;\n } else {\n this.props.game.placeTile();\n this.updateBoard();\n }\n }", "function santaMoving(e) {\n if (e.code===\"ArrowLeft\") {state.santa.x-=5;\n } else if(e.code===\"ArrowRight\") {state.santa.x+=5;\n }\n\n drawSanta(ctx,image);\n }", "function giveMove(snake)\n{\n\tvar func = function()\n\t{\n\t\tvar head = snake.body[0];\n\t\tfor(var i = snake.body.length-1; i != 0; i--)\n\t\t{\n\t\t\tsnake.body[i].x = snake.body[i-1].x;\n\t\t\tsnake.body[i].y = snake.body[i-1].y;\n\t\t}\n\t\thead.add(snake.direction);\n\t}\n\treturn func;\n}", "function make_move() {\n\n // get state of board this turn\n var board = get_board(),\n\n // get my position\n myX = get_my_x(),\n myY = get_my_y(),\n\n // get opponents position\n hisX = get_opponent_x(),\n hisY = get_opponent_y();\n\n get_current_counts();\n\n // if we found an item and it isn't dead\n if (board[myX][myY] > 0 && !deadFruits[board[myX][myY]]) {\n return TAKE;\n }\n\n var rand = Math.random() * 10;\n\n if (rand < 1) return NORTH;\n if (rand < 2) return SOUTH;\n if (rand < 3) return EAST;\n if (rand < 4) return WEST;\n\n return move_toward(hisX, hisY);\n}", "function oneMove() {\n for (var i = snake.length - 1; i >= 0; i--) {\n if (i === 0) {\n snake[0].position = createVector(offsetX, offsetY);\n } else {\n snake[i].position = createVector(snake[i - 1].position.x, snake[i - 1].position.y)\n }\n }\n}", "function onKeyDown(key_pressed) {\n if (key_pressed === ARROW_DOWN && snake.direction !== UP) {\n snake.direction = DOWN;\n }\n if (key_pressed === ARROW_UP && snake.direction !== DOWN) {\n snake.direction = UP;\n } \n if (key_pressed === ARROW_RIGHT && snake.direction !== LEFT) { \n snake.direction = RIGHT;\n }\n if (key_pressed === ARROW_LEFT && snake.direction !== RIGHT) { \n snake.direction = LEFT;\n } \n}", "changeDirection(newCode) {\r\n if (newCode === this.snakeDirection) return;\r\n\r\n if (newCode === this.left && this.snakeDirection != this.right) {\r\n this.snakeDirection = newCode;\r\n } else if (newCode === this.up && this.snakeDirection != this.down) {\r\n this.snakeDirection = newCode;\r\n } else if (newCode === this.right && this.snakeDirection != this.left) {\r\n this.snakeDirection = newCode;\r\n } else if (newCode === this.down && this.snakeDirection != this.up) {\r\n this.snakeDirection = newCode;\r\n }\r\n }", "function MakeMove (move)\n{\n\t//Extracting information from the move number\n\tlet from = FROMSQ(move);\n\tlet to = TOSQ(move);\n\tlet side = GameBoard.side;\n\t\n\tGameBoard.history[GameBoard.hisPly].posKey = GameBoard.posKey;\n\t\n\t//Checking flags\n\t\n\t//en passant case\n\tif ((move & MFLAGEP) != 0)\n\t{\n\t\tif (side == COLORS.WHITE)\n\t\t{\n\t\t\t//Remove the pawn we've 'captured'\t\n\t\t\tClearPiece(to - 10);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//Remove the pawn we've 'captured'\t\n\t\t\tClearPiece(to + 10);\n\t\t}\n\t}\n\t//castling case\n\telse if ((move & MFLAGCA) != 0)\n\t{\n\t\tswitch (to)\n\t\t{\n\t\t\tcase SQUARES.C1:\n\t\t\t\tMovePiece(SQUARES.A1, SQUARES.D1);\n\t\t\t\tbreak;\n\t\t\tcase SQUARES.C8:\n\t\t\t\tMovePiece(SQUARES.A8, SQUARES.D8);\n\t\t\t\tbreak;\n\t\t\tcase SQUARES.G1:\n\t\t\t\tMovePiece(SQUARES.H1, SQUARES.F1);\n\t\t\t\tbreak;\n\t\t\tcase SQUARES.G8:\n\t\t\t\tMovePiece(SQUARES.H8, SQUARES.F8);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconsole.error(\"Castling to an invalid square\");\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t//If there was an en passant square, we need to reset it (hash it out), because this\n\t//square is reset every turn\n\tif (GameBoard.enPas != SQUARES.NO_SQ)\n\t{\n\t\tHASH_EP();\n\t}\n\t\n\t//I'm not sure why this is here but BFS put it in\n\tHASH_CA();\n\t\n\t//Updating the history table\n\tGameBoard.history[GameBoard.hisPly].move = move;\n\tGameBoard.history[GameBoard.hisPly].fiftyMove = GameBoard.fiftyMove;\n\tGameBoard.history[GameBoard.hisPly].enPas = GameBoard.enPas;\n\tGameBoard.history[GameBoard.hisPly].castlePerm = GameBoard.castlePerm;\n\t\n\t//Handling castling perm, if a square to where a rook or king is, we hash out those values\n\t//Most values are 15, or 1111 in binary (the identity value)\n\tGameBoard.castlePerm &= CastlePerm[from];\n\tGameBoard.castlePerm &= CastlePerm[to];\n\tGameBoard.enPas = SQUARES.NO_SQ;\n\t\n\t//Update castlePerms\n\tHASH_CA();\n\t\n\t//Now we remove the captured piece\n\tlet captured = CAPTURED(move);\n\tGameBoard.fiftyMove++;\t\t\t\t//increasing the move since last capture\n\t\n\tif (captured != PIECES.EMPTY)\n\t{\n\t\tClearPiece(to);\n\t\tGameBoard.fiftyMove = 0;\t\t//if a piece was captured, reset fifty-move timer\n\t}\n\t\n\tGameBoard.hisPly++;\n\tGameBoard.ply++;\n\t\n\tif (PiecePawn[GameBoard.pieces[from]] == BOOL.TRUE)\n\t{\n\t\tGameBoard.fiftyMove = 0;\t\t//if a pawn move, we also reset fifty-move timer\n\t\tif ((move & MFLAGPS) != 0)\n\t\t{\n\t\t\t//If pawn starting move, set en passant square\t\n\t\t\tif (side == COLORS.WHITE)\n\t\t\t{\n\t\t\t\tGameBoard.enPas = from + 10;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tGameBoard.enPas = from - 10;\n\t\t\t}\n\t\t\t//Hash in the en passant to the position key\n\t\t\tHASH_EP();\n\t\t}\n\t}\n\t\n\t//Most special cases have been handled, now we actually move the piece\n\tMovePiece(from, to);\n\t\n\t//Last special case, promotion. Needs to be after the piece is moved from obvious reasons\n\t\n\tif (PROMOTED(move) != PIECES.EMPTY)\n\t{\n\t\t//this is actually where the pawn currently resides, on the last or first rank\n\t\tClearPiece(to);\n\t\t//adding promoted piece\n\t\tAddPiece(to, PROMOTED(move));\n\t}\n\t\n\t//Switch side\n\tGameBoard.side ^= 1;\n\tHASH_SIDE();\n\t\n\t//Ensuring the king is not in check at the end of the move\n\tif (SqAttacked(GameBoard.pList[PCEINDEX(Kings[side], 0)], GameBoard.side))\n\t{\n\t\tTakeMove();\t\t\t//takes back a move if the king is in check\n\t\treturn BOOL.FALSE;\n\t}\n\telse \n\t{\n\t\treturn BOOL.TRUE;\n\t}\n}", "function control(e) {\n squares[currentIndex].classList.remove('snake') // removes the classlists for snake betwwen each move, prevents the snake from appearing to be left behind\n\n if(e.keyCode === 39) {\n direction = 1 //if we press the right arrow on our keyboard, the snake will go right one div in the grid\n } else if (e.keyCode === 38) {\n direction = -width // if we press the up arrow, the snake will go back ten divs, appearing to go up\n } else if (e.keyCode === 37) {\n direction = -1 // if we press left, the snake will go left one div in the grid\n } else if (e.keyCode === 40) {\n direction = +width //if we press down, the snake head will instantly appear in the div ten divs from where you are now\n }\n }", "function moveDown() {\n\n}", "function move() {\n //Pop out the tail cell and place it infront of the head cell\n var nx = snake_array[0].x;\n var ny = snake_array[0].y;\n\n //These were the position of the head cell.\n //We will increment it to get the new head position\n //Lets add proper direction based movement now\n updateDirection();\n if (current_direction == \"right\") nx++;\n else if (current_direction == \"left\") nx--;\n else if (current_direction == \"up\") ny--;\n else if (current_direction == \"down\") ny++;\n\n //Lets add the game over clauses now\n //This will restart the game if the snake hits the wall\n //Lets add the code for body collision\n //Now if the head of the snake bumps into its body, the game will restart\n if (_private.game.check_collision_vs_border(nx, ny) || _private.game.check_collision_vs_array(nx, ny, snake_array)) {\n is_alive = false;\n return;\n }\n\n //Lets write the code to make the snake eat the food\n //The logic is simple\n //If the new head position matches with that of the food,\n //Create a new head instead of moving the tail\n if (_private.game.check_collision_vs_array(nx, ny, [_private.game.get_food_coords()])) {\n var tail = {x: nx, y: ny};\n _private.game.inc_score();\n //Create new food\n _private.game.create_food();\n }\n else {\n var tail = snake_array.pop(); //pops out the last cell\n tail.x = nx;\n tail.y = ny;\n }\n //The snake can now eat the food.\n\n snake_array.unshift(tail); //puts back the tail as the first cell\n\n }", "function move() {\r\n if (downPressed) {\r\n if (playerYposition != 3) {\r\n playerYposition += 1;\r\n }\r\n setDownPressed(false);\r\n }\r\n if (upPressed) {\r\n if (playerYposition != 1) {\r\n playerYposition -= 1;\r\n }\r\n setUpPressed(false);\r\n }\r\n}", "function makeAutoMove(t) {\n moveSnake(direction);\n setAutoMoveTimer();\n}", "move(){\n\n this.charY = windowHeight - 200;\n if (this.state === \"right\") this.charX += 4;\n if (this.state === \"left\") this.charX -= 4;\n \n }", "function TakeMove ()\n{\n\t//Going back a move\n\tGameBoard.hisPly--;\n\tGameBoard.ply--;\n\t\n\t//Defining these for readability\n\tlet move = GameBoard.history[GameBoard.hisPly].move;\n\tlet from = FROMSQ(move);\n\tlet to = TOSQ(move);\n\t\n\t//En passant case, for \"undo\" case\n\tif (GameBoard.enPas != SQUARES.NO_SQ)\n\t{\n\t\tHASH_EP();\n\t}\n\t\n\tHASH_CA();\n\t\n\t//Using history array to restore these values\n\tGameBoard.castlePerm = GameBoard.history[GameBoard.hisPly].castlePerm;\n\tGameBoard.fiftyMove = GameBoard.history[GameBoard.hisPly].fiftyMove;\n\tGameBoard.enPas = GameBoard.history[GameBoard.hisPly].enPas;\n\t\n\t//En passant case, for actual move now\n\tif (GameBoard.enPas != SQUARES.NO_SQ)\n\t{\n\t\tHASH_EP();\n\t}\n\t\n\tHASH_CA();\n\t\n\t//Swapping side\n\tGameBoard.side ^= 1;\n\tHASH_SIDE();\n\t\n\t//Flag cases\n\t\n\t//En passant case\n\tif ((MFLAGEP & move) != 0)\n\t{\n\t\t//If last move was an en passant, we have to add back the pawn\n\t\tif (GameBoard.side == COLORS.WHITE)\n\t\t{\n\t\t\tAddPiece(to - 10, PIECES.bP);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tAddPiece(to + 10, PIECES.wP);\n\t\t}\n\t}\n\t//Castle case\n\telse if ((MFLAGCA & move) != 0)\n\t{\n\t\t//If we castled, we have to move the rook back\n\t\tswitch (to)\n\t\t{\n\t\t\tcase SQUARES.C1:\n\t\t\t\tMovePiece(SQUARES.D1, SQUARES.A1); \n\t\t\t\tbreak;\n\t\t\tcase SQUARES.C8: \n\t\t\t\tMovePiece(SQUARES.D8, SQUARES.A8); \n\t\t\t\tbreak;\n\t\t\tcase SQUARES.G1:\n\t\t\t\tMovePiece(SQUARES.F1, SQUARES.H1); \n\t\t\t\tbreak;\n\t\t\tcase SQUARES.G8: \n\t\t\t\tMovePiece(SQUARES.F8, SQUARES.H8); \n\t\t\t\tbreak;\n\t\t\tdefault: \n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t//Special cases handled, now we move the piece back, if a capture happened, we need to add that back too\n\t\n\tMovePiece (to, from);\n\t\n\t//Replace captured piece, if any\n\tif (CAPTURED(move) != PIECES.EMPTY)\n\t{\n\t\tAddPiece(to, CAPTURED(move));\n\t}\n\t\n\t//Delete promoted piece, if any\n\tif (PROMOTED(move) != PIECES.EMPTY)\n\t{\n\t\tClearPiece(from);\n\t\tAddPiece(from, PieceCol[PROMOTED(move)] == COLORS.WHITE ? PIECES.wP : PIECES.bP);\n\t}\n}", "function keyPressed() {\n if (keyCode === UP_ARROW) {\n snake.dir(\"UP\");\n } else if (keyCode === DOWN_ARROW) {\n snake.dir(\"DOWN\");\n } else if (keyCode === LEFT_ARROW) {\n snake.dir(\"LEFT\");\n } else if (keyCode === RIGHT_ARROW) {\n snake.dir(\"RIGHT\");\n }\n}", "function update() {\n if (ingame){\n if (direction == \"RIGHT\") snake.x = snake.x + 1;\n else if (direction == \"LEFT\") snake.x = snake.x - 1;\n else if (direction == \"UP\") snake.y = snake.y - 1;\n else if (direction == \"DOWN\") snake.y = snake.y + 1;\n\n check_borders();\n check_food();\n blank();\n paint_cell(food.x, food.y, \"abdbe3\");\n paint_cell(snake.x, snake.y, \"green\");\n }\n }", "function tryToMove(direction) {\r\n\r\n \r\n let oldLocation = currentLocationOfHorse; //location before move\r\n let oldClassName = gridBoxes[oldLocation].className; // class of location before move\r\n let nextLocation = 0; //location we wish to move to\r\n let nextClass = \"\"; //class of location we wish to move to\r\n let nextLocation2 = 0;\r\n let nextClass2 = \"\";\r\n let nextClass3 = \"\"; //class for bridge image\r\n let newClass = \"\"; //new class to switch to if move successful\r\n\r\n switch (direction) {\r\n \r\n case \"left\":\r\n nextLocation = currentLocationOfHorse - 1;\r\n break;\r\n\r\n case \"right\":\r\n nextLocation = currentLocationOfHorse + 1;\r\n break;\r\n\r\n case \"up\":\r\n nextLocation = currentLocationOfHorse - widthOfBoard;\r\n break;\r\n\r\n case \"down\":\r\n nextLocation = currentLocationOfHorse + widthOfBoard;\r\n break;\r\n } //switch\r\n nextClass = gridBoxes[nextLocation].className;\r\n\r\n //if the obstacle is not passable, don't move\r\n if (noPassObstacles.includes(nextClass)) {return;}\r\n\r\n //if it's a fence, and there is no rider, not move\r\n if (!riderOn && nextClass.includes(\"seaweed\")) {return;}\r\n\r\n // if there is a fence, move two spaces with animation\r\n if (nextClass.includes(\"seaweed\")) {\r\n \r\n // hat must be on to jump\r\n if (riderOn) {\r\n\t\t\tmove = false;\r\n gridBoxes[currentLocationOfHorse].className = \"\";\r\n oldClassName = gridBoxes[nextLocation].className;\r\n\r\n // set values according to direction\r\n if (direction == \"left\") {\r\n \r\n nextClass = \"fishleftsea\";\r\n nextClass2 = \"fishlefthat\";\r\n nextClass3 = \"fishleftbubbles\";\r\n \r\n nextLocation2 = nextLocation - 1;\r\n \r\n } else if (direction == \"right\") {\r\n\t\t\t\t\r\n nextClass = \"fishrightsea\";\r\n nextClass2 = \"fishrighthat\";\r\n nextClass3 = \"fishrightbubbles\";\r\n\r\n nextLocation2 = nextLocation + 1;\r\n\t\t\t\r\n } else if (direction == \"up\") {\r\n\t\t\t\t\r\n nextClass = \"fishupsea\";\r\n nextClass2 = \"fishuphat\";\r\n nextClass3 = \"fishupbubbles\";\r\n\r\n nextLocation2 = nextLocation - widthOfBoard;\r\n\t\t\t\t\r\n } else if (direction == \"down\") {\r\n\t\t\t\t\r\n nextClass = \"fishdownsea\";\r\n nextClass2 = \"fishdownhat\";\r\n nextClass3 = \"fishdownbubbles\";\r\n\r\n nextLocation2 = nextLocation + widthOfBoard;\r\n } //else if\r\n\r\n //error checking can't land on obstacle\r\n\t\t\tlet errorCheck = gridBoxes[nextLocation2].className;\r\n\t\t\tif(noPassObstacles.includes(errorCheck)){\r\n\t\t\t\treturn;\r\n\t\t\t}//if\r\n\t\t\t\r\n\t\t\tgridBoxes[currentLocationOfHorse].className = \"\";\r\n\t\t\toldClassName = gridBoxes[nextLocation].className;\r\n \r\n // show fish jumping\r\n gridBoxes[nextLocation].className = nextClass;\r\n\r\n setTimeout(function() {\r\n\r\n // set jump back to just a fence\r\n gridBoxes[nextLocation].className = oldClassName;\r\n\r\n // update current location of horse to be 2 spaces past take off\r\n currentLocationOfHorse = nextLocation2;\r\n\r\n //get class of box after jump\r\n nextClass = gridBoxes[currentLocationOfHorse].className;\r\n\r\n\r\n // show horse and rider after landing\r\n gridBoxes[currentLocationOfHorse].className = nextClass2;\r\n gridBoxes[currentLocationOfHorse].className = nextClass3;\r\n\r\n //if next box is a flag go up a level\r\n levelUp(nextClass);\r\n }, 350);\r\n return;\r\n } //rider\r\n } //if class has seaweed\r\n \r\n if(noPassObstacles.includes(gridBoxes[nextLocation2].className)){\r\n\t\t\t\treturn;\r\n }//if\r\n\r\n //if there is a rider, add rider\r\n if (nextClass == \"hat\") {\r\n riderOn = true;\r\n } //if\r\n\r\n //if there is a bridge in the old location keep it\r\n if (oldClassName.includes(\"bridge\")) {\r\n gridBoxes[oldLocation].className = \"bridge\";\r\n } else {\r\n gridBoxes[oldLocation].className = \"\";\r\n } //else\r\n\r\n // build name of new class\r\n newClass = (riderOn) ? \"fishhat\" : \"fish\";\r\n newClass3 = (riderOn) ? \"fishhatbubbles\" : \"fishbubbles\";\r\n newClass += direction;\r\n newClass3 += direction;\r\n\r\n // if there is a bridge in the next location , keep it\r\n if (gridBoxes[nextLocation].classList.contains(\"bridge\")) {\r\n newClass += \"bridge\";\r\n }\r\n\r\n //move 1 space\r\n currentLocationOfHorse = nextLocation;\r\n gridBoxes[currentLocationOfHorse].className = newClass;\r\n\r\n //if it is an enemy, end game\r\n if (nextClass.includes(\"shark\")) {\r\n \r\n document.getElementById(\"lose\").style.display = \"block\"\r\n currentLevel = newGame;\r\n window.clearInterval(currentAnimation);\r\n window.clearInterval(currentAnimation2);\r\n endGame = false;\r\n \r\n return;\r\n }//if\r\n\r\n //move up to next level if needed\r\n levelUp(nextClass);\r\n\r\n} //trytoMove", "function BeginMoveState()\n{\n\t$.Msg('BMS');\n\tvar order = {\n\t\tOrderType : dotaunitorder_t.DOTA_UNIT_ORDER_MOVE_TO_POSITION,\n\t\tPosition : [0, 0, 0],\n\t\tQueue : OrderQueueBehavior_t.DOTA_ORDER_QUEUE_NEVER,\n\t\tShowEffects : false\n\t};\n\n\tvar localHeroIndex = Players.GetPlayerHeroEntityIndex( Players.GetLocalPlayer() );\n\tvar isRanged = (Abilities.GetBehavior( Entities.GetAbility( localHeroIndex, 10 ) ) & DOTA_ABILITY_BEHAVIOR.DOTA_ABILITY_BEHAVIOR_POINT) !== 0;\n\n\tinAction = true;\n\n\t(function tic()\n\t{\n\t\tif ( GameUI.IsMouseDown( 0 ) )\n\t\t{\n\t\t\tif (GameUI.IsShiftDown() && isRanged){\n\t\t\t\tBeginRangedAttack(null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (GameUI.IsControlDown()){\n\t\t\t\torder.OrderType = dotaunitorder_t.DOTA_UNIT_ORDER_MOVE_TO_DIRECTION;\n\t\t\t\tvar abil = Entities.GetAbility( localHeroIndex, 4 )\n\t\t\t\t$.Msg(Abilities.GetAbilityName(abil));\n\t\t\t\tif (!Abilities.IsPassive(abil) && Abilities.IsCooldownReady(abil) && !Abilities.IsInAbilityPhase(abil)){\n\t\t\t\t\torder = {\n\t\t\t\t\t\tOrderType : dotaunitorder_t.DOTA_UNIT_ORDER_CAST_NO_TARGET,\n\t\t\t\t\t\tAbilityIndex : abil,\n\t\t\t\t\t\tQueue : false,\n\t\t\t\t\t\tShowEffects : false\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\torder.OrderType = dotaunitorder_t.DOTA_UNIT_ORDER_MOVE_TO_POSITION;\n\t\t\t}\n\n\t\t\t$.Schedule( 1.0/30.0, tic );\n\t\t\tvar mouseWorldPos = GameUI.GetScreenWorldPosition( GameUI.GetCursorPosition() );\n\t\t\tif ( mouseWorldPos !== null )\n\t\t\t{\n\t\t\t\torder.Position = mouseWorldPos;\n\t\t\t\thasMoved = true;\n\t\t\t\tGame.PrepareUnitOrders( order );\n\t\t\t}\n\t\t}\n\t\telse{ inAction = false;} \n\t})();\n}", "function Snake() {\n\n\t\tthis.direction = RIGHT;\n\t\tthis.snakePieces = new Array();\n\n\t\t// End of Array, is actually beginning of snake\n\t\tthis.snakePieces.push(new SnakePiece(STARTING_CENTER - 2,STARTING_CENTER));\n\t\tthis.snakePieces.push(new SnakePiece(STARTING_CENTER - 1,STARTING_CENTER));\n\t\tvar head = new SnakePiece(STARTING_CENTER,STARTING_CENTER);\n\t\thead.color = SNAKE_HEAD_COLOR;\n\t\tthis.snakePieces.push(head);\n\n\t\t// Draws the snake to the board\n\t\tthis.draw = function(){\n\t\t\t\n\t\t\tfor (var i = 0; i < this.snakePieces.length; i++) {\n\t\t\t\tthis.snakePieces[i].draw();\n\t\t\t}\n\t\t}\n\n\t\tthis.move = function(){\n\n\t\t\t// Get the piece at the beginning, push it on the front of the array\n\t\t\t// Change its position based on direction\n\t\t\tvar back = new SnakePiece(this.snakePieces[0].position.x, this.snakePieces[0].position.y);\n\t\t\tback.position.x = this.snakePieces[this.snakePieces.length - 1].position.x;\n\t\t\tback.position.y = this.snakePieces[this.snakePieces.length - 1].position.y;\n\t\t\tback.position.x += this.direction.x;\n\t\t\tback.position.y += this.direction.y;\n\n\t\t\tif (canGoThroughWalls) {\n\t\t\t\tcanGoThroughWalls = false;\n\t\t\t\tif (this.hitsWall(back.position.x,back.position.y)) {\n\t\t\t\t\tif (back.position.x > BOARD_SIZE - 1) { // Hit right side\n\t\t\t\t\t\tback.position.x = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (back.position.x < 0) { // Hit left side\n\t\t\t\t\t\tback.position.x = BOARD_SIZE - 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (back.position.y > BOARD_SIZE - 1) { // Hit bottom\n\t\t\t\t\t\tback.position.y = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (back.position.y < 0) {\n\t\t\t\t\t\tback.position.y = BOARD_SIZE - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcanGoThroughWalls = true;\n\t\t\t}\n\n\t\t\tresetColor(this.snakePieces);\n\t\t\tback.color = SNAKE_HEAD_COLOR;\n\t\t\tthis.snakePieces.push(back);\n\n\t\t\t// Check if I eat a food\n\t\t\tif (CUR_FOOD.position.x == back.position.x && CUR_FOOD.position.y == back.position.y) {\n\n\t\t\t\t// We need to create a new food\n\t\t\t\t// We don't remove first piece, so snake grows longer\n\t\t\t\tvisible_pieces.splice(visible_pieces.indexOf(CUR_FOOD));\n\t\t\t\tCUR_FOOD = generateRandomFood();\n\t\t\t\tvisible_pieces.push(CUR_FOOD);\n\t\t\t\t$scope.score++;\n\t\t\t\t$scope.$apply();\n\n\t\t\t\t// Speed up\n\t\t\t\tif (GAME_SPEED > MAX_SPEED)\n\t\t\t\t\tGAME_SPEED -= SPEED_CHANGE_INTERVAL;\n\n\t\t\t} else {\n\n\t\t\t\t// Remove first piece\n\t\t\t\tthis.snakePieces.shift();\n\t\t\t}\n\n\t\t\t// Check if hits wall or hits itself\n\t\t\tvar newx = back.position.x;\n\t\t\tvar newy = back.position.y;\n\t\t\tif (this.hitsWall(newx,newy) || this.hitsSelf(newx,newy)) {\n\n\t\t\t\t$scope.gameover = true;\n\t\t\t\t$scope.$apply();\n\t\t\t\t// POSSIBLE MORE CODE FOR GAMEOVER\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tthis.hitsWall = function(x,y) {\n\n\t\t\tif (canGoThroughWalls)\n\t\t\t\treturn false;\n\n\t\t\treturn (x < 0 || x > BOARD_SIZE - 1 || y > BOARD_SIZE - 1 || y < 0);\n\t\t}\n\n\t\tthis.hitsSelf = function(x,y) {\n\n\t\t\tfor (var i = this.snakePieces.length - 2; i >= 0; i--) {\n\n\t\t\t\tif (this.snakePieces[i].position.x == x && this.snakePieces[i].position.y == y)\n\t\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}", "function takeABlindMove(turn) { ... }", "function makeMove() {\n grid = makeAMove(grid);\n myMove = false;\n updateMove();\n}", "function update() {\n\tframes++;\n\n//changes snake direction\n//However, cannot turn-around when opposite key of previous keypressed is pressed\n\tif (keystate[keyLeft] && snake.direction != right) {\n\t\tsnake.direction = left;\n\t}\n\tif (keystate[keyUp] && snake.direction != down) {\n\t\tsnake.direction = up;\n\t}\n\tif (keystate[keyRight] && snake.direction != left) {\n\t\tsnake.direction = right;\n\t}\n\tif (keystate[keyDown] && snake.direction != up) {\n\t\tsnake.direction = down;\n\t}\n\t\n\t//updates speed of snake for every 3 points\n\tif(score%3 == 0 && speed > 2 && speedCheck%2 == 0){\n\t\tspeed--;\n\t\tspeedCheck--;\n\t}\n\t\n\t//updates game and speed of snake\n\tif (frames%speed == 0) {\n\t\t\n\t\t//pops head from queue\n\t\tvar snakeX = snake.last.x;\n\t\tvar snakeY = snake.last.y;\n\n\t\t//moves snake position\n\t\tswitch (snake.direction) {\n\t\t\tcase left:\n\t\t\t\tsnakeX--;\n\t\t\t\tbreak;\n\t\t\tcase up:\n\t\t\t\tsnakeY--;\n\t\t\t\tbreak;\n\t\t\tcase right:\n\t\t\t\tsnakeX++;\n\t\t\t\tbreak;\n\t\t\tcase down:\n\t\t\t\tsnakeY++;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//checks to see if game over when snake collides with wall\n\t\tif (0 > snakeX || snakeX > grid.w-1 || 0 > snakeY || snakeY > grid.h-1 || grid.get(snakeX, snakeY) == snakeFill) {\n\t\t\treturn init();\n\t\t}\n\t\t\n\t\t//updates score when collision between food and snake\n\t\tif (grid.get(snakeX, snakeY) == foodFill) {\n\t\t\tscore++;\n\t\t\tspeedCheck++;\n\t\t\tsetFood();\n\t\t} \n\t\t//if no food collision, tail taken and given new position\n\t\telse {\n\t\t\tvar tail = snake.remove();\n\t\t\tgrid.set(emptyFill, tail.x, tail.y);\n\t\t}\n\t\tgrid.set(snakeFill, snakeX, snakeY);\n\t\tsnake.insert(snakeX, snakeY);\n\t}\n}", "function keyPressed(e){\n\t\tif(e.key==\"ArrowRight\"){\n\t\t\tsnake.direction=\"right\";\n\t\t}\n\t\telse if(e.key==\"ArrowLeft\"){\n\t\t\tsnake.direction=\"left\";\n\t\t}\n\t\telse if(e.key==\"ArrowDown\"){\n\t\t\tsnake.direction=\"down\";\n\t\t}\n\t\telse if(e.key==\"ArrowUp\"){\n\t\t\tsnake.direction=\"up\" ;\n\t\t}\n\t\tconsole.log(snake.direction);\n\t}", "function updateAll()\n{\n // move the snake\n var sl = snake.length - 1; \n snake.push({x: snake[sl].x + dx, y: snake[sl].y + dy});\n snake.shift(); \n}", "function stateLord(){\n if(state === 1 && shipX < 0 && waveHit < 11 || state === 0 && shipX < 0 && waveHit < 11){\n state = 2;\n shipX = width - 100;\n }\n else if(state === 2 && shipX > width || state === 3 && shipX > width || state === 4 && shipX > width || state === 5 && shipX > width || state === 6 && shipX > width || state === 7 && shipX > width || state === 8 && shipX > width){\n if(goingForward){\n state = 1;\n }\n else if(!goingForward){\n state = 0;\n }\n shipX = 100;\n currentTooStrong = false;\n }\n else if(state === 2 && shipX > width || state === 3 && shipX > width || state === 4 && shipX > width || state === 5 && shipX > width || state === 6 && shipX > width || state === 7 && shipX > width || state === 8 && shipX > width){\n state = 1;\n shipX = 100;\n currentTooStrong = false;\n }\n else if(state === 1 && shipX < 0 && waveHit > 10 && waveHit < 21 || state === 0 && shipX < 0 && waveHit > 55){\n state = 3;\n shipX = width - 100;\n }\n else if(state === 1 && shipX < 0 && waveHit > 20 && waveHit < 31 || state === 0 && shipX < 0 && waveHit > 55){\n state = 4;\n shipX = width - 100;\n }\n else if(state === 1 && shipX < 0 && waveHit > 30 && waveHit < 41 || state === 0 && shipX < 0 && waveHit > 55){\n state = 5;\n shipX = width - 100;\n }\n else if(state === 1 && shipX < 0 && waveHit > 40 && waveHit < 51 || state === 0 && shipX < 0 && waveHit > 55){\n state = 6;\n shipX = width - 100;\n }\n else if(state === 1 && shipX < 0 && waveHit > 50 && waveHit < 56 || state === 0 && shipX < 0 && waveHit > 55){\n state = 7;\n shipX = width - 100;\n }\n else if(state === 1 && shipX < 0 && waveHit > 55 || state === 0 && shipX < 0 && waveHit > 55){\n state = 8;\n shipX = width - 100;\n }\n}", "function updateDirection() {\n if(pressedKeys[KEY.ONE_LEFT] && snake1.heading != RIGHT) {\n snake1.heading = LEFT;\n }\n if(pressedKeys[KEY.ONE_UP] && snake1.heading != DOWN) {\n snake1.heading = UP;\n }\n if(pressedKeys[KEY.ONE_RIGHT] && snake1.heading != LEFT) {\n snake1.heading = RIGHT;\n }\n if(pressedKeys[KEY.ONE_DOWN] && snake1.heading != UP) {\n snake1.heading = DOWN;\n }\n if(snake2) {\n // update direction for second snake\n if(pressedKeys[KEY.TWO_LEFT] && snake2.heading != RIGHT) {\n snake2.heading = LEFT;\n }\n if(pressedKeys[KEY.TWO_UP] && snake2.heading != DOWN) {\n snake2.heading = UP;\n }\n if(pressedKeys[KEY.TWO_RIGHT] && snake2.heading != LEFT) {\n snake2.heading = RIGHT;\n }\n if(pressedKeys[KEY.TWO_DOWN] && snake2.heading != UP) {\n snake2.heading = DOWN;\n }\n }\n }", "change_move_status () {\r\n if(this.spaces_moved_hv > 0 || this.spaces_moved_d > 0){\r\n this.move_status =\r\n this.move_status == 0 ? 1 : 0;\r\n }\r\n }", "move() {\n\n this.reset();\n\n const x = Math.floor(Math.random() * SnakeGame.NUM_COLS);\n const y = Math.floor(Math.random() * SnakeGame.NUM_ROWS);\n this.position = { x, y };\n\n this.cell = this.game.boardCells[y][x];\n\n if(this.cell.classList.contains('snake')) {\n move();\n }\n\n this.cell.classList.add('food');\n\n }", "function moveSnake(snake_body, snake_current_direction, game_field_size){ // returns new location snake as array of strings\n snake_body = removeSnakeTail(snake_body);\n const snake_head = calcNewLocationSnakehead(snake_body, snake_current_direction, game_field_size);\n params = addSnakeHead(snake_body, game_field, snake_head);\n return params;\n}", "function moveSnake(snake_body, snake_current_direction, game_field_size){ // returns new location snake as array of strings\n snake_body = removeSnakeTail(snake_body);\n const snake_head = calcNewLocationSnakehead(snake_body, snake_current_direction, game_field_size);\n params = addSnakeHead(snake_body, game_field, snake_head);\n return params;\n}", "function keyPressed(e){\n\t\t//conditional statements\n\t\tif(e.key == \"ArrowRight\" && snake.direction != \"left\"){\n\t\t\tright.play();\n\t\t\tsnake.direction = \"right\";\n\t\t}\n\t\telse if(e.key == \"ArrowLeft\" && snake.direction != \"right\"){\n\t\t\tleft.play();\n\t\t\tsnake.direction = \"left\";\n\t\t}\n\t\telse if(e.key == \"ArrowDown\" && snake.direction != \"up\"){\n\t\t\tdown.play();\n\t\t\tsnake.direction = \"down\";\n\t\t}\n\t\telse if(e.key == \"ArrowUp\" && snake.direction != \"down\"){\n\t\t\tup.play();\n\t\t\tsnake.direction = \"up\";\n\t\t}\n\t\tconsole.log(snake.direction);\n\t}", "function control(e) {\n squares[currentIndex].classList.remove('snake') // we are removing the class of snake\n \n if(e.keyCode === 39) {\n direction = 1; // if we press the right arrow on the keyboard, the snake will go right one\n } else if (e.keyCode === 38) {\n direction = -width; // if we press the up arrow, the snake will go back ten divs appearing to go up\n } else if (e.keyCode === 37) {\n direction = -1 // if we press left the snake will go left one div\n } else if (e.keyCode === 40) {\n direction = +width // if we press, down the snake head will go forward ten divs appearing to go down\n }\n }", "function keyPressed() {\n if(keyCode === UP_ARROW && snake.xspeed !== 0) {\n snake.dir(0, -1);\n }\n else if(keyCode === DOWN_ARROW && snake.xspeed !== 0){\n snake.dir(0, 1);\n }\n else if(keyCode === RIGHT_ARROW && snake.yspeed !== 0){\n snake.dir(1, 0);\n }\n else if(keyCode === LEFT_ARROW && snake.yspeed !== 0){\n snake.dir(-1, 0);\n }\n}", "moveDown() {\n this.y<332?this.y+=83:false;\n }", "function updateDirection() {\n document.addEventListener('keydown', function(event) {\n\n if (event.keyCode == 38 && !down) { \n up = true;\n down = false;\n left = false;\n right = false;\n } // up\n else if (event.keyCode == 40 && !up) { \n up = false;\n down = true;\n left = false;\n right = false;\n } // down\n else if (event.keyCode == 37 && !right) { \n up = false;\n down = false;\n left = true;\n right = false;\n } // left\n else if (event.keyCode == 39 && !left) {\n up = false;\n down = false;\n left = false;\n right = true;\n } // right\n \n }); // snake's current direction\n}", "function step()\n{\n\tif (move==0)\n\t{\n\t\tcreateShape();\n\t\tdrawShape();\n\t}\n\nelse\n{\n\t// first check if next move is possible\n\tif (collided())\n\t{\n\t\tcreateShape();\n\t\tdrawShape();\n\t}\n\t\n\telse\n\t{\n\t\tclearCurrent();\n\t\tdrawShape();\n\t}\n}\n\tmove++;\n}", "function Snake(bodySnake,direction){\n this.bodySnake = bodySnake;\n this.direction = direction;\n this.ateApple = false;\n //----------------------\n this.draw = function(){\n ctx.save();\n ctx.fillStyle = \"#000000\";\n for(let i = 0 ; i < this.bodySnake.length; i++)\n {\n drawBlock(ctx, this.bodySnake[i]);\n }\n ctx.restore();\n }\n //-------------------------\n this.advance = function(){\n let nextPos = this.bodySnake[0].slice();\n switch(this.direction)\n {\n // case \"right\":\n // nextPos[0] = ++nextPos[0] % (canvasWidth / blockSize);\n // break;\n // case \"left\":\n // nextPos[0] = (nextPos[0] == 0) ?\n // (canvasWidth / blockSize) : --nextPos[0];\n // break;\n // case \"up\":\n // nextPos[1] = (nextPos[1] == 0) ?\n // (canvasHeight / blockSize) : --nextPos[1];\n // break;\n // case \"down\":\n // nextPos[1] = ++nextPos[1] % (canvasHeight / blockSize);\n // break;\n case \"right\":\n ++nextPos[0];\n break;\n case \"left\":\n --nextPos[0];\n break;\n case \"up\":\n --nextPos[1];\n break;\n case \"down\":\n ++nextPos[1];\n break;\n default:\n throw (\"invalid direction\");\n }\n this.bodySnake.unshift([nextPos[0], nextPos[1]]);\n if(!this.ateApple)\n this.bodySnake.pop();\n else\n this.ateApple = false;\n }\n //------------------------------------------\n this.setDirection = function(newDirection){\n let allowedDirection;\n switch(this.direction)\n {\n case \"right\":\n case \"left\":\n allowedDirection = [\"up\", \"down\"];\n break;\n case \"up\":\n case \"down\":\n allowedDirection = [\"left\", \"right\"];\n break;\n default:\n return;\n }\n if (allowedDirection.indexOf(newDirection) > -1)\n {\n this.direction = newDirection;\n }\n }\n //-------------------------\n this.checkCollision = function(){\n let wallCollision = false;\n let snakeCollision = false;\n let head = this.bodySnake[0];\n let rest = this.bodySnake.slice(1);\n let xCoordSnake = head[0];\n let yCoordSnake = head[1];\n let xCoordMin = 0;\n let yCoordMin = 0;\n let xCoordMax = nbWidthBlock - 1;\n let yCoordMax = nbHeightBlock-1;\n let isNotBetweenHorizontalWalls = xCoordSnake < xCoordMin || xCoordSnake > xCoordMax;\n let isNotBetweenVerticalWalls = yCoordSnake < yCoordMin || yCoordSnake > yCoordMax;\n if(isNotBetweenHorizontalWalls || isNotBetweenVerticalWalls){\n wallCollision = true;\n }\n for(let i=2; i<rest.length;i++){\n if (xCoordSnake === rest[i][0] && yCoordSnake === rest[i][1])\n snakeCollision = true;\n }\n return wallCollision || snakeCollision;\n }\n //------------------------------------------\n this.isEatingApple = function(appleToEat){\n let head = this.bodySnake[0];\n if(head[0] === appleToEat.position[0] && head[1] === appleToEat.position[1]) return true;\n else false;\n }\n //------------------------------------------\n }", "function swapUp(state) {\n let blankPOS = findBlankCell(state)\n return swap(state, { y: blankPOS.y - 1, x: blankPOS.x })\n}", "function keyPressed (){\n //KeyCode is built in variavle\n if(keyCode === UP_ARROW){\n snake.dir(0,-1);\n }else if (keyCode === DOWN_ARROW){\n snake.dir(0,1);\n }else if (keyCode === RIGHT_ARROW){\n snake.dir(1,0);\n }else if (keyCode === LEFT_ARROW){\n snake.dir(-1,0);\n }\n}", "function changeDirection(e) {\n if (e.keyCode == 37) {\n direction = 0;\n console.log(\"direction is left:\" + direction);\n updateSnakeList();\n } else if (e.keyCode == 38) {\n direction = 1;\n console.log(\"direction is up:\" + direction)\n } else if (e.keyCode == 39) {\n direction = 2;\n console.log(\"direction is right :\" + direction)\n } else if (e.keyCode == 40) {\n direction = 3;\n console.log(\"direction is down :\" + direction)\n }\n }", "function control(e) {\n squares[currentIndex].classList.remove(\"snake\"); // we are removing the class of snake from ALL the squares\n\n if (e.keyCode === 39) {\n director = 1; // if we press the right arrow on our keyboard, the snake will go right one\n } else if (e.keyCode === 38) {\n director = -width; // if we press the up arrow, the snake will go back ten div, appearing to go up\n } else if (e.keyCode === 37) {\n director = -1; // if we press left, the snake will go left one div\n } else if (e.keyCode === 40) {\n director = +width; // if we press down, the snake head instantly appear in the div ten div from where you are now\n }\n }", "function keyPressed(){\n // this is for the up arrow (the others should go along the same lines as well)\n if(keyCode === UP_ARROW){\n // takes velocity - and creates vector with 0 (not changing x\n // changing y to a negative to go up)\n snake.vel = createVector(0,-1*w);\n }\n if(keyCode === DOWN_ARROW){\n // take velocity and creates vector with 0 (not changing x\n // changing y to a positive to go down)\n snake.vel = createVector(0,1*w);\n }\n if(keyCode === LEFT_ARROW){\n // velocity - create vector negative x and 0 for y\n snake.vel = createVector(-1*w,0);\n }\n if(keyCode === RIGHT_ARROW){\n // velocity = create vector positive x and 0 for y\n snake.vel = createVector(1*w,0);\n }\n}", "function snakeMove(snakeArray) {\n switch (direction) {\n case \"right\":\n tail = bodyShape.shift();\n tail.x = bodyShape[bodyShape.length - 1].x + 1;\n tail.y = bodyShape[bodyShape.length - 1].y;\n bodyShape.push(tail);\n break;\n case \"left\":\n tail = bodyShape.shift();\n tail.x = bodyShape[bodyShape.length - 1].x - 1;\n tail.y = bodyShape[bodyShape.length - 1].y;\n bodyShape.push(tail);\n break;\n case \"down\":\n tail = bodyShape.shift();\n tail.x = bodyShape[bodyShape.length - 1].x;\n tail.y = bodyShape[bodyShape.length - 1].y + 1;\n bodyShape.push(tail);\n break;\n case \"up\":\n tail = bodyShape.shift();\n tail.x = bodyShape[bodyShape.length - 1].x;\n tail.y = bodyShape[bodyShape.length - 1].y - 1;\n bodyShape.push(tail);\n break;\n }\n\n for (var i = 0; i < snakeArray.length; i++) {\n ctx.fillStyle = \"blue\";\n ctx.fillRect(snakeArray[i].x * snake_seg, snakeArray[i].y * snake_seg, snake_seg + 1, snake_seg + 1);\n };\n\n for (var i = 0; i < snakeArray.length; i++) {\n ctx.fillStyle = \"#7FFF00\";\n ctx.fillRect(snakeArray[i].x * snake_seg, snakeArray[i].y * snake_seg, snake_seg - 1, snake_seg - 1);\n };\n\n}", "function check_arrow(event){\r\n\r\n const LEFT_KEY = 37;\r\n const RIGHT_KEY = 39;\r\n const UP_KEY = 38;\r\n const DOWN_KEY = 40;\r\n\r\n if(changing_direction) return;\r\n changing_direction = true;\r\n const keyPressed = event.keyCode;\r\n // Use this to check if the snake is moving in the reverse side\r\n const goingUp = dy === -10;\r\n const goingDown = dy === 10;\r\n const goingRight = dx === 10;\r\n const goingLeft = dx === -10;\r\n\r\n if(keyPressed === LEFT_KEY && !goingRight){\r\n dx = -10;\r\n dy = 0;\r\n }\r\n\r\n if(keyPressed === RIGHT_KEY && !goingLeft){\r\n dx = 10;\r\n dy = 0;\r\n }\r\n\r\n if(keyPressed === UP_KEY && !goingDown){\r\n dx = 0;\r\n dy = -10;\r\n }\r\n\r\n if(keyPressed === DOWN_KEY && !goingUp){\r\n dx = 0;\r\n dy = 10;\r\n }\r\n}", "function computerMakingMove(state) {\n var s = computerGamePlay(state, 11);\n return s.moveMade;\n}", "function move()\n{\n\n}", "move () {\n this._updateGUI()\n\n if (this.isMoving()) {\n //console.log('sorry, im already moving')\n return\n }\n\n let dir = this._state.lastDir\n if (!this._canMove(dir)) return\n\n if (this._state.special) {\n this._slide(dir)\n } else {\n this._roll(dir)\n }\n\n this._updateGUI()\n }", "move() {\n // figure out which key was pressed\n if (keyIsDown(LEFT_ARROW)) {\n this.xPos -= 5;\n this.myGraphic = user_left;\n }\n if (keyIsDown(RIGHT_ARROW)) {\n this.xPos += 5;\n this.myGraphic = user_right;\n }\n if (keyIsDown(UP_ARROW)) {\n this.yPos -= 5;\n }\n if (keyIsDown(DOWN_ARROW)) {\n this.yPos += 5;\n }\n }", "function mainMove(key, a, b) {\r\n if (e.keyCode === key) {\r\n timesThisDir = 0;\r\n // keep arrows from scrolling\r\n e.preventDefault();\r\n // snake is allowed to go backward only if its length is 1\r\n if (!youAreGoingBackward(key) || snakeLength === 1) {\r\n clearInterval(intMove);\r\n intMove = setInterval(function() {\r\n // set loc of next square\r\n x = x + a; y = y + b;\r\n currentLoc = [x, y];\r\n // store next loc in array\r\n oldSquare[times] = currentLoc;\r\n // store movement in array\r\n changeInX = currentLoc[0] - oldSquare[times - 1][0];\r\n changeInY = currentLoc[1] - oldSquare[times - 1][1];\r\n if (youAreInPlayArea()) {\r\n // create new square\r\n newSquare(x,y);\r\n if (times === 1) {\r\n createFood();\r\n }\r\n if (youAte()) {\r\n afterEating();\r\n }\r\n // if food has appeared in the snake's tail, don't clear that square\r\n if (times >= snakeLength) {\r\n if (!(theresFoodInYourTail())) {\r\n clearSquare(oldSquare[times - snakeLength][0],oldSquare[times - snakeLength][1]); // clear squares past snake length\r\n }\r\n }\r\n times++;\r\n timesThisDir++;\r\n }\r\n // can't hit walls\r\n else {\r\n gameOver();\r\n }\r\n if (youHitYourTail()) {\r\n gameOver();\r\n }\r\n }, 1000/FPS);\r\n } \r\n }\r\n }" ]
[ "0.7366036", "0.71729314", "0.7159492", "0.71536195", "0.7135584", "0.7105555", "0.6987568", "0.6974797", "0.69314945", "0.69286644", "0.6908212", "0.68527406", "0.6848052", "0.67981833", "0.67261535", "0.67235726", "0.6669215", "0.6637938", "0.6611165", "0.6589315", "0.65816474", "0.65787005", "0.65593815", "0.65429395", "0.6537819", "0.6533703", "0.65325546", "0.65279776", "0.6518259", "0.64619136", "0.6456445", "0.64384484", "0.6427104", "0.6426754", "0.6426354", "0.6420518", "0.6415227", "0.6409892", "0.6403327", "0.6403327", "0.63904625", "0.6376783", "0.6359636", "0.634764", "0.63405657", "0.632768", "0.6323923", "0.6323022", "0.63218313", "0.63175213", "0.6312884", "0.63103795", "0.6295397", "0.6291038", "0.6289724", "0.62880963", "0.6286238", "0.62802887", "0.6273859", "0.6273554", "0.62712026", "0.6270186", "0.6268697", "0.62619686", "0.62604153", "0.6253845", "0.6250193", "0.62477016", "0.6242824", "0.6239795", "0.6220551", "0.6219599", "0.6219404", "0.6217053", "0.62064266", "0.62056774", "0.6200219", "0.61999136", "0.61988235", "0.6189257", "0.61884665", "0.61884665", "0.61883754", "0.6183482", "0.6183356", "0.6181059", "0.6177348", "0.61769116", "0.6173277", "0.6168249", "0.61633444", "0.6155975", "0.6155033", "0.61549395", "0.61548144", "0.61529124", "0.61516273", "0.61380553", "0.61378944", "0.6133572", "0.6131779" ]
0.0
-1
Update minicart qty on add to cart
function update_cqty(){ $.get("/wp-admin/admin-ajax.php", { action: 'cart_qty' }).then(function(res){ $('i#cqty').text(res); if (res != 0) $('i#cqty').addClass('visible'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateQuantity() {\n let prod = this.closest(\".cart-item\");\n let prod_cost = prod.children[2].innerText.slice(1);\n prod.children[4].innerText = `$${Number(prod_cost)*this.value}`\n\n let z = JSON.parse(localStorage.getItem(\"CartItem\"));\n arr = [];\n for (let k = 0; k < Object.keys(z).length; k++) {\n if (z[k].name == prod.children[1].innerText) {\n z[k].quantity = this.value;\n }\n arr.push(z[k]);\n }\n localStorage.setItem(\"CartItem\", JSON.stringify(arr));\n}", "function cartIconQtyUpdate(){\n var totalQty = 0;\n if(cart.length) {\n for(var i=0; i<cart.length; i++) {\n var cartItem = cart[i];\n totalQty += cartItem.quantity;\n }\n $('.qty').html(totalQty);\n } else {\n $('.qty').html(totalQty);\n }\n}", "cartPlusOne(product) {\r\n product.quantity = product.quantity + 1;\r\n }", "function WC_Adjust_Cart_Quantity() {\n\t \t$( 'body' ).on( 'click', '.quantity .plus', function( e ) {\n\t \t\tvar $input = $( this ).parent().parent().find( 'input' );\n\t \t\t$input.val( parseInt( $input.val() ) + 1 );\n\t \t\t$input.trigger( 'change' );\n\t \t} );\n\t \t$( 'body' ).on( 'click', '.quantity .minus', function( e ) {\n\t \t\tvar $input = $( this ).parent().parent().find( 'input' );\n\t \t\tvar value = parseInt( $input.val() ) - 1;\n\t \t\tif ( value < 1 ) {\n\t \t\t\tvalue = 1;\n\t \t\t}\n\t \t\t$input.val( value );\n\t \t\t$input.trigger( 'change' );\n\t \t} );\n\t }", "function quantityChanged(event) {\n // var input = event.target;\n updateCartTotal();\n }", "function quantityChangedMB(event) {\n var input = event.target\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1\n }\n var quantity = input.value\n var product_id = input.getAttribute('data-productid')\n ajaxUpdateItemCart(product_id,quantity)\n updateCartTotalMB()\n}", "_changeQuantity(productId) {\n const value = this.shadowRoot.querySelector('#chart_item_' + productId).value;\n\n const cartItem = this._findCartItem(productId);\n\n const index = this.cartItems.indexOf(cartItem);\n this.cartItems[index].quantity = value;\n this.cartItems = [...this.cartItems]; // this.cartItems[index] = cartItem['quantity'] + 1;\n // this.set('cartItems.' + index + '.quantity', cartItem['quantity'] + 1);\n\n localStorage.setItem('shop-cart', JSON.stringify(this.cartItems));\n this.dispatchEvent(new CustomEvent('change-cart-count', {\n bubbles: true,\n composed: true,\n detail: {}\n }));\n }", "function updateQuantity(item, type) {\n let indx = cart.findIndex((x) => x.name == item.name);\n let qty = qtyBtn.textContent;\n\n if (type == \"dec\") {\n if (qty > 0) {\n qty--;\n qtyBtn.textContent = qty;\n if (indx != -1) {\n cart[indx].quantity = qty;\n } else {\n let billObj = {\n name: item.name,\n price: item.price,\n quantity: qty,\n category: item.category\n };\n cart.push(billObj);\n }\n }\n if (qty == 0) {\n cart = cart.filter((item) => item.quantity != 0);\n }\n }\n\n if (type == \"inc\") {\n if (qty < 10) {\n qty++;\n qtyBtn.textContent = qty;\n if (indx != -1) {\n cart[indx].quantity = qty;\n } else {\n let billObj = {\n name: item.name,\n price: item.price,\n quantity: qty,\n category: item.category\n };\n cart.push(billObj);\n }\n }\n }\n\n updateBill();\n showCartItems();\n }", "function quantityChanged(event) {\n var input = event.target\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1\n }\n var quantity = input.value\n var product_id = input.getAttribute('data-productid')\n ajaxUpdateItemCart(product_id,quantity)\n updateCartTotal()\n}", "function updateShoppingCart(addQty) {\n\tvar totalItems = getTotalItemsCart() + addQty;\n\tdocument.getElementById('shopping-cart-text').innerHTML = totalItems + ' items';\n}", "function cart_qty_change(e, itemId, isAdd) {\n\n let cartItems = localStorage.getItem('productsInCart');\n cartItems = JSON.parse(cartItems);\n\n if (cartItems) {\n\n let prd_qty;\n let prd_sum = $(e).parent().parent().next().children();\n\n if (isAdd) prd_qty = $(e).prev();\n else prd_qty = $(e).next();\n\n let qty = Number(prd_qty.val());\n\n if (qty > 1 && isAdd == false) {\n qty -= 1;\n prd_qty.attr('value', qty);\n total = Number(cartItems[itemId]['price']) * qty;\n prd_sum.html('&#8377; ' + total);\n cartItems[itemId]['qty'] -= 1;\n localStorage.setItem(\"productsInCart\", JSON.stringify(cartItems));\n alter_totalCost(cartItems[itemId]['price'], isAdd = false);\n }\n else if (qty >= 1 && isAdd == true) {\n qty += 1;\n prd_qty.attr('value', qty);\n total = Number(cartItems[itemId]['price']) * qty;\n prd_sum.html('&#8377; ' + total);\n cartItems[itemId]['qty'] += 1;\n localStorage.setItem(\"productsInCart\", JSON.stringify(cartItems));\n alter_totalCost(cartItems[itemId]['price'], isAdd = true);\n }\n\n }\n}", "function updateItemQuantity(itemId, itemQty){\n /* get items of cart in localStorage */\n let cartItem = JSON.parse(localStorage.getItem('cart'));\n /* update psc_item using Map */\n let newCartData = cartItem.map(item => {\n if(item.item_id == itemId){\n if(parseInt(item.item_available) < itemQty.value){\n item.pcs_item = parseInt(item.item_available);\n }else{\n item.pcs_item = parseInt(itemQty.value);\n }\n return item;\n }else{\n return item;\n }\n });\n\n /* convert newCartData to JSON string to be set in localStorage */\n localStorage.setItem('cart',JSON.stringify(newCartData));\n /* update cart Display */\n updateCartDisplay();\n}", "function updateQuantity(stock_qty, id, qty)\n {\n \n connection.query(\"UPDATE products SET stock_quantity = \"+ qty + \" WHERE item_id = \"+id,\n function(err, res2) \n {\n if (err) throw err;\n console.log(\"Updated stock inventory quantity: \" +qty);\n connection.end();\n });\n }", "calculateTotal(price, skuId, qty) {\n let cartListArr = this.props.elcStore.cartList.length ? JSON.parse(this.props.elcStore.cartList) : {};\n if (Object.keys(cartListArr).length && cartListArr[skuId] !== undefined) {\n for (let x in cartListArr) {\n if (x === skuId) {\n cartListArr[skuId] = {qty: cartListArr[skuId].qty + qty};\n }\n }\n } else {\n cartListArr[skuId] = {qty: qty};\n }\n const total = this.state.total + (price * qty);\n const cartList = cartListArr;\n this.props.elcStore.cartListUpdate(total, cartList);\n }", "function increment_qty( item_id )\n{\n\tvar qty = $('#item_' + item_id + '_qty').val();\n\t$.ajax({\n type: \"POST\",\n url: base_url + \"purchase/update_cart_item\",\n data: { qty: parseInt(qty)+1, item_id: item_id },\n success: function( data ){\n \tif ( data == 1 )\n \t{\n \t\t$('#item_' + item_id + '_qty').val( parseInt(qty)+1 );\n \t\tvar price = $( '#item_' + item_id + '_price' ).text();\n \t\tvar total = ( parseInt( qty ) + 1 ) * price;\n \t\t$( '#item_' + item_id + '_total' ).text( total );\n \t}\n }\n });\n}", "function change_product_quantity(product_id, qty)\n{\n\t//Save new quantity into the product in order_list \n\tif (product_id in order_list)\n\t{\n\t\torder_list[product_id].quantity = qty;\n\t\trecalculate_moqioq_flag(product_id);\n\t\t//Redraw\n\t\tredraw_order_list();\n\t}\n}", "function quantityChanged(event){\n\tvar input = event.target;\n\tif (isNaN(input.value) || input.value <= 0) {\n\t\tinput.value = 1;\n\t}\n\tupdateCartTotal();\n}", "function update_cart_qty_in_sideCart_and_cart_plus(id) {\n\n var secPID = id;\n var qty = $('#cartQty'+id).val();\n var qty =parseFloat(qty) + parseInt(1);\n $('#cartQty'+id).val(qty);\n \n $.ajax({\n url: '/update_to_cart',\n method:\"GET\",\n data:{ \n secPID:secPID,\n qty: qty,\n },\n success: function (response) {\n var grndTotal = response['grandtotal'].toFixed(2);\n var setgtotal = $('#indGtotal'+id).text(grndTotal);\n TotalPriceCalc();\n leftCartSidebar();\n //console.log(grndTotal);\n Toastify({\n text: response['status'],\n backgroundColor: \"linear-gradient(to right, #00b09b, #96c93d)\",\n className: \"error\",\n }).showToast();\n }\n });\n\n}", "function updateMiniCart() {\n if(!cart.items ) {\n cart.items = [];\n }\n }", "updateQuantityInCart(lineItemId, quantity) {\n const state = store.getState().home.cart; // state from redux store\n const checkoutId = state.checkout.id\n const lineItemsToUpdate = [{ id: lineItemId, quantity: parseInt(quantity, 10) }]\n state.client.checkout.updateLineItems(checkoutId, lineItemsToUpdate).then(res => {\n store.dispatch({ type: 'UPDATE_QUANTITY_IN_CART', payload: { checkout: res } });\n });\n }", "function updateQuantityField(el) {\r\n // Set minimum value to 1\r\n if (isNaN(el.value) || el.value <= 0) {\r\n el.value = 1;\r\n }\r\n // Set maximum value to 99\r\n else if (el.value >= 100) {\r\n el.value = 99;\r\n }\r\n // Update cart values\r\n updateCartSubtotal();\r\n updateCartTotal();\r\n updateQuantityToStorage(el);\r\n}", "function quantityChanged(event) {\r\n var input = event.target;\r\n if (isNaN(input.value) || input.value <= 0) {\r\n input.value = 1;\r\n }\r\n updateCartTotal();\r\n }", "function updateItemQuantity(id) {\n\t$('#qty_'+id).val( function(i, oldval) {\n \treturn parseInt( oldval, 10) + 1;\n\t});\t\t\n}", "function increaseQuantity(id) {\n let products = getItemFromLocalStorage('productsCart');\n products.forEach((value) => {\n if (value.id == id) {\n value.quantity++;\n }\n });\n // location.reload();\n\n setItemToLocalStorage('productsCart', products);\n displayCartData();\n}", "function updateQuantity() {\n if (updating) {\n console.log(quant);\n console.log(\"Stock quantity: \" + stockQuantity);\n let newStockQuantity = stockQuantity - quant;\n console.log(\"Remaining stock: \" + quant);\n\n let updatedProduct = {\n id: productID,\n stock_quantity: newStockQuantity\n };\n console.log(updatedProduct);\n updateProducts(updatedProduct).then(function(res) {\n console.log(res);\n });\n }\n }", "function quantityChanged(event){\n const input = event.target;\n input.value <= 0 ? (input.value = 1) : null;\n\n //actualizamos precio//\n updateShoppingCartTotal();\n}", "function changeQuantity(element) {\n current_value = $(element).val();\n product_id = $(element).data('id');\n \n let total_price = 0;\n if (current_value <= 0) {\n current_value = $(element).val(1)\n alert('Invalid Quamtity value');\n }\n \n products[product_id] = current_value;\n localStorage.setItem('cart', JSON.stringify(products));\n \n for(var key in price_per_item) {\n total_price += getPricePerProductQuantity(key, price_per_item[key])\n }\n $('#total_price').text(total_price);\n }", "function addToCart(value){\n var quantity;\n var oldValue = parseInt(document.querySelector('.cart_number').innerText);\n if(value !== undefined){\n quantity = 1; // Ajout depuis More Product // +1\n } else {\n quantity = parseInt(document.querySelector('.quantities').value); // Ajout depuis la selection principale // +Quantity\n }\n document.querySelector('.cart_number').innerText = oldValue + quantity;\n // Idée pour plus tard : Ajouter un affichage des articles dans le panier\n}", "function quantityChanged(event) {\n var input = event.target;\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1;\n }\n updateCartTotals();\n}", "function addToCart(productID, qty) {\n // Cek \n if(!databaseProduct[productID]) return `Tidak ada barang dengan ID tersebut`\n if(qty <= 0) return 'Invalid quantity' \n if(qty > databaseProduct[productID].stokProduk) return alert('Stok habis!')\n\n // Kalau aman\n databaseProduct[productID].stokProduk -= qty // database di update\n\n if(!productInCart[productID]) { // productInCart di update\n productInCart[productID] = qty\n } else {\n productInCart[productID] += qty\n }\n\n renderCart() // update tampilan cart\n renderProductList() // update product list => stok berubah atau produk hilang\n updateTotal() // update tampilan total\n return productInCart\n}", "function updateItemQTY(itemID, newQTY){\n\tvar query = 'UPDATE products SET stock_qty = '+ newQTY + ' WHERE item_id =' + itemID;\n\tconnection.query(query);\n}", "function updateQuantity() {\n var query = connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: updatedStock\n },\n {\n item_id: answer.userId\n }\n ],\n );\n }", "function quantityChangedplus(event) {\r\n var purchaseClicked = event.target\r\n purchaseClicked.previousElementSibling.value = Number(purchaseClicked.previousElementSibling.value) + 1\r\n updateCartTotal()\r\n}", "function updateQuantity(fn, variantId) {\r\n\t // var variant = product.variants.filter(function (variant) {\r\n\t // return (variant.id === variantId);\r\n\t // })[0];\r\n\t // var quantity;\r\n\t var cartLineItem = findCartItemByVariantId(variantId);\r\n\t if (cartLineItem) {\r\n\t cartLineItem.quantity = fn(cartLineItem.quantity);\r\n\t quantity = cartLineItem.quantity;\r\n\t updateVariantInCart(cartLineItem, quantity);\r\n\t }\r\n\t }", "function quantityChanged(event) {\n const input = event.target\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1\n }\n updateCartTotal()\n}", "quantityChanged (product) {\n this.productQuantities[product.id] = product.quantity;\n this.cookieFactory.saveJSON(ShoppingCart.PRODUCTS_COOKIE, this.productQuantities);\n\n this.calculateTotals();\n }", "function incQty(res, mysql, complete, p_id){\n var sql = \"UPDATE Product SET p_qty = p_qty + 1 WHERE p_id =?;\";\n var inserts = [p_id];\n mysql.pool.query(sql, inserts, function(error, results, fields){\n if(error){\n res.write(JSON.stringify(error));\n res.end();\n }\n complete();\n });\n }", "function updateCart(){\n\t\tstorage(['items', 'subtotal'], function(err, col){\n\t\t\t//console.log(\"Cart Collection - \" + JSON.stringify(col));\n\n\t\t\t//items = col[0];\n\t\t\t//subtotal = col[1];\n\n\t\t\tif(console) console.log(\"Items in Cart: \" + items);\n\t\t\tif(console) console.log(\"Subtotal of Cart: \" + subtotal);\n\t\t\t\n\t\t\t// update DOM Here\n\t\t\tdocument.getElementById( _options.itemsEleId ).innerHTML = items;\n\t\t\tdocument.getElementById( _options.subtotalEleId ).value = \"$\" + subtotal.toFixed(2);\n\n\t\t\t// reset default quantity input fields of products\n\t\t\tPRODUCTS.updateProducts();\n\t\t});\n\t}", "_incrementQuantity(evt) {\n console.log('_incrementQuantity');\n const productId = evt.currentTarget.dataset['product'];\n\n const cartItem = this._findCartItem(productId);\n\n const index = this.cartItems.indexOf(cartItem);\n this.cartItems[index].quantity = cartItem['quantity'] + 1;\n this.cartItems = [...this.cartItems]; // this.cartItems[index] = cartItem['quantity'] + 1;\n // this.set('cartItems.' + index + '.quantity', cartItem['quantity'] + 1);\n\n localStorage.setItem('shop-cart', JSON.stringify(this.cartItems));\n this.dispatchEvent(new CustomEvent('change-cart-count', {\n bubbles: true,\n composed: true,\n detail: {}\n }));\n }", "function UpdateCart() {\n\n // get current text displaying for cart\n\tvar cart_num = parseInt(document.getElementById('cart_number').innerText);\n\n\t// get value from quantity drop down menu\n\tvar qty1 = document.getElementById('qty1').value;\n\tqty1 = parseInt(qty1);\n\t//console.log(qty1);\n\n\t// Add quantity selected to the total & update total\n\titem_number += qty1;\n\tcart_num = item_number;\n\tdocument.getElementById('cart_number').innerText = cart_num;\n // console.log(cart_num);\n //console.log(cart_num);\n\n window.localStorage.setItem('cart_count', JSON.stringify(cart_num));\n\n}", "function plusQtty(i) {\n\n cart[i].qtty++;\n document.getElementsByClassName(\"cart-quantity\")[i].innerHTML = cart[i].qtty;\n\n /* Update total items in the cart*/\n totalShoppingItems++;\n document.getElementById(\"total-qtty\").innerHTML = totalShoppingItems;\n}", "function addQuantity(product, quantity) {\n connection.query(\n \"UPDATE products SET stock_quantity = ? WHERE item_id = ?\",\n [product.stock_quantity + quantity, product.item_id],\n function(err, res) {\n // Let the user know the purchase was successful, re-run loadProducts\n console.log(\"\\nSuccessfully added \" + quantity + \" \" + product.product_name + \"'s!\\n\");\n loadManagerMenu();\n }\n );\n}", "function updateQuantity(id, addUnits) {\n connection.query(\"SELECT * FROM products WHERE item_id=?\", [id], function (err, response) {\n if (err) throw err;\n var name = response[0].product_name;\n var currentQuantity = parseInt(response[0].stock_quantity);\n var newQuantity = currentQuantity + addUnits;\n connection.query(\"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: newQuantity\n },\n {\n item_id: id\n }\n ], function (err, response) {\n if (err) throw err;\n clearConsole();\n consoleMessage(\"Number of \" + name + \" in stock raised from \" +\n currentQuantity + \" to \" + newQuantity);\n userOptions();\n })\n\n })\n}", "function increaseCartNum() {\n setCartNum(cartNum+1);\n }", "function updateQuantity(id, newQuantity) {\n\n var basket = JSON.parse(localStorage.BASKET);\n // loop through products in basket\n for (var i = 0; i < basket.length; i++) {\n\n var basketProduct = JSON.parse(basket[i]);\n\n // if the product is already in the basket, add the new quantity\n if (basketProduct.productID == id) {\n basketProduct.quantity = newQuantity;\n basket[i] = JSON.stringify(basketProduct);\n }\n }\n // updates the basket\n localStorage.BASKET = JSON.stringify(basket);\n ajaxGet('inc/basket.php', loadBasket);\n updateBasketCost();\n}", "function increase(key){\n let objTmp = {};\n objTmp = JSON.parse(localStorage.getItem(key));\n var curr = Number(objTmp.qty) + 1;\n var stoc = Number(products[key].stoc);\n if(curr > stoc){\n return false;\n } else {\n objTmp.qty += 1;\n //actualizam localstorage\n localStorage.setItem(key, JSON.stringify(objTmp));\n drawCart();\n }\n}", "handleCartQtyChanges(qty, cart) {\n if (this.state.cartQty !== qty) {\n this.setState({cartQty: qty, cart: cart})\n localStorage.setItem(\"shoppingCart\", JSON.stringify(this.state.cart));\n }\n }", "function totalCost(product, qty) {\n let cartCost = localStorage.getItem('totalCost');\n\n if (cartCost != null) {\n cartCost = parseInt(cartCost);\n localStorage.setItem(\"totalCost\", cartCost + (product.price * qty));\n } else {\n localStorage.setItem(\"totalCost\", product.price * qty);\n }\n\n\n}", "function addItemQty(item, quantity){\n\t\t\tif(!item.qty) item.qty = quantity;\n\t\t\telse item.qty += quantity;\n\t\t}", "function getQty(){\n let qty = 0;\n for(let i = 0; i < cart.length; i += 1){\n qty += cart[i].qty;\n }\n return qty\n}", "function currentQuantityCart() {\n\n}", "function update_cart_qty_in_sideCart_and_cart_Minus(id) {\n\n var secPID = id;\n var qty = $('#cartQty'+id).val();\n if(qty > 1) {\n var qty =parseFloat(qty) - parseInt(1);\n $('#cartQty'+id).val(qty);\n \n $.ajax({\n url: '/update_to_cart',\n method:\"GET\",\n data:{ \n secPID:secPID,\n qty: qty,\n },\n success: function (response) {\n var grndTotal = response['grandtotal'].toFixed(2);\n var setgtotal = $('#indGtotal'+id).text(grndTotal);\n TotalPriceCalc();\n leftCartSidebar();\n //console.log(grndTotal);\n Toastify({\n text: response['status'],\n backgroundColor: \"linear-gradient(to right, #00b09b, #96c93d)\",\n className: \"error\",\n }).showToast();\n }\n });\n }\n \n\n}", "function updateQuantity(count, iid) {\n connection.query(\"UPDATE products SET stock_quantity = stock_quantity - ? WHERE item_id = ?\", [count, iid], function (err, res, field) {\n promptUserEntry();\n\n });\n }", "function adjustQuantity(qtyField, increment) {\n\tif (isNaN(qtyField.val())) {\n\t\tqtyField.val(0);\n\t}\n\tvar limit = parseInt(qtyField.attr('max'));\n\tvar previousValue = parseInt(qtyField.val());\n\tvar id = qtyField.data('id');\n\tvar model = qtyField.data('model');\n\n\tvar min = qtyField.attr('min') ? qtyField.attr('min') : 1;\n\tif (previousValue + increment <= min) {\n\t\tqtyField.val(min);\n\t} else {\n\t\tqtyField.val(previousValue += increment);\n\t}\n\tif (qtyField.val() <= min || qtyField.val() < 1) {\n\t\tqtyField.parents('.input-group').find('.btn-remove').attr('disabled', true);\n\t} else {\n\t\tqtyField.parents('.input-group').find('.btn-remove').attr('disabled', false);\n\t}\n\n\t//Set qty to limit if entered value is above\n\n\t// Because of our situation with OAuth, we need to use the form to update wishlist and registry items; however, we can use the api to update sessioncart items.\n\tif (typeof id !== 'undefined') { // We need to submit the updated quantity to the server\n\t\tvar form = qtyField.parents('form');\n\t\tvar formData = form.serialize(); // We must serialize our form data here because disabled fields are not submitted\n\n\t\t// Dim quantity field while we update\n\t\tqtyField.parents('.input-group').find('input,button').prop('disabled', true);\n\n\t\tif (typeof model === 'undefined') { // No model defined, so submit the entire form\n\t\t\t$.ajax({\n\t\t\t\ttype: form.attr('method'),\n\t\t\t\turl: form.attr('action'),\n\t\t\t\tdata: formData + '&action=update'\n\t\t\t}).always(function () {\n\t\t\t\tqtyField.parents('.input-group').find('input,button').prop('disabled', false);\n\t\t\t\tif (qtyField.val() <= qtyField.attr('min') || qtyField.val() < 1) qtyField.parents('.input-group').find('.btn-remove').attr('disabled', true);\n\t\t\t});\n\t\t} else {\n\t\t\tqtyField.parents('.item').find('.error').hide();\n\t\t\t// Model is defined, so use the API to submit a put request\n\t\t\t$.ajax({\n\t\t\t\ttype: 'put',\n\t\t\t\turl: acendaBaseUrl + '/api/' + model + '/' + id,\n\t\t\t\tdataType: 'json',\n\t\t\t\tdata: JSON.stringify({ quantity: qtyField.val() })\n\t\t\t}).always(function () {\n\t\t\t\tqtyField.parents('.input-group').find('input,button').prop('disabled', false);\n\t\t\t\tif (qtyField.val() <= qtyField.attr('min') || qtyField.val() < 1) qtyField.parents('.input-group').find('.btn-remove').attr('disabled', true);\n\t\t\t}).fail(function (e) {\n\t\t\t\tdata = $.parseJSON(e.responseText);\n\t\t\t\t//console.log(data)\n\t\t\t\tqtyField.val(previousValue -= increment);\n\t\t\t\tif (data.code === 400 && model === 'cart/item') { // Bad request for the cart - not enough inventory\n\t\t\t\t\tif (typeof data.error != 'undefined') {\n\t\t\t\t\t\tvar error = data.error[Object.keys(data.error)[0]][0];\n\t\t\t\t\t\tqtyField.parents('.item').find('.error').html(error);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tqtyField.parents('.item').find('.error').html('Not enough inventory to add more items!');\n\t\t\t\t\t}\n\t\t\t\t} else { // Probably a connection failure\n\t\t\t\t\tqtyField.parents('.item').find('.error').html('Unknown error: could not update quantity.');\n\t\t\t\t}\n\t\t\t\tif (limit) {\n\t\t\t\t\tif (!isNaN(limit)) {\n\t\t\t\t\t\tif (previousValue > limit) {\n\t\t\t\t\t\t\t//console.log('was too big, qualified, set to limit: '+limit);\n\t\t\t\t\t\t\tqtyField.val(limit);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tqtyField.parents('.item').find('.error').show();\n\t\t\t\tif (model === 'cart/item') { // Check if we're at the cart, and if so, update the cart subtotal/individual item totals\n\t\t\t\t\tupdateCartTotals(qtyField, id);\n\t\t\t\t}\n\t\t\t}).done(function () {\n\t\t\t\tif (model === 'cart/item') { // Check if we're at the cart, and if so, update the cart subtotal/individual item totals\n\t\t\t\t\tupdateCartTotals(qtyField, id);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t} else {\n\t\t//console.log('detect not cart page')\n\t\tif (qtyField.val() > limit) {\n\t\t\t//console.log('detect prod page val too high, adjust')\n\t\t\tqtyField.val(limit);\n\t\t}\n\t}\n\n}", "function setCart(){\n\t\tstorage.set({ \n\t\t\titems: 0, \n\t\t\tsubtotal: 0\n\t\t}, function(){\n\t\t\tupdateCart();\n\t\t});\n\t}", "function changeQty(data, qty) {\n data[`${prefix}_qty`] = qty;\n return data;\n}", "function updateProducts(stock, id, qty){\n connection.query(\"UPDATE products SET ? WHERE ?;\",\n \n [\n {\n Stock_QTY: (parseInt(stock) + parseInt(qty)),\n },\n {\n ID: id,\n }, \n ],\n function(err) {\n if (err) throw err;\n updatedItem(id);\n \n }\n ); \n \n}", "function SetChangeToQty(e) {\n \t\n \tvar evt = window.event || e;\n\t var oSrc = evt.srcElement || e.target;\n\t var sType = evt.type || e.type;\n\t \n\t var sProductID = oSrc.getAttribute(\"ProductID\");\n\t \n\t $(\"ProductItemBox\" + sProductID).setAttribute(\"Qty\", oSrc.value);\n\t \n }", "function changeQuantity(itemId, change) {\n let cartItem = localStorage.getItem('cartItems');\n if (cartItem) {\n let cartItemArray = JSON.parse(cartItem);\n let productIndex = cartItemArray.findIndex(item => {\n return item.id === itemId;\n });\n if (change === 'add') {\n cartItemArray[productIndex].quantity += 1;\n } else {\n if (cartItemArray[productIndex].quantity > 1) {\n cartItemArray[productIndex].quantity -= 1;\n }\n }\n cartItemArray[productIndex].discount = calculateDiscounts(cartItemArray[productIndex].quantity);\n let total = cartItemArray[productIndex].price * cartItemArray[productIndex].quantity;\n cartItemArray[productIndex].total = parseFloat(total.toFixed(2));\n let discountedTotal = total - cartItemArray[productIndex].discount;\n cartItemArray[productIndex].discountedTotal = parseFloat(discountedTotal.toFixed(2));\n localStorage.setItem('cartItems', JSON.stringify(cartItemArray));\n sendItemsToCartUI(cartItemArray);\n grandTotals(cartItemArray);\n }\n\n}", "function updateCartTotal() {\n var cartItemContainer = document.getElementsByClassName(\"cart-body\")[0];\n var cartRows = cartItemContainer.getElementsByClassName(\"cart-item\");\n var total = 0;\n for (var i = 0; i < cartRows.length; i++) {\n var cartRow = cartRows[i];\n var priceElement = cartRow.getElementsByClassName(\"cart-item-price\")[0];\n var quantityElement = cartRow.getElementsByClassName(\n \"ItemCounterCart2\"\n )[0];\n var price = parseFloat(priceElement.innerText.replace(\"$\", \"\"));\n var quantity = parseInt(quantityElement.value);\n var total1 = price * quantity;\n total = total + total1;\n total = Math.round(total * 100) / 100;\n }\n document.getElementsByClassName(\"subtotal3\")[0].innerText = \"$\" + total;\n }", "function updateTotal(){\n\t\tvar sum = 0;\n\t\t$(\".cart_items>.item\").each(function(i,v){\n\t\t\tsum += $(v).data(\"price\") * $(v).find(\".cart_cloth_num\").text();\n\t\t});\n\t\t$(\".cart_total\").text(sum);\n\t}", "function change_quantity_in_cart(itemid,mode){\n if(mode==1){\n cart_info[itemid].cart_item.quantity+=1;\n cart_info[itemid].cart_div.find(\".cart-item-quantity\")[0].value=cart_info[itemid].cart_item.quantity;\n }else if(mode==0){\n $(cart_info[itemid].cart_div).remove();\n delete cart_info[itemid]; \n }else if(mode==-1){\n if(cart_info[itemid].cart_item.quantity==1){\n return;\n }\n cart_info[itemid].cart_item.quantity-=1;\n cart_info[itemid].cart_div.find(\".cart-item-quantity\")[0].value=cart_info[itemid].cart_item.quantity;\n }\n \n}", "function or_change_quantity(supplier_id, product_id, qty)\n{\n\tsupplier_orders_list[supplier_id].products_list[product_id].quantity = qty;\n\tvar moq = order_list[product_id].pricing_list[supplier_id].moq;\n\tvar ioq = order_list[product_id].pricing_list[supplier_id].ioq;\n\tif ((qty<moq)||((qty-moq)%ioq!=0)) \n\t{\n\t\tsupplier_orders_list[supplier_id].products_list[product_id].moqioqflag = false;\n\t}\n\t//Recalculate MOv flag \n\tor_recalculate_mov_flag();\n\t//Change quantity in order list also \n\tchange_product_quantity(product_id);\n\t//Redraw the order review screeen\n\tredraw_order_review();\n}", "function handleQuantityChange (input) {\r\n // make sure the minimum value is 1\r\n if (input.value < 1) input.value = 1\r\n // make sure the maximum value is 10\r\n if (input.value > 10) input.value = 10\r\n\r\n // get the id(index of item with the modified quantity)\r\n const id = input.id[input.id.length - 1]\r\n // get price element using the id and retrive the price\r\n const priceEl = document.getElementById('price' + id)\r\n let price = priceEl.innerHTML\r\n price = price.substring(1).split(' ').join('') // remove any spaces from the text\r\n price = eval(price + '*' + input.value) // multiply the price by the new quantity value (input)\r\n price = price.toFixed(2) // fix it to 2 decimal places\r\n\r\n // get the price-tag element based on the id and update the price with the new price\r\n const priceTag = document.getElementById('pricetag' + id)\r\n priceTag.innerHTML = String(price)\r\n\r\n // re-calculate the cart total\r\n getCartTotal()\r\n}", "function quantityChanged(event) {\n var input = event.target\n if (isNaN(input.value) || input.value <=0) {\n input.value = 1\n }\n updateCartTotal()\n }", "function addItemToCart(e) {\n e.preventDefault();\n const { target } = e;\n if (target.classList.value !== \"product-box__btn\") {\n return;\n }\n const priceObj = target.parentNode.firstElementChild;\n const price = parseInt(priceObj.innerText);\n const qtyObj = priceObj.nextElementSibling.firstElementChild;\n // Regular expr.\n const re = /\\d+/gm;\n //input validation\n if (!re.test(qtyObj.value) || qtyObj.value <= 0) {\n alert(\"В поле введены некорректные данные!\");\n return false;\n }\n const qty = parseInt(qtyObj.value);\n qtyObj.value = \"\";\n cart.update(qty, price);\n}", "function updateCart(e) {\n event.preventDefault();\n var selectedProduct = e.target.productToPurchase.value;\n var selectedQuantity = e.target.quantityInCart.value;\n\n console.log(selectedProduct);\n console.log(selectedQuantity);\n\n // ++ to the timesClicked property for image user click on\n for(var i in Product.allProducts){\n if(selectedProduct === Product.allProducts[i].name){\n Product.allProducts[i].quantityInCart = selectedQuantity;\n console.log(Product.allProducts[i]);\n }\n }\n localStorage.setItem('shoppingCart', JSON.stringify(Product.allProducts));\n}", "function quantityChanged(event){\n let input = event.target;\n //restrict input to number and ensure its greater than 1.\n if(isNaN(input.value) || input.value <= 0){//isNan Checks if input is a number or not\n input.value = 1;\n }\n updateCartTotal()\n}", "function updateShoppingCart(){\n\t\"use strict\";\n\n\t\t$j('body').bind('added_to_cart', add_to_cart);\n\t\tfunction add_to_cart(event, parts, hash) {\n\t\t\tvar miniCart = $j('.shopping_cart_header');\n\t\t\tif ( parts['div.widget_shopping_cart_content'] ) {\n\t\t\t\tvar $cartContent = jQuery(parts['div.widget_shopping_cart_content']),\n\t\t\t\t$itemsList = $cartContent .find('.cart_list'),\n\t\t\t\t$total = $cartContent.find('.total').contents(':not(strong)').text();\n\t\t\tminiCart.find('.shopping_cart_dropdown_inner').html('').append($itemsList);\n\t\t\tminiCart.find('.total span').html('').append($total);\n\t\t\t}\n\t\t}\n}", "function changeqty(id, opr) {\n var num = Number($('.number' + id).text());\n if (isNaN(opr)) {\n if (opr == 'plus') {\n num++;\n } else if(opr == 'minus' && num > 1) {\n num--;\n } else {\n return false;\n }\n $(\"#select\" + id).val(num);\n } else {\n num = opr;\n }\n $('.number' + id).text(num);\n var price = $('.Mprice'+id).val();\n var new_price = num*Number(price);\n $('.modalprice'+id).text('$'+new_price.toFixed(2));\n showloader();\n}", "function fieldQuantityHandler(evt) {\r\n\t var variantId = parseInt($(this).closest('.cart-item').attr('data-variant-id'), 10);\r\n\t var variant = product.variants.filter(function (variant) {\r\n\t return (variant.id === variantId);\r\n\t })[0];\r\n\t var cartLineItem = findCartItemByVariantId(variant.id);\r\n\t var quantity = evt.target.value;\r\n\t if (cartLineItem) {\r\n\t updateVariantInCart(cartLineItem, quantity);\r\n\t }\r\n\t }", "function updateCartTotal() {\n var cartItemContainer = document.getElementsByClassName('cart-items')[0]\n var cartRows = cartItemContainer.getElementsByClassName('cart-row')\n var total = 0\n var quantityN = 0\n for (var i = 0; i < cartRows.length; i++) {\n var cartRow = cartRows[i]\n var priceElement = cartRow.getElementsByClassName('cart-price')[0]\n var cartPriceItem = cartRow.getElementsByClassName('cart-price-item')[0]\n var quantityElement = cartRow.getElementsByClassName('cart-quantity-input')[0]\n\n var price = priceElement.innerText.replace(' đ', '')\n var replaceAllPrice = price.replaceAll('.','')\n\n var quantity = quantityElement.value\n total = total + (replaceAllPrice * quantity)\n quantityN = parseFloat(quantityN + Number(quantity))\n //Format price item\n cartPriceItemFormat = replaceAllPrice * Number(quantity)\n cartPriceItem.innerText = new Intl.NumberFormat('vi').format(cartPriceItemFormat)\n }\n total = Math.round(total)\n document.getElementsByClassName('cart-total-price')[0].innerText = new Intl.NumberFormat('vi').format(total)\n document.getElementsByClassName('cart-total-quantity')[0].innerText = quantityN\n}", "function addQty() {\n \n connection.query( query , function (err, result, fields) {\n if (err) throw err;\n var productId = [];\n var stockQty = {};\n for(i = 0; i < result.length; i++){\n productId.push(result[i].id.toString() + \") \" + result[i].product_name);\n stockQty[result[i].id] = (result[i].stock_qty);\n }\n \n inquirer.prompt([\n {\n type: \"list\",\n message: \"Which item would you like to increase the stock on?\",\n name: \"item\",\n choices: productId\n },\n {\n type: \"input\",\n message: \"By how much?\",\n name: \"count\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n } \n\n ]).then(function(data){\n var itemId = data.item.split(\")\")[0];\n connection.query(\"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_qty: stockQty[parseInt(itemId)] += parseInt(data.count) \n },\n {\n id: itemId\n }\n ]);\n console.log(\"\\nQuantity Updated!\".green + \"\\n\");\n setTimeout (function(){\n start();\n }, 1500)\n })\n }); \n}", "function quanitityToCart(product) {\n let value = parseInt($(\"#amountOfBeer\").val());\n let isProductInCart = 0;\n for (let i = 0; i < cart.length; i++) {\n if (product.id === cart[i].id) {\n cart[i].inCart += value;\n isProductInCart++;\n }\n }\n if (isProductInCart == 0) {\n product.inCart = value;\n cart.push(product);\n }\n saveToLS();\n renderCart();\n}", "ADD_TO_CART(state, product) {\n // Check if cart is empty\n if (Object.keys(state.cart).length != 0) {\n for (const [key, value] of Object.entries(state.cart)) {\n // Check if product already in cart, then change quantity \n if (key === product.reference) {\n product.qty = value.qty + state.qty\n state.cart[key].qty = product.qty\n } else {\n state.cart[product.reference] = product\n }\n }\n } else {\n state.cart[product.reference] = product\n }\n }", "function getQty() {\n\t//create a loop to calculate the total number of items in a shopping cart\n\tlet qty = 0\n\tfor (let i=0; i <cart.length; i++) {\n\t\tqty += cart[i].qty\n\t}\n\treturn qty\n}", "function updateTotalCartPricing() {\r\n\t $('.cart .pricing').text(formatAsMoney(cart.subtotal));\r\n\t }", "function updatepurchase(newQty, id) {\n connection.query(\"UPDATE products SET stock_quantity =? WHERE idproducts =?\", [newQty, id], function (err, res) {\n if (err) throw err;\n });\n}", "function updateVariantInCart(cartLineItem, quantity) {\r\n\t var variantId = cartLineItem.variant_id;\r\n\t var cartLength = cart.lineItemCount;\r\n\t cart.updateLineItem(cartLineItem.variant_id, quantity).then(function(updatedCart) {\r\n\t var $cartItem = $('.cart').find('.cart-item[data-variant-id=\"' + variantId + '\"]');\r\n\t if (cartLineItem.quantity >= 1) {\r\n\t $cartItem.find('.cart-item__quantity').val(cartLineItem.quantity);\r\n\t $cartItem.find('.cart-item__price').text(formatAsMoney(cartLineItem.line_price));\r\n\t } else {\r\n\t $cartItem.addClass('js-hidden').bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function() {\r\n\t $cartItem.remove();\r\n\t });\r\n\t }\r\n\r\n\t updateCartTabButton();\r\n\t updateTotalCartPricing();\r\n\t if (updatedCart.lineItems.length < 1) {\r\n\t closeCart();\r\n\t }\r\n\t }).catch(function (errors) {\r\n\t console.log('Fail');\r\n\t console.error(errors);\r\n\t });\r\n\t }", "function quantityChanged(event) {\n let inputValue = event.target ;\n if (isNaN(inputValue.value) || inputValue.value <= 0 ) {\n inputValue.value = 1 ;\n }\n else if (event.target.classList.contains ('form-control')) {\n inputValue = inputValue.value;\n }\n updateCartTotal();\n}", "function updateCartTotal(){\n\tvar cartItemContainer = document.getElementsByClassName(\"cart-items\")[0];\n\tvar cartRows = cartItemContainer.getElementsByClassName(\"first-cart-row\");\n\tvar total = 0;\n\tfor (var i = 0; i < cartRows.length; i++) {\n\t\tvar cartRow = cartRows[i];\n\t\tvar priceElement = cartRow.getElementsByClassName(\"cart-price\")[0];\n\t\tvar quantityElement = cartRow.getElementsByClassName(\"cart-quantity-input\")[0];\n\t\tvar price = parseFloat(priceElement.innerText.replace(\"$\",\"\"));\n\t\tvar quantity = quantityElement.value;\n\t\ttotal = total + (price * quantity);\n\t}\n\ttotal = Math.round(total * 100) / 100;\n\tdocument.getElementsByClassName(\"cart-total-price\")[0].innerText = \"$\" + total;\n}", "function updateStorage(newStock, id, quantity, price, sales){\n var totalCost = quantity * price;\n var newSales = sales + totalCost;\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: newStock,\n product_sales: newSales\n },\n {\n item_id: id\n }\n ],\n function(err, res){\n if(err) throw err;\n console.log(colors.magenta(\"The total cost of your order is\",\"$\"+ totalCost + \"\\n\"));\n restartPrompt();\n }\n )\n}", "cartUpdate($target) {\n const itemId = $target.data('cart-itemid');\n const $el = $('#qty-' + itemId);\n const qty = parseInt($el.val(), 10);\n const oldQty = parseInt($el.data('orig-qty'), 10);\n\n // If quantity set to 0 (or otherwise falsey), confirm removal\n if (!qty) {\n const remove = confirm(Theme.messages.cart.remove_item);\n if (!remove) {\n $el.val(oldQty);\n return;\n }\n }\n\n // Disable the cart while updates are running...\n this.$cartContent.addClass('deactivated');\n this.$cartTotals.addClass('deactivated');\n\n utils.api.cart.itemUpdate(itemId, qty, (err, response) => {\n if (response.data.status === 'succeed') {\n // if the quantity is changed \"1\" from \"0\", we have to remove the row.\n const remove = (qty === 0);\n this.refreshContent(remove);\n } else {\n $el.val(oldQty);\n // TODO: Better error messages possible? 'out_of_stock' is a bit limiting.\n alert(response.data.errors.join('\\n'));\n this.$cartContent.removeClass('deactivated');\n this.$cartTotals.removeClass('deactivated');\n }\n });\n }", "function handleUpdate(e) {\n\tfor (let name in updatedQuantity) { // sample updatedQuantity: {usmc fitness book: \"20\", usmc pt shirt 1: \"9\"}\n\t\tcart.updateCart(name, +updatedQuantity[name])\n\t}\n\treRenderTableBody();\n\trenderCartTotal();\n}", "function updateProductQuantity(quantity, item_id) {\n var query = \"UPDATE products SET stock_quantity = ? WHERE item_id = ?\";\n connection.query(query, [quantity, item_id], function(err, item) {\n if(err) throw err;\n });\n }", "function updateStock(itm, newQty) {\n var sql = \"UPDATE product SET ? WHERE ?\";\n connection.query(sql, [{stock_quantity: newQty}, {item_id: itm}],function (err, res) {\n if (err) throw err;\n if (res.affectedRows != 1) {\n console.log(\"\\n\\n\");\n console.log(\"***** There may have been a error *****\");\n console.log(\"***** Report the following error to the administrator: pCO\" + res.affectedRows + \" *****\");\n }\n // connection.end();\n\n displayOrder(customerOrder);\n });\n}", "function updateStock() {\n\t\t\t\t\t\tupdatedStock = selectedProductDetails.stock_quantity - answer.quantity;\n\t\t\t\t\t}", "function increase() {\n var holdCount1 = count + 1;\n setCount(holdCount1);\n var holdItem1 = props;\n window.localStorage.setItem(JSON.stringify(holdItem1), holdCount1);\n cartContext.setCartTotal(calTotal());\n }", "function updateCart(){\n let cartNumStored = JSON.parse(localStorage.getItem('cartNum'));\n let selectedQty = parseInt(document.getElementById('qtyNum').value);\n let cartNum = document.getElementById('cart').text;\n cartNum = cartNum.replace('CART (', '');\n cartNum = cartNum.replace(')',''); \n if (cartNumStored) {\n localStorage.setItem('cartNum',JSON.stringify('CART ('+ (selectedQty + parseInt(cartNum)) + ')'));\n document.getElementById('cart').text = 'CART ('+ (selectedQty + parseInt(cartNum)) +')';\n }\n else { \n localStorage.setItem('cartNum',JSON.stringify('CART (' + selectedQty + ')'));\n document.getElementById('cart').text = 'CART (' + selectedQty + ')'; \n }\n}", "function increase() {\n if (quantity >= 99) {\n return;\n }\n quantity += 1;\n\n if (quantity < 10) {\n counter.setAttribute('value', `0${quantity}`);\n } else {\n counter.setAttribute('value', quantity);\n }\n quantityPrice();\n}", "function changeAmountMore(id){\r\n\t$.get('/cartpurchase/unique/'+id,function(data){\r\n\t\tdata.obj.qtd++;\r\n\t\t$('#text'+id).val(data.obj.qtd);\r\n\t\t$.post('/cartpurchase/update',data).done(function(response){\r\n\t\t\tif(response.data.ok == true){\r\n\t\t\t\tconsole.log(\"cartpurchase updated\");\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}", "function updateQuantityDisplay(item){\n var itemDiv = document.getElementById(\"cart-item-\"+item.name);\n var input = itemDiv.querySelector(\".quantity-input\");\n var totalPrice = itemDiv.querySelector(\".total-price\")\n input.value = item.quantity;\n totalPrice.innerHTML = (input.value*item.price).toFixed(2)\n}", "function updateCartTotal() {\r\n var cartItemContainer = document.getElementsByClassName(\"cart-items\")[0];\r\n var cartRows = cartItemContainer.getElementsByClassName(\"cart-row\");\r\n var total = 0;\r\n for (var i = 0; i < cartRows.length; i++) {\r\n var cartRow = cartRows[i];\r\n var priceElement = cartRow.getElementsByClassName(\"cart-price\")[0];\r\n var quantityElement = cartRow.getElementsByClassName(\"cart-quantity-input\")[0];\r\n var price = parseFloat(priceElement.innerText.replace(\"€\", \"\"));\r\n var quantity = quantityElement.value;\r\n total = total + (price * quantity);\r\n }\r\n total = Math.round(total * 100) / 100;\r\n document.getElementsByClassName(\"cart-total-price\")[0].innerText = \"€\" + total;\r\n }", "function buyUpdate(id, quantity) {\n var isDupicate = false;\n\n //checks to see if the item is already in the cart\n for (var i in cart) {\n\n if (cart[i].id == id) {\n //if the item is already in the cart, it adds the quantity of the purchase to the quantity already in the cart\n cart[i].quantity += parseInt(quantity);\n isDupicate = true;\n\n //removes the quantity from the amount in stock\n for (var j in stock) {\n if (cart[i].id == stock[j].ItemID) {\n stock[j].StockQuantity -= quantity;\n }\n }\n }\n }\n\n //if not already in the cart\n if (!isDupicate) {\n\n //find the id in the stock array\n for (var k in stock) {\n if (stock[k].ItemID == id) {\n //push the item to the cart\n cart.push({\n id: id,\n name: stock[k].ProductName,\n quantity: parseInt(quantity),\n price: stock[k].Price\n });\n //subtract the user quantity wanted from the quantity in stock\n stock[k].StockQuantity -= quantity;\n }\n }\n }\n\n //display the updated stock\n displayStock();\n //display the shopping cart\n shoppingCart();\n //prompt the user to continue shopping or checkout\n promptOptions();\n}", "function addToCart(newProduct){\n let exist = false;\n\n cart.forEach(product => {\n if(product.product.id == newProduct.product.id){ \n exist = true;\n product.quantity += newProduct.quantity;\n \n }\n })\n if(!exist){ \n \n cart.push(newProduct);\n appendProduct(newProduct);\n }\n\n let $amount = document.getElementById(\"amount\");\n $amount.value = 0; \n}", "function updateQuantity() {\n connection.query(\"UPDATE products SET stock_quantity = stock_quantity - ? WHERE id = ?\",\n [\n quantityToBuy,\n itemToBuy\n ],\n function (err, res) {\n if (err) throw err;\n updateProductSale();\n })\n}", "function UpdateCart(quantityChanged, target, type, idx) {\n var cartContainer = document.getElementsByClassName('products')[0];\n var allproducts = cartContainer.getElementsByClassName('product');\n var totalprice = 0;\n for (var i = 0; i < allproducts.length; i++) {\n var CartProduct = allproducts[i];\n var price1kgProduct = CartProduct.getElementsByClassName('product-price-1kg')[0];\n var quantity1kgProduct = CartProduct.getElementsByClassName('product-quantity-1kg-input')[0];\n var price1kgNumber = parseFloat(price1kgProduct.innerText.replace('$ - 1KG', ''));\n var quantity1kg = quantity1kgProduct.value;\n var priceHalfkgProduct = CartProduct.getElementsByClassName('product-price-Halfkg')[0];\n var quantityHalfkgProduct = CartProduct.getElementsByClassName('product-quantity-Halfkg-input')[0];\n var priceHalfkgNumber = parseFloat(priceHalfkgProduct.innerText.replace('$ - 0.5KG', ''));\n var quantityHalfkg = quantityHalfkgProduct.value;\n totalprice = totalprice + (price1kgNumber * quantity1kg) + (priceHalfkgNumber * quantityHalfkg);\n }\n totalprice = Math.round(totalprice * 100) / 100\n document.getElementsByClassName('cartTotaPrice')[0].innerText = updateTotalPriceData() + '$';\n sessionStorage.setItem('CartTotalPrice', totalprice);\n if (quantityChanged) {\n console.log(target);\n QuantityFromIceCream[idx][type] = +target.value;\n updateShoppingCart();\n }\n //()\n\n}", "function proforma_qty(item){\n\tif(jQuery('div#tabella').attr('qty')=='1'){\n\t\tvar pers = parseInt(jQuery('#pers').val());\n\t\tvar jours = parseInt(jQuery('#jours').val());\n\t\t//set the quantity\n\t\tif(jQuery(item).attr('id')=='pers'){\n\t\t\tjQuery(\"input[class='qty']\").each(function(){\n\t\t\t\tif(jQuery(this).val()!=''){\n\t\t\t\t\tjQuery(this).val(pers*jours);\t\n\t\t\t\t}\t\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tjQuery(item).parents('td').next().children().children('input').val(pers*jours);\n\t\t}\n\t}\n}", "updateProductInCart(product) {\n \n //1. fetch value of local storage's cartData. \n var cart = JSON.parse(localStorage.getItem(\"cartData\"));\n console.log(\"Cart BEFORE update: \" + cart);\n\n //2. Find the product in cart\n for(var i = 0; i < cart.length; i++) { \n if(cart[i].productId === product.productId) {\n //update count field\n cart[i].productCurrentCount = product.productCurrentCount;\n }\n }\n\n //store this updated cart in local storage\n localStorage.setItem('cartData', JSON.stringify(cart));\n console.log(\"Cart with updated count of product : \" + JSON.stringify(cart));\n }", "function askQty() {\n inquirer\n .prompt({\n type: \"input\",\n name: \"itemQTY\",\n message: \"Enter the quantity you would like to add.\",\n })\n .then(function(answer) {\n productQTY = parseInt(answer.itemQTY);\n \n connection.query(\"SELECT * FROM products WHERE id = ?\", [productID], function(err, res){\n var stock_quantity = parseInt(res[0].stock_quantity);\n\n connection.query(\"UPDATE products SET ? WHERE ?\",\n [\n {stock_quantity : stock_quantity + productQTY\n },\n {\n id: productID \n },\n ], function(err, res) {\n if (err) throw err;\n\n console.log(\"\\n\");\n console.log(\"Product quantity has been updated\");\n promptMgr()\n });\n\n });\n });\n}" ]
[ "0.76549107", "0.7472356", "0.73232776", "0.7242217", "0.7199553", "0.71862316", "0.71473205", "0.7066441", "0.7063071", "0.7050778", "0.70344615", "0.70184684", "0.7004955", "0.69976413", "0.697558", "0.6970132", "0.6938334", "0.69203526", "0.68757105", "0.6842128", "0.68308264", "0.68081766", "0.68022937", "0.67951196", "0.6790451", "0.67689115", "0.6766043", "0.6761784", "0.6760481", "0.6750692", "0.6734254", "0.6733394", "0.6729404", "0.6726124", "0.672195", "0.6713099", "0.6694132", "0.6691197", "0.6683682", "0.66659254", "0.6661912", "0.6649152", "0.6615688", "0.66047513", "0.66031325", "0.65959454", "0.6595324", "0.65866333", "0.6566149", "0.6564216", "0.65627515", "0.65537286", "0.6552075", "0.6551444", "0.6515087", "0.650131", "0.6491143", "0.6488518", "0.64829123", "0.64747566", "0.6473478", "0.6471046", "0.6458784", "0.6457863", "0.6449225", "0.64489186", "0.6430434", "0.64233243", "0.64227855", "0.6419861", "0.64110845", "0.6407194", "0.63939893", "0.6389739", "0.63845474", "0.6378118", "0.637144", "0.6371155", "0.63710034", "0.6370549", "0.6358039", "0.6349878", "0.63498175", "0.6342059", "0.63275045", "0.63247406", "0.6317416", "0.63144594", "0.6313082", "0.63128346", "0.6307849", "0.6306635", "0.6304595", "0.63010955", "0.6299649", "0.6295038", "0.6293523", "0.6293438", "0.62933356", "0.6285757" ]
0.6294214
96
fjx end make room for footer
function giveFooterSomeRoom() { footer = $('footer#footer'); padding = footer.outerHeight(); $('body').css('padding-bottom',padding); // console.log('padding applied'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderFooter() {\n return null;\n }", "function footerBottom(){\n\tvar $footer = $('.footer');\n\tif($footer.length){\n\t\tvar $tplSpacer = $('<div />', {\n\t\t\tclass: 'spacer'\n\t\t});\n\n\t\t$('.main').after($tplSpacer.clone());\n\n\t\t$(window).on('load resizeByWidth', function () {\n\t\t\tvar footerOuterHeight = $footer.outerHeight();\n\t\t\t$footer.css({\n\t\t\t\t'margin-top': -footerOuterHeight\n\t\t\t});\n\n\t\t\t$('.spacer').css({\n\t\t\t\t'height': footerOuterHeight\n\t\t\t});\n\t\t});\n\t}\n}", "displayFooter() {\n }", "function footerStickToBottom(e) {\n $(e).css(\"margin-top\", \"auto\");\n heightWindow = $(window).outerHeight();\n heightBody = $(\"html\").outerHeight();\n heightFooter = $(e).outerHeight();\n if (heightBody < heightWindow) {\n $(e).css(\"margin-top\", heightWindow - heightBody);\n }\n }", "goToFooter() {\n this.owner.enableHeaderAndFooter = true;\n this.enableHeadersFootersRegion(this.start.paragraph.bodyWidget.page.footerWidget);\n }", "function footer() {\n //eliminando las clases para tener la medida correcta total\n $(\"footer\").removeClass(\"uno\"); \n $(\"footer\").removeClass(\"dos\");\n let elem = $(\"body\").find(\"div\").first().height();//medida de todo el html\n let windowh = window.innerHeight; //medida de la ventana\n //console.log(elem);\n //console.log(windowh);\n if (elem >= windowh) {\n $(\"footer\").addClass(\"dos\"); //aplicar posicion relative\n } else {\n $(\"footer\").addClass(\"uno\"); //aplicar posicion fixed\n }\n }", "function initFooterSize(){\n\tvar footer = parent.$('south_tabs');\n\tif(footer){\n\t\tvar width = 50;\n\t\tif(parent.Ext && parent.Ext.isStrict) width = 52;\n\t\tEvent.observe(window, 'resize', function(){\n\t\t\tfooter.style.width = (document.body.offsetWidth - width) + \"px\";\n\t\t});\n\t\tfooter.style.width = (document.body.offsetWidth - width) + \"px\";\n\t}\n}", "function footer_at_bottom() {\n\n var winWidth = $(window).width();\n var $footer = $('#footer');\n var $wrapper = $('#wrapper');\n var $footer_height = $footer.height();\n\n winWidth >= 960 ? $wrapper.css('paddingBottom',$footer_height) : $wrapper.css('paddingBottom',0)\n\n\n }", "function EMBEDDED_FOOTER$static_(){ToolbarSkin.EMBEDDED_FOOTER=( new ToolbarSkin(\"embedded-footer\"));}", "function FOOTER$static_(){ToolbarSkin.FOOTER=( new ToolbarSkin(\"footer\"));}", "function printFooter()\r\n{\r\n\ttry\r\n\t{\r\n\r\n\t\tpdfxml += '</body></pdf>';\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t\terrorHandler('printFooter', e);\r\n\t}\r\n}", "function appendFooter(){\n var footer = \"<div class='footer'>\";\n footer += \"<center><div class='copyrightText'>&copy; 2017 ITEE Group Canada</div></center>\";\n footer += \"</div>\";\n $('body').append(footer);\n }", "function footer_func(){\n showfooter();\n hideicon();\n }", "function fixedFooter() {\n $('#master').css('min-height', 0);\n var heightNeed = 0;\n // Caculate height, do no included padding\n heightNeed = $(window).height() - ($('#header').height() + $('#footer').height() + $('#toolbar').height());\n\n $('#master').css('min-height', heightNeed - 30);\n }", "createFooter(footer) {\n footer.appendChild(footerTemplate.content);\n }", "function makeFooter() {\n return new Ext.Panel({\n region: 'south',\n height: 30,\n cls: 'footer-panel',\n html: '<div class=\"footer\">'\n + '<p>Wanderwerk V1.02. Edité le 21.10.13. Créé par <a href=\"http://ch.linkedin.com/in/benjamingerber\" target=\"_blank\" title=\"Voir le profil LinkedIn\" >Benjamin Gerber</a>, supporté par les <a href=\"http://www.scout-perceval.ch/\" target=\"_blank\" title=\"Voir le site des Scouts Perceval de Moutier\">Scouts Perceval de Moutier</a>. Application open source, disponible sur <a href=\"https://github.com/ger-benjamin/wanderwerk\" target=\"_blank\" title=\"Voir le code source\">github</a>. Sous licence <a href=\"http://creativecommons.org/licenses/by-nc/2.5/ch/deed.fr\" target=\"_blank\" title=\"Voir la licence\" >Creative Commons BY-NC</a></p>'\n + '</div>'\n });\n}", "genFooterContent() {\n return <Footer />;\n }", "function commonFooter() {\n var text;\n text = botTable();\n text += \"<table style='margin-bottom:40px; margin-top:20px; width:100%;'>\";\n text += \"<tr><td style='text-align:left; vertical-align:bottom;'>\" + foot1() + \"</td>\";\n text += \"<td id='tdMathJaXFooter' style='text-align:center; vertical-align:bottom;'>\" + mathJaXImgAnchor + \"<br />beautiful math</td>\";\n text += \"<td id='tdJSXGraphFooter' style='text-align:center; vertical-align:bottom;'>\" + jsxGraphImgAnchor + \"<br />beautiful graphics</td>\";\n text += \"<td id='tdTermsOfUseFooter' style='text-align:right; vertical-align:bottom;'>\" + foot3() + \"<td></tr>\";\n text += \"</table>\";\n return text;\n}", "function putYourRightFootIn(){}", "addFooters() {\n /* Add footers for modified rows */\n this.gridApi.forEachNodeAfterFilterAndSort((node) => {\n if (node.data.hadronDocument.isModified()) {\n this.addFooter(node, node.data, 'editing');\n }\n });\n }", "getFooter() {\n return '</quiz>';\n }", "function footerSize() {\n var footerOuterHeight = $('footer').outerHeight(true);\n var footerHeight = $('footer').height();\n $(\"body\").css(\"margin-bottom\", footerOuterHeight);\n /* Contact Us section on index.html & index_carousel.html \n should stick to footer */\n $(\"body.body_index\").css(\"margin-bottom\", footerHeight);\n return false;\n}", "function adjustFooter() {\n var windowHeight = $(window).height()\n var contentHeight = $(\"body\").height()\n \n var extraHeight = 0;\n if($(\"footer\").css(\"position\") == \"fixed\")\n {\n extraHeight = $(\"footer\").height() + 60\n }\n else\n {\n extraHeight = 0\n }\n \n if(contentHeight < windowHeight-extraHeight)\n {\n $(\"footer\").css({\n position: \"fixed\"\n })\n }\n else\n {\n $(\"footer\").css({\n position: \"static\"\n })\n }\n \n $(\"footer\").show() // Hidden in CSS by default\n }", "function footer() {\n var amountCompleted = ctrl.amountCompleted();\n var amountActive = ctrl.list.length - amountCompleted;\n \n return E('footer') . is ({ id: 'footer' }) . has([\n \n E('span') . is ({ id: 'todo-count' }) . has([\n// E('strong') . has (T(F`${count} items left`)) // jshint ignore:line\n ]),\n \n // Filters (all, active, completed)\n E('ul') . is({ id: 'filters' }) . has ([\n E('li') . has(T(\"All\")) . does({ click: _ => data.filter = 'all' }),\n E('li') . has(T(\"Active\")) . does({ click: _ => data.filter = 'active' }),\n E('li') . has(T(\"Completed\")) . does({ click: _ => data.filter = 'completed' })\n ]),\n \n /* jshint ignore:start */\n E('button') .\n has (T(F`Clear completed ${completedcount}`)) . // jshint ignore:line\n is ({ id: 'clear-completed' }) .\n does({ click: _ => 0 }) //clearCompleted })\n /* jshint ignore:end */\n ]);\n }", "function EMBEDDED_FOOTER_GRID_100$static_(){ToolbarSkin.EMBEDDED_FOOTER_GRID_100=( new ToolbarSkin(\"embedded-footer-grid-100\"));}", "function footer( conteudo ){\n\n tabela.find('tfoot').remove();\n\n var footer = elementoTfooter.clone();\n\n content = $('<tr>').html( $('<td>').attr('colspan',elementoLinha.find('td').length).html( conteudo ) );\n\n tabela.append( footer.append( content ) );\n\n }", "adjustFooterView() {\n setTimeout(function () {\n if (document.querySelector('.footer-section')) {\n document.querySelector('.footer-section').style.paddingBottom = document.querySelector('.order-summary-section').offsetHeight + 'px';\n } else if (document.querySelector('.vx-employee-footer')) {\n document.querySelector('.vx-employee-footer').style.paddingBottom = document.querySelector('.order-summary-section').offsetHeight + 'px';\n }\n }, 50);\n }", "function setFooter() {\n\n // Remove prop from content\n $content.css( \"min-height\", \"\" );\n\n if ( $win.height() > $content.outerHeight() + $footer.outerHeight() ) {\n // Calculate the desired height\n let targetHeight = $win.height() - $footer.outerHeight();\n $content.css( \"min-height\", targetHeight + \"px\" );\n } else {\n // Clear the min height\n $content.css( \"min-height\", \"\" );\n }\n\n }", "chargerFooter(){\n $(\"#page\"+this.instrument.ref).append('<div data-role=\"footer\" data-position=\"fixed\" data-tap-toggle=\"false\" data-fullscreen=\"false\" data-theme=\"b\">\\\n <div data-role=\"navbar\" data-grid=\"\" data-iconpos=\"left\">\\\n <ul id=\"menu\">\\\n <li><a href=\"#pageEtat\">Etat</a></li>\\\n <li><a href=\"#pageInstruments\"> Instruments</a></li>\\\n <li><a href=\"#pageCommande\">Commande</a></li>\\\n <li><a href=\"#pageConfiguration\"> Configuration</a></li>\\\n </ul>\\\n </div>\\\n </div>');\n }", "closeHeaderFooter() {\n this.disableHeaderFooter();\n }", "function addFooter(report) {\r\n report.getFooter().addClass(\"footer\");\r\n var versionLine = report.getFooter().addText(\"Banana Accounting 8\" + \" - \", \"description\");\r\n report.getFooter().addText(\"Pagina \", \"description\");\r\n report.getFooter().addFieldPageNr();\r\n}", "updateFooter() {\n // Get new footer row HTML string\n let newFoot = footer.render();\n // Add new footer row to table footer\n this.footer.appendChild(newFoot);\n }", "function footerAdj() {\n\t\tvar footerH = $(\".footer\").innerHeight();\n\t\t$(\".footer\").css({ \"margin-top\": -footerH });\n\t\t$(\".main-content\").css({ \"padding-bottom\": footerH });\n\t}", "function handleFooterPositioning() {\n if (footer) {\n let maxCoord = Math.max(window.innerHeight - 80, document.body.offsetHeight) - 80;\n footer.style.top = maxCoord + \"px\";\n footer.style.visibility = \"visible\";\n }\n}", "function footerAlign() {\r\n jQuery('.site-footer').css('display', 'block');\r\n jQuery('.site-footer').css('height', 'auto');\r\n var footerHeight = jQuery('.site-footer').outerHeight();\r\n jQuery('.footer-fixed > .page-wraper').css('padding-bottom', footerHeight);\r\n jQuery('.site-footer').css('height', footerHeight);\r\n}", "function addFooter(report) {\n report.getFooter().addClass(\"footer\");\n var versionLine = report.getFooter().addText(\"Banana Accounting - Page \", \"description\");\n report.getFooter().addFieldPageNr();\n}", "function initFooter() {\n\t\n\t//hide the timeline feature first before creating content\n\t$('.inner').hide();\n\t$('#playNext').hide();\n\n\t//create elements of the timeline\n\tinitPhaseLabels();\n\tinitDayList();\n\tinitSliderBoxContent();\n\tinitPlayBtn();\n\n\t//add functionality, must come after creation of elements\n\tmoveSliderBox_onClick();\n\tretractableTimeline();\n\thighlightPhase();\n\n}", "function setFooterPosition() {\n\tif ($(\"#footerBlock\").length > 0) {\n\t\t$mainHolder.addClass(\"full\"); // height 100%\n\t\t\n\t\tvar chHeight = $contentHolder.height() + parseInt($contentHolder.css(\"padding-top\")) + parseInt($contentHolder.css(\"padding-bottom\")),\n\t\t\thbHeight = $headerBlock.height() + parseInt($headerBlock.css(\"padding-top\")) + parseInt($headerBlock.css(\"padding-bottom\")),\n\t\t\tfbHeight = $footerBlock.height() + parseInt($footerBlock.css(\"padding-top\")) + parseInt($footerBlock.css(\"padding-bottom\")) + parseInt($footerBlock.css(\"margin-top\")),\n\t\t\tmhHeight = $mainHolder.height() + parseInt($mainHolder.css(\"padding-top\")) + parseInt($mainHolder.css(\"padding-bottom\"));\n\t\t\n\t\t$mainHolder.removeClass(\"full\");\n\t\t\n\t\tif (chHeight + hbHeight + fbHeight > mhHeight) {\n\t\t\t$footerBlock.css(\"position\", \"relative\");\n\t\t} else {\n\t\t\t$footerBlock.css(\"position\", \"absolute\");\n\t\t}\n\t}\n}", "get footer() { return $('#page-footer'); }", "function buildFooter() {\r\n $(\"#footer\").html(\r\n `\r\n <hr>\r\n My Sheridan Program: <em>${meArr[0].program}</em><br>\r\n My Home Country: <em>${meArr[0].hCountry}</em>\r\n `\r\n );\r\n $(\"#footer\").addClass(\"bottom\");\r\n}", "function addFooter(report) {\n\tvar date = new Date();\n\tvar d = Banana.Converter.toLocaleDateFormat(date);\n\treport.getFooter().addClass(\"footer\");\n\tvar versionLine = report.getFooter().addText(d + \" - Trial balance - Page \", \"description\");\n\treport.getFooter().addFieldPageNr();\n}", "function accordionFooter() {\n return '</table></div></div></div></div>';\n}", "function createFooter() {\n var foot = document.createElement(\"footer\");\n foot.setAttribute(\"class\", \"footer fixed-bottom mt-auto py-2\");\n \n var footDiv = document.createElement(\"div\");\n footDiv.setAttribute(\"class\", \"container-fluid\");\n \n var footDivSpan = document.createElement(\"span\");\n footDivSpan.setAttribute(\"class\", \"text-muted\");\n footDivSpan.innerHTML =\n 'Designed with <i class=\"fas fa-heart\" style=\"color:red\"></i> by Prashant Gupta(<a href=\"https://github.com/codyprashant/new-york-times-api\" target=\"_blank\" style=\"color: crimson;\">@codyPrashant</a>)';\n \n footDiv.appendChild(footDivSpan);\n foot.appendChild(footDiv);\n \n return foot;\n }", "function eltdSetContentBottomMargin(){\n var uncoverFooter = $('.eltd-footer-uncover');\n\n if(uncoverFooter.length){\n $('.eltd-content').css('margin-bottom', $('.eltd-footer-inner').height());\n }\n }", "function renderFooter() {\n\t\tfooter.setToolbarOptions(computeFooterOptions());\n\t\tfooter.render();\n\t\tif (footer.el) {\n\t\t\telement.append(footer.el);\n\t\t}\n\t}", "function fixedFooter() {\n if( $(window).width() < 480) {\n setNoFixedFooter();\n } else {\n setFixedFooter();\n }\n }", "_getFooterHeight() {\n const layoutFooter = this.getLayoutFooter()\n\n if (!layoutFooter) return 0\n\n return layoutFooter.getBoundingClientRect().height\n }", "function setFooterPos() {\n var $footer = $('.footer-section'),\n $main = $('.main-container'),\n viewport = $(window).height() - $('.header-section').height() - $('.footer-section').height();\n\n if( $main.height() > viewport ) {\n $footer.addClass('static');\n $('.progress-wrapper').addClass('bottom');\n }\n}", "function createFooter() {\r\n var foot = document.querySelector('tfoot');\r\n foot.innerHTML = '';\r\n newRow = addElement('tr', '', foot);\r\n addElement('th', 'Totals', newRow);\r\n for (var i = 0; i < times.length; i++) {\r\n var hourTotal = 0;\r\n for (var j = 0; j < Store.stores.length; j++) {\r\n hourTotal += Store.stores[j].hourlySales[i];\r\n }\r\n addElement('td', hourTotal, newRow);\r\n }\r\n}", "function animate_footer() {\n\t\t\t\t$('#footer-container').animate({'background-position-y': '-611px'}, 60000, 'linear', function() {\n\t\t\t\t\tanimate_footer();\n\t\t\t\t});\n\t\t\t}", "function buildEnd(options) {\n html += `</main>\n\n <footer>\n <p>Copyright info?</p>\n </footer>\n </body>\n </html>`\n}", "function autoFooter() {\n\tvar wrapper = $('.wrapper'),\n\t\tfooter = $('.footer'),\n\t\tfooterHeight = footer.outerHeight();\n\tfooter.css('margin-top', -footerHeight);\n\twrapper.css('padding-bottom', footerHeight);\n}", "appendFooter(tagName){\n return this.footer.append(tagName);\n }", "function getFooter() {\n return `</div>\n </div>\n </body>\n </html>`;\n}", "function adaptFooterPosition() {\n if(!$('#player').is(':empty')){\n footer.css(\"margin-bottom\", \"100px\")\n }\n}", "function afterFooter() {\n // Get Cartridge Cache\n var cache = dw.system.CacheMgr.getCache('DevToolsCache');\n\n // Write log types to their own cache key ( 128KB max per key )\n cache.put('debug', Debugger.debug);\n cache.put('error', Debugger.error);\n cache.put('fatal', Debugger.fatal);\n cache.put('info', Debugger.info);\n cache.put('log', Debugger.log);\n cache.put('warn', Debugger.warn);\n\n // Render Remote Include to Prevent ISML Bug\n var velocity = require('dw/template/Velocity');\n velocity.render('$velocity.remoteInclude(\\'DevTools-AfterFooter\\')', {\n velocity: velocity\n });\n}", "function callFooterFunctions() {\n columnSum();\n totalTotalSum();\n makeTotalsRender();\n}", "function fixFoot() {\n var tfoot = $(settings.table).find(\"tfoot\");\n var tr = tfoot.find(\"tr\");\n var cells = tfoot.find(\"tr > *\");\n\n setBackground(cells);\n cells.css({\n 'position': 'relative'\n });\n }", "function _generateFooterReport() {\n\t\n\n\tthis.htmlFile.writeln( \"</body>\");\n\tthis.htmlFile.writeln( \"</html>\");\n}", "function animateFooter(fc, id) {\n fc.css(\"display\", \"block\");\n anime({\n targets: id + ' .wpc-footer > .names',\n translateX: 100 + \"px\",\n opacity: [1, 0],\n // scale: [.75, .9],\n delay: function (el, index) {\n return index * 380;\n },\n direction: 'reverse'\n });\n }", "function footer( text ) {\n var textObject = game.add.text(\n game.world.width, game.world.height, text,\n { font: game.vars.font.footer(), fill: game.vars.font.fill, align: \"right\" }\n );\n textObject.anchor.set( 1, 1 );\n\n return textObject;\n }", "function tail() {\n\tvar element = document.createElement('div')\n\telement.setAttribute('class', 'flexbox-item footer')\n\telement.setAttribute('align', 'center')\n\telement.innerHTML = 'Canvas-Window Resize'\n\treturn element\n}", "function footerAlwayInBottom(footerSelector) {\n var docHeight = $(window).height();\n var footerTop = footerSelector.position().top + footerSelector.height();\n if (footerTop < docHeight) {\n footerSelector.css(\"margin-top\", (docHeight - footerTop) + \"px\");\n }\n }", "function placeFooter() {\n $('#footer').css({ 'margin-top': 0 });\n windowHeight = $(window).height();\n windowWidth = $(window).width();\n var windowH = $(window).height();\n var wrapperH = $('#header').height() + $('#page_title').height() + $('#content').height();\n if( windowH > wrapperH ) {\n $('#footer').css({ 'margin-top': ( windowH - wrapperH ) }); \n }\n}", "function addFooter() {\r\n const contentsSrc = 'MasterPage/footer_contents.txt';\r\n if (document.getElementById) {\r\n let footer = document.getElementById('footer');\r\n if (footer) {\r\n let pathPrefix = relativePath();\r\n let footerContents = readContents(pathPrefix + contentsSrc);\r\n if (footerContents) { \r\n placeInOuterHtml(footer, footerContents);\r\n }\r\n }\r\n } \r\n}", "function makeFooter(dpid, table, ftr_format, cell_format) {\n\n var $footer = $('<table></table>').addClass('oneliner');\n\n var $col = $('<tr></tr>');\n for (var i in table.extra.labels) {\n var item = table.extra.labels[i];\n var $hdr = $('<td></td>');\n var label = ftr_format(item);\n var data = cell_format(table.extra.data[item]);\n $hdr.text(label + \" : \" + data);\n $col.append($hdr);\n }\n $footer.append($col);\n table['$footer'] = $footer;\n }", "function _getHeaderFooter(group, options){\n\t\tvar header = webix.html.create(\"div\", { \n\t\t\t\"class\":\"webix_view webix_print_\"+group.toLowerCase(),\n\t\t\t\"style\":\"height:0px;visibility:hidden;\"\n\t\t}, options[\"doc\"+group]);\n\n\t\tif(group ===\"Header\")\n\t\t\twebix.html.insertBefore(header, document.body.firstChild);\n\t\telse\n\t\t\tdocument.body.appendChild(header);\n\n\t\toptions[\"doc\"+group] = header;\n\t}", "function insertFooter () {\n \"use strict\";\n try {\n var footer;\n\t\t\t/* There are at least one, and maybe more, courses that are developed in partnership with BYU or BYU-Hawaii and require that to be displayed in the copyright. Checking here for customCopyright allows for those courses to create this variable with the custom text in the course.js file before the online.js is appended and then will use the custom text */\n\t\t\tif (typeof customCopyright === \"undefined\") {\n\t\t\t\tfooter = \"<div id='footer'>Copyright &copy; \" + new Date().getFullYear() + \" by Brigham Young University - Idaho. All Rights Reserved.</div>\";\n\t\t\t} else {\n\t\t\t\tfooter = \"<div id='footer'>\" + customCopyright + \"</div>\";\n\t\t\t}\n document.getElementById(\"main\").insertAdjacentHTML(\"beforeend\", footer); \n } catch (ex) {\n console.log(ex.name + \": \" + ex.message);\n }\n }", "function footer(){\ndiv= document.createElement(\"div\");\ndiv.className=\"bg-dark justify-content-center p-4 \";\n// adding techs used ---------------------------\ntech = document.createElement(\"p\");\ntech.innerHTML=`Techs Used - <span>html,css,bootstrap,javascript</span>`;\ntech.id=\"tech\";\ndiv.appendChild(tech);\n// adding Content Disclamier---------------------\ncontent = document.createElement(\"p\");\ncontent.innerHTML=`Content Disclamier - <span>The contant of this website is taken from <a href=\"https://api.openbrewerydb.org/breweries\">Open Brewery</a></span>`;\ncontent.id=\"content\";\ndiv.appendChild(content);\n// adding social media icons --------------------\nsocialmedia = document.createElement(\"p\");\nsocialmedia.innerHTML=`<a href=\"#\" class=\"fab fa-facebook-f\"></a> <a href=\"#\" class=\"fab fa-twitter\"></a> <a href=\"#\" class=\"fab fa-google\"></a> <a href=\"#\" class=\"fab fa-linkedin-in\"></a> <a href=\"#\" class=\"fab fa-youtube\"></a>`;\nsocialmedia.id=\"social\"\ndiv.appendChild(socialmedia);\nroot.appendChild(div); // adding all things to main root element \n}", "createFooter(buttons) {\n const footer = new Widget();\n footer.addClass('jp-Dialog-footer');\n each(buttons, button => {\n footer.node.appendChild(button);\n });\n Styling.styleNode(footer.node);\n return footer;\n }", "function checkOffset() {\n var b = $(window).scrollTop();\n var c = $(\"#SideNav\").height();\n var d = $(window).height();\n var f = $(\"#footer_element\").offset().top - 20; // footer margin = 20\n \n if (f-b<d) { //footer overlapping bottom\n $(\"#SideNav\").css(\"height\", f-b -100) //offset 150 for 85px header and margins \n $(\"#RightBar\").css(\"height\", f-b -100)\n } else {\n $(\"#SideNav\").css(\"height\", $(window).height() -100)\n $(\"#RightBar\").css(\"height\", $(window).height() -100)\n }\n $(\"#DisplaySettingsDiv\").css(\"width\", $(\"#DataToExport\").width() + 5)\n $(\"#DataToExport\").css(\"top\", $(\"#DisplaySettingsDiv\").height() + 10)\n}", "function adjustFooter() {\n\tvar winHeight = $(window).height(),\n\tbody_h = $('body').height();\n\tif (winHeight > body_h) {\n\t\t$('footer').addClass('navbar-fixed-bottom');\n\t}\n}", "function getFooterHeight(){\n return $('footer').outerHeight();\n}", "function stickyFooter(){\n\t\n\t\tvar HeaderAndFooter = 60;\n\t\tvar windowHeight = $(window).height();\n\t\tvar setMainSectionHeight = windowHeight - HeaderAndFooter;\n\n\t\t$(\"#main\").css(\"min-height\", setMainSectionHeight);\n\t}", "fixFooterWidths() {\n this.fixCellWidths();\n }", "fixFooterWidths() {\n this.fixCellWidths();\n }", "function addFooter(banDoc, report) {\r\n\treport.getFooter().addClass(\"footer\");\r\n\treport.getFooter().addText(\"[Banana Accounting, v. \" + banDoc.info(\"Base\", \"ProgramVersion\") + \", \" + scriptVersion + \"] - Page \", \"footer\");\r\n\treport.getFooter().addFieldPageNr();\r\n}", "function getFooterHeight () {\n var footerHeight = $('.footer').outerHeight();\n\n $('.career-description').css({'margin-bottom': footerHeight});\n $('.job-single__description').css({'margin-bottom': footerHeight});\n }", "function FooterBase () {\n return (\n <>\n <hr className='line'/>\n <div className='footer-base'>\n <div className='left'>\n <p>Copyright 2020. All rights reserved</p>\n </div>\n <div className='right'> \n <ul className='policies'>\n <li>Terms &amp; Conditions</li>\n <li>Cookie Policy</li>\n <li>Privacy Policy</li>\n </ul>\n </div>\n </div>\n </>\n )\n}", "function composeBottomPage()\n {\n buildBottomPage();\n //ddCont[ ddCont.length - 1 ].pageBreak = 'after';\n }", "function createDefaultFooter() {\n footer = document.createElement(\"footer\");\n\n let footerContainer = document.createElement(\"div\");\n footerContainer.setAttribute(\"id\", \"footerContainer\");\n footer.appendChild(footerContainer);\n\n let zaanLogo = document.createElement(\"img\");\n zaanLogo.setAttribute(\"src\", \"/img/ZAAN/ZAAN_Logo_Invert_NoText.svg\");\n zaanLogo.setAttribute(\"height\", \"60px\");\n zaanLogo.setAttribute(\"alt\", \"ZAAN Games Logo\");\n zaanLogo.setAttribute(\"onerror\", \"this.src='./img/ZAAN/ZAAN_Logo_Invert_NoText_Small.png\");\n footerContainer.appendChild(zaanLogo);\n\n let emailParagraph = document.createElement(\"p\");\n let emailText = document.createTextNode(\"General @ Mytholympics.com\");\n emailParagraph.appendChild(emailText);\n footerContainer.appendChild(emailParagraph);\n\n let copyrightHeader = document.createElement(\"h2\");\n let copyrightText = document.createTextNode(\"ZAAN Games \\u00A9 2018\");\n copyrightHeader.appendChild(copyrightText);\n footerContainer.appendChild(copyrightHeader);\n\n document.body.appendChild(footer);\n\n handleFooterPositioning();\n}", "function create_fragment$P(ctx) {\n\t\tlet footer;\n\t\tlet current;\n\n\t\tfooter = new Full$1({\n\t\t\t\tprops: {\n\t\t\t\t\ticons: /*icons*/ ctx[2],\n\t\t\t\t\tcustomisations: /*customisations*/ ctx[0],\n\t\t\t\t\troute: /*route*/ ctx[1],\n\t\t\t\t\tcustomise: /*customise*/ ctx[3]\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn {\n\t\t\tc() {\n\t\t\t\tcreate_component(footer.$$.fragment);\n\t\t\t},\n\t\t\tm(target, anchor) {\n\t\t\t\tmount_component(footer, target, anchor);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\tp(ctx, [dirty]) {\n\t\t\t\tconst footer_changes = {};\n\t\t\t\tif (dirty & /*icons*/ 4) footer_changes.icons = /*icons*/ ctx[2];\n\t\t\t\tif (dirty & /*customisations*/ 1) footer_changes.customisations = /*customisations*/ ctx[0];\n\t\t\t\tif (dirty & /*route*/ 2) footer_changes.route = /*route*/ ctx[1];\n\t\t\t\tfooter.$set(footer_changes);\n\t\t\t},\n\t\t\ti(local) {\n\t\t\t\tif (current) return;\n\t\t\t\ttransition_in(footer.$$.fragment, local);\n\t\t\t\tcurrent = true;\n\t\t\t},\n\t\t\to(local) {\n\t\t\t\ttransition_out(footer.$$.fragment, local);\n\t\t\t\tcurrent = false;\n\t\t\t},\n\t\t\td(detaching) {\n\t\t\t\tdestroy_component(footer, detaching);\n\t\t\t}\n\t\t};\n\t}", "function footerHeight() {\n\t$('.footer').addClass('active');\n\t$('.footer_placeholder').height($('.footer').outerHeight());\n}", "function Footer() {\n return (\n <section id=\"footer\">\n <FooterContainer>\n <Row className=\"row\">\n \n <FontAwesomeIcon icon={faCoffee} pull=\"left\" />\n <FontAwesomeIcon icon={faGlobeAmericas} pull=\"right\"/>\n </Row>\n <Row className=\"row\">\n © Copyright 2020 Alex Hutchison\n </Row>\n </FooterContainer>\n </section>\n )\n }", "function footerRevealCalcs() {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $headerNavSpace = ($('body[data-header-format=\"left-header\"]').length > 0 && $window.width() > 1000) ? 0 : $headerOuterEl.outerHeight();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($window.height() - $wpAdminBar.height() - $headerNavSpace - $('#footer-outer').height() - 1 - $pageHeaderBG.height() - $('.page-header-no-bg').height() > 0) {\r\n\t\t\t\t\t\tvar $resizeExtra = ($('body:not(.material) #header-outer[data-header-resize=\"1\"]').length > 0) ? 55 : 0;\r\n\t\t\t\t\t\t$('body[data-footer-reveal=\"1\"] .container-wrap').css({\r\n\t\t\t\t\t\t\t'margin-bottom': $('#footer-outer').height() - 1\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$('.container-wrap').css({\r\n\t\t\t\t\t\t\t'min-height': $window.height() - $wpAdminBar.height() - $headerNavSpace - $('#footer-outer').height() - 1 - $('.page-header-no-bg').height() - $pageHeaderBG.height() + $resizeExtra\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$('body[data-footer-reveal=\"1\"] .container-wrap').css({\r\n\t\t\t\t\t\t\t'margin-bottom': $('#footer-outer').height() - 1\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($window.width() < 1000) {\r\n\t\t\t\t\t\t$('#footer-outer').attr('data-midnight', 'light');\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$('#footer-outer').removeAttr('data-midnight');\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function toggleFooter() {\r\n\t\t\tconsole.info('Info: Footer toggled.');\r\n\t\t\tif($(window).scrollTop() + $(window).height() + 80 >= $(document).height()) {\r\n\t \t\t\t$element.show();\r\n\t \t} else {\r\n\t\t\t\t$element.hide();\r\n\t\t\t}\r\n\t\t}", "hasFooter() {\n return visible(this.footer.node());\n }", "function Footer() {\n\treturn (\n\t\t<Container fluid>\n\t\t\t<Row>\n\t\t\t\t<Col\n\t\t\t\t\tclassName=\"text-light text-center\"\n\t\t\t\t\tstyle={{ backgroundColor: \"seagreen\" }}\n\t\t\t\t>\n\t\t\t\t\t&copy; Developed entirely by Mattia Lisciandrello, 2021.\n\t\t\t\t</Col>\n\t\t\t</Row>\n\t\t</Container>\n\t);\n}", "get footerDistance() {\n return this.footerDistanceIn;\n }", "function Footer(props) {\n return props.children || null;\n}", "function checkOffset() {\n var a=$(document).scrollTop()+window.innerHeight;\n var b=$('footer').offset().top + 20;\n if (a<b) {\n $('.floating-icons').css('bottom', '80px');\n } else {\n $('.floating-icons').css('bottom', (55+(a-b))+'px');\n }\n }", "Footer() {\n return (\n <div style={{ paddingbottom: \"60px\" }}>\n\n <Footer className='login-footer' size=\"mini\">\n <FooterSection type=\"left\" logo=\"North.\">\n <FooterLinkList>\n <a target=\"_blank\" href=\"https://drive.google.com/open?id=1bModZ1EzBEdGyZltHlMCmiW2o0fjjEmC\">Help</a>\n <a target=\"_blank\" href=\"https://drive.google.com/open?id=1tWE13UlHbMgXlFPAvF59OO0xwQB_wCrt\">Privacy Policy</a>\n <a target=\"_blank\" href=\"https://drive.google.com/open?id=1NtARcUGS2ygw1dfAhPEHjpanxqG8OuH-\">Terms & Conditions</a>\n </FooterLinkList>\n </FooterSection>\n </Footer>\n </div>);\n }", "function getVisiblePartOfFooter() {\n var $el = $('#footer'),\n scrollTop = $(this).scrollTop(),\n scrollBot = scrollTop + $(this).height(),\n elTop = $el.offset().top,\n elBottom = elTop + $el.outerHeight(),\n visibleTop = elTop < scrollTop ? scrollTop : elTop,\n visibleBottom = elBottom > scrollBot ? scrollBot : elBottom;\n $('#notification').text(visibleBottom - visibleTop);\n\n var height = $(window).height() - (visibleBottom - visibleTop)\n\n if ((visibleBottom - visibleTop) > 0){\n $('.affix').css(\"height\", height - 60)\n $('.affix-bottom').css(\"height\", height - 60)\n } else {\n $('.affix').css(\"height\", 'auto')\n $('.affix-bottom').css(\"height\", 'auto')\n }\n }", "function setBookendSize () {\n\t\t// Set header height\n\t\tvar $windowHeight = $(window).height(),\n\t\t\t$wrapper = $(\".container.is-top\"),\n\t\t\t$footer = $(\".post-footer\");\n\t\t$wrapper.css({\n\t\t\t\"padding-bottom\": $windowHeight\n\t\t});\n\t\t$footer.css({\n\t\t\t\"height\": $windowHeight\n\t\t});\n\t}", "function addFooterTooltips(nFoot)\n\t{\n\t\tvar qTipOptions = MutationViewsUtil.defaultTableTooltipOpts();\n\n\t\tvar qTipOptionsFooter = {};\n\t\tjQuery.extend(true, qTipOptionsFooter, qTipOptions);\n\t\tqTipOptionsFooter.position = {my:'top center', at:'bottom center', viewport: $(window)};\n\n\t\tcbio.util.addTargetedQTip($(nFoot).find(\"th\"), qTipOptionsFooter);\n\t}", "function changeFooterText(){\n\n }", "_finalize() {\n this.sheetStream.end(templates.SheetFooter);\n return this.zip.finalize();\n }", "function createFooter() {\n\n let trfooEl =document.createElement('tr');\n let tdEl=document.createElement('td');\n tdEl.textContent = 'Totals';\n trfooEl.appendChild(tdEl);\n tableEl.appendChild(trfooEl);\n let megaTotal = 0;\n\n for (let h=0 ; h < openhours.length ; h++ ) {\n\n let tdEl=document.createElement('td');\n let sum=0;\n \n for (let s=0 ; s < locations.length ; s++){\n\n\n sum = sum + locations[s].cookiesinhour[h];\n\n }\n megaTotal += sum;\n tdEl.textContent = sum;\n trfooEl.appendChild(tdEl);\n\n }\n let totalTdEl = document.createElement('td');\n totalTdEl.textContent = megaTotal;\n trfooEl.appendChild(totalTdEl);\n }", "_refreshFooter() {\n const that = this;\n\n if ((that.viewSections.indexOf('footer') < 0 || that.$.footer.offsetHeight === 0)) {\n return;\n }\n\n function preFormatDateOutput() {\n if (that.selectedDates.length === 0) {\n return '';\n }\n\n if (that.selectedDates.length === 1) {\n return that.selectedDates[0].toLocaleDateString(that.locale, { year: that.yearFormat, weekday: 'short', month: 'short', day: 'numeric' });\n }\n else {\n let sortedDates = that.selectedDates.slice(0).sort((a, b) => a.getTime() - b.getTime());\n\n return sortedDates[0].toLocaleDateString(that.locale, { year: that.yearFormat, weekday: 'short', month: 'short', day: 'numeric' }) + ' - ' +\n sortedDates[sortedDates.length - 1].toLocaleDateString(that.locale, { year: that.yearFormat, weekday: 'short', month: 'short', day: 'numeric' });\n }\n }\n\n if (that.footerTemplate) {\n if (typeof that.footerTemplate === 'function') {\n return;\n }\n\n let layoutTemplate = that._layoutTemplates.filter(template => template.selector === that.$.footer)[0],\n clone = document.importNode(layoutTemplate.template.content, true);\n\n if (layoutTemplate.bindings.length > 0) {\n let bindingHolderElement = clone.childNodes[layoutTemplate.bindings[0].childNodeIndex];\n\n layoutTemplate.selector.childNodes[layoutTemplate.bindings[0].childNodeIndex].innerHTML =\n bindingHolderElement.innerHTML.replace(layoutTemplate.bindings[0].bindingString, preFormatDateOutput());\n }\n\n return;\n }\n\n that.$.selectedDatesRange.innerHTML = preFormatDateOutput();\n }", "function addFooter(footText){\n return \"<footer class=\\\"card_footer w3-container\\\">\" +\n \"<h5>\" + footText + \"</h5>\" +\n \"</footer>\";\n}" ]
[ "0.70745045", "0.7056424", "0.6899682", "0.6763985", "0.67632914", "0.67584825", "0.6733473", "0.6693147", "0.66610134", "0.6659243", "0.6631205", "0.6611675", "0.658502", "0.6520414", "0.65194154", "0.6506234", "0.6481181", "0.6459485", "0.64218056", "0.64146936", "0.6388369", "0.6384361", "0.6382122", "0.6363504", "0.62969166", "0.6280592", "0.6260558", "0.6239877", "0.6220897", "0.6218559", "0.6204325", "0.6197512", "0.61722744", "0.61578494", "0.6157802", "0.6080202", "0.605516", "0.6046685", "0.6038707", "0.6029318", "0.60083914", "0.6007963", "0.6006672", "0.60017186", "0.5989094", "0.5966654", "0.5963699", "0.5956465", "0.59547967", "0.594882", "0.5937107", "0.593628", "0.5917038", "0.5915831", "0.5915544", "0.59126", "0.5897144", "0.5896619", "0.5893516", "0.5893425", "0.5888231", "0.58811104", "0.58775765", "0.5874984", "0.5854867", "0.5852397", "0.584682", "0.5846404", "0.58443046", "0.5841944", "0.5834201", "0.5808587", "0.58038324", "0.5802517", "0.5797539", "0.5797539", "0.57928574", "0.57919806", "0.5777589", "0.5775624", "0.5773934", "0.5759375", "0.57435846", "0.5743484", "0.57407665", "0.57303196", "0.5722373", "0.57153785", "0.5683096", "0.5677736", "0.56706536", "0.56700724", "0.5658454", "0.56565005", "0.56440794", "0.56439954", "0.5639519", "0.56315774", "0.5617348", "0.5603702" ]
0.6587514
12
======================= load Game Data =======================
function loadGameData() { $.ajaxSetup({ cache: true}); $.getJSON(cavsSchedFeed, function(data){ gamenum=3; // SET GLOBAL VARIABLES game = data.gscd.g; status = game[gamenum].st; arena = game[gamenum].an; //ARENA gamedate = game[gamenum].gdte; //GAME DATE gametime = game[gamenum].etm; //GAME TIME EST DATE&TIME gameID = game[gamenum].gid; //GAME ID gcode = game[gamenum].gcode; //GAME CODE gametimeFormatted = moment(game[gamenum].etm).format('dddd, MMMM D, YYYY') + ' AT ' + moment(game[gamenum].etm).format('h:mm A')+' (ET)'; if (cavsTID == data.gscd.g[gamenum].h.tid){ cavsHOME = 1; } else { cavsHOME = 0; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadGameData()\n\t\t\t{\n\t\t\t\tif(gameName == \"fatcat7\")\n\t\t\t\t{\n\t\t\t\t\tgame = new FatCat7Game();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"bounty\")\n\t\t\t\t{\n\t\t\t\t\tgame = new BountyGame();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"gummibar\")\n\t\t\t\t{\n\t\t\t\t\tgame = new GummiBarGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"aprilmadness\")\n\t\t\t\t{\n\t\t\t\t\tgame = new AprilMadnessGame();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"moneybooth\")\n\t\t\t\t{\n\t\t\t\t\tgame = new MoneyBoothGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"astrologyanswers\")\n\t\t\t\t{\n\t\t\t\t\tgame = new AstrologyAnswersGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t\tisBothFreeSpinAndOtherBonus = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgame.importGame(xmlData);\n\t\t\t}", "function loadData(){ \t\n \t//if (gameData.data.player.playerID>0) {\n \t\tCORE.LOG.addInfo(\"PROFILE_PAGE:loadData\");\n \t\t//var p = new ProfileCommunication(CORE.SOCKET, setData); \t\t\n \t\t//p.getData(gameData.data.player.playerID); \t\t\n \t\t\n \t//}\n \t//else \n \t\tsetDataFromLocalStorage(); \t \t \t\n }", "function loadData(data){\n\tgameChatID = data.gameChatID;\n\twords = data.words;\n\tnumWords = data.numWords;\n\tplayers = data.players;\n\tnextWord = data.nextWord;\n\topenWords = data.openWords;\n\tautomaticHints = data.automaticHints;\n}", "function loadGame(){\n\tgame = getJSON(\"http://navy.hulu.com/[email protected]\");\n\tboard = [];\n\t\n\t// Display game information\n\twriteToConsole(\"GAME ID = \" + game.game_id);\n\twriteToConsole(\"SHIPS = [\" + game.ship_sizes + \"]\");\n\twriteToConsole(\"BOARD = (\" + game.board_size.width + \", \" + game.board_size.height + \")\");\n\t\n\t// Intialize board to default values\n\tfor(var w=0; w<game.board_size.width; w++){\n\t\tboard[w] = [];\n\t\tfor(var h=0; h<game.board_size.height; h++){\n\t\t\tboard[w][h]=0;\t\t// signifies uninspected\n\t\t}\n\t}\n\t\n\tships = game.ship_sizes;\n\t\n\traiseSuccess(\"Game intialized\");\n}", "function loadData()\n{\n /***************\n * GET INTEGER *\n ***************/\n function getInt(name)\n {\n return parseInt(localStorage.getItem(name));\n }\n\n /***************\n * GET BOOLEAN *\n ***************/\n function getBool(name)\n {\n var data = getInt(name);\n if (data !== 0 && data !== null && data != undefined && !isNaN(data))\n return true;\n else\n return false;\n }\n \n // if local data exists, then get it\n if (getBool('data') === true)\n {\n // parse data\n ax = getInt('ax');\n ay = getInt('ay');\n dx = getInt('dx');\n dy = getInt('dy');\n score = getInt('score');\n recent = getInt('recent');\n hScore = getInt('hScore');\n paused = getBool('paused');\n doWrap = getBool('doWrap');\n \n // parse snake dataa\n var length = getInt('length');\n snake = [];\n for (var i = 0; i < length; i++)\n {\n var sx = getInt('snake' + i + 'x');\n var sy = getInt('snake' + i + 'y');\n snake.push({x: sx, y: sy}); \n }\n }\n // otherwise, initialize it\n else\n resetData();\n}", "function load() {\r\n\t\tvar loaded = $.parseJSON(localStorage.getItem(STORAGE_NAME)),\r\n\t\t\tcondition = loaded.condition;\r\n\t\tSIZE = loaded.size;\r\n\t\tTOTALCELLS = SIZE*SIZE;\r\n\t\tMINES = loaded.minecells.length;\r\n\t\tcells = loaded.cells;\r\n\t\tminecells = loaded.minecells;\r\n\t\ttime = loaded.time;\r\n\t\tclicks = loaded.clicks;\r\n\t\tnewGame(true, loaded.board, condition);\r\n\t}", "function loadGameData(gamedata)\r\n{\r\n Android.test(\"loading data... \" + gamedata);\r\n \r\n var splitdata = gamedata.toString().split(\",\");\r\n Android.test(\"split finished.\");\r\n var len = splitdata.length;\r\n Android.test(\"length: \" + len);\r\n for(i = 0; i < len; i++)\r\n {\r\n Android.test(i+\" \"+splitdata[i]);\r\n addInput(new Node(splitdata[i]));\r\n }\r\n}", "function load()\n {\n populateMap(gameInfo.jediList);\n init();\n gameInfo.gameState = \"pickChar\";\n }", "function loadData()\n\t{\n\t\tloadMaterials(false);\n\t\tloadLabors(false);\n\t}", "static async load()\n {\n await RPM.settings.read();\n await RPM.datasGame.read();\n RPM.gameStack.pushTitleScreen();\n RPM.datasGame.loaded = true;\n RPM.requestPaintHUD = true;\n }", "function loadGame() {\n var file = JSON.parse(localStorage.getItem('saveFile'));\n\n if (file !== null) {\n gameData.update = file.update\n gameData.beer = file.beer;\n gameData.beerPerClick = file.beerPerClick;\n gameData.beerPerClickCost = file.beerPerClickCost;\n gameData.grain = file.grain;\n gameData.money = file.money;\n gameData.moneyPerBeer = file.moneyPerBeer;\n gameData.grainCapacity = file.grainCapacity;\n gameData.grainCost = file.grainCost;\n gameData.grainPerMin = file.grainPerMin;\n\n showGameData();\n } else {\n console.log(\"no save file\")\n }\n}", "async function load() {\n await Datas.Settings.read();\n await Datas.Systems.read();\n //RPM.gameStack.pushTitleScreen();\n //RPM.datasGame.loaded = true;\n Manager.GL.initialize();\n Manager.GL.resize();\n Manager.Stack.requestPaintHUD = true;\n}", "load() {\n Logger.info(`The game(${this._id}) is loading...`)\n this.event_manager.trigger('game_load', [this])\n Logger.info('Loading the game mode')\n _.forEach(this._games, (game) => game._load())\n }", "function Load()\n{\n // The file *does* exist\n if (fs.existsSync(\"save.json\"))\n {\n savedatasw = 1;\n const importdata = fs.readFileSync('save.json', 'utf8');\n const playerdata = JSON.parse(importdata);\n playername=playerdata.playername;\n playerlvl=playerdata.playerlvl;\n health=playerdata.health;\n mana=playerdata.mana;\n gold=playerdata.gold;\n savecoord=playerdata.savecoord;\n savedatasw=playerdata.savedatasw;\n playerinfo.playername=playername;\n playerinfo.playerlvl=playerlvl;\n playerinfo.health=health;\n playerinfo.mana=mana;\n playerinfo.gold=gold;\n playerinfo.savecoord=savecoord;\n playerinfo.savedatasw=savedatasw;\n return;\n }\n\n return;\n }", "function loadGame(gameType, gameData) {\r\n\t\tif (gameType == 'spelling') {\r\n\t\t\tvar myGame = UnityLoader.instantiate($(\".new-game-frame\")[0], \"/public/games/spelling/Build/TypingFinalBuild.json\", {\r\n\t\t\t\tonProgress: (gameInstance, progress) => {\r\n\t\t\t\t\tif (progress == 1) {\r\n\t\t\t\t\t\tconsole.log(\"game is loaded\")\r\n\t\t\t\t\t\tconsole.log(gameInstance)\r\n\t\t\t\t\t\tgameInstance.SendMessage(\"GameMgr\", \"SetGameData\", JSON.stringify(gameData));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else if (gameType == 'math') {\r\n\t\t\tvar myGame = UnityLoader.instantiate($(\".new-game-frame\")[0], \"/public/games/math/Build/FinalBuild.json\", {\r\n\t\t\t\tonProgress: (gameInstance, progress) => {\r\n\t\t\t\t\tif (progress == 1) {\r\n\t\t\t\t\t\tconsole.log(\"game is loaded\")\r\n\t\t\t\t\t\tconsole.log(gameInstance)\r\n\t\t\t\t\t\tgameInstance.SendMessage(\"GameMgr\", \"SetGameData\", JSON.stringify(gameData));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t}", "static LoadGame(that, name){\n\t\t\n\t\t//load data using async\n\t\t_retrieveData = async () => {\n\t\t\ttry {\n\t\t\t\tconst value = await AsyncStorage.getItem(name);\n\t\t\t\tif (value != null) {\n\t\t\t\t\t\n\t\t\t\t\t//first we parse the json object into a temporary LevelFile form\n\t\t\t\t\tthis.levelFile = JSON.parse(value);\n\t\t\t\t\t//now we parse the screen data and set it to our current screen\n\t\t\t\t\tthat.state.toShowText = this.jsonParser(this.levelFile.screenState);\n\t\t\t\t\t//finally we parse the game data and use the file's provided function name to set it to the proper game data object \n\t\t\t\t\tvar fileGameData = this.jsonParser(this.levelFile.data);\n\t\t\t\t\tvar evalString = \"GameData\"+\".\"+this.levelFile.loadFunction+\"(fileGameData)\";\n\t\t\t\t\teval(evalString);\n\t\t\t\t\t\n\t\t\t\t\t//now we replace this.levelFile with a new empty level file\n\t\t\t\t\tthis.levelFile = new this.FileManagerIndex[this.levelFile.nameSpace+\"File\"]();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (error) {\n\t\t\t\t// Error retrieving data\n\t\t\t\talert(error);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn _retrieveData();\n\t}", "static load(gameInstance) {}", "function loadGame(){\n\t// images\n\tbgImage.src = \"images/backgframe_480.jpg\";\n\tdude.src = \"images/person.png\";\n\tscrollImage.src = \"images/scroll.png\";\n\t\n\t// required buttons\n \tpauseButtonImage.src = \"images/gmenub1.png\";\n\t\n \tpauseButtonImage2.src = \"images/gpauseButton.png\";\n\t\n\t// test buttons (debugging)\n \tgenerateButtonImage.src = \"images/button.png\";\n\tvictoryButtonImage.src = \"images/button.png\";\n\taddscoreButtonImage.src = \"images/button.png\";\n\taddGameOverButtonImage.src = \"images/button.png\";\n\n\t/*// turn off main menu music\n\tmusicOn = false;\n\tmusic.pause();*/\n\t\n\tinitGameSetting(); //rules.js\n}", "function loadGameScreen(data){\r\n\t\t\t$('#container1').hide(); \r\n\t\t\t\t$('body').css(\"background-color\", \"white\");\r\n\t\t\t\t$('#boxes').show();\r\n\t\t\t\tmessage.autosize();\r\n\t\t\t\t// if current letters is a non-empty string, hide start game div & display letters\r\n\t\t\t\tif(data.game.state === 'active'){\r\n\t\t\t\t\t// if current letters, then game has started so hide the startgame\r\n\t\t\t\t\tstartGameDiv.hide();\r\n\t\t\t\t\thints.masonry('reload');\r\n\t\t\t\t} else{\r\n\t\t\t\t\t$introText.html(data.game.message);\r\n\t\t\t\t\t// game has not yet started\r\n\t\t\t\t\tsendHintDiv.hide();\r\n\t\t\t}\r\n\t\t}", "function loadData() {\n loadJson('am');\n loadJson('pm');\n}", "function LoadData(){\n\tLoadDataFiles();\n\tExtractDataFromFiles();\n}", "function loadData() {\n\n //Users name.\n loadName()\n\n //Users config.\n loadConfig()\n}", "function load() {\n m_data.load(APP_ASSETS_PATH + \"ded_moroz_06.json\", load_cb, preloader_cb);\n}", "static async initGlobalData(){\n\t\tvar fileNames = await this.GetFileNames();\n\t\t\n\t\t_retrieveGlobal = async () => {\n\t\t\ttry {\n\t\t\t\tconst value = await AsyncStorage.getItem(\"GlobalData\");\n\t\t\t\t\n\t\t\t\tif (value != null) {\n\t\t\t\t\t//we have played before, load our GlobalData object into GameData\n\t\t\t\t\tGameData.setGlobalData(JSON.parse(value));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\t//we have never played before, do nothing, waiting until the end of a player's first level to save the GlobalData object \n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (error) {\n\t\t\t\t// Error retrieving data\n\t\t\t\talert(error);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn _retrieveGlobal();\n\t}", "function setupGameData() {\n // only run it the first time we play\n if (dataTotal === 0) {\n\n // music setup\n STARZ.SoundManager.init('audio');\n STARZ.SoundManager.addMusic('title');\n STARZ.SoundManager.addMusic('gameplay');\n STARZ.SoundManager.addFX('bonus');\n STARZ.SoundManager.addFX('hurry');\n STARZ.SoundManager.addFX('locked');\n STARZ.SoundManager.addFX('broken');\n STARZ.SoundManager.addFX('correct');\n STARZ.SoundManager.addFX('incorrect');\n\n // button setup\n UI.ButtonFX.init('.button1');\n\n STARZ.ScreenManager.showScreen('#loading');\n STARZ.JSONLoader.load('data/images.json', tvDataLoaded, gameError);\n STARZ.JSONLoader.load('data/quiz.json', quizDataLoaded, gameError);\n } else {\n STARZ.ScreenManager.showScreen('#titleScreen');\n }\n }", "function loadGame() {\n\ttry {\n\t\tvar gameArray = [];\n\t\t\n\n\t\tfor (var i = 0; i < gameList.length; i++) {\n\t\t\tif (gameList[i].Notification == 1) {\n\n\t\t\t\t//Ti.API.info('gameIcons', \"/images/gameIcons/\" + \"C\" + gameList[i].CTestID + \".png\");\n\n\t\t\t\tgameArray.push({\n\t\t\t\t\ttemplate : \"gameListTemplate\",\n\n\t\t\t\t\tgameNameLabel : {\n\t\t\t\t\t\ttext : gameList[i].CTestName\n\t\t\t\t\t},\n\t\t\t\t\ticonImage : {\n\t\t\t\t\t\timage : \"/images/gameIcons/\" + \"C\" + gameList[i].CTestID + \".png\"\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t$.lstSection.setItems(gameArray);\n\n\t} catch(ex) {\n\t\tcommonFunctions.handleException(\"welcomeContentScreen\", \"loadGame\", ex);\n\t}\n}", "function loadData() {\n //load names into an array from local storage\n if (localStorage.getItem('playerId') !== null) {\n playerId = parseInt(localStorage.getItem('playerId'));\n }\n\n if (localStorage.getItem('highScores') !== null) {\n highScores = JSON.parse(localStorage.getItem('highScores'));\n } else {\n highScores = [0, 0, 0];\n }\n if (localStorage.getItem('playerNames') !== null) {\n playerNames = JSON.parse(localStorage.getItem('playerNames'));\n } else {\n playerNames = ['', '', ''];\n }\n}", "function loadAll(){\n\tchangeSeason()\n\tgetAnimeData()\n\tgetCharacterData()\n\tgetEpisodeData()\n\tgetImageData()\n\tgetVideoData()\n}", "function loadGame() {\n try {\n var retrievedObject = localStorage.getItem('battleshipGameInstance');\n\n console.log('retrievedObject: ', JSON.parse(retrievedObject));\n var json = JSON.parse(retrievedObject);\n\n game = new Battleship(8, 8);\n if (json != null) {\n game.loadJSON(json);\n }\n\n } catch (e) {\n console.log(e);\n }\n}", "function loadData() {\n // set all our variables\n setVars(twitch.configuration)\n // do an initial browse to `/`(root)\n navigate()\n // remove our loading element from the DM\n removeElement(\"repo-loading\")\n}", "function loadData() {\n // STAND\n loadStandData();\n // PIT\n loadPitData();\n // IMAGES\n loadImageData();\n // NOTES\n loadNotesData();\n // PRESCOUTING\n loadPrescouting(\"./resources/prescout.csv\");\n\n}", "loadGame(gameState) {\n\t\tthis.gameState = gameState;\n\t}", "function loadData(){\n\t\tloadParetoData();\n\t\tloadConstraints();\n\t\t\n\t}", "function getData(){\n pos.board = [];\n fetch(\"/api/games\").then(function(response){if(response.ok){return response.json()}\n}).then(function (json){\n jsongames = json;\n app.player = json.player\n createPos();\n createGames();\n bottons();\n \n });\n }", "handleInitialGameLoad(serializedGameData) {\n var gameData = JSON.parse(serializedGameData);\n if (!gameData.board_state) {\n if (!this.isHost) {\n // Server isn't ready yet. We're not the host, so let's idle.\n var self = this;\n window.setTimeout(function () {\n self.loadInitialBoard();\n }, 3000);\n console.warn(\"trying again\");\n } else {\n // Server isn't ready yet. We're the host, so let's\n // make it ready.\n if (this.hostNewGameCallback !== null) {\n this.hostNewGameCallback();\n }\n if (this.loadCompleteCallback !== null) {\n this.loadCompleteCallback(false);\n }\n }\n } else {\n if (this.loadServerDataCallback !== null) {\n this.loadServerDataCallback(gameData);\n }\n if (this.loadCompleteCallback !== null) {\n this.loadCompleteCallback(gameData.finalized);\n }\n }\n }", "function loadPlayerData() {\n\t\n\tconsole.log(\"LOADING PLAYER DATA\");\n\t$.getJSON('data/playerData.json', function(data) {\n\t\t$.each(data.calibration_arm, function(a, b) {\n\t\t\tvar xDrift = b.xdrift;\n\t\t\tvar yDrift = b.ydrift;\n\t\t\tvar tTimestamp = b.timestamp;\n\n\t\t\tvar tCalArm = {\n\t\t\t\t\"timestamp\" : tTimestamp,\n\t\t\t\t\"ydrift\" : yDrift,\n\t\t\t\t\"xdrift\" : xDrift\n\t\t\t};\n\t\t\tarmCalibration.push(tCalArm);\n\n\t\t});\n\n\t\t// // do rey menta tracking\n\t\t$.each(data.reymenta_progress, function(c, d) {\n\t\t\tvar tHit = d.hits;\n\t\t\tvar tAcc = d.accuracy;\n\t\t\tvar tTime = d.time;\n\t\t\tvar tStamp = d.timestamp;\n\t\t\tvar xDrift = d.xdrift;\n\t\t\tvar posRot = d.pos_rotation;\n\t\t\tvar tRow = d.in_a_row;\n\t\t\tvar tHits = d.total_hits;\n\n\t\t\tvar tAllData = {\n\t\t\t\t\"hits\" : tHit,\n\t\t\t\t\"accuracy\" : tAcc,\n\t\t\t\t\"in_a_row\" : tRow,\n\t\t\t\t\"total_hits\" : tHits,\n\t\t\t\t\"timestamp\" : tStamp,\n\t\t\t\t\"pos_rotation\" : posRot,\n\t\t\t\t\"xdrift\" : xDrift,\n\t\t\t\t\"time\" : tTime\n\t\t\t};\n\n\t\t\t\n\t\t\treyMentaProgress.push(tAllData);\n\n\t\t});\n\n\n\t\t$.each(data.spacedog_progress, function(e, f) {\n\n\t\t\tvar tAllData = {\n\t\t\t\t\"hits\" : f.hits,\n\t\t\t\t\"accuracy\" : f.accuracy,\n\t\t\t\t\"in_a_row\" : f.in_a_row,\n\t\t\t\t\"timestamp\" : f.timestamp,\n\t\t\t\t\"pos_rotation\" : f.pos_rotation,\n\t\t\t\t\"xdrift\" : f.xdrift,\n\t\t\t\t\"time\" : f.time\n\t\t\t};\n\n\t\t\tspaceDogProgress.push(tAllData);\n\n\t\t});\n\t\t\n\t\t$.each(data.treedog_progress, function(ee, ff) {\n\n\t\t\tvar tAllData = {\n\t\t\t\t\"hits\" : ff.hits,\n\t\t\t\t\"accuracy\" : ff.accuracy,\n\t\t\t\t\"in_a_row\" : ff.in_a_row,\n\t\t\t\t\"timestamp\" : ff.timestamp,\n\t\t\t\t\"pos_rotation\" : ff.pos_rotation,\n\t\t\t\t\"xdrift\" : ff.xdrift,\n\t\t\t\t\"time\" : ff.time\n\t\t\t};\n\n\t\t\ttreeDogProgress.push(tAllData);\n\n\t\t});\n\n\t\t$.each(data.rocketdog_progress, function(g, h) {\n\t\t\t\n\t\t\tvar tAllData = {\n\t\t\t\t\"hits\" : h.hits,\n\t\t\t\t\"accuracy\" : h.accuracy,\n\t\t\t\t\"in_a_row\" : h.in_a_row,\n\t\t\t\t\"timestamp\" : h.timestamp,\n\t\t\t\t\"pos_rotation\" : h.pos_rotation,\n\t\t\t\t\"xdrift\" : h.xdrift,\n\t\t\t\t\"time\" : h.time\n\t\t\t};\n\n\t\t\trocketDogProgress.push(tAllData);\n\n\t\t});\n\n\t\t// // do featherweight tracking\n\t\t$.each(data.featherweight_progress, function(i, j) {\n\n\t\t\tvar tAllData = {\n\t\t\t\t\"hits\" : j.hits,\n\t\t\t\t\"accuracy\" : j.accuracy,\n\t\t\t\t\"in_a_row\" : j.in_a_row,\n\t\t\t\t\"timestamp\" : j.timestamp,\n\t\t\t\t\"pos_rotation\" : j.pos_rotation,\n\t\t\t\t\"xdrift\" : j.xdrift,\n\t\t\t\t\"time\" : j.time\n\t\t\t};\n\n\t\t\tfeatherWeightProg.push(tAllData);\n\n\t\t});\n\n\t\t// ////////// do sound grip tracking ////////////////////\n\n\t\t$.each(data.soundgrip_progress, function(k, l) {\n\n\t\t\tvar tAllData = {\n\t\t\t\t\t\"hits\" : l.hits,\n\t\t\t\t\t\"accuracy\" : l.accuracy,\n\t\t\t\t\t\"in_a_row\" : l.in_a_row,\n\t\t\t\t\t\"timestamp\" : l.timestamp,\n\t\t\t\t\t\"pos_rotation\" : l.pos_rotation,\n\t\t\t\t\t\"xdrift\" : l.xdrift,\n\t\t\t\t\t\"time\" : l.time\n\t\t\t};\n\n\t\t\t// // save the soundgrip array with all the current data\n\t\t\tsoundGripProgress.push(tAllData);\n\t\t});\n\n\t\t// // do the cheevo data\n\t\t$.each(data.achievements, function(m, n) {\n\t\t\tvar cheevName = n.name;\n\t\t\tvar cheevThumb = n.thumb;\n\t\t\tvar cheevdesc = n.description;\n\n\t\t\tvar cheevData = {\n\t\t\t\t\"name\" : cheevName,\n\t\t\t\t\"thumb\" : cheevThumb,\n\t\t\t\t\"description\" : cheevdesc\n\t\t\t};\n\n\t\t\tCheevoNames.push(cheevData);\n\t\t});\n\t\t// // console.log(\"Cheevonames: \" + JSON.stringify(CheevoNames));\n\n\t\t$.each(data.game_stats, function(o, p) {\n\n\t\t\tgName = p.name;\n\t\t\tgInfo = p.info;\n\t\t\tgImage = p.image;\n\t\t\tgMap = p.map;\n\t\t\tgTimePlayed = p.time_played;\n\t\t\tgNumCheev = p.num_achievements;\n\t\t\tgPercent = p.per_completed;\n\t\t\tgRecCheev = p.recent_cheevo;\n\t\t\tplayerProfile = {\n\t\t\t\t\"name\" : gName,\n\t\t\t\t\"info\" : gInfo,\n\t\t\t\t\"image\" : gImage,\n\t\t\t\t\"map\" : gMap,\n\t\t\t\t\"time_played\" : gTimePlayed,\n\t\t\t\t\"num_achievements\" : gNumCheev,\n\t\t\t\t\"per_completed\" : gPercent,\n\t\t\t\t\"recent_cheevo\" : gRecCheev,\n\t\t\t};\n\t\t\tGameNames.push(gName);\n\t\t\tgameStats.push(playerProfile);\n\t\t});\n\n\t\t// / get profile info\n\t\tpName = data.name;\n\t\tpId = data.id;\n\t\tpTtime = data.total_time;\n\t\tpRank = data.rank;\n\t\tpDiff = data.difficulty;\n\n\t\tGameProfile = {\n\t\t\t\"name\" : pName,\n\t\t\t\"id\" : pId,\n\t\t\t\"total_time\" : pTtime,\n\t\t\t\"rank\" : pRank,\n\t\t\t\"difficulty\" : pDiff,\n\t\t\t\"game_stats\" : gameStats,\n\t\t\t\"calibration_arm\" : armCalibration,\n\t\t\t\"reymenta_progress\" : reyMentaProgress,\n\t\t\t\"soundgrip_progress\" : soundGripProgress,\n\t\t\t\"treedog_progress\" : treeDogProgress,\n\t\t\t\"rocketdog_progress\" : rocketDogProgress,\n\t\t\t\"spacedog_progress\" : spaceDogProgress,\n\t\t\t\"featherweight_progress\" : featherWeightProg,\n\t\t\t\"achievements\" : CheevoNames\n\t\t};\n\n\n\t\tconsole.log(\"finished loading data\");\n\t\tinitNavigation();\n\t\tinitGamesNav();\n\n\t});\n\n}", "loadGame(gameState) {\n this.gameState = gameState;\n }", "function preload_HUD(game){\n\tgame.load.image('Map', 'Assets/Art/HUD/Map2_CKtR.png');\n\tgame.load.image('Battery', 'Assets/Art/HUD/HP2_CKtR.png');\n\tgame.load.image('Pointer', 'Assets/Art/HUD/Pointer_CKtR.png');\n\tgame.load.image('terminal', 'Assets/Art/HUD/Terminal_CKtR.png');\n}", "function getData() {\n playArea.main.classList.add(\"visible\");\n gameObj = data.data; //function ud(data) {\n buildBoard();\n //fetch method to get data from the url, instead of using the 'data' object above\n}", "function loadUnlockData() {\n\n for (var i = 0; i < unlockData.length; i++) {\n\n var gameId = unlockData[i].gameId;\n var unlockState = unlockData[i].unlockState;\n\n if (unlockState == true) {\n displayGame(gameId);\n } else {\n displayGameLock(gameId);\n }\n\n }\n\n}", "function preload (game){\n\t \t\tconsole.log(\"preload\");\n\t \t\tgame.load.crossOrigin = 'anonymous';\n\t\t\tgame.load.image('gift-basic', resolveUrl('data/gift-basic.png'));\n\t\t\tgame.load.image('gift-clock', resolveUrl('data/gift-clock.png'));\n\t\t\tgame.load.image('gift-compass', resolveUrl('data/gift-compass.png'));\n\t\t\tgame.load.image('gift-double', resolveUrl('data/gift-double.png'));\n\t\t\tgame.load.image('gift-freeze', resolveUrl('data/gift-freeze.png'));\n\t\t\tgame.load.image('gift-glasses', resolveUrl('data/gift-glasses.png'));\n\t\t\tgame.load.image('gift-ink', resolveUrl('data/gift-ink.png'));\n\t\t\tgame.load.image('gift-mushroom', resolveUrl('data/gift-mushroom.png'));\n\t\t\tgame.load.image('gift-speedup', resolveUrl('data/gift-speedup.png'));\n\t\t\tgame.load.image('gift-watch', resolveUrl('data/gift-watch.png'));\n\t\t\tgame.load.image('gift-bomb', resolveUrl('data/gift-bomb.png'));\t\n\t\t\tgame.load.image('gameover', resolveUrl('data/gameover.gif'));\n\t\t\tgame.load.image('ink-splash', resolveUrl('data/ink-splash.png'));\n\t\t\tgame.load.image('background', resolveUrl('data/background.png'));\n\t\t\tgame.load.image('background2', resolveUrl('data/background2.png'));\n\t\t\tgame.load.image('giftstar1', resolveUrl('data/giftstar1.png'));\n\t\t\tgame.load.image('giftstar2', resolveUrl('data/giftstar2.png'));\n\t\t\tgame.load.image('giftstar3', resolveUrl('data/giftstar3.png'));\n\t\t\tgame.load.image('giftstar4', resolveUrl('data/giftstar4.png'));\n\t\t\tgame.load.image('giftstar5', resolveUrl('data/giftstar5.png'));\n\t\t\tgame.load.image('santa', resolveUrl('data/santa.png'));\n\t\t\tgame.load.script('BlurX', resolveUrl('filters/BlurX.js'));\n\t \tgame.load.script('BlurY', resolveUrl('filters/BlurY.js'));\n\t \tgame.load.audio('background-music', resolveUrl('data/LoveIsAChristmasRose_PineyGir.mp3'));\n\t \tgame.load.audio('sfx', resolveUrl('data/fx_mixdown.ogg'));\n\n\t \t}", "loadGame() {\n this.player = new Player(100, 100);\n this.treasure = new Treasure()\n this.playerImg = loadImage(\"assets/character-down.png\");\n this.treasureImg = loadImage(\"assets/treasure.png\");\n this.score = 0\n this.bg = loadImage(\"assets/background.png\");\n }", "loadGame(gameState) {\n this.gameState.score = gameState.score;\n this.gameState.won = gameState.won;\n this.gameState.over = gameState.over;\n this.gameState.board = gameState.board;\n }", "function addGameData(){\n\t for (var r in gamingData){\n\t\t var idGenerator = Math.floor(Math.random()*1000000000);\n\t\t localStorage.setItem(idGenerator, JSON.stringify(gamingData[r]));\n\t }\n }", "loadData() {\n\n }", "gameInit() {\n\t\tthis.curGameData = new GameData(this.genome.length);\n\t\tthis.playHist = [];\n\t\tfor (let i = 0; i < this.hist.length; i++) {\n\t\t\tthis.playHist.push(this.hist[i]);\n\t\t}\n\t}", "loadGameData(){\n var gameNumbers = [];\n var memory = [];\n\n //iterate every data position of the game and adds a value that represents an specific color\n for(var i = 0; i < this.state.totalRows; i++){\n for(var j = 0; j < this.state.totalColumns; j++){\n\n var variable = Math.floor((Math.random() * 5) + 1);\n\n memory.push(variable);\n }\n gameNumbers.push(memory);\n memory = [];\n }\n return gameNumbers;\n }", "function loadData() {\n $.get(\"/api/games\")\n .done(function (data) {\n updateView(data)\n console.log(data);\n })\n .fail(function (jqXHR, textStatus) {\n showOutput(\"Failed: \" + textStatus);\n });\n }", "function loadData() {\n $.get(\"/api/games\")\n .done(function (data) {\n updateView(data)\n console.log(data);\n })\n .fail(function (jqXHR, textStatus) {\n showOutput(\"Failed: \" + textStatus);\n });\n }", "function loadGames(){\n\tvar request = loadViaAjax(\"AllGames.json\");\n\trequest.done(function(data) {\n\t\tGames = data;\n\t\tcreateGameCategories();\n\t\tcreateGameCategoryAll();\n\t});\n\treturn request;\n}", "function loadData(gameInfo) {\n\tfor (var i = 0; i < gameInfo.length; i++) {\n\t\tTi.API.info('game is' + gameInfo[i].gameID);\n\t\tif (gameInfo[i].gameID == 1) {\n\t\t\t$.nBackLbl.value = gameInfo[i].points;\n\t\t} else if (gameInfo[i].gameID == 2) {\n\t\t\t$.trailsLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 3) {\n\n\t\t\t$.spatialFrwdLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 4) {\n\n\t\t\t$.spatialBackLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 5) {\n\n\t\t\t$.simpleMemoryLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 6) {\n\n\t\t\t$.serail7Lbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 7) {\n\n\t\t\t$.catDogLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 8) {\n\n\t\t\t$.FigLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 9) {\n\n\t\t\t$.visualLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 10) {\n\t\t\t$.digitSpanLbl.value = gameInfo[i].points;\n\t\t} else if (gameInfo[i].gameID == 11) {\n\t\t\t$.catdogNewLbl.value = gameInfo[i].points;\n\t\t} else if (gameInfo[i].gameID == 12) {\n\t\t\t$.TemporalLbl.value = gameInfo[i].points;\n\t\t} else if (gameInfo[i].gameID == 15) {\n\t\t\t$.surveyLbl.value = gameInfo[i].points;\n\t\t}\n\t}\n}", "function getPlayerData() {\n var storedPlayerInitials = JSON.parse(localStorage.getItem(\"player-initials\"));\n if (storedPlayerInitials !== null) {\n playerInitials = storedPlayerInitials;\n }\n var storedPlayerScores = JSON.parse(localStorage.getItem(\"player-scores\"));\n if (storedPlayerScores !== null) {\n playerScores = storedPlayerScores;\n }\n}", "function load_data() {\r\n\tif (sessionStorage.getItem('pieces')) {\r\n\t\ttry {\r\n\t\t\tData.pieces = JSON.parse(sessionStorage.getItem('pieces'))\r\n\t\t\tData.stamps = JSON.parse(sessionStorage.getItem('stamps'))\r\n\t\t\tData.categories = JSON.parse(sessionStorage.getItem('categories'))\r\n\t\t\tData.tuto = JSON.parse(sessionStorage.getItem('tuto'))\r\n\t\t} catch (e) {}\r\n\t} else {\r\n\t\t// Create Categories\r\n\t\tfor (var x in Data.pieces)\r\n\t\t\tif (Data.pieces[x].category)\r\n\t\t\t\tData.categories[Data.pieces[x].category].content.push(x)\r\n\t}\r\n}", "function loadData(data) {\n _userData = data.userData;\n}", "function load_game_overview_data(page_data) {\n var status = page_data.game_status;\n var map_data;\n delete page_data.game_status;\n\n if(status == \"ongoing\"){\n var orders = page_data.orders;\n var punits = page_data.player_units;\n var year = page_data.year;\n var season = page_data.season;\n var phase = page_data.phase;\n var order_result = page_data.order_result;\n delete page_data.orders;\n delete page_data.player_units;\n delete page_data.year;\n delete page_data.season;\n delete page_data.phase;\n delete page_data.order_result;\n var stat_acc = \"<b>\"+year+\"_\"+season+\"_\"+phase+\"</b>\";\n\n $('#game_header').html(\"<h1>Game Overview</h1>\");\n $('#game_order_info').html(orders?interpret_orders(orders):\"No Orders\");\n $('#order_feedback').html(order_result?interpret_result_orders(order_result):\"No resulting orders\");\n $('#game_stat_info').html(stat_acc);\n $('#game_stat').show();\n $('#press_game_id').val(page_data.game_id);\n\n rownum = 0;\n $('#order_gen').html(\"\");\n\n map_data = {\n punits: punits,\n country: page_data.country,\n phase: phase,\n resOrd: order_result\n };\n }else if(page_data.status == \"finished\"){\n $('#game_header').html(\"<h1>Finished Game Overview</h1>\");\n $('#game_stat').hide();\n }\n\n var units = page_data.unit_list;\n var owners = page_data.owner_list;\n\n delete page_data.unit_list;\n delete page_data.owner_list;\n var acc = \"\";\n for(var i in page_data){\n acc += i+\": <b>\"+page_data[i]+\"</b><br>\";\n }\n acc += \"<br>\";\n $('#gov_info').html(acc);\n $('#game_id').val(page_data.game_id);\n $('#mid_area').html('<div id=\"canvas_div\"><canvas id=\"canvas\" width=\"1154\" height=\"996\"></canvas></div>');\n $('#canvas_div').css('left', ((window.innerWidth-1154)*0.5-7)+'px');\n\n //Keep the map always in the middle\n window.onresize = function(){\n $('#canvas_div').css('left', ((window.innerWidth-1154)*0.5-7)+'px');\n if(page!==\"game\")\n window.onresize = null;\n }\n\n //after page contents are loaded, draw the map and units\n $('#world').ready(function(){\n prepareCanvas(units, owners, map_data);\n });\n}", "function loadSaveData() {\n\tposition = parseInt(sessionStorage.getItem('position'));\n\tleft = parseInt(sessionStorage.getItem('left'));\n\tright = parseInt(sessionStorage.getItem('right'));\n\tidList = JSON.parse(sessionStorage.getItem('idList'));\n\tcurrentL = parseInt(sessionStorage.getItem('currentL'));\n\tcurrentR = parseInt(sessionStorage.getItem('currentR'));\n\ttempArr = JSON.parse(sessionStorage.getItem('tempArr'));\n\tmiddle = left + parseInt((right - left) / 2);\n\tleftArr = [];\n\trightArr = [];\n\tgeneratePositions(0, idList.length - 1);\n\tshowSorter();\n\tbuttonsOn(false);\n\tpreloadImages();\n\tloadPokemonData();\n}", "function lobbyData() {\n\t\t//alert('list of local players: ' + players);\n\t\t\n\t\t//puts all players into json object\n \tvar jObject={};\t\n \tfor(i in players)\n\t {\n\t jObject[i] = players[i];\n\t }\n\t\t//checks web for new players\n\t\tvar gamePlayerData = new globals.xml.gamePlayers(input.gameID, jObject);\n\t}", "function preload(){\n\tdata = loadJSON('population.json'); // data variable is assigned json data\n}", "function ___loadUserData() {\n\n\t// load items and colors somehow\n\n\tcolors=new Array(colorReset[0],colorReset[1],colorReset[2],colorReset[3]);\n\n}", "function load() {\n m_data.load(\"b4w/obj/moto.json\", load_cb);\n}", "loadData() {\n this.hvacData = HVACDataLoader.getHVACData(this);\n if (this.hvacData.getBuildingList().length > 0) this.selectBuilding(this.hvacData.getBuildingList()[0]);\n }", "function loadData(){\r\n data = {};\r\n\r\n // transfer songs\r\n data.songs = dataToLoad.songs;\r\n\r\n // generate playlists\r\n data.playlists = [];\r\n for(var i = 0; i < dataToLoad.playlists.length; ++i){\r\n data.playlists[i] = {};\r\n data.playlists[i].title = dataToLoad.playlists[i].title;\r\n data.playlists[i].songs = [];\r\n for(var j = 0; j < dataToLoad.playlists[i].songs.length; ++j){\r\n data.playlists[i].songs.push(getSong(dataToLoad.playlists[i].songs[j]));\r\n }\r\n }\r\n\r\n // generate artist playlists\r\n data.artists = [];\r\n for(var i = 0; i < data.songs.length; ++i){\r\n\r\n var a = getArtist(data.songs[i].artist);\r\n\r\n // artist doesnt exist\r\n if(a == -1){\r\n\r\n // create artist \r\n var artist = {\r\n title: data.songs[i].artist,\r\n songs: []\r\n }\r\n data.artists.push(artist);\r\n\r\n // add song \r\n artist.songs.push(data.songs[i]);\r\n\r\n } \r\n // artist exists \r\n else {\r\n // add song \r\n data.artists[a].songs.push(data.songs[i]); \r\n }\r\n }\r\n\r\n // sort artists\r\n sortByTitle(data.artists);\r\n}", "function loadStandData() {\n // loads through each file in manifest\n for (let data_id in manifest_stand) {\n let file_name = manifest_stand[data_id]; // e.g. m1-r1-1540.json\n if (fs.existsSync(\"./data/stand/\" + file_name)) {\n let data_point = fs.readFileSync(\"./data/stand/\" + file_name);\n // Parses the data\n try {\n data_point = JSON.parse(data_point);\n } catch(e) {\n // if the data point isn't a valid JSON file, moves on\n continue;\n }\n // if no one logged in, we don't want the data point\n if (data_point[\"Stand\"][\"Login\"] == undefined) {\n continue;\n }\n // sets defaults if values are non-existent\n setDefaultsForStand(data_point, file_name);\n let team_name = data_point[\"info\"][\"team\"];\n // if this is first data point recorded for this team\n if (stand_data[team_name] === undefined) { stand_data[team_name] = []; }\n // adds data point to stand_data\n stand_data[team_name].push(data_point);\n }\n }\n // for each team, sorts by match\n for (let team_id in teams) {\n let team = teams[team_id];\n if (stand_data[team] !== undefined) {\n stand_data[team].sort(compareByMatch);\n }\n }\n}", "function initGameData () {\n $(\"#result_span\").text(\"\");\n closebyDistance = 1;\n centerIndex = indexFromCoordinates(trunc(boardDimension/2), trunc(boardDimension/2));\n numSquares = boardDimension*boardDimension;\n gameBoard = E.repeat(numSquares); \n gameInTurn = 0; \n gameMovesMade = 0;\n gameResult = null; \n gameIsPlayerToMove = true; \n nodeHash = {};\n nodeHash[gameBoard] = {result:0, visited:0, evaluation:null}; \n engineMoveOrder = [];\n thinkingTimeChangeHandler();\n }", "function loadLevel(data) {\n //Grab all layers in the data\n let layers = data.layers;\n //The tile width and height for this level\n let th = data.tileheight;\n let tw = data.tilewidth;\n //Loop through every layer\n for (let i = 0; i < layers.length; i++) {\n //If this is a tile layer and code is running on the client\n if (layers[i].name === \"tiles\" && !useNodeJS) {\n //Create a new tile layer in the image module\n app.image.createTileLayer(layers[i]);\n\n //Else, if this is a solid platform object layer\n } else if (layers[i].name === \"solidPlatforms\") {\n //Loop through all objects\n for (let o = 0; o < layers[i].objects.length; o++) {\n let obj = layers[i].objects[o];\n //Create a platform for this object with the json-provided dimensions\n physics.getPlatform(obj.x / tw, obj.y / th, obj.width / tw, obj.height / th);\n }\n\n //Else, if this is a non-solid platform layer\n } else if (layers[i].name === \"nonSolidPlatforms\") {\n //Loop through all objects\n for (let o = 0; o < layers[i].objects.length; o++) {\n let obj = layers[i].objects[o];\n //create a non-solid platform for this object with the json-provided dimensions\n let plat = physics.getPlatform(obj.x / tw, obj.y / th, obj.width / tw, obj.height / th);\n plat.solid = false;\n }\n }\n }\n //Set up the spritesheets the level uses if on the client\n if (!useNodeJS) {\n //Get tileset information\n let tilesets = data.tilesets;\n //Loop through all tilesets used\n for (let i = 0; i < tilesets.length; i++) {\n //Set the starting id for each sheet (sheets load seperately)\n state.image.tilesheets[tilesets[i].source].setStart(tilesets[i].firstgid);\n }\n }\n }", "function currentGameDataLoadingHandler() {\n if (store.getState().lastAction == 'GET_GAMEDATA') {\n currentGameDataLoaderStateChangeStarter();\n }\n }", "function preload() {\n\tclickablesManager = new ClickableManager('data/clickableLayout.csv');\n\tadventureManager = new AdventureManager('data/adventureStates.csv', 'data/interactionTable.csv', 'data/clickableLayout.csv');\n}", "function getAllData() {\n fillPlayerList();\n}", "function loadStatsData(data) {\n stats = data;\n}", "function preload() {\n theWorld = new OverheadWorld(worldParameters);\n thePlayer = new Player(100, 100, theWorld);\n // theGame = new Game1(theWorld, thePlayer);\n}", "function load(){\n\t//Display the loading progress bar while the game\n\tprogressBar.create(g.canvas, assets);\n\tprogressBar.update();\n}", "function loadGame() {\n mayiPivot = false;\n startButton.animate().alpha(0).duration(500).onEnd = function() {\n startButton.setHidden(true);\n startButton.setClickable(false);\n };\n dropSpider.animate().alpha(0).duration(500).onEnd = function() {\n dropSpider.setHidden(true);\n }\n mainOverlayBG.setHidden(false);\n mainOverlayBG.animate().alpha(1).duration(1100);\n gameBG.setHidden(false);\n gameBG.animate().alpha(1).duration(1100);\n deadpool.setHidden(false);\n deadpool.animate().alpha(1).duration(1200);\n gameHeader.setHidden(false);\n gameHeader.animate().alpha(1).duration(1200);\n gameHeart3.setHidden(false);\n gameHeart3.animate().alpha(1).duration(1200);\n spideyBody.setHidden(false);\n spideyBody.animate().alpha(1).duration(1200);\n spideyHead.setHidden(false);\n spideyHead.animate().alpha(1).duration(1200);\n gameScore.setHidden(false);\n gameTimer.setHidden(false);\n blackScreen.setHidden(false);\n blackScreen.animate().alpha(0.75).duration(1200);\n gameInstructions.animate().alpha(1).duration(1300).onEnd = function() {\n gameInstructions.setHidden(false);\n }\n gameInstructions.setClickable(true);\n}", "function load()\n{\n\tsetupParts();\n\t\n\tmain();\n}", "loadLevel(level){\n\t\tcurrentLevel = level;\n\t\tbubbles = [];\n\t\tplatforms = [];\n\n\t\tfor(i = 0; i < players.length; i++)\n\t\t\tvidasPlayers[i] = players[i].getVidas();\n\n\t\tgame.state.start('LoadLevel');\n\t}", "function loadData() {\n //Load high score data\n let data = JSON.parse(localStorage.getItem(`pop-data`));\n if (data !== null) {\n //If there is data, replace it with current high score.\n bubbleData = data;\n }\n}", "function load() {\n clearObjects(\"monsters\");\n clearObjects(\"monsterbullets\");\n clearObjects(\"goodthings\");\n clearObjects(\"bullets\");\n\n bulletsLeft = NUM_BULLETS;\n updateBulletsNumber();\n\n player = new Player();\n\n addLevel();\n goodThingsLeft = NUM_GOOD_THINGS;\n\n resetPlatforms();\n createPortals();\n\n for (i = 0; i < numMonsters; ++i) {\n createMonster(i == 0);\n }\n\n for (i = 0; i < NUM_GOOD_THINGS; ++i) {\n createGoodThing();\n }\n\n // Attach keyboard events\n document.addEventListener(\"keydown\", keydown, false);\n document.addEventListener(\"keyup\", keyup, false);\n\n startTimer();\n}", "getGameData() {\n return {\n d: this._data,\n m: this._moved,\n t: this._taken,\n w: this.winner,\n };\n }", "async load () {}", "async function loadPokemonData() {\n\tbuttonsOn(false);\n\tpokemon1 = idList[currentL];\n\tresp = await axios.get(`/api/pokemon/${idList[currentL]}`);\n\tpoke1 = resp.data;\n\tpokemon2 = idList[currentR];\n\tresp = await axios.get(`/api/pokemon/${idList[currentR]}`);\n\tpoke2 = resp.data;\n\tloadHTML(poke1, 1);\n\tloadHTML(poke2, 2);\n\tgenerateMoveList(poke1, 1);\n\tgenerateMoveList(poke2, 2);\n\tbuttonsOn(true);\n\tsaveinStorage();\n}", "function preload() {\n clickablesManager = new ClickableManager('data/clickableLayout.csv');\n adventureManager = new AdventureManager('data/adventureStates.csv', 'data/interactionTable.csv', 'data/clickableLayout.csv');\n}", "function loadGameStateChangeStarter() {\n store.dispatch( {\n type: GAME_LOAD,\n payload: {\n savedData: savedData\n }\n });\n }", "function loadPitData() {\n // loads through each file in manifest\n for (let data_id in manifest_pit) {\n let file_name = manifest_pit[data_id]; // e.g. 1540.json\n if (fs.existsSync(\"./data/pit/\" + file_name)) {\n let data_point = JSON.parse(fs.readFileSync(\"./data/pit/\" + file_name));\n let team_name = data_point[\"info\"][\"team\"];\n // sets defaults if values are non-existent\n // setDefaultsForPit(data_point);\n // adds data point to pit_data\n pit_data[team_name] = data_point;\n }\n }\n}", "function gameLoaded() {\n\t\t$('#loading').hide();\n\t\t$('#bg-images').append('<img id=\"bg-image\" src=\"images/bg_init.jpg\">');\n\t\t$('#intro-screen').slideDown();\n\n\t\t//Add level select\n\t\tfor (var i in levels) {\n\t\t\tvar ln = 1 + (i * 1);\n\t\t\t$('#levels').append('<div id=\"level-' + ln +'\" class=\"level\" data-level=\"' + ln +'\">Level ' + ln +' <br><span class=\"level-title\">'+ levels[i]['title'] +'</span></div>');\n\t\t}\n\n\t\t$('.level').click(function(){\n\t\t\t$('#levels').hide();\n\t\t\tvar level = $(this).data('level');\n\t\t\trenderLevel(level-1);\n\t\t});\n\n\t\t$('#next-level').click(function() {\n\t\t\trenderLevel(current_level +1);\n\t\t});\n\n\t\t$('#share-fb').click(function() {\n\t\t\tshareScoreToFacebook(score);\n\t\t});\n\n\t\t$('#share-tw').click(function() {\n\t\t\tshareScoreToTwitter(score);\n\t\t});\n\n\t\t$('#play-it-again').click(function() {\n\t\t\twindow.location.reload();\n\t\t});\n\t}", "function preload() {\n\n // load in room data\n roomData = loadJSON(\"data/maps.json\");\n \n itemsLibrary = loadJSON(\"data/items.json\");\n\n // create our world\n theWorld = new OverheadWorld(worldParameters);\n\n // create our player\n thePlayer = new Player(256, 256, theWorld);\n \n // create game time\n let initTime = new Timeformat( new Date().getHours(), new Date().getMinutes());\n console.log( initTime );\n theTime = new Gametime( 0, initTime );\n console.log( theTime );\n \n sadReacts = [ thePlayer.loadFrames( 'assets/effects/angry' ),\n thePlayer.loadFrames( 'assets/effects/heartbreak' ),\n thePlayer.loadFrames( 'assets/effects/scribble' ) ];\n neutralReacts = [ thePlayer.loadFrames( 'assets/effects/speaking' ) ];\n happyReacts = [ thePlayer.loadFrames( 'assets/effects/eyes' ),\n thePlayer.loadFrames( 'assets/effects/sparkle' ),\n thePlayer.loadFrames( 'assets/effects/music' ) ];\n selectedReact = neutralReacts[0];\n}", "function load() {\n var d = new Date().getTime();\n var uuid = 'xxxxxx'.replace(/[x]/g, function(c) {\n var r = (d + Math.random()*16)%16 | 0;\n d = Math.floor(d/16);\n return (c=='x' ? r : (r&0x3|0x8)).toString(16);\n });\n var guest = \"Guest \" + uuid.toUpperCase();\n //$(\"#name\").val(guest);\n $(\"#name\").val(\"sjoeke\");\n\n //check if localstorage exists\n if(localStorage.getItem(\"sessionID\")){\n sessionID = localStorage.getItem(\"sessionID\");\n localStorage.removeItem(\"sessionID\")\n $(\"#gamePlays\").hide();\n $(\"#statusWindow\").show();\n $(\"#gameClientWrapperSetup\").hide();\n $(\"#gameClientWrapperGame\").show();\n unPauzeGame();\n }\n}", "preload () {\n // loading the tile-sheet itself\n this.load.image('environment-tiles', 'assets/images/tiles/environment-tiles.png');\n // loading the json data for the map created with Tiled Editor\n this.load.tilemapTiledJSON('lvl-01-map', 'assets/maps/lvl-01-map.json');\n // Loading individual sprites. Should be refactored to use spritesheet in the future\n this.load.image('grass-patch', 'assets/images/tiles/grass-patch.png');\n // loading the player character\n this.load.spritesheet('player', 'assets/images/entities/player/characters.png', { frameWidth: 16, frameHeight: 16 });\n }", "function preload()\n{\n this.load.image('tileset', 'maps/tileset.png');\n this.load.tilemapTiledJSON('island', 'maps/island.json');\n this.load.atlas('hemadi', 'characters/hemadi.png', 'characters/hemadi.json');\n}", "function preload(){\n\n //player image\n this.load.atlas('player','././media/players/player1/playerSprite.png','././media/players/player1/playerAtlas.json');\n \n //enemy image\n this.load.atlas('enemy','././media/players/enemy1/enemySprite.png','././media/players/enemy1/enemyAtlas.json');\n \n //map files\n this.load.tilemapTiledJSON('map1a','./maps/map'+mapNumber+'.json');\n this.load.image('wall','./media/walls/wall1.jpg');\n \n //ground files\n this.load.image('ground','./media/grounds/ground1.png');\n this.load.tilemapTiledJSON('ground','./maps/ground1.json');\n\n //sounds\n this.load.audio('walkSound','././media/sounds/walking.mp3',{instances:1});\n}", "async loadAsync(id) { \n let t0 = performance.now();\n\n const object = await this.getByIdAsync(id);\n const game = Object.assign(new Game(), object);\n game.id = id;\n \n game.championships = game.championships.map(o => Object.assign(new Championship(), o));\n game.championshipEditions = game.championshipEditions.map(o => Object.assign(new ChampionshipEdition(), o));\n game.championshipEditionClubs = game.championshipEditionClubs.map(o => Object.assign(new ChampionshipEditionClub(), o));\n game.championshipEditionEliminationPhases = game.championshipEditionEliminationPhases.map(o => Object.assign(new ChampionshipEditionEliminationPhase(), o));\n game.championshipEditionEliminationPhaseDuels = game.championshipEditionEliminationPhaseDuels.map(o => Object.assign(new ChampionshipEditionEliminationPhaseDuel(), o));\n game.championshipEditionFixtures = game.championshipEditionFixtures.map(o => Object.assign(new ChampionshipEditionFixture(), o));\n game.championshipEditionGroups = game.championshipEditionGroups.map(o => Object.assign(new ChampionshipEditionGroup(), o));\n game.championshipEditionPlayers = game.championshipEditionPlayers.map(o => Object.assign(new ChampionshipEditionPlayer(), o));\n game.championshipTypes = game.championshipTypes.map(o => Object.assign(new ChampionshipType(), o));\n game.clubs = game.clubs.map(o => Object.assign(new Club(), o));\n game.confederations = game.confederations.map(o => Object.assign(new Confederation(), o));\n game.continents = game.continents.map(o => Object.assign(new Continent(), o));\n game.countries = game.countries.map(o => Object.assign(new Country(), o));\n game.fieldLocalizations = game.fieldLocalizations.map(o => Object.assign(new FieldLocalization(), o));\n game.fieldRegions = game.fieldRegions.map(o => Object.assign(new FieldRegion(), o));\n game.formations = game.formations.map(o => Object.assign(new Formation(), o));\n game.matches = game.matches.map(o => Object.assign(new Match(), o));\n game.players = game.players.map(o => Object.assign(new Player(), o));\n game.positions = game.positions.map(o => Object.assign(new Position(), o));\n game.seasons = game.seasons.map(o => Object.assign(new Season(), o));\n game.seasonDates = game.seasonDates.map(o => Object.assign(new SeasonDate(), o));\n\n Context.game = game;\n\n\t\tconsole.log(`GameService.loadAsync() took ${(performance.now() - t0)} milliseconds.`);\n \n return game;\n }", "function loadGameScreen () {\n /* reset all of the player's states */\n for (var i = 1; i < players.length; i++) {\n gameDisplays[i-1].reset(players[i]);\n }\n $gameLabels[HUMAN_PLAYER].removeClass(\"loser tied current\");\n clearHand(HUMAN_PLAYER);\n\n previousLoser = -1;\n recentLoser = -1;\n gameOver = false;\n\n $gamePlayerCardArea.show();\n $gamePlayerCountdown.hide();\n $gamePlayerCountdown.removeClass('pulse');\n chosenDebug = -1;\n updateDebugState(showDebug);\n \n /* randomize start lines for characters using legacy start lines.\n * The updateAllBehaviours() call below will override this for any\n * characters using new-style start lines.\n *\n * Also go ahead and commit any marker updates from selected lines.\n */\n players.forEach(function (p) {\n if(p.chosenState) {\n p.commitBehaviourUpdate();\n }\n }.bind(this));\n\n updateAllBehaviours(null, null, GAME_START);\n updateBiggestLead();\n\n /* set up the poker library */\n setupPoker();\n preloadCardImages();\n\n /* disable player cards */\n for (var i = 0; i < $cardButtons.length; i++) {\n $cardButtons[i].attr('disabled', true);\n }\n\n /* enable and set up the main button */\n allowProgression(eGamePhase.DEAL);\n}", "function preload() {\n images[0] = loadImage('assets/up.png');\n images[1] = loadImage('assets/down.png');\n\n \n clickablesManager = new ClickableManager('data/clickableLayout.csv');\n content = new Content_Man('data/Content.csv');\n adventureManager = new AdventureManager(\"data/adventureStates.csv\", \"data/interactionTable.csv\");\n}", "function preload(){\n game = new Game(\"game\");\n game.preload(resources);\n game.state = init;\n gameloop();\n}", "function preload(){\n game = new Game(\"game\");\n game.preload(resources);\n game.state = init;\n gameloop();\n}", "function get_new_gamedata() {\r\n\treturn {\r\n\t\t'turn' : 0,\r\n\t\t'board' : [-1, -1, -1, -1, -1, -1, -1, -1, -1],\r\n\t\t'ended' : false\r\n\t};\r\n}", "function preload () {\n window.width = GAME_WIDTH;\n window.height = GAME_HEIGHT;\n gameFont = loadFont('data/fonts/GameOverFont.ttf');\n\n screens.push(new Background());\n screens.push(new Menu());\n screens.push(new Highscores());\n screens.push(new GameLauncher());\n screens.push(new Weather());\n /*game itself will be added from game launcher\n /*in order to maintain access to it from there */\n screens.push(createCancelButton());\n}", "loadLevel() {\n this.level.load.tilemap(this.levelName, this.levelPath, null, Phaser.Tilemap.TILED_JSON);\n this.level.load.image('tiles', this.tileMapImagePath);\n this.level.game.load.audio('enemy_dying', 'gameSrc/assets/sounds/enemy_dying.ogg');\n this.level.game.load.audio('player_hit', 'gameSrc/assets/sounds/player_hit.ogg');\n this.level.game.load.audio('item_collect', 'gameSrc/assets/sounds/item_collect.ogg');\n this.level.game.load.audio('item_dropoff', 'gameSrc/assets/sounds/item_dropoff.ogg');\n this.level.game.load.audio('advance_level', 'gameSrc/assets/sounds/advance_level.ogg');\n this.level.game.load.audio('player_dying', 'gameSrc/assets/sounds/player_dying.ogg');\n this.level.game.load.audio('music', this.levelMusic);\n }", "function preload() {\n //load json file\n data = loadJSON(\"./content.json\");\n}", "function preload ()\n{\n this.load.image('tiles', 'assets/maps/medieval/tiles.png');\n this.load.tilemapCSV('map', 'assets/maps/medieval/map_top.csv');\n this.load.tilemapCSV('background', 'assets/maps/medieval/map_bottom.csv');\n this.load.spritesheet('player', 'assets/sprites/spaceman.png', { frameWidth: 16, frameHeight: 16 });\n}", "function loadData() {\n $.get(\"/api/games\")\n .done(function (data) {\n updateList(data);\n })\n .fail(function (jqXHR, textStatus) {\n alert(\"Failed: \" + textStatus);\n });\n }", "function preload(){\n //load world map data and contacts data\n url = \"https://raw.githubusercontent.com/holtzy/D3-graph-gallery/master/DATA/world.geojson\";\n geographies = loadJSON(url);\n url2 = \"https://raw.githubusercontent.com/awhite2/CreativeCoding/main/contacts.geojson\";\n contacts = loadJSON(url2);\n \n}", "function load(game, loadingType, loadingString) {\n // Depending on the loading type, do different things\n switch (loadingType) {\n // We don't load anything\n case MainLoadingType.NONE:\n // You can uncomment the lines below to start your game with everything unlocked (useful for testing purposes)\n /*\n Saving.saveNumber(\"aTreeStep\", 2);\n \n Saving.saveBool(\"mainMapDoneDesert\", true);\n Saving.saveBool(\"mainMapDoneBridge\", true);\n Saving.saveBool(\"mainMapDoneCaveEntrance\", true);\n Saving.saveBool(\"mainMapDonePier\", true);\n Saving.saveBool(\"mainMapDoneForest\", true);\n Saving.saveBool(\"mainMapDoneCastleEntrance\", true);\n \n Saving.saveBool(\"gridItemPossessedMainMap\", true);\n Saving.saveBool(\"gridItemPossessedTimeRing\", true);\n Saving.saveBool(\"gridItemPossessedThirdHouseKey\", true);\n Saving.saveBool(\"gridItemPossessedBeginnersGrimoire\", true);\n \n Saving.saveBool(\"gridItemPossessedFeather\", true);\n Saving.saveBool(\"gridItemPossessedPogoStick\", true);\n Saving.saveBool(\"gridItemPossessedHeartPlug\", true);\n Saving.saveBool(\"gridItemPossessedAdvancedGrimoire\", true);\n \n Saving.saveBool(\"gridItemPossessedSponge\", true);\n Saving.saveBool(\"gridItemPossessedShellPowder\", true);\n Saving.saveBool(\"gridItemPossessedHeartPendant\", true);\n Saving.saveBool(\"gridItemPossessedBlackMagicGrimoire\", true);\n \n Saving.saveBool(\"gridItemPossessedFortressKey\", true);\n Saving.saveBool(\"gridItemPossessedUnicornHorn\", true);\n Saving.saveBool(\"gridItemPossessedXinopherydonClaw\", true);\n Saving.saveBool(\"gridItemPossessedPitchfork\", true);\n \n Saving.saveBool(\"gridItemPossessedRedSharkFin\", true);\n Saving.saveBool(\"gridItemPossessedGreenSharkFin\", true);\n Saving.saveBool(\"gridItemPossessedPurpleSharkFin\", true);\n \n Saving.saveBool(\"gridItemPossessedTalkingCandy\", true);\n \n Saving.saveBool(\"gridItemPossessedP\", true);\n Saving.saveBool(\"gridItemPossessedL\", true);\n Saving.saveBool(\"gridItemPossessedA\", true);\n Saving.saveBool(\"gridItemPossessedY\", true);\n \n Saving.saveBool(\"eqItemGlovesRedEnchantedGloves\", true);\n Saving.saveBool(\"eqItemGlovesPinkEnchantedGloves\", true);\n //Saving.saveBool(\"eqItemWeaponWoodenSword\", true);\n Saving.saveBool(\"eqItemWeaponTrollBludgeon\", true);\n Saving.saveBool(\"eqItemWeaponTribalSpear\", true);\n Saving.saveBool(\"eqItemWeaponSummoningTribalSpear\", true);\n Saving.saveBool(\"eqItemWeaponMonkeyWizardStaff\", true);\n Saving.saveBool(\"eqItemWeaponGiantSpoon\", true);\n Saving.saveBool(\"eqItemHatOctopusKingCrown\", true);\n \n Saving.saveBool(\"eqItemBootsBootsOfIntrospection\", true);\n \n Saving.saveBool(\"eqItemBootsRocketBoots\", true);\n \n Saving.saveBool(\"eqItemWeaponGiantSpoonOfDoom\", true);\n \n Saving.saveBool(\"eqItemBodyArmoursEnchantedKnightBodyArmour\", true);\n \n Saving.saveNumber(\"gameCandiesEatenCurrent\", 500000000);\n Saving.saveNumber(\"gameCandiesEatenMax\", 500000000);\n \n Saving.saveNumber(\"playerHp\", 1000);\n \n Saving.saveBool(\"questPlayerSpellHealthPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellTurtlePotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellAntiGravityPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellBerserkPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellCloningPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellPPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellXPotionHasSpell\", true);\n \n Saving.saveNumber(\"questPlayerSpellHealthPotionQuantity\", 0);\n Saving.saveNumber(\"questPlayerSpellTurtlePotionQuantity\", 64084);\n Saving.saveNumber(\"questPlayerSpellAntiGravityPotionQuantity\", 47542);\n Saving.saveNumber(\"questPlayerSpellBerserkPotionQuantity\", 99549);\n Saving.saveNumber(\"questPlayerSpellCloningPotionQuantity\", 10050);\n Saving.saveNumber(\"questPlayerSpellPPotionQuantity\", 10085250);\n Saving.saveNumber(\"questPlayerSpellXPotionQuantity\", 10050999);\n \n //Saving.saveBool(\"gameDebug\", true);\n \n Saving.saveNumber(\"gameCandiesCurrent\", 5000000);\n Saving.saveNumber(\"gameCandiesMax\", 5000000);\n \n Saving.saveNumber(\"gameLollipopsCurrent\", 5000000000);\n Saving.saveNumber(\"gameLollipopsMax\", 500000000000);\n \n Saving.saveNumber(\"gameChocolateBarsCurrent\", 7);\n Saving.saveNumber(\"gameChocolateBarsMax\", 7);\n \n Saving.saveNumber(\"gamePainsAuChocolatCurrent\", 7);\n Saving.saveNumber(\"gamePainsAuChocolatMax\", 7);\n \n Saving.saveBool(\"lonelyHouseTakeTheBoxDone\", true);\n \n Saving.saveNumber(\"lollipopFarmPondHowManyLolligators\", 0);\n \n Saving.saveBool(\"statusBarUnlocked\", true);\n Saving.saveBool(\"statusBarUnlockedCfg\", true);\n Saving.saveBool(\"statusBarUnlockedSave\", true);\n Saving.saveBool(\"statusBarUnlockedMap\", true);\n Saving.saveBool(\"statusBarUnlockedInventory\", true);\n Saving.saveBool(\"statusBarUnlockedLollipopFarm\", true);\n Saving.saveBool(\"statusBarUnlockedCauldron\", true);\n Saving.saveBool(\"statusBarUnlockedHealthBar\", true);\n Saving.saveBool(\"statusBarUnlockedInsideYourBox\", true);\n Saving.saveBool(\"statusBarUnlockedTheComputer\", true);\n Saving.saveBool(\"statusBarUnlockedTheArena\", true);\n \n Saving.saveBool(\"castleKilledNougatMonster\", true);\n \n Saving.saveBool(\"dragonDone\", true);\n Saving.saveBool(\"dragonUnlockedCyclops\", true);\n \n Saving.saveBool(\"castleTowerFirstVisitDone\", true);\n \n Saving.saveString(\"gameLanguage\", \"fr\");\n */\n break;\n case MainLoadingType.LOCAL:\n LocalSaving.load(loadingString);\n break;\n case MainLoadingType.FILE:\n var fileBools = loadingString.match(/bool +[a-zA-Z0-9_]+ *= *[a-zA-Z0-9_]+/g);\n var fileNumbers = loadingString.match(/number +[a-zA-Z0-9_]+ *= *[a-zA-Z0-9_]+/g);\n var fileStrings = loadingString.match(/string +[a-zA-Z0-9_]+ *= *[a-zA-Z0-9_]+/g);\n // Load the bools\n if (fileBools != null) {\n for (var i = 0; i < fileBools.length; i++) {\n Saving.saveBool(fileBools[i].match(/[a-zA-Z0-9_]+=/)[0].replace(\"=\", \"\"), Saving.stringToBool(fileBools[i].match(/=[a-zA-Z0-9_]+/)[0].replace(\"=\", \"\")));\n }\n }\n // Load the numbers\n if (fileNumbers != null) {\n for (var i = 0; i < fileNumbers.length; i++) {\n Saving.saveNumber(fileNumbers[i].match(/[a-zA-Z0-9_]+=/)[0].replace(\"=\", \"\"), Saving.stringToNumber(fileNumbers[i].match(/=[a-zA-Z0-9_]+/)[0].replace(\"=\", \"\")));\n }\n }\n // Load the strings\n if (fileStrings != null) {\n for (var i = 0; i < fileStrings.length; i++) {\n Saving.saveString(fileStrings[i].match(/[a-zA-Z0-9_]+=/)[0].replace(\"=\", \"\"), fileStrings[i].match(/=[a-zA-Z0-9_]+/)[0].replace(\"=\", \"\"));\n }\n }\n break;\n }\n // Apply the loaded variables to various things by calling the load() methods of various objects\n game.load(); // Various variables owned by the game object\n game.getPlayer().load(); // The player\n }" ]
[ "0.832943", "0.7465807", "0.74487615", "0.7436724", "0.72135866", "0.7212503", "0.71787655", "0.71692055", "0.716024", "0.715377", "0.71502906", "0.7088876", "0.70205617", "0.6937962", "0.69130236", "0.6887177", "0.68501824", "0.6840369", "0.67668706", "0.6748402", "0.674673", "0.6742357", "0.6727868", "0.6708066", "0.6693983", "0.6688829", "0.6641935", "0.6640687", "0.660176", "0.6601538", "0.659942", "0.65619797", "0.6536258", "0.65331435", "0.64828646", "0.64764565", "0.6464823", "0.6451128", "0.6449128", "0.6447797", "0.6422695", "0.64059335", "0.6387832", "0.6385573", "0.6365829", "0.63516384", "0.63472104", "0.63151836", "0.63151836", "0.63079584", "0.62999725", "0.62934655", "0.6290928", "0.62685513", "0.6265881", "0.62647283", "0.6259583", "0.62517726", "0.6251089", "0.6247746", "0.62448543", "0.62390655", "0.6235436", "0.62251157", "0.6224145", "0.62207097", "0.62116325", "0.6208684", "0.6207679", "0.6206454", "0.61940926", "0.61912507", "0.61870503", "0.61692345", "0.6167958", "0.6164039", "0.61626995", "0.6161218", "0.6159523", "0.6154616", "0.6151144", "0.6149109", "0.61482054", "0.61470145", "0.6137847", "0.6128458", "0.6123911", "0.61221826", "0.61118263", "0.61114967", "0.6107904", "0.61059475", "0.61059475", "0.6105266", "0.6091804", "0.60880136", "0.60731405", "0.60705537", "0.60702276", "0.6063849", "0.6062027" ]
0.0
-1
end function / ======================= /load Game Data ======================= / ======================= gameIsOn =======================
function gameIsOn() { $.ajaxSetup({ cache: true}); $.getJSON("http://data.nba.com/data/v2015/json/mobile_teams/nba/2016/scores/gamedetail/" + gameID + "_gamedetail.json", function(data){ var period = data.g.p; var gamestatus = data.g.stt; gameStatus = data.g["st"]; if (period === null || period == "0") { loadScoreboardPregame(); } else { loadScoreboardInGame(); if (gamestatus != "Final") { setInterval("loadScoreboardInGame()",10000); } if (gamestatus == "Final") { clearInterval("loadScoreboardInGame"); //clear interval } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadGameData()\n\t\t\t{\n\t\t\t\tif(gameName == \"fatcat7\")\n\t\t\t\t{\n\t\t\t\t\tgame = new FatCat7Game();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"bounty\")\n\t\t\t\t{\n\t\t\t\t\tgame = new BountyGame();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"gummibar\")\n\t\t\t\t{\n\t\t\t\t\tgame = new GummiBarGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"aprilmadness\")\n\t\t\t\t{\n\t\t\t\t\tgame = new AprilMadnessGame();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"moneybooth\")\n\t\t\t\t{\n\t\t\t\t\tgame = new MoneyBoothGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"astrologyanswers\")\n\t\t\t\t{\n\t\t\t\t\tgame = new AstrologyAnswersGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t\tisBothFreeSpinAndOtherBonus = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgame.importGame(xmlData);\n\t\t\t}", "function loadGame() {\n mayiPivot = false;\n startButton.animate().alpha(0).duration(500).onEnd = function() {\n startButton.setHidden(true);\n startButton.setClickable(false);\n };\n dropSpider.animate().alpha(0).duration(500).onEnd = function() {\n dropSpider.setHidden(true);\n }\n mainOverlayBG.setHidden(false);\n mainOverlayBG.animate().alpha(1).duration(1100);\n gameBG.setHidden(false);\n gameBG.animate().alpha(1).duration(1100);\n deadpool.setHidden(false);\n deadpool.animate().alpha(1).duration(1200);\n gameHeader.setHidden(false);\n gameHeader.animate().alpha(1).duration(1200);\n gameHeart3.setHidden(false);\n gameHeart3.animate().alpha(1).duration(1200);\n spideyBody.setHidden(false);\n spideyBody.animate().alpha(1).duration(1200);\n spideyHead.setHidden(false);\n spideyHead.animate().alpha(1).duration(1200);\n gameScore.setHidden(false);\n gameTimer.setHidden(false);\n blackScreen.setHidden(false);\n blackScreen.animate().alpha(0.75).duration(1200);\n gameInstructions.animate().alpha(1).duration(1300).onEnd = function() {\n gameInstructions.setHidden(false);\n }\n gameInstructions.setClickable(true);\n}", "function currentGameDataLoadingHandler() {\n if (store.getState().lastAction == 'GET_GAMEDATA') {\n currentGameDataLoaderStateChangeStarter();\n }\n }", "function loadGame(){\n\t// images\n\tbgImage.src = \"images/backgframe_480.jpg\";\n\tdude.src = \"images/person.png\";\n\tscrollImage.src = \"images/scroll.png\";\n\t\n\t// required buttons\n \tpauseButtonImage.src = \"images/gmenub1.png\";\n\t\n \tpauseButtonImage2.src = \"images/gpauseButton.png\";\n\t\n\t// test buttons (debugging)\n \tgenerateButtonImage.src = \"images/button.png\";\n\tvictoryButtonImage.src = \"images/button.png\";\n\taddscoreButtonImage.src = \"images/button.png\";\n\taddGameOverButtonImage.src = \"images/button.png\";\n\n\t/*// turn off main menu music\n\tmusicOn = false;\n\tmusic.pause();*/\n\t\n\tinitGameSetting(); //rules.js\n}", "function loadData(){ \t\n \t//if (gameData.data.player.playerID>0) {\n \t\tCORE.LOG.addInfo(\"PROFILE_PAGE:loadData\");\n \t\t//var p = new ProfileCommunication(CORE.SOCKET, setData); \t\t\n \t\t//p.getData(gameData.data.player.playerID); \t\t\n \t\t\n \t//}\n \t//else \n \t\tsetDataFromLocalStorage(); \t \t \t\n }", "function loadUnlockData() {\n\n for (var i = 0; i < unlockData.length; i++) {\n\n var gameId = unlockData[i].gameId;\n var unlockState = unlockData[i].unlockState;\n\n if (unlockState == true) {\n displayGame(gameId);\n } else {\n displayGameLock(gameId);\n }\n\n }\n\n}", "async start(game, data) {\n\t\tthis._won = false;\n\t\tthis._won_time = -1;\n\t}", "function loadGameScreen(data){\r\n\t\t\t$('#container1').hide(); \r\n\t\t\t\t$('body').css(\"background-color\", \"white\");\r\n\t\t\t\t$('#boxes').show();\r\n\t\t\t\tmessage.autosize();\r\n\t\t\t\t// if current letters is a non-empty string, hide start game div & display letters\r\n\t\t\t\tif(data.game.state === 'active'){\r\n\t\t\t\t\t// if current letters, then game has started so hide the startgame\r\n\t\t\t\t\tstartGameDiv.hide();\r\n\t\t\t\t\thints.masonry('reload');\r\n\t\t\t\t} else{\r\n\t\t\t\t\t$introText.html(data.game.message);\r\n\t\t\t\t\t// game has not yet started\r\n\t\t\t\t\tsendHintDiv.hide();\r\n\t\t\t}\r\n\t\t}", "load() {\n Logger.info(`The game(${this._id}) is loading...`)\n this.event_manager.trigger('game_load', [this])\n Logger.info('Loading the game mode')\n _.forEach(this._games, (game) => game._load())\n }", "function loadGame(gameType, gameData) {\r\n\t\tif (gameType == 'spelling') {\r\n\t\t\tvar myGame = UnityLoader.instantiate($(\".new-game-frame\")[0], \"/public/games/spelling/Build/TypingFinalBuild.json\", {\r\n\t\t\t\tonProgress: (gameInstance, progress) => {\r\n\t\t\t\t\tif (progress == 1) {\r\n\t\t\t\t\t\tconsole.log(\"game is loaded\")\r\n\t\t\t\t\t\tconsole.log(gameInstance)\r\n\t\t\t\t\t\tgameInstance.SendMessage(\"GameMgr\", \"SetGameData\", JSON.stringify(gameData));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else if (gameType == 'math') {\r\n\t\t\tvar myGame = UnityLoader.instantiate($(\".new-game-frame\")[0], \"/public/games/math/Build/FinalBuild.json\", {\r\n\t\t\t\tonProgress: (gameInstance, progress) => {\r\n\t\t\t\t\tif (progress == 1) {\r\n\t\t\t\t\t\tconsole.log(\"game is loaded\")\r\n\t\t\t\t\t\tconsole.log(gameInstance)\r\n\t\t\t\t\t\tgameInstance.SendMessage(\"GameMgr\", \"SetGameData\", JSON.stringify(gameData));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t}", "async start(game, data) {\n\t\tthis._lost = false;\n\t\tthis._lost_time = -1;\n\t}", "loadGame(gameState) {\n this.gameState.score = gameState.score;\n this.gameState.won = gameState.won;\n this.gameState.over = gameState.over;\n this.gameState.board = gameState.board;\n }", "function change_game_state() {\n if(localStorage[\"gameIsOn\"] == \"false\")\n { \n localStorage[\"gameIsOn\"] = true;\n }\n else\n {\n localStorage[\"gameIsOn\"] = false;\n }\n}", "function loadedCheck(callback){\n\tvar TOTAL = 4;\n\tloaded++;\n\tif(loaded === TOTAL){\n\t\tcallback(Game);\n\t\t//if(state === \"load\") //load game and start Game\n\t\t//\tloadG(Game);\n\t\t//else callback(Game); //we init Game and start Game\n\t}\n}", "loadGame(gameState) {\n\t\tthis.gameState = gameState;\n\t}", "loadGame(gameState) {\n this.gameState = gameState;\n }", "function setupGameData() {\n // only run it the first time we play\n if (dataTotal === 0) {\n\n // music setup\n STARZ.SoundManager.init('audio');\n STARZ.SoundManager.addMusic('title');\n STARZ.SoundManager.addMusic('gameplay');\n STARZ.SoundManager.addFX('bonus');\n STARZ.SoundManager.addFX('hurry');\n STARZ.SoundManager.addFX('locked');\n STARZ.SoundManager.addFX('broken');\n STARZ.SoundManager.addFX('correct');\n STARZ.SoundManager.addFX('incorrect');\n\n // button setup\n UI.ButtonFX.init('.button1');\n\n STARZ.ScreenManager.showScreen('#loading');\n STARZ.JSONLoader.load('data/images.json', tvDataLoaded, gameError);\n STARZ.JSONLoader.load('data/quiz.json', quizDataLoaded, gameError);\n } else {\n STARZ.ScreenManager.showScreen('#titleScreen');\n }\n }", "handleInitialGameLoad(serializedGameData) {\n var gameData = JSON.parse(serializedGameData);\n if (!gameData.board_state) {\n if (!this.isHost) {\n // Server isn't ready yet. We're not the host, so let's idle.\n var self = this;\n window.setTimeout(function () {\n self.loadInitialBoard();\n }, 3000);\n console.warn(\"trying again\");\n } else {\n // Server isn't ready yet. We're the host, so let's\n // make it ready.\n if (this.hostNewGameCallback !== null) {\n this.hostNewGameCallback();\n }\n if (this.loadCompleteCallback !== null) {\n this.loadCompleteCallback(false);\n }\n }\n } else {\n if (this.loadServerDataCallback !== null) {\n this.loadServerDataCallback(gameData);\n }\n if (this.loadCompleteCallback !== null) {\n this.loadCompleteCallback(gameData.finalized);\n }\n }\n }", "function load_game_overview_data(page_data) {\n var status = page_data.game_status;\n var map_data;\n delete page_data.game_status;\n\n if(status == \"ongoing\"){\n var orders = page_data.orders;\n var punits = page_data.player_units;\n var year = page_data.year;\n var season = page_data.season;\n var phase = page_data.phase;\n var order_result = page_data.order_result;\n delete page_data.orders;\n delete page_data.player_units;\n delete page_data.year;\n delete page_data.season;\n delete page_data.phase;\n delete page_data.order_result;\n var stat_acc = \"<b>\"+year+\"_\"+season+\"_\"+phase+\"</b>\";\n\n $('#game_header').html(\"<h1>Game Overview</h1>\");\n $('#game_order_info').html(orders?interpret_orders(orders):\"No Orders\");\n $('#order_feedback').html(order_result?interpret_result_orders(order_result):\"No resulting orders\");\n $('#game_stat_info').html(stat_acc);\n $('#game_stat').show();\n $('#press_game_id').val(page_data.game_id);\n\n rownum = 0;\n $('#order_gen').html(\"\");\n\n map_data = {\n punits: punits,\n country: page_data.country,\n phase: phase,\n resOrd: order_result\n };\n }else if(page_data.status == \"finished\"){\n $('#game_header').html(\"<h1>Finished Game Overview</h1>\");\n $('#game_stat').hide();\n }\n\n var units = page_data.unit_list;\n var owners = page_data.owner_list;\n\n delete page_data.unit_list;\n delete page_data.owner_list;\n var acc = \"\";\n for(var i in page_data){\n acc += i+\": <b>\"+page_data[i]+\"</b><br>\";\n }\n acc += \"<br>\";\n $('#gov_info').html(acc);\n $('#game_id').val(page_data.game_id);\n $('#mid_area').html('<div id=\"canvas_div\"><canvas id=\"canvas\" width=\"1154\" height=\"996\"></canvas></div>');\n $('#canvas_div').css('left', ((window.innerWidth-1154)*0.5-7)+'px');\n\n //Keep the map always in the middle\n window.onresize = function(){\n $('#canvas_div').css('left', ((window.innerWidth-1154)*0.5-7)+'px');\n if(page!==\"game\")\n window.onresize = null;\n }\n\n //after page contents are loaded, draw the map and units\n $('#world').ready(function(){\n prepareCanvas(units, owners, map_data);\n });\n}", "function gameLoaded() {\n\t\t$('#loading').hide();\n\t\t$('#bg-images').append('<img id=\"bg-image\" src=\"images/bg_init.jpg\">');\n\t\t$('#intro-screen').slideDown();\n\n\t\t//Add level select\n\t\tfor (var i in levels) {\n\t\t\tvar ln = 1 + (i * 1);\n\t\t\t$('#levels').append('<div id=\"level-' + ln +'\" class=\"level\" data-level=\"' + ln +'\">Level ' + ln +' <br><span class=\"level-title\">'+ levels[i]['title'] +'</span></div>');\n\t\t}\n\n\t\t$('.level').click(function(){\n\t\t\t$('#levels').hide();\n\t\t\tvar level = $(this).data('level');\n\t\t\trenderLevel(level-1);\n\t\t});\n\n\t\t$('#next-level').click(function() {\n\t\t\trenderLevel(current_level +1);\n\t\t});\n\n\t\t$('#share-fb').click(function() {\n\t\t\tshareScoreToFacebook(score);\n\t\t});\n\n\t\t$('#share-tw').click(function() {\n\t\t\tshareScoreToTwitter(score);\n\t\t});\n\n\t\t$('#play-it-again').click(function() {\n\t\t\twindow.location.reload();\n\t\t});\n\t}", "function gsINFO(){\r\n gameState= INFO\r\n}", "function load()\n {\n populateMap(gameInfo.jediList);\n init();\n gameInfo.gameState = \"pickChar\";\n }", "function currentGameDataLoaderStateChangeStarter() {\n if (store.getState().activeSlot == 1) {\n activeGameState = store.getState().savedData.slot1;\n store.dispatch( {\n type: GAMEDATA_LOADED,\n payload: {\n activeGameState: store.getState().savedData.slot1\n }\n });\n }\n if (store.getState().activeSlot == 2) {\n activeGameState = store.getState().savedData.slot2;\n store.dispatch( {\n type: GAMEDATA_LOADED,\n payload: {\n activeGameState: store.getState().savedData.slot2\n }\n });\n }\n if (store.getState().activeSlot == 3) {\n activeGameState = store.getState().savedData.slot3;\n store.dispatch( {\n type: GAMEDATA_LOADED,\n payload: {\n activeGameState: store.getState().savedData.slot3\n }\n });\n }\n }", "function loadGame() {\n\ttry {\n\t\tvar gameArray = [];\n\t\t\n\n\t\tfor (var i = 0; i < gameList.length; i++) {\n\t\t\tif (gameList[i].Notification == 1) {\n\n\t\t\t\t//Ti.API.info('gameIcons', \"/images/gameIcons/\" + \"C\" + gameList[i].CTestID + \".png\");\n\n\t\t\t\tgameArray.push({\n\t\t\t\t\ttemplate : \"gameListTemplate\",\n\n\t\t\t\t\tgameNameLabel : {\n\t\t\t\t\t\ttext : gameList[i].CTestName\n\t\t\t\t\t},\n\t\t\t\t\ticonImage : {\n\t\t\t\t\t\timage : \"/images/gameIcons/\" + \"C\" + gameList[i].CTestID + \".png\"\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t$.lstSection.setItems(gameArray);\n\n\t} catch(ex) {\n\t\tcommonFunctions.handleException(\"welcomeContentScreen\", \"loadGame\", ex);\n\t}\n}", "function initGame(){\n resetGameStats()\n setLevel()\n gBoard = buildBoard()\n renderBoard(gBoard)\n gGame.isOn = true\n\n}", "function loadData(gameInfo) {\n\tfor (var i = 0; i < gameInfo.length; i++) {\n\t\tTi.API.info('game is' + gameInfo[i].gameID);\n\t\tif (gameInfo[i].gameID == 1) {\n\t\t\t$.nBackLbl.value = gameInfo[i].points;\n\t\t} else if (gameInfo[i].gameID == 2) {\n\t\t\t$.trailsLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 3) {\n\n\t\t\t$.spatialFrwdLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 4) {\n\n\t\t\t$.spatialBackLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 5) {\n\n\t\t\t$.simpleMemoryLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 6) {\n\n\t\t\t$.serail7Lbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 7) {\n\n\t\t\t$.catDogLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 8) {\n\n\t\t\t$.FigLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 9) {\n\n\t\t\t$.visualLbl.value = gameInfo[i].points;\n\n\t\t} else if (gameInfo[i].gameID == 10) {\n\t\t\t$.digitSpanLbl.value = gameInfo[i].points;\n\t\t} else if (gameInfo[i].gameID == 11) {\n\t\t\t$.catdogNewLbl.value = gameInfo[i].points;\n\t\t} else if (gameInfo[i].gameID == 12) {\n\t\t\t$.TemporalLbl.value = gameInfo[i].points;\n\t\t} else if (gameInfo[i].gameID == 15) {\n\t\t\t$.surveyLbl.value = gameInfo[i].points;\n\t\t}\n\t}\n}", "function loadGameData() {\n\n $.ajaxSetup({ cache: true});\n $.getJSON(cavsSchedFeed, \n function(data){\n\n gamenum=3;\n \n // SET GLOBAL VARIABLES\n game = data.gscd.g;\n status = game[gamenum].st;\n arena = game[gamenum].an; //ARENA\n gamedate = game[gamenum].gdte; //GAME DATE\n gametime = game[gamenum].etm; //GAME TIME EST DATE&TIME\n gameID = game[gamenum].gid; //GAME ID\n gcode = game[gamenum].gcode; //GAME CODE\n\n gametimeFormatted = moment(game[gamenum].etm).format('dddd, MMMM D, YYYY') + ' AT ' + moment(game[gamenum].etm).format('h:mm A')+' (ET)'; \n\n if (cavsTID == data.gscd.g[gamenum].h.tid){\n cavsHOME = 1;\n } else {\n cavsHOME = 0;\n }\n\n}); \n\n}", "function on_load()\n{\n\tgame.start();\n}", "function load() {\r\n\t\tvar loaded = $.parseJSON(localStorage.getItem(STORAGE_NAME)),\r\n\t\t\tcondition = loaded.condition;\r\n\t\tSIZE = loaded.size;\r\n\t\tTOTALCELLS = SIZE*SIZE;\r\n\t\tMINES = loaded.minecells.length;\r\n\t\tcells = loaded.cells;\r\n\t\tminecells = loaded.minecells;\r\n\t\ttime = loaded.time;\r\n\t\tclicks = loaded.clicks;\r\n\t\tnewGame(true, loaded.board, condition);\r\n\t}", "function initGame (){\n\n resetData();\n \n //Update content\n\n \n //Pick a new country and display info\n pickCountry();\n getcountryText();\n UpdateContent();\n\n //hide background image\n\n dispGame.classList.add(\"gameStarted\");\n dispGame.style.display = \"block\";\n dispGame.style.visibility = \"visible\";\n \n //hide start button\n startGame.style.display = \"none\";\n\n //Set isGameOver to false\n isgameOver = false;\n\n}", "static async load()\n {\n await RPM.settings.read();\n await RPM.datasGame.read();\n RPM.gameStack.pushTitleScreen();\n RPM.datasGame.loaded = true;\n RPM.requestPaintHUD = true;\n }", "function startGame () {\n // check to see if everything has been loaded\n let everythingLoaded = true;\n Object.keys(loading).forEach(function (key) {\n if (!loading[key]) everythingLoaded = false;\n });\n\n // only join the Oasis and start ticking/rendering if all game data has been loaded\n if (everythingLoaded) {\n // THE WHOLE GAME HAS LOADED\n joinGame();\n\n // start game loop\n startGameLoop(tick, render, 60);\n }\n}", "function preload (game){\n\t \t\tconsole.log(\"preload\");\n\t \t\tgame.load.crossOrigin = 'anonymous';\n\t\t\tgame.load.image('gift-basic', resolveUrl('data/gift-basic.png'));\n\t\t\tgame.load.image('gift-clock', resolveUrl('data/gift-clock.png'));\n\t\t\tgame.load.image('gift-compass', resolveUrl('data/gift-compass.png'));\n\t\t\tgame.load.image('gift-double', resolveUrl('data/gift-double.png'));\n\t\t\tgame.load.image('gift-freeze', resolveUrl('data/gift-freeze.png'));\n\t\t\tgame.load.image('gift-glasses', resolveUrl('data/gift-glasses.png'));\n\t\t\tgame.load.image('gift-ink', resolveUrl('data/gift-ink.png'));\n\t\t\tgame.load.image('gift-mushroom', resolveUrl('data/gift-mushroom.png'));\n\t\t\tgame.load.image('gift-speedup', resolveUrl('data/gift-speedup.png'));\n\t\t\tgame.load.image('gift-watch', resolveUrl('data/gift-watch.png'));\n\t\t\tgame.load.image('gift-bomb', resolveUrl('data/gift-bomb.png'));\t\n\t\t\tgame.load.image('gameover', resolveUrl('data/gameover.gif'));\n\t\t\tgame.load.image('ink-splash', resolveUrl('data/ink-splash.png'));\n\t\t\tgame.load.image('background', resolveUrl('data/background.png'));\n\t\t\tgame.load.image('background2', resolveUrl('data/background2.png'));\n\t\t\tgame.load.image('giftstar1', resolveUrl('data/giftstar1.png'));\n\t\t\tgame.load.image('giftstar2', resolveUrl('data/giftstar2.png'));\n\t\t\tgame.load.image('giftstar3', resolveUrl('data/giftstar3.png'));\n\t\t\tgame.load.image('giftstar4', resolveUrl('data/giftstar4.png'));\n\t\t\tgame.load.image('giftstar5', resolveUrl('data/giftstar5.png'));\n\t\t\tgame.load.image('santa', resolveUrl('data/santa.png'));\n\t\t\tgame.load.script('BlurX', resolveUrl('filters/BlurX.js'));\n\t \tgame.load.script('BlurY', resolveUrl('filters/BlurY.js'));\n\t \tgame.load.audio('background-music', resolveUrl('data/LoveIsAChristmasRose_PineyGir.mp3'));\n\t \tgame.load.audio('sfx', resolveUrl('data/fx_mixdown.ogg'));\n\n\t \t}", "function loadGameStateChangeStarter() {\n store.dispatch( {\n type: GAME_LOAD,\n payload: {\n savedData: savedData\n }\n });\n }", "function C999_Common_Achievements_Load() {\n\tLeaveIcon = \"\";\n LeaveScreen = \"\";\n C999_Common_Achievements_PrepareAchievements();\n\tLoadInteractions();\n\tStopTimer(7.6666667 * 60 * 60 * 1000);\n}", "function LoadGame() {\n\t// Your code goes here for loading a game\n\tprint(\"Complete this method in Singleplayer.js\");\n}", "function cam_eventGameLoaded()\n{\n\tisReceivingAllEvents = true;\n\t__camSaveLoading = true;\n\tconst SCAV_KEVLAR_MISSIONS = [\n\t\t\"CAM_1CA\", \"SUB_1_4AS\", \"SUB_1_4A\", \"SUB_1_5S\", \"SUB_1_5\",\n\t\t\"CAM_1A-C\", \"SUB_1_7S\", \"SUB_1_7\", \"SUB_1_DS\", \"CAM_1END\", \"SUB_2_5S\"\n\t];\n\n\t//Need to set the scavenger kevlar vests when loading a save from later Alpha\n\t//missions or else it reverts to the original texture.\n\tfor (var i = 0, l = SCAV_KEVLAR_MISSIONS.length; i < l; ++i)\n\t{\n\t\tif (__camNextLevel === SCAV_KEVLAR_MISSIONS[i])\n\t\t{\n\t\t\tif (tilesetType === \"ARIZONA\")\n\t\t\t{\n\t\t\t\treplaceTexture(\"page-7-barbarians-arizona.png\",\n\t\t\t\t\t\t\t\"page-7-barbarians-kevlar.png\");\n\t\t\t}\n\t\t\telse if (tilesetType === \"URBAN\")\n\t\t\t{\n\t\t\t\treplaceTexture(\"page-7-barbarians-arizona.png\",\n\t\t\t\t\t\t\t\"page-7-barbarians-urban.png\");\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t//Subscribe to eventGroupSeen again.\n\tcamSetEnemyBases();\n\t__camSaveLoading = false;\n}", "function gameStart() {\r\n newgame.disabled = true;\r\n holdHand.disabled = false;\r\n hit.disabled = false;\r\n }", "setGameData (data) {\n this.gameData = data\n console.log('******************')\n console.log('SETTING GAME DATA')\n this.freeTerritories = data.freeTerritories\n console.log('this.freeTerritories ' + this.freeTerritories)\n this.currentPhase = data.phase\n GameWindow.displayCurrentPhase(this.currentPhase)\n console.log('currentPhase ' + this.currentPhase)\n this.view.currentPlayer = data.activePlayer\n // this.firstPlayer = data.activePlayer\n console.log('currentPlayer ' + THIS.view.currentPlayer)\n this.totalPlayers = data.nbPlayers\n console.log('totalPlayers ' + this.totalPlayers)\n\n /* sets view's players array */\n this.setPlayersData(data)\n console.log('view.players after update')\n console.log(THIS.view.players)\n\n /* Set the player localstorage */\n this.setPlayerLocalStorage(data)\n\n /* Sets the map data */\n this.setMapData(data)\n\n var myColor = SupportedColors[localStorage.getItem('myId')]\n\n // SupportedColors[]\n\n GameWindow.displayMyColor(myColor)\n\n GameWindow.unhighlightTerritory()\n\n switch (THIS.currentPhase) {\n case phases['PREPHASE']:\n console.log('start game')\n THIS.startGame() \n break\n\n case phases['REINFORCEMENT']:\n console.log('reinforcement phase')\n THIS.reinforcementLogic()\n break\n\n case phases['OFFENSE']:\n console.log('offence phase')\n THIS.beginAttackPhase()\n break\n\n case phases['FORTIFICATION']:\n console.log('fortification phase')\n THIS.fortificationLogic()\n break\n\n default:\n break\n }\n }", "function loadCurrentGameState() {\n\tdatabase.ref('curr').on(\"value\", function(currentData) {\n\t\tfor(var player in currentData.val()) {\n\t\t\tupdatePlayer(player, currentData.val()[player]);\n\t\t}\n\t});\n\n\tdatabase.ref('chat').on(\"child_added\", function(data) {\n\t\tappendChatLine(data.val());\n\t});\n}", "function checkingIfGameStarts(){\n $scope.socket.on(\"gameStart\", function (params) {\n if (params != {}) {\n $scope.$apply(function () {\n makeSound.stopSong();\n if($scope.currentScreen===\"game\"){\n $scope.current3DPage = \"scripts/GameMap/index.html\";\n $scope.currentPage = \"gameContainer\";\n }\n else if($scope.currentScreen===\"guide\"){\n $scope.current3DPage = \"scripts/gameMap/swingGuide.html\";\n $scope.currentPage = \"swingGuideContainer\";\n }\n else{\n updateScore();\n }\n });\n }\n });\n }", "isGameOpen() {\n return this.gameState === GAME_OPEN;\n }", "startGame (data) {\n if (THIS.gameIsSet == false) {\n GameWindow.displayMessage('Welcome to RiKS World!')\n }\n var ms = 2000\n this.clearTimeoutDisplay()\n THIS.timeoutDisplay = setTimeout(function () {\n GameWindow.clearDisplayMessage()\n console.log(\n 'localstorage id = ' +\n localStorage.myId +\n ', activeplayerid = ' +\n THIS.view.currentPlayer\n )\n\n GameWindow.displayCurrentPlayer()\n if (THIS.gameIsSet == false) {\n if (localStorage.getItem('myId') == THIS.view.currentPlayer) {\n GameWindow.displayMessage('Click on a territory to claim it !')\n } else {\n GameWindow.displayMessage(\n THIS.getActivePlayerName() + ' is choosing a territory !'\n )\n }\n } else {\n if (localStorage.getItem('myId') == THIS.view.currentPlayer) {\n GameWindow.displayMessage('Put 1 unit on one of your territories !')\n } else {\n GameWindow.displayMessage(\n THIS.getActivePlayerName() + ' is reinforcing a territory !'\n )\n }\n }\n console.log('free territories = ' + THIS.getFreeTerritoriesNumber())\n }, ms)\n /**\n * from now players claim territories turn by turn on map\n * using dbclick on territory, until no more free territories left\n */\n }", "function loadGameScreen () {\n /* reset all of the player's states */\n for (var i = 1; i < players.length; i++) {\n gameDisplays[i-1].reset(players[i]);\n }\n $gameLabels[HUMAN_PLAYER].removeClass(\"loser tied current\");\n clearHand(HUMAN_PLAYER);\n\n previousLoser = -1;\n recentLoser = -1;\n gameOver = false;\n\n $gamePlayerCardArea.show();\n $gamePlayerCountdown.hide();\n $gamePlayerCountdown.removeClass('pulse');\n chosenDebug = -1;\n updateDebugState(showDebug);\n \n /* randomize start lines for characters using legacy start lines.\n * The updateAllBehaviours() call below will override this for any\n * characters using new-style start lines.\n *\n * Also go ahead and commit any marker updates from selected lines.\n */\n players.forEach(function (p) {\n if(p.chosenState) {\n p.commitBehaviourUpdate();\n }\n }.bind(this));\n\n updateAllBehaviours(null, null, GAME_START);\n updateBiggestLead();\n\n /* set up the poker library */\n setupPoker();\n preloadCardImages();\n\n /* disable player cards */\n for (var i = 0; i < $cardButtons.length; i++) {\n $cardButtons[i].attr('disabled', true);\n }\n\n /* enable and set up the main button */\n allowProgression(eGamePhase.DEAL);\n}", "function initGameData () {\n $(\"#result_span\").text(\"\");\n closebyDistance = 1;\n centerIndex = indexFromCoordinates(trunc(boardDimension/2), trunc(boardDimension/2));\n numSquares = boardDimension*boardDimension;\n gameBoard = E.repeat(numSquares); \n gameInTurn = 0; \n gameMovesMade = 0;\n gameResult = null; \n gameIsPlayerToMove = true; \n nodeHash = {};\n nodeHash[gameBoard] = {result:0, visited:0, evaluation:null}; \n engineMoveOrder = [];\n thinkingTimeChangeHandler();\n }", "reload()\n {\n if (this.onNewGame != undefined)\n {\n this.onNewGame();\n }\n this.retrieveNearbyGames();\n }", "function loadGame(){\n\tgame = getJSON(\"http://navy.hulu.com/[email protected]\");\n\tboard = [];\n\t\n\t// Display game information\n\twriteToConsole(\"GAME ID = \" + game.game_id);\n\twriteToConsole(\"SHIPS = [\" + game.ship_sizes + \"]\");\n\twriteToConsole(\"BOARD = (\" + game.board_size.width + \", \" + game.board_size.height + \")\");\n\t\n\t// Intialize board to default values\n\tfor(var w=0; w<game.board_size.width; w++){\n\t\tboard[w] = [];\n\t\tfor(var h=0; h<game.board_size.height; h++){\n\t\t\tboard[w][h]=0;\t\t// signifies uninspected\n\t\t}\n\t}\n\t\n\tships = game.ship_sizes;\n\t\n\traiseSuccess(\"Game intialized\");\n}", "function updateGame(data) {\n if (data['active']) {\n updateGameBoard(data);\n updateMoveSelectors(data);\n updateStatusBar(data);\n }\n}", "function preload() {\n delete gameData;\n if (myID == 0){\n TetrisBoard.style.opacity = .7;\n BreakoutBoard.style.opacity = 1;\n }\n else {\n TetrisBoard.style.opacity = 1;\n BreakoutBoard.style.opacity = .7;\n }\n onReady(); // Calling onReady Tetris function\n game.scale.scaleMode = Phaser.ScaleManager.NO_SCALE;\n game.scale.pageAlignHorizontally = true;\n game.scale.pageAlignVertically = true;\n game.stage.backgroundColor = '#eee';\n game.load.spritesheet('ball', 'client/img/wobble.png', 20, 20);\n game.load.image('paddle', 'client/img/paddle.png');\n game.load.image('brick', 'client/img/brick.png');\n game.load.spritesheet('button', 'client/img/button.png', 120, 40);\n\t\tgame.load.image('gameover','client/img/over.png')\n }", "function startGame() {\n\t\t\n\t\t//get player's starting location\n\t\tstartingLocation();\n\t\t\n\t\t//listen for player's starting location\n\t\tTi.App.addEventListener('startingLocation', function(input) {\n\t\t\t\n\t\t\tTi.API.debug('location data: ' + input);\n\t\t\t\n\t\t\t//sets initial player conditions\n\t\t\tvar web = new globals.xml.updatePlayerData({\n\t\t\t\tgameID: gameID,\n\t\t\t\tplayerID: playerID,\n\t\t\t\tlatitude: input.coords.latitude,\n\t\t\t\tlongitude: input.coords.longitude,\t\t\t\n\t\t\t});\n\t\t});\n\t\t\n\t\t//get flag locations\n\t\tvar webAPI = new globals.xml.flagLocations({gameID:gameID});\n\t\t\n\t\t//receives flag location data\n\t\tTi.App.addEventListener('flagLocations', function(input){\n\t\t\t\n\t\t\t//puts flag data into local global scope\n\t\t\tTi.App.fireEvent('flagData', {flags:input.data});\n\n\t\t\t//annotates both flags to the map\n\t\t\tfor (key in input.data) {\t\t\t\t\n\t\t\t\tvar flag = input.data[key]\n\t\t\t\tswitch (flag.teamName) {\n\t\t\t\t\tcase 'Humans':\n\t\t\t\t\t\tvar humanFlag = Ti.Map.createAnnotation({\n\t\t\t\t\t\t\tanimate:true,\n\t\t\t\t\t\t\timage: 'images/miniIcons/Human/Human_Flag.png',\n\t\t\t\t\t\t\tlatitude: flag.latitude,\n\t\t\t\t\t\t\tlongitude: flag.longitude\n\t\t\t\t\t\t});\t\t\t\n\t\t\t\t\t\tmapCreateView.addAnnotation(humanFlag);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'Aliens':\n\t\t\t\t\t\tvar alienCenterLan;\n\t\t\t\t\t\tvar alienFlag = Ti.Map.createAnnotation({\n\t\t\t\t\t\t\tanimate:true,\n\t\t\t\t\t\t\timage: 'images/miniIcons/Alien/Alien_Flag.png',\n\t\t\t\t\t\t\tlatitude: flag.latitude,\n\t\t\t\t\t\t\tlongitude: flag.longitude\n\t\t\t\t\t\t});\n\t\t\t\t\t\tmapCreateView.addAnnotation(alienFlag);\n\t\t\t\t\t\tbreak;\n\t\t\t\t};\t\n\t\t\t};\n\t\t\t\n\t\t\t//calculate center point\n\t\t\tcenterLatitude = (parseFloat(input.data[0].latitude) + parseFloat(input.data[1].latitude)) / 2;\t\t\n\t\t\tcenterLongitude = (parseFloat(input.data[0].longitude) + parseFloat(input.data[1].longitude)) / 2;\n\t\t\tTi.API.debug('Center Coordinates: ' + centerLatitude + ':' + centerLongitude);\n\t\t\t\n\t\t\t//create center point marker\n\t\t\tvar centerMarker = Ti.Map.createAnnotation({\n\t\t\t\tlatitude: centerLatitude,\n\t\t\t\tlongitude: centerLongitude,\n\t\t\t\timage: 'images/line.png'\n\t\t\t});\n\t\t\t\n\t\t\t//Place the center marker\n\t\t\tmapCreateView.addAnnotation(centerMarker);\n\t\t\t\n\t\t\t//return centerLatitude to local global scope\n\t\t\tTi.App.fireEvent('centerLocation', {centerLat:centerLatitude});\t\t\n\t\t\t\n\t\t\talert('Both flags placed. Get ready.');\n\t\t\t\t\n\t\t\t//start game timer\n\t\t\tgameTimer = setInterval(gamePlay, 5000);\n\t\t\t\n\t\t});\n\t}", "function gameStatus() {\n\tif (model.right === model.word.length) {\n\t\tmodel.win = true;\n\t\tmodel.imgsrc = 'img/win.png'\n\t\tmodel.score.won++\n\t} else if (model.wrong >= 6) {\n\t\tmodel.lose = true;\n\t\tmodel.imgsrc = 'img/lose.png';\n\t\tmodel.score.lost++\n\t}\n\tif (model.loggedIn) {\n\t\tvar userId = model.user.uid;\n\t\tfirebase.database().ref('score').child(userId).update({\n\t\t\twon: model.score.won,\n\t\t\tlost: model.score.lost\n\t\t});\n\t}\n\trenderForm();\n\trenderGame();\n}", "function Main() {\n\n //Set the gameDate from another *.js file.\n gameData = gameDataOne;\n this.KeyboardControls();\n StartTheGame();\n}", "async function load() {\n await Datas.Settings.read();\n await Datas.Systems.read();\n //RPM.gameStack.pushTitleScreen();\n //RPM.datasGame.loaded = true;\n Manager.GL.initialize();\n Manager.GL.resize();\n Manager.Stack.requestPaintHUD = true;\n}", "function setup() {\r\n createCanvas(displayWidth - 20, displayHeight - 30);\r\n\r\n //initialize the database\r\n databaseObj = firebase.database();\r\n\r\n gameObj = new Game();\r\n\r\n gameState = 0; //0=WAIT, 1=PLAY, 2=END\r\n\r\n //function call to retrieve existing value of gameState from database\r\n gameObj.getState();\r\n\r\n //function call to start the GAME i.e. gameState will activate 0 WAIT state\r\n gameObj.start();\r\n\r\n}", "function setup() {\n createCanvas(displayWidth - 20, displayHeight - 30);\n\n //initialize the database\n database = firebase.database();\n\n allPlayers = null;\n playerCount = 0;\n carsAtFinishLine = 0;\n gameState = 0; //0=WAIT, 1=PLAY, 2=END\n\n gameObj = new Game();\n\n //function call to retrieve existing value of gameState from database\n gameObj.getState();\n\n //function call to start the GAME i.e. gameState will activate 0 WAIT state\n gameObj.start();\n\n}", "function initialiseGame(){\n\n\t/* ------------------\n\t\tRESET GAME OBJECT\n\t--------------------*/\n\tgame = new Game();\n\n\t/* ------------------\n\t\tCONTEXT SETTINGS\n\t--------------------*/\n\tvar fgCanv = document.getElementById('canvas');\n\tvar fgCtx = fgCanv.getContext('2d');\n\tfgCtx.translate(0.5, 0.5);\n\tclearCanvas(fgCtx);\n\n\tvar bgCanv = document.getElementById('bgCanvas');\n\tvar bgCtx = bgCanv.getContext('2d');\n\tbgCtx.translate(0.5, 0.5);\n\tclearCanvas(bgCtx);\n\n\t//WHY HERE? game.restart();\n\t//towers = enemies = bullets = [];\n\n\tlevelSetup();\n\n\t/* ------------------\n\t\tSCREEN VARIABLES\n\t--------------------*/\n\n\t//var level_data = levelMaps[game.level];\n\t//level = new Level(fgCtx, level_data.rows, level_data.columns, level_data.grid, level_data.start, level_data.end);\n\n\t//level.path = plotPath(level.grid, level.start, level.end);\n\t//if (level.path.length == 0){\n\t//\tconsole.log('Path error');\n\t\t//resetGame();\n\t//}\n\t//console.log(level);\n\n\t//resizeCanvas();\n\n\t// Check for cookie\n\tvar cookieName = 'privacyOptOut=';\n\n\t// Check document cookies for this flag\n var ca = document.cookie.split(';');\n for(var i=0;i < ca.length;i++) {\n var c = ca[i];\n while (c.charAt(0)==' ') c = c.substring(1,c.length);\n if (c.indexOf(cookieName) == 0){\n\t\t\tvar cookieVal = c.substring(cookieName.length,c.length);\n\t\t}\n }\n\n\t// If cookie value found and true\n\tif (cookieVal === true){\n\t\tshowModal(\"Privacy Flag\", 0);\n\t}else{\n\t\tshowModal(\"Privacy Opt-Out\",0);\n\t}\n\n\t//showModal(\"Introduction\",0);\n\n\t/* ------------------\n\t\tEVENT LISTENERS\n\t--------------------*/\n\tfgCanv.addEventListener('touchstart', function(event){touchCanvas(event);});//,false );\n\tfgCanv.addEventListener('click', function(event){mouseCanvas(event);});//,false); //stopHover();},false );\n\n\t // Trying to work out what the fuck happens when the window is minimized - enemies seem to vanish off the canvas! :-/\n\t//focus = 1;\n\t//window.addEventListener('visibilitychange', function(){ focus *= -1; if (focus){ console.log(enemies); } });\n\n\tmainLoopRequest = window.requestAnimationFrame(mainLoop);\n\n}", "checkifGameOver(){\n\t\t//Checks if all players are dead\n\t\tvar gameOver = false;\t\t\n\t\tif(this.player.dead && this.otherPlayer.dead){\n\t\t\tgameOver = true;\n\t\t}\n\n\t\n\t\tif(gameOver) this.gameOver();\n\t}", "checkForEndOfGame() {\n\t\t\n\t\tif (!this.isInKnockedState()) {\n\t\t\t\n\t\t\tconst playboard = this.getPlayboard();\n\t\t\t\n\t\t\tconst reservePilePlayerA = playboard.getPlayboardMap().get(PileUtils.getReservePilePositionOfPlayer(Player.PLAYER_A));\n\t\t\tconst wastePilePlayerA = playboard.getPlayboardMap().get(PileUtils.getWastePilePositionOfPlayer(Player.PLAYER_A));\n\t\t\t\n\t\t\tconst reservePilePlayerB = playboard.getPlayboardMap().get(PileUtils.getReservePilePositionOfPlayer(Player.PLAYER_B));\n\t\t\tconst wastePilePlayerB = playboard.getPlayboardMap().get(PileUtils.getWastePilePositionOfPlayer(Player.PLAYER_B));\n\n\t\t\t// If real player won:\n\t\t\tif (PileUtils.isPileEmpty(reservePilePlayerA) && PileUtils.isPileEmpty(wastePilePlayerA)) {\n\t\t\t\tthis.setGameOver(true);\n\t\t\t\tthis.setWinnerPlayer(Player.PLAYER_A);\n\t\t\t\tthis.setActivePlayer(Player.DEALER);\n\n\t\t\t\tLocalStorageService.increaseStatisticsNumberOfGames();\n\t\t\t\tLocalStorageService.increaseStatisticsNumberOfGamesWon();\n\t\t\t\tLocalStorageService.updateStatisticsAverageDurationOfGame(this._startTimeTs);\n\n\t\t\t\tRenderService.renderPlayboard(this);\n\t\t\t\tRenderService.renderGameOverDialog(this);\n\t\t\t\tRenderService.enableLevelSelect();\n\t\t\t\tRenderService.enableSortAcesOnCenterPilesChoice();\n\t\t\t\t\n\t\t\t}\n\t\t\t// If computer opponent won:\n\t\t\telse if (PileUtils.isPileEmpty(reservePilePlayerB) && PileUtils.isPileEmpty(wastePilePlayerB)) {\n\t\t\t\tthis.setGameOver(true);\n\t\t\t\tthis.setWinnerPlayer(Player.PLAYER_B);\n\t\t\t\tthis.setActivePlayer(Player.DEALER);\n\n\t\t\t\tLocalStorageService.increaseStatisticsNumberOfGames();\n\t\t\t\tLocalStorageService.increaseStatisticsNumberOfGamesLost();\n\t\t\t\tLocalStorageService.updateStatisticsAverageDurationOfGame(this._startTimeTs);\n\n\t\t\t\tRenderService.renderPlayboard(this);\n\t\t\t\tRenderService.renderGameOverDialog(this);\n\t\t\t\tRenderService.enableLevelSelect();\n\t\t\t\tRenderService.enableSortAcesOnCenterPilesChoice();\n\t\t\t}\n\t\t}\n\t}", "function get_new_gamedata() {\r\n\treturn {\r\n\t\t'turn' : 0,\r\n\t\t'board' : [-1, -1, -1, -1, -1, -1, -1, -1, -1],\r\n\t\t'ended' : false\r\n\t};\r\n}", "function getData() {\n playArea.main.classList.add(\"visible\");\n gameObj = data.data; //function ud(data) {\n buildBoard();\n //fetch method to get data from the url, instead of using the 'data' object above\n}", "updateGame(){\n //Update state of objectives\n this.isObjectiveTaken();\n //Update if game is over \n this.isOver();\n\n //check whether game is over\n if(!this.gameOver){\n //updates all players data\n this.updatePlayers();\n }\n }", "function initGameOfLifeDev()\n{\n window.onbeforeunload = function(event) {\n console.log(\"game no longer in focus\");\n pauseGameOfLifeDev();\n enableScroll();\n $('#overlay-modal').modal('close');\n modalType = null;\n };\n\n // INIT ALL THE CONSTANTS, i.e. ALL THE\n // THINGS THAT WILL NEVER CHANGE\n initConstantsDev();\n\n // INIT THE RENDERING SURFACE\n initCanvasDev();\n\n // INIT ALL THE GAME-RELATED VARIABLES\n initGameOfLifeDataDev();\n\n // INIT THE LOOKUP TABLES FOR THE SIMULATION\n initCellLookupDev();\n\n // SETUP THE EVENT HANDLERS\n initEventHandlersDev();\n\n // CLEAR THE CANVAS AND INTIALIZE THE GRIDS\n // also adds grid lines to the canvasDev\n resetGameOfLifeDev();\n\n // RENDER THE GRID\n initGridDev();\n\n // INIT IMAGES AND SUBSEQUENTLY THE SHIP\n initShipPatternsDev();\n\n // BRING UP START SCREEN\n //if(startOverlay === true){\n //document.getElementById(\"middle-card-play\").style.backgroundImage = null;\n pauseGameOfLifeDev();\n //} else {\n //document.getElementById(\"middle-card-play\").style.backgroundImage = null;\n //startGameOfLifeDev();\n //}\n showGameStartDev()\n\n console.log(cellLengthDev);\n}", "handleStartGame() {\n this.gameState = 1; //A value of > 0 indicates that the game has started. First part of the round is 1.\n super.sendGameData({ event: \"start-game\", state: this.gameState });\n }", "function loadGameNumbers(gameMode) {\n switch (gameMode) {\n case \"addition\":\n gameAddition();\n break;\n case \"subtraction\":\n gameSubtraction();\n break;\n case \"multiplication\":\n gameMultiplication();\n break;\n case \"division\":\n gameDivision();\n break;\n default:\n alert(\"Game not loading...\");\n break;\n }\n}", "init() {\r\n //const result = this.isGameEnd([4],gameModeStevenl.wining_positions);\r\n //console.log(result);\r\n\r\n this.assignPlayer();\r\n gameView.init();\r\n }", "function initGame(){\n gamemode = document.getElementById(\"mode\").checked;\n \n fadeForm(\"user\");\n showForm(\"boats\");\n \n unlockMap(turn);\n \n player1 = new user(document.user.name.value);\n player1.setGrid();\n \n turnInfo(player1.name);\n bindGrid(turn);\n}", "function monitorGame(){\n //cheack the eggs in player\n checkContainer();\n checkTnt();\n checkPirate();\n checkPirateHit();\n checkCarrierHit();\n checkPlayerHit();\n dead();\n}", "function loadGame() {\n var file = JSON.parse(localStorage.getItem('saveFile'));\n\n if (file !== null) {\n gameData.update = file.update\n gameData.beer = file.beer;\n gameData.beerPerClick = file.beerPerClick;\n gameData.beerPerClickCost = file.beerPerClickCost;\n gameData.grain = file.grain;\n gameData.money = file.money;\n gameData.moneyPerBeer = file.moneyPerBeer;\n gameData.grainCapacity = file.grainCapacity;\n gameData.grainCost = file.grainCost;\n gameData.grainPerMin = file.grainPerMin;\n\n showGameData();\n } else {\n console.log(\"no save file\")\n }\n}", "function gameCheck(){\n\n}", "loaded() {\n me.pool.register('player', game.Player);\n me.pool.register('enemy', game.Enemy);\n me.pool.register('laser', game.Laser);\n\n me.state.WIN = me.state.USER + 1;\n me.state.LOSE = me.state.USER + 2;\n me.state.LEVEL_1 = me.state.USER + 3;\n me.state.LEVEL_2 = me.state.USER + 4;\n me.state.LEVEL_3 = me.state.USER + 5;\n me.state.LEVEL_4 = me.state.USER + 6;\n\n // set the \"Play/Ingame\" Screen Object\n this.level1 = new game.PlayScreen();\n this.level2 = new game.PlayScreen(2, 'teal');\n this.level3 = new game.PlayScreen(3, 'orange');\n this.level4 = new game.PlayScreen(4, '#49B');\n\n this.winScreen = new game.WinScreen();\n this.loseScreen = new game.LoseScreen();\n\n me.state.set(me.state.LEVEL_1, this.level1);\n me.state.set(me.state.LEVEL_2, this.level2);\n me.state.set(me.state.LEVEL_3, this.level3);\n me.state.set(me.state.LEVEL_4, this.level4);\n\n me.state.set(me.state.WIN, this.winScreen);\n me.state.set(me.state.LOSE, this.loseScreen);\n\n // start the game\n me.state.change(me.state[`LEVEL_${store.getState().level}`]);\n }", "function gameStatus() {\n var curPlayer;\n \n if (game.currentPlayer == 'user') {\n curPlayer = game.user;\n } else if (game.currentPlayer == 'computer') {\n curPlayer = game.computer;\n }\n \n switch (true) {\n case $('#first').html() === curPlayer && $('#second').html() === curPlayer &&\n $('#third').html() === curPlayer:\n show('#first', '#second', '#third');\n break;\n case $('#fourth').html() === curPlayer && $('#fifth').html() === curPlayer &&\n $('#sixth').html() === curPlayer:\n show('#fourth', '#fifth', '#sixth');\n break;\n case $('#seventh').html() === curPlayer && $('#eight').html() === curPlayer &&\n $('#nineth').html() === curPlayer:\n show('#seventh', '#eight', '#nineth');\n break;\n case $('#first').html() === curPlayer && $('#fourth').html() === curPlayer &&\n $('#seventh').html() === curPlayer:\n show('#first', '#fourth', '#seventh');\n break;\n case $('#second').html() === curPlayer && $('#fifth').html() === curPlayer &&\n $('#eight').html() === curPlayer:\n show('#second', '#fifth', '#eight');\n break;\n case $('#third').html() === curPlayer && $('#sixth').html() === curPlayer &&\n $('#nineth').html() === curPlayer:\n show('#third', '#sixth', '#nineth');\n break;\n case $('#first').html() === curPlayer && $('#fifth').html() === curPlayer &&\n $('#nineth').html() === curPlayer:\n show('#first', '#fifth', '#nineth');\n break;\n case $('#third').html() === curPlayer && $('#fifth').html() === curPlayer &&\n $('#seventh').html() === curPlayer:\n show('#third', '#fifth', '#seventh');\n break;\n default:\n draw();\n }\n }", "function load(game, loadingType, loadingString) {\n // Depending on the loading type, do different things\n switch (loadingType) {\n // We don't load anything\n case MainLoadingType.NONE:\n // You can uncomment the lines below to start your game with everything unlocked (useful for testing purposes)\n /*\n Saving.saveNumber(\"aTreeStep\", 2);\n \n Saving.saveBool(\"mainMapDoneDesert\", true);\n Saving.saveBool(\"mainMapDoneBridge\", true);\n Saving.saveBool(\"mainMapDoneCaveEntrance\", true);\n Saving.saveBool(\"mainMapDonePier\", true);\n Saving.saveBool(\"mainMapDoneForest\", true);\n Saving.saveBool(\"mainMapDoneCastleEntrance\", true);\n \n Saving.saveBool(\"gridItemPossessedMainMap\", true);\n Saving.saveBool(\"gridItemPossessedTimeRing\", true);\n Saving.saveBool(\"gridItemPossessedThirdHouseKey\", true);\n Saving.saveBool(\"gridItemPossessedBeginnersGrimoire\", true);\n \n Saving.saveBool(\"gridItemPossessedFeather\", true);\n Saving.saveBool(\"gridItemPossessedPogoStick\", true);\n Saving.saveBool(\"gridItemPossessedHeartPlug\", true);\n Saving.saveBool(\"gridItemPossessedAdvancedGrimoire\", true);\n \n Saving.saveBool(\"gridItemPossessedSponge\", true);\n Saving.saveBool(\"gridItemPossessedShellPowder\", true);\n Saving.saveBool(\"gridItemPossessedHeartPendant\", true);\n Saving.saveBool(\"gridItemPossessedBlackMagicGrimoire\", true);\n \n Saving.saveBool(\"gridItemPossessedFortressKey\", true);\n Saving.saveBool(\"gridItemPossessedUnicornHorn\", true);\n Saving.saveBool(\"gridItemPossessedXinopherydonClaw\", true);\n Saving.saveBool(\"gridItemPossessedPitchfork\", true);\n \n Saving.saveBool(\"gridItemPossessedRedSharkFin\", true);\n Saving.saveBool(\"gridItemPossessedGreenSharkFin\", true);\n Saving.saveBool(\"gridItemPossessedPurpleSharkFin\", true);\n \n Saving.saveBool(\"gridItemPossessedTalkingCandy\", true);\n \n Saving.saveBool(\"gridItemPossessedP\", true);\n Saving.saveBool(\"gridItemPossessedL\", true);\n Saving.saveBool(\"gridItemPossessedA\", true);\n Saving.saveBool(\"gridItemPossessedY\", true);\n \n Saving.saveBool(\"eqItemGlovesRedEnchantedGloves\", true);\n Saving.saveBool(\"eqItemGlovesPinkEnchantedGloves\", true);\n //Saving.saveBool(\"eqItemWeaponWoodenSword\", true);\n Saving.saveBool(\"eqItemWeaponTrollBludgeon\", true);\n Saving.saveBool(\"eqItemWeaponTribalSpear\", true);\n Saving.saveBool(\"eqItemWeaponSummoningTribalSpear\", true);\n Saving.saveBool(\"eqItemWeaponMonkeyWizardStaff\", true);\n Saving.saveBool(\"eqItemWeaponGiantSpoon\", true);\n Saving.saveBool(\"eqItemHatOctopusKingCrown\", true);\n \n Saving.saveBool(\"eqItemBootsBootsOfIntrospection\", true);\n \n Saving.saveBool(\"eqItemBootsRocketBoots\", true);\n \n Saving.saveBool(\"eqItemWeaponGiantSpoonOfDoom\", true);\n \n Saving.saveBool(\"eqItemBodyArmoursEnchantedKnightBodyArmour\", true);\n \n Saving.saveNumber(\"gameCandiesEatenCurrent\", 500000000);\n Saving.saveNumber(\"gameCandiesEatenMax\", 500000000);\n \n Saving.saveNumber(\"playerHp\", 1000);\n \n Saving.saveBool(\"questPlayerSpellHealthPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellTurtlePotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellAntiGravityPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellBerserkPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellCloningPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellPPotionHasSpell\", true);\n Saving.saveBool(\"questPlayerSpellXPotionHasSpell\", true);\n \n Saving.saveNumber(\"questPlayerSpellHealthPotionQuantity\", 0);\n Saving.saveNumber(\"questPlayerSpellTurtlePotionQuantity\", 64084);\n Saving.saveNumber(\"questPlayerSpellAntiGravityPotionQuantity\", 47542);\n Saving.saveNumber(\"questPlayerSpellBerserkPotionQuantity\", 99549);\n Saving.saveNumber(\"questPlayerSpellCloningPotionQuantity\", 10050);\n Saving.saveNumber(\"questPlayerSpellPPotionQuantity\", 10085250);\n Saving.saveNumber(\"questPlayerSpellXPotionQuantity\", 10050999);\n \n //Saving.saveBool(\"gameDebug\", true);\n \n Saving.saveNumber(\"gameCandiesCurrent\", 5000000);\n Saving.saveNumber(\"gameCandiesMax\", 5000000);\n \n Saving.saveNumber(\"gameLollipopsCurrent\", 5000000000);\n Saving.saveNumber(\"gameLollipopsMax\", 500000000000);\n \n Saving.saveNumber(\"gameChocolateBarsCurrent\", 7);\n Saving.saveNumber(\"gameChocolateBarsMax\", 7);\n \n Saving.saveNumber(\"gamePainsAuChocolatCurrent\", 7);\n Saving.saveNumber(\"gamePainsAuChocolatMax\", 7);\n \n Saving.saveBool(\"lonelyHouseTakeTheBoxDone\", true);\n \n Saving.saveNumber(\"lollipopFarmPondHowManyLolligators\", 0);\n \n Saving.saveBool(\"statusBarUnlocked\", true);\n Saving.saveBool(\"statusBarUnlockedCfg\", true);\n Saving.saveBool(\"statusBarUnlockedSave\", true);\n Saving.saveBool(\"statusBarUnlockedMap\", true);\n Saving.saveBool(\"statusBarUnlockedInventory\", true);\n Saving.saveBool(\"statusBarUnlockedLollipopFarm\", true);\n Saving.saveBool(\"statusBarUnlockedCauldron\", true);\n Saving.saveBool(\"statusBarUnlockedHealthBar\", true);\n Saving.saveBool(\"statusBarUnlockedInsideYourBox\", true);\n Saving.saveBool(\"statusBarUnlockedTheComputer\", true);\n Saving.saveBool(\"statusBarUnlockedTheArena\", true);\n \n Saving.saveBool(\"castleKilledNougatMonster\", true);\n \n Saving.saveBool(\"dragonDone\", true);\n Saving.saveBool(\"dragonUnlockedCyclops\", true);\n \n Saving.saveBool(\"castleTowerFirstVisitDone\", true);\n \n Saving.saveString(\"gameLanguage\", \"fr\");\n */\n break;\n case MainLoadingType.LOCAL:\n LocalSaving.load(loadingString);\n break;\n case MainLoadingType.FILE:\n var fileBools = loadingString.match(/bool +[a-zA-Z0-9_]+ *= *[a-zA-Z0-9_]+/g);\n var fileNumbers = loadingString.match(/number +[a-zA-Z0-9_]+ *= *[a-zA-Z0-9_]+/g);\n var fileStrings = loadingString.match(/string +[a-zA-Z0-9_]+ *= *[a-zA-Z0-9_]+/g);\n // Load the bools\n if (fileBools != null) {\n for (var i = 0; i < fileBools.length; i++) {\n Saving.saveBool(fileBools[i].match(/[a-zA-Z0-9_]+=/)[0].replace(\"=\", \"\"), Saving.stringToBool(fileBools[i].match(/=[a-zA-Z0-9_]+/)[0].replace(\"=\", \"\")));\n }\n }\n // Load the numbers\n if (fileNumbers != null) {\n for (var i = 0; i < fileNumbers.length; i++) {\n Saving.saveNumber(fileNumbers[i].match(/[a-zA-Z0-9_]+=/)[0].replace(\"=\", \"\"), Saving.stringToNumber(fileNumbers[i].match(/=[a-zA-Z0-9_]+/)[0].replace(\"=\", \"\")));\n }\n }\n // Load the strings\n if (fileStrings != null) {\n for (var i = 0; i < fileStrings.length; i++) {\n Saving.saveString(fileStrings[i].match(/[a-zA-Z0-9_]+=/)[0].replace(\"=\", \"\"), fileStrings[i].match(/=[a-zA-Z0-9_]+/)[0].replace(\"=\", \"\"));\n }\n }\n break;\n }\n // Apply the loaded variables to various things by calling the load() methods of various objects\n game.load(); // Various variables owned by the game object\n game.getPlayer().load(); // The player\n }", "function gameReady() {\r\n const user_name = document.querySelector('#user_account_name').value;\r\n gameChatSocket.send(JSON.stringify({\r\n 'ready': user_name\r\n }));\r\n // clear previous state\r\n $(\"#my-cards\").empty()\r\n $(\"#opponent-cards\").empty()\r\n $(\"#id_result_div\").empty()\r\n\r\n // disable ready btn\r\n $(\"#game-ready\").addClass(\"disabled\")\r\n // update ready status\r\n me_ready = true\r\n\r\n if (me_ready && opponent_ready && !hasStart) {\r\n gameStart()\r\n hasStart = true\r\n }\r\n}", "function loadLevel(mapInfoFile) {\n\n mapReady = false;\n playerWon = false;\n\n setup();\n\n\n /*======CONNECT TO JSON FILE=======*/\n $.getJSON(mapInfoFile, function(data) {\n console.log(\"loading level\");\n //ARRAY OF MOVES \n playerMoves = data.playerMoves;\n\n //POSITION OF DESTINATION/FINAL PIPE\n endX = data.end.x * cellSize;\n endY = data.end.y * cellSize;\n\n //STARTING PIPE POSITION\n // startX = data.start.x * cellSize;\n // startY = data.start.y * cellSize;\n\n //INFORMATION FOR ALL DIFFERENT OBSTACLES\n obstaclesInfo = data.obstaclesInfo;\n\n //OBSTACLE POSITIONS\n for (var i = 0; i < obstaclesInfo.length; i++) {\n console.log(\"ready to work\");\n console.log(obstaclesInfo[i]);\n var coordinateX = obstaclesInfo[i].coordinates.x;\n var coordinateY = obstaclesInfo[i].coordinates.y;\n for (var j = 0; j < obstaclesInfo[i].relativeShape.length; j++) {\n var relativeX = obstaclesInfo[i].relativeShape[j].x;\n var relativeY = obstaclesInfo[i].relativeShape[j].y;\n obstaclesList.push({ x: coordinateX + relativeX, y: coordinateY + relativeY });\n }\n }\n\n //Number of pipes left\n pipesRemaining = data.pipesRemaining;\n\n //FINAL PLAYER ENDPOINT\n destinationX = data.destination.x;\n destinationY = data.destination.y;\n\n enemies = data.enemyInfo;\n\n /*=======LOAD IMAGES=======*/\n bg = loadImage(\"assets/background.png\");\n user = loadImage(\"assets/user.png\");\n endPipe = loadImage(\"assets/end.png\");\n gameOver = loadImage(\"assets/loser.png\");\n winner = loadImage(\"assets/winnerTwo.png\");\n crack = loadImage(\"assets/crack.png\");\n brrr = loadImage(\"assets/frozen.png\");\n final = loadImage(\"assets/final.png\");\n\n for (i = 0; i < obstaclesInfo.length; i++) {\n obstaclesInfo[i][\"img\"] = loadImage(obstaclesInfo[i].artwork);\n }\n\n for (i = 0; i < enemies.length; i++) {\n enemies[i][\"img\"] = loadImage(enemies[i].artwork);\n enemies[i][\"currentCoordinates\"] = enemies[i].startCoordinates;\n enemies[i][\"currentDirection\"] = Math.random();\n }\n\n //UNCOMMENT FOR BACKGROUND SOUNDTRACK\n // track.play();\n\n //SETUP 2D OBSTACLE AND PIPE ARRAYS\n for (var i = 0; i < COLUMNS; i++) {\n pipes[i] = [];\n obstacles[i] = [];\n for (var j = 0; j < ROWS; j++) {\n pipes[i][j] = \"empty\";\n obstacles[i][j] = \"empty\";\n }\n }\n\n //STORING OBSTACLES INTO OBSTACLE ARRAY\n\n for (var i = 0; i < obstaclesList.length; i++) {\n obstacles[obstaclesList[i].x][obstaclesList[i].y] = \"occupied\";\n }\n\n mapReady = true;\n\n });\n}", "function Game(){\n\t//run();\n\t//for now just use facebook login\n\t\n\t//get rid of loading bar\n\tvar pBar = document.getElementById('p');\n\tvar load = document.getElementById('loading');\n\tpBar.style.display = \"none\";\n\tload.style.display = \"none\";\n\t\n\tvar state = getCookie(\"state\");\n\tswitch(state){\n\t\tcase \"new\": /*if new generate map */\n\t\t\t//set game name\n\t\t\tthis.map[0].mapGen(terrain.grass1);\t\t\t\t//randomly generate the map tiles for bottom layer only\n\t\t\tbreak;\n\t\tcase \"load\": /* if loading get map from datastore */\n\t\t\t//get store map information,, at this point only stores user changees not whole map, may later choose to work \n\t\t\t//with all of map, when testing will use this smaller set\n\t\t\tthis.map[0].mapGen(terrain.grass1);\t\t\t\t//randomly generate the map tiles for bottom layer only\n\t\t\tmapGet(); //get stored tiles\n\t\t\tbreak;\n\t\tdefault:\n\t\t\talert(\"Error occured while loading game!\");\n\t}\n\t\n\tmapDraw(map.length - 1);\t\t//draw map\n\tinHand = \"block\"; \t\t\t\t//user starts with holding the brick building block\n\t\n}", "function getStates(game) {\n\n}", "function preload_HUD(game){\n\tgame.load.image('Map', 'Assets/Art/HUD/Map2_CKtR.png');\n\tgame.load.image('Battery', 'Assets/Art/HUD/HP2_CKtR.png');\n\tgame.load.image('Pointer', 'Assets/Art/HUD/Pointer_CKtR.png');\n\tgame.load.image('terminal', 'Assets/Art/HUD/Terminal_CKtR.png');\n}", "function loadGame(){\n myGameArea.start();\n}", "function checkForSelectedGameData() {\n if (!global.CurrentSelectedGame) {\n throw new Error('Game is not selected');\n }\n}", "function load() {\n var d = new Date().getTime();\n var uuid = 'xxxxxx'.replace(/[x]/g, function(c) {\n var r = (d + Math.random()*16)%16 | 0;\n d = Math.floor(d/16);\n return (c=='x' ? r : (r&0x3|0x8)).toString(16);\n });\n var guest = \"Guest \" + uuid.toUpperCase();\n //$(\"#name\").val(guest);\n $(\"#name\").val(\"sjoeke\");\n\n //check if localstorage exists\n if(localStorage.getItem(\"sessionID\")){\n sessionID = localStorage.getItem(\"sessionID\");\n localStorage.removeItem(\"sessionID\")\n $(\"#gamePlays\").hide();\n $(\"#statusWindow\").show();\n $(\"#gameClientWrapperSetup\").hide();\n $(\"#gameClientWrapperGame\").show();\n unPauzeGame();\n }\n}", "isGameStarted() {\n return this.gameState === GAME_STARTED;\n }", "function gamePlay() {\n\t\t\n\t\tTi.API.debug('****************************************************************');\n\n\t\t//gets the current location of the user\n\t\tgetPlayerLocation();\n\t\n\t\t//listens for the user's location\n\t\tTi.App.addEventListener(\"app:got.Playerlocation\", gotPlayerLocation = function(input) {\n\t\t\tTi.App.removeEventListener(\"app:got.Playerlocation\", gotPlayerLocation);\n\t\t\t\n\t\t\t//update the web\n\t\t\tvar webAPI = new globals.xml.PlayerData({playerID:playerID, gameID:gameID, latitude:input.coords.latitude, longitude:input.coords.longitude});\n\t\t\t\n\t\t\tTi.App.addEventListener('playerData', function(input) {\n\t\t\t\t\n\t\t\t\t//annotate the map\n\t\t\t\tannotateMap(input.data);\n\t\t\t\t\n\t\t\t\t//update the score\n\t\t\t\tupdateScore(input.data['flags']);\n\t\t\t\t\n\t\t\t});\t\t\n\t\t});\n\t}", "function initGame() {\r\n renderLevels()\r\n gGame = {\r\n isOn: true,\r\n isFirstClick: true,\r\n\r\n }\r\n gBoard = buildBoard();\r\n renderBoard(gBoard);\r\n startTimer()\r\n\r\n}", "create() {\n game.handleOpponentLeaving = this.handleOpponentLeaving\n \n game.loadOpponent = this.loadOpponent\n game.disconnectSocket = this.disconnectSocket\n game.checkForDoubleClick = this.checkForDoubleClick\n game.animateOpponentLeaving = this.animateOpponentLeaving\n game.startMultiplayer = this.startMultiplayer\n game.updatePlacedPieces= this.updatePlacedPieces\n\n game.gametype = app.gameType;\n game.userkey = app.keyValue;\n game.nameOfUser = app.username;\n game.username = app.username;\n game.battleText = app.battleText;\n game.cash = parseInt(app.money);\n game.url = app.img_url;\n console.log(\"in load: \", game.gametype);\n game.opponentLeft = false;\n game.state.start('menu');\n }", "function continueLoading() {\n if ( Game.LoadedStatus.vertices &&\n Game.LoadedStatus.edges &&\n Game.LoadedStatus.tiles &&\n Game.LoadedStatus.player &&\n Game.LoadedStatus.players &&\n Game.LoadedStatus.font) {\n window.onresize = function() {\n resizeCanvases();\n updateGameData();\n redrawAll();\n };\n\n resizeCanvases();\n registerMouseHandlers();\n updateGameData();\n\n // Draw the various layers\n redrawAll();\n }\n}", "function loadData()\n{\n /***************\n * GET INTEGER *\n ***************/\n function getInt(name)\n {\n return parseInt(localStorage.getItem(name));\n }\n\n /***************\n * GET BOOLEAN *\n ***************/\n function getBool(name)\n {\n var data = getInt(name);\n if (data !== 0 && data !== null && data != undefined && !isNaN(data))\n return true;\n else\n return false;\n }\n \n // if local data exists, then get it\n if (getBool('data') === true)\n {\n // parse data\n ax = getInt('ax');\n ay = getInt('ay');\n dx = getInt('dx');\n dy = getInt('dy');\n score = getInt('score');\n recent = getInt('recent');\n hScore = getInt('hScore');\n paused = getBool('paused');\n doWrap = getBool('doWrap');\n \n // parse snake dataa\n var length = getInt('length');\n snake = [];\n for (var i = 0; i < length; i++)\n {\n var sx = getInt('snake' + i + 'x');\n var sy = getInt('snake' + i + 'y');\n snake.push({x: sx, y: sy}); \n }\n }\n // otherwise, initialize it\n else\n resetData();\n}", "function joinGameAsPlayer() {\n // check if ingame true\n\n}", "function loadGameData(gamedata)\r\n{\r\n Android.test(\"loading data... \" + gamedata);\r\n \r\n var splitdata = gamedata.toString().split(\",\");\r\n Android.test(\"split finished.\");\r\n var len = splitdata.length;\r\n Android.test(\"length: \" + len);\r\n for(i = 0; i < len; i++)\r\n {\r\n Android.test(i+\" \"+splitdata[i]);\r\n addInput(new Node(splitdata[i]));\r\n }\r\n}", "function onServerStartGame(data)\n{\n\tif (state != ClientStates.WaitPage)\n\t{\n\t\tconsole.log(\"serverStartGame message received at unexpected time. Ignored.\");\n\t\treturn;\n\t}\n\t$(\"#homePage\").hide(1000);\n\t$(\"#waitPage\").hide(1000);\n\t$(\"#gamePage\").show(1000, function(){\n\t\tcontroller = new GameController(data);\n\t});\n}", "function loadSavedtoGameMenu() {\n if (store.getState().lastAction == MENU_CHANGE && store.getState().previousPage == 'LOAD_SAVED' && store.getState().currentPage == 'GAME_MENU') {\n mainSfxController(preloaderSfxSource);\n preloaderStarter();\n\n setTimeout(function(){\n mainMenuPlayonmobileButtonid.classList.remove('main-menu-playonmobile-button');\n mainMenu.classList.add('pagehide');\n gameMenu.classList.remove('pagehide');\n mainMenuArmorgamesImageid.classList.remove('main-menu-armorgames-image-reverse');\n mainMenuIronhideImageid.classList.remove('main-menu-ironhide-image-reverse');\n mainMenuStartImageid.classList.remove('main-menu-start-image-reverse');\n mainMenuCreditsImageid.classList.remove('main-menu-credits-image-reverse');\n }, 600);\n\n if (store.getState().activeGameState.isMap1Completed != true) {\n setTimeout(function(){\n gameMenuStarthereTextid.classList.remove('nodisplay');\n }, 2200);\n }\n\n gameMenuStartableid.classList.add('game-menu-startable');\n gameMenuBattlepointer1id.classList.add('game-menu-battlepointer');\n mainMenuArmorgamesImageid.classList.remove('main-menu-armorgames-image');\n mainMenuIronhideImageid.classList.remove('main-menu-ironhide-image');\n mainMenuStartImageid.classList.remove('main-menu-start-image');\n mainMenuCreditsImageid.classList.remove('main-menu-credits-image');\n }\n }", "function game() {\n dessinerSerpent();\n dessinerPomme();\n detectionCollision();\n verifMangerPomme();\n gestionVieSerpent();\n gestionBonus();\n }", "function gameovercheck() {\n\t\tif (lives === 0) {\n\t\t\tball.y_speed = 0;\n\t\t\tball.x_speed = 0;\n\t\t\tcontext.font = \"40px Copperplate\";\n\t\t\tcontext.fillText(\"GAME OVER\", width/2 - 120, height/2 + 35);\n\t\t\tgameover = 1;\n\t\t\tdocument.getElementById(\"newgame\").style.visibility = \"visible\";\n\t\t}\n\t\telse if (brickcount === 0) {\n\t\t\tball.y_speed = 0;\n\t\t\tball.x_speed = 0;\n\t\t\tcontext.font = \"40px Copperplate\";\n\t\t\tcontext.fillText(\"YOU WIN!\", width/2 - 95, height/2 + 35);\n\t\t\tgameover = 1;\n\t\t\tdocument.getElementById(\"newgame\").style.visibility = \"visible\";\n\t\t}\n\t}", "function startGame(){\n getDictionary();\n var state = $.deparam.fragment();\n options.variant = state.variant || options.variant;\n makeGameBoard();\n loadState();\n }", "function checkFlags() {\n\t\t//alert('gameID for checking if flags are placed: ' + input.gameID);\n\t\tvar webAPI = new globals.xml.gameReady(input.gameID);\n\t}", "function updateGame(){\n\tif(!gameData.paused){\n\t\tloopAirplane();\n\t\tremoveObjects();\n\t}\n}", "function getGameState() {\n\t\treturn gameOngoing;\n\t}", "load() {\n if (!!this.saveArray) {\n this.board = this.saveArray[0];\n this.currentColour = this.saveArray[1];\n this.currentColour == 'white' ? this.otherColour = 'black' : this.otherColour = 'white';\n this.displayBoard();\n console.log(\"game loaded\");\n }\n }", "function C012_AfterClass_Bed_Load() {\n\tLeaveIcon = \"Leave\";\n\tLeaveScreen = \"Dorm\";\n\tLoadInteractions();\n\tC012_AfterClass_Bed_CurrentStage = 0;\n\tC012_AfterClass_Bed_PleasureUp = 0;\n\tC012_AfterClass_Bed_PleasureDown = 0;\n\tif (PlayerHasLockedInventory(\"VibratingEgg\")) C012_AfterClass_Bed_MasturbationRequired = 2;\n\telse C012_AfterClass_Bed_MasturbationRequired = 3;\n}", "function startGame() {\n water = 0;\n corn = 2;\n beans = 2;\n squash = 2;\n month = 1;\n gameOver = false;\n \n initGameBoard();\n playGame();\n}", "function refreshPlayerInfo() {\r\n if (player.gameState === GameState.Night) {\r\n setNightPlayerInfo();\r\n }\r\n else {\r\n setDayPlayerInfo();\r\n }\r\n}" ]
[ "0.75656825", "0.70133024", "0.69153625", "0.68950796", "0.68268734", "0.6727736", "0.6632979", "0.6601244", "0.65660226", "0.65291476", "0.6516658", "0.6509726", "0.6483329", "0.64826924", "0.6466582", "0.6435801", "0.64244217", "0.6415155", "0.6414446", "0.6345895", "0.63442326", "0.6343389", "0.6337831", "0.62977004", "0.6272742", "0.6262889", "0.6256291", "0.622303", "0.620217", "0.619703", "0.61967444", "0.6191432", "0.6186225", "0.61785835", "0.6169568", "0.61663467", "0.6165975", "0.61430585", "0.61360073", "0.6122802", "0.6121202", "0.6107574", "0.6107055", "0.6106844", "0.61061984", "0.6086583", "0.6086363", "0.60823846", "0.60777766", "0.60725963", "0.60700953", "0.6064153", "0.6061713", "0.6058545", "0.6057562", "0.605146", "0.6044526", "0.6035763", "0.60195094", "0.6016009", "0.6008974", "0.60082245", "0.60002196", "0.59977484", "0.59955704", "0.59937274", "0.59917974", "0.5982812", "0.59828055", "0.5976954", "0.59748536", "0.5963516", "0.5944268", "0.59349185", "0.59348786", "0.59333354", "0.5931815", "0.59297", "0.5927174", "0.5926296", "0.5922963", "0.59216946", "0.591976", "0.59195465", "0.59170747", "0.59100944", "0.5903247", "0.59025353", "0.5901919", "0.5897982", "0.5897498", "0.5887357", "0.58864665", "0.5879039", "0.58735245", "0.58707666", "0.5869451", "0.5864081", "0.58636147", "0.58608013" ]
0.6176463
34
end function / ======================= /gameIsOn ======================= / ======================= clearInterval =======================
function stopFunction(variabletoclear) { clearInterval(variabletoclear); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endgame() {\n \tclearInterval(intervalId);\n }", "function endOfGame() {\n clearInterval(gameInterval)\n}", "function overEnd(){\n\tif(game_state === false){\n\t\tdocument.getElementById(\"status\").innerHTML = \"you wON!!! in \"+ Math.round(10*totaltime)/10 + \" seconds .... congrats\";\n\t\tclearInterval(stopclock);\n\t\tstopclock = null;\n\t\ttotaltime = 0;\n\t\tgame_state = null;\n\t}\n}", "function endGame() {\n\n\tclearInterval(interval);\n\tinterval = null;\n\ttime = null;\n}", "function endGame() {\n gameStarted = false;\n}", "function gameOver() {\n alert(\"Game over!!!\");\n clearInterval(game);\n\n}", "function stop() {\n isGameActive = false;\n }", "function endGame() {\n // stop the interval timer\n clearInterval(interval);\n\n // turn off event handlers\n $(document).off();\n }", "_pauseGame(){\n this._gameon=false;\n clearInterval(this.interval);\n }", "stopGame() {\n clearInterval(this._interval);\n }", "function endGame() {\n // stop the interval timer\n clearInterval(interval);\n alert(\"Game Over!\")\n // turn off event handlers\n $(document).off();\n }", "function endGame() {\n isPlayingGame = false;\n timeElapsedMs = 0;\n id(\"start-button\").innerHTML = \"Play again\";\n if (!isPlayingGame && !id(\"lose-message\")) {\n showLose();\n }\n clearInterval(interval);\n }", "function stopGame() {\n clearInterval(gameInterval);\n gameInterval = null;\n }", "function stop_the_game(){\n clearInterval(the_game);\n game_over = true;\n restart_btn.slideDown();\n }", "function endGame(event){\n\tif (game_state === false){\n\t\tstate = true;\n\t\tvar lose = document.getElementById(\"status\");\n\t\tlose.innerHTML = \"you're a loser :0\";\n\t\tvar wall = document.querySelectorAll(\"div#maze div.boundary\");\n\t\tfor (var i = 0; i<wall.length;i++){\n\t\t\twall[i].classList.add(\"youlose\");\n\t\t}\n\t\tclearInterval(stopclock);\n\t\tstopclock = null;\n\t\ttotaltime = 0;\n\t\t//alive = 1;\n\t}\n}", "end() {\n this.isOver = true;\n this.isRunning = false;\n\n if (typeof this.onGameOver === 'function') {\n this.onGameOver();\n }\n }", "function stop() {\n if (isGameActive) {\n isGameActive = false;\n }\n}", "function stopGame() {\n clearInterval(that.gameLoop);\n that.status = State.STOP;\n }", "function gameEnd(){\n\tplayer.start = false;\n}", "function checkForGameEnd() {\n setInterval(function() {\n /*condition for game over*/\n if (myOpenedCards.length === 16) {\n stopTimer();\n displayGameOverModal();\n }\n }, 1000);\n}", "function stop() {\n clearInterval(gameTime);\n result();\n console.log(\"Times Up\");\n}", "endGameTick() {\n clearInterval(this.tick);\n this.tick = null;\n }", "function endGame() {\n //exit to the main menu w/o saving\n gameStart = false; //set flag to false\n TimeMe.resetAllRecordedPageTimes(); //reset timer\n clearInterval(handle); //clear score, time, intervals\n clearInterval(spawn);\n clearInterval(addp);\n clearInterval(addb);\n\n handle = 0;\n spawn = 0;\n addp = 0;\n addb = 0;\n score = 0;\n powerUpScore = 0;\n time = 0;\n $(\"#gameOver\").hide(); //hide game over menu and show main menu\n menu();\n }", "function stopGame(){\r\n\ttoggleGameTimer(false);\r\n}", "function endGame()\n{\n stopTimer();\n $('#timer').text(\"\");\n $('#timer').css('width','0%');\n backgroundMusic.pause();\n disableUnflipped();\n gameOverPopup();\n return;\n}", "function endGameChecker() {\n\tif (endGame) {\n\t\tremoveEvent();\n\t}\n}", "function endGame() {\n p.onSetAppState(state => ({ newGame: false, game: { ...state.game, playedGames: 0 } }));\n p.startGame = false;\n clearTimeout(p.timeOut1);\n clearTimeout(p.timeOut2);\n }", "function endGame() {\n clearInterval(scorePanel.intervalManager);\n showCongratulationModal();\n}", "function endgame() {\r\n gameOver = true;\r\n\tmusic.playGameOver();\r\n}", "stop() {\n console.log(\"Game \" + this._gameId + \" ended for being idle for too long.\");\n this._hub.endGame(this);\n }", "function endGame(endReason) {\n game_on = false;\n clearIntervals();\n stopGameMusic();\n\n if (endReason !== undefined)\n endReason();\n // addMessageToGameOverWindow(endReason);\n // // shows the game over window\n // document.getElementById('game_over_div').style.display = \"block\";\n}", "function checkEndGame() {\r\n if (cardMatches == 8) {\r\n console.log(\"gameEnd\");\r\n // stop the clock\r\n clearInterval(ticking);\r\n // open end game modal\r\n openModal();\r\n }\r\n}", "function stopTimer(){\n clearInterval(gameTimer);\n}", "function gameEnd() {\n clearTimeout(timeoutID)\n clearTimeout(autoTimeOutID)\n removeEventListener('keydown', keydown_fn)\n endScreen()\n end = true\n}", "function endGame() {\r\n\t\tgameOver = true;\r\n\t\tsetMessage2(\"Game Over\");\r\n\t}", "function gameOver() {\n console.log(\"gameover\"); // debug\n clearInterval(intTimeHandle);\n intTimeHandle = 0;\n console.log(intTimeHandle); // debug\n document.getElementById('instructions').innerHTML = \"GAME OVER <br/><br/> Click to play again\";\n document.getElementById('instructions').style.display = \"block\";\n field.setColor(0x033003);\n}", "function endGame() {\n\t\tgameOver = true;\n\t\t$('#gameBorder').hide();\n\t\t$('#stats').show();\n\t\twindow.clearInterval(timerFun);\n\t\tvar finishTime = (GAME_DURATION * 1000) / 60000;\n\t\tconsole.log(finishTime);\n \tvar wpm = Math.round(wordCount / finishTime);\n \t$('#totalWords').html(\"Total Words: \" + wordCount);\n \t$('#wpm').html(\"WPM: \" + wpm);\n \t$('#mistakes').html(\"Total Errors: \" + mistakeCount);\n \t$('#playAgain').on('click', function() {\n \t\tgame();\t\n \t});\n \treturn;\n\t}", "stopGame() {\n if (this.state.isOn) {\n this.addScore();\n }\n this.setState({isOn: false, time: 0});\n clearInterval(this.timer);\n clearInterval(this.timerColor);\n }", "function gameend(){\nvar gameover= true;\n$('.message').html('GAME OVER');\t\n}", "function endGame() {\r\n\r\n\t\tclearInterval(timer);\r\n\t\tclearInterval(target);\r\n\t\tclearInterval(cursor);\r\n\t\tclearTimeout(warnTimeout);\r\n\t\twarning.finish();\r\n\r\n\t\tscoreBox.text(\"Targets Destroyed: \" + targetCount);\r\n\r\n\t\t$('.target').remove();\r\n\r\n\t\t$('body').css(\"cursor\", \"crosshair\");\r\n\r\n\t\t$(\"#timer\").stop().animate({\r\n\t\t\t\t\"width\": \"0px\"\r\n\t\t}, 0);\r\n\r\n\t\t$(\"#message\").css({\"display\": \"block\"})\r\n\r\n\t\t$(\"#text\").text(\"Game Over\").css({\r\n\t\t\t\"display\": \"block\",\r\n\t\t\t\"font-size\": \"100px\",\r\n\t\t\t\"margin-top\": \"3.5em\",\r\n\t\t\t\"width\": \"100%\"\r\n\t\t});\r\n\r\n\t\t$(\"span\").text(\"Retry\");\r\n\t}", "function handleEndGame() {\n\n}", "function timer(){\n countStartGame -= 1;\n console.log(countStartGame);\n if (countStartGame === 0){\n console.log (\"time's up\");\n //need to clear interval - add stop\n }\n}", "function endGame() {\n // Disable the click button\n clickButton.disabled = true;\n\n // Stop the timer\n clearInterval(timer);\n\n // Update the high score based on the current game mode\n if (isIdleMode) {\n if (score > highScoreIdle) {\n highScoreIdle = score;\n }\n } else {\n if (score > highScoreSpeedrun) {\n highScoreSpeedrun = score;\n }\n }\n\n // Update the high score display\n updateHighScore();\n\n // Reset the game mode flag to Idle mode\n isIdleMode = true;\n\n // Reset the score and update the display\n score = 0;\n updateScore();\n\n // Add the idle-mode class to the body element\n document.body.classList.add(\"idle-mode\");\n}", "function endGame() {\n // Disable the click button\n clickButton.disabled = true;\n\n // Stop the timer\n clearInterval(timer);\n\n // Update the high score based on the current game mode\n if (isIdleMode) {\n if (score > highScoreIdle) {\n highScoreIdle = score;\n }\n } else {\n if (score > highScoreSpeedrun) {\n highScoreSpeedrun = score;\n }\n }\n\n // Update the high score display\n updateHighScore();\n\n // Reset the game mode flag to Idle mode\n isIdleMode = true;\n\n // Reset the score and update the display\n score = 0;\n updateScore();\n\n // Add the idle-mode class to the body element\n document.body.classList.add(\"idle-mode\");\n}", "function stopOpponentCheckTimer() {\n clearInterval(nIntervId);\n }", "wonGame() {\n if(this.wonGameStatus == false) {\n clearInterval(this.counter);\n document.getElementById(\"dark-bg\").classList.toggle(\"d-none\");\n this.onScreen[0].classList.add(\"d-none\");\n this.onScreen[1].classList.remove(\"d-none\");\n this.wonGameStatus = true;\n }\n }", "function endGame() {\r\n clearInterval(game_timer);\r\n timer_start = false;\r\n\r\n modal_element.css('display', 'block');\r\n\r\n performance_raiting.text(rating_string + rating);\r\n time_taken.text(\r\n time_string + \r\n $('.minutes').text() +\r\n $('.colon_two').text() +\r\n $('.seconds').text());\r\n moves_taken.text(moved_string + counter);\r\n }", "function endGame(){\n\t//plays the end game audio\n\twindow.window.deathsound.play();\n\t//sets timeout of 2.5 seconds so the game doesnt reset straight away\n\tsetTimeout((function(){\n\t\twindow.reset();//resets game variables\n\t\tconsole.log(\"Resetting the game\");\n\t\tlocalPlayer.resetHealth();\t//resets players health\n\t\t//makes all players alive\n\t\tfor(var i = 0; i < remotePlayers.length; i++){\n\t\t\tremotePlayers[i].setDead(false);\n\t\t};\t\n\t\t//calls to update user information until death of the player\n\t\tupdateUserLocation();\n\n\t}),2500);\n}", "function endGame () {\n\t\t$(\"#timer\").empty();\n\t\t$(\"#game\").html(\"<h2>Game Over! Next stop the Musicians Hall of Fame.</h2>\")\n\t\t$(\"#game\").append(\"<p>Correct answers: \" + correct + \"</p>\");\n\t\t$(\"#game\").append(\"<p>Incorrect answers: \" + incorrect + \"</p>\");\n\t\t$(\"#game\").append(\"<p>A bad guess is better than no guess. Unanswered: \" + unanswered + \"</p>\");\n\t\t$(\"#restart\").css(\"visibility\", \"visible\");\n\t}", "function endGame() {\n\ttoggle(\"gameContainer\");\n\t\n\tdatabase.ref('players/' + player).set({score : playerScore, isDone : true});\n\tendInterval = setInterval(\"getResults()\", 250);\n\t\n\ttoggle(\"outcome\");\n}", "function endGame() {\n \n}", "function stopGame() {\r\n gameNotPaused = false;\r\n}", "function endGame() {\n clearInterval(timer);\n timer = null;\n id(\"start\").disabled = false;\n id(\"stop\").disabled = true;\n text = null;\n index = 0;\n qs(\"textarea\").disabled = false;\n id(\"output\").innerText = \"\";\n }", "function gameEnd(){\n\t\t\trealtime = Date.now() - starttime;\n\t\t\t// Round to 1 digit behind the comma\n\t\t\trealtime = Math.round(realtime / 1000 * 10) / 10;\n\t\t\t// Clear interval timer\n\t\t\tclearInterval(timer);\n\t\t\t$(\".info .timer .sec\").text(realtime);\n\t\t\t$(\".info .timer .sectext\").fadeIn(300);\n\t\t\t$(\"#popup-highscore b.score\").html(realtime + \" seconds\");\n\t\t\t$(\"#popup-highscore input[name=score]\").val(realtime);\n\t\t}", "function endGame() {\r\n clearInterval(animate);\r\n\r\n audioBackground.pause();\r\n alert(`Game over ! Your Score: ${score}`);\r\n\r\n canv.style.display = \"none\";\r\n div1[0].style.display = \"block\";\r\n }", "function endGame() {\n //stop timer\n clearInterval(setTimer);\n //remove event listener so no more moves can be made\n deck.removeEventListener('click', showCard);\n //open popup\n showScore();\n}", "function checkForGameEnd() {\n setInterval(function () {\n if (character_energy <= 0) {\n setInterval(function () {\n gameover = true;\n }, 700);\n\n }\n //if (boss_health <= 0) {\n if (bossDefeated) {\n setInterval(function () {\n gamewin = true;\n }, 1000);\n }\n if (coinsCollected) {\n gamewin = true;\n }\n }, 50);\n}", "function stop(){\n clearInterval(bombId)\n clearInterval(fireBombId)\n clearInterval(invaderId)\n }", "function stop() {\n pausedGame = true;\n}", "function endGame() {\n clearInterval(interval);\n clearTimeout(timeOut);\n clearCurrentQuestion();\n clearAnswerMsg();\n stopTimer();\n resetQuestionIndex();\n showFinalScore();\n showNameInput();\n showStart();\n\n totalSeconds = 20;\n questionText.textContent = \"Game Over\";\n start.textContent = \"Play Again\"\n}", "function endGame(data) {\n var gameID = data.gameID;\n\n gameloop.clearGameLoop(games[gameID].gameloopID);\n}", "function EndComputerGame(){\n flag=false;//set flag as a false value ** to be computer game **\n clearBox2();}", "function endOfGame() {\n\tcreatesMensg();\n\tstopTime();\n\tshowModal();\n}", "function endGame()\r\n{\r\n\tisGameOver=true;\r\n\t\r\n\taudio.stop({channel : 'custom'});\r\n\taudio.stop({channel : 'secondary'});\r\n\taudio.stop({channel : 'tertiary'});\r\n\t\r\n\t//Clear the screen\r\n\tcontext2D.fillStyle=\"rgb(255, 255, 255)\";\r\n\tcontext2D.beginPath();\r\n\tcontext2D.rect(0, 0, canvas.width, canvas.height);\r\n\tcontext2D.closePath();\r\n\tcontext2D.fill();\r\n\t\r\n\tplaySound('Other_Sounds/game_over', 'default', 1, false, none);\r\n\tspeak('You have fallen into a trap and died. Game over, Your final score is: '+score, 'default', false);\r\n}", "stop() {\n this._state = 'ENDED'\n this._stop_time = _.now()\n Logger.info(`The game(${this._id}) has stopped as ${moment(this._stop_time).format('l LTS')}...`)\n this.event_manager.trigger('game_stop', [this])\n this._players.forEach((player) => {\n this.event_manager.trigger('stop_game_player', [player, this])\n player.stop()\n })\n Logger.info('Disabling the game modes')\n _.forEach(this._games, (game) => game._disable())\n this.unload() // unload things in the game\n }", "endGame() {\n setTimeout(function () {\n collectedItemsFin.innerHTML = player.collected;\n collectedFliesFin.innerHTML = player.collectedFly;\n collectedDragonfliesFin.innerHTML = player.collectedDragonfly;\n collectedButterfliesFin.innerHTML = player.collectedButterfly;\n scoreboardFin.innerHTML = player.score;\n scoreboardWaterFin.textContent = player.scoreWater;\n player.modalShow(gameoverModal, replayBtn);\n player.reset();\n start();\n }, 500);\n }", "function finishGame(isVictory) {\n if (isVictory) {\n highestScore(gLevel.type, gGame.secsPassed);\n renderSmiley(true);\n winningAudio.play();\n // alert('You Win!');\n openModal('You Won!');\n gGame.isOn = false;\n } else {\n gGame.isOn = false;\n losingAudio.play();\n openModal('You Lost :(');\n revealMines();\n }\n clearInterval(gTimerInterval);\n}", "function endGame() {\n\tclearInterval(gameTimer);\n\tshowEndScreen();\n\n\tsetInterval(function() {\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\tsetTimeout(victoryAnimation, 1000);\n\t\t}\n\t}, 500);\n}", "forceEndGame() {\n if (this.gameServer.isInGame()) {\n this.gameServer.endGame();\n }\n }", "function endGame() {\r\n newGameCounter = 0;\r\n gameStarted = false;\r\n players = players.concat(audience);\r\n audience = [];\r\n io.emit('update users', players, audience)\r\n io.emit('end game on client');\r\n\r\n }", "function endGame() {\n // Update the max level achieved board\n if (level > maxLevelAchieved) {\n maxLevelAchieved = level;\n $(\".max-level\").text(maxLevelAchieved);\n }\n\n // Make game over sound\n let sound = new Audio(\"sounds/wrong.mp3\");\n sound.play();\n\n // Add visual aspects of game over\n $(\"body\").addClass(\"game-over\");\n setTimeout(function() {\n $(\"body\").removeClass(\"game-over\");\n }, 100);\n $(\"h1\").text(\"Game Over! Press Any Key to Replay\");\n\n // Reinitializing letiables for a new round\n level = 0;\n newGame = true;\n}", "function endGame() {\n dingSFX.play();\n speak(lineEndGame);\n boxWrite(boxTextEndGame);\n gameState = 20;\n}", "function endGame(finshingCode) {\n clearInterval(gameTimerId);\n clearInterval(slidinginterval);\n document.removeEventListener(\"keydown\", keydownListener);\n localStorage.setItem(\"last score\", targetsDestroyed); //storing last score in local storage\n //clearing certain variable for next play\n seconds = 0;\n minutes = 0;\n targetsDestroyed = 0;\n //change title to SWAL\n if (finshingCode === gameOver.win) {\n confirmObject.title = \"Winner\";\n } else if (finshingCode === gameOver.lose) {\n confirmObject.title = \"Better luck next time!\";\n }\n //alerting using sweet alert 2 javascript popup libirary\n Swal.fire(confirmObject).then((result) => {\n if (result.value) {\n //removeing the container childrens\n container.innerHTML = \"\";\n startGame();\n } else {\n //window.location.replace(\"Home.html\");\n window.location.href = \"Home.html\"; //redirecting to home page\n }\n });\n\n }", "function endSala() {\r\n\tgame.endSala();\r\n}", "function endGame() {\n\tif(matchedCards.length === 16){\n\t\ttimer.stop();\n\t\tdisplayPopup();\n\t}\n}", "function endOfGame(){\n\tgameDeck.style.display = 'none';\n\tfinalScreen.style.display = 'initial';\n\tplayAgainButton.style.display = 'initial';\n\t\n\t// Display the score at the end of the game\n\tscoreMes.innerHTML = \"- with \" + movesNo + \" moves and \" + starsNo + \" stars -\";\n\n\t// Stop time counter\n\tclearInterval(myInterval);\n\n\tplayAgainButton.addEventListener('click', replay, false);\n}", "function loseGame() {\n stopGame();\n stopTimer();\n alert(\"Game Over! You lost!\");\n}", "function gameEnd(){\n\n game.startBanner = game.add.image(phaser.config.width / 2, phaser.config.height / 2, \"start-banner\")\n \n //If your score is higher than the opponent score, you win, else, you lose.\n if(score > oppScore){\n game.youWin = game.add.image(phaser.config.width / 2, phaser.config.height / 2, \"you-win\")\n }else{\n game.youLose = game.add.image(phaser.config.width / 2, phaser.config.height / 2, \"you-lose\")\n }\n\n game.scene.pause(); //Pause the scene\n\n setTimeout(function(){ //Set timeout then return to menu\n game.scene.start('menu')\n score = 0; //Set score back to 0\n Client.socket.emit('gameEnd');\n },5000)\n }", "endGame(gameWinner) {\n\t\tclearInterval(this.multiplayerGameInterval); // clearInterval is a library function\n\t\tthis.multiplayerGame = null;\n\t\tthis.gameWinner = gameWinner;\n\t\tthis.gameInProgress = false;\n\t\tthis.gameHasEnded = true;\n\t}", "function stopGame() {\n\twindow.clearInterval(controlPlay);\n\tcontrolPlay = false; \n\n\t//show lightbox with score\n\tlet message1 = \"Tie Game\";\n\tlet message2 = \"Close to continue.\";\n\n\tif (score2 > score1) {\n\t\tmessage1 = \"Player 2 wins with \" + score2 + \" points!\";\n\t\tmessage2 = \"Player 1 had \" + score1 + \" points.\";\n\t} else if (score1 > score2) {\n\t\tmessage1 = \"Player 1 wins with \" + score1 + \" points!\";\n\t\tmessage2 = \"Player 2 had \" + score2 + \" points.\";\n\t} //else\n\n\tshowLightBox(message1, message2);\n\n\thidePowerups();\n\treset();\n}", "function stopGame() {\n gameState.locked = true;\n\n gameState.isRunning = false;\n\n setTimeout(function(){\n gameState.locked = false;\n }, 1000);\n}", "function end() {\n game.end();\n console.log('End!!, thank you for playing');\n }", "function timeStop(){\n\tgameTime = clearInterval();\n\t//save score\n\tvar response = confirm(\"YOU WIN, CONGRATS!\\nYour game time was \" + t + \" seconds\\nDo you want to save your score?\");\n\tif(response == true)\n\t\tsaveScore();\n}", "function _clearInterval() {}", "function endGame() {\n // console.log('game finished!');\n let $messageBox = $('#message');\n let $dealButton = $('#deal-button');\n let $hitButton = $('#hit-button');\n let $standButton = $('#stand-button');\n let $dealerFirstCard = $('#dealer-hand div:nth-child(1)')\n\n $dealerFirstCard.removeClass('flyin');\n $dealerFirstCard.addClass('loop');\n setTimeout(function() {\n $('#dealer-box').removeClass('hidden');\n $dealerFirstCard.css('background-image', `url(${dealer.hand[0].img}`);\n }, 500);\n\n $hitButton.off('click');\n $hitButton.addClass('subdued');\n\n $standButton.off('click');\n $standButton.addClass('subdued');\n\n $('#player-bet p').html('$0');\n localStorage.setItem('playerMoney', player.money);\n\n $dealButton.removeClass('subdued');\n $dealButton.text('DEAL');\n $dealButton.one('click', resetGame);\n}", "function stopGame(){\n if (!win || win){\n clearWinOrLoseScreen()\n }\n clearInterval(gametimer)\n clearInterval(berryTimer)\n BGM.pause()\n BGM.currentTime = 0\n win = null\n playerScore = 0\n cells[enemyA.position].classList.remove('enemy1')\n cells[enemyB.position].classList.remove('enemy2')\n cells[enemyC.position].classList.remove('enemy3')\n cells[enemyD.position].classList.remove('enemy4')\n clearGrid()\n scoreboard.innerHTML = playerScore\n highScore = localStorage.getItem('highscore')\n highscoreboard.innerHTML = highScore\n cookiesRemaining = 212\n playerPosition = 487\n cells[playerPosition].classList.add('sprite')\n createMaze()\n playerPosition = 487\n cells[playerPosition].classList.add('sprite')\n enemyA.position = 337\n cells[enemyA.position].classList.add('enemy1')\n enemyB.position = 335\n cells[enemyB.position].classList.add('enemy2')\n enemyC.position = 339\n cells[enemyC.position].classList.add('enemy3')\n enemyD.position = 338\n cells[enemyD.position].classList.add('enemy4')\n gameOver = true\n \n }", "gameOver(){\n\n\t\tthis.mvc.gameState = 0;\n\n\t\tthis.mvc.model.ioSendEnd();\n\n\t\tthis.stop();\n\n\t\tthis.mvc.model.updatedHallOfFame();\n\n\t}", "function gameOver(){\n clearInterval(interval)\n ctx.drawImage(gameOverLogo, 90, 60, 500, 450)\n\n interval = null\n weWillAudio.pause()\n boogieAudio.pause()\n despacitoAudio.pause()\n billiejeanAudio.pause()\n quebelloAudio.pause()\n gameOvAudio.play()\n\n}", "function endGame(pos) {\n $('#' + pos + \" .gauge-fill\").height(0);\n $('#' + pos + ' .icon').css(\"display\", \"none\");\n if(enlarged != \"\") {\n hideCurrGame();\n }\n delete activeArray[pos];\n onFire += 1;\n if(onFire == 5){\n onFireAction();\n }\n if(activeArray.length == 0){\n cleanSweepAction();\n }\n}", "function gameWon() {\n if (winGame == true) {\n endScreen();\n }\n}", "function endGame() {\n // Close down game screen, also set hearts back and open endgame\n $('#gameScreen').addClass('hidden');\n $('#heart1').removeClass('removed');\n $('#heart2').removeClass('removed');\n $('#heart3').removeClass('removed');\n $('#endGameText').text(\"Your score was: \" + $('#playerScore').text());\n $('#end-page').removeClass('hidden');\n obstacleSpeed = 0.5;\n spawnRate = 500;\n playerAlive = false;\n playerScore = 0;\n customFlag = 0;\n flag = 1;\n playerScore = 0;\n customFlag = 0;\n seconds = 0; minutes = 0; hours = 0;\n}", "function gameEnd(emoji) {\n gGame.isOn = false;\n timerStop();\n setEmoji(emoji);\n renderHintButton(0);\n showPlayAgainMsg();\n}", "function stopLifeGame() {\n clearInterval(gameLifeRunning);\n $(__RUN_BUTTON__).attr(\"disabled\", false);\n $(__STOP_BUTTON__).attr(\"disabled\", true);\n gameLifeRunning = null;\n}", "function endGame(){\n gameOver = true;\n gameStarted = false;\n allEnemies = [];\n allFruit = [];\n pickedFruit = [];\n //displayResult();\n resultMessage();\n updateInfo();\n}", "function endGame() {\n datTime = 30;\n gameTimer.setText(datTime.toString());\n blackScreen.setHidden(false);\n blackScreen.animate().alpha(0.75).duration(500);\n wholeSpidey.animate().alpha(0).duration(500);\n deadpool.animate().alpha(0).duration(500).onEnd = function() {\n deadpool.setHidden(true);\n }\n endScore.setHidden(false);\n endScore.setClickable(true);\n endScore.setAlpha(1);\n endScore.setText('Nice!<br />Your Score is: ' + scoreNumber + '<br />Tap to Play Again');\n}", "function checkEndGame() {\n if (questionNum == 15) {\n clearInterval(countDown);\n $('#sectionQuestions').addClass('hidden');\n $('#sectionResults').removeClass('hidden');\n $('#feedback').html('Game Over!!');\n $('#feedbackDetail').html(\"You got \" + correctCounter + \" questions right, \" + incorrectCounter + \" questions wrong, and didn't answer \" + timeoutCounter + \" questions at all.\");\n };\n }", "function playerDeath() {\n clearInterval(monsterAttack);\n boardElement.innerHTML = '<h1>GAME OVER</h1>';\n document.getElementById('player-cam').src = 'imgs/player/dead.png';\n document.getElementById('action-menu').style.display = 'none';\n GAME_STATE = 'GAME_OVER';\n playMusic('death');\n}", "function endGame() {\n if(!snake2) $('#ouch_kid').trigger('play');\n else $('#game_over').trigger('play');\n clearCanvas();\n clearInterval(timer_game);\n clearInterval(timer_keys);\n clearInterval(timer_time);\n if(snake2) {\n var score_display = \"Snake1: \" + snake1.score + \"<br />Snake2: \" + snake2.score + \"<br />\";\n if(snake1.score > snake2.score) {\n score_display += \"<b>Snake1 Wins!!!</b>\";\n } else if(snake2.score > snake1.score) {\n score_display += \"<b>Snake2 Wins!!!</b>\";\n } else {\n score_display += \"It's a tie!!!\";\n }\n $('#score-display').html(score_display);\n }\n else $('#score-display').html(\"Score: \" + snake1.score);\n if(!snake2) {\n if(snake1.score > 50) $('#score-message-heading').html('Nice Attempt!');\n else $('#score-message-heading').html('Oh! that was a bad luck!');\n }\n $('#info-modal').modal('show');\n }", "gameover() {\n clearInterval(this.interval);\n this.started = false;\n this.blocks = [];\n this.frame = 0;\n this.run = 0;\n }", "function reachedEndOfGame() {\n stop();\n $(\"#question\").html(\"Reached the end of the game :)\");\n $(\"#timer-view\").html(\"- -\");\n $(\".footer\").html(\"Yay!\");\n}", "function stop() {\n clearInterval(intervalId);\n clockRunning = false;\n }" ]
[ "0.85136807", "0.80926424", "0.8078578", "0.8032116", "0.80034727", "0.7834107", "0.77534765", "0.769874", "0.7694725", "0.766323", "0.7648194", "0.76449883", "0.7633983", "0.762984", "0.76265484", "0.75887346", "0.75628215", "0.75583", "0.7530165", "0.7516167", "0.75114644", "0.750262", "0.7455021", "0.74490446", "0.7423808", "0.74182785", "0.74120957", "0.73971677", "0.7369203", "0.7355953", "0.73477876", "0.73118854", "0.72347933", "0.72015935", "0.72006184", "0.7158894", "0.71586645", "0.71391237", "0.71332324", "0.71168596", "0.7102411", "0.7094074", "0.70910716", "0.70910716", "0.7088166", "0.70771354", "0.7075094", "0.70613885", "0.7061012", "0.705859", "0.705696", "0.7049813", "0.70279235", "0.7026137", "0.7015916", "0.6997749", "0.6985854", "0.6976645", "0.6967037", "0.695504", "0.69545937", "0.694268", "0.69426286", "0.6923419", "0.69233567", "0.6921255", "0.69206804", "0.6917327", "0.691664", "0.6905807", "0.6905274", "0.690026", "0.689545", "0.68950033", "0.68824357", "0.6867864", "0.6865128", "0.685254", "0.68475187", "0.68380624", "0.6834949", "0.68264717", "0.68263733", "0.68111587", "0.6809007", "0.6804965", "0.68038774", "0.68008304", "0.67938817", "0.67914695", "0.6787365", "0.67851007", "0.67830235", "0.67828834", "0.67692524", "0.6768955", "0.6768375", "0.6767152", "0.6761806", "0.67589116", "0.6756986" ]
0.0
-1
======================= /clearInterval ======================= / ======================= loadScoreboardPregame =======================
function loadScoreboardPregame() { $.ajaxSetup({ cache: true}); $.getJSON("http://data.nba.com/data/v2015/json/mobile_teams/nba/2016/teams/cavaliers_schedule_" + seasontype + ".json", function(data){ var game = data.gscd.g; var status = game[gamenum].st; var status = game[gamenum].st; var cavsscore; var oppscore; if (cavsHOME == 1){ cavsscore = game[gamenum].h["re"]; oppscore = game[gamenum].v["re"]; } else { cavsscore = game[gamenum].v["re"]; oppscore = game[gamenum].h["re"]; } document.getElementById("opp-score").innerHTML="2-1"; document.getElementById("cavs-score").innerHTML="3-0"; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopScoreCounter() {\n\tclearInterval(scoreCounterID);\n}", "function endGame() {\n clearInterval(interval);\n console.log('ended');\n pointsEl.innerText = score;\n resultEl.classList.toggle('hide');\n containerEl[0].classList.toggle('hide');\n var savedGames = localStorage.getItem('lastScore');\n console.log(savedGames);\n userNameEl.classList.toggle('hide');\n addToScoreboard(userName.value);\n}", "function scoreboard(){\n $('#timeLeft').empty();\n $('#message').empty();\n $('#correctedAnswer').empty();\n $('#gif').hide();\n $(\"#gifCaption\").hide();\n \n $('#finalMessage').html(messages.finished);\n $('#correctAnswers').html(\"Correct Answers: \" + correctAnswer);\n $('#incorrectAnswers').html(\"Incorrect Answers: \" + incorrectAnswer);\n $('#unanswered').html(\"Unanswered: \" + unanswered);\n $('#startOverBtn').addClass('reset');\n $('#startOverBtn').show();\n $('#startOverBtn').html(\"PLAY AGAIN\");\n }", "function resetScoreboard() {\n $('#game-board').empty();\n $('#elapsed-seconds').empty();\n $('#matches-found').empty();\n $('#remaining-pair').empty();\n $('#attempts-made').empty();\n $('#turn-report').empty();\n $('#actions').text('Please Click A Tile');\n window.clearInterval(timer);\n elapsedSeconds = 0;\n attempts = 0;\n remainingPairs = 8;\n matchedPairs = 0;\n clicks = 0;\n flippedTiles = [];\n flippedImg = [];\n tilesList = [];\n for (idx = 1; idx <= 32; idx++) {\n tilesList.push({\n tileNum: idx,\n src: 'img/tile' + idx + '.jpg',\n flipped: false,\n matched: false\n });\n }\n}", "function stop_game()\n{\n //Set scores to 0\n \tscore = 0;\n comscore = 0;\n \n // Update score board\n\t\tdocument.getElementById(\"score\").innerHTML=score;\n\t\tdocument.getElementById(\"comscore\").innerHTML=comscore;\n}", "function stopGame(){\n if (!win || win){\n clearWinOrLoseScreen()\n }\n clearInterval(gametimer)\n clearInterval(berryTimer)\n BGM.pause()\n BGM.currentTime = 0\n win = null\n playerScore = 0\n cells[enemyA.position].classList.remove('enemy1')\n cells[enemyB.position].classList.remove('enemy2')\n cells[enemyC.position].classList.remove('enemy3')\n cells[enemyD.position].classList.remove('enemy4')\n clearGrid()\n scoreboard.innerHTML = playerScore\n highScore = localStorage.getItem('highscore')\n highscoreboard.innerHTML = highScore\n cookiesRemaining = 212\n playerPosition = 487\n cells[playerPosition].classList.add('sprite')\n createMaze()\n playerPosition = 487\n cells[playerPosition].classList.add('sprite')\n enemyA.position = 337\n cells[enemyA.position].classList.add('enemy1')\n enemyB.position = 335\n cells[enemyB.position].classList.add('enemy2')\n enemyC.position = 339\n cells[enemyC.position].classList.add('enemy3')\n enemyD.position = 338\n cells[enemyD.position].classList.add('enemy4')\n gameOver = true\n \n }", "function initializeBoard () { // Initialisiere Board\n\ninitializeCanvas();\ninitializeLasers();\ntimerId = setInterval(drawMaxima, 1000/60);\n\n}", "function gameReset() {\n $('#Verloren').show();\n clearInterval(interval2);\n score = 0;\n}", "function startScoreboard(){\n try {\n runScoreboard();\n }\n catch (e){\n alert(\"Error: \" + e + \"\\n\");\n console.error(e.stack);\n }\n}", "function loadGame() {\n \tconsole.log('startGame');\n \tallCards = shuffle(allCards);\n\n \t// Reset the number of moves\n \tnumberOfMoves = 0;\n\tcounterForMoves.innerHTML = numberOfMoves;\n\n\topenCards = [];\n\t// Iterate through the cards array and append it to the deck\n\t// And remove the attributes\n\tfor (let card of allCards){\n\t\tdeckOfCards.append(card);\n\t\tcard.classList.remove(\"show\", \"open\", \"match\", \"disabled\");\n }\n\n \t// reset rating\n for (var i= 0; i < stars.length; i++){\n stars[i].style.visibility = \"visible\";\n }\n\n //reset timer\n second = 0;\n minute = 0;\n hour = 0;\n\n timerClock.innerHTML = \"00:00:00\";\n clearInterval(interval);\n }", "function displayScore() {\n console.log(\"you won!\");\n //clearInterval(timerId);\n container.parentNode.removeChild(container);\n /****************Create Scroe Board Container********************/\n const scoreContainer = document.createElement('div');\n scoreContainer.setAttribute('class', 'scoreContainer');\n body.appendChild(scoreContainer);\n\n const checkImg = document.createElement('img');\n checkImg.setAttribute('src', './img/check-mark.gif');\n\n const congrats = document.createElement('h1');\n congrats.innerText = \"Congratulations! YOU Won!\";\n /**\n * calculate the players moves and display them with the stars\n */\n const playerStats = document.createElement('p');\n playerStats.innerText = \"With \" + moves + \" Moves and \" + stars + \" Stars \";\n /******calculate the time taken to finish the game**********/\n const currentTime = timerspan.innerText.split(':');\n const minutes = 15 - currentTime[0];\n const seconds = 0 - currentTime[1];\n console.log(minutes);\n\n const playerTime = document.createElement('p');\n playerTime.innerText = \"Time taken: \" + minutes + \":\" + (60 - Math.abs(seconds)) + \" minutes\";\n\n const againBtn = document.createElement('button');\n againBtn.innerText = \"Play Again\";\n againBtn.setAttribute('class', 'btnSuccess');\n againBtn.addEventListener('click', function () {\n window.location.reload();\n });\n\n const leaderBoard = document.createElement('h4');\n leaderBoard.innerText = \"Highest Score: \" + localStorage.getItem('highScore') + \" Stars\";\n\n scoreContainer.appendChild(checkImg);\n scoreContainer.appendChild(congrats);\n scoreContainer.appendChild(playerStats);\n scoreContainer.appendChild(playerTime);\n scoreContainer.appendChild(leaderBoard);\n scoreContainer.appendChild(againBtn);\n }", "function clearScores() {\n localStorage.removeItem('scores');\n checkWin();\n drawScores();\n}", "function restart(){\n\tlog = [];\n\tcardsInPlay = [];\n\tcurrentPlayer = 0;\n\tplayerScores = [0, 0];\n \ttrackedCards = [];\n \tseconds = 10;\n \tgameBoardSetup();\n \t$(\".playerScore\").empty().append(\"0\");\n \t$(\".playerOne\").css('color', 'red');\n \t$(\".playerTwo\").css('color', 'black');\n \tcountDownTimer();\n}", "function on_load(score){\n \t\n\tvar playAgain = document.getElementById('button');\n\tplayAgain.addEventListener('click',reStart);\n\tupdateScore(score);\n\tupdateLives(numberOfLives);\n\n\n\t}", "function gameRefresh(){\n console.log(\"game refreshed\");\n currentScore = 0;\n crystalValues = []\n displayAll();\n}", "function gameIsOn() {\n\n $.ajaxSetup({ cache: true});\n $.getJSON(\"http://data.nba.com/data/v2015/json/mobile_teams/nba/2016/scores/gamedetail/\" + gameID + \"_gamedetail.json\", \n function(data){\n\n var period = data.g.p;\n var gamestatus = data.g.stt;\n gameStatus = data.g[\"st\"];\n\n if (period === null || period == \"0\") {\n loadScoreboardPregame();\n } else {\n loadScoreboardInGame();\n if (gamestatus != \"Final\") {\n setInterval(\"loadScoreboardInGame()\",10000);\n }\n if (gamestatus == \"Final\") {\n clearInterval(\"loadScoreboardInGame\"); //clear interval\n }\n } \n });\n\n}", "function reset(){\nif(np_checkpoint < 3){\n swal(\"CHALLENGE INCOMPLETE!\", \"tsk tsk tsk dont play play ah\");\n}\n else{\n window.clearInterval(interval);\n status = \"stopped\";\n let timing = new Date() - startTime;\n console.log(timing/60000 + \"seconds\");\n localStorage.setItem(\"timing\",(timing/1000));\n // Storing timing data\n var firebaseConfig = {\n apiKey: \"AIzaSyAuqUON7LmCIIrvwKY1wNHDiQEx2DBAjE8\",\n authDomain: \"leaderboard-dc9d0.firebaseapp.com\",\n databaseURL: \"https://leaderboard-dc9d0-default-rtdb.firebaseio.com\",\n projectId: \"leaderboard-dc9d0\",\n storageBucket: \"leaderboard-dc9d0.appspot.com\",\n messagingSenderId: \"412968994325\",\n appId: \"1:412968994325:web:95e19dddd112a72e65f01c\",\n measurementId: \"G-23M250XY1Z\"\n };\n // Initialize Firebase\n firebase.initializeApp(firebaseConfig);\n \n var myName = localStorage.getItem(\"name\");\n var time = localStorage.getItem(\"timing\");\n var database = firebase.database();\n var ref = database.ref(\"scores\");\n \n var data = {\n \"name\": myName,\n \"timing\": parseFloat(time)\n }\n \n ref.push(data);\n }\n\n}", "function startScoreboard(){\n try {\n runScoreboard();\n }\n catch (e){\n alert(\"Error: \" + e + \"\\n\");\n }\n}", "function scoreBoardEvent() {\n document.querySelector('.restart').addEventListener('click', function () {\n location.reload()\n })\n document.querySelector('.overlay-score input').addEventListener('change', function () {\n document.querySelector('.name-container h2').innerText = document.querySelector('.overlay-score input').value\n })\n document.querySelector('.clear').addEventListener('click', function () {\n var ul = document.querySelectorAll('.score-container ul')\n ul.forEach(e => e.remove())\n localStorage.clear()\n })\n}", "function initGameStatus() {\n scoreText.text = 'Score: ' + score;\n scoreText.update();\n\n lifeText.text = 'Life: ' + life;\n lifeText.update();\n\n if (life == 0) {\n clearInterval(gameArea.interval);\n setTimeout(function () {\n retryGame();\n if (localStorage.getItem('revUserId') != null) {\n //save score\n }\n gameArea.interval = setInterval(retryGameArea, 20);\n },250);\n // gameArea.stop();\n }\n}", "function loseGame() {\n clearInterval(clock);\n stopBGM();\n $(\"#timeLasted\").html(min + \":\" + (sec < 10 ? \"0\" + sec : sec) + \":\" + dsec);\n $(\".overlay\").fadeIn(500); \n ajaxSubmitScore();\n}", "function reloadGame(num) {\n $('#container').empty();\n $cb = loadDivs(num);\n setMatchColor();\n }", "function clearScores(){\n window.localStorage.clear();\n updateScoreBoard();\n}", "function refreshScoreBoxes() {\n\td3.select(\"#scoreboard\").selectAll(\"*\").remove();\n\tscore_grid = d3.select(\"#scoreboard\")\n\t.append(\"svg\")\n\t.attr(\"width\",sGridSize.w+\"px\")\n\t.attr(\"height\",sGridSize.h+\"px\")\n\t;\n\tdrawScorebox3(score_grid, getGameData(), score_tile_size);\n}", "function endGame() {\n clearInterval(scorePanel.intervalManager);\n showCongratulationModal();\n}", "function loadingScreen() {\n gamePlayScreen.style.display = \"block\";\n buttons.style.display = \"none\";\n overlayScreen.style.visibility = \"visible\";\n countdownBeep();\n var loadCountdown = setInterval(function() {\n counter = counter - 1;\n console.log(\"print count\" + counter)\n overlayBox.innerHTML = counter;\n if (counter === 0) {\n overlayBox.innerHTML = \"GO\";\n counter = 4;\n }\n }, 1000);\n setTimeout(function(){\n initGame();\n clearInterval(loadCountdown);\n overlayScreen.style.visibility = \"hidden\";\n }, 4000);\n wordInput.focus();\n}", "function initScorePanel() {\n openCards = new Array(2);\n cardCounter = Number(0);\n moveCounter = Number(0);\n document.getElementsByClassName('moves')[0].textContent = 0;\n starCounter = Number(3);\n document.querySelector('.stars').innerHTML =\n `<li><i class=\"fa fa-star\"></i></li>\n <li><i class=\"fa fa-star\"></i></li>\n <li><i class=\"fa fa-star\"></i></li>`;\n if (intervalId !== null) {\n clearInterval(intervalId);\n }\n intervalId = null;\n document.getElementById('realtime').textContent = '00:00';\n}", "function clearBoard() {\n clearInterval(timeIntervalId);\n $(\"#timer\").html(\"0d 0h 0m 0s\");\n card.removeClass('open show match fail bounce locked');\n cardIcon.removeClass();\n stars.removeClass('fa-star-o').addClass('fa-star');\n moveCount.html('0');\n moves = 0;\n wrongAnswer = 1;\n correctPairs = 0;\n placeCards(shuffle(cards));\n}", "function refreshGamesEachSec() {\n setInterval(refreshGameStatus, 1000);\n}", "function setint() {\n // minutes = Math.floor(time / 60);\n seconds = time % 60;\n time--;\n counter.innerHTML = minutes + \" : \" + seconds;\n if (seconds == 0 && count < words.length) {\n clearInterval(interval);\n document.getElementById(\"counter\").innerHTML = \"Game Over\";\n content.style.display = \"none\";\n scoreBoard.style.display = \"block\";\n music.pause();\n \n \n \n } else if (seconds > 0 && count == words.length) {\n clearInterval(interval);\n content.style.display = \"none\";\n next.style.display = \"block\";\n\n // document.getElementById(\"counter\").innerHTML = \"Game Over\";\n }\n }", "function restartGame() {\n GAME_OVER = false;\n GAME_COMPLETE = false;\n GAME_CONTINUE = false;\n NUM_ENEMIES = -1; \n CUR_LEVEL = 0;\n LEVEL_OBJ.level = 1;\n SCORE_OBJ.score = 0;\n console.log(\"restarting...\");\n reset_store();\n $('#winner').hide();\n gwhOver.hide();\n $('.snowball').remove();\n $('.projectile').remove();\n $('.bunker').remove();\n $('#store').hide();\n $('#levelScreen').show();\n\n setTimeout(function() {\n\t if (!PROJECTILES_FALLING) {\n\t\tcr_prj_id = setInterval(function() {\n\t\t\tcreateProjectile();\n\t\t}, PROJECTILE_SPAWN_RATE[CUR_LEVEL]);\n\t\tPROJECTILES_FALLING = true;\n\t }\n gwhGame.show();\n $('#levelScreen').hide();\n\t ENEMY_DIRECTION = \"right\";\n ENEMY_SPEED = LEVEL_SPEED[CUR_LEVEL];\n threshold = Math.ceil(ENEMY_DOUBLE_RATIO * ENEMY_PATTERN[CUR_LEVEL][0] * ENEMY_PATTERN[CUR_LEVEL][1]);\n \tNUM_ENEMIES = ENEMY_PATTERN[CUR_LEVEL][1] * ENEMY_PATTERN[CUR_LEVEL][0];\n \tmaxEnemyPosX += ENEMY_SIZE;\n \tENEMY_SIZE = Math.min(100, 100 * 8 / (ENEMY_PATTERN[CUR_LEVEL][0] + 1));\n \tmaxEnemyPosX -= ENEMY_SIZE;\n createEnemies(ENEMY_SIZE);\n createBunkers();\n GAME_PAUSED = false;\n }, 7000);\n}", "function endgame() {\n \tclearInterval(intervalId);\n }", "function viewHighScoresScreen(){\n if (saveDatabase.length === 0){\n loadUserScores();\n }\n clearScreen();\n highScoresStyle();\n}", "load() {\n if (!!this.saveArray) {\n this.board = this.saveArray[0];\n this.currentColour = this.saveArray[1];\n this.currentColour == 'white' ? this.otherColour = 'black' : this.otherColour = 'white';\n this.displayBoard();\n console.log(\"game loaded\");\n }\n }", "function endOfGame() {\n clearInterval(timerId);\n $('#guessruletable .pheno').prop('disabled', 'disabled');\n $('#guessruletable .allele').prop('disabled', 'disabled'); // false\n $('#bitsandbuttons').show();\n $('#hidepop').hide(); \n $('#makepop').show(); \n var score = $(\"#countdownText\").text();\n if(score>0) {\n\tvar yrname=prompt(translate[lang][\"You scored\"]+score+translate[lang][\"Enter name\"]);\n addToTable(yrname,score);\n\tprintTable();\n\t$(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n } else {\n\talert(translate[lang][\"Out of time\"]);\n\t$(\"html, body\").animate({ scrollTop: 0 }, \"slow\");\n }\n}", "function init() {\r\n scores = [0, 0, 0];\r\n activePlayer = 1;\r\n roundScore = 0;\r\n gamePlaying = true;\r\n \r\n document.querySelector('.dice-2').style.display = 'none';\r\n document.querySelector('.dice-6').style.display = 'none';\r\n document.querySelector('.btn-roll').style.display = 'none';\r\n document.querySelector('.btn-start').style.display = 'none';\r\n\r\n //Set the board to initial position:\r\n document.getElementById('current-1').textContent = '0';\r\n document.getElementById('current-2').textContent = '0';\r\n document.getElementById('score-1').textContent = '00';\r\n document.getElementById('score-2').textContent = '00';\r\n document.getElementById('name-1').textContent = 'Player 1';\r\n document.getElementById('name-2').textContent = 'Player 2';\r\n document.querySelector('.player-1-board').classList.remove('winner');\r\n document.querySelector('.player-2-board').classList.remove('winner');\r\n document.querySelector('.player-1-board').classList.remove('active');\r\n document.querySelector('.player-2-board').classList.remove('active');\r\n document.querySelector('.player-1-board').classList.add('active');\r\n}", "function resetScores() {\n miscButtonClick.play();\n if (userCount !== 2){\n alert(\"Two users should be logged in\");\n return;\n }\n refresh();\n player1Scores = 0;\n player2Scores = 0;\n drawCount = 0;\n updateScores();\n // saveGame();\n writeGameRT();\n }", "function endGame() {\n // Overlay\n // Show score\n // Show table \n // Give user chance to restart\n // TODO: add high score to renderGUI\n\n uploadScore(score);\n score = 0;\n}", "function clearScores() {\n\n\t\tif ($(\"#highScores tr\").length > 1) {\n\n\t\t\tlocalStorage.removeItem(\"scores\");\n\t\t\tstoredScores = [];\n\t\t\t\n\t\t\t// Fun animation, fun sound, and removal of localStorage/High Score elements.\n\t\t\t$(\".added\").animate({\n\n\t\t\t\t'padding': \"0px\",\n\t\t\t\t'height': \"0px\",\n\t\t\t\t'font-size': \"0px\",\n\t\t\t\t'margin': \"0px\"\n\n\t\t\t}, 4800, function() {\n\n\t\t\t\t$(\".added\").remove();\n\n\t\t\t});\n\t\t\tsounds.shutdown();\n\n\t\t}\n\n\t}", "function scorePage() {\n main.classList.add(\"hide\");\n endGame.classList.remove(\"hide\");\n finalScore.textContent = timeLeft;\n clearInterval(interval);\n}", "function obstacleHitAboard() {\n // we dont want the game to be playing anymore\n // clearInterval(gamePlayingIntervalID);\n clearInterval(intervalId);\n //window.alert(\"you lost the game\");\n // this will access the game_grid\n let gridToRemove = parent_container.lastChild;\n // this will remove our grid\n parent_container.removeChild(gridToRemove);\n // we put in a display with a replay button\n let failMsgBtn = createFailMsgBtn();\n parent_container.appendChild(failMsgBtn);\n console.log(\"you lost\");\n // play fail message\n // playing our fail message\n failAudio.play();\n replay_btn.onclick = () => {\n resetGame(failMsgBtn);\n };\n}", "function dood() {\n var id = playerNumber;\n console.log(\"dead: \" + id)\n clearInterval(scoreInterval);\n\n }", "loadScore() {\n this.measureMap = {};\n this.measureNoteMap = {};\n this.clearModifierSelections();\n this.selections = [];\n }", "function gameover() {\n\tclearInterval(ticker);\n\tgameStart = false;\n\tdocument.getElementById(\"GameOver\").innerHTML = \"GameOver\";\n\tdocument.getElementById(\"timeScreen\").innerHTML = \"0\";\n\tdocument.getElementById(r).style.borderColor = \"grey\";\n\talert(\"GameOver.\\nYour score is \"+score);\n\tscore = 0;\n\tdocument.getElementById(\"scoreScreen\").innerHTML = score;\n}", "rerenderBoard() {\n let playSound = document.getElementById('RestartGame');\n playSound.play();\n this.resizeBoard();\n this.setCurrentTrial();\n\n setTimeout(() => {\n this.blueTileAllocation = Math.ceil(ALLOCATION_SCALAR * this.boardCols * this.boardRows) + 1;\n Tile.setTileTab(this.blueTileAllocation);\n this.container.removeChild(this.boardGraphic);\n this.renderBoard();\n\n }, NEXT_LEVEL_DELAY);\n\n displayAttempts = false;\n document.getElementById(\"attempt-counter\").innerHTML = null;\n\n \n }", "function gameOver() {\n alert(\"Game over!!!\");\n clearInterval(game);\n\n}", "restart_game()\n {\n if(this.gameStart)\n {\n if(this.gameOver)\n {\n this.score = 0;\n this.health=3;\n this.gameOver=false;\n this.enemy_pos = [];\n this.laser_pos = [];\n this.bullet_pos = [];\n this.sound.gameOver.pause();\n this.sound.gameOver.currentTime = 0;\n this.sound.bgm.currentTime = 0;\n }\n }\n else\n {\n var element = document.getElementById(\"startScreen\");\n element. parentNode.removeChild(element);\n this.gameStart = true;\n this.gameOver = false;\n }\n \n }", "reset() { \n document.querySelector('.game-over').style.visibility = 'hidden';\n blockGroup.reset();\n this.setHighScore();\n this.setScore(0);\n this.setLevel(0) \n this.next = null;\n this.currentSpeed = 1000; \n clearInterval(this.interval);\n this.interval = window.setInterval(() => {main()}, this.currentSpeed); \n }", "function endGame(){\n \tsetTimeout(function() {\n // \t\tvar highScore = localStorage.getItem('highScore');\n // \t\tif (score > highScore) {\n // \t\t\tlocalStorage.removeItem('highScore');\n // \t\t\thighScore = localStorage.setItem('highScore', score);\n // \t\t\t//$('#high-score').text('High Score: ' + score);\n // \t\t} else {\n // \t\t\thighScore = localStorage.getItem('highScore');\n // \t\t\t//$('#high-score').text('High Score: ' + highScore);\n // \t\t}\n \t\t$('#game-board').hide();\n \t\tinputScore.show();\n \t\t$('#play-again').show();\n \t\t$('#exit-game').show();\n \t\t$('#leader-board').show();\n \t\t$('#end-image').show();\n \t\t$('.counter').hide();\n \t}, 13000);\n }", "function lost(){\n pause();\n playing = false;\n lose = true;\n setHighscore();\n html('rows','Game Over')\n }", "function reload() {\n counter = 0;\n calculateScore(time, totalWords);\n\n currentText.classList.remove(\"textColor\");\n time = 0;\n totalWords = 0;\n totalErrors = 0;\n generateText();\n\n}", "function holdScore(){\n \n // Assigning variables to target classes and id from html \n let currentPlayerGlobalScore = document.querySelector(`#score-${activePlayer}`); \n let currentPlayerScore = document.querySelector(`#current-${activePlayer}`); \n let currentPlayerName = document.querySelector(`#name-${activePlayer}`); \n let currentPlayerPanel = document.querySelector(`.player-${activePlayer}-panel`); \n\n if(gamePlay){\n globalScores[activePlayer] += roundScore; // mag add yung roundScore at yung globalScores \n currentPlayerGlobalScore.textContent = globalScores[activePlayer]; // ididisplay yung globalScores ni active player \n\n if(globalScores[activePlayer] >= threshold.value){\n currentPlayerName.textContent = \"Winner!\"; // papalitan name into \"Winner!\" text\n currentPlayerScore.textContent = '0'; // reset to '0' current score \n imgDice.style.display = \"none\"; \n\n // Stop the game \n currentPlayerPanel.classList.remove('active'); \n currentPlayerPanel.classList.add('winner'); \n gamePlay = false; \n\n } else {\n nextPlayer(); // another game will begin \n }\n }\n }", "function startGame() {\n //catch click event of start game button\n $('#start-game').click(function () {\n resetScoreboard();\n tilesList = _.shuffle(tilesList);\n var selectTiles = tilesList.slice(0, 8); //Select array values of 0 to 7 (8 values total)\n var tilePairs = [];\n _.forEach(selectTiles, function s(tile) {\n tilePairs.push(tile);\n tilePairs.push(_.clone(tile));\n });\n tilePairs = _.shuffle(tilePairs);\n createBoard(tilePairs);\n\n //get starting milliseconds\n var startTime = Date.now();\n timer = window.setInterval(function () {\n elapsedSeconds = (Date.now() - startTime) / 1000;\n elapsedSeconds = Math.floor(elapsedSeconds);\n $('#elapsed-seconds').text(elapsedSeconds + ' seconds');\n $('#matches-found').text(matchedPairs);\n $('#remaining-pair').text(remainingPairs);\n $('#attempts-made').text(attempts);\n if (remainingPairs == 0) {\n alert('Congratulation! You have beaten the Memory Game in ' + elapsedSeconds + ' seconds'\n + ' and ' + attempts + ' attempts.\\n\\nClick Ok to Play Again and beat your score!');\n resetScoreboard();\n }\n }, 1000);\n\n $('#game-board img').click(function () {\n var clickedImg = $(this);\n var tile = clickedImg.data('tile');\n if (tile.flipped == false) {\n flipTile(tile, clickedImg);\n createTurn(tile, clickedImg);\n } else {\n alert('Please click a face-down tile')\n }\n })\n });\n}", "function loadLevel() {\r\n\tmove = true;\r\nif(currentLevel == 5){\r\n\tmove = false;\r\ndocument.getElementById(\"gameOver\").style.display = \"block\";\r\n\tconsole.log(\"You got \" + points + \" points\");\r\n\r\n}\r\n\r\n\r\n\r\n let levelMap = levels[currentLevel];\r\n let animateBoxes;\r\n let animateBoxes2;\r\n riderOn = false;\r\n endGame =true;\r\n //load board\r\n for (i = 0; i < gridBoxes.length; i++) {\r\n gridBoxes[i].className = levelMap[i];\r\n if (levelMap[i].includes(\"shark\")) currentLocationOfHorse = i;\r\n } //for\r\n\r\n animateBoxes = document.querySelectorAll(\".animate\");\r\n animateBoxes2 = document.querySelectorAll(\".animate2\");\r\n animateEnemy(animateBoxes, 0, \"right\");\r\n animateEnemy2(animateBoxes2, 0, \"right\");\r\n document.getElementById(\"welcomeScreen\").style.display = \"none\";\r\n document.getElementById(\"gameOver\").style.display = \"none\";\r\n document.getElementById(\"lose\").style.display = \"none\";\r\n\t\t\r\n} // loadLevel", "function gameOver() {\n\t\t\t\tdocument.getElementById(\"loseSound\").play();\n\t\t\t\t//Utilizza jquery per connettersi al server e aggiornare il db\n\t\t\t\t$.get(\"updateScore.php?pong=\"+score+\"\", function(data) {\n\t\t\t\t\tif(data != \"NoError \")\n\t\t\t\t\t\talert(data);\n\t\t\t\t} );\n\t\t\t\t//Resetta il punteggio e il flag playing\n\t\t\t\tscore=0;\n\t\t\t\tplaying = false;\n\t\t\t\t//Ritorno il canvas dall'html\n\t\t canvas = document.getElementById(\"pong\");\n\t\t //Lo rimuovo dal div gioco\n\t\t divGioco = document.getElementsByClassName(\"game\")[0];\n\t\t divGioco.removeChild(canvas);\n\t\t var paragraph = document.createElement(\"p\");\n\t\t paragraph.innerHTML = \"GAMEOVER\";\n\t\t paragraph.id = \"gameOver\";\n\t\t divGioco.appendChild(paragraph);\n\t\t var restartButton = document.createElement(\"button\");\n\t\t restartButton.innerHTML = \"Restart\";\n\t\t var br = document.createElement(\"br\");\n\t\t divGioco.appendChild(restartButton);\n\t\t restartButton.onclick = function() {\n\t\t \tdivGioco.removeChild(paragraph);\n\t\t divGioco.removeChild(restartButton);\n\t\t divGioco.removeChild(br);\n\t\t divGioco.removeChild(exitButton);\n\t\t divGioco.appendChild(canvas);\n\t\t main();\n\t\t };\n\t\t divGioco.appendChild(br);\n\t\t var exitButton = document.createElement(\"button\");\n\t\t exitButton.innerHTML = \"Exit\";\n\t\t divGioco.appendChild(exitButton);\n\t\t exitButton.onclick = function() {\n\t\t \twindow.location.href = \"index.php\";\n\t\t };\n }", "function clearFun() {\n totalScore = 0.0;\n numTry = 0;\n if (timer != null)\n clearTimeout(timer);\n homeScreen();\n}", "function checkLife() {\n if (lifeCounter == 0) {\n for(var i = 0; i < intervalList.length; i++) {\n window.clearInterval(intervalList[i]);\n }\n introSection.style.display = 'block';\n scoreResult.innerHTML = scoreCounter;\n playBtn.innerHTML = \"play Again\";\n gameOverMp3.play();\n happyMp3.pause();\n }\n}", "function highScorelink() {\n\tactiveDiv.classList.toggle(\"collapse\");\n\tscoreHistoryDiv.classList.toggle(\"collapse\");\n\ti = 0;\n\tsecondsLeft = 75;\n\ttimerNav.innerHTML = secondsLeft;\n\tclearInterval(timerInterval);\n\tlistofscores();\n}", "function remainingLives() {\n if (vaisseau.userData.lifes == 3) {\n lifesId.innerHTML = '&#x2665;&#x2665;&#x2665;' ;\n }else if (vaisseau.userData.lifes == 2) {\n lifesId.innerHTML = '&#x2665;&#x2665;' ;\n }else if (vaisseau.userData.lifes == 1) {\n lifesId.innerHTML = '&#x2665;' ;\n }else{\n lifesId.innerHTML = '' ;\n stopScore = false;\n gameOverId.style.display = 'block';\n restartButton.style.display = 'block';\n //une fois la partie perdue, on verifie si le score acquis est plus grand que l'actuel meilleur score\n if (vaisseau.userData.score > localStorage.getItem('bestscore')) {\n bestScoreId.innerHTML = 'Best Score : ' + vaisseau.userData.score;\n //Si le score est plus grand, il sera enregistré dans la mémoire locale du navigateur\n localStorage.setItem('bestscore', vaisseau.userData.score)\n }else if(vaisseau.userData.score <= localStorage.getItem('bestscore')){\n bestScoreId.innerHTML = 'Best Score : ' + localStorage.getItem('bestscore');\n }\n //arrete l'animanition quand on n'a plus de vies\n animationFrame.cancelAnimationFrame();\n }\n}", "function scoreboard() {\n\n var scoreboard = document.getElementById('scoreboard');\n scoreboard.innerHTML = `${score}pts.`\n if (score >= 150) {\n bugSpray();\n }\n }", "function rest(){\n document.querySelector('.dice').style.display='none';\n document.querySelector('#score-0').textContent=0;\n document.querySelector('#score-1').textContent=0;\n document.querySelector('#current-0').textContent=0;\n document.querySelector('#current-1').textContent=0;\n score=[0,0];\n count=0;\n tabdil1=0;\n document.querySelector('.player-0-panel').classList.remove('winner');\n document.querySelector('.player-1-panel').classList.remove('winner');\n document.querySelector('.player-0-panel').classList.remove('active');\n document.querySelector('.player-1-panel').classList.remove('active');\n document.querySelector('.player-0-panel').classList.add('active');\n gamePlaying=true; \n}", "function main() {\n paused = false;\n\n drawSnake();\n\n interval = setInterval(function () {\n \n changingDirection = false;\n\n if (paused == false) {\n \n clearCanvas();\n drawPickup(\"red\", \"darkred\");\n moveSnake();\n drawSnake();\n\n } else {\n \n if (dead == true) {\n $(\".over #score ul\").html(\"\");\n\n clearInterval(interval);\n save(score);\n\n // Show game-over menu here\n show(gameOverMenu, \"flex\");\n \n let sc = info.score;\n let current = false;\n\n for(let i = 0; i < sc.length; i++) {\n if(i < 6) {\n if(sc[i] == score) {\n $(\"#score ul\").append(\n `<li class=\"current_run\">\n <span class=\"score_item name\">${i + 1}. YOU</span>\n <i class=\"fas fa-arrow-right\"></i> \n <span class=\"score_item score\">${sc[i]}</span>\n </li>`);\n current = true;\n } else {\n $(\"#score ul\").append(\n `<li>\n <span class=\"score_item name\">${i + 1}. YOU</span>\n <i class=\"fas fa-arrow-right\"></i> \n <span class=\"score_item score\">${sc[i]}</span>\n </li>`);\n }\n }\n\n if(sc[i] == score && current == false) {\n $(\"#score ul\").append(`<li class=\"separator\"><i class=\"fas fa-ellipsis-h\"></i></li>`);\n $(\"#score ul\").append(\n `<li class=\"current_run\">\n <span class=\"score_item name\">${i + 1}. YOU</span>\n <i class=\"fas fa-arrow-right\"></i> \n <span class=\"score_item score\">${sc[i]}</span>\n </li>`);\n }\n }\n }\n \n }\n\n }, speed);\n}", "function resetScores()\n{\n // Hier coderen we de code om de scores te resetten\n // @TODO: Scores resetten\n}", "function doLoad()\n{\n\tsetInterval(\"refreshGames()\",5000);\n\tsetInterval(\"refreshPlayers()\",5000);\n}", "function stopRefreshTimer() {\n // Clear the timer\n if(guessesRefreshTimer != null)\n clearInterval(guessesRefreshTimer);\n\n // Reset the variable\n guessesRefreshTimer = null;\n }", "function checkForGameOver() {\r\n \r\n\r\n if (squares[pacmanCurrentIndex].classList.contains('ghost') &&\r\n !squares[pacmanCurrentIndex].classList.contains('scared-ghost')) {\r\n ghosts.forEach(ghost => clearInterval(ghost.timerId))\r\n document.removeEventListener('keyup', movePacman)\r\n scoreDisplay.innerHTML = 'GAME OVER';\r\n setTimeout(function () { alert(\"Click on NEW GAME to play again!\"); }, 500)\r\n\r\n var x = document.getElementById(\"myBtn\");\r\n x.style.display = \"block\";\r\n\r\n\r\n var oldScore = parseInt(localStorage.getItem('hScore'));\r\n //2 is my old score and current is 5\r\n if (oldScore > score) {\r\n\r\n } else {\r\n //2 > 5 false so go else\r\n localStorage.setItem('hScore', score);\r\n highestScoreDisplay.innerHTML = score;\r\n }\r\n \r\n dead.play();\r\n }\r\n }", "function resetHUD() {\n score = gscore = tick = 0;\n tTime = 60;\n timeReturn = window.setInterval(mTime, 1000);\n clearMsgs();\n}", "startWebcamGameWithScoreBoard(){\r\n this.session.put('game-event-type','webcam')\r\n $('#window').empty();\r\n $('#window').append(dom.getWebcamWindow());\r\n $('#human_score').append(`<label>`+this.localeModel.getCurrentLanguage('human')+`</label><label>`+this.gameModel.getHumanScore()+`</label>`);\r\n $('#computer_score').append(`<label>`+this.localeModel.getCurrentLanguage('computer')+`</label><label>`+this.gameModel.getComputerScore()+`</label>`);\r\n this.webcam.setupCAM();\r\n }", "function startGame(){\n scoreboard.textContent=0;\n timeUp=false;\n score=0;\n peep();\n// set a timeout so that the game ends in 10s\n setTimeout(()=>{\n timeUp=true;\n },10000);\n}", "function gameOver() {\n zetRiser(\"uit\");\n zetBoom(\"aan\");\n //stop het spel\n //stop de timer\n stopTimer(); \n //sla de score op in database\n db.transaction(function (tx) { \n /*Maak table HIGHSCORE aan */\n tx.executeSql('CREATE TABLE IF NOT EXISTS HIGHSCORES (naam, score)');\n /*Voeg content toe aan tabel */\n tx.executeSql('INSERT INTO HIGHSCORES (naam, score) VALUES (?, ?)', [\"Speler\",score]); \n\n });\n \n //toon score\n $(\"#displayScore\").text(\"Score: \" + score);\n //reset score en tijd, resets terug op 3\n reset(); \n \n //zet afbeeldingen terug \n //het pad naar load afbeeldingen\n /*var pad = \"\\img\\load.jpg\"; \n $(\".rebus\").attr('src',pad); */ \n \n \n $(\"#reset\").text(\"start\");\n $(\"#time\").text(\"Time = 60s\");\n $(\"#score\").text(\"Bombs defused = 0\");\n aantalResets = 3; \n \n}", "gameOver() {\n console.log(\"App.gameOver\");\n this.state = AppState.FINISHED_PLAYING;\n this.gameManager.updateUser(this.user);\n this.sheet.addUserStateToCurrentBoard(this.user, (response) => {\n this.refreshResults(this);\n });\n document.getElementById(\"board\").classList.add(\"unplayable\"); // kell?\n document.getElementById(\"timeLeftPar\").style.display = \"none\";\n document.getElementById(\"timeIsUp\").style.display = \"block\";\n document.getElementById(\"results\").style.display = \"block\";\n document.getElementById(\"stopButton\").style.display = \"none\";\n }", "function startGame() {\n scorePanel.moveCounter = -1;\n turnedCards = [];\n\n $(\"#congratulationModal\").modal(\"hide\");\n incrementMoveCounter();\n updateStarRating();\n displayCards(deckConfig.numberOfcards);\n\n // time control\n scorePanel.startTime = performance.now();\n scorePanel.intervalManager = setInterval(updateTime, 1000);\n}", "function restartGame() {\r\n newGame();\r\n DECK.classList.add('shake-to-shuffle');\r\n\r\n clearInterval(timer);\r\n sec = 0;\r\n document.getElementById('secondsElapsed').textContent = sec;\r\n timer = setInterval(myInterval, 1000);\r\n\r\n if (matchCardsHC.length > 0 || openCardsHC.length > 0) {\r\n resetCards();\r\n };\r\n if (movesNumber !==0) {\r\n movesNumber = 0;\r\n MOVES_NUMBER_DISPLAY.textContent = movesNumber;\r\n }\r\n if (matchedCouplesNumber !== 0) {\r\n matchedCouplesNumber = 0;\r\n MATCHED_COUPLE_DISPLAY.textContent = matchedCouplesNumber;\r\n }\r\n\r\n\r\n matchNumber++;\r\n}", "function startQuiz() {\n highscores = JSON.parse(localStorage.getItem(\"scores\"))\n\n // var highscores = localStorage.getItem(\"highScores\"); if(highscores){\n // highscores = JSON.parse(highscores); }else { highscores = []; } // loop over\n // high scores // add them to the page\n\n\n var timerInterval = setInterval(function () {\n timer.textContent = time;\n time--;\n\n if (questionIndex === questions.length) {\n\n clearInterval(timerInterval);\n\n }\n\n if (time <= 0) {\n\n clearInterval(timerInterval);\n endGame();\n\n }\n\n }, 1000);\n\n\n startcont.style.display = \"none\";\n\n showQuestions();\n\n}", "function checkForGameOver () {\n\t\tif (SQUARES[margauxCurrentIndex].classList.contains(\"bug\") && !SQUARES[margauxCurrentIndex].classList.contains(\"scared-bug\")) {\n\t\t\tbugs.forEach(bug => {\n\t\t\t\tclearInterval(bug.timerID);\n\t\t\t\tbug.timerID = NaN;});\n\t\t\tdocument.removeEventListener(\"keydown\", moveMargaux);\n\t\t\tdocument.removeEventListener(\"touchmove\", moveMargaux);\n\t\t\tdocument.documentElement.style.setProperty(\"--img\", \"url(\\\"/images/persoFace.png\\\")\");\n\t\t\tdocument.documentElement.style.setProperty(\"--img2\", \"url(\\\"/images/persoFace.png\\\")\");\n\t\t\tscoreDisplay.innerHTML = score;\n\t\t\tgameMessage.innerHTML = \"GAME OVER\";\n\t\t\tgameMessageText.innerHTML = \"Dommage... La prochaine fois sera la bonne !\";\n\t\t\tgameMessageDiv.style.display = \"block\";\n\t\t}\n\t}", "function endGame() {\n timeLeft = 0;\n finalScoreEL.textContent = score;\n timerEl.classList.add(\"d-none\");\n evalEl.classList.add(\"d-none\");\n mainEl.classList.add(\"d-none\");\n scorepageEl.classList.remove(\"d-none\");\n}", "function newGame () {\n if (timer != null) {\n clearInterval(timer);\n }\n turn = false;\n timer = null;\n difficulty = difficultyTemp;\n multiplayer = multiplayerTemp;\n document.getElementById('player').innerHTML = '1';\n p1Score = 0;\n p2Score = 0;\n updateScore(0);\n deck = getDeck();\n board = dealBoard();\n cards = ['', '', ''];\n setUINewGame();\n displayBoard();\n timerStart();\n}", "function restart(){\n\n document.getElementById('restart').innerHTML = '';\n scores[0] = 0;\n scores[1] = 0;\n board[0][0] = 4;\n board[0][1] = 4;\n board[0][2] = 4;\n board[0][3] = 4;\n board[0][4] = 4;\n board[0][5] = 4;\n board[1][0] = 4;\n board[1][1] = 4;\n board[1][2] = 4;\n board[1][3] = 4;\n board[1][4] = 4;\n board[1][5] = 4;\n turn = 1;\n displayTurn();\n populateBoard();\n}", "function reset() {\n timer = Date.now() + 30000;\n score = 0;\n $(\"#score\").html(\"Score: \" + score);\n $(\"#reset\").html(\"Reset\");\n if(!loaded) {\n loaded = true;\n loadFBX();\n }\n}", "function init() {\ngamePlaying = true;\nscores = [0, 0] ;\nroundScore = 0;\nactivePlayer = 0;\ndocument.querySelector('.dice-one').style.display = 'none';\ndocument.querySelector('.dice-two').style.display = 'none';\ndocument.getElementById('score-0').textContent = 0;\ndocument.getElementById('score-1').textContent = 0;\ndocument.getElementById('current-0').textContent = 0;\ndocument.getElementById('current-1').textContent = 0;\ndocument.getElementById('name-0').textContent = 'Player 1';\ndocument.getElementById('name-1').textContent = 'Player 2';\ndocument.querySelector('.player-0-panel').classList.remove('winner');\ndocument.querySelector('.player-1-panel').classList.remove('winner');\ndocument.querySelector('.player-0-panel').classList.remove('active');\ndocument.querySelector('.player-1-panel').classList.remove('active');\ndocument.querySelector('.player-0-panel').classList.add('active');\n}", "restart() {\n $('#player_turn').text('Red')\n const $board = $(this.selector)\n $board.empty()\n this.drop_btn()\n this.create_board()\n this.turn = 0\n this.game_over = false\n }", "function gameOver() {\n clearInterval(gamerTImerId)\n isGameOver = true;\n document.removeEventListener(\"keyup\", control)\n h1.innerHTML = \" Game over\"\n document.getElementById(\"highScore\").innerHTML = \"#Your High score is \" +\" \" + score\n stopClouds()\n \n}", "function reloadGame(skipBoard) {\n $.get(\"/games/\"+gameId, function( game, status ) {\n window.game = game;\n console.log( \"Game (status \"+status+\"):\", game);\n // --- 1: action button\n switch(game.state) {\n case \"preparing\":\n if(game.ownerId == userId) {\n // owner\n setAction(\"Start\", \"start_game\");\n } else if(userId != null) {\n if(game.players[userId] == null) {\n // not part of the game yet\n setAction(\"Join\", \"player_join\");\n } else {\n // part of the game\n setAction(\"Leave\", \"player_leave\");\n }\n } else {\n // anonymous\n setAction(\"Signin\", null);\n }\n break;\n case \"playing\":\n if(userId != null && game.players[userId] != null) {\n var selIdx = game.queue.indexOf(userId);\n if(selIdx == 0) {\n // currently queue\n setAction(\"Cancel\", \"cancel_trio\");\n } else if(selIdx > 0) {\n // in the selection queue\n $( \"#action\" ).text(\"Wait\").off(\"click\");\n } else if(game.players[userId] != null) {\n // looking for trio\n setAction(\"Trio!\", \"declare_trio\");\n }\n } else {\n // anonymous or not part of game\n setAction(\"Wait\", null);\n }\n\n break;\n case \"over\":\n if(game.ownerId == userId) {\n // owner\n setAction(\"Again\", \"restart_game\");\n } else if(userId != null) {\n setAction(\"Wait\", null);\n } else {\n // anonymous\n setAction(\"Signin\", null);\n }\n break;\n }\n\n // --- 2: players and scores\n var $scores = $(\"#scores .players\");\n $scores.empty();\n var maxScore = -1000;\n for(var playerId in game.players) {\n maxScore = Math.max(maxScore, game.scores[playerId] | 0);\n }\n for(var playerId in game.players) {\n var points = game.scores[playerId] | 0;\n var row = document.createElement(\"tr\");\n row.id = \"player_\"+playerId;\n var status = document.createElement(\"td\");\n status.className = \"status\";\n var selIdx = game.queue.indexOf(playerId);\n if(game.state == \"over\") {\n // mark winners\n if(points == maxScore) {\n row.className = \"winner\";\n }\n } else {\n if(selIdx == 0) {\n // currently selecting\n row.className = \"selecting\";\n } else if(selIdx > 0) {\n // in the selection queue\n row.className = \"waiting\";\n var rank = document.createElement(\"span\");\n rank.className = \"rank\";\n rank.innerText = selIdx;\n row.appendChild(rank);\n }\n }\n\n var name = document.createElement(\"td\");\n name.className = \"player\";\n name.innerText = game.players[playerId].name;\n var score = document.createElement(\"td\");\n score.className = \"score\";\n score.innerText = points;\n row.appendChild(status);\n row.appendChild(name);\n row.appendChild(score);\n $scores.append(row);\n }\n\n sortPlayersByScore();\n\n // --- 3: board\n if(!skipBoard) {\n var board = document.getElementById(\"board\");\n $(board).empty();\n for (var i = 0; i < game.board.length; i++) {\n var card = game.board[i];\n if (card != null) {\n board.appendChild(createCard(i, card.value));\n }\n }\n }\n\n // --- 4: deck\n $(\"#deck\").text(game.cardsLeft);\n });\n}", "function resetGame() {\r\n notes.forEach(e => {\r\n e.div.style.transition = \"1s\"\r\n e.color = \"red\"\r\n })\r\n attemptStop = true\r\n running = false\r\n\r\n // set new score\r\n if (localStorage.bestScore) {\r\n // highscore\r\n if (Number(localStorage.bestScore) < score) {\r\n localStorage.bestScore = score\r\n // type == 1 means new highscore\r\n writeBestScore(1)\r\n }\r\n // not new highscore\r\n else {\r\n writeBestScore()\r\n }\r\n\r\n }\r\n // first time played, sets new score\r\n else {\r\n localStorage.setItem(\"bestScore\", score)\r\n writeBestScore()\r\n }\r\n}", "function C999_Common_Achievements_Load() {\n\tLeaveIcon = \"\";\n LeaveScreen = \"\";\n C999_Common_Achievements_PrepareAchievements();\n\tLoadInteractions();\n\tStopTimer(7.6666667 * 60 * 60 * 1000);\n}", "function ClearGameForRestart() {\n\n //Gameboard\n gameData[mrRat.y][mrRat.x] = _GROUND;\n gameData[constantRatTrap.y][constantRatTrap.x] = _GROUND;\n\n //Clear var\n totalTimeInSec = 0;\n seconds = 0;\n\n ratTrapIndex = 0;\n\n //Rat direction. If true the index counter is counting up\n ratDirectionIsUp = true;\n\n //The count direction\n indexCountDirectionIsUp = true;\n\n //Eaten cheese count\n eatenCheese = 0;\n\n //Eaten random chesse\n eatenRandomCheese = 0;\n\n //The game just started\n isBeginingOfGame = false;\n\n //Keep track of the rat location on the board\n mrRat.x = 1;\n mrRat.y = 0;\n mrRat.direction = 'down';\n\n //Set the rat at the beginning of the game\n gameData[mrRat.y][mrRat.x] = _RAT;\n\n //Keep track of the constant rat trap location on the board\n constantRatTrap.x = 18;\n constantRatTrap.y = 13; \n\n gameData[constantRatTrap.y][constantRatTrap.x] = _CONSTANT_RAT_TRAP;\n\n //The last index of the poison\n lastPosionIndex = 20;\n\n //The last index of the cheese\n lastRandomCheeseIndex = 20;\n\n //Clear the points\n var points = document.getElementById(\"spanScore\");\n points.innerHTML = \"00000\";\n\n if (numberOfLivesLeft === 0) {\n numberOfLivesLeft = 3;\n\n var imgOne = document.getElementById(\"imgLiveNrOne\");\n var imgTwo = document.getElementById(\"imgLiveNrTwo\");\n var imgThree = document.getElementById(\"imgLiveNrThree\");\n\n imgOne.src = \"Images/Rats/rat_large.png\";\n imgTwo.src = \"Images/Rats/rat_large.png\";\n imgThree.src = \"Images/Rats/rat_large.png\";\n }\n}", "function restart() {\n clearInterval(timerId);\n clearInterval(moveTimer);\n gameIsOver = false;\n $tiles\n .show()\n .removeClass('active wrongTarget');\n $ready.show();\n $btn.show();\n lives = 5;\n $livestxt.html(lives);\n score = 0;\n $score.html(score);\n time = 30;\n $timer.html(time);\n }", "function countdown() {\n if (count === 0) {\n scoreboard();\n }\n if (count === 1) {\n scoreboard();\n }\n}", "function resetScore(){\n localStorage.removeItem('game1HighScore');\n highScoreBoard.textContent='HIGH SCORE: ' + 0;\n}", "function gameEnd(){\n\t\t\trealtime = Date.now() - starttime;\n\t\t\t// Round to 1 digit behind the comma\n\t\t\trealtime = Math.round(realtime / 1000 * 10) / 10;\n\t\t\t// Clear interval timer\n\t\t\tclearInterval(timer);\n\t\t\t$(\".info .timer .sec\").text(realtime);\n\t\t\t$(\".info .timer .sectext\").fadeIn(300);\n\t\t\t$(\"#popup-highscore b.score\").html(realtime + \" seconds\");\n\t\t\t$(\"#popup-highscore input[name=score]\").val(realtime);\n\t\t}", "function restart() {\n $(\".highScore1\").hide();\n $(\".highScore2\").hide();\n $(\".highScore3\").hide();\n $(\".playAgain\").remove();\n $(\".userhighscore\").remove();\n $(\"h1\").text(\"Test your Javascript Knowledge!\");\n $(\".scoreboardPTags\").hide();\n $(\".welcome-p\").show();\n $(\".welcome-p\").text(\"Back for another go?!\");\n $(\".welcome-p2\").show();\n $(\".welcome-p2\").text(\n \"You'll be prompted with a Javascript question with four mulitple choice answers. Click the answer you believe to be true. If you select the wrong answer you'll lose 5 seconds off your time. time starts at 60 seconds!\"\n );\n\n $(\"#startBtn\").show();\n startingTime = 60;\n questionPlusAnswer = -1;\n scoreTracker = 0;\n }", "function init(){\n scores=[0,0];\n roundScore=0;\n activePlayer=0;\n gamePlaying=true;\n document.getElementById('dice-1').style.display = 'none';\n document.getElementById('dice-2').style.display = 'none';\n document.getElementById('score-0').textContent='0';\n document.getElementById('score-1').textContent='0';\n document.getElementById('current-0').textContent='0';\n document.getElementById('current-1').textContent='0';\n document.getElementById('name-0').textContent= 'Player 1';\n document.getElementById('name-1').textContent= 'Player 2';\n document.querySelector('.player-0-panel').classList.remove('winner');\n document.querySelector('.player-1-panel').classList.remove('winner');\n document.querySelector('.player-0-panel').classList.remove('active');\n document.querySelector('.player-1-panel').classList.remove('active');\n document.querySelector('.player-0-panel').classList.add('active');\n }", "function resetScores(){\n scores.redPieceCount = 12;\n scores.blackPieceCount = 12\n scores.blackPiecesTaken = 0;\n scores.redPiecesTaken = 0;\n scores.winner = null;\n}", "function gameOver() {\n clearInterval(stopCounter);\n overlay.classList.remove(\"hide\");\n overallScore.innerText = flips;\n victoryContainer.classList.remove(\"hide\");\n}", "function allHighScores () {\n hideStartScreen.classList.add('hide');\n highScoreScreen.classList.remove('hide');\n endScreen.classList.add('hide');\n displayedQuestion.classList.add('hide');\n stopTimer();\n}", "function highScoresEndGame() {\n saveHighScores();\n originalContent.hidden = true;\n\n displayHighScoresOutput();\n clearHighScoresClass.hidden = false;\n\n highScoresPage.hidden = false;\n}", "function terminate(){\r\n var rawShootScore = parseInt(score.innerHTML);\r\n clearInterval(missile_move);\r\n missileDrop.muted = true;\r\n missile_left = 0;\r\n missile.style.display = \"none\";\r\n cannon.style.display = \"none\";\r\n tank.style.visibility = \"hidden\";\r\n score.style.visibility = \"hidden\";\r\n gameOverScreen.style.display = \"inline\";\r\n gameScore.innerHTML = \"GAME OVER!!\\nYou scored \" + Math.round(rawShootScore/75 * 100) + \"%.\";\r\n }", "gameover() {\n clearInterval(this.interval);\n this.started = false;\n this.blocks = [];\n this.frame = 0;\n this.run = 0;\n }", "function checkScores(){\n\t\t\t\t\t\t\tif (scoreResult > targetScore){\n\t\t\t\t\t\t\t\tlosses++;\n\t\t\t\t\t\t\t\tconsole.log( targetScore + \" <loss> \" + scoreResult);\n\t\t\t\t\t\t\t\tscoreBoard();\n\t\t\t\t\t\t\t\t$(\"#losses\").html('Losses: ' + losses);\n\t\t\t\t\t\t\t\talert(\"Sorry, You've LOSS!!. (\" + scoreResult + \" is over the target \" + targetScore +\") Try Again\")\n\t\t\t\t\t\t\t\tsetTimeout(resetGame,3000); // pauses the games 3 secs before resetting and displays final scores. \n\t\t\t\t\t\t\t} else if (scoreResult == targetScore){\n\t\t\t\t\t\t\t\twins++;\n\t\t\t\t\t\t\t\tconsole.log( targetScore + \" <win> \" + scoreResult)\n\t\t\t\t\t\t\t\t\t$(\"#wins\").html('Wins: ' + wins);\n\t\t\t\t\t\t\t\t\talert(\"Well Done, You've WON!!.( \" + targetScore + \" is equal to \" + scoreResult + \") Try Again\" )\n\t\t\t\t\t\t\t\t\tsetTimeout(resetGame, 3000); // pauses the games 3 secs before resetting and displays final scores.\n\t\t\t\t\t\t\t} else {}\n\t\t} // closeof function checkScores", "function checkForWin() {\r\n console.log(score);\r\n if (score === 274) {\r\n ghosts.forEach(ghost => clearInterval(ghost.timerId))\r\n document.removeEventListener('keyup', movePacman)\r\n // setTimeout(function () { alert(\"You have WON!\"); }, 500)\r\n winning.play();\r\n var img = document.createElement(\"img\");\r\n img.src = \"./images/youwin.jpg\";\r\n // var imgClass = document.getElementsByClassName(\"grid\")\r\n var src = document.getElementById(\"win\");\r\n src.innerHTML = \"\";\r\n src.appendChild(img);\r\n\r\n var x = document.getElementById(\"myBtn\");\r\n x.style.display = \"block\";\r\n\r\n var oldScore = parseInt(localStorage.getItem('hScore'));\r\n if (oldScore > score) {\r\n } else {\r\n localStorage.setItem('hScore', score);\r\n highestScoreDisplay.innerHTML = score;\r\n }\r\n \r\n }\r\n }" ]
[ "0.67429125", "0.6598286", "0.654588", "0.64863074", "0.6381481", "0.6356312", "0.62945443", "0.6277964", "0.62753737", "0.6270995", "0.6263602", "0.6252848", "0.62359345", "0.62089753", "0.61955774", "0.6189881", "0.61882865", "0.6148888", "0.61374825", "0.61360276", "0.612507", "0.61064637", "0.60981977", "0.6094381", "0.60764265", "0.60688514", "0.6065393", "0.60579413", "0.60512006", "0.60397327", "0.6037184", "0.60305876", "0.6028272", "0.60146105", "0.6010644", "0.6009624", "0.6006646", "0.6004728", "0.60044545", "0.600312", "0.6001193", "0.5997123", "0.59911853", "0.5989089", "0.5988344", "0.598795", "0.59813315", "0.5981272", "0.59751296", "0.5951994", "0.5945198", "0.5943828", "0.59404945", "0.59380484", "0.5936341", "0.5931586", "0.59273845", "0.59240645", "0.5921731", "0.59209466", "0.5913576", "0.59068155", "0.59057313", "0.5904187", "0.59033906", "0.59026366", "0.5896433", "0.5894371", "0.58903354", "0.58864105", "0.5884062", "0.587663", "0.58747846", "0.5874144", "0.5872917", "0.5868711", "0.586428", "0.5863592", "0.586342", "0.58617276", "0.5859207", "0.5859088", "0.5855019", "0.5854773", "0.5852493", "0.58461", "0.58456606", "0.5841348", "0.5840585", "0.58376837", "0.58307844", "0.58280957", "0.5827782", "0.582596", "0.58182675", "0.58174634", "0.5815956", "0.58114624", "0.58077717", "0.5805697" ]
0.6020974
33
end function / ======================= /loadScoreboardPregame ======================= / ======================= loadScoreboardInGame =======================
function loadScoreboardInGame() { $.ajaxSetup({ cache: true}); $.getJSON("http://data.nba.com/data/v2015/json/mobile_teams/nba/2016/scores/gamedetail/" + gameID + "_gamedetail.json", function(data){ var gamestatus = data.g["stt"]; var clock = data.g["cl"]; if (cavsHOME == 1){ var oppBox = data.g.vls["s"]; var cavsBox = data.g.hls["s"]; } else { var oppBox = data.g.hls["s"]; var cavsBox = data.g.vls["s"]; } if (gamestatus == "Halftime" || gamestatus == "Final") { var status = gamestatus; } else { var status = clock + ' - '+ gamestatus; //clock + ' - '+ gamestatus } document.getElementById("opp-score").innerHTML=oppBox; document.getElementById("cavs-score").innerHTML=cavsBox; document.getElementById("api-gameday").innerHTML=status; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "load() {\n if (!!this.saveArray) {\n this.board = this.saveArray[0];\n this.currentColour = this.saveArray[1];\n this.currentColour == 'white' ? this.otherColour = 'black' : this.otherColour = 'white';\n this.displayBoard();\n console.log(\"game loaded\");\n }\n }", "function loadGameScreen () {\n /* reset all of the player's states */\n for (var i = 1; i < players.length; i++) {\n gameDisplays[i-1].reset(players[i]);\n }\n $gameLabels[HUMAN_PLAYER].removeClass(\"loser tied current\");\n clearHand(HUMAN_PLAYER);\n\n previousLoser = -1;\n recentLoser = -1;\n gameOver = false;\n\n $gamePlayerCardArea.show();\n $gamePlayerCountdown.hide();\n $gamePlayerCountdown.removeClass('pulse');\n chosenDebug = -1;\n updateDebugState(showDebug);\n \n /* randomize start lines for characters using legacy start lines.\n * The updateAllBehaviours() call below will override this for any\n * characters using new-style start lines.\n *\n * Also go ahead and commit any marker updates from selected lines.\n */\n players.forEach(function (p) {\n if(p.chosenState) {\n p.commitBehaviourUpdate();\n }\n }.bind(this));\n\n updateAllBehaviours(null, null, GAME_START);\n updateBiggestLead();\n\n /* set up the poker library */\n setupPoker();\n preloadCardImages();\n\n /* disable player cards */\n for (var i = 0; i < $cardButtons.length; i++) {\n $cardButtons[i].attr('disabled', true);\n }\n\n /* enable and set up the main button */\n allowProgression(eGamePhase.DEAL);\n}", "function loadGameScreen(data){\r\n\t\t\t$('#container1').hide(); \r\n\t\t\t\t$('body').css(\"background-color\", \"white\");\r\n\t\t\t\t$('#boxes').show();\r\n\t\t\t\tmessage.autosize();\r\n\t\t\t\t// if current letters is a non-empty string, hide start game div & display letters\r\n\t\t\t\tif(data.game.state === 'active'){\r\n\t\t\t\t\t// if current letters, then game has started so hide the startgame\r\n\t\t\t\t\tstartGameDiv.hide();\r\n\t\t\t\t\thints.masonry('reload');\r\n\t\t\t\t} else{\r\n\t\t\t\t\t$introText.html(data.game.message);\r\n\t\t\t\t\t// game has not yet started\r\n\t\t\t\t\tsendHintDiv.hide();\r\n\t\t\t}\r\n\t\t}", "function loadGame(){\n\tgame = getJSON(\"http://navy.hulu.com/[email protected]\");\n\tboard = [];\n\t\n\t// Display game information\n\twriteToConsole(\"GAME ID = \" + game.game_id);\n\twriteToConsole(\"SHIPS = [\" + game.ship_sizes + \"]\");\n\twriteToConsole(\"BOARD = (\" + game.board_size.width + \", \" + game.board_size.height + \")\");\n\t\n\t// Intialize board to default values\n\tfor(var w=0; w<game.board_size.width; w++){\n\t\tboard[w] = [];\n\t\tfor(var h=0; h<game.board_size.height; h++){\n\t\t\tboard[w][h]=0;\t\t// signifies uninspected\n\t\t}\n\t}\n\t\n\tships = game.ship_sizes;\n\t\n\traiseSuccess(\"Game intialized\");\n}", "loadGame(p1Name, p2Name) {\n body[0].innerHTML = this._boardHTML;\n const player1Highlight = document.getElementById('player1');\n const player2Highlight = document.getElementById('player2');\n const boardSpaces = document.querySelectorAll('.box');\n player1Highlight.classList.add('active');\n\n //Conditional statements check if the players have entered a name and displays them if they have\n //otherwise, the 'X' and 'O' graphic will be displayed by default.\n if (p1Name.length > 0) {\n player1Highlight.innerText = p1Name;\n }\n if (p2Name.length > 0) {\n player2Highlight.innerText = p2Name;\n }\n\n //Loops through all board spaces and applies the class of 'free' indicated it is an empty space\n for (let i = 0; i < boardSpaces.length; i++) {\n boardSpaces[i].id = i;\n boardSpaces[i].classList.add('free');\n }\n }", "function loadGame(){\n\t// images\n\tbgImage.src = \"images/backgframe_480.jpg\";\n\tdude.src = \"images/person.png\";\n\tscrollImage.src = \"images/scroll.png\";\n\t\n\t// required buttons\n \tpauseButtonImage.src = \"images/gmenub1.png\";\n\t\n \tpauseButtonImage2.src = \"images/gpauseButton.png\";\n\t\n\t// test buttons (debugging)\n \tgenerateButtonImage.src = \"images/button.png\";\n\tvictoryButtonImage.src = \"images/button.png\";\n\taddscoreButtonImage.src = \"images/button.png\";\n\taddGameOverButtonImage.src = \"images/button.png\";\n\n\t/*// turn off main menu music\n\tmusicOn = false;\n\tmusic.pause();*/\n\t\n\tinitGameSetting(); //rules.js\n}", "function loadScoreboardPregame() {\n\n $.ajaxSetup({ cache: true});\n \n $.getJSON(\"http://data.nba.com/data/v2015/json/mobile_teams/nba/2016/teams/cavaliers_schedule_\" + seasontype + \".json\", \n function(data){\n\n var game = data.gscd.g;\n var status = game[gamenum].st;\n var status = game[gamenum].st;\n\n var cavsscore;\n var oppscore;\n\n if (cavsHOME == 1){\n cavsscore = game[gamenum].h[\"re\"];\n oppscore = game[gamenum].v[\"re\"];\n } else {\n cavsscore = game[gamenum].v[\"re\"];\n oppscore = game[gamenum].h[\"re\"];\n }\n\n \n document.getElementById(\"opp-score\").innerHTML=\"2-1\";\n document.getElementById(\"cavs-score\").innerHTML=\"3-0\"; \n\n });\n\n}", "function onload()\r\n{\r\n\tcomputerwins=0;\r\n\tplayerwins=0;\r\n\tnodraws=0;\r\n\tplayername=\"player\";\r\n\tresetboard();\r\n\tstartgame();\r\n}", "function buildScoreBoardCanvas(){\n\tif(!displayScoreBoard){\n\t\treturn;\t\n\t}\n\t\n\t//buttons\n\tresultContainer.removeChild(replayButton);\n\t\n\tbuttonReplay = new createjs.Bitmap(loader.getResult('iconReplay'));\n\tcenterReg(buttonReplay);\n\tcreateHitarea(buttonReplay);\n\tsaveButton = new createjs.Bitmap(loader.getResult('iconSave'));\n\tcenterReg(saveButton);\n\tcreateHitarea(saveButton);\n\tscoreboardButton = new createjs.Bitmap(loader.getResult('iconScoreboard'));\n\tcenterReg(scoreboardButton);\n\tcreateHitarea(scoreboardButton);\n\t\n\tresultContainer.addChild(buttonReplay, saveButton, scoreboardButton);\n\t\n\t//scoreboard\n\tscoreBoardContainer = new createjs.Container();\n\tbgScoreboard = new createjs.Bitmap(loader.getResult('bgScoreboard'));\n\t\n\tscoreTitle = new createjs.Text();\n\tscoreTitle.font = \"80px bariol_regularregular\";\n\tscoreTitle.color = \"#ffffff\";\n\tscoreTitle.text = scoreBoardTitle;\n\tscoreTitle.textAlign = \"center\";\n\tscoreTitle.textBaseline='alphabetic';\n\tscoreTitle.x = canvasW/2;\n\tscoreTitle.y = canvasH/100*14;\n\t\n\tscoreBackTxt = new createjs.Text();\n\tscoreBackTxt.font = \"50px bariol_regularregular\";\n\tscoreBackTxt.color = \"#ffffff\";\n\tscoreBackTxt.text = scoreBackText;\n\tscoreBackTxt.textAlign = \"center\";\n\tscoreBackTxt.textBaseline='alphabetic';\n\tscoreBackTxt.x = canvasW/2;\n\tscoreBackTxt.y = canvasH/100*95;\n\tscoreBackTxt.hitArea = new createjs.Shape(new createjs.Graphics().beginFill(\"#000\").drawRect(-200, -30, 400, 40));\n\tscoreBoardContainer.addChild(bgScoreboard, scoreTitle, scoreBackTxt);\n\t\n\tvar scoreStartY = canvasH/100*23;\n\tvar scoreSpanceY = 49.5;\n\tfor(scoreNum=0;scoreNum<=10;scoreNum++){\n\t\tfor(scoreColNum=0;scoreColNum<score_arr.length;scoreColNum++){\n\t\t\t$.scoreList[scoreNum+'_'+scoreColNum] = new createjs.Text();\n\t\t\t$.scoreList[scoreNum+'_'+scoreColNum].font = \"35px bariol_regularregular\";\n\t\t\t$.scoreList[scoreNum+'_'+scoreColNum].color = \"#ffffff\";\n\t\t\t$.scoreList[scoreNum+'_'+scoreColNum].textAlign = score_arr[scoreColNum].align;\n\t\t\t$.scoreList[scoreNum+'_'+scoreColNum].textBaseline='alphabetic';\n\t\t\t$.scoreList[scoreNum+'_'+scoreColNum].x = canvasW/100 * score_arr[scoreColNum].percentX;\n\t\t\t$.scoreList[scoreNum+'_'+scoreColNum].y = scoreStartY;\n\t\t\t\n\t\t\tif(scoreColNum == 0){\n\t\t\t\t//position\n\t\t\t\t$.scoreList[scoreNum+'_'+scoreColNum].text = scoreRank_arr[scoreNum-1];\t\n\t\t\t}\n\t\t\t\n\t\t\tif(scoreNum == 0){\n\t\t\t\t$.scoreList[scoreNum+'_'+scoreColNum].text = score_arr[scoreColNum].col;\t\n\t\t\t}\n\t\t\t\n\t\t\tscoreBoardContainer.addChild($.scoreList[scoreNum+'_'+scoreColNum]);\n\t\t}\n\t\tscoreStartY += scoreSpanceY;\n\t}\n\t\n\tscoreBoardContainer.visible = false;\n\tcanvasContainer.addChild(scoreBoardContainer);\n\t\n\t$.get('submit.html', function(data){\n\t\t$('#canvasHolder').append(data);\n\t\tbuildScoreboardButtons();\n\t\ttoggleSaveButton(true);\n\t\tresizeScore();\n\n\t});\n}", "function initGameBoard() {\n\t\tvar totalPlayer = game.getPlayerCount();\n\t\t$('.rubblish').hide();\n\t\t$('.rubblishBin').hide();\t\t\n\t\tfor(var i = 1; i < totalPlayer; i++) {\n\t\t\t$('#player'+ (i+1) +'-holder').hide();\n\t\t\t$('#player'+ (i+1) +'-cardNumber').hide();\n\t\t\t$('#player'+ (i+1) +'-CrystalArea').hide();\n\t\t}\n\t\t$('#player1-holder').hide();\n\t\t$('#player1-CrystalArea').hide();\n\t\t$('#Pass').hide();\n\t\t$('.rubblishBin').fadeIn(800);\n\t\t\n\t\tui.lockNewGame(true);\n\t\tclearCardHolders();\n\t\t\n\t\tvar map = playerMap[totalPlayer];\n\n\t\t// Set the player title on the game board\n\t\tvar counter = 0;\n\t\tfor(var i = 0; i < 4; i++) {\n\t\t\tvar title = $('#player' + (i + 1) + '-title');\n\t\t\tif(i <= totalPlayer) {\n\t\t\t\tif(map[counter] === (i + 1)) {\n\t\t\t\t\ttitle.html('Player ' + (counter + 1));\n\t\t\t\t\tcounter++;\n\t\t\t\t} else {\n\t\t\t\t\ttitle.html('');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttitle.html('');\n\t\t\t}\n\t\t}\n\n\t\taddCardToStockPile();\n\n\t\t// Add cards for human player\n\t\tvar cardArray = game.getPlayerCards(0);\n\t\tvar cardNumber = cardArray.length;\n\t\tfor(var i = 0; i < cardNumber; i++) {\n\t\t\tui.addCardToHumanPlayerTray(cardArray[i]);\n\t\t}\n\n\t\t// Add 4 cards for computer players\n\t\tfor(var i = 1; i < totalPlayer; i++) {\n\t\t\tui.initCardToComputerPlayerTray(i, 4);\n\t\t\tvar holder = document.getElementById('player' + map[i] + '-cardNumber');\n\t\t\tholder.innerHTML=\"X \" + game.getPlayerCardNumber(i);\n\t\t\tvar j = i - 1;\n\t\t\t$('#player'+ (i+1) +'-holder').delay(((i*800)+(j*800))).fadeIn(800);\n\t\t\t$('#player'+ (i+1) +'-cardNumber').delay(((i*800)+(j*800))).fadeIn(800);\n\t\t\t$('#player'+ (i+1) +'-CrystalArea').delay((((i*800)+800)+(j*800))).fadeIn(800);\n\t\t}\n\n\t\tui.lockNewGame(false);\n\t\t$('#player1-holder').delay(5600).fadeIn(800);\n\t\t$('#player1-CrystalArea').delay(5600).fadeIn(800);\n\t\t$('#Pass').delay(5600).fadeIn(800);\n\t\tui.showToast('Hello! It&rsquo;s your turn now. Please play a card.');\n\t\t$('#toast').hide();\n\t\t$('#toast').delay(6400).fadeIn('fast');\n\t\t\n\t}", "function LoadGame() {\n\t// Your code goes here for loading a game\n\tprint(\"Complete this method in Singleplayer.js\");\n}", "function loadLevel() {\r\n\tmove = true;\r\nif(currentLevel == 5){\r\n\tmove = false;\r\ndocument.getElementById(\"gameOver\").style.display = \"block\";\r\n\tconsole.log(\"You got \" + points + \" points\");\r\n\r\n}\r\n\r\n\r\n\r\n let levelMap = levels[currentLevel];\r\n let animateBoxes;\r\n let animateBoxes2;\r\n riderOn = false;\r\n endGame =true;\r\n //load board\r\n for (i = 0; i < gridBoxes.length; i++) {\r\n gridBoxes[i].className = levelMap[i];\r\n if (levelMap[i].includes(\"shark\")) currentLocationOfHorse = i;\r\n } //for\r\n\r\n animateBoxes = document.querySelectorAll(\".animate\");\r\n animateBoxes2 = document.querySelectorAll(\".animate2\");\r\n animateEnemy(animateBoxes, 0, \"right\");\r\n animateEnemy2(animateBoxes2, 0, \"right\");\r\n document.getElementById(\"welcomeScreen\").style.display = \"none\";\r\n document.getElementById(\"gameOver\").style.display = \"none\";\r\n document.getElementById(\"lose\").style.display = \"none\";\r\n\t\t\r\n} // loadLevel", "function startScoreboard(){\n try {\n runScoreboard();\n }\n catch (e){\n alert(\"Error: \" + e + \"\\n\");\n console.error(e.stack);\n }\n}", "loadGame(gameState) {\n this.gameState.score = gameState.score;\n this.gameState.won = gameState.won;\n this.gameState.over = gameState.over;\n this.gameState.board = gameState.board;\n }", "function loadGame() {\n ticTacToeBoard.createBoard();\n loadStatus();\n loadHistory();\n //display to index.htm\n document.getElementById(\"game\").innerHTML = ticTacToeBoard.displayBoard();\n}", "function loadScore() {\n\tlevel1TopScore = Number(localStorage.getItem(\"level1TopScore\"));\n\tlevel2TopScore = Number(localStorage.getItem(\"level2TopScore\"));\n\tif (level2TopScore == null) {\n\t\tlevel2TopScore = 0;\n\t}\n\tif (level == 1) {\n\t\ttopScore = level1TopScore;\n\t} else {\n\t\ttopScore = level2TopScore;\n\t}\n\tdocument.getElementById(\"content-score\").innerHTML = \"<h4>HIGH SCORE</h4> <p>\" + topScore + \"</p>\"\n}", "function showScoreBoard() {\n let title = level >= 15 ? 'Congrats, you won!' : 'Ah, you lost!',\n titleX = level >= 15 ? 152 : 220,\n titleY = 280,\n totalScore = level * 60 + GemsCollected.blue * 30 + GemsCollected.green * 40 + GemsCollected.orange * 50,\n scoreBoard = Resources.get('images/score-board.jpg'),\n starResource = Resources.get('images/Star.png'),\n gemBlueResource = Resources.get('images/Gem-Blue.png'),\n gemGreenResource = Resources.get('images/Gem-Green.png'),\n gemOrangeResource = Resources.get('images/Gem-Orange.png'),\n offset = 70;\n // Draw image assets\n ctx.drawImage(scoreBoard, (canvas.width - scoreBoard.width) / 2, (canvas.height - scoreBoard.height - offset) / 2);\n ctx.drawImage(starResource, 175, 260 - offset, starResource.width / 1.5, starResource.height / 1.5);\n ctx.drawImage(gemBlueResource, 180, 345 - offset, gemBlueResource.width / 1.8, gemBlueResource.height / 1.8);\n ctx.drawImage(gemGreenResource, 180, 425 - offset, gemGreenResource.width / 1.8, gemGreenResource.height / 1.8);\n ctx.drawImage(gemOrangeResource, 180, 505 - offset, gemOrangeResource.width / 1.8, gemOrangeResource.height / 1.8);\n // Draw text\n ctx.font = \"50px Gaegu\";\n ctx.fillStyle = \"#fff\";\n ctx.strokeStyle = \"#000\";\n ctx.lineWidth = 3;\n ctx.strokeText(title, titleX, titleY - offset);\n ctx.fillText(title, titleX, titleY - offset);\n ctx.font = \"45px Gaegu\";\n ctx.strokeText(level + ' x 60 = ' + level * 60, 270, 340 - offset);\n ctx.fillText(level + ' x 60 = ' + level * 60, 270, 340 - offset);\n ctx.strokeText(GemsCollected.blue + ' x 30 = ' + GemsCollected.blue * 30, 270, 420 - offset);\n ctx.fillText(GemsCollected.blue + ' x 30 = ' + GemsCollected.blue * 30, 270, 420 - offset);\n ctx.strokeText(GemsCollected.green + ' x 40 = ' + GemsCollected.green * 40, 270, 500 - offset);\n ctx.fillText(GemsCollected.green + ' x 40 = ' + GemsCollected.green * 40, 270, 500 - offset);\n ctx.strokeText(GemsCollected.orange + ' x 50 = ' + GemsCollected.orange * 50, 270, 580 - offset);\n ctx.fillText(GemsCollected.orange + ' x 50 = ' + GemsCollected.orange * 50, 270, 580 - offset);\n ctx.strokeText('_______', 270, 640 - offset);\n ctx.fillText('_______', 270, 640 - offset);\n ctx.strokeText('Total: ' + totalScore.toString(), 270, 640 - offset);\n ctx.fillText('Total: ' + totalScore.toString(), 270, 640 - offset);\n ctx.strokeText('Spacebar to restart', 170, 680);\n ctx.fillText('Spacebar to restart', 170, 680);\n }", "function viewHighScoresScreen(){\n if (saveDatabase.length === 0){\n loadUserScores();\n }\n clearScreen();\n highScoresStyle();\n}", "function prepareBoard(){\n // Retreive the high score from localStorage and update the field\n updateHighScore(highScore)\n // TODO: after every board button click, remember the gameState and retrieve\n // it from localStorage on page load to then fill in\n}", "function init() {\r\n scores = [0, 0, 0];\r\n activePlayer = 1;\r\n roundScore = 0;\r\n gamePlaying = true;\r\n \r\n document.querySelector('.dice-2').style.display = 'none';\r\n document.querySelector('.dice-6').style.display = 'none';\r\n document.querySelector('.btn-roll').style.display = 'none';\r\n document.querySelector('.btn-start').style.display = 'none';\r\n\r\n //Set the board to initial position:\r\n document.getElementById('current-1').textContent = '0';\r\n document.getElementById('current-2').textContent = '0';\r\n document.getElementById('score-1').textContent = '00';\r\n document.getElementById('score-2').textContent = '00';\r\n document.getElementById('name-1').textContent = 'Player 1';\r\n document.getElementById('name-2').textContent = 'Player 2';\r\n document.querySelector('.player-1-board').classList.remove('winner');\r\n document.querySelector('.player-2-board').classList.remove('winner');\r\n document.querySelector('.player-1-board').classList.remove('active');\r\n document.querySelector('.player-2-board').classList.remove('active');\r\n document.querySelector('.player-1-board').classList.add('active');\r\n}", "function scoreboard(server_dict_varData) {\n let pt_div = document.getElementById(\"playType\");\n if (!user.isBattle && !user.isDerby && pt_div.style.backgroundColor !== \"limegreen\") { //normal\n pt_div.style.backgroundColor = \"limegreen\";\n pt_div.style.fontFamily = \"geneva\";\n pt_div.style.lineHeight = \"42px\";\n pt_div.innerHTML = \"Normal\";\n } else if (user.isBattle && pt_div.innerHTML !== \"Battle!!\") {\n pt_div.style.backgroundColor = \"deepskyblue\";\n pt_div.style.fontFamily = \"geneva\";\n pt_div.style.lineHeight = \"42px\";\n pt_div.innerHTML = \"Battle!!\";\n } else if (user.isDerby && !user.isBattle && pt_div.innerHTML !== \"Derby!\") {\n pt_div.style.backgroundColor = \"blueviolet\";\n pt_div.style.fontFamily = \"geneva\";\n pt_div.style.lineHeight = \"42px\";\n pt_div.innerHTML = \"Derby!\";\n }\n for (let key in user.dict_varData) { //still in update\n if (server_dict_varData[key][1] !== user.dict_varData[key][1]) {\n let div_ = document.getElementById(\"sb_\" + key);\n if (server_dict_varData[key][1]) {\n div_.style.backgroundColor = \"green\";\n } else {\n div_.style.backgroundColor = \"red\";\n }\n }\n //whos turn update\n if (server_dict_varData[key][2] !== user.dict_varData[key][2] || server_dict_varData[key][4] !== user.dict_varData[key][4]) {\n let div_ = document.getElementById(\"sb_\" + key);\n if (server_dict_varData[key][4]) {\n div_.style.borderStyle = \"solid\";\n div_.style.borderWidth = \"5px\";\n div_.style.borderColor = \"orange\";\n\n } else if (server_dict_varData[key][2]) {\n div_.style.borderStyle = \"solid\";\n div_.style.borderWidth = \"5px\";\n div_.style.borderColor = \"gold\";\n } else {\n div_.style.borderStyle = \"solid\";\n div_.style.borderWidth = \"2px\";\n div_.style.borderColor = \"black\";\n }\n }\n //cards in hand and score update\n if (server_dict_varData[key][0] !== user.dict_varData[key][0] || server_dict_varData[key][3] !== user.dict_varData[key][3] ) {\n let div_ = document.getElementById(\"sb_\" + key);\n if (key === user.username) { //players name and score\n div_.innerHTML = \"<span style=color:white>\" + key + \"</span> <br />\" + \"Cards: \" + server_dict_varData[key][0] + \"<br />\" + \"score: \" + server_dict_varData[key][3];\n } else {\n div_.innerHTML = key + \"<br />\" + \"Cards: \" + server_dict_varData[key][0] + \"<br />\" + \"score: \" + server_dict_varData[key][3];\n }\n\n }\n }\n}", "function load_game(){\n $.ajax({\n type: \"POST\",\n url: \"backend/load.php\",\n data: {\n },\n dataType: \"text\",\n success: function (d) {\n console.log(\"Game Loaded Successfully\")\n console.log(d)\n var result = $.parseJSON(d);\n board = result[0];\n activeBlock = result[1];\n activeBlock.shapeMatrix = GenerateShape((activeBlock.shapeMatrix - 1) * 10);\n activeBlock.rotation = activeBlock[\"rotation\"]\n for (var i = 0; i < activeBlock.rotation; i++){\n Rotate(-1);\n }\n EraseOldActiveBlockPosition();\n nextBlock[\"shapeMatrixNum\"] = result[2];\n nextBlock.shapeMatrix = GenerateShape((nextBlock.shapeMatrixNum - 1) * 10);\n var other_vars = result[3];\n boardHeight = other_vars[\"boardHeight\"];\n boardWidth = other_vars[\"boardWidth\"];\n changePowerups = other_vars[\"changePowerups\"];\n level = other_vars[\"level\"];\n player_name = other_vars[\"player_name\"];\n score = other_vars[\"score\"];\n\n $('#NewGame').click();\n },\n error: function (error) {\n console.log(\"Error in ajax call for get_high_scores\")\n console.log(error)\n }\n });\n}", "function gameOver() {\n zetRiser(\"uit\");\n zetBoom(\"aan\");\n //stop het spel\n //stop de timer\n stopTimer(); \n //sla de score op in database\n db.transaction(function (tx) { \n /*Maak table HIGHSCORE aan */\n tx.executeSql('CREATE TABLE IF NOT EXISTS HIGHSCORES (naam, score)');\n /*Voeg content toe aan tabel */\n tx.executeSql('INSERT INTO HIGHSCORES (naam, score) VALUES (?, ?)', [\"Speler\",score]); \n\n });\n \n //toon score\n $(\"#displayScore\").text(\"Score: \" + score);\n //reset score en tijd, resets terug op 3\n reset(); \n \n //zet afbeeldingen terug \n //het pad naar load afbeeldingen\n /*var pad = \"\\img\\load.jpg\"; \n $(\".rebus\").attr('src',pad); */ \n \n \n $(\"#reset\").text(\"start\");\n $(\"#time\").text(\"Time = 60s\");\n $(\"#score\").text(\"Bombs defused = 0\");\n aantalResets = 3; \n \n}", "function init_scoreboard() {\n\tvar tbody = document.getElementsByTagName('tbody')[0];\n\tvar str = '';\n\t\n\t// create rows \n\tfor (var i = 0; i < rows.length; i++) {\n\t\tvar row = rows[i];\n\t\tvar team = row[1];\n\t\tvar name = team[1];\n\t\tif(team.length >= 3){\n\t\t\tname = team[2] + ' ( ' + name + ' )';\n\t\t}\n\t\tstr += '<tr><td>' + row[0] + '</td>' +\n '<td class=\"team\" data=\"' + row[4] + '\">' +\n generateSchoolLogo(team[3]) +\n '<div class=\"team-name-school\">' + name +\n generateRemark(team[4]) +\n '<span class=\"muted\">' + team[0] + '</span></div></td>' +\n '<td>' + row[2] + '</td><td>' + row[3] + '</td>';\n\t // problems cols\n\t\tfor (var j = 5; j < row.length - 1; j++){\n\t\t\tvar prob = row[j];\n\t\t\tif (prob != 0) {\n\t\t\t\tvar score = prob[0].split('/');\n\t\t\t\tvar cls = prob[1] ? ' class=\"' + prob[1] + '\"' : '';\n\t\t\t\tvar dat = score[2] ? ' data=\"' + score[2] + '\"' : '';\n\t\t\t\tstr += '<td' + cls + dat + '>' + \n\t\t\t\t\tscore[0] + '<span class=\"muted\"> ' + score[1] + '</span></td>';\n\t\t\t}\n\t\t\telse\n\t\t\t\t// space before -- is necessary\n\t\t\t\tstr += '<td>0<span class=\"muted\"> --</span></td>'; \n\t\t}\n\n\t\t// att/solv col\n\t\tvar att = row[j][0].split('/');\n\t\tstr += '<td>' + att[0] + '<br>' + att[1] + '</td>';\n\t}\n\ttbody.innerHTML = str + tbody.innerHTML;\n}", "function gameOver(){\n\t\t\t//----遊戲結束,儲存分數----\n\t\t\tvar score = {\n\t\t\t\t'type' : 12,\n\t\t\t\t'school' : school,\n\t\t\t\t'name' : name,\n\t\t\t\t'score' : userScore\n\t\t\t}\n\t\t\t$.post(\"http://localhost/fc/barroco/index.php/api/insert_score\", score, function(data){\n\t\t\t\tconsole.log(\"儲存分數\");\n\t\t\t\t//----api要前十排行榜----\n\t\t\t\tvar scoreDatas;\n\t\t\t\t$.get(\"http://localhost/fc/barroco/index.php/api/rank?type=12\", function(data2){\n\t\t\t\t\tscoreDatas = JSON.parse(data2);\n\t\t\t\t\tconsole.log(scoreDatas);\n\t\t\t\t\tscoreList(scoreDatas,name,school);\n\t\t\t\t});\n\t\t\t\t//----api要前十排行榜----\n\t\t\t});\n\t\t\t//----遊戲結束,儲存分數----\n\t\t}", "function gameLoaded() {\n\t\t$('#loading').hide();\n\t\t$('#bg-images').append('<img id=\"bg-image\" src=\"images/bg_init.jpg\">');\n\t\t$('#intro-screen').slideDown();\n\n\t\t//Add level select\n\t\tfor (var i in levels) {\n\t\t\tvar ln = 1 + (i * 1);\n\t\t\t$('#levels').append('<div id=\"level-' + ln +'\" class=\"level\" data-level=\"' + ln +'\">Level ' + ln +' <br><span class=\"level-title\">'+ levels[i]['title'] +'</span></div>');\n\t\t}\n\n\t\t$('.level').click(function(){\n\t\t\t$('#levels').hide();\n\t\t\tvar level = $(this).data('level');\n\t\t\trenderLevel(level-1);\n\t\t});\n\n\t\t$('#next-level').click(function() {\n\t\t\trenderLevel(current_level +1);\n\t\t});\n\n\t\t$('#share-fb').click(function() {\n\t\t\tshareScoreToFacebook(score);\n\t\t});\n\n\t\t$('#share-tw').click(function() {\n\t\t\tshareScoreToTwitter(score);\n\t\t});\n\n\t\t$('#play-it-again').click(function() {\n\t\t\twindow.location.reload();\n\t\t});\n\t}", "function scoreboard() {\n\n var scoreboard = document.getElementById('scoreboard');\n scoreboard.innerHTML = `${score}pts.`\n if (score >= 150) {\n bugSpray();\n }\n }", "function startScoreboard(){\n try {\n runScoreboard();\n }\n catch (e){\n alert(\"Error: \" + e + \"\\n\");\n }\n}", "startWebcamGameWithScoreBoard(){\r\n this.session.put('game-event-type','webcam')\r\n $('#window').empty();\r\n $('#window').append(dom.getWebcamWindow());\r\n $('#human_score').append(`<label>`+this.localeModel.getCurrentLanguage('human')+`</label><label>`+this.gameModel.getHumanScore()+`</label>`);\r\n $('#computer_score').append(`<label>`+this.localeModel.getCurrentLanguage('computer')+`</label><label>`+this.gameModel.getComputerScore()+`</label>`);\r\n this.webcam.setupCAM();\r\n }", "loadGame() {\n alert(\"Loading saved game!\");\n tiles = []; // empty tile array\n numPiecesChosen = []; // reset\n numPiecesMatched = 0;\n $(\".wrapper\").empty(); // clear everything\n this.currentBoard = new Board();\n this.currentBoard.loadBoard(function() {\n current.currentBoard.renderTiles(function() {\n current.addFlip(current);\n });\n });\n }", "function checkScores(){\n\t\t\t\t\t\t\tif (scoreResult > targetScore){\n\t\t\t\t\t\t\t\tlosses++;\n\t\t\t\t\t\t\t\tconsole.log( targetScore + \" <loss> \" + scoreResult);\n\t\t\t\t\t\t\t\tscoreBoard();\n\t\t\t\t\t\t\t\t$(\"#losses\").html('Losses: ' + losses);\n\t\t\t\t\t\t\t\talert(\"Sorry, You've LOSS!!. (\" + scoreResult + \" is over the target \" + targetScore +\") Try Again\")\n\t\t\t\t\t\t\t\tsetTimeout(resetGame,3000); // pauses the games 3 secs before resetting and displays final scores. \n\t\t\t\t\t\t\t} else if (scoreResult == targetScore){\n\t\t\t\t\t\t\t\twins++;\n\t\t\t\t\t\t\t\tconsole.log( targetScore + \" <win> \" + scoreResult)\n\t\t\t\t\t\t\t\t\t$(\"#wins\").html('Wins: ' + wins);\n\t\t\t\t\t\t\t\t\talert(\"Well Done, You've WON!!.( \" + targetScore + \" is equal to \" + scoreResult + \") Try Again\" )\n\t\t\t\t\t\t\t\t\tsetTimeout(resetGame, 3000); // pauses the games 3 secs before resetting and displays final scores.\n\t\t\t\t\t\t\t} else {}\n\t\t} // closeof function checkScores", "function initGame(){\n //Togloom ehellee gedeg tolovt oruulna.\n isNewGame = true;\n\n // Toglogchiin eeljiig hadgalah huvisagch, 1dugeer toglogchiig 0, 2 dugaar toglogchiig 1 gey.\n activePlayer = 0;\n\n // Toglogchdiin tsugluulsan onoog hadgalah huvisagch\n scores = [0, 0];\n\n // Toglogchiin eeljindee tsugluulj bga onoog hadgalah huvisagch\n roundScore = 0;\n\n // Program ehlehed beltgey\n document.getElementById(\"score-0\").textContent = \"0\";\n document.getElementById(\"score-1\").textContent = \"0\";\n document.getElementById(\"current-0\").textContent = \"0\";\n document.getElementById(\"current-1\").textContent = \"0\";\n\n //Toglogchiin neriig butsaaj gargah\n document.getElementById(\"name-0\").textContent = \"Player 1\";\n document.getElementById(\"name-1\").textContent = \"Player 2\";\n\n //winner text iig arilgah\n document.querySelector(\".player-0-panel\").classList.remove('winner');\n document.querySelector(\".player-1-panel\").classList.remove('winner');\n\n //Ulaan tseg buyu eeljiig hoyr toglogchdoos hasah\n document.querySelector(\".player-0-panel\").classList.remove('active');\n document.querySelector(\".player-1-panel\").classList.remove('active');\n\n //Toglogchiin eeljiig gargah buyu ulaan tsegiig gargah\n document.querySelector(\".player-0-panel\").classList.add('active');\n\n diceDom.style.display = \"none\";\n\n}", "function updateScoreboard() {\n scoreboardGroup.clear(true, true);\n\n const scoreAsString = score.toString();\n if (scoreAsString.length === 1) {\n scoreboardGroup.create(assets.scene.width, 30, assets.scoreboard.base + score).setDepth(10);\n } else {\n let initialPosition = assets.scene.width - ((score.toString().length * assets.scoreboard.width) / 2);\n\n for (let i = 0; i < scoreAsString.length; i++) {\n scoreboardGroup.create(initialPosition, 30, assets.scoreboard.base + scoreAsString[i]).setDepth(10);\n initialPosition += assets.scoreboard.width;\n }\n }\n}", "function game_initBoard(){\n\t//get map from data.\n\tvar mapdata=data_map[GLOBAL['gid']].map;\n\tvar spawntiles=[];\n\tGLOBAL['board']=[];\n\t//copy data into a board of tile objects\n\tfor(var i=0;i<mapdata.length;i++){\n\t\tGLOBAL['board'][i]=[];\n\t\tfor(var j=0;j<mapdata[i].length;j++){\n\t\t\tvar tile={x:i,y:j,type:mapdata[i][j]};\n\t\t\ttile.color=Math.round(170+(Math.random()*30));\n\t\t\tif(tile.type==2){\n\t\t\t\tspawntiles.push(tile);\n\t\t\t}\n\t\t\tGLOBAL['board'][i][j]=tile;\n\t\t}\n\t}\n\tvar xmax=46*GLOBAL['board'].length;\n\tvar ymax=46*GLOBAL['board'][0].length;\n\t//share the board offset, and spawn tiles.\n\n\tGLOBAL['gamevars'].xoffset=Math.round(($('#game')[0].width-xmax)/2);\n\tGLOBAL['gamevars'].yoffset=Math.round(($('#game')[0].height-ymax)/2);\n\tGLOBAL['gamevars'].spawnpoints=spawntiles;\n}", "function C999_Common_Achievements_Load() {\n\tLeaveIcon = \"\";\n LeaveScreen = \"\";\n C999_Common_Achievements_PrepareAchievements();\n\tLoadInteractions();\n\tStopTimer(7.6666667 * 60 * 60 * 1000);\n}", "scoreboardDraw(scoreboardList) {\n let leaderboardRowsDiv = document.getElementById(\"leaderboard-rows\");\n const MAX_ROW_COUNT = 10;\n let rowNum = 0;\n\n // Update leaderboard\n for(var score of scoreboardList) {\n if(rowNum === MAX_ROW_COUNT) {\n break;\n }\n\n leaderboardRowsDiv.children[rowNum].children[0].innerHTML = (rowNum + 1) + \")\";\n leaderboardRowsDiv.children[rowNum].children[1].innerHTML = score.screenName;\n leaderboardRowsDiv.children[rowNum].children[2].innerHTML = score.kills;\n\n rowNum++;\n }\n\n // Clear old leaderboard rows\n for(; rowNum < MAX_ROW_COUNT; rowNum++) {\n leaderboardRowsDiv.children[rowNum].children[0].innerHTML = \"\";\n leaderboardRowsDiv.children[rowNum].children[1].innerHTML = \"\";\n leaderboardRowsDiv.children[rowNum].children[2].innerHTML = \"\";\n }\n }", "function reloadGame(skipBoard) {\n $.get(\"/games/\"+gameId, function( game, status ) {\n window.game = game;\n console.log( \"Game (status \"+status+\"):\", game);\n // --- 1: action button\n switch(game.state) {\n case \"preparing\":\n if(game.ownerId == userId) {\n // owner\n setAction(\"Start\", \"start_game\");\n } else if(userId != null) {\n if(game.players[userId] == null) {\n // not part of the game yet\n setAction(\"Join\", \"player_join\");\n } else {\n // part of the game\n setAction(\"Leave\", \"player_leave\");\n }\n } else {\n // anonymous\n setAction(\"Signin\", null);\n }\n break;\n case \"playing\":\n if(userId != null && game.players[userId] != null) {\n var selIdx = game.queue.indexOf(userId);\n if(selIdx == 0) {\n // currently queue\n setAction(\"Cancel\", \"cancel_trio\");\n } else if(selIdx > 0) {\n // in the selection queue\n $( \"#action\" ).text(\"Wait\").off(\"click\");\n } else if(game.players[userId] != null) {\n // looking for trio\n setAction(\"Trio!\", \"declare_trio\");\n }\n } else {\n // anonymous or not part of game\n setAction(\"Wait\", null);\n }\n\n break;\n case \"over\":\n if(game.ownerId == userId) {\n // owner\n setAction(\"Again\", \"restart_game\");\n } else if(userId != null) {\n setAction(\"Wait\", null);\n } else {\n // anonymous\n setAction(\"Signin\", null);\n }\n break;\n }\n\n // --- 2: players and scores\n var $scores = $(\"#scores .players\");\n $scores.empty();\n var maxScore = -1000;\n for(var playerId in game.players) {\n maxScore = Math.max(maxScore, game.scores[playerId] | 0);\n }\n for(var playerId in game.players) {\n var points = game.scores[playerId] | 0;\n var row = document.createElement(\"tr\");\n row.id = \"player_\"+playerId;\n var status = document.createElement(\"td\");\n status.className = \"status\";\n var selIdx = game.queue.indexOf(playerId);\n if(game.state == \"over\") {\n // mark winners\n if(points == maxScore) {\n row.className = \"winner\";\n }\n } else {\n if(selIdx == 0) {\n // currently selecting\n row.className = \"selecting\";\n } else if(selIdx > 0) {\n // in the selection queue\n row.className = \"waiting\";\n var rank = document.createElement(\"span\");\n rank.className = \"rank\";\n rank.innerText = selIdx;\n row.appendChild(rank);\n }\n }\n\n var name = document.createElement(\"td\");\n name.className = \"player\";\n name.innerText = game.players[playerId].name;\n var score = document.createElement(\"td\");\n score.className = \"score\";\n score.innerText = points;\n row.appendChild(status);\n row.appendChild(name);\n row.appendChild(score);\n $scores.append(row);\n }\n\n sortPlayersByScore();\n\n // --- 3: board\n if(!skipBoard) {\n var board = document.getElementById(\"board\");\n $(board).empty();\n for (var i = 0; i < game.board.length; i++) {\n var card = game.board[i];\n if (card != null) {\n board.appendChild(createCard(i, card.value));\n }\n }\n }\n\n // --- 4: deck\n $(\"#deck\").text(game.cardsLeft);\n });\n}", "function on_load(score){\n \t\n\tvar playAgain = document.getElementById('button');\n\tplayAgain.addEventListener('click',reStart);\n\tupdateScore(score);\n\tupdateLives(numberOfLives);\n\n\n\t}", "function gameOver() {\n\t\t\t\tdocument.getElementById(\"loseSound\").play();\n\t\t\t\t//Utilizza jquery per connettersi al server e aggiornare il db\n\t\t\t\t$.get(\"updateScore.php?pong=\"+score+\"\", function(data) {\n\t\t\t\t\tif(data != \"NoError \")\n\t\t\t\t\t\talert(data);\n\t\t\t\t} );\n\t\t\t\t//Resetta il punteggio e il flag playing\n\t\t\t\tscore=0;\n\t\t\t\tplaying = false;\n\t\t\t\t//Ritorno il canvas dall'html\n\t\t canvas = document.getElementById(\"pong\");\n\t\t //Lo rimuovo dal div gioco\n\t\t divGioco = document.getElementsByClassName(\"game\")[0];\n\t\t divGioco.removeChild(canvas);\n\t\t var paragraph = document.createElement(\"p\");\n\t\t paragraph.innerHTML = \"GAMEOVER\";\n\t\t paragraph.id = \"gameOver\";\n\t\t divGioco.appendChild(paragraph);\n\t\t var restartButton = document.createElement(\"button\");\n\t\t restartButton.innerHTML = \"Restart\";\n\t\t var br = document.createElement(\"br\");\n\t\t divGioco.appendChild(restartButton);\n\t\t restartButton.onclick = function() {\n\t\t \tdivGioco.removeChild(paragraph);\n\t\t divGioco.removeChild(restartButton);\n\t\t divGioco.removeChild(br);\n\t\t divGioco.removeChild(exitButton);\n\t\t divGioco.appendChild(canvas);\n\t\t main();\n\t\t };\n\t\t divGioco.appendChild(br);\n\t\t var exitButton = document.createElement(\"button\");\n\t\t exitButton.innerHTML = \"Exit\";\n\t\t divGioco.appendChild(exitButton);\n\t\t exitButton.onclick = function() {\n\t\t \twindow.location.href = \"index.php\";\n\t\t };\n }", "function displayNFLscoreboardData(scoreboardData) {\n\t\t\tconst results = scoreboardData.scoreboard.gameScore.map((key, value) => renderNFLscoreboardResult(key));\n\t\t\t$('#js-nfl-scorecard').html(results);\n\t\t}", "function loadRound(){\n\tenableButtons();\n\tupdateScore();\n\tunbindHandlers();\n\tshuffle();\n\n\tsetGame(0);\n\tsetGame(1);\n\tsetGame(2);\n\tbindSelectors();\n}", "function load() {\r\n var score = Utilities.getObject('bejeweled_high_score');\r\n if (score !== null) {\r\n BEST_SCORE = score;\r\n }\r\n }", "function initGame() {\n gBoard = buildBoard(gLevel);\n renderBoard();\n}", "setupGame(){\n document.body.addEventListener(\"keydown\",this._changeDirection.bind(this));\n this._scoreBoard.innerHTML=\"SCORE:\"+this._score;\n this._maxScoreBoard.innerHTML=\"HighScore:\"+localStorage.getItem(\"maxScore\");\n\n this._setupBoard();\n }", "function init(){\n scores=[0,0];\n roundScore=0;\n activePlayer=0;\n gamePlaying=true;\n document.getElementById('dice-1').style.display = 'none';\n document.getElementById('dice-2').style.display = 'none';\n document.getElementById('score-0').textContent='0';\n document.getElementById('score-1').textContent='0';\n document.getElementById('current-0').textContent='0';\n document.getElementById('current-1').textContent='0';\n document.getElementById('name-0').textContent= 'Player 1';\n document.getElementById('name-1').textContent= 'Player 2';\n document.querySelector('.player-0-panel').classList.remove('winner');\n document.querySelector('.player-1-panel').classList.remove('winner');\n document.querySelector('.player-0-panel').classList.remove('active');\n document.querySelector('.player-1-panel').classList.remove('active');\n document.querySelector('.player-0-panel').classList.add('active');\n }", "function loadGame(){\n myGameArea.start();\n}", "function loadGame() {\n \tconsole.log('startGame');\n \tallCards = shuffle(allCards);\n\n \t// Reset the number of moves\n \tnumberOfMoves = 0;\n\tcounterForMoves.innerHTML = numberOfMoves;\n\n\topenCards = [];\n\t// Iterate through the cards array and append it to the deck\n\t// And remove the attributes\n\tfor (let card of allCards){\n\t\tdeckOfCards.append(card);\n\t\tcard.classList.remove(\"show\", \"open\", \"match\", \"disabled\");\n }\n\n \t// reset rating\n for (var i= 0; i < stars.length; i++){\n stars[i].style.visibility = \"visible\";\n }\n\n //reset timer\n second = 0;\n minute = 0;\n hour = 0;\n\n timerClock.innerHTML = \"00:00:00\";\n clearInterval(interval);\n }", "function init() {\ngamePlaying = true;\nscores = [0, 0] ;\nroundScore = 0;\nactivePlayer = 0;\ndocument.querySelector('.dice-one').style.display = 'none';\ndocument.querySelector('.dice-two').style.display = 'none';\ndocument.getElementById('score-0').textContent = 0;\ndocument.getElementById('score-1').textContent = 0;\ndocument.getElementById('current-0').textContent = 0;\ndocument.getElementById('current-1').textContent = 0;\ndocument.getElementById('name-0').textContent = 'Player 1';\ndocument.getElementById('name-1').textContent = 'Player 2';\ndocument.querySelector('.player-0-panel').classList.remove('winner');\ndocument.querySelector('.player-1-panel').classList.remove('winner');\ndocument.querySelector('.player-0-panel').classList.remove('active');\ndocument.querySelector('.player-1-panel').classList.remove('active');\ndocument.querySelector('.player-0-panel').classList.add('active');\n}", "function loadBoard(campaign, state) {\n var lev = state.current_level\n var boardConfig = campaign[lev.world_index].levels[lev.level_index].level\n\n var board = {\n num_cols: boardConfig.num_cols,\n num_rows: boardConfig.num_rows,\n coins: cloneDeep(boardConfig.coins),\n blocks: cloneDeep(boardConfig.blocks),\n traps: cloneDeep(boardConfig.traps),\n coinsCollected: 0\n }\n\n /**\n * Contains all data that is needed to visualize the board and game state.\n * How can you tell what data belongs in board.visualize?\n * Data should appear in board.visualize if, and only if, the data is\n * ignored in \"headless\" mode (i.e. non-visualization mode).\n */\n board.visualize = {\n\n // mutable data that persists across simulator steps\n persist: {},\n\n // immutable data that is valid for only one simulation step. Every\n // simulation step begins by erasing the contents of step.\n step: {}\n }\n\n if (\"hint\" in boardConfig) {\n board.visualize.persist.hint = boardConfig.hint\n }\n \n // the index of the bot being programmed by the code editor\n // TODO: this should be bot __id__ not bot __index__\n // TODO: this should go into board.visualize.persist\n board.visualize.programming_bot_index = boardConfig.programming_bot_index\n\n board.win_conditions = cloneDeep(boardConfig.win_conditions)\n\n board.constraints = cloneDeep(boardConfig.constraints)\n\n /**\n * The awards that will be given to the player once the level is\n * completed.\n */\n board.badges = cloneDeep(boardConfig.badges)\n\n // set to true once victory has been achieved\n board.victory = false\n\n board.markers = newMatrix(\n board.num_cols,\n board.num_rows,\n function () {\n return newMatrix(\n Direction.NUM_DIRECTIONS,\n BotColor.NUM_COLORS, undefined)\n })\n\n board.bots = []\n\n for (var i = 0; i < boardConfig.bots.length; i++) {\n var configBot = boardConfig.bots[i]\n var program = compilePuzzleCode(configBot.program, board)\n\n assert(program.constraintViolation == false,\n \"loadBoard: program.constraintViolation == false\")\n\n if (program.instructions == null) {\n // TODO: handle this error better\n console.error(\"Could not compile: \" + configBot.program)\n } else {\n var bot = {\n // bot.id is immutable, and unique only w.r.t. this board\n id: i,\n cellX: configBot.cellX,\n cellY: configBot.cellY,\n botColor: configBot.botColor,\n facing: configBot.facing,\n ip: 0,\n program: program\n }\n board.bots.push(bot)\n }\n }\n\n // newly created bots get id == board.next_bot_id\n // don't need to worry about int overflows on bot ids because JS uses floats\n board.next_bot_id = boardConfig.bots.length\n\n return board\n}", "function paintBoard() {\n var count = [0, 0];\n var obj = JSON.parse(sessionStorage.board);\n\n for (var i = 0; i < obj.length; i++) {\n if (obj[i].color == 1) {\n var cood = \"#cell\" + obj[i].coordinates.x + \"\" + obj[i].coordinates.y + \"> div.disc\";\n $(cood).removeClass(\"black\");\n $(cood).addClass(\"white\");\n count[0]++;\n }\n else if (obj[i].color == 2) {\n var cood = \"#cell\" + obj[i].coordinates.x + \"\" + obj[i].coordinates.y + \"> div.disc\";\n $(cood).removeClass(\"white\");\n $(cood).addClass(\"black\");\n count[1]++;\n }\n }\n score[0] = count[0];\n score[1] = count[1];\n\n $(\"#score\").html(\"White: \" + score[0] + \" - Black: \" + score[1]);\n\n if (score[0] + score[1] == side * side || score[0] == 0 || score[1] == 0) {\n if (score[0] > score[1]) {\n $(\"#score\").html(\"Score: \" + score[0] + \" - \" + score[1]);\n $(\"#colorTurn\").html(\"White Wins\");\n }\n else if (score[0] < score[1]) {\n $(\"#score\").html(\"Score: \" + score[1] + \" - \" + score[0]);\n $(\"#colorTurn\").html(\"Black Wins\");\n }\n if (score[0] == score[1]) {\n $(\"#score\").html(\"\");\n\n $(\"#colorTurn\").html(\"Game Draw\");\n }\n }\n dropResMatrix();\n}", "function gameOver() {\n\n\tvar score = {\n\t\t\"score\": getScore(),\n\t\t\"player\": localStorage.getItem(\"player\"),\n\t\t\"level\": 1\n\t};\n\tnetwork.postNewScore(score);\n\tglitchScreen(500);\n\tdocument.getElementById('gameOverText3').innerHTML = getScore();\n\t$('#gameOverBox').animate({top: '20%'}, 500);\n \tPause = true;\n \tPauseScreen = true;\n movement.unlockPointer();\n}", "function initGame() {\n\tdebugAlert(\"initGame\", false);\n\tif(gGameActive === true) return;\n\t\n\tgBoardRowCount = 8;//document.getElementById(\"row\").value;\n\tgBoardColumnCount = 6;//document.getElementById(\"column\").value;\n\t\n\t//Create the play area canvas and listeners\n\tgPlayAreaCanvas = createCanvas(getPlayAreaWidth(), getPlayAreaHeight());\n\tgPlayAreaCanvasDrawingContext = gPlayAreaCanvas.getContext(\"2d\");\n\taddListenerToElement(gPlayAreaCanvas,onMouseMovePlayArea,\"mousemove\");\n\taddListenerToElement(gPlayAreaCanvas,onMouseClickPlayArea,\"click\");\n\t\n\t//Create the tile chooser canvas and listeners\n\tgTileChooserCanvas = createCanvas(getTileLayoutWidth(), getTileLayoutHeight());\n\tgTileCanvasDrawingContext = gTileChooserCanvas.getContext(\"2d\");\n\taddListenerToElement(gTileChooserCanvas, onMouseClick,\"click\");\n\taddListenerToElement(gTileChooserCanvas, onDoubleClick,\"dblclick\");\n\taddListenerToElement(gTileChooserCanvas,onMouseMoveTileArea,\"mousemove\");\n\n\t//Create the tiles\n\tiRightElbow = new Image();\n\tiRightElbow.src = \"elbow.png\";\n\tiLeftElbow = new Image();\n\tiLeftElbow.src = \"elbow2.png\";\n\t\n\tiStraight = new Image();\n\tiStraight.src = \"straight.png\";\n\tiPlumber = new Image();\n\tiPlumber.src = \"plumber.jpg\";\n\tiToilet = new Image();\n\tiToilet.addEventListener(\"load\", function(){\n\t\t//after the resources are loaded start a new game\n\t\tflushHandle();\n\t\tnewGame();\n\t\tgGameActive = true;\n\t}, false);\n\tiToilet.src =\"toilet.png\";\n}", "function onload()\r\n{\r\n\tarr=[[0,0,0],[0,0,0],[0,0,0]];\r\n\tp1=\"computer\";\r\n\tp2=\"player\";\r\n\tmatcheswon1=0;\r\n\tmatcheswon2=0;\r\n\tmatchesdrawn=0;\r\n\tnochances=0;\r\n\tplayerchancelegal=1;\r\n\tplayerschance=oneortwo();\r\n\tfirstmoveplayer=playerschance;\r\n\tupdateplayersname();\r\n\tresetcell(10);\r\n\tresetcell(11);\r\n\tupdateindex();\r\n\tstartgame();\r\n}", "function gameOver(board,player,player1){\n //let resultsTMP = [];\n draw();\n for(let i=0; i < cols; i++){\n for(let j=0; j < rows; j++){\n if(board.game[i][j].class==player.name){\n player.points += pointsConn;\n }\n if(board.game[i][j].class == player1.name){\n player1.points += pointsConn;\n }\n }\n }\n player.myTurn = false;\n player.points += player.wins * 25;\n \n player1.myTurn = false;\n player1.points += player1.wins * 25;\n\n if(player.win){\n //if any player wins\n winboards.push(board.copy());\n player.points += 100;\n player.wins += 1;\n results.push(\" Player \" + player.name.toString() + \" wins at board\"+ boards.indexOf(board).toString());\n results.push(\"Stored at: \"+winboards.length);\n player.win = 0;\n wonGames++;\n \n if(player.name == \"myPlayer\" || player.name == \"playerNN\"){\n player.points += 50;\n //at colonies.js\n starta(1);\n if(!automateToggle){\n //at colonies.js\n play();\n automateToggle = true;\n }\n }\n }\n else {\n //if result of game is draw\n //resultsTMP[0] =\"STALLED GAME at board \" + boards.indexOf(board).toString();\n if(player.name == \"myPlayer\" || player.name == \"playerNN\"){\n boardNN = boardNN.copyEmpty();\n player1.points = 0;\n player.points = 0;\n //new boards\n starta(0);\n if(!automateToggle){\n play();\n }\n }\n else{\n //all other stalled games are restarted without new generation\n /* console.log(boards.indexOf(board));\n boards.splice(boards.indexOf(board));\n colony1.splice(colony1.indexOf(player));\n col ony2.splice(colony2.indexOf(player1));*/\n player1.points = 0;\n player.points = 0;\n board = board.copyEmpty();\n stalledGames++;\n }\n }\n //results.push(resultsTMP.join());\n}", "function gameOver(){\r\n ctx.save();\r\n ctx.fillStyle = \"rgba(0,0,0,0.4)\"; \r\n ctx.fillRect(canvas.width/4,canvas.height/4,canvas.width/2,canvas.height/2 - 50);\r\n ctx.fillStyle = \"#FFFFFF\";\r\n ctx.font = \"30px Consolas\";\r\n ctx.fillText(\"Score: \"+score,canvas.width/4 + 80,canvas.height/2 - 70);\r\n ctx.font = \"25px Consolas\";\r\n\r\n var highScore = localStorage.getItem(\"score\") ? parseInt(localStorage.getItem(\"score\")) : score;\r\n if(highScore <= score){\r\n highScore = score;\r\n localStorage.setItem(\"score\",highScore);\r\n }\r\n\r\n ctx.fillText(\"Top Score: \" + highScore,canvas.width/4 + 10,canvas.height/2 - 35);\r\n ctx.font = \"20px Consolas\";\r\n ctx.fillText(\"Press Space Bar for\",canvas.width/4 + 10,canvas.height/2);\r\n ctx.fillText(\"a new game \",canvas.width/4 + 10,canvas.height/2 + 25);\r\n }", "function openLeaderboard() {\n leaderboardScreen.style.display = 'flex';\n homeScreen.style.display = 'none';\n endQuiz.style.display = 'none';\n quizPrompts.style.display = 'none';\n timer.style.visibility = 'hidden';\n generateScore();\n}", "function gameOver() {\n stage.cursor = 'default';\n\n createjs.Ticker.removeEventListener(\"tick\", gameLoop);\n stage.removeAllChildren();\n\n //add the main screen\n mainScreen = new createjs.Bitmap(queue.getResult(\"gameover\"));\n this.stage.addChild(mainScreen);\n mainScreen.x = 0;\n mainScreen.y = 0;\n\n //add the little elf\n yay = new createjs.Bitmap(queue.getResult(\"yay\"));\n this.stage.addChild(yay);\n yay.x = 90;\n yay.y = 150;\n\n //add the play button\n playButt = new createjs.Bitmap(queue.getResult(\"playAgainButton\"));\n this.stage.addChild(playButt);\n playButt.x = 280;\n playButt.y = 390;\n playButt.addEventListener(\"click\", mainGameStart);\n\n var label;\n var labelString = \"\";\n\n label = new createjs.Text(this.labelString, GAME_FONT, FONT_COLOUR);\n labelString = \"Score: \" + scoreboard.score.toString();\n label.text = labelString;\n stage.addChild(label);\n label.x = 300;\n label.y = 200;\n\n stage.update();\n}", "function initialize()\n{\n Scores=[0,0];\n RoundScore=0;\n ActivePlayer=0;\n gameContinue=true;\n document.getElementById('dice-1').style.display='none';\n document.getElementById('dice-2').style.display='none';\n document.getElementById('score-0').textContent=0;\n document.getElementById('score-1').textContent=0;\n document.getElementById('current-0').textContent=0;\n document.getElementById('current-1').textContent=0;\n document.querySelector('.player-0-panel').classList.remove('active');\n document.querySelector('.player-1-panel').classList.remove('active');\n document.querySelector('.player-0-panel').classList.add('active');\n document.querySelector('.player-0-panel').classList.remove('winner');\n document.querySelector('.player-1-panel').classList.remove('winner');\n document.getElementById('name-0').textContent='Player 1';\n document.getElementById('name-1').textContent='Player 2';\n}", "function endGame(score) { // import score from game\n // bug/feature when player clicks end game from game window; gameover doesn't get the score\n // EITHER REMOVE THE QUIT GAME BUTTON FROM GAME WINDOW OR MAKE IT AN ACTUAL FEATURE\n removeScreen();\n createGameOver(gameOverStr, score);\n //console.log(`I got the score: -- ${score} pts -- from game obj, hopefully`)\n // display hiscores at some point in life\n}", "function startGame(){\n gamePlaying=1;\n scores = [0,0];\n activePlayer = 0 ;\n roundScore = 0;\n document.querySelector(\"#name-0\").textContent = \"Player 1\";\n document.querySelector(\"#name-1\").textContent = \"Player 2\";\n document.querySelector(\".player-0-panel\").classList.remove(\"winner\");\n document.querySelector(\".player-1-panel\").classList.remove(\"winner\");\n document.querySelector(\".player-0-panel\").classList.remove(\"active\");\n document.querySelector(\".player-1-panel\").classList.remove(\"active\");\n document.querySelector(\".player-0-panel\").classList.add(\"active\");\n\n document.querySelector('.dice').style.display = 'none';\n document.getElementById('score-0').textContent = '0';\n document.getElementById('score-1').textContent = '0';\n document.getElementById('current-0').textContent = '0';\n document.getElementById('current-1').textContent = '0';\n }", "function init() {\n scores =[0,0];\n activePlayer = 0;\n roundScore = 0;\n // this function is used to initialize the game when it first opens and when a new game is needed.\n\n document.querySelector('.dice').style.display = 'none';\n// remove display of dice image when first opening the web page\n document.getElementById('score-0').textContent = '0';\n document.getElementById('score-1').textContent = '0';\n document.getElementById('current-0').textContent = '0';\n document.getElementById('current-1').textContent = '0';\n// getting elements by id from HTML and set all to zero and sets players and current score to zero for beginning of game.\n document.getElementById('name-0').textContent = 'Player 1';\n document.getElementById('name-1').textContent = 'Player 2';\n // changing name back to player instead of winner after new game is started\n document.querySelector('.player-0-panel').classList.remove('winner');\n document.querySelector('.player-1-panel').classList.remove('winner');\n // remove winner label from winning player\n document.querySelector('.player-0-panel').classList.remove('active');\n document.querySelector('.player-1-panel').classList.remove('active');\n // remove active player from both players when there is a winner and for the beginning of the new game\n document.querySelector('.player-1-panel').classList.add('active');\n // adding active player back for a new game\n // \n}", "function loadGame() {\n mayiPivot = false;\n startButton.animate().alpha(0).duration(500).onEnd = function() {\n startButton.setHidden(true);\n startButton.setClickable(false);\n };\n dropSpider.animate().alpha(0).duration(500).onEnd = function() {\n dropSpider.setHidden(true);\n }\n mainOverlayBG.setHidden(false);\n mainOverlayBG.animate().alpha(1).duration(1100);\n gameBG.setHidden(false);\n gameBG.animate().alpha(1).duration(1100);\n deadpool.setHidden(false);\n deadpool.animate().alpha(1).duration(1200);\n gameHeader.setHidden(false);\n gameHeader.animate().alpha(1).duration(1200);\n gameHeart3.setHidden(false);\n gameHeart3.animate().alpha(1).duration(1200);\n spideyBody.setHidden(false);\n spideyBody.animate().alpha(1).duration(1200);\n spideyHead.setHidden(false);\n spideyHead.animate().alpha(1).duration(1200);\n gameScore.setHidden(false);\n gameTimer.setHidden(false);\n blackScreen.setHidden(false);\n blackScreen.animate().alpha(0.75).duration(1200);\n gameInstructions.animate().alpha(1).duration(1300).onEnd = function() {\n gameInstructions.setHidden(false);\n }\n gameInstructions.setClickable(true);\n}", "function loadGameOverModal(currentUserScore, currentLevel) {\n //get page items\n var userNameLabel = window.document.getElementById('gameOverUserName');\n var levelLabel = window.document.getElementById('gameOverLevel');\n var scoreLabel = window.document.getElementById('gameOverScore');\n //assign values\n userNameLabel.textContent = currentUserScore.displayName;\n levelLabel.textContent = currentLevel.toString();\n scoreLabel.textContent = currentUserScore.currentScore.toString();\n //store final stats\n currentUserScore.levelFinish = currentLevel;\n //process score\n checkUserScore(currentUserScore, \"gameOverHighScoreDiv\");\n //open window\n openGameOverWindow();\n }", "function main() {\r\n //Popup f�r Kartenpaare\r\n gameBoard();\r\n function gameBoard() {\r\n numPairs = parseInt(prompt(\"Anzahl der Kartenpaare (von 5-8 Paaren)\"), 10);\r\n if (numPairs < 5 || numPairs > 8) {\r\n gameBoard();\r\n }\r\n }\r\n //Karten erzeugen\r\n for (let i = 0; i < numPairs; i++) {\r\n createCard(cardContent[i]);\r\n createCard(cardContent[i]);\r\n }\r\n //Aufruf der Shuffle Algorithmusses \r\n shuffleArray(cardArray);\r\n for (let i = 0; i < cardArray.length; i++) {\r\n document.getElementById(\"playerbox\").appendChild(cardArray[i]);\r\n }\r\n //Spielerinformation\r\n //Popup f�r Spieleranzahl\r\n playerList();\r\n function playerList() {\r\n numPlayers = parseInt(prompt(\"Spieleranzahl eingeben (max. 4 Spieler)\"), 10);\r\n if (numPlayers < 1 || numPlayers > 4) {\r\n playerList();\r\n }\r\n }\r\n for (let i = 0; i < numPlayers; i++) {\r\n spielerDiv(i + 1);\r\n }\r\n //Anzeigen der Spielerboxen\r\n function spielerDiv(_numPlayers) {\r\n let playerDiv = document.createElement(\"div\");\r\n document.getElementById(\"scoreboard\").appendChild(playerDiv);\r\n let player = document.createElement(\"p\");\r\n playerDiv.appendChild(player);\r\n player.innerHTML = \"Spieler \" + _numPlayers;\r\n let points = document.createElement(\"p\");\r\n playerDiv.appendChild(points);\r\n points.innerHTML = \"Punkte: 00\";\r\n }\r\n }", "function initializeGame() {\n\tcharacterScore = [] ;\n\tenemyScore = [];\n\tlistCharacters = ['francis','claire','zoe','russo','doug'];\n\tlistEnemies = ['francis','claire','zoe','russo','doug'];\n\tplayerChosen = false;\n\tdefendantChosen = false;\n\tattackMode = false;\n\n\n\t// need to show the characters in the original position \n\n\n\t// delete characters that were moved to the defender and attacker rows\n\t$(\"#row3\", \"#row4\", \"#defenderRow\",\"#attackerRow\").empty();\n\t}", "function GameOver() {\n\t\talert(\"GAME OVER\");\n\t\tdiplomaPositions = [{x: 300, y: 0}, {x: 450, y:250}, {x:600, y:150}];\n\t\tpreGame = true;\n\t\tscore = 0;\n\t}", "function remainingLives() {\n if (vaisseau.userData.lifes == 3) {\n lifesId.innerHTML = '&#x2665;&#x2665;&#x2665;' ;\n }else if (vaisseau.userData.lifes == 2) {\n lifesId.innerHTML = '&#x2665;&#x2665;' ;\n }else if (vaisseau.userData.lifes == 1) {\n lifesId.innerHTML = '&#x2665;' ;\n }else{\n lifesId.innerHTML = '' ;\n stopScore = false;\n gameOverId.style.display = 'block';\n restartButton.style.display = 'block';\n //une fois la partie perdue, on verifie si le score acquis est plus grand que l'actuel meilleur score\n if (vaisseau.userData.score > localStorage.getItem('bestscore')) {\n bestScoreId.innerHTML = 'Best Score : ' + vaisseau.userData.score;\n //Si le score est plus grand, il sera enregistré dans la mémoire locale du navigateur\n localStorage.setItem('bestscore', vaisseau.userData.score)\n }else if(vaisseau.userData.score <= localStorage.getItem('bestscore')){\n bestScoreId.innerHTML = 'Best Score : ' + localStorage.getItem('bestscore');\n }\n //arrete l'animanition quand on n'a plus de vies\n animationFrame.cancelAnimationFrame();\n }\n}", "function scoreboard(){\n $('#timeLeft').empty();\n $('#message').empty();\n $('#correctedAnswer').empty();\n $('#gif').hide();\n $(\"#gifCaption\").hide();\n \n $('#finalMessage').html(messages.finished);\n $('#correctAnswers').html(\"Correct Answers: \" + correctAnswer);\n $('#incorrectAnswers').html(\"Incorrect Answers: \" + incorrectAnswer);\n $('#unanswered').html(\"Unanswered: \" + unanswered);\n $('#startOverBtn').addClass('reset');\n $('#startOverBtn').show();\n $('#startOverBtn').html(\"PLAY AGAIN\");\n }", "function preload() {\n delete gameData;\n if (myID == 0){\n TetrisBoard.style.opacity = .7;\n BreakoutBoard.style.opacity = 1;\n }\n else {\n TetrisBoard.style.opacity = 1;\n BreakoutBoard.style.opacity = .7;\n }\n onReady(); // Calling onReady Tetris function\n game.scale.scaleMode = Phaser.ScaleManager.NO_SCALE;\n game.scale.pageAlignHorizontally = true;\n game.scale.pageAlignVertically = true;\n game.stage.backgroundColor = '#eee';\n game.load.spritesheet('ball', 'client/img/wobble.png', 20, 20);\n game.load.image('paddle', 'client/img/paddle.png');\n game.load.image('brick', 'client/img/brick.png');\n game.load.spritesheet('button', 'client/img/button.png', 120, 40);\n\t\tgame.load.image('gameover','client/img/over.png')\n }", "createLeaderboard () {\n this.$menu.innerHTML = '';\n crDom.createLeaderboardTitle();\n const allScores = readFromCache('scores');\n const allScoresSort = Object.entries(allScores).sort((a, b) => b[1] - a[1]);\n allScoresSort.forEach((score) => {\n crDom.createScoreTime(score[0], score[1]);\n });\n\n /**\n * This will listen when you click on the home button to go to the home page\n */\n this.$homeButtonScore = document.getElementById('homeButtonScore');\n this.$homeButtonScore.addEventListener('click', (e) => {\n e.preventDefault();\n this.$menu.innerHTML = '';\n this.init();\n });\n }", "function scoreboardBackMenu(){\r\n hideScoreboardTable(); \r\n showMenuTable();\r\n}", "handleNewGame() {\n this.redTurnOrder.forEach((player) => {super.updatePlayerScore(player, \"\")});\n this.blueTurnOrder.forEach((player) => {super.updatePlayerScore(player, \"\")});\n this.teams = {};\n this.redTurnOrder = [];\n this.blueTurnOrder = [];\n this.redHints = [];\n this.blueHints = [];\n this.redNum = 0;\n this.blueNum = 0;\n this.currentRound = 0;\n this.redSel = [\"0\", \"0\", \"0\", \"0\", \"0\", \"0\"];\n this.blueSel = [\"0\", \"0\", \"0\", \"0\", \"0\", \"0\"];\n this.redWords = this.generateWords();\n this.blueWords = this.generateWords();\n this.redCode = [\"?\", \"?\", \"?\"];\n this.blueCode = [\"?\", \"?\", \"?\"];\n this.redGuessHistory = [];\n this.blueGuessHistory = [];\n this.redHistory = [];\n this.blueHistory = [];\n this.redScore = [0, 0];\n this.blueScore = [0, 0];\n this.gameState = 0;\n super.sendGameData({ event: \"reset-game\" });\n }", "function initGameBoard(height,width){\n\tvar gameboard = '<p id = score style=\"text-align:center\">Score: </p>';\n\tgameboard += '<table id=\"gameboard\">';\n\n\tfor(i = 0; i<height; i++){\n\t\tgameboard += '<tr>';\n\t\tfor (j = 0; j < width; j++){\n\t\t\tvar id = \"r\"+i+\"d\"+j;\n\t\t\tvar grid = '<td id=\"'+id+'\">';\n\t\t\tgameboard += grid;\n\t\t}\n\t\tgameboard += '</tr>';\n\t}\n\tgameboard += '</table>';\n\tgameboard += '<p style=\"text-align: center\"> Ohjaa matoa nuolinäppäimillä. Kuoleman jälkeen paina R syntyäksesi uudelleen </P>'\n\t$(\"#gameboard_div\").html(gameboard);\n\tinitSnake();\n\tdrawApple();\n}", "function C101_KinbakuClub_RopeGroup_Load() {\n\n\t// After intro player has a choice each time she goes to the group, until a twin is released\n\tif (C101_KinbakuClub_RopeGroup_CurrentStage > 100 && C101_KinbakuClub_RopeGroup_CurrentStage < 700) {\n\t\tC101_KinbakuClub_RopeGroup_CurrentStage = 100;\n\t}\n\n\t// Load the scene parameters\n\tif (C101_KinbakuClub_RopeGroup_CurrentStage < 100) {\n\t\tActorLoad(\"Amelia\", \"ClubRoom1\");\n\t} else {\n\t\tLeaveScreen = \"ClubRoom1\";\n\t\tLeaveIcon = \"Leave\";\n\t}\n\tLoadInteractions();\n\tC101_KinbakuClub_RopeGroup_CalcParams();\n\n\t// Load correct CurrentStage if player is bound, gagged or not\n\tif (Common_PlayerGagged || Common_PlayerRestrained) {\n\t\tC101_KinbakuClub_RopeGroup_CurrentStage = 50;\n\t}\n\tif (C101_KinbakuClub_RopeGroup_CurrentStage == 50 && !Common_PlayerGagged && !Common_PlayerRestrained) {\n\t\tif (C101_KinbakuClub_RopeGroup_IntroDone) C101_KinbakuClub_RopeGroup_CurrentStage = 100;\n\t\telse C101_KinbakuClub_RopeGroup_CurrentStage = 10;\n\t}\n\n\t// Determine which twin is Lucy\n\tif (C101_KinbakuClub_RopeGroup_RightTwin == \"\") {\n\t\tC101_KinbakuClub_RopeGroup_Random = Math.floor(Math.random() * 2);\n\t\tif (C101_KinbakuClub_RopeGroup_Random == 0)\t{\n\t\t\tC101_KinbakuClub_RopeGroup_LeftTwin = \"Lucy\";\n\t\t\tC101_KinbakuClub_RopeGroup_RightTwin = \"Heather\";\n\t\t}\n\t\telse {\n\t\t\tC101_KinbakuClub_RopeGroup_LeftTwin = \"Heather\";\n\t\t\tC101_KinbakuClub_RopeGroup_RightTwin = \"Lucy\";\n\t\t}\n\t}\n}", "function load() {\n document.getElementById(\"level\").firstChild.data = level;\n document.getElementById(\"highscoretable\").style.setProperty(\"visibility\", \"hidden\", null);\n \n //load music\n \n exit = document.getElementById('Exit'); \n pdie = document.getElementById('DiePlayer'); \n mdie = document.getElementById('DieMonster'); \n pshoot = document.getElementById('GunPlayer'); \n\n //trigger the timer\n count = 60;\n // timer = setInterval(\"countTime()\", COUNTINGPERIOD);\n countTime();\n // countScore();\n // Attach keyboard events\n document.addEventListener(\"keydown\", keydown, false);\n document.addEventListener(\"keyup\", keyup, false);\n\n // Create the player\n player = new Player();\n \n \n if(player_name==null || player_name==\" \"||(player_name.match(/^[ ]*$/)))\n player_name = \"Anonymous\";\n playBGM();\n BGMInterval = setInterval(\"playBGM()\", BGM_INTERVAL);\n\n \n var newText = document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\");\n var l = player_name.length;\n \n newText.setAttributeNS(null,\"font-size\",\"10\");\n newText.setAttributeNS(null,\"transform\",\"translate(\"+((st-l))+\", 0)\");\n newText.setAttributeNS(null,\"id\",\"temp_name\");\n\n var textNode = document.createTextNode(player_name);\n newText.appendChild(textNode);\n var pre = document.getElementById(\"player\").lastChild.firstChild;\n if(pre)\n pre.nodeValue = \" \";\n document.getElementById(\"player\").appendChild(newText);\n \n \n \n generateMonsters(NumMonster);\n generateGoodThins(NumGoodThings);\n\n createDoor(10, 420);\n createTransmission (4, 155);\n createTransmission (210, 470);\n \n // Start the game interval\n gameInterval = setInterval(\"gamePlay()\", GAME_INTERVAL);\n}", "function initGame() {\n\tfetchHiScore();\n\tvar r, c;\n\tcurrentLines = 0;\n\tscore = 0;\n\tisGameOver = false;\n\t\n\t// Checking if game data isn't defined then define a new array for it, otherwise zero it out.\n\tif(gameData == undefined) {\n\t\tgameData = new Array();\n\t\t\n\t\tfor(r = 0; r < rows; r++) {\n\t\t\tgameData[r] = new Array();\n\t\t\t\n\t\t\tfor(c = 0; c < columns; c++) {\n\t\t\t\tgameData[r].push(0);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor(r = 0; r < rows; r++) {\n\t\t\tfor(c = 0; c < columns; c++) {\n\t\t\t\tgameData[r][c] = 0;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Get a random starting piece.\n\tourPiece = getRandomPiece();\n\t\n\t// Printing lines, score, and highscore to screen.\n\tlineSpan.innerHTML = currentLines.toString();\n\tdocument.getElementById(\"points\").innerHTML = score.toString();\n\tdocument.getElementById(\"highscore\").innerHTML = highscore.toString();\n\t\n\t// Animation frame for different browsers.\n\tvar requestAFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || \n\t\t\t\t\t\t\t\twindow.webkitRequestAnimationFrame || window.msRequestAnimationFrame;\n\t\n\twindow.requestAnimationFrame = requestAFrame;\n\t\n\t// Starting the actual gameplay loop.\n\trequestAnimationFrame(update);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived: \"+message.destinationName + \" - \"+message.payloadString);\n\n\n if(message.destinationName === \"/refreshTable\"){\n\n let s = message.payloadString;\n let arr1 = s.split(\"-\");\n //gameBoard = arr1[1];\n\n let arr2 = arr1[1].split(\",\");\n let index = 0;\n for (let i = 0; i <=2 ; i++) {\n gameBoard[0][i] = parseInt(arr2[i]);\n }\n\n for (let i = 3; i <=5 ; i++) {\n gameBoard[1][i-3] = parseInt(arr2[i]);\n }\n\n for (let i = 6; i <=8 ; i++) {\n gameBoard[2][i-6] = parseInt(arr2[i]);\n }\n\n console.log(gameBoard);\n /*\n if (turn === name){\n console.log(turn + \" = \" + name);\n gameBoard[row][col] = 1;\n }else{\n gameBoard[row][col] = 0;\n console.log(turn + \" != \" + name);\n }*/\n // gameBoard[row][col] = ships[row][col];\n paintBoard();\n /*\n let co = s.split(\":\");\n let row = co[0];\n let col = co[1];\n //gameBoard[row][col] = 1;\n\n console.log(gameBoard);\n\n\n gameBoard[row][col] = ships[row][col];\n paintBoard();\n /*\n if (gameBoard[row][col] === 0) {\n document.getElementById(\"s\"+row+col).style.background = '#bb0609';\n } else if (gameBoard[row][col] === 1) {\n document.getElementById(\"s\" + row+col).style.background = '#0dbb1f';\n }*/\n }\n else if(message.destinationName === \"/startGame\"){\n console.log(\"Start\");\n }\n else if(message.destinationName === \"/setTurn\"){\n turn = message.payloadString;\n document.getElementById(\"turnLabel\").innerText = message.payloadString + \" KORD\";\n }\n\n\n\n}", "static initialize() {\n // HTML からステージの元となる要素を取得し、大きさを設定する\n const stageElement = document.getElementById(\"stage\");\n stageElement.style.width = Config.puyoImgWidth * Config.stageCols + 'px';\n stageElement.style.height = Config.puyoImgHeight * Config.stageRows + 'px';\n stageElement.style.backgroundColor = Config.stageBackgroundColor;\n this.stageElement = stageElement;\n\n const zenkeshiImage = document.getElementById(\"zenkeshi\");\n zenkeshiImage.width = Config.puyoImgWidth * 6;\n zenkeshiImage.style.position = 'absolute';\n zenkeshiImage.style.display = 'none';\n this.zenkeshiImage = zenkeshiImage;\n stageElement.appendChild(zenkeshiImage);\n const scoreElement = document.getElementById(\"score\");\n scoreElement.style.backgroundColor = Config.scoreBackgroundColor;\n scoreElement.style.top = Config.puyoImgHeight * Config.stageRows + 'px';\n scoreElement.style.width = Config.puyoImgWidth * Config.stageCols + 'px';\n scoreElement.style.height = Config.fontHeight + \"px\";\n this.scoreElement = scoreElement;\n // メモリを準備する\n this.board = [\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0],\n ];\n let puyoCount = 0;\n for(let y = 0; y < Config.stageRows; y++) {\n const line = this.board[y] || (this.board[y] = []);\n\n for(let x = 0; x < Config.stageCols; x++) {\n const puyo = line[x];\n if(puyo >= 1 && puyo <= 5) {\n // line[x] = {puyo: puyo, element: this.setPuyo(x, y, puyo)};\n this.setPuyo(x, y, puyo);\n puyoCount++;\n } else {\n line[x] = null;\n }\n }\n }\n this.puyoCount = puyoCount;\n }", "function loadGameData()\n\t\t\t{\n\t\t\t\tif(gameName == \"fatcat7\")\n\t\t\t\t{\n\t\t\t\t\tgame = new FatCat7Game();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"bounty\")\n\t\t\t\t{\n\t\t\t\t\tgame = new BountyGame();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"gummibar\")\n\t\t\t\t{\n\t\t\t\t\tgame = new GummiBarGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"aprilmadness\")\n\t\t\t\t{\n\t\t\t\t\tgame = new AprilMadnessGame();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"moneybooth\")\n\t\t\t\t{\n\t\t\t\t\tgame = new MoneyBoothGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"astrologyanswers\")\n\t\t\t\t{\n\t\t\t\t\tgame = new AstrologyAnswersGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t\tisBothFreeSpinAndOtherBonus = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgame.importGame(xmlData);\n\t\t\t}", "function initLoad()\n{\n console.log('page load');\n myGame.buildBoard();\n myGame.nextMove();\n myGame.reset();\n}", "function gameOver() {\n context.clearRect(0, 0, canvas.width, canvas.height);\n if(playerWin)\n {\n context.drawImage(endScreen.img, endScreen.x, endScreen.y, 304, 170.67);\n }\n else if(!playerWin)\n {\n context.drawImage(loseScreen.img, loseScreen.x, loseScreen.y, 304, 170.67);\n }\n localStorage.setItem('score', 1);\n}", "function scoreboard() {\n console.log(\n\n \"Scoreboard \\n\" +\n \"Wins : \" + wins + \"\\n\" +\n \"Losses : \" + losses + \"\\n\"\n );\n}", "function initGame() {\n\n game.scores[PLAYER] = scorePlayer(PLAYER);\n game.scores[DEALER] = scorePlayer(DEALER);\n\n updateGameDisplay();\n}", "function init() {\n var storedNames = JSON.parse(localStorage.getItem(\"scoreBoard.names\"));\n var storedScores = JSON.parse(localStorage.getItem(\"scoreBoard.scores\"));\n if (storedNames !== null) {\n scoreBoard.names = storedNames;\n }\n if (storedScores !== null) {\n scoreBoard.scores = storedScores;\n }\n}", "function createLeaderboard() {\n if(currentState != appStates.Leaderboard)\n previousState = currentState;\n currentState = appStates.Leaderboard;\n \n\n $(highscoreEl).empty();\n $(timerEl).empty();\n $(contEl).empty();\n\n let header = $(\"<h1 style=\\\"margin-top:0;\\\">Highscores</h1>\");\n\n let highscores = localStorage.getItem(\"highscores\");\n\n $(contEl).append(header);\n\n if(highscores)\n {\n let parsedHighscores = JSON.parse(highscores);\n\n let sortedHighscores = sortHighscores();\n\n let orderScores = $(\"<ol id=\\\"highscore-list\\\"></ol>\");\n\n let counter = 1;\n $.each(sortedHighscores, function(key, value)\n {\n let liElement = $(`<li class=\"highscore\">${counter}. ${key} - ${value}</li>`);\n\n \n $(orderScores).append(liElement);\n counter++;\n });\n\n $(contEl).append(orderScores);\n \n//High score content \n function sortHighscores() {\n items = Object.keys(parsedHighscores).map(function(key) {\n return [key, parsedHighscores[key]];\n });\n items.sort(function(first, second) {\n return second[1] - first[1];\n });\n sorted_obj={}\n $.each(items, function(k, v) {\n use_key = v[0]\n use_value = v[1]\n sorted_obj[use_key] = use_value\n });\n return(sorted_obj);\n } \n }\n//high scores and play again buttons\n let buttons = $(\"<div style=\\\"text-align:center\\\"><button id=\\\"highscorebk\\\" type=\\\"button\\\" class=\\\"quizbtn\\\">Play Again</button> <button id=\\\"highscoreclr\\\" type=\\\"button\\\" class=\\\"quizbtn\\\">Clear scores</button></div>\");\n\n $(contEl).append(buttons);\n\n $(\"#highscoreclr\").on(\"click\", function(event) {\n event.preventDefault();\n localStorage.removeItem(\"highscores\");\n $(\"#highscore-list\").empty();\n });\n\n $(\"#highscorebk\").on(\"click\", function(event){\n event.preventDefault();\n\n//switch to previous state if case is not matched\n switch(previousState)\n {\n case appStates.Initial:\n createMainPage();\n break;\n case appStates.Questioning:\n createNewQuestion();\n break; \n case appStates.SubmittingScore:\n createSubmitPage();\n break;\n default:\n break;\n }\n\n $(timerEl).html(`Timer: ${getFormattedSeconds()}`);\n $(highscoreEl).html(\"View Highscores\");\n });\n }", "function loadLevel() {\r\n\r\n\tlet levelMap = levels[currentLevel];\r\n\t// let animateBoxes;\r\n\triderOn = false;\r\n\t\r\n\tif (currentLevel == levels.length) {\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t// load board\r\n\tfor (i = 0; i < gridBoxes.length; i++) {\r\n\t\tgridBoxes[i].className = levelMap[i];\r\n\t\tif (levelMap[i].includes(\"horse\")) currentLocationOfHorse = i;\r\n\t} // for\r\n\r\n\tanimateBoxes = document.querySelectorAll(\".animate\");\r\n\r\n\tif (currentLevel == 0 || currentLevel == 3) {\r\n\t\tanimateEnemy(animateBoxes, 0, \"down\");\r\n\t} else {\r\n\t\tanimateEnemy(animateBoxes, 0, \"right\");\r\n\t}\r\n\t\r\n\r\n} // loadLevel", "function loadLevelUI()\n{\n //Function call to create the Game UI\n createLevelScreenUI();\n //Function call for the synchronization counter\n level_screen_start_counter();\n //Function call for loading the game content\n level_screen_load_game_content();\n}", "function gameOver(){\n paused = true;\n\n //clear level\n circles.forEach(c => gameScene.removeChild(c));\n circles = [];\n powerUps.forEach(p => gameScene.removeChild(p));\n powerUps = [];\n\n startScene.visible = false;\n helpScene.visible = false;\n gameOverScene.visible = true;\n gameScene.visible = false;\n\n //display highscore and player score\n playerScoreLabel.text = `Your score: ${timeLabel.text}`;\n\n //get highscore from localStorage\n highScore = localStorage.getItem(\"yxb1236HS\");\n if(highScore){\n highScore = parseInt(highScore);\n updateTime(highScore);\n highScoreLabel.text = `High Score: ${timeLabel.text}`;\n }\n else{\n highScore = 0;\n }\n if(highScore < time){\n localStorage.setItem(\"yxb1236HS\", time);\n }\n}", "function displayScore() {\n console.log(\"you won!\");\n //clearInterval(timerId);\n container.parentNode.removeChild(container);\n /****************Create Scroe Board Container********************/\n const scoreContainer = document.createElement('div');\n scoreContainer.setAttribute('class', 'scoreContainer');\n body.appendChild(scoreContainer);\n\n const checkImg = document.createElement('img');\n checkImg.setAttribute('src', './img/check-mark.gif');\n\n const congrats = document.createElement('h1');\n congrats.innerText = \"Congratulations! YOU Won!\";\n /**\n * calculate the players moves and display them with the stars\n */\n const playerStats = document.createElement('p');\n playerStats.innerText = \"With \" + moves + \" Moves and \" + stars + \" Stars \";\n /******calculate the time taken to finish the game**********/\n const currentTime = timerspan.innerText.split(':');\n const minutes = 15 - currentTime[0];\n const seconds = 0 - currentTime[1];\n console.log(minutes);\n\n const playerTime = document.createElement('p');\n playerTime.innerText = \"Time taken: \" + minutes + \":\" + (60 - Math.abs(seconds)) + \" minutes\";\n\n const againBtn = document.createElement('button');\n againBtn.innerText = \"Play Again\";\n againBtn.setAttribute('class', 'btnSuccess');\n againBtn.addEventListener('click', function () {\n window.location.reload();\n });\n\n const leaderBoard = document.createElement('h4');\n leaderBoard.innerText = \"Highest Score: \" + localStorage.getItem('highScore') + \" Stars\";\n\n scoreContainer.appendChild(checkImg);\n scoreContainer.appendChild(congrats);\n scoreContainer.appendChild(playerStats);\n scoreContainer.appendChild(playerTime);\n scoreContainer.appendChild(leaderBoard);\n scoreContainer.appendChild(againBtn);\n }", "function scoreboardMenu(){\r\n //if the sortedNames (or sortedScores) array is empty, load then top 3 from DB\r\n if(sortedNames.length == 0){\r\n getTop3();\r\n }\r\n else{ //else hide main menu table and populate HS menu and make visible\r\n hideMenuTable();\r\n fillHighScores();\r\n showScoreboardTable();\r\n }\r\n}", "function updateBoard() {\r\n\r\n if (playing) {\r\n //update values\r\n for (var r = 0; r < boardSize; r++) {\r\n for (var t = 0; t < boardSize; t++) {\r\n var key = tileKey(t, r);\r\n var tile = document.querySelector(\"#\" + key);\r\n board[key] != null ? tile.innerHTML = board[key] : tile.innerHTML = \"\";\r\n tile.className = \"tile\";\r\n tile.classList.add(\"tile-\" + board[key]);\r\n }\r\n }\r\n\r\n //update score\r\n scoreSpan.innerHTML = score;\r\n\r\n //check if game is over\r\n gameOver();\r\n }\r\n}", "function initFunction() {\n scores = [0, 0];\n activePlayer = 0;\n roundScore = 0;\n gamePlay = true;\n\n document.getElementById(\"score-0\").textContent = \"0\";\n document.getElementById(\"score-1\").textContent = \"0\";\n document.getElementById(\"current-0\").textContent = \"0\";\n document.getElementById(\"current-1\").textContent = \"0\";\n document.getElementById(\"name-0\").textContent = \"Player 1\";\n document.getElementById(\"name-1\").textContent = \"Player 2\";\n\n document.querySelector(\".player-0-panel\").classList.remove(\"winner\");\n document.querySelector(\".player-1-panel\").classList.remove(\"winner\");\n document.querySelector(\".player-0-panel\").classList.remove(\"active\");\n document.querySelector(\".player-1-panel\").classList.remove(\"active\");\n document.querySelector(\".player-0-panel\").classList.add(\"active\");\n}", "function load_level(level) {\n\t// if the level is found, load it and apply it\n\tif( game_levels[(level-1)] != undefined ) {\n\t\tgame_active_level = (level-1);\n\n\t\t// resize playing field\n\t\tvar playing_field = draw_field(\"game\", game_levels[game_active_level][0][0], game_levels[game_active_level][0][1]);\n\t\tdocument.getElementById('game').appendChild( playing_field );\n\n\t\t// activate cells\n\t\tfor( var i in game_levels[game_active_level][1] ) {\n\t\t\tdocument.getElementById('game_td_' + game_levels[game_active_level][1][i] ).className = \"fields_game_checked\";\n\n\t\t}\n\n\t\tdocument.getElementById('game_panel_rounds').value = game_levels[game_active_level][2];\n\t\tdocument.getElementById('game_panel_rounds').readOnly = \"readonly\";\n\t\tdocument.getElementById('game_panel_clicks').value = game_levels[game_active_level][3];\n\t\tdocument.getElementById('game_panel_level_goal').innerHTML = game_levels[game_active_level][5];\n\t\tdocument.getElementById('game_panel_active_level').value = ( game_active_level + 1 );\n\t\tdocument.getElementById('game_panel_living_cells').value = get_living_cells( \"game\" );\n\n\t\talert('Level '+level+' loaded. Have Fun!');\n\n\t\treturn true;\n\n\t// if the level is not found we display the game ends message\n\t} else {\n\t\talert('Congratulation! You have mastered all challenges!<br />GAME OVER! <a href=\"javascript: void(0);\" onclick=\"javascript: load_level(1);\">Click here to restart this game!</a>');\n\n\t\treturn false;\n\n\t}\n}", "function init() {\r\n BEST_SCORE = 0;\r\n load();\r\n GameMenu.updateHighScore(BEST_SCORE);\r\n }", "function load() {\r\n\t\tvar loaded = $.parseJSON(localStorage.getItem(STORAGE_NAME)),\r\n\t\t\tcondition = loaded.condition;\r\n\t\tSIZE = loaded.size;\r\n\t\tTOTALCELLS = SIZE*SIZE;\r\n\t\tMINES = loaded.minecells.length;\r\n\t\tcells = loaded.cells;\r\n\t\tminecells = loaded.minecells;\r\n\t\ttime = loaded.time;\r\n\t\tclicks = loaded.clicks;\r\n\t\tnewGame(true, loaded.board, condition);\r\n\t}", "function endGame() {\n // Overlay\n // Show score\n // Show table \n // Give user chance to restart\n // TODO: add high score to renderGUI\n\n uploadScore(score);\n score = 0;\n}", "function resetScores() {\n for (var i = 0; i < self.gameBoard.boxes.length; i++) {\n self.gameBoard.boxes[i].isX = false;\n self.gameBoard.boxes[i].isO = false;\n self.gameBoard.$save(self.gameBoard.boxes[i]);\n }\n\n //resets the game status for the new game\n self.gameBoard.gameStatus = \"Waiting for players\";\n self.gameBoard.p1 = 0;\n self.gameBoard.p2 = 0;\n self.gameBoard.tie = 0;\n self.gameBoard.turn = 0;\n self.gameBoard.player1.isHere = false;\n self.gameBoard.player1.myName = \"Fire\";\n self.gameBoard.player2.isHere = false;\n self.gameBoard.player2.myName = \"Ice\";\n self.gameBoard.displayBoard = false;\n self.gameBoard.$save(self.gameBoard)\n self.waiting = false;\n \n }", "function scoreBoard() \n {\n ctx.font = \"60px Ariel\"\n ctx.fillStyle = \"White\"\n ctx.fillText(score1, 355,170);\n ctx.fillText(score2, 415,170);\n }", "function GameOver() {\n //Om du ikke har flere liv igjen\n if (lives == 0) {\n let username=prompt(\"Username:\");\n setCookie(username,score,100);\n location.reload();\n }\n //Sjekker om vi er i kontakt med spøkelser\n if (pacman.x == white_sprite.x && pacman.y == white_sprite.y || pacman.x==white.prev[0]*sqaure && pacman.y==white.prev[1]*sqaure) {\n if (white.scared){\n white.x=1500000;\n score+=500\n }else{\n death_sound.play();\n lives--;\n incrementScore();\n clearInterval(main);\n reset();\n return\n }\n \n }\n if (pacman.x == green_sprite.x && pacman.y == green_sprite.y|| pacman.x==green.prev[0]*sqaure && pacman.y==green.prev[1]*sqaure) {\n if (green.scared){\n green.x=1500000;\n score+=500\n }else{\n death_sound.play();\n lives--;\n incrementScore();\n clearInterval(main);\n reset();\n return\n }\n \n }\n if (pacman.x == grey_sprite.x && pacman.y == grey_sprite.y || pacman.x==grey.prev[0]*sqaure && pacman.y==grey.prev[1]*sqaure) {\n if (grey.scared){\n grey.x=1500000;\n score+=500;\n }else{\n death_sound.play();\n lives--;\n incrementScore();\n clearInterval(main);\n reset();\n return\n }\n }\n if (pacman.x == evil_sprite.x && pacman.y == evil_sprite.y|| pacman.x==evil.prev[0]*sqaure && evil.y==white.prev[1]*sqaure) {\n if (evil.scared){\n evil.x=1500000;\n score+=500;\n }else{\n death_sound.play();\n lives--;\n incrementScore();\n clearInterval(main);\n reset();\n return\n }\n }\n}", "function resultScoreCheckingBeforePageReload() {\n\tvar playerScoresThisGame = [];\n\t\tplayerScoresThisGame.push(0);\n\t\tplayerScoresThisGame.push(0);\n\t\tplayerScoresThisGame.push(0);\n\tvar playerNamesThisGame = [];\n\t\tplayerNamesThisGame.push(\"AAA\");\n\n\t//first grab names from the input field.\n\tfor(var i=0; i < allPlayers.length; i++) {\n\t\tallPlayers[i].inputName = \n\t\t\tallResultVisuals.midLayer[\"player\" + (i+1) + \"c1\"].text()\n\t\t\t+ allResultVisuals.midLayer[\"player\" + (i+1) + \"c2\"].text()\n\t\t\t+ allResultVisuals.midLayer[\"player\" + (i+1) + \"c3\"].text();\n\t}\n\n\tplayerScoresThisGame[0] = allPlayers[0].score;\n\tplayerNamesThisGame[0] = allPlayers[0].inputName;\n\n\tfor(var i=1; i < allPlayers.length; i++) {\n\t\tif ( allPlayers[i].score >= playerScoresThisGame[0] ) {\n\t\t\tplayerScoresThisGame[2] = playerScoresThisGame[1];\n\t\t\tplayerNamesThisGame[2] = playerNamesThisGame[1];\n\t\t\tplayerScoresThisGame[1] = playerScoresThisGame[0];\n\t\t\tplayerNamesThisGame[1] = playerNamesThisGame[0];\n\n\t\t\tplayerScoresThisGame[0] = allPlayers[i].score;\n\t\t\tplayerNamesThisGame[0] = allPlayers[i].inputName;\n\t\t}\n\t\telse if ( allPlayers[i].score >= playerScoresThisGame[1] ) {\n\t\t\tplayerScoresThisGame[2] = playerScoresThisGame[1];\n\t\t\tplayerNamesThisGame[2] = playerNamesThisGame[1];\n\n\t\t\tplayerScoresThisGame[1] = allPlayers[i].score;\n\t\t\tplayerNamesThisGame[1] = allPlayers[i].inputName;\n\t\t}\n\t\telse if ( allPlayers[i].score >= playerScoresThisGame[2] ) {\n\t\t\tplayerScoresThisGame[2] = allPlayers[i].score;\n\t\t\tplayerNamesThisGame[2] = allPlayers[i].inputName;\n\t\t}\n\t}\n\n\tfor (var i = 0; i < 3 ; i++ ) {\n\t\tif(playerScoresThisGame[i] > highScores.score1) {\n\t\t\thighScores.score3 = highScores.score2;\n\t\t\thighScores.name3 = highScores.name2;\n\t\t\thighScores.score2 = highScores.score1;\n\t\t\thighScores.name2 = highScores.name1;\n\n\t\t\thighScores.score1 = playerScoresThisGame[i];\n\t\t\thighScores.name1 = playerNamesThisGame[i];\n\t\t}\n\t\telse if(playerScoresThisGame[i] > highScores.score2) {\n\t\t\thighScores.score3 = highScores.score2;\n\t\t\thighScores.name3 = highScores.name2;\n\t\t\thighScores.score2 = playerScoresThisGame[i];\n\t\t\thighScores.name2 = playerNamesThisGame[i];\n\t\t}\n\t\telse if(playerScoresThisGame[i] > highScores.score3) {\n\t\t\thighScores.score3 = playerScoresThisGame[i];\n\t\t\thighScores.name3 = playerNamesThisGame[i];\n\t\t}\n\n\t}\n\n\tdocument.cookie = \"score1=\" + highScores.score1;\n\tdocument.cookie = \"name1=\" + highScores.name1;\n\n\tdocument.cookie = \"score2=\" + highScores.score2;\n\tdocument.cookie = \"name2=\" + highScores.name2;\n\n\tdocument.cookie = \"score3=\" + highScores.score3;\n\tdocument.cookie = \"name3=\" + highScores.name3;\n\n}" ]
[ "0.67326576", "0.66934097", "0.6648998", "0.6632899", "0.66081715", "0.65841883", "0.65496093", "0.6536842", "0.6523126", "0.6519258", "0.6493572", "0.64858127", "0.6477509", "0.64551646", "0.64450794", "0.6436424", "0.64295477", "0.63991106", "0.63955563", "0.6362934", "0.6362549", "0.63576573", "0.6349776", "0.63456553", "0.6342645", "0.6308329", "0.6304914", "0.62991136", "0.62980455", "0.62859327", "0.6279523", "0.6233538", "0.6227461", "0.61977464", "0.6193117", "0.6183393", "0.61820304", "0.61802673", "0.6174989", "0.61626035", "0.6145058", "0.6111239", "0.60989344", "0.60951936", "0.60911614", "0.6081918", "0.6080841", "0.60757613", "0.6075748", "0.60629904", "0.6056446", "0.6052284", "0.60497195", "0.60491914", "0.6048014", "0.6043799", "0.60388756", "0.60357046", "0.60339993", "0.6018716", "0.60179186", "0.60109717", "0.60004884", "0.6000475", "0.5995878", "0.5994157", "0.5985695", "0.5984081", "0.59813553", "0.59791696", "0.5978199", "0.59776956", "0.5972877", "0.5966906", "0.596624", "0.59643644", "0.59640145", "0.5963761", "0.59623986", "0.5961315", "0.59587896", "0.59585834", "0.59528416", "0.5948761", "0.59436905", "0.5941861", "0.5940163", "0.59387505", "0.5936985", "0.5933016", "0.5930354", "0.59281826", "0.592418", "0.5917122", "0.5917034", "0.5912667", "0.590968", "0.59086084", "0.5907487", "0.5901937" ]
0.6201317
33
possibly pass the field from the home page to state dynamically render these buttons i.e application sent field is not null sent to state somehow lift clicks to info block
handleInProgressClick() { this.setState({status:"in progress"}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buttonHandler(){\n\t\tvar items = this.props.hey.questions.present;\n\t\tlet conditions = this.props.hey.conditions.present;\n\t\tlet counter = this.props.hey.counter.present;\n\t\tconst action = this.props.action;\n\t\tconst increment = this.props.increment;\n\t\tconst hide = this.props.hideState;\n\t\tsendButtonHandler(items,conditions,counter,action,increment,hide);\n\t}", "handlesClick(){\n \n const selectedFieldsValueParam = this.selectedFieldsValue;\n const showComp = this.showScreen;\n this.hideObjectScreen=false;\n const isHideObjectScreen= this.hideObjectScreen;\n \n //console.log('Hi' +showComp);\n // console.log('selectedFieldsValueParam=='+this.selectedFieldsValue);\n // console.log('selectedFieldsValueParam= '+selectedFieldsValueParam);\n\n //show error if no rows have been selected\n if(selectedFieldsValueParam ===null || selectedFieldsValueParam===''){\n const evt = new ShowToastEvent({\n title: this._title,\n message: this.message,\n variant: this.variant,\n });\n this.dispatchEvent(evt);\n }\n else {\n //propage event to next component\n const evtCustomEvent = new CustomEvent('retreive', {\n detail: { selectedFieldsValueParam,showComp,isHideObjectScreen}\n });\n this.dispatchEvent(evtCustomEvent);\n }\n }", "registerClick() {\n \n if(this.state.block_Highlight) { \n this.setState({\n block_Highlight:false, \n })\n saveVisitedAdaptation(\"Block_User\",\"NewsFeed_highlight\");\n }\n\n registerEvent('Clicked on '+this.props.name+\"'\\s profile link to visit their profile page\", 'from post '+this.props.index,(this.props.forTimeline?\"Timeline\":\"NewsFeed\")); \n }", "_handleOkButton() {\n const { setModalVisible, pageName } = this.props;\n const {\n selectedThermometer,\n selectedCoolFan,\n selectedHumidifier\n } = this.state;\n if (pageName === KO.thermometer) {\n BabyActions.setSelectedThermometer(selectedThermometer);\n } else if (pageName === KO.coolFan) {\n BabyActions.setSelectedCoolFan(selectedCoolFan);\n } else if (pageName === KO.humidifier) {\n BabyActions.setSelectedHumidifier(selectedHumidifier);\n }\n setModalVisible(false);\n }", "display () {\n return this.getChecklistTemplate(template => {\n return this.getTemplateItems(template, (templateItems) => {\n return this.getTemplateItem(templateItems, (templateItem) => {\n let btn\n if (template.properties['usable']) {\n btn = <div>{templateItem.actions.map(actions =>\n <button key={actions.name}\n onClick={() => this.setState({action: actions, template_id: templateItem.properties['checklisttemplate_id']})}>\n {actions.title}\n </button>\n )}\n </div>\n }\n return (\n <div>\n {btn}\n <button key='back' onClick={() => this.props.onReturn()}>Back</button>\n <ul>\n <li><b>Item Id:</b> {templateItem.properties['templateitem_id']}</li>\n <li><b>Name:</b> {templateItem.properties['name']}</li>\n <li><b>Description:</b> {templateItem.properties['description']}</li>\n <li><b>Template Id:</b> {templateItem.properties['checklisttemplate_id']}</li>\n </ul>\n </div>\n )\n })\n })\n })\n }", "handleBackClick(backParam){\n \n if(backParam===\"fromProduct\"){\n this.setState({\n showParam:'0',\n });\n}else{\n this.setState({\n showParam:'1',\n });\n}\n}", "onClickOK_ContactInfoSuggestion() {\n \n this.setState({\n displayContactInfoSuggestion:false,\n })\n \n if(this.props.displayContactInfoSuggestion && this.props.displayContactInfoSuggestion) {\n \n this.setState({\n displayBasicInfoSuggestion:true,\n })\n }\n \n }", "handleButton() {}", "handleClickMe() {\n console.log(\"State 6\");\n this.props.fields.applyingForSelf.onChange(true);\n if(this.props.fields.dependent.value){\n this.props.resetDep();\n this.props.fields.dependent.onChange(false);}\n this.saveFieldValues();\n this.props.nextStep(6)\n }", "enableButton(){\n let myPrice = this.state.price;\n let myAddress = this.state.address;\n let myType = this.state.type;\n let myCity = this.state.city;\n let myState = this.state.us_state;\n //let mLat = this.state.lat;\n //let mLong = this.state.long;\n let myUsername = \"\";\n if (myType && myAddress && myPrice && myCity && myState){ //Checks if no fields empty\n this._handlePress();\n } else{\n Alert.alert (\n 'Cannot Submit yet',\n 'please fill out all fields'\n );\n }\n}", "submitButtonHandler() {\n\n var arr = [this.refs.in_roll.value, this.refs.in_name.value, this.refs.in_major.value]\n this.setState({ 'edit_mode_name': '' });\n this.setState({ 'edit_mode_id': '' });\n this.setState({ 'edit_mode_major': '' });\n debugger;\n this.props.onButtonClick(arr, this.edit_mode_toggle);\n }", "_beforeRender () {\n if (webix.ARCHIBUS.buttonsMap) {\n for (var key in webix.ARCHIBUS.buttonsMap) {\n var button = webix.ARCHIBUS.buttonsMap[key];\n this.on_click[button.class] = webix.actions[button.function];\n }\n }\n if (webix.ARCHIBUS.editButtonMap) {\n for (var key in webix.ARCHIBUS.editButtonMap) {\n var button = webix.ARCHIBUS.editButtonMap[key];\n this.on_click[button.class] = button.function;\n }\n }\n }", "render(){\n const toRender = this.state.visible ? (<PostDetails />) : (<GetPeminjaman />);\n return (\n <div className='Peminjaman'>\n <Button onClick={() => { this.setState({visible: !this.state.visible}) }}>Change View!</Button>\n <br />{toRender}\n </div>\n );\n }", "_handleClick() {\n if ((this.state.typeName === 'password' && this.state.isPristine) || (this.state.typeName === 'password' && !this.state.isPristine)) {\n this.setState({\n typeName: 'text',\n toggleLabelState: 'Hide ' + this.props.type,\n isPristine: false\n });\n } else {\n this.setState({\n typeName: 'password',\n toggleLabelState: this.props.toggleLabel,\n });\n }\n\n }", "renderButton() {\n const { onDecrement, onIncrement, joined, fortNiteId } = this.props;\n\n if (fortNiteId === '') {\n return <input className=\"PrimaryButton\" type=\"button\" name=\"join\" value=\"JOIN\"></input>\n } else if (joined) {\n return <input className=\"SecondaryButton\" type=\"button\" name=\"join\" value=\"LEAVE\" onClick={onDecrement}></input>\n }\n return <input className=\"PrimaryButton\" type=\"button\" name=\"join\" value=\"JOIN\" onClick={onIncrement}></input>\n }", "function updateUI(){\n\t\t\t\tExt.each(toggleFields, function(fieldName){\n\t\t\t\t\t//var el = form.findField(fieldName).getEl().up('div.x-form-item');\n\t\t\t\t\t//el.setVisibilityMode(Ext.Element.DISPLAY).setVisible(rec.data['has_' + fieldName] == '1');\n\t\t\t\t\tform.findField(fieldName).setVisible(rec.data['has_' + fieldName] == '1');\n\t\t\t\t});\n\t\t\t\t// because imagePreview_image_id is not a formField but a button, we cannot find it with form.findField():\n\t\t\t\t[''].concat(LANGUAGES).forEach(function(lang) {\n\t\t\t\t\tvar key = 'ImagePreview_image_id' + (lang ? '_' + lang : '');\n\t\t\t\t\tif (formPanel[key]) {\n\t\t\t\t\t\tformPanel[key].setVisible(rec.data.has_image == 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (typeof rec.data.variables !== 'undefined' && form.findField('variables')) {\n\t\t\t\t\tform.findField('variables').setVisible(rec.data.variables && rec.data.variables.length);\n\t\t\t\t}\n\t\t\t}", "clickHandler() {\n // Activate if not active\n if (this.active === false) {\n // Button view press effect\n this.changeToActive();\n // No click 'action' for input - text is removed in visualEffectOnActivation\n }\n }", "handleClickOnComponent(item, e) {\n if(item.id === this.state.activeComponentId) {\n this.setState({activeComponentId: '', activeComponentName: ''});\n } else {\n if(item.subType === 'CUSTOM') {\n let config = item.topologyComponentUISpecification.fields,\n name = _.find(config, {fieldName: \"name\"});\n let activeComponentName = name ? name.defaultValue : 'Custom';\n this.setState({activeComponentId: item.id, activeComponentName: activeComponentName});\n } else {\n this.setState({activeComponentId: item.id, activeComponentName: item.name});\n }\n }\n state.showSpotlightSearch = false;\n this.props.addComponentCallback(item);\n }", "quizKeybtn() {\n const { quizUniquekey } = this.state;\n if (quizUniquekey !== '') {\n this.setState({\n uniqueKeywritten: true,\n sidedivShowcondition: false\n })\n }\n }", "handleNewAnnouncementButtonClick() {\r\n this.setState({\r\n tableRowData: this.emptyForm,\r\n formVisible: true\r\n });\r\n }", "handleClickhashtag(event) {\n if (!this.state.value1.length) {\n Swal.fire(\"Please AddHashtag First!\", \"\", \"warning\");\n this.handleCloseModel();\n } else {\n event.preventDefault();\n this.setState({ isLoaded: false });\n this.getHashTag();\n this.handleCloseModel();\n this.setState({ value1: '' });\n }\n }", "renderConfirmalButton() {\n const { onArrivalConfirmed, showConfirmationButton } = this.props;\n const { destinationReached } = this.state;\n\n if (!showConfirmationButton || !destinationReached) {\n return null;\n }\n\n return this.renderButton('Confirm Arrival', onArrivalConfirmed);\n }", "render() {\n { // This is a conditional statement saying that if it false just render the button with the toggle function\n if (this.state.hasLoaded) {\n return (\n <>\n <button type=\"button\" onClick={() => this.toggleLoaded()}>Toggle hasLoaded's state</button>\n </>\n )\n } else { // This is stating that once the toggle button is clicked to render the placeholder and a button to toggle it back to false\n return (\n <>\n <h1>{this.state.text}</h1>\n <input type=\"text\" value={this.state.text} placeholder={this.state.placeholder} onChange={(params) => this.handleEvent(params)} />\n <button type=\"button\" onClick={() => this.toggleLoaded()}>Click Me</button>\n </>\n )\n }\n }\n }", "handleClick(event){ \n const valueParam = this.value;\n const selectedFieldsValueParam = this.selectedFieldsValue;\n //show error if no rows have been selected\n if(selectedFieldsValueParam ===null || selectedFieldsValueParam===''){\n const evt = new ShowToastEvent({\n title: this._title,\n message: this.message,\n variant: this.variant,\n });\n this.dispatchEvent(evt);\n }\n else {\n //propage event to next component\n const evtCustomEvent = new CustomEvent('retreive', { \n detail: {valueParam, selectedFieldsValueParam}\n });\n this.dispatchEvent(evtCustomEvent);\n } \n }", "function handleShipToAddress() {\n differentStorePickup = false;\n $.next_button.setTitle(_L('Next'));\n}", "handleClick() {\n var thisType;\n if(this.props.type === \"text\") {\n thisType = \"string\";\n } else if (this.props.type === \"boolean\") {\n thisType = \"boolean\"\n }\n\n let thisField = {\n id: this.props.name,\n title: this.props.name,\n type: thisType\n };\n let formJson = this.props.getFormJson();\n if(formJson) {\n //TODO: find the correct section and subsection instead of\n //supporting only one section and subsection\n formJson.sections[0].subsections[0].fields.push(thisField);\n this.props.setFormJson(formJson);\n }\n }", "handleEmailClick(event){\n this.setState({\n flag2: false, //results\n flag3:true, //email\n flag1:!this.state.flag1, //input\n flag4:false //header information\n })\n }", "showCityWeather() {\n if (!this.state.City) { //if null or undefined \n return <p className=\"placeholder\">Click on a City</p>\n }\n else {\n return (\n <WeatherDetails\n City={this.state.City}\n />\n )\n }\n }", "function ThiefExposition(props) {\n return (\n <div>\n \n <ExpoBtn\n className={props.hideState}\n id = \"thiefNo\"\n onClick={props.handleBtnClick}\n data-value=\"thiefNo\"\n name=\"No\"\n />\n <ExpoBtn\n className={props.hideState}\n id = \"thiefYes\"\n onClick={props.handleBtnClick}\n data-value=\"thiefYes\"\n name=\"Yes\"\n />\n\n \n </div>\n );\n}", "checkButton()\n {\n if(this.imeModel==\"\" || this.emailModel==\"\" || this.telefonModel==\"\")\n {\n this.butShow=false;\n }\n else\n {\n this.butShow=true;\n }\n }", "displayNewTripButton() {\n // If finished, display the button to set a new trip\n if (this.state.finished) {\n return <div>\n <p>New destination : </p>\n <input id=\"inputDestination\" type=\"text\" placeholder=\"Destination\" style={{width: '80%', float: 'left'}} onChange={this.handleChange}/>\n <button className=\"button\" onClick={this.updateTrip}>Go</button>\n </div>;\n }\n // else, display nothing\n\n return null;\n }", "hideSelectButton(e) {\n if(e.target.dataset.testid !== \"body-goal\" || e.target.dataset.txt === \"Select\") {\n this.setState({ buttonPressed: false });\n }\n if(e.target.dataset.txt === \"I'll do this later\") {\n this.props.history.push(\"/Landing\");\n }\n }", "function processPageInputs() {\n\tlet page_inputs = getValueFromAppState('page_inputs');\n\tif (page_inputs === null) {\n\t\tloadUserRoleLandingPage(\"anonymous\");\n\t\treturn;\n\t}\n\tif (page_inputs.length > 0) {\n\t\turl_input_parameters = new URLSearchParams(page_inputs);\n\t} else {\n\t\tloadUserRoleLandingPage(\"anonymous\");\n\t\treturn;\n\t}\n\tlet page_component = dx_page_manager.getMobilePageAlternate(url_input_parameters.get(\"view\"));\n\tlet view = \"pages/\"+page_component;\n\tupdateAppState(\"CurrentPage\",view);\n\tif ((typeof url_input_parameters.get(\"view\") === \"undefined\") || (url_input_parameters.get(\"view\") == null)) {\n\t\tthrow new Error(\"Invalid component name provided. Click here to visit the setup page: \"+getServerRootPath()+\"divblox/\");\n\t} else {\n\t\taddPageToRootHistory(page_component);\n\t\tloadComponent(view,null,'body',{\"uid\":page_uid},false);\n\t}\n\tif (debug_mode) {\n\t\tdxPostExternal(getServerRootPath()+\"divblox/config/framework/check_divblox_admin_logged_in.php\",{},\n\t\t\tfunction(data) {\n\t\t\t\tlet data_obj = JSON.parse(data);\n\t\t\t\tif (data_obj.Result == \"Success\") {\n\t\t\t\t\tlet admin_links_html = '<a target=\"_blank\" href=\"'+getServerRootPath()+'divblox/\" ' +\n\t\t\t\t\t\t'style=\"position: fixed;bottom: 10px;right: 10px;\">' +\n\t\t\t\t\t\t'<img src=\"'+getRootPath()+'divblox/assets/images/divblox_logo.svg\" style=\"max-height:30px;\"/></a>' +\n\t\t\t\t\t\t'<a target=\"_blank\" href=\"'+getRootPath()+'component_builder.php?component='+view+'\" ' +\n\t\t\t\t\t\t'class=\"btn btn-outline-primary btn-sm\" style=\"position: fixed;bottom: 10px;right: 105px;font-family: -apple-system, BlinkMacSystemFont, \\'Segoe UI\\',' +\n\t\t\t\t\t\t' Roboto, \\'Helvetica Neue\\', Arial, \\'Noto Sans\\', sans-serif, \\'Apple Color Emoji\\', \\'Segoe UI Emoji\\',' +\n\t\t\t\t\t\t' \\'Segoe UI Symbol\\', \\'Noto Color Emoji\\'; font-size:14px;\"><i class=\"fa fa-wrench\"' +\n\t\t\t\t\t\t' aria-hidden=\"true\"></i> Component Builder</a>';\n\t\t\t\t\t$('body').append(admin_links_html);\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction(data) {});\n\t}\n}", "render() {\n deactivate_button_value = this.state.program.is_active ? \"Deactivate Program\" : \"Activate Program\";\n\n const programType = `program-${this.state.program.id}`;\n return (\n <div className=\"infobox-col\">\n <div className=\"infobox-container\">\n <div className={`infobox-title ${programType}`}>\n <h1 className={`classroom-program`}>\n { this.state.program.name }\n </h1>\n </div>\n <div className=\"infobox-content\">\n <div className=\"program-status-container\">\n <h2 className=\"grid-label\">Program Status</h2>\n <div className=\"info-data number\">\n { this.state.program.is_active ? \"Active\" : \"Inactive\" }\n </div>\n <div className=\"toggle-container\">\n <input type=\"checkbox\" id=\"active-toggle\" className=\"toggle\"></input>\n <label className={`toggle-btn toggle-${this.state.program.is_active}`}\n htmlFor=\"active-toggle\" onClick={this._attemptSave}></label>\n </div>\n </div>\n <div>\n <h2 className=\"grid-label\">Edit Forms</h2>\n <div className=\"info-data\">\n <a href={this._getFormLink(this.state.program.pre_id)} target=\"_blank\">\n Pre-Assessment\n </a>\n </div>\n <div className=\"info-data\">\n <a href={this._getFormLink(this.state.program.post_id)} target=\"_blank\">\n Post-Assessment\n </a>\n </div>\n <div className=\"info-data\">\n <a href={this._getFormLink(this.state.program.additional_id)} target=\"_blank\">\n Classroom Questions\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n }", "render() {\n return (\n <Card className={styles.card}>\n <Card.Body>\n {this.props.children}\n {this.state.visbility ? (\n <p>You need to click on the button to login :)</p>\n ) : null}\n {this.props.info ? (\n <Button className={styles.toggleinfo} onClick={this.showInfo} variant=\"info\">{this.state.visbility ? \"Hide Info\" : \"Show Info\"}</Button>\n ) : null}\n </Card.Body>\n </Card>\n );\n }", "getButtonText() { return this.state.cardState == \"Question\" ? \"See Answer\" : \"See Question\"; }", "onbuttonClick (event) {\n event.preventDefault();\n this.setState ({\n buttonclicked:true,\n buttonText: '',\n svgIconMore: '',\n svgiconLess_neayby: '',\n svgIconMore_nearby: <Svg ><path d=\"M16.003 18.626l7.081-7.081L25 13.46l-8.997 8.998-9.003-9 1.917-1.916z\"/></Svg>,\n svgIconLess: <Svg ><path d=\"M15.997 13.374l-7.081 7.081L7 18.54l8.997-8.998 9.003 9-1.916 1.916z\"/></Svg>,\n seeLessText: 'See less neighborhood details',\n nearbyhouse: 'See more nearby house',\n nearbyButtonMore: false,\n nearbyhouseless: '',\n nearbyButtonLess: false\n})\n}", "function LEAD_FORM_HANDLER(state, collection) {\n if (collection.apntVisible) {\n state.leadsFormHandler.apntVisible = collection.apntVisible;\n state.leadsFormHandler.divshow = collection.divshow;\n console.log(collection);\n } else if (collection.dateTimeVisible) {\n state.leadsFormHandler.dateTimeVisible = collection.dateTimeVisible;\n console.log(collection);\n } else if (collection.showChildFields) {\n state.leadsFormHandler.showChildFields = collection.showChildFields;\n }\n // console.log(collection);\n\n // Fresh Lead Indicator :\n else if (collection.freshLead) {\n // if (state.leadsFormHandler.freshLead === true) {\n state.leadsFormHandler.freshLead = collection.freshLead;\n // } else if (state.leadsFormHandler.freshLead === false) {\n // state.leadsFormHandler.freshLead = true\n // }\n } else if (collection.httpMethod) {\n // It Accept String POST or PUT\n state.leadsFormHandler.httpMethod = collection.httpMethod; /** Http Method POST and PUT */\n console.log('HTTP METHOD: ', collection.httpMethod);\n } else if (collection._leadId) {\n state.leadsFormHandler._leadId = collection._leadId;\n }\n}", "function handleShipToStore() {\n differentStorePickup = false;\n $.next_button.setTitle(_L('Next'));\n}", "render() {\n const text = this.state.followed ? 'un-follow' : 'follow';\n const label = this.state.followed ? 'Following' : 'Follow'\n return (\n <div className=\"customContainer\">\n <button className=\"btn-primary\" onClick={this.handleClick} >\n {label}</button>\n <p className={styles.followText}>\n Click to {text} this Country (must be logged in to follow)\n </p>\n </div>\n );\n }", "onclickstack(item) {\n var valueIntxt=this.state.searchquery;\n this.mixpanelTrack(\"Discover Stax Opened Category :\"+item.category);\n this.mixpanelTrack(\"Discover Stax Opened \" +item.category+\" :\"+item.widgetname);\n if(valueIntxt!=\"\")\n {\n this.mixpanelTrack(\"Discover Stax Selected\");\n } \n const { navigate } = this.props.navigation;\n navigate(\"store_purchase\", user = { \"staxid\": item.key, \"category\": item.category,\"goback\":\"1\" });\n }", "showButtons(valutation, assignment) {\n\n let stateCurrentAssignment = '';\n //Set stateCurrentAssignment to the current state of the assignment\n this.state.assignments.forEach(assignment => {\n if (valutation.assignment_id === assignment.id) {\n stateCurrentAssignment = assignment.state;\n }\n })\n\n if (stateCurrentAssignment === 'Booked') {\n return (\n <div style={{ position: 'relative', right: '50px' }}>\n <CustomButton\n block\n bsStyle='success'\n onClick={\n () => {\n\n this.setState({\n operationToConfirm: 'Assegna incarico',\n selectedValutation: valutation,\n selectedAssignment: assignment,\n })\n\n this.setShowConfirm();\n\n\n }\n }\n >\n Assegna incarico\n </CustomButton>\n </div>\n )\n }\n else if (stateCurrentAssignment === 'Unassigned') {\n let showSendRequestButton = false;\n \n this.state.assignments.forEach(el => {\n \n if (el.id === assignment.id) {\n console.log('Ciao')\n if (el.student == null || el.student === '') {\n \n showSendRequestButton = true;\n }\n }\n })\n if (showSendRequestButton) {\n return (\n <div style={{ position: 'relative', right: '50px' }}>\n <CustomButton\n block\n bsStyle='success'\n onClick={\n () => {\n\n this.setState({\n operationToConfirm: 'Invia richiesta',\n selectedValutation: valutation,\n selectedAssignment: assignment,\n })\n\n this.setShowConfirm();\n\n\n }\n }\n\n >\n Invia richiesta\n </CustomButton>\n </div>\n )\n }\n else {\n return (\n <div style={{ position: 'relative', right: '50px' }}>\n <CustomButton\n block\n bsStyle='warning'\n disabled\n >\n Nessun operazione\n </CustomButton>\n </div>\n )\n }\n\n }\n else {\n return (\n <div style={{ position: 'relative', right: '50px' }}>\n <CustomButton\n block\n bsStyle='warning'\n disabled\n >\n Nessun operazione\n </CustomButton>\n </div>\n )\n }\n }", "handleClick(e) {\n// change clicked to target Value\n const clicked = e.target.innerHTML;\n if (isNaN(clicked)) {\n clicked === 'Clear' ?\n this.props.clear()\n : \n clicked === 'Start' ?\n this.props.start() \n :\n clicked === 'Cancel' ?\n this.props.cancel()\n :\n this.props.togglePause(); \n }else {\n this.props.updateUserInput(clicked);\n } \n }", "getAssignmentButton() {\n if(this.props.whichPaneActive == 'teamsPane' && this.props.usingDivisions) {\n var tooltip = 'Assign divisions to selected teams';\n return (\n <button className=\"btn-flat waves-effect yellow-darken-3 tooltipped\"\n data-tooltip={tooltip} accessKey=\"d\" onClick={this.openDivModal}>\n Assign <span className=\"hotkey-underline\">D</span>ivisions\n </button> );\n }\n if(this.props.whichPaneActive == 'gamesPane' && this.props.usingPhases) {\n var tooltip = 'Assign phases to selected games';\n return (\n <button className=\"btn-flat waves-effect yellow-darken-3 tooltipped\"\n data-tooltip={tooltip} accessKey=\"p\" onClick={this.openPhaseModal}>\n Assign <span className=\"hotkey-underline\">P</span>hases\n </button> );\n }\n return null;\n }", "btnClick() {\n\t\tthis.socket.emit(\"btn state\", this.props.btnValue);\n\t}", "bindDisplaySavedNozzlesUI(handler) {\n this.header.displaySavedNozzlesButton.addEventListener('click', e => {\n \n e.preventDefault()\n handler()\n })\n }", "handleClick(itemName, type) {\n console.log(\"Click in ProjDetail\");\n console.log(itemName);\n console.log(type);\n //Already got the table, sp, func details in this.state; don't need to call API again\n switch(type) {\n case \"tables\":\n this.getCurrentDBItem(this.state.tableItems, itemName, \"TABLE\");\n break;\n case \"sp\":\n this.getCurrentDBItem(this.state.spItems, itemName, \"SP\");\n break;\n case \"func\":\n this.getCurrentDBItem(this.state.funcItems, itemName, \"FUNCTION\");\n break;\n default:\n console.log(\"Sorry No Data\");\n }\n }", "render() {\n const blockHistory = this.props.AppObj.state.historyCBlockId;\n\n return (\n <button onClick={this.goBack}\n disabled={blockHistory.length === 0}>{DC.BLOCK_PREVIOUS}</button>\n );\n }", "handleOkayButton() {\n const splittedBrand = this.state.pcComponentBrand.split('.');\n const splittedCategory = this.state.pcComponentCategory.split('.');\n const pcComponent = {\n pcComponentName: this.state.pcComponentName,\n pcComponentBrand: splittedBrand[1],\n pcComponentCategory: splittedCategory[1],\n pcComponentBrandID: splittedBrand[0],\n pcComponentCategoryID: splittedCategory[0]\n }\n this.props.onOkay(pcComponent);\n this.clearAreas();\n\t}", "function backButtonHandler() {\n switch (currentState) {\n case \"SelectAnomalyTypes\":\n saveAnomalyTypesForm();\n basicInputs = (0, _EnvironmentBuilder.getBasicInputs)();\n (0, _EnvironmentBuilder.loadEnvironmentBuilderPage)(basicInputs.name, basicInputs.height, basicInputs.width);\n break;\n case \"SelectElementTypes\":\n if ((0, _FormValidators.checkCustomInputs)()) {\n saveElementTypesForm();\n loadAnomalySelectionForm();\n }\n break;\n case \"SelectTerrainModificationTypes\":\n if ((0, _FormValidators.checkCustomInputs)()) {\n saveTerrainModificationTypesForm();\n loadElementSelectionForm();\n }\n break;\n case \"ElementSeedForm\":\n if ((0, _FormValidators.checkCustomInputs)()) {\n saveElementSeedForm();\n loadPreviousElementSeedForm();\n }\n break;\n case \"TerrainModificationForm\":\n if ((0, _FormValidators.checkCustomInputs)()) {\n saveTerrainModificationForm();\n loadPreviousTerrainModificationForm();\n }\n break;\n case \"AnomalyForm\":\n if ((0, _FormValidators.checkCustomInputs)()) {\n saveAnomalyForm();\n loadPreviousAnomalyForm();\n }\n break;\n case \"ReviewForm\":\n document.getElementById(\"next-button\").innerText = \"Next\";\n loadPreviousAnomalyForm();\n }\n}", "unsignedButtonClicked()\n\t{\n\t\tthis.db.set( 'letterType', 3 );\n\t\treturn this.router.navigateToRoute( 'voting-form' );\n\t}", "onAddSuppliesClick() {\n const edit = this.state.editing;\n const visible = this.state.inputsVisible;\n this.setState({\n editing: !edit,\n inputsVisible: !visible\n });\n }", "function handleClick(e) {\n let dataButton = e.target.getAttribute(\"data-button\");\n displayValue(dataButton);\n}", "countryTransactionDetail(e, country_code, selected_country) {\n this.props.actions.ipTransactionDetails(country_code, 1);\n this.setState({\n selected_country_code: country_code,\n selected_country: selected_country,\n showModal: true,\n activePage: 1\n });\n }", "constructor(props) {\n super(props);\n this.state = {\n title: '',\n mcode: '',\n author: '',\n description: '',\n price: '',\n\n buttonClass: 'button is-primary is-medium is-fullwidth',\n accessControls: false\n };\n }", "handleShowPartyClick (event) {\n var btn = event.currentTarget;\n var innerHtml = btn.innerHTML;\n var newText = innerHtml === \"Hide the Party Members\" ? \"See the Party Members\" : \"Hide the Party Members\";\n\n btn.innerHTML = newText;\n }", "onInfoWindowOpen(props, e) {\n const content = (\n <div>\n <Typography variant=\"h6\">{this.state.selectedPlace.name}</Typography>\n <Typography variant=\"body1\">{this.state.selectedPlace.address}</Typography>\n <br />\n <Typography variant=\"body1\">\n Additional Directions: {!this.state.selectedPlace.additionalDirections ?\n \"none\" : this.state.selectedPlace.additionalDirections}\n </Typography>\n <span>\n <Button onClick={this.onDirectionsClick}>Directions</Button>\n {this.props.user ? <Button onClick={this.onRateClick}>Rate</Button> : <></>}\n </span>\n </div>\n );\n ReactDOM.render(\n React.Children.only(content),\n document.getElementById(\"iwc\")\n );\n }", "render(){\n\t\t\tconsole.log(this.props);\n\t\t\tlet specificFieldsPresent\n\t\t\tconst registered = this.state.registered;\n\t\t\tconsole.log(this.state.specificFields);\n\n\t\t\tif (this.props.specificFields.length > 0) {\n\t\t specificFieldsPresent = true;\n\t\t } else {\n\t\t specificFieldsPresent = false;\n\t\t }\n\t\t console.log(specificFieldsPresent)\n\n\t\t\n\n\t\t\treturn(\n\t\t\t\t<div className=\"container\">\n\n\t\t \t\t\t{registered ? (\n\t\t \t\t\t\t<h5> You are registered for this event! </h5>\n\t\t \t\t\t\t\n\t\t\t\t\t\t):(\n\t\t\t\t\t\t<div className = \"registrationForm\">\n\t\t\t\t\t\t{specificFieldsPresent ? (\n\t\t\t\t\t\t\t<form onSubmit={this.handleSpecificFieldsRegistration}>\n\t\t\t\t\t\t\t\t{this.state.specificFields.map((specificField,idx) =>(\n\t \t\t\t\t\t\t\t\t\t<div className=\"specificFieldDiv\">\n\t \t\t\t\t\t\t\t\t\t\t<SingleInput\n\t \t\t\t\t\t\t\t\t\t\tinputType={'text'}\n\t \t\t\t\t\t\t\t\t\t\ttitle={specificField.fieldName}\n\t \t\t\t\t\t\t\t\t\t\tvalue={specificField.response}\n\t \t\t\t\t\t\n\t \t\t\t\t\t\t\t\t\t\tcontrolFunc={this.handleSpecificResponseChange(idx)}\n\t \t\t\t\t\t\t\t\t\t\t />\n\t \t\t\t\t\t\t\t\t\t</div>\n\n\t \t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t type=\"submit\"\n\t\t\t\t\t\t\t className=\"btn btn-primary float-right\"\n\t\t\t\t\t\t\t value=\"Submit\">\n\n\t\t\t\t\t\t\t Register\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</form>\n\n\t\t\t\t\t\t\t):(\n\t\t\t\t\t\t\t<form onSubmit={this.handleEasyRegistration}>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t type=\"submit\"\n\t\t\t\t\t\t\t\t className=\"btn btn-primary float-right\"\n\t\t\t\t\t\t\t\t value=\"Submit\">\n\n\t\t\t\t\t\t\t\t Register\n\t\t\t\t\t\t\t\t\t</Button>\t\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t)}\t\n\t \t\t\t\t\t\t \n\t\t\t\t</div> \n\t\t\t)\n\t\t}", "changeUIAccordingToAppState(appState,dataCtrl,appCtrl){ \n const searchBoxPart = `\n <div class=\".container-fluid mx-auto text-center\" style=\"display:flex;margin:5px 5px\">\n <form class=\"form mx-auto w-100\" style=\"display:inline!important\">\n <div class=\"form-inline row text-center mx-auto\">\n <div class=\"form-group frm-setp col-10 w-100\">\n <input id=\"${this.searchFieldIDs.searchBox}\" class=\"form-control\" type=\"search\" placeholder=\"Search\" aria-label=\"Search\" style=\"width:90%!important\" />\n </div>\n <div class=\"form-group frm-setp col-2 w-100\">\n <button id=\"${this.searchFieldIDs.searchButton}\" class=\"btn btn-outline-secondary not-include\" type=\"button\" style=\"width:100%!important\" style=\"display:inline\">Limpar</button>\n </div>\n </div>\n </form>\n </div>\n `\n if(appState===(appCtrl.returnAppStateList())._INITIAL){\n this.clearMaintContent()\n this.iterateOverButtons(this.listOfClasses.btnActive) ? this.iterateOverButtons(this.listOfClasses.btnActive).classList.remove(this.listOfClasses.btnActive) : null\n this.mainContent.innerHTML = `\n <div class=\"card card-body d-table-cell align-middle w-100\">\n <p class=\"h2\" style=\"color:rgba(65, 105, 225, 0.534)\">Escolha uma das opções à esquerda</p>\n </div>\n `\n this.mainContent.style.border= 'rgba(65, 105, 225, 0.534) 14px solid'\n }\n if(appState===(appCtrl.returnAppStateList())._ACESSO){\n this.clearMaintContent()\n const data = dataCtrl.returnData('funcis')\n var innerTable = []\n data.forEach(funci =>{\n innerTable = ` ${innerTable}\n <tr>\n <td class=\"text-center\">\n <input id=\"${funci.matricula}\" type=\"checkbox\" name=\"participante\" ${(funci.acesso===1)? 'checked' : ''}>\n </td>\n <td class=\"text-center\">${funci.matricula}</td>\n <td class=\"text-left\">${funci.nome}</td>\n <td class=\"text-center\">${funci.nome_area_trabalho}</td>\n <td class=\"text-center\">${funci.nome_equipe}</td>\n </tr>\n `\n })\n var table = `\n \n ${searchBoxPart}\n \n <div id=\"${this.searchFieldIDs.dynamicTable}\" class=\".container-fluid\" style=\"height:${this.height}vh!important;overflow-y:scroll\"> \n <table class=\"table table-sm table-hover table-striped mx-auto\">\n <thead class=\"thead-dark\">\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Acesso</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Matricula</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Nome</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Area</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Equipe</th>\n </thead>\n <tbody>\n ${innerTable}\n </tbody>\n </table>\n </div>\n \n `\n this.mainContent.innerHTML = table\n }\n if(appState===(appCtrl.returnAppStateList())._PARTICIPANTES){\n this.clearMaintContent()\n const data = dataCtrl.returnData('funcis')\n var innerTable = []\n data.forEach(funci =>{\n innerTable = ` ${innerTable}\n <tr>\n <td class=\"text-center\">\n <input id=\"${funci.matricula}\" type=\"checkbox\" name=\"participante\" ${(funci.participante===1) ? 'checked' : ''}>\n </td>\n <td class=\"text-center\">${funci.matricula}</td>\n <td class=\"text-left\">${funci.nome}</td>\n <td class=\"text-center\">${funci.nome_area_trabalho}</td>\n <td class=\"text-center\">${funci.nome_equipe}</td>\n </tr>\n `\n })\n var table = `\n ${searchBoxPart}\n <div id=\"${this.searchFieldIDs.dynamicTable}\" class=\".container-fluid\" style=\"height:${this.height}vh!important;overflow-y:scroll\"> \n <table class=\"table table-sm table-hover table-striped mx-auto\">\n <thead class=\"thead-dark\">\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Participante</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Matricula</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Nome</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Area</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Equipe</th>\n </thead>\n <tbody>\n ${innerTable}\n </tbody>\n </table>\n </div>\n `\n this.mainContent.innerHTML = table\n }\n if(appState===(appCtrl.returnAppStateList())._RESULTADOS){\n const temptdata = (dataCtrl.returnData('mostrarResults'))\n var innerCol = ''\n temptdata.forEach(funci => {\n innerCol = `${innerCol} \n <div class=\"col-6\">\n <div class=\".container-fluid\" style=\"margin: 3px;border:rgba(0, 45, 75, 1) 1px solid\">\n <div class=\"row\">\n <div class=\"col-3 mx-auto\" style=\"margin-top:5px;margin-left:5px\">\n <div class=\"row mx-auto my-auto text-center\">\n <div class=\"col-12 text-center\">\n <img src=\"https://humanograma.intranet.bb.com.br/avatar/${funci.matricula}\" alt=\"foto de <%= nome %>\" style=\"height: 8vh; border-radius: 50%;\">\n </div>\n <div class=\"col-12 text-center\">\n <p style=\"font-size:2.5rem\">${funci.media}</p>\n </div>\n </div>\n </div>\n <style>\n .inside-text{\n font-size:.9rem;\n padding:0;\n margin:0\n }\n .truncate {\n font-size:larger;\n margin:0;\n width: auto;\n text-align: justify;\n word-break: keep-all;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n </style>\n <div class=\"col-9 text-left\">\n <div class=\".container-fluid text-center mx-auto\">\n <p id=\"${funci.matricula}\" class=\"truncate\"><strong>${funci.nome}</strong></p>\n </div>\n <p class=\"inside-text\"><strong>Acesso intranetGS: </strong> ${funci.gsIntra}</p>\n <p class=\"inside-text\"><strong>Capacitação: </strong> ${funci.capacitacao}</p>\n <p class=\"inside-text\"><strong>Quiz: </strong> ${funci.quiz}</p>\n <p class=\"inside-text\"><strong>Indicador por equipe: </strong> ${funci.equipe}</p>\n <p class=\"inside-text\"><strong>Total pontos: </strong> ${funci.total}</p>\n </div>\n </div>\n </div>\n </div>\n ` \n })\n if(document.getElementsByClassName(this.divsIDs.innerTableResults).length > 0){\n document.getElementsByClassName(this.divsIDs.innerTableResults)[0].innerHTML = innerCol\n } else {\n this.clearMaintContent()\n var btnGroup = ''\n this.dynamicFilterIds.forEach(id =>{\n btnGroup = `${btnGroup} \n <div class=\"p-2\">\n <button id=\"${id}\" type=\"button\" class=\"btn btn-secondary btn-sm ${(dataCtrl.returnData('currentPeriod')===parseInt(id.split(`-`)[1])) ? `active` : ``} filter-btn\">\n ${id.split('-')[1]}\n </button>\n </div>\n `\n })\n this.mainContent.innerHTML = `\n ${searchBoxPart}\n <div class=\"d-flex p-2 justify-content-center\" style=\"padding:0!important\">\n ${btnGroup}\n </div>\n <div class=\".container-fuild\" style=\"height:85%!important;overflow-y:auto;overflow-x:hidden\">\n <div class=\"row ${this.divsIDs.innerTableResults}\">\n ${innerCol}\n </div>\n </div>\n `\n }\n }\n if(appState===(appCtrl.returnAppStateList())._GERAR){\n this.clearMaintContent()\n this.mainContent.style.border = 'rgba(65, 105, 225, 0.534) 14px solid'\n this.mainContent.innerHTML = `\n <div id=\"${this.divsIDs.spreadsheetWrapper}\" class=\"card card-body d-table-cell align-middle\">\n <p class=\"h2\" style=\"color:rgba(65, 105, 225, 0.534)\">Gerando resultados ${dataCtrl.returnData('selectedPeriod')}!</p>\n <div class=\".container-fluid w-100\" style=\"height: 50px\"></div>\n ${this.downloadingProgressBar(`show`)}\n </div>\n \n `\n }\n if(appState===(appCtrl.returnAppStateList())._INDICADORES){\n var i = ''\n dataCtrl.returnData('indicadores').forEach(indicador => {\n if(indicador.id_a_mapearIndicadores === 12) {\n i = indicador\n return \n }\n })\n this.clearMaintContent()\n this.mainContent.style.border = 'none'\n this.mainContent.innerHTML = `\n <div id=\"${this.divsIDs.spreadsheetWrapper}\" class=\"card card-body d-table-cell align-middle\">\n <p class=\"h2\" style=\"color:rgba(65, 105, 225, 0.534)\">Informe o(s) valor(es) para cada indicador:</p>\n <div class=\".container-fluid w-100 mx-auto text-center\" style=\"height: 50px\"></div>\n <form class=\"\">\n <div id=\"wrapper\" class=\"container mx-auto text-center\" style=\"margin-bottom:50px!important!\">\n <div class=\".container-fluid w-100 mx-auto text-center\">\n <label for=\"${this.indicadores.inputID}\">Ajuiazmento Estratégico:</label>\n <input type=\"number\" id=\"${this.indicadores.inputID}\" name=\"${this.indicadores.inputID}\" step=\"0.01\" min=\"0\" max=\"100\" style=\"width:100px!important\" required>\n <label for=\"${this.indicadores.inputID}\">(valor atual <strong>${parseFloat(i.atingimento_semestre)}</strong> no período de <strong>${i.id_a_periodoAno})</strong></label>\n </div>\n </br>\n <div class=\".container-fluid w-100 mx-auto text-center\">\n <button id=\"${this.indicadores.btns.submit}\" type=\"button\" class=\"btn btn-primary not-include\">Salvar dados</button>\n <button id=\"${this.indicadores.btns.clear}\" type=\"button\" class=\"btn btn-warning not-include\">Limpar dados</button>\n </div>\n </div>\n </form>\n </div> \n \n `\n }\n if(appState===(appCtrl.returnAppStateList())._ACESSOGS){\n this.clearMaintContent()\n this.iterateOverButtons(this.listOfClasses.btnActive) ? this.iterateOverButtons(this.listOfClasses.btnActive).classList.remove(this.listOfClasses.btnActive) : null\n var jornadaTrabalho = dataCtrl.returnData('jornadaTrabalho')\n var innerInfo = ''\n if(jornadaTrabalho==null){\n this.mainContent.innerHTML = `\n <div id=\"${this.divsIDs.spreadsheetWrapper}\" class=\"card card-body align-middle h-100\" style=\"important;overflow-y:scroll\">\n <p class=\"h2\" style=\"color:rgba(65, 105, 225, 0.534)\">Escolha o arquivo de JORNADA DE TRABALHO a ser carregado!</p>\n <div class=\".container-fluid w-100 mx-auto text-center\" style=\"height: 50px\"></div>\n <div id=\"wrapper\" class=\"container mx-auto text-center h-100\">\n <input type=\"file\" id=\"${this.acessoGS.btns.upload}\" />\n <div style=\"height:10px;\"></div>\n <p>Siga o passo a passo abaixo para a importação da planilha</p>\n <p>Para baixar a planilha da jornada de trabalho clique <a href=\"https://bam.bb.com.br/spotfire/wp/analysis?file=/%5BP%C3%BAblica%5D/VIVAP/Dipes/Publico%20Interno/pub_info/JND_TRB&waid=xVOOQX0j0UCzCmJQZxwuR-1813137a1e-UWD&wavid=0\" target=\"_blank\"><strong>aqui</strong></a>.\n Clique na aba <strong>Detalhes</strong>. Clique com o botão direito do mouse sobre qualquer parte da tabela e selecione <strong>Exportar >> Exportar Tabela</strong></p>\n <div class=\"row text-center mx-auto my-auto\">\n <div class=\"col-4\" style=\"border:1px black solid\">\n <p><strong>Passo um</strong> - Abra a planilha e selecione tode a coluna B (DT_JORNADA)<p>\n <img src=\"/img/excel1.png\" style=\"height: 150px!important;\">\n </div>\n <div class=\"col-2\">\n <p class=\"h2\">>></p>\n </div>\n <div class=\"col-4\" style=\"border:1px black solid\">\n <p><strong>Passo dois</strong> - Busque a aba <strong>Página inicial</strong> no Excel.<p>\n <img src=\"/img/excel2.png\" style=\"height: 150px!important;\">\n </div>\n <div class=\"col-4\" style=\"border:1px black solid;margin-top:2px\">\n <p><strong>Passo três</strong> - No agrupamento <strong>Número</strong> troque o formato <strong>Data</strong> para <strong>Texto</strong><p>\n <img src=\"/img/excel3.png\" style=\"height: 150px!important;\">\n </div>\n <div class=\"col-2\" style=\"margin-top:2px\">\n <p class=\"h2\">>></p>\n </div>\n <div class=\"col-4\" style=\"border:1px black solid;margin-top:2px\">\n <p><strong>Passo quatro</strong> - <strong>Salve</strong> o arquivo. Feche o Excel. Clique no botão <strong>Escolher Arquivo</strong> desta página e clique no botão <strong>Enviar dados</strong> que será exibido depois de carregados os dados.<s <p>\n <img src=\"/img/excel4.png\" style=\"height: 150px!important;\">\n </div>\n </div>\n </div>\n </div>\n `\n }else{\n jornadaTrabalho.forEach(register => {\n innerInfo = `\n ${innerInfo}\n <tr>\n <td class=\"text-center\">${register.matricula}</td>\n <td class=\"text-left\">${register.periodo}</td>\n <td class=\"text-center\">${register.diaUtil}</td>\n <td class=\"text-center\">${register.situacao}</td>\n <td class=\"text-center\">${register.nomeSituacao}</td>\n </tr>\n `\n })\n\n this.mainContent.innerHTML = `\n <div class=\".container-fluid\" style=\"height:85%!important;overflow-y:scroll\">\n <div id=\"${this.divsIDs.uploadQuizTable}\" class=\".container-fluid\" > \n <table class=\"table table-sm table-hover table-striped mx-auto\">\n <thead class=\"thead-dark\">\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Matricula</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Período</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Dia útil</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Código Situação</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Nome Situação</th>\n </thead>\n <tbody>\n ${innerInfo}\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"container mx-auto text-center\" style=\"margin-top:5px\">\n <button id=\"${this.acessoGS.btns.submit}\" class=\"btn btn-primary not-include\" type=\"button\">Enviar dados</button>\n <button id=\"${this.acessoGS.btns.clear}\" class=\"btn btn-warning not-include\" type=\"button\">Recarregar planilha</button>\n </div>\n `\n appCtrl.loadUploadedJornadaDeTrabalhoEventListeners(dataCtrl,this)\n this.mainContent.style.margin = '5px'\n this.mainContent.style.border= 'none'\n return\n }\n }\n if(appState===(appCtrl.returnAppStateList())._UPQUIZ){\n this.clearMaintContent()\n this.iterateOverButtons(this.listOfClasses.btnActive) ? this.iterateOverButtons(this.listOfClasses.btnActive).classList.remove(this.listOfClasses.btnActive) : null\n var uploadedArray = dataCtrl.returnData('uploadedQuiz')\n var innerInfo = ''\n if(uploadedArray==null){\n this.mainContent.innerHTML = `\n <div id=\"${this.divsIDs.spreadsheetWrapper}\" class=\"card card-body d-table-cell align-middle\">\n <p class=\"h2\" style=\"color:rgba(65, 105, 225, 0.534)\">Escolha o arquivo de resultados QUIZ a ser carregado!</p>\n <div class=\".container-fluid w-100 mx-auto text-center\" style=\"height: 50px\"></div>\n <div id=\"wrapper\" class=\"container mx-auto text-center\">\n <input type=\"file\" id=\"${this.inputExcelBtn}\" />\n <div style=\"height:10px;\"></div>\n <p> Faça o download da planilha para fazer upload dos resultados do quiz <a href=\"/downloads/template.xlsx\"><strong>aqui</strong></a>.</p>\n </div>\n </div>\n `\n }else{\n uploadedArray.forEach(register => {\n innerInfo = `\n ${innerInfo}\n <tr>\n <td class=\"text-center\">${register.nome_funci}</td>\n <td class=\"text-left\">${register.matricula}</td>\n <td class=\"text-center\">${register.nroProva}</td>\n <td class=\"text-center\">${register.periodo}</td>\n <td class=\"text-center\">${register.qtdePerguntas}</td>\n <td class=\"text-center\">${register.qtdeAcertos}</td>\n <td class=\"text-center\">${register.abonoFerias}</td>\n </tr>\n `\n })\n \n this.mainContent.innerHTML = `\n <div class=\".container-fluid\" style=\"height: ${this.height-4}vh!important;overflow-y:scroll\">\n <div id=\"${this.divsIDs.uploadQuizTable}\" class=\".container-fluid\" > \n <table class=\"table table-sm table-hover table-striped mx-auto\">\n <thead class=\"thead-dark\">\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Nome</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Matricula</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Nro Prova</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Período</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Total perguntas</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Total Acertos</th>\n <th class=\"text-center\" style=\"background-color:rgba(0, 45, 75, 1)!important\">Abono</th>\n </thead>\n <tbody>\n ${innerInfo}\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"container mx-auto text-center\" style=\"margin-top:5px\">\n <button id=\"${this.uploadQuizBtns.submitUploadedQuiz}\" class=\"btn btn-primary not-include\" type=\"button\">Enviar dados</button>\n <button id=\"${this.uploadQuizBtns.clearUploadedQuiz}\" class=\"btn btn-warning not-include\" type=\"button\">Recarregar planilha</button>\n </div>\n `\n appCtrl.loadUploadedQuizEventListeners(dataCtrl,this)\n this.mainContent.style.margin = '5px'\n this.mainContent.style.border= 'none'\n return\n }\n this.mainContent.style.border= 'rgba(65, 105, 225, 0.534) 14px solid'\n }\n }", "function __fBtnClick(event) {\n\t\tvar jBuyer = this.el.data('btnData');\n\t\t/**\n\t\t * 0: Push Info\n\t\t * 1: Contact Now\n\t\t * 2: View Detail\n\t\t */\n\t\tvar _data;\n\t\tswitch (parseInt(jBuyer.action, 10)) {\n\t\t\tcase 0:\n\t\t\t\t_data = {\n\t\t\t\t\tbuyerId: jBuyer.buyerId,\n\t\t\t\t\tbuyerName: jBuyer.buyerName\n\t\t\t\t};\n\t\t\t\tCan.util.canInterface('pushInfo', [_data]);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tvar _id = parseInt(jBuyer.buyerId, 10);\n\t\t\t\t//if NFCid then\n\t\t\t\tif (isNaN(_id)) {\n\t\t\t\t\tbuyerView(jBuyer.buyerId);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t_data = {\n\t\t\t\t\t\taddress: {\n\t\t\t\t\t\t\tvalue: jBuyer.buyerId,\n\t\t\t\t\t\t\ttext: jBuyer.buyerName\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tCan.util.canInterface('writeEmail', [Can.msg.MESSAGE_WINDOW.WRITE_TIT, _data]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tCan.util.canInterface('readEmail', [\n\t\t\t\t\t{messageId: jBuyer.eventId},\n\t\t\t\t\ttrue\n\t\t\t\t]);\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tCan.util.canInterface('whoSay');\n\t\t}\n\t}", "function informationHandler(event)\n\t\t{\n\t\t\tg.informe();\n\t\t\thideButtons(this);\n\t\t}", "organizerButtonsHandler(dayData, nameDayInfo) {\n // console.log(dayData,nameDayInfo )\n //Local Vars\n //// console.log('0 - Function Entry')\n var dayClicked = this.state.dayInfo;\n //console.log(dayClicked)\n var dayFormContent = document.getElementById('day-form-value')\n ? document.getElementById('day-form-value').name\n : '';\n var day = dayData.split('-')[0];\n var month = dayData.split('-')[1];\n var entryDayInfo = nameDayInfo.day ? nameDayInfo : JSON.parse(nameDayInfo);\n var eventTargetInput = document.getElementById(\n event.composedPath()[0].innerText\n );\n var dayInfo = {\n day: `${day}-${month}`,\n instance: entryDayInfo.instance,\n lastInstance: entryDayInfo.lastInstance,\n winnersNeed: entryDayInfo.winnersNeed,\n tStart: entryDayInfo.tStart,\n winnersIDs: entryDayInfo.winnersIDs,\n nextInstance: entryDayInfo.nextInstance,\n prevInstance: entryDayInfo.prevInstance,\n };\n\n function isUpdating() {\n if (dayFormContent === '') {\n } else {\n var formDayInfo =\n dayFormContent === '' ? '' : JSON.parse(dayFormContent);\n var oldTStart = formDayInfo.tStart;\n var oldGMax =\n formDayInfo.winnersNeed == 0\n ? formDayInfo.winnersNeed\n : parseInt(formDayInfo.winnersNeed);\n var oldInstanceSelect = formDayInfo.instance;\n var actualTStart = document.getElementById('panelForm-tStart-input')\n .value;\n var actualGmax =\n document.getElementById('day-gMax').value == 0\n ? document.getElementById('day-gMax').value\n : parseInt(document.getElementById('day-gMax').value);\n var actualInstanceSelect = document.getElementById(\n 'day-instance-div-select'\n ).value;\n //// console.log(dayFormContent, 'raw objet')\n //// console.log(formDayInfo, '<-------- formDayInfo' )\n //// console.log(oldInstanceSelect, '<-------- Old Instance Select /// Actual Instance Select -------->', actualInstanceSelect)\n //// console.log(oldGMax, '<-------- OLD GMAX /// ACTUAL GMAX ------->', actualGmax)\n //// console.log(oldTStart, '<------------ OLD TSTART /// ACTUAL TSTART --------->', actualTStart)\n }\n\n if (oldInstanceSelect == actualInstanceSelect) {\n return true;\n } else {\n if (actualTStart === oldTStart && actualGmax === oldGMax) {\n return false;\n }\n }\n }\n if (isUpdating()) {\n function defaultButtonClassAssign(setNewButton) {\n var wasClicked = document.getElementsByClassName('itsClicked')[0];\n var dayValue = event.composedPath()[0].value;\n wasClicked\n ? wasClicked.setAttribute(\n 'class',\n `panel-button ${dayClicked.instance}`\n )\n : '';\n if (dayValue.instance != 'none') {\n event.composedPath()[0].class = `panel-button ${dayValue.instance}-userClicked itsClicked`;\n } else {\n event.composedPath()[0].class = `panel-button userClicked itsClicked `;\n }\n setNewButton();\n }\n TournamentPanel.prototype.selectInit();\n var newButtonClicked = () => {\n this.setState({\n buttonClicked: dayData,\n dayInfo: dayInfo,\n });\n };\n defaultButtonClassAssign(newButtonClicked);\n } else {\n var nameDayObj = entryDayInfo;\n var autoSave = {\n invoked: 'autoSave',\n dayData: dayData,\n nameDayObj: nameDayObj,\n eventTarget: eventTargetInput,\n confirmed: '',\n };\n confirm('¿Desea guardar los cambios del dia?')\n ? (autoSave.confirmed = true)\n : (autoSave.confirmed = false);\n TournamentPanel.prototype.saveSingleInstance(autoSave);\n }\n }", "showLess (event) {\n event.preventDefault();\n this.setState ({\n buttonclicked: false,\n buttonText: 'See more neighborhood details',\n svgIconMore: <Svg ><path d=\"M16.003 18.626l7.081-7.081L25 13.46l-8.997 8.998-9.003-9 1.917-1.916z\"/></Svg>,\n seeLessText: '' ,\n svgIconLess: '',\n nearbyhouse: '',\n nearbyButtonMore: false,\n nearbyButtonLess: false\n })\n}", "function WizardExposition(props) {\n return (\n <div>\n \n <ExpoBtn\n className={props.hideState}\n id = \"jaceNo\"\n onClick={props.handleBtnClick}\n data-value=\"jaceNo\"\n name=\"No\"\n />\n <ExpoBtn\n className={props.hideState}\n id = \"jaceYes\"\n onClick={props.handleBtnClick}\n data-value=\"jaceYes\"\n name=\"Yes\"\n />\n </div>\n );\n}", "renderHelpfulButton() {\n const { markedHelpful } = this.state;\n let helpfulButton = <span className=\"link\" role=\"button\" onClick={this.markHelpful}>Yes</span>;\n if (markedHelpful) {\n helpfulButton = <span>Yes</span>;\n }\n return helpfulButton;\n }", "handleClick(product, params) {\n if (params === '0'|| params==='1') {\n this.setState({\n product: product,\n showParam: params,\n });\n window.switch_caregory = false;\n }\n}", "handleClickOther() {\n console.log(\"State 2\");\n if (this.props.fields.pnr.value == this.props.fields.guardianPnr.value) {\n this.props.fields.pnr.onChange(null);\n }\n this.props.fields.applyingForSelf.onChange(false);\n this.props.nextStep(2);\n }", "showLessnearbyhouse (event) {\n event.preventDefault();\n this.setState ({\n buttonclicked: true,\n buttonText: '',\n svgIconMore: '',\n svgiconLess_neayby: '',\n svgIconMore_nearby: <Svg ><path d=\"M16.003 18.626l7.081-7.081L25 13.46l-8.997 8.998-9.003-9 1.917-1.916z\"/></Svg>,\n seeLessText: 'See less neighborhood details',\n svgIconLess: <Svg ><path d=\"M15.997 13.374l-7.081 7.081L7 18.54l8.997-8.998 9.003 9-1.916 1.916z\"/></Svg>,\n nearbyhouse: 'See more nearby houses',\n nearbyhouseless: '',\n nearbyButtonMore: false,\n nearbyButtonLess: true\n })\n}", "handleClick() {}", "renderContent() {\n if (this.props.samplingState === 'initial') {\n return (\n <ZeroState\n header={HEADER}\n subtext={SUBTEXT}>\n <TextButton\n className=\"btn btn-primary btn-lg\"\n text=\"Analyze Schema\"\n clickHandler={this.onApplyClicked.bind(this)} />\n <a className=\"btn btn-info btn-lg\" href={DOCUMENTATION_LINK}>\n Learn More\n </a>\n </ZeroState>\n );\n }\n return (\n <div className=\"column-container\">\n <div className=\"column main\">\n <div className=\"schema-field-list\">\n {this.renderFieldList()}\n </div>\n </div>\n </div>\n );\n }", "function handleClick() {\n setHeadingText(\"submitted\");\n }", "addStaticFields() {\n let managementButtons = [\n new PushButtonField({\n name: 'ports',\n style: 'interactive',\n caption: gettext('Ports'),\n icon: new StockIcon({name: 'port', stockName: 'qtoggle'}),\n onClick(form) {\n Navigation.navigate({path: ['ports', `~${form.getDeviceName()}`]})\n }\n }),\n new PushButtonField({\n name: 'reboot',\n caption: gettext('Reboot'),\n style: 'highlight',\n icon: new StockIcon({name: 'sync'}),\n onClick(form) {\n form.pushPage(form.makeConfirmAndReboot())\n }\n }),\n new PushButtonField({\n name: 'firmware',\n style: 'colored',\n backgroundColor: Theme.getColor('@magenta-color'),\n backgroundActiveColor: Theme.getColor('@magenta-active-color'),\n caption: gettext('Firmware'),\n icon: new StockIcon({name: 'firmware', stockName: 'qtoggle'}),\n disabled: true,\n onClick(form) {\n form.pushPage(form.makeUpdateFirmwareForm())\n }\n }),\n new PushButtonField({\n name: 'factory_reset',\n caption: gettext('Reset'),\n icon: new StockIcon({name: 'reset'}),\n style: 'danger',\n onClick(form) {\n form.pushPage(form.makeConfirmAndFactoryReset())\n }\n }),\n new PushButtonField({\n name: 'backup',\n caption: gettext('Backup'),\n style: 'interactive',\n icon: new StockIcon({name: 'upload'}),\n onClick(form) {\n form.pushPage(form.makeBackupForm())\n }\n }),\n new PushButtonField({\n name: 'restore',\n caption: gettext('Restore'),\n style: 'interactive',\n icon: new StockIcon({name: 'download'}),\n onClick(form) {\n form.pushPage(form.makeRestoreForm())\n }\n })\n ]\n\n this.addField(-1, new CompositeField({\n name: 'management_buttons',\n label: gettext('Device Management'),\n separator: true,\n flow: Window.isSmallScreen() ? 'vertical' : 'horizontal',\n columns: 3,\n equalSize: true,\n fields: managementButtons\n }))\n }", "questionPage() {\r\n //calls the renderButtons function with the current\r\n //question and answers list and returns on the\r\n //HTML Elements\r\n return this.renderButtons(\r\n //retrives the questions data from the state questions and points to\r\n //the questionNumber in the array\r\n this.state.questions[this.state.questionNum].question,\r\n this.state.questions[this.state.questionNum].answers\r\n );\r\n }", "handleClick() {\n this.setState(prevState => {\n if(prevState.displayItems === \"row scroll_list\"){\n return {\n displayItems : \"row displayAllItems\",\n viewButtonText : \"View Less\" \n }}\n \n return {\n displayItems : \"row scroll_list\",\n viewButtonText : \"View All\"\n }\n\n //prevState.displayItems === \"row scroll_list\" ? this.setState({displayItems : \"row displayAllItems\"}) : this.state({displayItems : \"row scroll_list\"})\n\n })\n }", "static switcher(e) {\n switch (e.target.dataset.buttonType) {\n case ('new'):\n LoadoutItem.newForm(e.target.dataset.loadoutId)\n break\n case ('existing'):\n LoadoutItem.existingForm(e.target.dataset.loadoutId)\n break\n case ('remove-form'):\n LoadoutItemAdapter.removeLoadoutItemForm(e)\n break\n }\n }", "function cam_entry_button_state(mid,state){\n\tvar name_display = $(\"#c_\"+mid+\"_name_display\");\n\tvar fps_sel = $(\"#\"+mid+\"_fps_select\");\n\tvar qual_sel = $(\"#\"+mid+\"_qual_select\");\n\tvar alarm_while_stream_sel = $(\"#\"+mid+\"_alarm_while_stream_select\");\n\tvar area_sel = $(\"#\"+mid+\"_area_select\");\n\tvar save = $(\"#c_\"+mid+\"_save\");\n\tvar discard = $(\"#c_\"+mid+\"_disc\");\n\tvar edit = $(\"#c_\"+mid+\"_edit\");\n\tvar name_edit = $(\"#c_\"+mid+\"_name_edit\");\n\tvar update = $(\"#c_\"+mid+\"_update\");\n\tvar with_cam = $(\"#c_\"+mid+\"_with_cam\");\n\tvar with_pir = $(\"#c_\"+mid+\"_with_pir\");\n\tvar with_lights = $(\"#c_\"+mid+\"_with_lights\");\n\tvar with_ext = $(\"#c_\"+mid+\"_with_ext\");\n\n\twith_ext.hide();\n\twith_cam.hide();\n\twith_pir.hide();\n\twith_lights.hide();\n\tupdate.hide();\n\tsave.hide();\n\tdiscard.hide();\n\tedit.hide();\n\tname_display.hide();\n\tname_edit.hide();\n\tfps_sel.hide();\n\tqual_sel.hide();\n\talarm_while_stream_sel.hide();\n\tarea_sel.hide();\n\n\tif(state==\"show\"){\n\t\tedit.show();\n\t\tupdate.show();\n\t\tname_display.show();\n\t} else if(state==\"edit\"){\n\t\twith_cam.show();\n\t\twith_ext.show();\n\t\twith_pir.show();\n\t\twith_lights.show();\n\t\tsave.show();\n\t\tdiscard.show();\n\t\tname_edit.show();\n\t\tfps_sel.show();\n\t\tqual_sel.show();\n\t\talarm_while_stream_sel.show();\n\t\tarea_sel.show();\n\t}\n\t// scale text field to 92% of available width\n\tvar left=$(\"#c_\"+mid+\"_field_wrapper\").position().left;\n\tvar right=$(\"#c_\"+mid+\"_buttons\").position().left;\n\t$(\"#c_\"+mid+\"_field_wrapper\").outerWidth((right-left)*0.92);\n\n}", "handleClick() {\n\t\tthis.props.changePage(\"aboutSplunk\");\n\t}", "handleButtonClick(){\n\t\tconsole.log(\"handleButtonClick\");\n\n\t\teventsActions.createEvent(this.state.event);\n\t}", "displayReportButton() {\n let returnButton = null;\n\n if (this.state.button_flag == \"add\")\n returnButton = <button\n type=\"button\"\n className=\"btn btn-success btn-add-to-report mt-4\"\n title=\"Add to priority report\"\n onClick={this.handleAddToReportClick} disabled={this.state.priority_value != \"NA\" ? \"\" : \"disabled\"}>\n <FaPlus />\n </button>\n else if (this.state.button_flag == \"remove\")\n returnButton = <Fragment>\n {this.handleEditModeButtons()}\n <button\n type=\"button\"\n className=\"btn btn-success btn-add-to-report mt-4\"\n title=\"Remove from priority report\"\n onClick={this.handleRemoveFromReportClick}>\n <FaTimes />\n </button>\n </Fragment>\n\n return returnButton;\n }", "sendTherapist() {\n this.props.handleClick(this.state.selectedName)\n }", "if (this.state.value === pickItemValue) {\n this.props.onClick('', -1)\n }", "changeInput(event) {\n const value = event.target.value;\n //add debbugger here and see event.target.value\n //here you are sending instructions to store from this action creator\n this.props.setButtonText(value);\n }", "render() {\n const buttonName1 = <img style={{width: '40px', height:'40px', maxHeight: '40px', maxWidth: '40px'}} src={favorites_add_icon} alt=\"Add to favorites\"/>\n const buttonName2 = <img style={{width: '40px', height:'40px', maxHeight: '40px', maxWidth: '40px'}} src={favorites_remove_icon} alt=\"Remove from favorites\"/>\n const siteButtonsProps = [{buttonFunction: this.addSiteToFavorites, buttonName: buttonName1, canRender: this.canRenderAddSite}, \n {buttonFunction: this.deleteSiteInFavorites, buttonName: buttonName2, canRender: this.canRenderDeleteSite}];\n const trailButtonsProps = [{buttonFunction: this.addTrailToFavorites, buttonName: buttonName1, canRender: this.canRenderAddTrail},\n {buttonFunction: this.deleteTrailInFavorites, buttonName: buttonName2, canRender: this.canRenderDeleteTrail}];\n return (\n <GeneralSearch style={{width: '100%'}}\n {...{siteButtonsProps, trailButtonsProps }}\n searchVal={this.state.searchVal}\n returnTo='search'/>\n );\n }", "handleToggleClick() {\n this.buttonClicked = !this.buttonClicked; //set to true if false, false if true.\n this.cssClass = this.buttonClicked ? 'slds-button slds-button_outline-brand' : 'slds-button slds-button_neutral';\n this.iconName = this.buttonClicked ? 'utility:check' : '';\n }", "handleClickCarFax() {\n this.setState(function (past) {\n return { CarFax: !past.CarFax }\n })\n }", "async handleClick(e){\n e.preventDefault();\n if(this.targetFood.foodName){\n await store.dispatch(fetchNutri(this.targetFood.foodName));\n const foodInput = this.shadowRoot.getElementById('foodinput');\n foodInput.value = '';\n }\n }", "function changeBtn() {\n\t\t\tif($scope.showButton.isShow){\n\t\t\t\twindow.location.hash = '/';\n\t\t\t\t$scope.showButton.btnClass = 'btn-default';\n\t\t\t\t$scope.showButton.text = 'Show Lesson Content';\n\t\t\t\t$scope.showButton.isShow = false;\n\t\t\t\t$scope.lastViewed.person = null;\n\t\t\t} else {\n\t\t\t\twindow.location.hash = '/list';\n\t\t\t\t$scope.showButton.btnClass = 'btn-primary';\n\t\t\t\t$scope.showButton.text = 'Hide Lesson Content';\n\t\t\t\t$scope.showButton.isShow = true;\n\t\t\t}\n\t\t\t$scope.predicate = '';\n\t\t}", "_renderDummySearchBox(){\n if(this.props.mapSearchVisible){\n return(\n //toggle searchBox\n <DummySearchBox\n onPress = {()=>{this.props.dismissSelectedGeoObject();this.props.toggleSearchBox()}}\n rightIcon = {\n <Button buttonType=\"iconOnly\" icon={<IonIcons name=\"ios-search\" color=\"#000\" size={20}/>}/>\n }\n />)\n } \n return null;\n }", "renderButtons() {\n if(this.props.status === 'Upcoming') {\n return (\n <div>\n <Button variant=\"outline-danger\" onClick={this.handleShowCancelModal}>Cancelar</Button>\n </div>\n );\n }\n else if(this.props.status === 'Past') {\n return (\n <div>\n {this.props.hasReview ? \n <Button variant=\"outline-info\" disabled>Ya dejaste tu review</Button>\n :\n <Button variant=\"outline-success\" onClick={this.handleShowReviewModal}>Dejar Review</Button>\n }\n \n </div>\n );\n }\n }", "async function render() {\n await enableBtn([btn.edit, btn.show, btn.import]);\n switch (state.view) {\n case IMPORT_VIEW:\n await disableBtn(btn.import);\n hide(HIDDEN_CONTROLS_IMPORT_VIEW);\n show(VISIBLE_CONTROLS_IMPORT_VIEW);\n input.siteSecretShow.focus();\n input.settingsShow.value = state.siteSettings !== null ? jsonStr(state.siteSettings) : '';\n break;\n case SHOW_VIEW:\n await disableBtn(btn.show);\n hide(HIDDEN_CONTROLS_SHOW_VIEW);\n show(VISIBLE_CONTROLS_SHOW_VIEW.concat(state.templateMatch ? div.show : null));\n input.siteSecretShow.focus();\n input.settingsShow.value = state.siteSettings !== null ? jsonStr(state.siteSettings) : '';\n break;\n case EDIT_VIEW:\n await disableBtn(btn.edit);\n hide(HIDDEN_CONTROLS_EDIT_VIEW);\n show(VISIBLE_CONTROLS_EDIT_VIEW);\n if (state.changed) {\n btn.save.removeAttribute('disabled');\n } else {\n btn.save.setAttribute('disabled', 'disabled');\n }\n\n await deriveSecret(input.siteSecret.value);\n state.siteSettings = Object.assign(\n state.siteSettings ? state.siteSettings : {},\n input.targetUser.value ? { user_correct: getCorrectionUser(input.targetUser.value) } : {},\n input.targetPass.value ? { pass_correct: getCorrectionPass(input.targetPass.value) } : {},\n input.selectTemplate.value !== '24×simple' ? { template: input.selectTemplate.value } : {},\n );\n\n input.settings.value = state.siteSettings !== null ? jsonStr(state.siteSettings) : '';\n break;\n default:\n throw new Error(`unknown state ${state ? state.view : state}`);\n }\n }", "renderSelectedItem( ) {\n let content;\n\n if(this.state.currentList) {\n let currentList = this.state.listItems[this.state.currentList];\n if(!this.state.edit) {\n content = (\n <div>\n <div className=\"item\">\n <button onClick={this.enableEdit}>Change</button>\n </div>\n </div>\n );\n } else {\n content = (\n <div>\n <div className=\"item\">\n <button onClick={this.updateCurrentList}>Keep</button>\n </div>\n <input className=\"item\" defaultValue={currentList.title} ref=\"editListInput\" />\n </div>\n );\n }\n }\n return content;\n }", "_handleClick(val){\n // [d.2] - set state to parameter value received\n this.setState({\n visibleUserType: val\n })\n }", "renderSubmitPanel() {\n if (this.state.reviewState && !this.state.resultsState) {\n return (\n <div className=\"submitPanel\">\n <Button className=\"enjoy-css\" onClick={this.isReviewMode}>Edit</Button>\n </div>);\n }\n if (!this.state.reviewState && !this.state.resultsState && this.state.questions.length > 0) {\n return (\n <div className=\"submitPanel\">\n <Button className=\"enjoy-css\" onClick={this.isReviewMode}>Save</Button>\n </div>);\n } if (this.state.resultsState) {\n return (\n <div className=\"submitPanel\" />\n );\n }\n\n return ('');\n }", "renderElement(status, id) {\n if(this.state.isOwner) {\n if(status===\"p\" || status===\"P\") {\n return <div>\n <p className=\"card-title ml-4\">{\"Booking Status: Accepted/In Progress\"}</p>\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-sm\">\n <button type=\"submit\" data-param={JSON.stringify({status:\"C\", id:id})} onClick={this.acceptBooking} className=\"btn btn-primary\" >\n Complete\n </button>\n </div>\n <div className=\"col-sm\">\n <button type=\"submit\" data-param={JSON.stringify({status:\"X\", id:id})} onClick={this.acceptBooking} className=\"btn btn-primary\" >\n Reject\n </button>\n </div>\n </div>\n </div>\n </div>;\n } else if(status===\"r\" || status===\"R\") {\n return <div>\n <p className=\"card-title ml-4\">{\"Booking Status: Accepted/In Progress\"}</p>\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-sm\">\n <button type=\"submit\" data-param={JSON.stringify({status:\"P\", id:id})} onClick={this.acceptBooking} className=\"btn btn-primary\" >\n Confirm\n </button>\n </div>\n <div className=\"col-sm\">\n <button type=\"submit\" data-param={JSON.stringify({status:\"X\", id:id})} onClick={this.acceptBooking} className=\"btn btn-primary\" >\n Reject\n </button>\n </div>\n </div>\n </div>\n </div>;\n } else if(status===\"x\" || status===\"X\") {\n return <p className=\"card-title ml-4\">{\"Booking Status: Cancelled/Rejected\"}</p>;\n } else {\n return <p className=\"card-title ml-4\">{\"Booking Status: Completed\"}</p>;\n } \n } else {\n if(status===\"p\" || status===\"P\") {\n return <div>\n <p className=\"card-title ml-4\">{\"Booking Status: Accepted/In Progress\"}</p>\n <button type=\"submit\" data-param={JSON.stringify({status:\"C\", id:id})} onClick={this.acceptBooking} className=\"btn btn-primary\" >\n Complete\n </button>\n </div>;\n } else if(status===\"r\" || status===\"R\") {\n return <div>\n <p className=\"card-title ml-4\">{\"Booking Status: Accepted/In Progress\"}</p>\n <button type=\"submit\" data-param={JSON.stringify({status:\"X\", id:id})} onClick={this.acceptBooking} className=\"btn btn-primary\" >\n Cancel Request\n </button>\n </div>;\n } else if(status===\"x\" || status===\"X\") {\n return <p className=\"card-title ml-4\">{\"Booking Status: Cancelled/Rejected\"}</p>;\n } else {\n return <p className=\"card-title ml-4\">{\"Booking Status: Completed\"}</p>;\n } \n }\n }", "isActivate(e){\n\t\tif(this.state.user.activate == 0){\n\t\treturn(\n\t\t\t<div>\n\t\t\t\t<span className=\"mr-20\">\n\t\t\t\t\t<button type=\"button\" className=\"Confirm_Button\" onClick={this.rejectPerson}> Reject </button>\n\t\t\t\t</span>\n\t\t\t\t<button type=\"button\" className=\"Confirm_Button\" onClick={this.AddPerson}> Confirm </button>\n\t\t\t</div> \n\t\t);\n\t\t}else{\n\t\t\tif (this.state.user.id == this.props.auth_user.id){\n\t\t\treturn;\n\t\t\t}\n\t\treturn <button type=\"button\" className=\"AddPositionButton\" onClick={this.handleShowRecommend}> Recommend</button> ;\n\t\t}\n\t}", "renderDetails() {\n return (\n <div className=\"requests-container\">\n {this.buttonToolbar()}\n <FileManager web3={this.state.web3} patent={this.state.selectedPatent} gasPrice={this.state.gasPrice}\n patentsInstance={this.state.patentsInstance} requestsInstance={this.state.requestsInstance} />\n </div>\n );\n }", "onRender()\n {\n var disabledDelete = this.model.get('origin') !== null;\n $(this.ui.buttonDelete).attr('disabled', disabledDelete); \n var disabledDownload = this.model.get('download') === null;\n $(this.ui.buttonDownload).attr('disabled', disabledDownload); \n var disableView = this.model.get('viewer_url') === null || disabledDownload;\n $(this.ui.buttonView).attr('disabled', disableView);\n }", "renderDisplayButton(displayed) {\n const { entries } = this.state;\n const total = entries.length;\n let displayButton;\n // compare length of visible answers to length of total answers to determine button to render\n if (displayed === total && total > 2) {\n // only allow users to collapse answers if total length is greater than 2\n displayButton = <b className=\"link\" role=\"button\" onClick={this.toggleShowAll}>COLLAPSE</b>;\n } else if (displayed < total) {\n // only allow users to load answers if there are unloaded answers\n displayButton = <b className=\"link\" role=\"button\" onClick={this.toggleShowAll}>SEE MORE ANSWERS</b>;\n }\n return displayButton;\n }", "function buttonClicked () {\n let clickedButton = event.target;\n\n valueHTML();\n\n}", "function GetButtonFrameInformation(View)\n{\n\t__View = View;\n\t\n\tvar Static = true;\n\n\tif (TimeCard.View == 4 && TimeCard.Status != 2 && TimeCard.Status != 3)\n\t{\n\t\tStatic = false;\t\n\t}\n\t\n\tGetTimeCardView(TimeCard.View);\n\n\tvar arg = '<div style=\"width:100%\"><form name=\"frmButtonFrame\">'\n\targ += '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;margin-left:auto;margin-right:auto\"><tr>'\n\t\t\n\t// Direct Report Select\t\n\tif (TimeCard.ManagerFlag)\n\t{\n\t\targ += '<span style=\"white-space:nowrap\"><span class=\"plaintablecellbold\" style=\"vertical-align:top;padding-right:5px\">'+getSeaPhrase(\"REPORTS\",\"TE\")+'</span>';\n\t\targ += '<select class=\"inputbox\" name=\"cmbReports\" onchange=\"parent.NewEmployeeSelected();\">';\n\t\tfor (var i=0; i<Reports.Detail.length; i++)\n\t\t{\n\t\t\tif (Employee.EmployeeNbr == Reports.Detail[i].Employee)\n\t\t\t{\n\t\t\t\targ += '<option value=\"'+Reports.Detail[i].Employee+'\" selected>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\targ += '<option value=\"'+Reports.Detail[i].Employee+'\">';\n\t\t\t}\n\t\t\targ += Reports.Detail[i].FullName + '</option>';\n\t\t}\n\t\targ += '</select></span>';\n\t}\n\t\n\tif (TimeCard.View == 4 && ((TimeCard.Status != 2 && TimeCard.Status != 3) || TimeCard.ManagerFlag))\n\t{\n\t\t// Update Button\n\t\tif (View == \"Period\")\n\t\t{\n\t\t\tif (Static)\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.CheckTextChanged_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t}\n\t\telse if (View == \"Exception\")\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Exception();return false\",\"margin-left:5px\");\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Daily();return false\",\"margin-left:5px\");\n\t\t}\n\t\t\n\t\t// Submit Button\n\t\tif (!TimeCard.ManagerFlag)\n\t\t{\n\t\t\tif (View == \"Period\")\n\t\t\t{\t\n\t\t\t\targ += uiButton(getSeaPhrase(\"SUBMIT_CARD_FOR_APPROVE\",\"TE\"),\"parent.SubmitClicked_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t\telse if (View == \"Exception\")\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"SUBMIT_CARD_FOR_APPROVE\",\"TE\"),\"parent.SubmitClicked_Exception();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Delete Row Button\n\t\tif (TimeCard.Status != 2 && TimeCard.Status != 3)\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"DEL_DATED_INFO\",\"TE\"),\"parent.DeleteRowClicked('\"+View+\"');return false\",\"margin-left:5px\");\n\t\t}\n\t}\n\n\t// Print Button\n\tif (View == \"Period\")\n\t{\n\t\targ += uiButton(getSeaPhrase(\"PRINT_CURRENT_CARD\",\"TE\"),\"parent.PrintClicked_Period();return false\",\"margin-left:5px\");\n\t}\n\telse if (View == \"Exception\")\n\t{\n\t\targ += uiButton(getSeaPhrase(\"PRINT_CURRENT_CARD\",\"TE\"),\"parent.PrintClicked_Exception();return false\",\"margin-left:5px\");\t\n\t}\n\t\n\t// Copy Paste Buttons\n\tif (View != \"Period\" && View != \"Exception\")\n\t{\n\t\tif (TimeCard.View == 4 && TimeCard.Status != 2 && TimeCard.Status != 3)\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"COPY_DAY\",\"TE\"),\"parent.CopyScreen_Daily();return false\",\"margin-left:5px\");\n\t\t\targ += uiButton(getSeaPhrase(\"PASTE_DAY\",\"TE\"),\"parent.PasteScreen_Daily();return false\",\"margin-left:5px\");\t\t\n\t\t}\n\t}\n\n\t// Done Button\n\tif ((View != \"Daily\" && ScreenWidth == 800) || ScreenWidth >= 1024)\n\t{\t\n\t\targ += uiButton(getSeaPhrase(\"CLOSE_TE\",\"TE\"),\"parent.DoneClicked('\"+View+\"');return false\",\"margin-left:5px\");\t\n\t}\n\t\t\n\t// Go to Period View Button\n\tif (View == \"Daily\")\n\t{\t\n\t\targ += uiButton(getSeaPhrase(\"RETURN_PERIOD_VIEW\",\"TE\"),\"parent.BackToPeriod();return false\",\"margin-left:5px\");\t\n\t}\n\t\t\n\t// Go to Summary View Button\n\tif (TimeCard.ManagerFlag)\n\t{\n\t\tif (!NoSummaryFlag && (View != \"Daily\" && View != \"Period\" && ScreenWidth == 800) || ScreenWidth >= 1024)\n\t\t{\t\t\n\t\t\targ += uiButton(getSeaPhrase(\"GO_TO_SUMMARY_APPROVAL\",\"TE\"),\"parent.BackToSummary(this,'\"+View+\"');return false\",\"margin-left:5px\");\t\t\n\t\t}\n\t}\n\t\n\t// Status Drop Down\n\t// Only show the status select if employee is a manager and the user has not navigated from Daily Time Entry.\n\tif (TimeCard.ManagerFlag && View != \"Daily\" && prm != \"daily\")\n\t{\n \t\targ += '<span style=\"white-space:nowrap\"><span class=\"plaintablecellbold\" style=\"vertical-align:top;padding-left:5px;padding-right:5px\">'+getSeaPhrase(\"STATUS\",\"TE\")+'</span>';\n \t\t\n\t\tif (TimeCard.View != 4)\n\t\t{\n\t\t\targ += '<span class=\"plaintablecell\" style=\"vertical-align:top\">>';\n\t\t\tswitch (TimeCard.Status)\n\t\t\t{\n\t\t\t\tcase 1: arg += getSeaPhrase(\"SUBMITTED\",\"TE\"); break;\n\t\t\t\tcase 2: arg += getSeaPhrase(\"APPROVED\",\"TE\"); break;\n\t\t\t\tcase 3: arg += getSeaPhrase(\"ON_HOLD\",\"TE\"); break;\n\t\t\t\tcase 4: arg += getSeaPhrase(\"REJECTED\",\"TE\"); break;\n\t\t\t\tcase 5: arg += getSeaPhrase(\"HISTORICAL_1\",\"TE\"); break; // Entered (Historical)\n\t\t\t\tcase 6: arg += getSeaPhrase(\"HISTORICAL_2\",\"TE\"); break; // Submitted (Historical)\n\t\t\t\tcase 7: arg += getSeaPhrase(\"HISTORICAL_3\",\"TE\"); break; // Approved (Historical)\n\t\t\t\tcase 8: arg += getSeaPhrase(\"HISTORICAL_4\",\"TE\"); break; // On Hold (Historical)\n\t\t\t\tcase 9: arg += getSeaPhrase(\"HISTORICAL_5\",\"TE\"); break; // Rejected (Historical)\n\t\t\t\tdefault: arg += getSeaPhrase(\"NONE\",\"TE\"); break;\n\t\t\t}\n\t\t\targ += '</span>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\targ += '<select class=\"inputbox\" name=\"cmbStatus\" onchange=\"parent.SetStatus()\">';\n\t\t\targ += (TimeCard.Status == 1)?'<option value=\"1\" selected></option>':'<option value=\"1\"></option>';\n\t\t\targ += (TimeCard.Status == 2)?'<option value=\"2\" selected>'+getSeaPhrase(\"APPROVED\",\"TE\")+'</option>':'<option value=\"2\">'+getSeaPhrase(\"APPROVED\",\"TE\")+'</option>';\n\t\t\targ += (TimeCard.Status == 3)?'<option value=\"3\" selected>'+getSeaPhrase(\"HOLD\",\"TE\")+'</option>':'<option value=\"3\">'+getSeaPhrase(\"HOLD\",\"TE\")+'</option>';\n\t\t\targ += (TimeCard.Status == 4)?'<option value=\"4\" selected>'+getSeaPhrase(\"REJECTED\",\"TE\")+'</option>':'<option value=\"4\">'+getSeaPhrase(\"REJECTED\",\"TE\")+'</option>';\n\t\t\targ += '</select>';\n\t\t}\n\t\t\n\t\targ += '</span>';\n\t}\n\t\n\targ += '</td></tr></table></form></div>';\n\treturn arg;\n}", "function EachProductPage({isTrueAppJS, match}) {\n let [isTrue, setisTrue] = useState(\"\")\n let [innerText, setinnerText] = useState(\"\")\n\n const {id, gender, genderItemIndex} = match.params\n\n //function to send to the child Bottombar\n const clickHandler = (childFeedback, childInnerText) => {\n setisTrue(childFeedback)\n setinnerText(childInnerText)\n // isTrueAppJS(childFeedback)\n }\n\n useEffect(() => {\n document.title=`${data[id][gender][genderItemIndex].ProductName}`\n return () => {\n document.title=\"\"\n }\n }, [match.params])\n return (\n <section className=\"container-fluid\">\n <div className=\"each-product-page-outer\">\n <EachProductDetails match={match} data={data}/>\n <Cart match={match} data={data} />\n </div>\n <BottomBar thisClickHandler={clickHandler}/>\n <Details match={match} isTrue={isTrue} innerText={innerText}/>\n </section>\n );\n}" ]
[ "0.6089963", "0.59777766", "0.5933643", "0.58554906", "0.5790299", "0.5788316", "0.5788304", "0.5757041", "0.57564163", "0.57531714", "0.5730086", "0.5710133", "0.56823206", "0.5656171", "0.56537056", "0.5647323", "0.56417894", "0.5635744", "0.56275254", "0.5616315", "0.5615889", "0.56146127", "0.5606211", "0.55896145", "0.55853194", "0.55673873", "0.55663484", "0.5560171", "0.5551664", "0.5549488", "0.5533076", "0.5529926", "0.55267286", "0.5519481", "0.5517781", "0.55163354", "0.5516086", "0.55016637", "0.5498574", "0.5486447", "0.54754716", "0.54733485", "0.5472302", "0.546703", "0.54647315", "0.5463104", "0.54614174", "0.54488724", "0.5444056", "0.5443164", "0.5439838", "0.5437772", "0.5434482", "0.5429609", "0.542856", "0.54275703", "0.5415261", "0.54117125", "0.5407746", "0.5399722", "0.5398334", "0.53982115", "0.53952575", "0.53935826", "0.53908014", "0.53875923", "0.5383658", "0.53825706", "0.53796357", "0.5379622", "0.53762645", "0.53739977", "0.5369313", "0.53687537", "0.53566575", "0.5351728", "0.5351372", "0.5343363", "0.53398156", "0.533832", "0.53316754", "0.5329879", "0.5329298", "0.53288126", "0.5325771", "0.5325238", "0.53246325", "0.53236705", "0.5323529", "0.53228205", "0.5322145", "0.53155905", "0.5315469", "0.5314719", "0.53139186", "0.531327", "0.53095305", "0.53065413", "0.5305859", "0.53055924", "0.5296267" ]
0.0
-1
O(n) = n creates an array of fibonaci sequence up num elements var array = []
function fibonacci(num) { console.log(num) if (num <= 1) { // todo investigate the time complexity of .push() //array.push(num) return 1 } return fibonacci(num - 1) + fibonacci(num - 2) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fibonacciArray(n) {\n var fibArr = [0, 1];\n for(i = 0; i<n; i++){\n if(i>fibArr[0])\n fibArr.push(fibArr[i] + fibArr[i-1])\n }\n\n return fibArr;\n}", "function fibonacci(n) {\r\nvar arr=[];\r\n for(let i=0; i<n;i++){\r\n arr.push(i);\r\n }\r\n for(let i=2;i<n;i++){\r\n arr[i]=arr[i-1]+arr[i-2]\r\n }\r\n return arr;\r\n}", "function fibonacciArray(n) {\n // the [0, 1] are the starting values of the array to calculate the rest from\n var fibArr = [0, 1];\n for(var i=2; i<n;i++){\n fibArr.push(fibArr[i-1]+fibArr[i-2]);\n }\n return fibArr;\n}", "function generateFib(n) {\n var arr = [0, 1];\n\n for (var i = 0; i < n; i++) {\n arr[i] = arr[i - 1] + arr[i - 2]\n }\n return arr;\n\n}", "function fibIt(n) {\n const fibArr = [1, 1];\n\n while (fibArr.length < n) {\n fibArr.push(fibArr[fibArr.length - 2] + fibArr[fibArr.length - 1]);\n }\n\n return fibArr;\n}", "function fibonacciArray(n) {\n var fibarr = [0, 1];\n var newArr = [];\n var sum = 0;\n for (var i = 0; i < n; i++) { \n newArr.push(fibarr[0]);\n sum = fibarr[0] + fibarr[1];\n fibarr[0] = fibarr[1];\n fibarr[1] = sum; \n }\n fibarr = newArr;\n return fibarr;\n}", "function generateFibonaci(n) {\n let first = 0;\n let next = 1;\n let sum = 0;\n const newArray = [];\n newArray.push(first, next);\n while (first + next < n) {\n sum = first + next;\n first = next;\n next = sum;\n newArray.push(sum);\n }\n return newArray;\n}", "function fibonacciSeries(n)\r\n{\r\n let arr=[];\r\n arr[0]=1;\r\n arr[1]=1;\r\n for(let i=2;i<n;i++)\r\n {\r\n arr[i]=arr[i-1]+arr[i-2];\r\n }\r\n return arr;\r\n}", "function fibonacciArray(n) {\n // the [0, 1] are the starting values of the array to calculate the rest from\n var fibArr = [0, 1];\n for(i=3;i<=n;i++){\n var nextterm=fibArr[i-3]+fibArr[i-2];\n fibArr.push(nextterm);\n }\n // your code here\n return fibArr;\n}", "function fibSequence(number){\n var array = [0,1];\n for(var i = 0; i < number-2; i++){\n var currentNum = array[array.length-1] + array[array.length-2]\n array.push(currentNum)\n }\n\n return array;\n}", "function fib(n) {\n let sum=[]\n for(var i=0;i<=n;i++){ //make sure i is <=0 or jsut initate the array with 0 and 1\n if(i===0||i===1){\n sum.push(i)\n }else{\n sum.push(sum[i-1]+sum[i-2])\n }\n \n }\n return sum[sum.length-1]\n }", "function fibo(no) {\n\tvar fiboSeries = [];\n\tfor (let counter = 0; counter < no; ++counter) {\n\t\tfiboSeries.push((counter < 2) ? counter : fiboSeries[counter-1] + fiboSeries[counter-2]);\n\t}\n\treturn fiboSeries;\n}", "function fibonacci(n) {\n let arr = [];\n for (let i = 1; i < n; i++) {\n if (i === 1) {\n arr.push(0);\n } else if (i === 2) {\n arr.push(1)\n } else {\n arr.push(arr[arr.length - 1] + arr[arr.length - 2]);\n }\n }\n return arr;\n}", "function fibs(n) {\n if (n === 0) {\n return [];\n } else if (n === 1) {\n return [0];\n }\n let seq = [0, 1];\n while (seq.length < n) {\n let term1 = seq[seq.length - 1];\n let term2 = seq[seq.length -2];\n seq.push(term1 + term2);\n }\n return seq;\n}", "function fib(n) {\n\tconst result = [0,1];\n\n\tfor(let i=2; i<=n; i++){\n\n\t\tresult[i] = result[i-1] + result[i-2];\n\t}\n\n\treturn result[n];\n\t// return result; //returns whole array\n}", "function fibonacciGenerator(n){\r\n var a=[];\r\n\r\n if(n===1){\r\n a.push(0);\r\n }\r\n\r\n else if(n>=2){\r\n a.push(0);\r\n a.push(1);\r\n }\r\n\r\n for(var i=2;i<n;i++){\r\n a[i]=a[i-1]+a[i-2];\r\n }\r\n\r\n return a;\r\n}", "function fib (n){\r\n var output = [];\r\n\r\n if(n === 1){\r\n output = [0];\r\n }else if ( n === 2){\r\n output = [1];\r\n }else{\r\n output = [0, 1];\r\n\r\n for(var i = 2; i < n; i++){\r\n output.push(output[output.length-2] + output[output.length-1]);\r\n }\r\n }\r\n\r\n return output;\r\n}", "function fib0(n) {\n let arr = [0, 1];\n for (let i = 2; i < n; i++){\n arr.push(arr[i - 1] + arr[i - 2]);\n console.log(arr)\n }\n return arr[n-1]\n}", "function fibonacciArr(n) {\n const arr = [ 1, 2 ];\n let current = 1, temp = 0, next = 2;\n\n while (true) {\n temp = next;\n next += current;\n current = temp;\n if (next >= n) break;\n arr.push(next);\n }\n return arr;\n}", "function fibonacciGenerator (n) {\n \n var fibNumbers = [];\n for (var i = 0; i < n; i++){\n if (i <= 1) {\n fibNumbers.push(i);\n } else{\n fibNumbers.push(fibNumbers[i - 2] + fibNumbers[i - 1]); \n } \n }\n \n return fibNumbers;\n }", "function fibonacci(n) {\n\n n = n > 0 ? n : 0;\n var arr = [0, 1];\n while( arr.length < n ) {\n arr.push( arr[ arr.length - 2 ] + arr[ arr.length - 1 ] );\n }\n\n return arr.slice(0, n);\n}", "function fibIterative(num) {\n let array = [0,1]\n for (let i = 1; i < num; i++) {\n array.push(array[i]+array[i-1])\n }\n return array[num]\n}", "function fibs(num) {\n if (num === 0) {\n return [];\n } else if (num === 1) {\n return [0];\n }\n\n let result = [0, 1];\n\n while (result.length < num) {\n result.push(result[result.length - 1] + result[result.length - 2]);\n }\n\n return result;\n}", "function fibonacciIterative(n) {\n let arr = [0, 1]\n for (let i = 2; i < n + 1; i++) {\n arr.push(arr[i - 2] + arr[i - 1])\n }\n return arr[n]\n} // O(n)", "function fibSequence(num){\n let output = [];\n for(let i = 0; i < num - 2; i++){\n\t\tlet present = i;\n\t\tlet future = i+1;\n\t\tif(i <= 1){\n\t\t\toutput.push(present);\n\t\t\toutput.push(future);\n\t\t} else {\n\t\t\toutput.push(output[present] + output[future]);\n\t\t}\n }\n return output;\n}", "function fibonacci(n) {\n var fibo = [0, 1];\n for (var i = 2; i <= n; i++) {\n fibo[i] = fibo[i - 1] + fibo[i - 2]\n }\n return fibo\n}", "function recursiveFibonacciArray(n) {\n if (n == 0) {\n return [0]\n }if(n ==1 ){\n return [0,1]\n } else {\n var fibo = recursiveFibonacciArray(n-1);\n var nextElement = fibo[n-1] + fibo[n-2];\n fibo.push(nextElement);\n return fibo\n }\n}", "function fibGen(n) {\n var fibSeq = [];\n var a = 0;\n var b = 1;\n var c = 1;\n for (var i = 1; i <= n; i++) {\n fibSeq.push(a);\n a = b;\n b = c;\n c = a + b;\n }\n return fibSeq;\n}", "function fibonacciIterative(n){\n\tlet arr = [0,1];\n\tfor(let i = 2; i < n+1; i++){\n\t\tarr.push(arr[i-1] + arr[i-2])\n\t}\n\treturn arr[n];\n}", "function fibonacciIterative(n) {\n // O(n)\n let arr = [0, 1];\n for (let i = 2; i < n + 1; i++) {\n arr.push(arr[i - 2] + arr[i - 1]);\n }\n return arr[n];\n}", "function fibTabulation(n) {\n\nlet arrOfFib = new Array(n + 1).fill(0);\narrOfFib[1] = 1;\nfor(let i = 0; i < arrOfFib.length; i++) {\n\ncurruntPosition = arrOfFib[i];\nif(arrOfFib[i + 1] !== undefined) arrOfFib[i + 1] += curruntPosition;\nif( arrOfFib[i + 2] !== undefined) arrOfFib[i + 2] += curruntPosition;\n}\n\nreturn arrOfFib[n];\n}", "function fibonacci(n) {\n const result = [0, 1];\n\n for(let i = 0; i < n; i++) {\n result.push(result[result.length-2] + result[result.length-1]);\n }\n\n return result[n];\n}", "function calculateFibonacci(n) {\r\n\r\n n = n-1; // since we are returning a 0-based array\r\n\r\n if (n == 0)\r\n return [0];\r\n if (n == 1)\r\n return [0,1];\r\n\r\n var ret = [0,1];\r\n for (var x = 2; x <= n; x++) { ret.push(ret[x-1] + ret[x-2]); }\r\n return ret;\r\n}", "function fibonacci(number) {\n let fibArr = []\n\n for(let i = 0; i < number; i++){\n fibArr.push((fibArr[i-2] || 1) + (fibArr[i-1] || 0))\n }\n return fibArr.reverse()\n}", "function fib(n) {\r\n let arr = [0, 1];\r\n\r\n if (n <= 2) return 1;\r\n\r\n for (let i = 2; i <= n; i++) {\r\n arr[i] = arr[i - 1] + arr[i - 2];\r\n }\r\n return arr[n];\r\n}", "function fibonacci1(num) {\n if (num <= 0) {\n return 1;\n }\n var arr = [];\n var a = 1;\n var b = 0;\n for(var i = 0; i < num; i++) {\n var temp = a;\n a = a + b;\n b = temp;\n arr[i] = b;\n }\nconsole.log(arr);\n}", "function simpleFibTab(n) {\n\n let arrOfFib = new Array(n + 1).fill(0);\n \n for(let i = 0; i < arrOfFib.length; i++) {\n if(i === 0) {\n arrOfFib[i] = 0;\n continue;\n } else if(i === 1) {\n arrOfFib[i] = 1;\n continue;\n }\n \n arrOfFib[i] = arrOfFib[i - 1] + arrOfFib[i - 2];\n }\n\n return arrOfFib[n];\n}", "function fibonacciGenerator(n) {\n var output = [];\n if (n === 1) {\n output = [0];\n } else if (n === 2) {\n output = [0, 1];\n } else {\n output = [0, 1];\n\n for (var i = 2; i < n; i++) {\n output.push(output[output.length - 2] + output[output.length - 1]);\n }\n }\n return output;\n}", "function fibonacci(n) {\n\n if (n === 1) {\n return [0]\n } else if (n === 2) {\n return [0, 1];\n } \n let fibArray = fibonacci(n - 1);\n f1 = 1;\n f2 = 2;\n \n fibArray.push(fibArray[fibArray.length - f1] + fibArray[fibArray.length - f2])\n return fibArray;\n}", "function generateFib(num) {\n let result = [];\n for (let i = 1; i <= num; i++) { // O(n) linear\n\n // we're adding the first item\n // to the result list, append the\n // number 0 to results\n if (i === 1) { // O(1) constant; will only run once\n result.push(0);\n }\n // ...and if it's the second item\n // append 1\n else if (i == 2) { // O(1) constant; will only run once\n result.push(1);\n }\n\n // otherwise, sum the two previous result items, and append that value to results.\n else {\n result.push(result[i - 2] + result[i - 3]);\n }\n }\n // once the for loop finishes\n // we return `result`.\n return result;\n}", "function fibonacci3(n) {\n\tif (n == 0) {\n\t\treturn [0];\n\t}\n\tif (n == 1) {\n\t\treturn [0, 1];\n\t} else {\n\t\t//calculate array nth element\n\t\tlet fibo = fibonacci3(n - 1);\n\n\t\tlet nextElement = fibo[n - 1] + fibo[n - 2];\n\t\tfibo.push(nextElement);\n\t\treturn fibo;\n\t}\n}", "function fibToN(n) {\n var fibSeq = [];\n var a = 0;\n var b = 1;\n var c = 1;\n while (a <= n) {\n fibSeq.push(a);\n a = b;\n b = c;\n c = a + b;\n }\n return fibSeq;\n}", "function fibonacci(number) {\n\tvar fibonacci = [];\n\n\tif (number > 0) \n\t\tfibonacci[0] = 0;\n\n\tif (number > 1)\n\t\tfibonacci[1] = 1;\n\n\tfor (var i=2; i<number; i++) {\n\t\tfibonacci[i] = fibonacci[i-2] + fibonacci[i-1];\n\t}\n\n\treturn fibonacci;\n}", "function fib(n) {\n let result = [0, 1];\n\n for (let i = 2; i <= n; i++) {\n const a = result[i - 1]\n const b = result[i - 2]\n\n result.push(a + b)\n }\n return result[result.length - 1]\n}", "function fib(n) {\n if (n===0){\n return [];\n } else if (n === 1) return [1]\n else if (n===2) return [1, 1]\n else {\n let fibs = fib(n-1);\n fibs.push(fibs[fibs.length-2]+fibs[fibs.length-1]);\n return fibs;\n}\n // return fibs.push(fibs[fibs.length-2]+fibs[fibs.length-1]);\n\n}", "function fibMaker (length) {\n let num = [1,1]\n for (let i = 0; i < length; i++) {\n numPush = num[i+1] + num[i]\n num.push(numPush)\n }\n console.log(num)\n}", "function fibonacci(n){\n const result = [0,1]; // An Array to store all numbers.\n for(let i = 2; i <= n; i++){ // Iterate through the array. Starting point is at 2 since 0 and 1 have no numbers next to it to add.\n const a = result[i - 1];// We need to get the previous record to add together.\n const b = result[i - 2];\n result.push(a+b); // add a and b to get the sume of the two.\n }\n return result[n];\n}", "function fibonacci(n) {\n if (n <= 2) {\n return [0, 1].slice(0, n)\n } else {\n const prev = fibonacci(n - 1)\n prev.push(prev[prev.length - 2] + prev[prev.length - 1]);\n return prev;\n }\n}", "function fib_tab(n){\r\n\r\n if(n <= 2) return 1;\r\n\r\n let fibNums = [0,1,1]\r\n for(let i = 3; i <= n; i++){\r\n fibNums[i] = fibNums[i-1] + fibNums[i-2];\r\n }\r\n\r\n return fibNums[n];\r\n\r\n}", "function generateFib(num) {\n let result = []; //--> constant\n for (let i = 1; i <= num; i++) { // --> O(n) linear\n\n // we're adding the first item\n // to the result list, append the\n // number 0 to results\n if (i === 1) { //--> constant\n result.push(0); //--> constant\n }\n // ...and if it's the second item\n // append 1\n else if (i == 2) { //--> constant\n result.push(1); //--> constant\n }\n\n // otherwise, sum the two previous result items, and append that value to results.\n else {\n result.push(result[i - 2] + result[i - 3]); //--> constant\n }\n }\n // once the for loop finishes\n // we return `result`.\n return result; //--> constant\n}", "function Fibonacci(n){\n let fib =[0,1];\n for(let i=2;i<n;i++){\n fib[i] = (fib[(i-1)]+fib[(i-2)]);\n }\n return fib;\n}", "function fibonacci(index){\n arr=[0,1];\n for(let i=0;i<index;i++){\n arr.push(arr[i]+arr[i+1]);\n }\n console.log(arr);\n return arr[index];\n}", "function fibonacci(num) {\n var sequence = [0, 1];\n for(var i = 2; i <= num; i++) {\n sequence.push(sequence[i - 1] + sequence[i - 2]);\n // console.log(sequence);\n }\n return sequence[num];\n}", "function fibonacci(n) {\n\tif (n == 0) {\n return [0];\n }\n if (n === 1) {\n return [1];\n }\n if (n === 2) {\n return [1, 1];\n }\n let fibArr = fibonacci(n - 1);\n fibArr.push(fibArr[n - 3] + fibArr[n - 2]);\n\n return fibArr;\n}", "function getFibs(numMax){\n var fibArr = [1,1];\n for(var i=2; fibArr[i-1] + fibArr[i-2] <= numMax; i++){\n fibArr[i] = fibArr[i-1] + fibArr[i-2];\n } return fibArr;\n }", "fibonacci(n,m){\n var fib = [0,1];\n while(n > 0){\n fib.push((fib[fib.length - 1] + fib[fib.length - 2]) % m);\n n--;\n }\n return fib; \n }", "function fib(max) {\n var a = 0,\n b = 1;\n var results = [];\n while (b < max) {\n results.push(b);\n [a, b] = [b, a + b];\n }\n return results;\n}", "function fibonacci(n) {\n if (n <= 0) return [];\n if (n === 1) return [1];\n if (n === 2) return [1,1];\n\n let fib = fibonacci(n-1);\n fib.push(fib[fib.length - 2] + fib[fib.length - 1]);\n return fib;\n}", "function _fib(n) {\n if (n === 0) return [0n, 1n]\n else {\n // recurse for i + 2 levels, where 2^i <= n\n // the last 2 levels are for n = [0, 1]\n const [fn, fn1] = _fib(Math.floor(n / 2))\n const f2n = fn * (2n * fn1 - fn)\n const f2n1 = fn1 ** 2n + fn ** 2n\n return n % 2 === 0 ? [f2n, f2n1] : [f2n1, f2n + f2n1]\n }\n }", "function fibIterative(n) {\n\tconst result = [0, 1];\n\n\tfor (let i = 2; i <= n; i++) {\n\t\tconst a = result[i - 1];\n\t\tconst b = result[i - 2];\n\t\tresults.push(a + b);\n\t}\n\n\treturn results[n];\n}", "function fibo(position) {\n const resArr = [];\n resArr[1] = 1;\n resArr[2] = 1;\n for (let i = 3; i <= position; i++) {\n resArr[i] = resArr[i - 1] + resArr[i - 2];\n }\n return resArr[position];\n }", "function genFib(ns){\n var num1 = Number(ns[ns.length-1]);\n var num2 = Number(ns[ns.length-2]);\n\n ns.push(num1 + num2);\n return ns;\n}", "function fib(n) {\r\n if (n <= 2) return 1;\r\n var fibNums = [0, 1, 1];\r\n for (var i = 3; i <= n; i++) {\r\n fibNums[i] = fibNums[i - 1] + fibNums[i - 2];\r\n }\r\n return fibNums[n];\r\n}", "function fibo(p) {\n let log = [0, 1];\n for (let i = 2; i < p; i++) {\n log[i] = log[i - 1] + log[i - 2];\n\n }\n return log;\n}", "function fibonacci(num){\n let result = [];\n for(let i=1; i<=num; i++){\n if(i < 3){\n result.push(1);\n }\n if(i >=3){\n let next = result[i-2] + result[i-3];\n result.push(next);\n }\n }\n return result;\n}", "function fibo() {\nvar fibSum = 0;\nvar tmp = 0;\nvar total = 0;\nvar toSum = [];\nvar x = 0;\nvar y = 1;\n\nfor(var i = 0; i < 4000000000; i++){\n\n\tif (fibSum < Number.MAX_SAFE_INTEGER) {\n\t\t\ttmp = x + y; \n\t\t\tx = y;\n\t\t\ty = tmp;\n\n\t\tif(tmp%2 == 0){\n\t\t\tfibSum = fibSum + tmp;\n\t\t\ttoSum[0] = fibSum;\n\t\t}\n\n\t} else { \n\t\ttoSum.push(fibSum);\n\t\tfibSum = 0;\n\t}\n}\n\ntoSum.forEach(function(element,index,array){\n\ttotal += (element * Math.pow(10,-100));\n});\n\n\n}", "function fibonacci(n) {\n if (n === 1) {\n return [0];\n } else if (n === 2) {\n return [0, 1];\n } else if (n < 1) {\n return [];\n }\n\n let fibs = fibonacci(n - 1);\n fibs.push(fibs[fibs.length-2] + fibs[fibs.length-1]);\n return fibs;\n}", "function fib(index){\n let fibArray = [0,1];\n for (let i = 1; i <= index; i++) {\n fibArray[i+1] = (fibArray[i] + fibArray[i-1]);\n }\n return fibArray[index]\n}", "function fibonacci(n) {\n if (n === 1) { return [1] };\n if (n === 2) { return [1, 1] };\n\n let seq = fibonacci(n - 1)\n seq.push(seq[seq.length - 1] + seq[seq.length - 2])\n return seq;\n}", "function febonacci(n){\n let febo = [0,1];\n for(let i = 2; i <= n; i++){\n febo[i] = febo[i - 1] + febo [i- 2];\n \n } \n return febo;\n}", "function fib(n) {\n const sequence = [0, 1];\n\n for (let i = 2; i <= n; i++) {\n const a = sequence[i - 1] // index 1\n const b = sequence[i - 2] // index 0\n\n sequence.push(a + b);\n }\n\n return sequence[n]; // or return sequence[sequence.length - 1] which is the last index\n\n}", "function fibonacci (x) {\n var fib =[0];\n for (var v = 0, i = 0; v < x; i++) {\n if (i < 1) {\n fib[i] = 0;\n } else if (i < 2) {\n fib[i] = 1;\n } else {\n fib[i] = fib[i-1] + fib[i-2];\n v = fib[i]\n };\n };\n return fib;\n}", "function dynFib(n) {\r\n\tvar val = [];\r\n\tfor (var i = 0; i <= n; ++i) {\r\n\t\tval[i] = 0;\r\n\t}\r\n\tif (n == 1 || n == 2) {\r\n\t\treturn 1;\r\n\t}\r\n\telse {\r\n\t\tval[1] = 1;\r\n\t\tval[2] = 2;\r\n\t\tfor (var i = 3; i <= n; ++i) {\r\n\t\t\tval[i] = val[i-1] + val[i-2];\r\n\t\t}\r\n\t\treturn val[n-1];\r\n\t}\r\n}", "function Fibo() {\n\tconst f = (function * () {\n\t\tconst A = [ 0, 1 ];\n\t\tlet forward = true;\n\t\tfor ( ; true; ) {\n\t\t\tconst flag = yield A[0];\n\t\t\tif (flag===true || flag===false){\n\t\t\t\tforward = flag;\n\t\t\t}\n\t\t\tif (forward) {\n\t\t\t\tconst next = A[0] + A[1];\n\t\t\t\tA.push(next);\n\t\t\t\tA.shift();\n\t\t\t} else {\n\t\t\t\tconst prev = A[1] - A[0];\n\t\t\t\tA.unshift(prev);\n\t\t\t\tA.pop();\n\t\t\t}\n\t\t}\n\t})();\n\tconst one = (flag) => f.next(flag).value;\n\treturn (amount, flag) => {\n\t\tconst result = [];\n\t\tfor ( let i=0; i<amount; i++ ) {\n\t\t\tresult.push( one( flag ) );\n\t\t}\n\t\treturn result;\n\t}\n}", "function fibonacci(n){\n var fib = [0, 1];\n \n if (n <= 2) return 1;\n\n for (var i = 2; i <=n; i++ ){\n fib[i] = fib[i-1]+fib[i-2];\n }\n\n return fib[n];\n}", "function fibonacciFor(limite) {\n\n let i = 0\n let j = 1\n let serie = [i]\n\n for (let index = 0; index < Infinity //array.length le pongo 50 pero mejor infinity aunque queda feo\n ; index++) {\n let next = i + j\n i = j\n j = next\n //ahora queremos almacenar i y por eso ponemos un push\n serie.push(i)\n if (j>limite) {\n break \n // continue\n }\n }\n return serie\n }", "function fibTabulation(n) {\n if (n < 2) return 1;\n const fibNums = [0, 1, 1];\n for (let i = 3; i <= n; i++) {\n fibNums[i] = fibNums[i - 1] + fibNums[i - 2];\n }\n return fibNums[n];\n}", "function fibonacci(n) {\n\tvar series = [0, 1, 1];\n\tfor (var nth = 3; nth < n; nth++) {\n\t\tseries.push(series[nth - 1] + series[nth - 2])\n\t}\n\n\treturn series[n - 1] + series[n - 2];\n}", "function fibonacci(x) {\r\n var range = x;\r\n var start = 0;\r\n\r\n var a = 0;\r\n var b = 1;\r\n var obj = [];\r\n var arr = 0;\r\n\r\n var temp = 1;\r\n\r\n while (start < range) {\r\n temp = a + b;\r\n a = b;\r\n b = temp;\r\n if (temp % 2 === 0) {\r\n obj[arr] = temp;\r\n arr = arr + 1;\r\n }\r\n\r\n start = start + 1;\r\n }\r\n console.log(range);\r\n console.log(obj);\r\n}", "function FiboRatio(a){\n var b = [0,1], fib = [];\n for (var i = 0; i < a; i++){\n b[i % 2] += b[(i+1) % 2];\n \n fib[i] = b[i % 2] / b[(i + 1) % 2];\n }\n return fib;\n}", "function iterativeFibonacci(n){\n var fibs= [0,1];\n\n for(i=0; i < n; i++){\n fibs.push(fibs[0] + fibs[1]);\n fibs.shift();\n }\n return fibs[0];\n}", "function generateFib(num) {\n let result = [];\n for (let i = 1; i <= num; i++) {\n\n // we're adding the first item\n // to the result list, append the\n // number 0 to results\n if (i === 1) {\n result.push(0);\n }\n // ...and if it's the second item\n // append 1\n else if (i === 2) {\n result.push(1);\n }\n // otherwise, sum the two previous result items, and append that value to results.\n else {\n result.push(result[i - 2] + result[i - 3]);\n }\n }\n // once the for loop finishes\n // we return `result`.\n return result;\n}", "function nthFibo(n) {\r\n [a, b] = [0, 1]\r\n for (let i = 1; i < n; i++)\r\n [a, b] = [b, a + b]\r\n return a\r\n}", "function generateFib(num) {\n let result = [];\n for (let i = 1; i <= num; i++) {\n\n // we're adding the first item\n // to the result list, append the\n // number 0 to results\n if (i === 1) {\n result.push(0);\n }\n // ...and if it's the second item\n // append 1\n else if (i === 2) {\n result.push(1);\n }\n\n // otherwise, sum the two previous result items, and append that value to results.\n else {\n result.push(result[i - 2] + result[i - 3]);\n }\n }\n // once the for loop finishes\n // we return `result`.\n return result;\n}", "function fibIt(num)\n{\n//because first two numbers in sequence are 0, 1\nconst arr = [0, 1] \n//mapper will return the object which is the key and value of the sequence. KEY = index position. VALUE = the number in that position\nconst mapper = {}\n//begin counter at 0\nlet counter = 0\n\n//because we already have first two numbers (0, 1), we begin at 2\nfor (let i = 2; i <= num; i++)\n{\n let a = arr[i - 1]\n let b = arr [i - 2]\n arr.push(a + b)\n \n}\n\nfor (let element in arr)\n{\n mapper[counter] = arr[element]\n counter++\n}\n//return arr and you will get that many numers of the sequence\nreturn arr\n}", "function tabularFib(n) {\n let seq = [0,1,1];\n if (seq[n]) return seq[n];\n for (let i = 3; i<= n; i++) {\n seq[i] = seq[i-1] + seq[i-2];\n }\n return seq[n];\n}", "function Fibonacci(n){\n var fibo = [0, 1];\n\n if (n <= 2) return 1;\n\n for (var i = 2; i <= n; i++){\n fibo[i] = fibo[i - 1] + fibo[i - 2];\n }\n return fibo[n];\n}", "function fiboEvenSum(n) {\n\n let arr=[1,2]; \n let sum=2;\n \n if(n<=1){\n return 0;\n }\n\n//crear array con la secuencia fibonacii\n for(let i = 2; i<n;i++){\n arr.push(arr[i-1]+arr[i-2])\n\n//sumar pares\n if(arr[i]%2 == 0){\n sum += arr[i];\n }\n }\n\n return sum;\n}", "function _generateFibonacciSequence (maxFibValue){\n let fibonacciNumbers = [];\n let firstValue = 0;\n let secondValue = 1;\n let calcValue = firstValue + secondValue;\n\n fibonacciNumbers.push(firstValue);\n fibonacciNumbers.push(secondValue);\n \n while (calcValue <= maxFibValue){\n fibonacciNumbers.push(calcValue);\n firstValue = secondValue;\n secondValue = calcValue;\n calcValue = firstValue + secondValue;\n }\n return fibonacciNumbers;\n}", "function fib(numMax){\t\n var fibArray = [0]\n console.log(fibArray)\n fibArray.push(1)\n console.log(fibArray)\n for(i=0,j=1,k=0; k<numMax;i=j,j=x,k++ ){\n x=i+j\n fibArray.push(x)\n console.log(fibArray)\n }\n for(var i = 0; i < numMax; i++){ \n fibArray.pop()\n console.log(fibArray)\n } \n fibArray.pop()\n console.log(fibArray)\n fibArray.pop()\n console.log(fibArray)\n \n}", "function iFibonacci(num){\n var fib = [0, 1];\n for(var i = 0; i < num; i++){\n fib.push(fib[0] + fib[1]);\n fib.shift();\n }\n return fib[0];\n}", "function fib(n) {\n \n}", "function evenFib(){\n var fibo = [2, 4],\n sum = 0;\n\n while( sum < 4000000) {\n var len = fibo.length;\n sum = fibo[len - 2] + fibo[len - 1];\n fibo.push(sum)\n }\n\n return sum\n}", "function fibTab(n) { \n const table = new Array(n+1).fill(0);\n table[1] = 1;\n\n //this is how i thought to iterate\n for (let i = 0; i < table.length; i++) {\n if (i + 1 < table.length) table[i+1] += table[i];\n if (i + 2 < table.length) table[i+2] += table[i];\n }\n console.log('table.length =', table.length);\n //this is the example given\n // for (let i = 0; i <= n; i++) {\n // table[i+1] += table[i];\n // table[i+2] += table[i];\n // }\n console.log('table =', table);\n return table[n];\n}", "function fibonacci(n) {\n\tvar fibonacci = [0, 1];\n\tif (n <= 2) return 1;\n\n\tfor (var i = 2; i <= n; i++) {\n\t\tfibonacci[i] = fibonacci[i-1] + fibonacci[i-2];\n\t}\n\n\treturn fibonacci[n];\n}", "function fib(n) {\n var fib = [0,1]\n\n while (fib.length < n) {\n fib.push(fib[fib.length - 1] + fib[fib.length -2]);\n }\n\n if (n <=1) {\n return fib.slice(0,2);\n }\n\n if (n == 0) {\n return 'nothing to return';\n }\n return fib;\n}", "function fib3(n) {\n var f = [0,1], i=0;\n for(i=2; i<=n; i++) {\n f[i] = f[i-1] + f[i-2]; \n }\n return f[n];\n}", "function fibBottomUp(n) {\n let arr = [];\n for (i = 0; i <= n; i++) {\n if (i == 1 || i == 2) {\n arr[i] = 1;\n } else {\n arr[i] = arr[i - 1] + arr[i - 2];\n }\n }\n return arr[n];\n}", "function IterFibonacci(index){\n let fiblist = [0,1]\n for(let i=2; i<=index;i++){\n fiblist.push(fiblist[i-1]+fiblist[i-2])\n } \n return fiblist[index]\n}", "function fibonacci (n) {\n let [current, prev, sum, temp] = [new bn(2), new bn(0), new bn(0)]\n while (current.lt(n)) {\n sum = sum.plus(current)\n temp = current\n current = current.times(4).plus(prev)\n prev = temp\n }\n return sum.toFixed()\n}", "function fibWithTabulation(n) {\n if (n <= 2) return 1;\n let fibNums = [0, 1, 1]\n for (let i = 3; i < n; i++) {\n fibNums[i] = fuiNums[i - 1] + fibNums[i - 2];\n }\n return fibNums[n]\n}" ]
[ "0.81787026", "0.8122116", "0.8078144", "0.8035182", "0.8009666", "0.8007194", "0.80036074", "0.79910487", "0.7983444", "0.7926307", "0.786116", "0.78486824", "0.7833397", "0.7828305", "0.780592", "0.77885205", "0.7776408", "0.77759063", "0.7675666", "0.7638117", "0.76378965", "0.7625338", "0.75938386", "0.75922036", "0.7560265", "0.75561166", "0.7553688", "0.7548238", "0.75207233", "0.74703485", "0.7459367", "0.7443739", "0.74429387", "0.7404864", "0.7404197", "0.7384093", "0.7380935", "0.73611933", "0.73543096", "0.7323878", "0.7308713", "0.7306246", "0.73037815", "0.73016465", "0.7295721", "0.72817063", "0.7270725", "0.7262511", "0.7243884", "0.7240113", "0.72336084", "0.72277933", "0.72233284", "0.7212604", "0.72054887", "0.7201156", "0.7152757", "0.71355295", "0.7134653", "0.71295893", "0.7120583", "0.7120348", "0.7103505", "0.7102311", "0.7098029", "0.70852983", "0.7071482", "0.70642686", "0.7062953", "0.7057255", "0.70523256", "0.7048955", "0.70489526", "0.70481193", "0.7038988", "0.7034014", "0.6992614", "0.6990713", "0.6990522", "0.69875467", "0.69845825", "0.6965168", "0.69631404", "0.695717", "0.6942566", "0.69363683", "0.6920594", "0.69120586", "0.6895088", "0.6891048", "0.68898815", "0.6889671", "0.6878308", "0.687694", "0.6874282", "0.68685573", "0.68607384", "0.6853934", "0.6849241", "0.6847762", "0.6840601" ]
0.0
-1
lets you read chars, and optionally reset the cursor to where it was before reading
function createCharReader (nextChar, rewind) { let charsRead = 0 return { nextChar () { charsRead += 1 return nextChar() }, reset () { rewind(charsRead) charsRead = 0 }, rewind (n = 1) { rewind(n) charsRead -= n } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "read() {\n if (this.pos < this.size) {\n this.ch = this.input.charCodeAt(this.pos++);\n } else {\n this.ch = -1;\n }\n }", "function reconsumeCurrentCharacter() {\n charIdx--;\n }", "function reconsumeCurrentCharacter() {\n charIdx--;\n }", "consumeChar() {\n this.currentChar = this.nextChar;\n this.nextChar = this.readable.read(1);\n }", "moveon () {\n\t\twhile( this.is(\" \\t\\n\") && this.read() ) {}\n\t}", "function readc() {\r\n const vm = this;\r\n readline(function (line) {\r\n if (!line[0]) throw \"I/O Error: expecting a character.\";\r\n\r\n vm.stack.push(line.charCodeAt(0));\r\n interpret.call(vm);\r\n });\r\n vm.pc++;\r\n}", "function reconsume(c, new_state) {\n tokenizer = new_state;\n nextchar--; // pushback\n }", "moveToNextCharacter() {\n this.handleRightKey();\n }", "function resetCursor() {\r\n if (t_input.setSelectionRange) { // Modern browsers\r\n t_input.focus();\r\n t_input.setSelectionRange(t_input.value.length, t_input.value.length);\r\n } else if (t_input.createTextRange) { // IE8 and below\r\n var range = t_input.createTextRange();\r\n range.collapse(true);\r\n range.moveEnd(\"character\", t_input.value.length);\r\n range.moveStart(\"character\", t_input.value.length);\r\n range.select();\r\n }\r\n}", "function next() {\n //gets the next character from the stream\n var ch = input.charAt(pos++);\n //if it's a new line, move the line down and shit\n //else, don't\n if (ch == \"\\n\") line++, col = 0; else col++;\n return ch;\n }", "skipToNextChar() {\n this.consume();\n this.skipSpaces();\n }", "function consume() {\n // Line ending; assumes CR is not used (remark removes those).\n if (value.charCodeAt(index) === lineFeed) {\n place.line++\n place.column = 1\n }\n // Anything else.\n else {\n place.column++\n }\n\n index++\n\n place.offset++\n place.index = index\n }", "function pollKeyStuff() {\n var thrufl = 0x81de; // line input done flag\n\n var ch = nextChar();\n if (phase < 0) {\n phase++;\n } else if ((phase === 0) &&\n (ccemu.rd(thrufl) === 0)) { // buffer accepting input\n keybrd.asciiKey(ch); // set it\n phase = 1;\n } else if (phase === 1) {\n keybrd.asciiKey(); // clear it\n // heuristic: delay to allow for line processing\n phase = (ch === '\\r') ? -key_at_a_time_eol_delay : 0;\n offset++;\n if (offset >= text.length) {\n phase = 0;\n offset = -1; // signal that we are done\n }\n }\n }", "moveToPreviousCharacter() {\n this.handleLeftKey();\n }", "function resetCursor(){\r\n\ttry{ \r\n\t\tif (hatsForm.CURSORPOSITION.value){\r\n\t\t\tinitInputFieldFocus(hatsForm.CURSORPOSITION.value);\r\n\t\t}\r\n\t}catch(e){\r\n\t\treturn;\r\n\t}\r\n\tsetInputFieldFocus();\r\n\t//for mozilla and IE10 only\r\n\tsetInitValuesforHidden();\r\n}", "reconsume() {\n this.pos_ -= 1;\n // TODO(johannes): Oddly, adding the following breaks the test with\n // internal errors. Investigate.\n // this.code_ = this.codepoint(this.pos_);\n }", "nextLine() {\n this._bufferService.buffer.x = 0;\n this.index();\n return true;\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;\n if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.options.disableInput) return false;\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n if (text == prevInput && posEq(sel.from, sel.to)) return false;\n if (ie && !ie_lt9 && cm.display.inputHasSelection === text) {\n resetInput(cm, true);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n sel.shift = false;\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var from = sel.from, to = sel.to;\n var inserted = text.slice(same);\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + inserted.length));\n\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: splitLines(inserted),\n origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\n makeChange(cm.doc, changeEvent, \"end\");\n cm.curOp.updateInput = updateInput;\n signalLater(cm, \"inputRead\", cm, changeEvent);\n if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\n cm.options.smartIndent && sel.head.ch < 100) {\n var electric = cm.getModeAt(sel.head).electricChars;\n if (electric) for (var i = 0; i < electric.length; i++)\n if (inserted.indexOf(electric.charAt(i)) > -1) {\n indentLine(cm, sel.head.line, \"smart\");\n break;\n }\n }\n\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n return true;\n }", "function eatCharacter(stream) {\n var first = stream.next();\n // Read special literals: backspace, newline, space, return.\n // Just read all lowercase letters.\n if (first && first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) {\n return;\n }\n // Read unicode character: \\u1000 \\uA0a1\n if (first === \"u\") {\n stream.match(/[0-9a-z]{4}/i, true);\n }\n }", "function eatCharacter(stream) {\n var first = stream.next();\n // Read special literals: backspace, newline, space, return.\n // Just read all lowercase letters.\n if (first && first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) {\n return;\n }\n // Read unicode character: \\u1000 \\uA0a1\n if (first === \"u\") {\n stream.match(/[0-9a-z]{4}/i, true);\n }\n }", "next () {\n\t\tconst ch = this.char();\n\n\t\tif ( ch === '\\n' || ch === '\\r' ) {\n\t\t\tthis.col = 0;\n\t\t\tthis.line++;\n\n\t\t\t// handle '\\n\\r' line endings\n\t\t\tif ( ch === '\\n' && this.code[ this.pos + 1 ] === '\\r' ) {\n\t\t\t\tthis.pos++;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.col++;\n\t\t}\n\t\tthis.pos++;\n\t}", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;\n if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false;\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n if (text == prevInput && posEq(sel.from, sel.to)) return false;\n if (ie && !ie_lt9 && cm.display.inputHasSelection === text) {\n resetInput(cm, true);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n sel.shift = false;\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var from = sel.from, to = sel.to;\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same)));\n\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)),\n origin: cm.state.pasteIncoming ? \"paste\" : \"+input\"};\n makeChange(cm.doc, changeEvent, \"end\");\n cm.curOp.updateInput = updateInput;\n signalLater(cm, \"inputRead\", cm, changeEvent);\n\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = false;\n return true;\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;\n if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false;\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n if (text == prevInput && posEq(sel.from, sel.to)) return false;\n if (ie && !ie_lt9 && cm.display.inputHasSelection === text) {\n resetInput(cm, true);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n sel.shift = false;\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var from = sel.from, to = sel.to;\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same)));\n\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)),\n origin: cm.state.pasteIncoming ? \"paste\" : \"+input\"};\n makeChange(cm.doc, changeEvent, \"end\");\n cm.curOp.updateInput = updateInput;\n signalLater(cm, \"inputRead\", cm, changeEvent);\n\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = false;\n return true;\n }", "function setCursorToEnd(input){\n input.selectionStart = input.selectionEnd = 10000;\n}", "@action setCursor(pos) {\n let that = this;\n let ctrl = document.getElementById(that.textareaId);\n\n if (ctrl.setSelectionRange) {\n ctrl.focus();\n next(that, function () {\n ctrl.setSelectionRange(pos, pos);\n });\n } else if (ctrl.createTextRange) {\n let range = ctrl.createTextRange();\n range.collapse(true);\n range.moveEnd('character', pos);\n range.moveStart('character', pos);\n range.select();\n }\n }", "iter(dir = 1) { return new RawTextCursor(this, dir); }", "function resetCursor(txtElement) { \n if (txtElement.setSelectionRange) { \n txtElement.focus(); \n txtElement.setSelectionRange(0, 0); \n } else if (txtElement.createTextRange) { \n var range = txtElement.createTextRange(); \n range.moveStart('character', 0); \n range.select(); \n } \n}", "current() { return this.valid(this.pos)?this.input.charAt(this.pos):Source.EOI }", "outputCR() {\n this.cursor.x = 0;\n }", "checkNewDelimiter(char){\n\t\tvar buffer_str = this.buffer.join('').toLowerCase().trim();\n\t\tif(buffer_str === 'delimiter' && !this.quoteType){\n\t\t\tthis.seekingDelimiter = true;\n\t\t\tthis.buffer = [];\n\t\t}else{\n\t\t\tvar isNewLine = char === \"\\n\" || char === \"\\r\";\n\t\t\tif(isNewLine && this.seekingDelimiter){\n\t\t\t\tthis.seekingDelimiter = false;\n\t\t\t\tthis.delimiter = this.buffer.join('').trim();\n\t\t\t\tthis.buffer = [];\n\t\t\t}\n\t\t}\n\t}", "checkNewDelimiter(char){\n\t\tvar buffer_str = this.buffer.join('').toLowerCase().trim();\n\t\tif(buffer_str === 'delimiter' && !this.quoteType){\n\t\t\tthis.seekingDelimiter = true;\n\t\t\tthis.buffer = [];\n\t\t}else{\n\t\t\tvar isNewLine = char === \"\\n\" || char === \"\\r\";\n\t\t\tif(isNewLine && this.seekingDelimiter){\n\t\t\t\tthis.seekingDelimiter = false;\n\t\t\t\tthis.delimiter = this.buffer.join('').trim();\n\t\t\t\tthis.buffer = [];\n\t\t\t}\n\t\t}\n\t}", "function readIt() {\n\t\tdisplayText(false); \n\t\tcount++;\n\n\t\tif (count >= input.length) { // stop when the input reaches the last word\n\t\t\tcount = 0;\n\t\t\tstop();\n\t\t}\n\t}", "function setCursor(input, offset) {\n input.focus()\n input.selectionStart = input.selectionEnd = offset\n}", "function restoreCursor() {\n if (input && selectionRef.current && focused) {\n try {\n var value = input.value;\n var _selectionRef$current = selectionRef.current,\n beforeTxt = _selectionRef$current.beforeTxt,\n afterTxt = _selectionRef$current.afterTxt,\n start = _selectionRef$current.start;\n var startPos = value.length;\n\n if (value.endsWith(afterTxt)) {\n startPos = value.length - selectionRef.current.afterTxt.length;\n } else if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length;\n } else {\n var beforeLastChar = beforeTxt[start - 1];\n var newIndex = value.indexOf(beforeLastChar, start - 1);\n\n if (newIndex !== -1) {\n startPos = newIndex + 1;\n }\n }\n\n input.setSelectionRange(startPos, startPos);\n } catch (e) {\n (0,rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__.default)(false, \"Something warning of cursor restore. Please fire issue about this: \".concat(e.message));\n }\n }\n }", "function specialKey(e) {\n var code = 'which' in e ? e.which : e.keyCode;\n\n if (code == KEYCODES.ENTER) {\n e.preventDefault();\n imodeCb(endInputMode());\n\n return true;\n }\n else if (code == KEYCODES.LEFT) {\n // move the cursor left one position (if possible)\n if (ipos > 0) {\n ipos -= 1;\n\n // update cursor: the cursor will always assume a character from\n // the input text\n var before = itext.substr(0,ipos);\n var after = itext.substr(ipos,itext.length - ipos);\n ispanBefore.data = before;\n ispanAfter.data = after.substr(1);\n cursorText.data = after[0];\n }\n\n return true;\n }\n else if (code == KEYCODES.RIGHT) {\n // move the cursor right one position (if possible); the cursor may\n // sit at the first invalid position after the input text (where text\n // may be appended to the line)\n if (ipos < itext.length) {\n ipos += 1;\n\n // update cursor: the cursor may be in an invalid position, in\n // which case the space character MUST be set to its text node\n var before = itext.substr(0,ipos);\n var after = itext.substr(ipos,itext.length - ipos);\n ispanBefore.data = before;\n ispanAfter.data = after.substr(1);\n cursorText.data = ipos >= itext.length ? ' ' : after[0];\n }\n\n return true;\n }\n else if (code == KEYCODES.UP || code == KEYCODES.DOWN) {\n // no action as of now\n e.preventDefault();\n\n return true;\n }\n else if (code == KEYCODES.BACKSPACE) {\n // move the cursor back a position and remove the character at that\n // position\n if (ipos > 0) {\n ipos -= 1;\n\n var before = itext.substr(0,ipos);\n var after = itext.substr(ipos+1,itext.length - ipos);\n ispanBefore.data = before;\n ispanAfter.data = after.substr(1);\n itext = before + after;\n cursorText.data = ipos >= itext.length ? ' ' : after[0];\n }\n\n // prevent the browser from being stupid and navigating back\n e.preventDefault();\n\n return true;\n }\n else if (code == KEYCODES.HOME) {\n // place cursor at the beginning of a line\n ipos = 0;\n ispanBefore.data = \"\";\n ispanAfter.data = itext.substr(1);\n cursorText.data = itext[0];\n\n return true;\n }\n else if (code == KEYCODES.END) {\n // place cursor at the end of a line\n ipos = itext.length;\n ispanBefore.data = itext;\n ispanAfter.data = \"\";\n cursorText.data = \" \";\n\n return true;\n }\n\n return false;\n }", "function setCaretToPos (input, pos,length=1) \n{\n setSelectionRange(input, pos, pos+length);\n input.blur();\n input.focus()\n}", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;\n if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false;\n var text = input.value;\n if (text == prevInput && posEq(sel.from, sel.to)) return false;\n if (ie && !ie_lt9 && cm.display.inputHasSelection === text) {\n resetInput(cm, true);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n sel.shift = false;\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var from = sel.from, to = sel.to;\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same)));\n\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)),\n origin: cm.state.pasteIncoming ? \"paste\" : \"+input\"};\n makeChange(cm.doc, changeEvent, \"end\");\n cm.curOp.updateInput = updateInput;\n signalLater(cm, \"inputRead\", cm, changeEvent);\n\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = false;\n return true;\n }", "function restoreCursor() {\n if (input && selectionRef.current && focused) {\n try {\n var value = input.value;\n var _selectionRef$current = selectionRef.current,\n beforeTxt = _selectionRef$current.beforeTxt,\n afterTxt = _selectionRef$current.afterTxt,\n start = _selectionRef$current.start;\n var startPos = value.length;\n\n if (value.endsWith(afterTxt)) {\n startPos = value.length - selectionRef.current.afterTxt.length;\n } else if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length;\n } else {\n var beforeLastChar = beforeTxt[start - 1];\n var newIndex = value.indexOf(beforeLastChar, start - 1);\n\n if (newIndex !== -1) {\n startPos = newIndex + 1;\n }\n }\n\n input.setSelectionRange(startPos, startPos);\n } catch (e) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_rc_util_es_warning__[\"a\" /* default */])(false, \"Something warning of cursor restore. Please fire issue about this: \".concat(e.message));\n }\n }\n }", "function typeCharacter( paramDoc, paramCharCode ) {\t\r\n\t// Local variable to extract information about cursor after operations\r\n\tvar newCursorCoords;\r\n\t// Determine if we typing normally, or overwriting a selected block, and act accordingly\r\n\tif ( paramDoc.isSelection ) {\r\n\t\tvar tmpSel = paramDoc.getCurrentSelection();\r\n\t\tvar newCursorCoords = paramDoc.replaceTextInRange( tmpSel.startLine, tmpSel.startColumn, tmpSel.endLine, tmpSel.endColumn, String.fromCharCode(paramCharCode) );\r\n\t}\r\n\telse newCursorCoords = paramDoc.insertText( String.fromCharCode(paramCharCode), cursorLine, cursorColumn );\r\n\t\r\n\tcursorColumn = newCursorCoords[1];\r\n}", "function next_char() {\n c = ++pos < str.length ? str[pos] : undefined;\n }", "function restoreCursor() {\n if (inputRef.value && selectionRef.value && focused.value) {\n try {\n var value = inputRef.value.value;\n var _selectionRef$value = selectionRef.value,\n beforeTxt = _selectionRef$value.beforeTxt,\n afterTxt = _selectionRef$value.afterTxt,\n start = _selectionRef$value.start;\n var startPos = value.length;\n if (value.endsWith(afterTxt)) {\n startPos = value.length - selectionRef.value.afterTxt.length;\n } else if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length;\n } else {\n var beforeLastChar = beforeTxt[start - 1];\n var newIndex = value.indexOf(beforeLastChar, start - 1);\n if (newIndex !== -1) {\n startPos = newIndex + 1;\n }\n }\n inputRef.value.setSelectionRange(startPos, startPos);\n } catch (e) {\n (0,_vc_util_warning__WEBPACK_IMPORTED_MODULE_1__.warning)(false, \"Something warning of cursor restore. Please fire issue about this: \".concat(e.message));\n }\n }\n }", "function peek() {\n return input.charAt(pos);\n }", "function peek() {\n return input.charAt(pos);\n }", "function readInt() {\n while (true) {\n const code = _base.input.charCodeAt(_base.state.pos);\n if (\n (code >= _charcodes.charCodes.digit0 && code <= _charcodes.charCodes.digit9) ||\n (code >= _charcodes.charCodes.lowercaseA && code <= _charcodes.charCodes.lowercaseF) ||\n (code >= _charcodes.charCodes.uppercaseA && code <= _charcodes.charCodes.uppercaseF) ||\n code === _charcodes.charCodes.underscore\n ) {\n _base.state.pos++;\n } else {\n break;\n }\n }\n}", "function useCursor(inputRef, focused) {\n var selectionRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(null);\n function recordCursor() {\n // Record position\n try {\n var _inputRef$value = inputRef.value,\n start = _inputRef$value.selectionStart,\n end = _inputRef$value.selectionEnd,\n value = _inputRef$value.value;\n var beforeTxt = value.substring(0, start);\n var afterTxt = value.substring(end);\n selectionRef.value = {\n start: start,\n end: end,\n value: value,\n beforeTxt: beforeTxt,\n afterTxt: afterTxt\n };\n } catch (e) {\n // Fix error in Chrome:\n // Failed to read the 'selectionStart' property from 'HTMLInputElement'\n // http://stackoverflow.com/q/21177489/3040605\n }\n }\n /**\n * Restore logic:\n * 1. back string same\n * 2. start string same\n */\n function restoreCursor() {\n if (inputRef.value && selectionRef.value && focused.value) {\n try {\n var value = inputRef.value.value;\n var _selectionRef$value = selectionRef.value,\n beforeTxt = _selectionRef$value.beforeTxt,\n afterTxt = _selectionRef$value.afterTxt,\n start = _selectionRef$value.start;\n var startPos = value.length;\n if (value.endsWith(afterTxt)) {\n startPos = value.length - selectionRef.value.afterTxt.length;\n } else if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length;\n } else {\n var beforeLastChar = beforeTxt[start - 1];\n var newIndex = value.indexOf(beforeLastChar, start - 1);\n if (newIndex !== -1) {\n startPos = newIndex + 1;\n }\n }\n inputRef.value.setSelectionRange(startPos, startPos);\n } catch (e) {\n (0,_vc_util_warning__WEBPACK_IMPORTED_MODULE_1__.warning)(false, \"Something warning of cursor restore. Please fire issue about this: \".concat(e.message));\n }\n }\n }\n return [recordCursor, restoreCursor];\n}", "function editOnBeforeInput(e) {\n\t var chars = e.data;\n\n\t // In some cases (ex: IE ideographic space insertion) no character data\n\t // is provided. There's nothing to do when this happens.\n\t if (!chars) {\n\t return;\n\t }\n\n\t // Allow the top-level component to handle the insertion manually. This is\n\t // useful when triggering interesting behaviors for a character insertion,\n\t // Simple examples: replacing a raw text ':)' with a smile emoji or image\n\t // decorator, or setting a block to be a list item after typing '- ' at the\n\t // start of the block.\n\t if (this.props.handleBeforeInput && isEventHandled(this.props.handleBeforeInput(chars))) {\n\t e.preventDefault();\n\t return;\n\t }\n\n\t // If selection is collapsed, conditionally allow native behavior. This\n\t // reduces re-renders and preserves spellcheck highlighting. If the selection\n\t // is not collapsed, we will re-render.\n\t var editorState = this.props.editorState;\n\t var selection = editorState.getSelection();\n\n\t if (!selection.isCollapsed()) {\n\t e.preventDefault();\n\t this.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())));\n\t return;\n\t }\n\n\t var mayAllowNative = !isSelectionAtLeafStart(editorState);\n\t var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()));\n\n\t if (!mayAllowNative) {\n\t e.preventDefault();\n\t this.update(newEditorState);\n\t return;\n\t }\n\n\t var anchorKey = selection.getAnchorKey();\n\t var anchorTree = editorState.getBlockTree(anchorKey);\n\n\t // Check the old and new \"fingerprints\" of the current block to determine\n\t // whether this insertion requires any addition or removal of text nodes,\n\t // in which case we would prevent the native character insertion.\n\t var originalFingerprint = BlockTree.getFingerprint(anchorTree);\n\t var newFingerprint = BlockTree.getFingerprint(newEditorState.getBlockTree(anchorKey));\n\n\t if (mustPreventDefaultForCharacter(chars) || originalFingerprint !== newFingerprint || nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey)) {\n\t e.preventDefault();\n\t } else {\n\t // The native event is allowed to occur.\n\t newEditorState = EditorState.set(newEditorState, {\n\t nativelyRenderedContent: newEditorState.getCurrentContent()\n\t });\n\t }\n\n\t this.update(newEditorState);\n\t}", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)\n return false;\n // See paste handler for more on the fakedLastChar kludge\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) return false;\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && cm.display.inputHasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n resetInput(cm);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n cm.display.shift = false;\n\n if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)\n prevInput = \"\\u200b\";\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var inserted = text.slice(same), textLines = splitLines(inserted);\n\n // When pasing N lines into N selections, insert one line per selection\n var multiPaste = null;\n if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) {\n if (lastCopied && lastCopied.join(\"\\n\") == inserted)\n multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);\n else if (textLines.length == doc.sel.ranges.length)\n multiPaste = map(textLines, function(l) { return [l]; });\n }\n\n // Normal behavior is to insert the new text into every selection\n for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {\n var range = doc.sel.ranges[i];\n var from = range.from(), to = range.to();\n // Handle deletion\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n // Handle overwrite\n else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\n cm.options.smartIndent && range.head.ch < 100 &&\n (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {\n var mode = cm.getModeAt(range.head);\n var end = changeEnd(changeEvent);\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indentLine(cm, end.line, \"smart\");\n break;\n }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))\n indentLine(cm, end.line, \"smart\");\n }\n }\n }\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n return true;\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)\n return false;\n // See paste handler for more on the fakedLastChar kludge\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) return false;\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && cm.display.inputHasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n resetInput(cm);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n cm.display.shift = false;\n\n if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)\n prevInput = \"\\u200b\";\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var inserted = text.slice(same), textLines = splitLines(inserted);\n\n // When pasing N lines into N selections, insert one line per selection\n var multiPaste = null;\n if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) {\n if (lastCopied && lastCopied.join(\"\\n\") == inserted)\n multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);\n else if (textLines.length == doc.sel.ranges.length)\n multiPaste = map(textLines, function(l) { return [l]; });\n }\n\n // Normal behavior is to insert the new text into every selection\n for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {\n var range = doc.sel.ranges[i];\n var from = range.from(), to = range.to();\n // Handle deletion\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n // Handle overwrite\n else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\n cm.options.smartIndent && range.head.ch < 100 &&\n (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {\n var mode = cm.getModeAt(range.head);\n var end = changeEnd(changeEvent);\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indentLine(cm, end.line, \"smart\");\n break;\n }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))\n indentLine(cm, end.line, \"smart\");\n }\n }\n }\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n return true;\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)\n return false;\n // See paste handler for more on the fakedLastChar kludge\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) return false;\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && cm.display.inputHasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n resetInput(cm);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n cm.display.shift = false;\n\n if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)\n prevInput = \"\\u200b\";\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var inserted = text.slice(same), textLines = splitLines(inserted);\n\n // When pasing N lines into N selections, insert one line per selection\n var multiPaste = null;\n if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) {\n if (lastCopied && lastCopied.join(\"\\n\") == inserted)\n multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);\n else if (textLines.length == doc.sel.ranges.length)\n multiPaste = map(textLines, function(l) { return [l]; });\n }\n\n // Normal behavior is to insert the new text into every selection\n for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {\n var range = doc.sel.ranges[i];\n var from = range.from(), to = range.to();\n // Handle deletion\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n // Handle overwrite\n else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\n cm.options.smartIndent && range.head.ch < 100 &&\n (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {\n var mode = cm.getModeAt(range.head);\n var end = changeEnd(changeEvent);\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indentLine(cm, end.line, \"smart\");\n break;\n }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))\n indentLine(cm, end.line, \"smart\");\n }\n }\n }\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n return true;\n }", "focus() {\n\t\t\tlet std = (this.input.className === \"pass\"? this.stdpass : this.stdin);\n\n\t\t\tlet cvl = std.value.length;\n\t\t\tstd.focus();\n\t\t\tstd.setSelectionRange(cvl, cvl);\n\t\t}", "function nextChar() {\n return text.charAt(offset);\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput)\n return false;\n // See paste handler for more on the fakedLastChar kludge\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) return false;\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && cm.display.inputHasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n resetInput(cm);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n cm.display.shift = false;\n\n if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)\n prevInput = \"\\u200b\";\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var inserted = text.slice(same), textLines = splitLines(inserted);\n\n // When pasing N lines into N selections, insert one line per selection\n var multiPaste = null;\n if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) {\n if (lastCopied && lastCopied.join(\"\\n\") == inserted)\n multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);\n else if (textLines.length == doc.sel.ranges.length)\n multiPaste = map(textLines, function(l) { return [l]; });\n }\n\n // Normal behavior is to insert the new text into every selection\n for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {\n var range = doc.sel.ranges[i];\n var from = range.from(), to = range.to();\n // Handle deletion\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n // Handle overwrite\n else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\n cm.options.smartIndent && range.head.ch < 100 &&\n (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {\n var mode = cm.getModeAt(range.head);\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indentLine(cm, range.head.line, \"smart\");\n break;\n }\n } else if (mode.electricInput) {\n var end = changeEnd(changeEvent);\n if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))\n indentLine(cm, range.head.line, \"smart\");\n }\n }\n }\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n return true;\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput)\n return false;\n // See paste handler for more on the fakedLastChar kludge\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) return false;\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && cm.display.inputHasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n resetInput(cm);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n cm.display.shift = false;\n\n if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)\n prevInput = \"\\u200b\";\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var inserted = text.slice(same), textLines = splitLines(inserted);\n\n // When pasing N lines into N selections, insert one line per selection\n var multiPaste = null;\n if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) {\n if (lastCopied && lastCopied.join(\"\\n\") == inserted)\n multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);\n else if (textLines.length == doc.sel.ranges.length)\n multiPaste = map(textLines, function(l) { return [l]; });\n }\n\n // Normal behavior is to insert the new text into every selection\n for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {\n var range = doc.sel.ranges[i];\n var from = range.from(), to = range.to();\n // Handle deletion\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n // Handle overwrite\n else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\n cm.options.smartIndent && range.head.ch < 100 &&\n (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {\n var mode = cm.getModeAt(range.head);\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indentLine(cm, range.head.line, \"smart\");\n break;\n }\n } else if (mode.electricInput) {\n var end = changeEnd(changeEvent);\n if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))\n indentLine(cm, range.head.line, \"smart\");\n }\n }\n }\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n return true;\n }", "function resetInput(cm, typing) {\n var minimal, selected, doc = cm.doc;\n if (cm.somethingSelected()) {\n cm.display.prevInput = \"\";\n var range = doc.sel.primary();\n minimal = hasCopyEvent &&\n (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n var content = minimal ? \"-\" : selected || cm.getSelection();\n cm.display.input.value = content;\n if (cm.state.focused) selectInput(cm.display.input);\n if (ie && ie_version >= 9) cm.display.inputHasSelection = content;\n } else if (!typing) {\n cm.display.prevInput = cm.display.input.value = \"\";\n if (ie && ie_version >= 9) cm.display.inputHasSelection = null;\n }\n cm.display.inaccurateSelection = minimal;\n }", "function resetInput(cm, typing) {\n var minimal, selected, doc = cm.doc;\n if (cm.somethingSelected()) {\n cm.display.prevInput = \"\";\n var range = doc.sel.primary();\n minimal = hasCopyEvent &&\n (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n var content = minimal ? \"-\" : selected || cm.getSelection();\n cm.display.input.value = content;\n if (cm.state.focused) selectInput(cm.display.input);\n if (ie && ie_version >= 9) cm.display.inputHasSelection = content;\n } else if (!typing) {\n cm.display.prevInput = cm.display.input.value = \"\";\n if (ie && ie_version >= 9) cm.display.inputHasSelection = null;\n }\n cm.display.inaccurateSelection = minimal;\n }", "function resetInput(cm, typing) {\n var minimal, selected, doc = cm.doc;\n if (cm.somethingSelected()) {\n cm.display.prevInput = \"\";\n var range = doc.sel.primary();\n minimal = hasCopyEvent &&\n (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n var content = minimal ? \"-\" : selected || cm.getSelection();\n cm.display.input.value = content;\n if (cm.state.focused) selectInput(cm.display.input);\n if (ie && ie_version >= 9) cm.display.inputHasSelection = content;\n } else if (!typing) {\n cm.display.prevInput = cm.display.input.value = \"\";\n if (ie && ie_version >= 9) cm.display.inputHasSelection = null;\n }\n cm.display.inaccurateSelection = minimal;\n }", "function resetInput(cm, typing) {\n var minimal, selected, doc = cm.doc;\n if (cm.somethingSelected()) {\n cm.display.prevInput = \"\";\n var range = doc.sel.primary();\n minimal = hasCopyEvent &&\n (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n var content = minimal ? \"-\" : selected || cm.getSelection();\n cm.display.input.value = content;\n if (cm.state.focused) selectInput(cm.display.input);\n if (ie && ie_version >= 9) cm.display.inputHasSelection = content;\n } else if (!typing) {\n cm.display.prevInput = cm.display.input.value = \"\";\n if (ie && ie_version >= 9) cm.display.inputHasSelection = null;\n }\n cm.display.inaccurateSelection = minimal;\n }", "stringState(char) {\n if (char === MARK_OBJ.doubleQue) {\n this.state = this.stringMayEndState;\n } else {\n this.buffer += char;\n }\n }", "_setCharAtPosition(newChar, position) {\n const that = this,\n maskItem = that._mask[position];\n\n if (newChar === ' ' && that.resetOnSpace) {\n newChar = '';\n }\n\n if (maskItem.type !== 'mask' || that.readonly || that.disabled || !maskItem.editable) {\n return false;\n }\n\n if (newChar === '' && !that.resetOnSpace) {\n return false;\n }\n\n if (newChar === that.promptChar && !that.resetOnPrompt && that.allowPromptAsInput) {\n return false;\n }\n\n if (!that.isOverwriteMode && newChar !== '' && newChar !== that.promptChar && maskItem.character !== '' && !that._overwrite) {\n return false;\n }\n\n const regex = maskItem.regex;\n\n if (regex) {\n let regExpr = new RegExp(regex, 'i');\n\n if (regExpr.test(newChar)) {\n switch (maskItem.escapeSymbol) {\n case '>':\n newChar = newChar.toUpperCase();\n break;\n case '<':\n newChar = newChar.toLowerCase();\n break;\n }\n\n that._mask[position].character = newChar;\n return true;\n }\n else if (that.resetOnSpace && newChar === '') {\n that._mask[position].character = newChar;\n return true;\n }\n else if (that.resetOnPrompt && newChar === that.promptChar && that.allowPromptAsInput) {\n that._mask[position].character = '';\n return true;\n }\n\n return false;\n }\n\n return false;\n }", "function deleteCharAtPos(){\n if (promptText != ''){\n promptText =\n promptText.substring(0,column) +\n promptText.substring(column+1);\n restoreText = promptText;\n return true;\n } else return false;\n }", "function resetInput(cm, typing) {\r\n var minimal, selected, doc = cm.doc;\r\n if (cm.somethingSelected()) {\r\n cm.display.prevInput = \"\";\r\n var range = doc.sel.primary();\r\n minimal = hasCopyEvent &&\r\n (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\r\n var content = minimal ? \"-\" : selected || cm.getSelection();\r\n cm.display.input.value = content;\r\n if (cm.state.focused) selectInput(cm.display.input);\r\n if (ie && ie_version >= 9) cm.display.inputHasSelection = content;\r\n } else if (!typing) {\r\n cm.display.prevInput = cm.display.input.value = \"\";\r\n if (ie && ie_version >= 9) cm.display.inputHasSelection = null;\r\n }\r\n cm.display.inaccurateSelection = minimal;\r\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput)\n return false;\n // See paste handler for more on the fakedLastChar kludge\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\n input.value = input.value.substring(0, input.value.length - 1);\n cm.state.fakedLastChar = false;\n }\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) return false;\n // Work around nonsensical selection resetting in IE9/10\n if (ie && ie_version >= 9 && cm.display.inputHasSelection === text) {\n resetInput(cm);\n return false;\n }\n\n var withOp = !cm.curOp;\n if (withOp) startOperation(cm);\n cm.display.shift = false;\n\n if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)\n prevInput = \"\\u200b\";\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n var inserted = text.slice(same), textLines = splitLines(inserted);\n\n // When pasing N lines into N selections, insert one line per selection\n var multiPaste = cm.state.pasteIncoming && textLines.length > 1 && doc.sel.ranges.length == textLines.length;\n\n // Normal behavior is to insert the new text into every selection\n for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {\n var range = doc.sel.ranges[i];\n var from = range.from(), to = range.to();\n // Handle deletion\n if (same < prevInput.length)\n from = Pos(from.line, from.ch - (prevInput.length - same));\n // Handle overwrite\n else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? [textLines[i]] : textLines,\n origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\n cm.options.smartIndent && range.head.ch < 100 &&\n (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {\n var mode = cm.getModeAt(range.head);\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indentLine(cm, range.head.line, \"smart\");\n break;\n }\n } else if (mode.electricInput) {\n var end = changeEnd(changeEvent);\n if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))\n indentLine(cm, range.head.line, \"smart\");\n }\n }\n }\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n if (withOp) endOperation(cm);\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n return true;\n }", "function readInt() {\n while (true) {\n const code = input.charCodeAt(state.pos);\n if (\n (code >= charCodes.digit0 && code <= charCodes.digit9) ||\n (code >= charCodes.lowercaseA && code <= charCodes.lowercaseF) ||\n (code >= charCodes.uppercaseA && code <= charCodes.uppercaseF) ||\n code === charCodes.underscore\n ) {\n state.pos++;\n } else {\n break;\n }\n }\n}", "function resetInput(cm, typing) {\n if (cm.display.contextMenuPending) return;\n var minimal, selected, doc = cm.doc;\n if (cm.somethingSelected()) {\n cm.display.prevInput = \"\";\n var range = doc.sel.primary();\n minimal = hasCopyEvent &&\n (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n var content = minimal ? \"-\" : selected || cm.getSelection();\n cm.display.input.value = content;\n if (cm.state.focused) selectInput(cm.display.input);\n if (ie && ie_version >= 9) cm.display.inputHasSelection = content;\n } else if (!typing) {\n cm.display.prevInput = cm.display.input.value = \"\";\n if (ie && ie_version >= 9) cm.display.inputHasSelection = null;\n }\n cm.display.inaccurateSelection = minimal;\n }", "function resetInput(cm, typing) {\n if (cm.display.contextMenuPending) return;\n var minimal, selected, doc = cm.doc;\n if (cm.somethingSelected()) {\n cm.display.prevInput = \"\";\n var range = doc.sel.primary();\n minimal = hasCopyEvent &&\n (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n var content = minimal ? \"-\" : selected || cm.getSelection();\n cm.display.input.value = content;\n if (cm.state.focused) selectInput(cm.display.input);\n if (ie && ie_version >= 9) cm.display.inputHasSelection = content;\n } else if (!typing) {\n cm.display.prevInput = cm.display.input.value = \"\";\n if (ie && ie_version >= 9) cm.display.inputHasSelection = null;\n }\n cm.display.inaccurateSelection = minimal;\n }", "function readInput(cm) {\r\n var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;\r\n // Since this is called a *lot*, try to bail out as cheaply as\r\n // possible when it is clear that nothing happened. hasSelection\r\n // will be the case when there is a lot of text in the textarea,\r\n // in which case reading its value would be expensive.\r\n if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput)\r\n return false;\r\n // See paste handler for more on the fakedLastChar kludge\r\n if (cm.state.pasteIncoming && cm.state.fakedLastChar) {\r\n input.value = input.value.substring(0, input.value.length - 1);\r\n cm.state.fakedLastChar = false;\r\n }\r\n var text = input.value;\r\n // If nothing changed, bail.\r\n if (text == prevInput && !cm.somethingSelected()) return false;\r\n // Work around nonsensical selection resetting in IE9/10, and\r\n // inexplicable appearance of private area unicode characters on\r\n // some key combos in Mac (#2689).\r\n if (ie && ie_version >= 9 && cm.display.inputHasSelection === text ||\r\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\r\n resetInput(cm);\r\n return false;\r\n }\r\n\r\n var withOp = !cm.curOp;\r\n if (withOp) startOperation(cm);\r\n cm.display.shift = false;\r\n\r\n if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)\r\n prevInput = \"\\u200b\";\r\n // Find the part of the input that is actually new\r\n var same = 0, l = Math.min(prevInput.length, text.length);\r\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\r\n var inserted = text.slice(same), textLines = splitLines(inserted);\r\n\r\n // When pasing N lines into N selections, insert one line per selection\r\n var multiPaste = null;\r\n if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) {\r\n if (lastCopied && lastCopied.join(\"\\n\") == inserted)\r\n multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);\r\n else if (textLines.length == doc.sel.ranges.length)\r\n multiPaste = map(textLines, function(l) { return [l]; });\r\n }\r\n\r\n // Normal behavior is to insert the new text into every selection\r\n for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {\r\n var range = doc.sel.ranges[i];\r\n var from = range.from(), to = range.to();\r\n // Handle deletion\r\n if (same < prevInput.length)\r\n from = Pos(from.line, from.ch - (prevInput.length - same));\r\n // Handle overwrite\r\n else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)\r\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\r\n var updateInput = cm.curOp.updateInput;\r\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\r\n origin: cm.state.pasteIncoming ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\"};\r\n makeChange(cm.doc, changeEvent);\r\n signalLater(cm, \"inputRead\", cm, changeEvent);\r\n // When an 'electric' character is inserted, immediately trigger a reindent\r\n if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&\r\n cm.options.smartIndent && range.head.ch < 100 &&\r\n (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {\r\n var mode = cm.getModeAt(range.head);\r\n if (mode.electricChars) {\r\n for (var j = 0; j < mode.electricChars.length; j++)\r\n if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\r\n indentLine(cm, range.head.line, \"smart\");\r\n break;\r\n }\r\n } else if (mode.electricInput) {\r\n var end = changeEnd(changeEvent);\r\n if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))\r\n indentLine(cm, range.head.line, \"smart\");\r\n }\r\n }\r\n }\r\n ensureCursorVisible(cm);\r\n cm.curOp.updateInput = updateInput;\r\n cm.curOp.typing = true;\r\n\r\n // Don't leave long text in the textarea, since it makes further polling slow\r\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = cm.display.prevInput = \"\";\r\n else cm.display.prevInput = text;\r\n if (withOp) endOperation(cm);\r\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\r\n return true;\r\n }", "function reset() {\n initializeCharacters();\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, view = cm.view, sel = view.sel;\n if (!view.focused || hasSelection(input) || isReadOnly(cm)) return false;\n var text = input.value;\n if (text == prevInput && posEq(sel.from, sel.to)) return false;\n startOperation(cm);\n view.sel.shift = false;\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput[same] == text[same]) ++same;\n var from = sel.from, to = sel.to;\n if (same < prevInput.length)\n from = {line: from.line, ch: from.ch - (prevInput.length - same)};\n else if (view.overwrite && posEq(from, to) && !cm.display.pasteIncoming)\n to = {line: to.line, ch: Math.min(getLine(cm.view.doc, to.line).text.length, to.ch + (text.length - same))};\n var updateInput = cm.curOp.updateInput;\n updateDoc(cm, from, to, splitLines(text.slice(same)), \"end\",\n cm.display.pasteIncoming ? \"paste\" : \"input\", {from: from, to: to});\n cm.curOp.updateInput = updateInput;\n if (text.length > 1000) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n endOperation(cm);\n cm.display.pasteIncoming = false;\n return true;\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, view = cm.view, sel = view.sel;\n if (!view.focused || hasSelection(input) || isReadOnly(cm)) return false;\n var text = input.value;\n if (text == prevInput && posEq(sel.from, sel.to)) return false;\n startOperation(cm);\n view.sel.shift = false;\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput[same] == text[same]) ++same;\n var from = sel.from, to = sel.to;\n if (same < prevInput.length)\n from = {line: from.line, ch: from.ch - (prevInput.length - same)};\n else if (view.overwrite && posEq(from, to) && !cm.display.pasteIncoming)\n to = {line: to.line, ch: Math.min(getLine(cm.view.doc, to.line).text.length, to.ch + (text.length - same))};\n var updateInput = cm.curOp.updateInput;\n updateDoc(cm, from, to, splitLines(text.slice(same)), \"end\",\n cm.display.pasteIncoming ? \"paste\" : \"input\", {from: from, to: to});\n cm.curOp.updateInput = updateInput;\n if (text.length > 1000) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n endOperation(cm);\n cm.display.pasteIncoming = false;\n return true;\n }", "function readInput(cm) {\n var input = cm.display.input, prevInput = cm.display.prevInput, view = cm.view, sel = view.sel;\n if (!view.focused || hasSelection(input) || isReadOnly(cm)) return false;\n var text = input.value;\n if (text == prevInput && posEq(sel.from, sel.to)) return false;\n startOperation(cm);\n view.sel.shift = false;\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput[same] == text[same]) ++same;\n var from = sel.from, to = sel.to;\n if (same < prevInput.length)\n from = {line: from.line, ch: from.ch - (prevInput.length - same)};\n else if (view.overwrite && posEq(from, to) && !cm.display.pasteIncoming)\n to = {line: to.line, ch: Math.min(getLine(cm.view.doc, to.line).text.length, to.ch + (text.length - same))};\n var updateInput = cm.curOp.updateInput;\n updateDoc(cm, from, to, splitLines(text.slice(same)), \"end\",\n cm.display.pasteIncoming ? \"paste\" : \"input\", {from: from, to: to});\n cm.curOp.updateInput = updateInput;\n if (text.length > 1000) input.value = cm.display.prevInput = \"\";\n else cm.display.prevInput = text;\n endOperation(cm);\n cm.display.pasteIncoming = false;\n return true;\n }", "function IteratedChar() {\n\n this.charValue = 0; // 1-4 bytes from the raw input data\n this.index = 0;\n this.nextIndex = 0;\n this.error = false;\n this.done = false;\n\n this.reset = function() {\n this.charValue = 0;\n this.index = -1;\n this.nextIndex = 0;\n this.error = false;\n this.done = false;\n };\n\n this.nextByte = function(det) {\n if (this.nextIndex >= det.fRawLength) {\n this.done = true;\n return -1;\n }\n var byteValue = det.fRawInput[this.nextIndex++] & 0x00ff;\n return byteValue;\n };\n}", "function IteratedChar() {\n\n this.charValue = 0; // 1-4 bytes from the raw input data\n this.index = 0;\n this.nextIndex = 0;\n this.error = false;\n this.done = false;\n\n this.reset = function() {\n this.charValue = 0;\n this.index = -1;\n this.nextIndex = 0;\n this.error = false;\n this.done = false;\n };\n\n this.nextByte = function(det) {\n if (this.nextIndex >= det.fRawLength) {\n this.done = true;\n return -1;\n }\n var byteValue = det.fRawInput[this.nextIndex++] & 0x00ff;\n return byteValue;\n };\n}", "function nextChar() {\n return source[index++];\n }", "_resetCursors() {\n this._taskCursor = '';\n this._eventsCursor = '';\n }", "captureToChar(char) {\n let { i: start } = this;\n const { chunk } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let c = this.getCode();\n switch (c) {\n case NL_LIKE:\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n start = this.i;\n c = NL;\n break;\n case EOC:\n this.text += chunk.slice(start);\n return false;\n default:\n }\n if (c === char) {\n this.text += chunk.slice(start, this.prevI);\n return true;\n }\n }\n }", "function readInput() {\n if (leaveInputAlone || !focused) return;\n var changed = false, text = input.value, sr = selRange(input);\n if (!sr) return false;\n var changed = editing.text != text, rs = reducedSelection;\n var moved = changed || sr.start != editing.start || sr.end != (rs ? editing.start : editing.end);\n if (!moved && !rs) return false;\n if (changed) {\n shiftSelecting = reducedSelection = null;\n if (options.readOnly) {updateInput = true; return \"changed\";}\n }\n\n // Compute selection start and end based on start/end offsets in textarea\n function computeOffset(n, startLine) {\n var pos = 0;\n for (;;) {\n var found = text.indexOf(\"\\n\", pos);\n if (found == -1 || (text.charAt(found-1) == \"\\r\" ? found - 1 : found) >= n)\n return {line: startLine, ch: n - pos};\n ++startLine;\n pos = found + 1;\n }\n }\n var from = computeOffset(sr.start, editing.from),\n to = computeOffset(sr.end, editing.from);\n // Here we have to take the reducedSelection hack into account,\n // so that you can, for example, press shift-up at the start of\n // your selection and have the right thing happen.\n if (rs) {\n var head = sr.start == rs.anchor ? to : from;\n var tail = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to;\n if (sel.inverted = posLess(head, tail)) { from = head; to = tail; }\n else { reducedSelection = null; from = tail; to = head; }\n }\n\n // In some cases (cursor on same line as before), we don't have\n // to update the textarea content at all.\n if (from.line == to.line && from.line == sel.from.line && from.line == sel.to.line && !shiftSelecting)\n updateInput = false;\n\n // Magic mess to extract precise edited range from the changed\n // string.\n if (changed) {\n var start = 0, end = text.length, len = Math.min(end, editing.text.length);\n var c, line = editing.from, nl = -1;\n while (start < len && (c = text.charAt(start)) == editing.text.charAt(start)) {\n ++start;\n if (c == \"\\n\") {line++; nl = start;}\n }\n var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length;\n for (;;) {\n c = editing.text.charAt(edend);\n if (text.charAt(end) != c) {++end; ++edend; break;}\n if (c == \"\\n\") endline--;\n if (edend <= start || end <= start) break;\n --end; --edend;\n }\n var nl = editing.text.lastIndexOf(\"\\n\", edend - 1), endch = nl == -1 ? edend : edend - nl - 1;\n updateLines({line: line, ch: ch}, {line: endline, ch: endch}, splitLines(text.slice(start, end)), from, to);\n if (line != endline || from.line != line) updateInput = true;\n }\n else setSelection(from, to);\n\n editing.text = text; editing.start = sr.start; editing.end = sr.end;\n return changed ? \"changed\" : moved ? \"moved\" : false;\n }", "function readInput() {\n if (leaveInputAlone || !focused) return;\n var changed = false, text = input.value, sr = selRange(input);\n if (!sr) return false;\n var changed = editing.text != text, rs = reducedSelection;\n var moved = changed || sr.start != editing.start || sr.end != (rs ? editing.start : editing.end);\n if (!moved && !rs) return false;\n if (changed) {\n shiftSelecting = reducedSelection = null;\n if (options.readOnly) {updateInput = true; return \"changed\";}\n }\n\n // Compute selection start and end based on start/end offsets in textarea\n function computeOffset(n, startLine) {\n var pos = 0;\n for (;;) {\n var found = text.indexOf(\"\\n\", pos);\n if (found == -1 || (text.charAt(found-1) == \"\\r\" ? found - 1 : found) >= n)\n return {line: startLine, ch: n - pos};\n ++startLine;\n pos = found + 1;\n }\n }\n var from = computeOffset(sr.start, editing.from),\n to = computeOffset(sr.end, editing.from);\n // Here we have to take the reducedSelection hack into account,\n // so that you can, for example, press shift-up at the start of\n // your selection and have the right thing happen.\n if (rs) {\n var head = sr.start == rs.anchor ? to : from;\n var tail = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to;\n if (sel.inverted = posLess(head, tail)) { from = head; to = tail; }\n else { reducedSelection = null; from = tail; to = head; }\n }\n\n // In some cases (cursor on same line as before), we don't have\n // to update the textarea content at all.\n if (from.line == to.line && from.line == sel.from.line && from.line == sel.to.line && !shiftSelecting)\n updateInput = false;\n\n // Magic mess to extract precise edited range from the changed\n // string.\n if (changed) {\n var start = 0, end = text.length, len = Math.min(end, editing.text.length);\n var c, line = editing.from, nl = -1;\n while (start < len && (c = text.charAt(start)) == editing.text.charAt(start)) {\n ++start;\n if (c == \"\\n\") {line++; nl = start;}\n }\n var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length;\n for (;;) {\n c = editing.text.charAt(edend);\n if (text.charAt(end) != c) {++end; ++edend; break;}\n if (c == \"\\n\") endline--;\n if (edend <= start || end <= start) break;\n --end; --edend;\n }\n var nl = editing.text.lastIndexOf(\"\\n\", edend - 1), endch = nl == -1 ? edend : edend - nl - 1;\n updateLines({line: line, ch: ch}, {line: endline, ch: endch}, splitLines(text.slice(start, end)), from, to);\n if (line != endline || from.line != line) updateInput = true;\n }\n else setSelection(from, to);\n\n editing.text = text; editing.start = sr.start; editing.end = sr.end;\n return changed ? \"changed\" : moved ? \"moved\" : false;\n }", "function readInput() {\n if (leaveInputAlone || !focused) return;\n var changed = false, text = input.value, sr = selRange(input);\n if (!sr) return false;\n var changed = editing.text != text, rs = reducedSelection;\n var moved = changed || sr.start != editing.start || sr.end != (rs ? editing.start : editing.end);\n if (!moved && !rs) return false;\n if (changed) {\n shiftSelecting = reducedSelection = null;\n if (options.readOnly) {updateInput = true; return \"changed\";}\n }\n\n // Compute selection start and end based on start/end offsets in textarea\n function computeOffset(n, startLine) {\n var pos = 0;\n for (;;) {\n var found = text.indexOf(\"\\n\", pos);\n if (found == -1 || (text.charAt(found-1) == \"\\r\" ? found - 1 : found) >= n)\n return {line: startLine, ch: n - pos};\n ++startLine;\n pos = found + 1;\n }\n }\n var from = computeOffset(sr.start, editing.from),\n to = computeOffset(sr.end, editing.from);\n // Here we have to take the reducedSelection hack into account,\n // so that you can, for example, press shift-up at the start of\n // your selection and have the right thing happen.\n if (rs) {\n var head = sr.start == rs.anchor ? to : from;\n var tail = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to;\n if (sel.inverted = posLess(head, tail)) { from = head; to = tail; }\n else { reducedSelection = null; from = tail; to = head; }\n }\n\n // In some cases (cursor on same line as before), we don't have\n // to update the textarea content at all.\n if (from.line == to.line && from.line == sel.from.line && from.line == sel.to.line && !shiftSelecting)\n updateInput = false;\n\n // Magic mess to extract precise edited range from the changed\n // string.\n if (changed) {\n var start = 0, end = text.length, len = Math.min(end, editing.text.length);\n var c, line = editing.from, nl = -1;\n while (start < len && (c = text.charAt(start)) == editing.text.charAt(start)) {\n ++start;\n if (c == \"\\n\") {line++; nl = start;}\n }\n var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length;\n for (;;) {\n c = editing.text.charAt(edend);\n if (text.charAt(end) != c) {++end; ++edend; break;}\n if (c == \"\\n\") endline--;\n if (edend <= start || end <= start) break;\n --end; --edend;\n }\n var nl = editing.text.lastIndexOf(\"\\n\", edend - 1), endch = nl == -1 ? edend : edend - nl - 1;\n updateLines({line: line, ch: ch}, {line: endline, ch: endch}, splitLines(text.slice(start, end)), from, to);\n if (line != endline || from.line != line) updateInput = true;\n }\n else setSelection(from, to);\n\n editing.text = text; editing.start = sr.start; editing.end = sr.end;\n return changed ? \"changed\" : moved ? \"moved\" : false;\n }", "moveSourceCursorToTheNextPosition () {\n\n }", "function EmptyCursor () {}", "handleControlDownKey() {\n this.moveToNextParagraph();\n this.checkForCursorVisibility();\n }", "function char1f() {\r\n\tcharsel = 0;\r\n\tallcharcustoms();\r\n}", "typeCharacter() {\n if (this.running_) {\n this.queryCursor_++;\n this.textElement_.innerHTML = this.query_.substring(0, this.queryCursor_);\n if (this.queryCursor_ > this.query_.length) {\n this.stop();\n this.grid_.createNewCell(this.rowIndex_, this.colIndex_);\n } else {\n this.typeDelay().then(this.typeCharacter.bind(this));\n }\n }\n }", "cursorNextLine(params) {\n this.cursorDown(params);\n this._bufferService.buffer.x = 0;\n return true;\n }", "next() {\n while(this.pos < this.src.length) {\n let c = this.src.charAt(this.pos);\n switch(c) {\n case \" \": case \"\\r\": case \"\\b\": case \"\\t\":\n ++this.pos;\n ++this.posCount;\n break;\n case \"\\n\":\n ++this.pos;\n ++this.posLine;\n this.posCount = 1;\n break;\n case \"#\":\n this._lexComment(); break;\n case \"=\": return this._yield(Token.tkAssign,1,1);\n case \"+\": return this._yield(Token.tkAdd,1,1);\n case \"-\": return this._yield(Token.tkSub,1,1);\n case \"*\": return this._yield(Token.tkMul,1,1);\n case \"(\": return this._yield(Token.tkLPar,1,1);\n case \")\": return this._yield(Token.tkRPar,1,1);\n case \"{\": return this._yield(Token.tkLBra,1,1);\n case \"}\": return this._yield(Token.tkRBra,1,1);\n case \"[\": return this._yield(Token.tkLSqr,1,1);\n case \"]\": return this._yield(Token.tkRSqr,1,1);\n case \";\": return this._yield(Token.tkSemicolon,1,1);\n case \",\": return this._yield(Token.tkComma,1,1);\n case \"0\": case \"1\": case \"2\": case \"3\": case \"4\":\n case \"5\": case \"6\": case \"7\": case \"8\": case \"9\":\n return this._lexNumber(c);\n default:\n return this._lexVar(c);\n }\n }\n\n return this._yield(Token.tkEof,0,0);\n }", "next() {\n const char = this.content[this.index++];\n if (char === undefined) {\n this.index = this.len;\n }\n return char;\n }", "function useCursor(input, focused) {\n var selectionRef = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_react__[\"useRef\"])(null);\n\n function recordCursor() {\n // Record position\n try {\n var start = input.selectionStart,\n end = input.selectionEnd,\n value = input.value;\n var beforeTxt = value.substring(0, start);\n var afterTxt = value.substring(end);\n selectionRef.current = {\n start: start,\n end: end,\n value: value,\n beforeTxt: beforeTxt,\n afterTxt: afterTxt\n };\n } catch (e) {// Fix error in Chrome:\n // Failed to read the 'selectionStart' property from 'HTMLInputElement'\n // http://stackoverflow.com/q/21177489/3040605\n }\n }\n /**\n * Restore logic:\n * 1. back string same\n * 2. start string same\n */\n\n\n function restoreCursor() {\n if (input && selectionRef.current && focused) {\n try {\n var value = input.value;\n var _selectionRef$current = selectionRef.current,\n beforeTxt = _selectionRef$current.beforeTxt,\n afterTxt = _selectionRef$current.afterTxt,\n start = _selectionRef$current.start;\n var startPos = value.length;\n\n if (value.endsWith(afterTxt)) {\n startPos = value.length - selectionRef.current.afterTxt.length;\n } else if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length;\n } else {\n var beforeLastChar = beforeTxt[start - 1];\n var newIndex = value.indexOf(beforeLastChar, start - 1);\n\n if (newIndex !== -1) {\n startPos = newIndex + 1;\n }\n }\n\n input.setSelectionRange(startPos, startPos);\n } catch (e) {\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_rc_util_es_warning__[\"a\" /* default */])(false, \"Something warning of cursor restore. Please fire issue about this: \".concat(e.message));\n }\n }\n }\n\n return [recordCursor, restoreCursor];\n}", "function handleChars(newChars)\n{\n\t//console.log(newChars);\n\t//process.stdout.write(newChars);\n\n\t//1. add chars to current word\n\tcurWordBuffer += newChars;\n\n\t//2. add chars to current sentence\n\tcurSentenceBuffer += newChars;\n\n\t//3. find the words in the buffer\n\tcurWordBuffer = parseWords(curWordBuffer);\n\n}", "[',']() {\n\t\tlet input = this._inputChar();\n\t\tif (input) {\n\t\t\tthis.D = input;\n\t\t} else {\n\t\t\tthis.done = true;\n\t\t}\n\t}", "function setCaretToPos(input, pos) {\n if (input.setSelectionRange) {\n input.focus();\n input.setSelectionRange(pos, pos);\n }\n else if (input.createTextRange) {\n var range = input.createTextRange();\n range.collapse(true);\n range.moveStart('character', pos);\n range.moveEnd('character', pos);\n range.select();\n }\n }", "function editOnBeforeInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n\n var editorState = editor._latestEditorState;\n\n var chars = e.data;\n\n // In some cases (ex: IE ideographic space insertion) no character data\n // is provided. There's nothing to do when this happens.\n if (!chars) {\n return;\n }\n\n // Allow the top-level component to handle the insertion manually. This is\n // useful when triggering interesting behaviors for a character insertion,\n // Simple examples: replacing a raw text ':)' with a smile emoji or image\n // decorator, or setting a block to be a list item after typing '- ' at the\n // start of the block.\n if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState))) {\n e.preventDefault();\n return;\n }\n\n // If selection is collapsed, conditionally allow native behavior. This\n // reduces re-renders and preserves spellcheck highlighting. If the selection\n // is not collapsed, we will re-render.\n var selection = editorState.getSelection();\n var selectionStart = selection.getStartOffset();\n var selectionEnd = selection.getEndOffset();\n var anchorKey = selection.getAnchorKey();\n\n if (!selection.isCollapsed()) {\n e.preventDefault();\n\n // If the currently selected text matches what the user is trying to\n // replace it with, let's just update the `SelectionState`. If not, update\n // the `ContentState` with the new text.\n var currentlySelectedChars = editorState.getCurrentContent().getPlainText().slice(selectionStart, selectionEnd);\n if (chars === currentlySelectedChars) {\n editor.update(EditorState.forceSelection(editorState, selection.merge({\n focusOffset: selectionEnd\n })));\n } else {\n editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())));\n }\n return;\n }\n\n var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()));\n\n // Bunch of different cases follow where we need to prevent native insertion.\n var mustPreventNative = false;\n if (!mustPreventNative) {\n // Browsers tend to insert text in weird places in the DOM when typing at\n // the start of a leaf, so we'll handle it ourselves.\n mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState);\n }\n if (!mustPreventNative) {\n // Chrome will also split up a node into two pieces if it contains a Tab\n // char, for no explicable reason. Seemingly caused by this commit:\n // https://chromium.googlesource.com/chromium/src/+/013ac5eaf3%5E%21/\n var nativeSelection = global.getSelection();\n // Selection is necessarily collapsed at this point due to earlier check.\n if (nativeSelection.anchorNode && nativeSelection.anchorNode.nodeType === Node.TEXT_NODE) {\n // See isTabHTMLSpanElement in chromium EditingUtilities.cpp.\n var parentNode = nativeSelection.anchorNode.parentNode;\n mustPreventNative = parentNode.nodeName === 'SPAN' && parentNode.firstChild.nodeType === Node.TEXT_NODE && parentNode.firstChild.nodeValue.indexOf('\\t') !== -1;\n }\n }\n if (!mustPreventNative) {\n // Check the old and new \"fingerprints\" of the current block to determine\n // whether this insertion requires any addition or removal of text nodes,\n // in which case we would prevent the native character insertion.\n var originalFingerprint = BlockTree.getFingerprint(editorState.getBlockTree(anchorKey));\n var newFingerprint = BlockTree.getFingerprint(newEditorState.getBlockTree(anchorKey));\n mustPreventNative = originalFingerprint !== newFingerprint;\n }\n if (!mustPreventNative) {\n mustPreventNative = mustPreventDefaultForCharacter(chars);\n }\n if (!mustPreventNative) {\n mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey);\n }\n\n if (mustPreventNative) {\n e.preventDefault();\n editor.update(newEditorState);\n return;\n }\n\n // We made it all the way! Let the browser do its thing and insert the char.\n newEditorState = EditorState.set(newEditorState, {\n nativelyRenderedContent: newEditorState.getCurrentContent()\n });\n // The native event is allowed to occur. To allow user onChange handlers to\n // change the inserted text, we wait until the text is actually inserted\n // before we actually update our state. That way when we rerender, the text\n // we see in the DOM will already have been inserted properly.\n editor._pendingStateFromBeforeInput = newEditorState;\n setImmediate(function () {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n });\n}", "function editOnBeforeInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n\n var editorState = editor._latestEditorState;\n\n var chars = e.data;\n\n // In some cases (ex: IE ideographic space insertion) no character data\n // is provided. There's nothing to do when this happens.\n if (!chars) {\n return;\n }\n\n // Allow the top-level component to handle the insertion manually. This is\n // useful when triggering interesting behaviors for a character insertion,\n // Simple examples: replacing a raw text ':)' with a smile emoji or image\n // decorator, or setting a block to be a list item after typing '- ' at the\n // start of the block.\n if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState))) {\n e.preventDefault();\n return;\n }\n\n // If selection is collapsed, conditionally allow native behavior. This\n // reduces re-renders and preserves spellcheck highlighting. If the selection\n // is not collapsed, we will re-render.\n var selection = editorState.getSelection();\n var selectionStart = selection.getStartOffset();\n var selectionEnd = selection.getEndOffset();\n var anchorKey = selection.getAnchorKey();\n\n if (!selection.isCollapsed()) {\n e.preventDefault();\n\n // If the currently selected text matches what the user is trying to\n // replace it with, let's just update the `SelectionState`. If not, update\n // the `ContentState` with the new text.\n var currentlySelectedChars = editorState.getCurrentContent().getPlainText().slice(selectionStart, selectionEnd);\n if (chars === currentlySelectedChars) {\n editor.update(EditorState.forceSelection(editorState, selection.merge({\n focusOffset: selectionEnd\n })));\n } else {\n editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())));\n }\n return;\n }\n\n var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()));\n\n // Bunch of different cases follow where we need to prevent native insertion.\n var mustPreventNative = false;\n if (!mustPreventNative) {\n // Browsers tend to insert text in weird places in the DOM when typing at\n // the start of a leaf, so we'll handle it ourselves.\n mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState);\n }\n if (!mustPreventNative) {\n // Chrome will also split up a node into two pieces if it contains a Tab\n // char, for no explicable reason. Seemingly caused by this commit:\n // https://chromium.googlesource.com/chromium/src/+/013ac5eaf3%5E%21/\n var nativeSelection = global.getSelection();\n // Selection is necessarily collapsed at this point due to earlier check.\n if (nativeSelection.anchorNode && nativeSelection.anchorNode.nodeType === Node.TEXT_NODE) {\n // See isTabHTMLSpanElement in chromium EditingUtilities.cpp.\n var parentNode = nativeSelection.anchorNode.parentNode;\n mustPreventNative = parentNode.nodeName === 'SPAN' && parentNode.firstChild.nodeType === Node.TEXT_NODE && parentNode.firstChild.nodeValue.indexOf('\\t') !== -1;\n }\n }\n if (!mustPreventNative) {\n // Check the old and new \"fingerprints\" of the current block to determine\n // whether this insertion requires any addition or removal of text nodes,\n // in which case we would prevent the native character insertion.\n var originalFingerprint = BlockTree.getFingerprint(editorState.getBlockTree(anchorKey));\n var newFingerprint = BlockTree.getFingerprint(newEditorState.getBlockTree(anchorKey));\n mustPreventNative = originalFingerprint !== newFingerprint;\n }\n if (!mustPreventNative) {\n mustPreventNative = mustPreventDefaultForCharacter(chars);\n }\n if (!mustPreventNative) {\n mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey);\n }\n\n if (mustPreventNative) {\n e.preventDefault();\n editor.update(newEditorState);\n return;\n }\n\n // We made it all the way! Let the browser do its thing and insert the char.\n newEditorState = EditorState.set(newEditorState, {\n nativelyRenderedContent: newEditorState.getCurrentContent()\n });\n // The native event is allowed to occur. To allow user onChange handlers to\n // change the inserted text, we wait until the text is actually inserted\n // before we actually update our state. That way when we rerender, the text\n // we see in the DOM will already have been inserted properly.\n editor._pendingStateFromBeforeInput = newEditorState;\n setImmediate(function () {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n });\n}", "function editOnBeforeInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n\n var editorState = editor._latestEditorState;\n\n var chars = e.data;\n\n // In some cases (ex: IE ideographic space insertion) no character data\n // is provided. There's nothing to do when this happens.\n if (!chars) {\n return;\n }\n\n // Allow the top-level component to handle the insertion manually. This is\n // useful when triggering interesting behaviors for a character insertion,\n // Simple examples: replacing a raw text ':)' with a smile emoji or image\n // decorator, or setting a block to be a list item after typing '- ' at the\n // start of the block.\n if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState))) {\n e.preventDefault();\n return;\n }\n\n // If selection is collapsed, conditionally allow native behavior. This\n // reduces re-renders and preserves spellcheck highlighting. If the selection\n // is not collapsed, we will re-render.\n var selection = editorState.getSelection();\n var selectionStart = selection.getStartOffset();\n var selectionEnd = selection.getEndOffset();\n var anchorKey = selection.getAnchorKey();\n\n if (!selection.isCollapsed()) {\n e.preventDefault();\n\n // If the currently selected text matches what the user is trying to\n // replace it with, let's just update the `SelectionState`. If not, update\n // the `ContentState` with the new text.\n var currentlySelectedChars = editorState.getCurrentContent().getPlainText().slice(selectionStart, selectionEnd);\n if (chars === currentlySelectedChars) {\n editor.update(EditorState.forceSelection(editorState, selection.merge({\n focusOffset: selectionEnd\n })));\n } else {\n editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())));\n }\n return;\n }\n\n var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()));\n\n // Bunch of different cases follow where we need to prevent native insertion.\n var mustPreventNative = false;\n if (!mustPreventNative) {\n // Browsers tend to insert text in weird places in the DOM when typing at\n // the start of a leaf, so we'll handle it ourselves.\n mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState);\n }\n if (!mustPreventNative) {\n // Chrome will also split up a node into two pieces if it contains a Tab\n // char, for no explicable reason. Seemingly caused by this commit:\n // https://chromium.googlesource.com/chromium/src/+/013ac5eaf3%5E%21/\n var nativeSelection = global.getSelection();\n // Selection is necessarily collapsed at this point due to earlier check.\n if (nativeSelection.anchorNode && nativeSelection.anchorNode.nodeType === Node.TEXT_NODE) {\n // See isTabHTMLSpanElement in chromium EditingUtilities.cpp.\n var parentNode = nativeSelection.anchorNode.parentNode;\n mustPreventNative = parentNode.nodeName === 'SPAN' && parentNode.firstChild.nodeType === Node.TEXT_NODE && parentNode.firstChild.nodeValue.indexOf('\\t') !== -1;\n }\n }\n if (!mustPreventNative) {\n // Check the old and new \"fingerprints\" of the current block to determine\n // whether this insertion requires any addition or removal of text nodes,\n // in which case we would prevent the native character insertion.\n var originalFingerprint = BlockTree.getFingerprint(editorState.getBlockTree(anchorKey));\n var newFingerprint = BlockTree.getFingerprint(newEditorState.getBlockTree(anchorKey));\n mustPreventNative = originalFingerprint !== newFingerprint;\n }\n if (!mustPreventNative) {\n mustPreventNative = mustPreventDefaultForCharacter(chars);\n }\n if (!mustPreventNative) {\n mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey);\n }\n\n if (mustPreventNative) {\n e.preventDefault();\n editor.update(newEditorState);\n return;\n }\n\n // We made it all the way! Let the browser do its thing and insert the char.\n newEditorState = EditorState.set(newEditorState, {\n nativelyRenderedContent: newEditorState.getCurrentContent()\n });\n // The native event is allowed to occur. To allow user onChange handlers to\n // change the inserted text, we wait until the text is actually inserted\n // before we actually update our state. That way when we rerender, the text\n // we see in the DOM will already have been inserted properly.\n editor._pendingStateFromBeforeInput = newEditorState;\n setImmediate(function () {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n });\n}", "function editOnBeforeInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n\n var editorState = editor._latestEditorState;\n\n var chars = e.data;\n\n // In some cases (ex: IE ideographic space insertion) no character data\n // is provided. There's nothing to do when this happens.\n if (!chars) {\n return;\n }\n\n // Allow the top-level component to handle the insertion manually. This is\n // useful when triggering interesting behaviors for a character insertion,\n // Simple examples: replacing a raw text ':)' with a smile emoji or image\n // decorator, or setting a block to be a list item after typing '- ' at the\n // start of the block.\n if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState))) {\n e.preventDefault();\n return;\n }\n\n // If selection is collapsed, conditionally allow native behavior. This\n // reduces re-renders and preserves spellcheck highlighting. If the selection\n // is not collapsed, we will re-render.\n var selection = editorState.getSelection();\n var selectionStart = selection.getStartOffset();\n var selectionEnd = selection.getEndOffset();\n var anchorKey = selection.getAnchorKey();\n\n if (!selection.isCollapsed()) {\n e.preventDefault();\n\n // If the currently selected text matches what the user is trying to\n // replace it with, let's just update the `SelectionState`. If not, update\n // the `ContentState` with the new text.\n var currentlySelectedChars = editorState.getCurrentContent().getPlainText().slice(selectionStart, selectionEnd);\n if (chars === currentlySelectedChars) {\n editor.update(EditorState.forceSelection(editorState, selection.merge({\n focusOffset: selectionEnd\n })));\n } else {\n editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())));\n }\n return;\n }\n\n var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()));\n\n // Bunch of different cases follow where we need to prevent native insertion.\n var mustPreventNative = false;\n if (!mustPreventNative) {\n // Browsers tend to insert text in weird places in the DOM when typing at\n // the start of a leaf, so we'll handle it ourselves.\n mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState);\n }\n if (!mustPreventNative) {\n // Chrome will also split up a node into two pieces if it contains a Tab\n // char, for no explicable reason. Seemingly caused by this commit:\n // https://chromium.googlesource.com/chromium/src/+/013ac5eaf3%5E%21/\n var nativeSelection = global.getSelection();\n // Selection is necessarily collapsed at this point due to earlier check.\n if (nativeSelection.anchorNode && nativeSelection.anchorNode.nodeType === Node.TEXT_NODE) {\n // See isTabHTMLSpanElement in chromium EditingUtilities.cpp.\n var parentNode = nativeSelection.anchorNode.parentNode;\n mustPreventNative = parentNode.nodeName === 'SPAN' && parentNode.firstChild.nodeType === Node.TEXT_NODE && parentNode.firstChild.nodeValue.indexOf('\\t') !== -1;\n }\n }\n if (!mustPreventNative) {\n // Check the old and new \"fingerprints\" of the current block to determine\n // whether this insertion requires any addition or removal of text nodes,\n // in which case we would prevent the native character insertion.\n var originalFingerprint = BlockTree.getFingerprint(editorState.getBlockTree(anchorKey));\n var newFingerprint = BlockTree.getFingerprint(newEditorState.getBlockTree(anchorKey));\n mustPreventNative = originalFingerprint !== newFingerprint;\n }\n if (!mustPreventNative) {\n mustPreventNative = mustPreventDefaultForCharacter(chars);\n }\n if (!mustPreventNative) {\n mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey);\n }\n\n if (mustPreventNative) {\n e.preventDefault();\n editor.update(newEditorState);\n return;\n }\n\n // We made it all the way! Let the browser do its thing and insert the char.\n newEditorState = EditorState.set(newEditorState, {\n nativelyRenderedContent: newEditorState.getCurrentContent()\n });\n // The native event is allowed to occur. To allow user onChange handlers to\n // change the inserted text, we wait until the text is actually inserted\n // before we actually update our state. That way when we rerender, the text\n // we see in the DOM will already have been inserted properly.\n editor._pendingStateFromBeforeInput = newEditorState;\n setImmediate(function () {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n });\n}", "function editOnBeforeInput(editor, e) {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n\n var editorState = editor._latestEditorState;\n\n var chars = e.data;\n\n // In some cases (ex: IE ideographic space insertion) no character data\n // is provided. There's nothing to do when this happens.\n if (!chars) {\n return;\n }\n\n // Allow the top-level component to handle the insertion manually. This is\n // useful when triggering interesting behaviors for a character insertion,\n // Simple examples: replacing a raw text ':)' with a smile emoji or image\n // decorator, or setting a block to be a list item after typing '- ' at the\n // start of the block.\n if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState))) {\n e.preventDefault();\n return;\n }\n\n // If selection is collapsed, conditionally allow native behavior. This\n // reduces re-renders and preserves spellcheck highlighting. If the selection\n // is not collapsed, we will re-render.\n var selection = editorState.getSelection();\n var selectionStart = selection.getStartOffset();\n var selectionEnd = selection.getEndOffset();\n var anchorKey = selection.getAnchorKey();\n\n if (!selection.isCollapsed()) {\n e.preventDefault();\n\n // If the currently selected text matches what the user is trying to\n // replace it with, let's just update the `SelectionState`. If not, update\n // the `ContentState` with the new text.\n var currentlySelectedChars = editorState.getCurrentContent().getPlainText().slice(selectionStart, selectionEnd);\n if (chars === currentlySelectedChars) {\n editor.update(EditorState.forceSelection(editorState, selection.merge({\n focusOffset: selectionEnd\n })));\n } else {\n editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())));\n }\n return;\n }\n\n var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()));\n\n // Bunch of different cases follow where we need to prevent native insertion.\n var mustPreventNative = false;\n if (!mustPreventNative) {\n // Browsers tend to insert text in weird places in the DOM when typing at\n // the start of a leaf, so we'll handle it ourselves.\n mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState);\n }\n if (!mustPreventNative) {\n // Chrome will also split up a node into two pieces if it contains a Tab\n // char, for no explicable reason. Seemingly caused by this commit:\n // https://chromium.googlesource.com/chromium/src/+/013ac5eaf3%5E%21/\n var nativeSelection = global.getSelection();\n // Selection is necessarily collapsed at this point due to earlier check.\n if (nativeSelection.anchorNode && nativeSelection.anchorNode.nodeType === Node.TEXT_NODE) {\n // See isTabHTMLSpanElement in chromium EditingUtilities.cpp.\n var parentNode = nativeSelection.anchorNode.parentNode;\n mustPreventNative = parentNode.nodeName === 'SPAN' && parentNode.firstChild.nodeType === Node.TEXT_NODE && parentNode.firstChild.nodeValue.indexOf('\\t') !== -1;\n }\n }\n if (!mustPreventNative) {\n // Check the old and new \"fingerprints\" of the current block to determine\n // whether this insertion requires any addition or removal of text nodes,\n // in which case we would prevent the native character insertion.\n var originalFingerprint = BlockTree.getFingerprint(editorState.getBlockTree(anchorKey));\n var newFingerprint = BlockTree.getFingerprint(newEditorState.getBlockTree(anchorKey));\n mustPreventNative = originalFingerprint !== newFingerprint;\n }\n if (!mustPreventNative) {\n mustPreventNative = mustPreventDefaultForCharacter(chars);\n }\n if (!mustPreventNative) {\n mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey);\n }\n\n if (mustPreventNative) {\n e.preventDefault();\n editor.update(newEditorState);\n return;\n }\n\n // We made it all the way! Let the browser do its thing and insert the char.\n newEditorState = EditorState.set(newEditorState, {\n nativelyRenderedContent: newEditorState.getCurrentContent()\n });\n // The native event is allowed to occur. To allow user onChange handlers to\n // change the inserted text, we wait until the text is actually inserted\n // before we actually update our state. That way when we rerender, the text\n // we see in the DOM will already have been inserted properly.\n editor._pendingStateFromBeforeInput = newEditorState;\n setImmediate(function () {\n if (editor._pendingStateFromBeforeInput !== undefined) {\n editor.update(editor._pendingStateFromBeforeInput);\n editor._pendingStateFromBeforeInput = undefined;\n }\n });\n}", "function moveLeft(input) { setCursor(input, input.selectionStart - 1) }", "next() {\n this.pos++\n if(this.pos>=this.end) {\n this.pos=this.end\n return Source.EOI\n }else return this.input.charAt(this.pos)\n }", "function ReadC() {\r\n}", "next() {\n return this.input.charAt(this.pos++);\n }", "_read() {\r\n\t\tthis._readingPaused = false\r\n\t\tsetImmediate(this._onReadable.bind(this))\r\n\t}" ]
[ "0.68927795", "0.6730734", "0.6730292", "0.66110456", "0.60455966", "0.6025901", "0.60009164", "0.5993873", "0.59305906", "0.58947945", "0.5889436", "0.5819896", "0.5789997", "0.5736562", "0.5698434", "0.5668249", "0.5667952", "0.563466", "0.5617069", "0.5617069", "0.5615207", "0.5609697", "0.5609697", "0.5574552", "0.5552167", "0.5540211", "0.5490106", "0.54878294", "0.54789835", "0.5461725", "0.5461725", "0.5436194", "0.54325116", "0.5419229", "0.54150516", "0.540403", "0.5385592", "0.5374713", "0.5373247", "0.5368929", "0.53478837", "0.5323679", "0.5323679", "0.5319557", "0.5306067", "0.53028315", "0.5298784", "0.5298784", "0.5298784", "0.5288414", "0.52740675", "0.5272321", "0.5272321", "0.5263804", "0.5263804", "0.5263804", "0.5263804", "0.5258109", "0.5256909", "0.5230371", "0.5224588", "0.5222925", "0.52134156", "0.52100366", "0.52100366", "0.52094424", "0.5191364", "0.51871663", "0.51871663", "0.51871663", "0.5185444", "0.5185444", "0.51845074", "0.5161429", "0.51610506", "0.5160848", "0.5160848", "0.5160848", "0.5155558", "0.51456", "0.5143266", "0.51329285", "0.51299", "0.51270974", "0.51199317", "0.5114735", "0.5114095", "0.5112295", "0.5106273", "0.5079044", "0.5069504", "0.5069504", "0.5069504", "0.5069504", "0.5069504", "0.50560457", "0.5054785", "0.5053003", "0.50528324", "0.5051608" ]
0.5672642
15
Essa function deve adicionar o valor digitado ao vetor valores e ao select:
function adicionar() { if(!isNumber(txtNumero.value) || inList(txtNumero.value, valores)) { // Lê-se: Se *txtNumero* não for um número válido (function isNumber) ou *txtNumero* for encontrado no vetor valores (function inList), então: window.alert('Valor inválido ou já encontrado na lista.') } else { // senão var numero = Number(txtNumero.value) // Não precisa criar essa variável convertida em Number valores.push(numero) var item = document.createElement('option') item.text = `Valor ${numero} adicionado.` item.value = numero listagem.appendChild(item) resultado.innerHTML = '' // Limpa os valores do resultado. } txtNumero.value = '' // Limpar a caixa de entrada ao final da execução da function adicionar() txtNumero.focus() // Colocar o cursor na caixa de entrada ao final da execução da function adicionar() clearButton.style.display = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validarSelect(texto, identificador) {\n\n if (texto != '') {\n $(identificador).val(texto);\n }\n}", "function fillDataModal(codigo, grado, seccion, nivel) {\n \n $(\"#modaltxtCodigo\").val(codigo);\n $(\"#modaltxtGrado\").val(grado);\n $(\"#modaltxtSeccion\").val(seccion);\n $(\"#modalnivel value=\"+0+\"selected\")=nivel;\n \n\n //if (nivel == \"Primaria\") {\n // $(\"#modalnivel option[value=\" + 1 + \"]\").attr(\"selected\", true);\n //}\n //else {\n // $(\"#modalnivel option[value=\" + 2 + \"]\").attr(\"selected\", true);\n //}\n \n}", "function alterarDiaSelect(dia) {\n $(\"#diaIncentivo\").val(dia).change();\n}", "function changeSelectRep(libresPasSelec, libresPasOtro, pastilleroSelect){\n\tvar rep = parseInt($('#select-rep option:selected').text());\n\tvar tomas = parseInt($('#input-tomas').val());\n\tif(rep > 0 && tomas === 1)\n\t\t$('#input-tomas').val(2);\n\telse if(rep === 0)\n\t\t$('#input-tomas').val(1);\n\t\n\tcheckMax(libresPasSelec, libresPasOtro, pastilleroSelect);\n}", "function SelecionaValor(valor_selecionado, dom_select) {\n for (var i = 0; i < dom_select.options.length; ++i) {\n if (dom_select.options[i].value == valor_selecionado) {\n dom_select.selectedIndex = i;\n return;\n }\n }\n}", "function numeroLinhasSelecionas() {\n var elementoLinhasSelecionadas = document.getElementById(\"numeroLinhas\");\n return numeroLinhas = elementoLinhasSelecionadas.options[elementoLinhasSelecionadas.selectedIndex].value;\n}", "function genConOptionReport(contenido,idColumn,idRow,numeral)\n{ \n $('#id_reporte_form_'+idColumn+' select').append('<option value=\"'+idRow+'\" id='+numeral+'>'+contenido+'</option>');\n}", "createSelectList(data, select_field, opt = 0)\n {\n let length = Object.keys(data).length;\n let max_val = Object.keys(data)[length - 1];\n\n for(let i = 1; i <= max_val; i++)\n {\n if(data[i])\n {\n let select_elem = document.getElementById(select_field);\n let option = document.createElement('option');\n if (opt === 0)\n {\n option.innerHTML = data[i].vorname + ' ' + data[i].name;\n }\n else if (opt === 1)\n {\n option.innerHTML = data[i].beschreibung;\n }\n else if (opt === 2)\n { \n option.innerHTML = data[i].beschreibung;\n }\n else if (opt == 3)\n {\n option.innerHTML = i;\n }\n select_elem.appendChild(option);\n }\n }\n }", "function sin_ceros(e) {\n var id = e.currentTarget.id;\n var valor = e.currentTarget.value;\n\tif (valor[0] == 0) {\n\t\tif (valor.length == 1) {\n\t\t\t$(\"#\" + id).val('1');\n\t\t} else {\n\t\t\tvalor = valor.substring(1)\n\t\t\t$(\"#\" + id).val(valor);\n\t\t\tsin_ceros(e);\n\t\t}\n\t}\n}", "function buscarValorDivisaIn(){\n let posi = document.getElementById(\"divisasIn\");\n var pose = posi.options[posi.selectedIndex].value;\n let posIn = valormercadomoneda[pose]; //valor de la divisa escogida en la entrada\n return posIn;\n}", "function getSelectValueNumber(e){\n var value = parseFloat(e.value);\n console.log(value);\n var v1 = typeof value;\n console.log(v1);\n\n return value;\n // var id = e.id;\n // console.log(id);\n\n}", "function SetValoresAnoEstudo()\n{\n var Limite = dataAnoEstudo.length;\n var HtmlContent = \"\";\n\n for(var a = 0; a < Limite; a++){\n HtmlContent += '<option value=\"'+dataAnoEstudo[a].idanoEstudo+'\">'+dataAnoEstudo[a].ano+'º</option>';\n\n }\n \n $('#S_AnoEstudo').append(HtmlContent);\n}", "function ponerDatosSelect(q,sel,t,nodes)\r\n{\r\n document.getElementById(q).innerHTML=t;\r\n var select = document.getElementById(sel);\r\n var result = nodes.iterateNext();\r\n i=0;\r\n while (result)\r\n {\r\n var option = document.createElement(\"option\");\r\n option.text = result.innerHTML;\r\n option.value=i; i++;\r\n select.add(option);\r\n result = nodes.iterateNext();\r\n } \r\n}", "function retornar_select(idselect,valoraretornar)\n\t{\n\t\t\t$('#'+idselect).each(function(){\n\t\t\t $('option', $('#'+idselect)).each(function() {\n\t\t\t\t\tif($(this).val() == valoraretornar)\n\t\t\t\t\t{\n\t\t\t\t\t\t$(this).attr('selected','selected');\n\t\t\t\t\t}\n\t\t\t })\n\t\t\t});\n\t}", "function loja()\n\t{\n\t\tvalor = jQuery(\"select[name='rede']\").val();\n\t\tjQuery(\"input[name='rede']\").val(valor);\n\t}", "function obtenerTipoMoneda() {\n $(\"#cboTipMoneda\").val('1').trigger('change.select2');\n document.getElementById('txtidTipMonedaCTA').value = $('#cboTipMoneda').val();\n document.getElementById(\"cboTipoApertura\").disabled = false;\n document.getElementById(\"chkDefDep\").disabled = false;\n document.getElementById(\"chkRepSal\").disabled = false;\n document.getElementById('txtMontoMinimo').value = '0.00';\n }", "function fillSelect(idSelect, data) {\n\n var select = document.getElementById(idSelect);\n var numberSubstatus = data[0].length;\n\n emptySelect(idSelect)\n\n if (numberSubstatus > 0) {\n for (var i = 0; i < numberSubstatus; i++) {\n var option = document.createElement('option');\n option.text = data[1][i];\n option.value = data[0][i];\n select.add(option, null);\n }\n }\n\n return numberSubstatus;\n}", "function fillSelect(idSelect, data) {\n\n var select = document.getElementById(idSelect);\n var numberSubstatus = data[0].length;\n\n emptySelect(idSelect)\n\n if (numberSubstatus > 0) {\n for (i = 0; i < numberSubstatus; i++) {\n var option = document.createElement('option');\n option.text = data[1][i];\n option.value = data[0][i];\n select.add(option, null);\n }\n }\n\n return numberSubstatus;\n}", "function listFilter(column, selectId){ \n \n var operator = column.parent('div').next();\n var value = operator.next();\n\n value.empty().append( \n $('<select />').html($(\"#\"+selectId).html()).addClass('textfield_value form-control no_radius') \n .attr('name','textfield_value[]')\n .attr('id', 'textfield_value')\n );\n //agregar = y diferente \n operator.children().children().each(function(i, elem){\n if($(elem).val() !== '')\n $(elem).remove();\n });\n operator.children().append(\n $(\"<option />\").val('=').text('=')\n ).append(\n $(\"<option />\").val('<>').text('<>') \n ); \n \n}", "function GetDataWithSelectid(Value, nextcontrolid, type, relatedtype, selectedval) {\n try {\n var data = Value + \"|\" + nextcontrolid + \"|\" + type + \"|\" + relatedtype + \"|\" + selectedval;\n LookupDdlBinder.GetDataWithSelectid(data, SetDataWithSelectid);\n } catch (err) {\n alert(err);\n }\n}", "function printResultado(numero) { \r\n\r\n if(numero == \"\"){\r\n document.getElementById(\"valor\").value = numero;\r\n }\r\n else{\r\n document.getElementById(\"valor\").value = getNumeroFormatado(numero);\r\n }\r\n}", "function passrushers_value(ele) { \n var selected = ele.value;\n passrushers_select = numberOfPassRushers[selected]\n}", "function CriarInputProdutoVenda() {\n let select = novoElemento('select', 'input');\n\tselect.setAttribute('name', 'produto');\n let optionDisabled = document.createElement('option');\n optionDisabled.setAttribute('value', '-1');\n optionDisabled.setAttribute('disabled', '');\n optionDisabled.setAttribute('selected', '');\n optionDisabled.setAttribute('preco', '0.0');\n optionDisabled.innerHTML = \"Selecione\"\n select.appendChild(optionDisabled);\n let options = criaOptionSelectVenda(produtos)\n options.forEach(element => {\n select.appendChild(element)\n })\n return select;\n}", "function selectorFilaColumnaCasos(miSelect){\n return(\"<select class='form-control' id='\"+miSelect+\"'><option value=1>Porcentaje de Fila</option><option value=2>Porcentaje de Columna</option><option value=3>Total de casos</option></select>\");\n}", "function obtener_datos_curso_por_folio(){\n var consulta = conexion_ajax(\"/servicios/dh_cursos.asmx/obtener_datos_cursos_folio\", { folio: $(\"#folio_curso\").val() })\n $(\"#folio_curso\").val(consulta.id_curso)\n $(\"#Nombre_curso\").val(consulta.nombre_curso)\n $(\"#estatus_cusro\").val(consulta.estatus)\n $(\"#selector_puestos\").val(\n (function (valor) {\n var dato;\n $(\"#puestos option\").each(function (index, item) {\n if (valor == parseInt($(this).attr(\"name\")))\n dato = $(this).val();\n })\n return dato;\n }(consulta.puesto_pertenece))\n )\n obtener_imagen()\n}", "function numSelected(num) {\n if (newNum) {\n keySelect.display.value = num;\n newNum = false;\n } else {\n if (keySelect.display.value === \"\")\n keySelect.display.value = num;\n else\n keySelect.display.value += num;\n }\n }", "function selectFieldValue(){\n var temp = $('fieldName').value;\n temp = temp.split(\".\");\n var table_name = temp[0];\n var field_name = temp[1];\n var tf = \"['\" + table_name + \".\" + field_name + \"']\";\n var tfJsonObject = eval(tf);\n var selectv = $('fieldName');\n var data_type = selectv[selectv.selectedIndex].additionalAttr;\n \n if ((field_name != '') && (field_name != undefined)) {\n \tif(data_type == 'Date'){\n \t\tCalendar.getController('fieldValue','/archibus/schema/ab-system/graphics');\n \t} else {\n Ab.view.View.selectValue('restSelectPanel', field_name, ['fieldValue'], table_name, tfJsonObject, tfJsonObject, \"\" + table_name + \".\" + field_name + \" IS NOT NULL \", 'afterSelectFieldValue', true, false, '', 1000, 500);\n\t\t\t}\n }\n else {\n alert(getMessage(\"noField\"));\n }\n\n}", "function DatLisCiry(id, nombre) {\n return '<option value=\"' + id + '\">' + nombre + '</option>';\n}", "function showSelect (etiqueraId, valor) {\n $(etiqueraId + 'option[value=' + valor + ']').attr('selected', true)\n}", "function setValorCombo (){\n $(\"#comboSemana\").val(semanaActual); //CARGA SEMANA\n getSucDetalle(genSucActual); //CARGA GENERAL/DETALLE\n}", "onSelectValueChange() {\n if (!this.customSelected) {\n this.shadowRoot.querySelector('#' + this.selectid).value =\n this.selectValue;\n }\n }", "populateSelect(min, max, el) {\n for (let i = min; i <= max; i++) {\n const opt = document.createElement('option');\n if (i < 10) {\n opt.setAttribute('value', i);\n opt.textContent = '0' + i;\n } else {\n opt.setAttribute('value', i);\n opt.textContent = i;\n }\n el.appendChild(opt);\n }\n }", "function selec_primery_product(value_sel)\n{\n\tdocument.getElementById(\"select_primery_product\").value=value_sel;\n}", "handleSelect(value) {\n\t\tthis.setValue(value, true)\n\t}", "function SetDataWithSelectid(val) {\n try {\n controlid = val[0].split(\"|\")[0];\n selectedid = val[0].split(\"|\")[1];\n $(\"#\" + controlid).empty();\n if (currentLanguage == \"Arabic\") {\n $(\"#\" + controlid).append($(\"<option selected='selected'></option>\").val(\"0\").html(\"-- اختر -- \"));\n } else {\n $(\"#\" + controlid).append($(\"<option selected='selected'></option>\").val(\"0\").html(\"-- Select -- \"));\n }\n for (var i = 1; i <= val.length - 1; i++) {\n if (val[i].split(\"|\")[1] == selectedid) {\n $(\"#\" + controlid).append($(\"<option selected='selected'></option>\").val(val[i].split(\"|\")[1]).html(val[i].split(\"|\")[0]));\n }\n else {\n\n $(\"#\" + controlid).append($(\"<option></option>\").val(val[i].split(\"|\")[1]).html(val[i].split(\"|\")[0]));\n }\n }\n } catch (err) {\n alert(err);\n }\n}", "function numeros(a){\r\n document.getElementById(\"resultado\").value = document.getElementById(\"resultado\").value+a;\r\n}", "function compruebaAsiento(select, totalPasajeros){\n for(let i = 1; i <= totalPasajeros; i++){\n let otroSelect = document.getElementById(\"pasajero\" + i + \"-asiento\");\n if(select.id !== otroSelect.id){\n if(select.value === otroSelect.value && select.value !== \"0\"){\n Swal.fire(\n '¡Lo sentimos!',\n 'El asiento que ha seleccionado está ocupado',\n 'error'\n );\n select.value = \"\";\n }\n }\n }\n}", "convertSelected(value) {\n var options = this.get('options');\n\n // If it is plain object.\n if (typeOf(options) === 'object') {\n value = this.get('inputOptions').findBy('id', value);\n }\n\n return value;\n }", "function cargarValorSelected(objeto,value,tiempo){\n setTimeout(function() {\n $(objeto+' option[value=\"'+value+'\"]').attr('selected','selected'); \n }, tiempo); \n }", "function tipoSalsa() {\n var salsa = \"\";\n switch (this.value) {\n case \"0\":\n salsa = \"BARBACOA CRÉME DOBLE\";\n break;\n case \"1\":\n salsa = \"BARBACOA DOBLE\";\n break;\n case \"2\":\n salsa = \"BURGER DOBLE\";\n break;\n case \"3\":\n salsa = \"CARBONARA DOBLE\";\n break;\n case \"4\":\n salsa = \"JALISCO DOBLE\";\n break;\n case \"5\":\n salsa = \"TOMATE Y ORÉGANO DOBLE\";\n break;\n case \"6\":\n salsa = \"BARBACOA CRÉME\";\n break;\n case \"7\":\n salsa = \"BARBACOA\";\n break;\n case \"8\":\n salsa = \"BURGER\";\n break;\n case \"9\":\n salsa = \"CARBONARA\";\n break;\n case \"10\":\n salsa = \"JALISCO\";\n break;\n case \"11\":\n salsa = \"TOMATE Y ORÉGANO\";\n break;\n case \"12\":\n salsa = \"SIN SALSA\";\n break;\n };\n miPizza.seleccionarSalsa(salsa);\n}", "function seleccion(){\n\t\tvar seleccion = document.getElementById(\"cliente\");\n\t\tvar idCliente = seleccion.options[seleccion.selectedIndex].value;\n\t\tdocument.getElementById(\"idCliente\").value = idCliente;\n\t}", "function DatProveMP(id, nombre) {\n return '<option value=\"' + id + '\">' + nombre + '</option>';\n}", "function codificaTexto(){\n const texto = document.getElementById(\"InputTextoPlano\");\n const textoPlano = texto.value;\n const input = document.getElementById(\"InputN\");\n const value = Number(input.value);\n if(value <= 0 || value >= limit){\n alert(\"Debes ingresar n mayor que cero y menor que \"+limit)\n }else{\n //console.log(value)\n const res = codifica(String(textoPlano),value)\n resultado.value = res;\n }\n}", "function setAdminUnico(){\n\tdocument.getElementById(\"8__VAL_C2\").value = 14265;\n\t\n}", "function selectSeatTypeValue(){\n\n Ab.view.View.selectValue('abGbFpDataS3EmpTransAir_form', \n\t\t\t\tgetMessage('selectSeat'), \n\t\t\t\t['gb_fp_s3_em_air.seating_type', 'gb_fp_s3_em_air.seating_type'], \n\t\t\t\t'gb_fp_comm_airc_data', \n\t\t\t\t['gb_fp_comm_airc_data.seating_type'], \n\t\t\t\t['gb_fp_comm_airc_data.version_name', 'gb_fp_comm_airc_data.seating_type'], \n\t\t\t\t\" gb_fp_comm_airc_data.version_name = '\" + abGbFpDataS3EmpTransAir_ctrl.version_name + \"'\"\n\t\t\t\t+ \" and gb_fp_comm_airc_data.version_type = '\" + abGbFpDataS3EmpTransAir_ctrl.version_type + \"'\", \n\t\t\t\tnull, false, false , null, null, null, 'grid', 0, \n\t\t\t\t\"[{'fieldName': 'gb_fp_comm_airc_data.version_name', 'sortOrder': 1},{'fieldName': 'gb_fp_comm_airc_data.seating_type', 'sortOrder': 1}]\");\n\n}", "function setDmgModal(num) {\n $('#dmgSelect').val(num);\n}", "function affichage(array) {\n const nb = document.createElement('input');\n nb.type = 'number'\n nb.value = 0;\n nb.max = 12;\n nb.min = 0;\n const div = document.createElement('div');\n div.className = 'row py-3'\n\n let last = 0;\n\n nb.addEventListener('change', () => {\n const nouveau = parseInt(nb.value);\n\n for (let i = nouveau; i < last; i++) //pour enlever un select si l utilisateur decide d enlever une pizza\n div.removeChild(div.lastChild);\n\n for (let i = last; i < nouveau; i++) // pour ajouter un select si l utilisateur decide d ajouter une pizza\n div.append(createSelect(array))\n\n last = nb.valueAsNumber; //pour redefinir last au nb choisit\n })\n\n document.getElementById('commande').append(nb, div); //endroit ou l on place\n}", "function alterarTecnicoSelect(tecnico) {\n $(\"#nombre-tecnico\").val(tecnico).change();\n}", "function ValorSelecionado(dom_select) {\n return dom_select.length > 0 ?\n dom_select.options[dom_select.selectedIndex].value : null;\n}", "function contrato_selecionado_clicked(idContrato,id_campo){\n var idContrato = idContrato;\n var id_contrato = $(\"#no_contrato_infocarga_\"+idContrato).text();\n $(\"#contrato_asignado_\"+id_campo).val(id_contrato);\n $(\"#contrato_verificado_\"+id_campo).val(id_contrato);\n}", "function buscar_seleccionado(combo,valor)\n{\n for(i= 0; i<combo.length; i++)\n {\n combo.selectedIndex = i; //selecciona el registro de la pos i\n if(combo.value == valor)\n {\n var encontro = true;\n break; //sale del ciclo\n }\n }\n if(!encontro)\n\tcombo.selectedIndex = 0;\n}", "function cargarNumero() {\n document.getElementById(\"incognita\").value = incognita;\n}", "function TipoDescuento4(){\n //recuperamos el valor descuento 4 anterior\n var descuento4=document.getElementById(\"tipo_des4\").value;\n \n //recuperamos el sueldo neto del input\n var SueldoNeto=document.getElementById('sueldoNeto').value;\n //si anteriormente ya tenia un valor, debe reestablecer\n if(descuento4 > 0)\n {\n var suma=parseFloat(SueldoNeto) + parseFloat(descuento4);\n document.getElementById(\"sueldoNeto\").value=suma;\n }\n \n var monto= document.getElementById('tipoDescuento4').value;\n document.getElementById(\"tipo_des4\").value=monto;\n //Actualiza el neto a cobrar\n var SaldoNeto= document.getElementById('sueldoNeto').value;\n document.getElementById(\"sueldoNeto\").value=SaldoNeto-monto;\n \n //codigo de descuento la cual guardaremos\n var posicion=document.getElementById('tipodescuento4').options.selectedIndex;\n var codigoDescuento4=document.getElementById('tipodescuento4').options[posicion].value;\n document.getElementById(\"cod_des4\").value=codigoDescuento4;\n //guardamos el valor de salario neto(esto se actualizara con cada descuento)\n var sueldoneto=document.getElementById('sueldoNeto').value;\n document.getElementById(\"sal_neto\").value=sueldoneto;\n }", "function DatLisDepart(id, nombre) {\n return '<option value=\"' + id + '\">' + nombre + '</option>';\n}", "function make_selection()\n{\n\t$(\"#mysel\").val(3);\n}", "function mostrarDatosProveedor() {\n //tomar el idProveedor desde el value del select\n let idProvedor = document.getElementById(\"idProveedor\").value;\n //buscar el proveedor en la lista\n for (let i = 0; i < listaProveedores.length; i++) {\n let dato = listaProveedores[i].getData();\n if(dato['idProveedor'] === parseInt(idProvedor)){\n //desplegar los datos en el formulario\n vista.setDatosForm(dato);\n break;\n }\n }\n}", "function listarMetodosC(){\n\n let listaMetodosC = \"\";\n if($(\"#nuevoMetodoPagoC\").val()==\"Efectivo\"){\n\n $(\"#listaMetodoPagoC\").val(\"Efectivo\");\n }else{\n $(\"#listaMetodoPagoC\").val($(\"#nuevoMetodoPagoC\").val() + \"-\" + $(\"#nuevoCodigoTransaccionC\").val());\n }\n}", "function adcionaNoSelect(numeroParaMostrar) {\n var select = document.getElementById('selectLista')\n let item = document.createElement('option')\n if (lista.length == 1) {\n select.innerHTML = ''\n }\n item.text = `O numero ${numeroParaMostrar} foi adicionado a lista`\n select.appendChild(item)\n document.getElementById('apresentaAnalise').innerHTML = ''\n}", "function alteraOpcao(){\n\tlet selectDias = document.getElementById(\"dias-semana\")\n\tlet opcaoDia = selectDias.options[selectDias.selectedIndex].value\n\treturn opcaoDia\n}", "function setSelectPrimaryKey(){\n let selectPrimaryKey = document.getElementById('primary-key')\n selectPrimaryKey.innerHTML = ''\n \n let optionIndex = document.createElement('option')\n optionIndex.innerHTML = '-- Primary Key --'\n optionIndex.setAttribute('value','')\n selectPrimaryKey.appendChild(optionIndex)\n\n let options = getInputColumsValuesArray()\n options.map(value => {\n option = document.createElement('option')\n option.setAttribute('value',value)\n option.innerHTML = value\n selectPrimaryKey.appendChild(option)\n })\n}", "function getPais() {\n let paisSeleccionado = this.options[slcPais.selectedIndex].value;\n choosenPais = paisSeleccionado;\n}", "select(value) {\n\n \n let selectables = this.object_item(value).selectables;\n let selections = this.object_item(value).selections;\n\n\n\n if (selectables.length > 0) {\n\n selectables.addClass('OPTION-selected')\n .hide(1000);\n\n selections.addClass('OPTION-selected')\n .show(1000);\n\n this.object_item(value).options.prop('selected', true); // active selected original select\n\n // effacer class css SELECT-hover de cursur chaque changement\n this.$newSelect.find(this.elemsSelector).removeClass('SELECT-hover');\n\n\n\n\n if (this.options.keepOrder) { // order de position des item( asec or none)\n var selectionLiLast = this.$selectionUl.find('.OPTION-selected'); //les elements non hide =>show\n if ((selectionLiLast.length > 1) && (selectionLiLast.last().get(0) != selections.get(0))) {\n selections.insertAfter(selectionLiLast.last());\n }\n }\n\n\n this.$originalSelect.trigger('change'); // start onchange de element original\n this.afterSelect(value);\n\n }\n }", "function nombreEquipo(id){\n var nombreEquipoSeleccionado = $(\"#\" + id + \" option:selected\").text();\n document.getElementById('equipoCGnombre').value = nombreEquipoSeleccionado;\n }", "function ObtValores(n, valor) {\n var total = 0;\n valor = parseInt(valor); // Convertir el valor a un entero (número).\n if (n == 1) {\n n1 = document.getElementById('ValorUF').value;\n } else if (n == 2) {\n n2 = document.getElementById('ValorHP').value;\n }\n\n}", "function entrada_selecionada() {\n return entradas[parseInt(document.getElementById(\"ins\").value)];\n}", "function preenche(valor)\r\n\t{\r\n\t\tvar campo = document.getElementById(\"campo\");\r\n\t\t\r\n\t\t//pega o valor atual do elemento\r\n\t\tvar value = campo.value;\r\n\t\tvar caracteres = value.length;\r\n\t\t \r\n\t\t /*----- Limitar o numero de caracteres no campo ------*/\r\n\t\tif (caracteres < 8) \r\n\t\t\t{\r\n\t\t\t\t//pega o valor atual e soma com a valor que esta a ser acrescentado\r\n\t\t\t\tcampo.value = value+valor;\r\n\t\t\t};\r\n\r\n\t}", "function selectConsultarUnidades()\n{\n var mi_obj = {\n campos : \"idUnidad, unidad\",\n order : \"unidad\",\n table : \"unidad\",\n operacion : \"consultar-n-campos\"\n };\n\n var mi_url = jQuery.param( mi_obj );\n\n peticionConsultarOpcionesParaSelect( mi_url, \"select[name='unidad']\", \"option\" );\n}", "function criaSelectRoubos(){\n let i = 0\n $selectRoubos.innerHTML= '';\n roubosGrupo.forEach(function(rg){\n \n let option1 = document.createElement('option')\n option1.value = i;\n option1.text = `${rg.nome} - ${rg.powerNecessario}`;\n $selectRoubos.append(option1);\n i++;\n })\n}", "function autocompletar() {\n\t\t var temp = \"\";\n\t\t var serie = $(\"#serie_factura\").val();\n\t\t for (var i = serie.length; i < 7; i++) {\n\t\t temp = temp + \"0\";\n\t\t }\n\t\t return temp;\n\t\t}", "function seleccionar_cantones(identificador){\n\t$(identificador).on('change', function(e){\n\t\t$('#id_canton option').remove();\n\t\t$('#id_canton').prop('disabled', true);\n\t\t$('#id_parroquia option').remove();\n\t\t$('#id_parroquia').append('<option>-- Seleccione --</option>')\n\t\t$('#id_parroquia').prop('disabled', true);\n\n\t\te.preventDefault();\n\t\tvar url = '/api/ciudades/select/';\n\t\tvar provincia = $(identificador + ' option:selected').text();\n\t\tvar ctx = {'provincia': provincia}\n\n\t\t$.get(url, ctx, function(data){\n\t\t\tconsole.log(data.cantones)\n\t\t\t$.each(data.cantones, function(index, element){\n\t\t\t\tconsole.log(element);\n\t\t\t\t$('#id_canton').prop('disabled', false);\n\t\t\t\t$('#id_canton').append(element.option)\n\t\t\t});\n\t\t});\n\t})\n}", "function picker(n) {\n if (parseInt(n) < 10) {\n return \"0\" + n.toString();\n } else {\n return n.toString();\n }\n}", "function obtenerActividad(seleccionado){\n var table = $('#lista-actividad').DataTable();\n var celda = $(seleccionado).parent();\n var rowData = table.row(celda).data();\n var id = rowData['id'];\n var nombre = rowData['nombre_actividad'];\n var direccion = rowData['direccion'];\n var telefono = rowData['telefono'];\n var email = rowData['email'];\n var celular = rowData['celular'];\n var ciudad = rowData['ciudad'];\n\n\n $('#id-actividad').val(id);\n $('#nombre-actividad').val(nombre);\n $('#direccion-actividad').val(direccion);\n $('#telefono-actividad').val(telefono);\n $('#email-actividad').val(email);\n $('#celular-actividad').val(celular);\n $('#ciudad-actividad').val(ciudad);\n}", "function sumar_valores(identificador,resultado){\n var sumatoria = 0;\n $(identificador).each(function(){\n sumatoria += parseFloat($(this).val()) || 0;\n });\n if($(resultado).is('input')){\n $(resultado).val(sumatoria.format()).change();\n }else{\n $(resultado).text(sumatoria.format());\n }\n}", "function selectValue(obj, value) {\n var index = obj.find(\".dd-option-value[value= '\" + value + \"']\").parents(\"li\").prevAll().length;\n selectIndex(obj, index);\n }", "function obtenerValoresOtras(cod_usuario,cod_inspeccion){\n db.transaction(function (tx) {\n var query = \"SELECT k_coditem,v_calificacion,o_observacion,n_calificacion FROM puertas_valores_otras WHERE k_codusuario = ? AND k_codinspeccion = ?\";\n tx.executeSql(query, [cod_usuario,cod_inspeccion], function (tx, resultSet) {\n for(var x = 0, i = 55; x < resultSet.rows.length; x++,i++) {\n $(\"input[name=sele_otras\"+i+\"][value='\"+resultSet.rows.item(x).v_calificacion+\"']\").prop(\"checked\",true);\n $('#text_otras_observacion_'+i).val(resultSet.rows.item(x).o_observacion);\n }\n $('#text_calificacion55').val(resultSet.rows.item(0).n_calificacion); //se coloca el cero porque 55 es el primer valor de la lista\n $('#cal_item_otras55').val(resultSet.rows.item(0).n_calificacion); //se coloca el cero porque 55 es el primer valor de la lista\n },\n function (tx, error) {\n console.log('SELECT error: ' + error.message);\n });\n }, function (error) {\n console.log('transaction error: ' + error.message);\n }, function () {\n console.log('transaction ok');\n });\n}", "function cambiarMapas()\r\n{\r\n\t opcion = sel.value();\r\n}", "function lisContOptionModifi(contenido,idColumn,idRow)\n{ \n $('#id_reporte_form_'+idColumn+' select').append('<option value=\"'+idRow+'\">'+contenido+'</option>');\n}", "function search_estado(estado, contenedor) \r\n{\r\n contenedor.append('<option value =\"\">...</option>');\r\n if (estado == 'Nuevo') {\r\n contenedor.append('<option value =\"1\" selected>NUEVO</option>');\r\n }\r\n else\r\n {\r\n contenedor.append('<option value =\"1\" >NUEVO</option>');\r\n }\r\n if (estado == 'Bueno') {\r\n contenedor.append('<option value =\"2\" selected>BUENO</option>');\r\n }\r\n else\r\n {\r\n contenedor.append('<option value =\"2\" >BUENO</option>');\r\n }\r\n if (estado == 'Regular') {\r\n contenedor.append('<option value =\"3\" selected>REGULAR</option>');\r\n }\r\n else\r\n {\r\n contenedor.append('<option value =\"3\" >REGULAR</option>');\r\n }\r\n if (estado == 'Malo') {\r\n contenedor.append('<option value =\"4\" selected>MALO</option>');\r\n }\r\n else\r\n {\r\n contenedor.append('<option value =\"4\" >MALO</option>');\r\n }\r\n return false;\r\n}", "function CriarInputQuantidadeVenda() {\n\tlet input = novoElemento('input', 'inputQuantidadeProduto');\n\tinput.setAttribute('type', 'number');\n\tinput.setAttribute('name', 'quantidadeProduto');\n\tinput.setAttribute('value', '0');\n return input;\n}", "function selectConsultarUnidades()\n{\n var mi_obj = {\n campos : \"idUnidad, unidad\",\n order : \"unidad\",\n table : \"unidad\",\n operacion : \"consultar-n-campos\"\n };\n\n var mi_url = jQuery.param( mi_obj );\n\n peticionConsultarOpcionesParaSelect( mi_url, \"select[name='unidad']\" );\n}", "function obterValorOptionTabela(nomeTabela, l, c){\n var tabela = document.getElementById(nomeTabela);\n var celula = tabela.rows[l].cells[c];\n var options = celula.getElementsByTagName(\"option\");\n for(i = 0; i < options.length; i++){\n if(options[i].selected){\n return options[i].value;\n }\n }\n}", "function destinosenElLabel() {\n valores = valores + document.getElementById(\"selectDestinos\").value + \",\";\n let valoresModificados = valores.slice(0, -1);\n \n document.getElementById(\"destinoM\").value = valoresModificados;\n}", "function extractSelectValue(field) {\n if (field.tagName.toLowerCase() != \"select\") {\n return 0;\n }\n \n var selected = field.selectedIndex;\n if (selected < 0) {\n return 0;\n }\n \n var textVal = field.options[selected].text;\n var numVal = parseFloat(textVal);\n if (isNaN(numVal)) {\n numVal = 0;\n }\n \n return numVal; \n}", "function search_tipo_bien(id, contenedor,tipo_ant)\r\n{\r\n\r\n var id;\r\n $.ajax({\r\n url: 'controller/puente.php',\r\n type: 'POST',\r\n dataType: 'json',\r\n data: {option: 8,grupo:id},\r\n async: false ,\r\n cache: false,\r\n })\r\n .done(function(data) {\r\n contenedor.empty();\r\n contenedor.append('<option value=\"\" >...</option>');\r\n $.each(data, function(i, val) {\r\n if (val.nombre == tipo_ant) \r\n {\r\n id = val.id;\r\n contenedor.append('<option value=\"'+val.id+'\" selected>'+val.nombre+'</option>');\r\n }\r\n else\r\n {\r\n contenedor.append('<option value=\"'+val.id+'\">'+val.nombre+'</option>');\r\n }\r\n \r\n });\r\n \r\n })\r\n .fail(function() {\r\n alert(\"Error en -> search_tipo_bien() \");\r\n });\r\n selected = id;\r\n return selected;\r\n}", "function tipoTamano() {\n miPizza.seleccionarTamano(this.value);\n}", "static updatePedidoSelector(data) {\n let select = document.getElementById(\"editPedidoSelect\");\n select.innerHTML = \"\";\n\n for (let i=0; i<data.length; i++) {\n var option = document.createElement(\"option\");\n option.text = data[i].id;\n option.setAttribute(\"pedId\",data[i].id)\n select.add(option);\n }\n }", "function limpiarCampos(){\n\t$('#t').val(\"\");\n\t$('#cant').val(\"1\");\n\t$('#idInputSeleccionar').val(\"\");\n\t//$('#precio').val(\"Cantidad x Precio\");\n\t//$('#total').val(\"Total\");\n\t//$('#codigo').val(\"\");\n }", "function alumnoRegistro(){\r\n let perfil = Number(document.querySelector(\"#selPerfil\").value); //Lo convierto a Number directo del html porque yo controlo qu'e puede elegir el usuario\r\n if(perfil === 2){\r\n document.querySelector(\"#selDocentesRegistro\").innerHTML =\r\n `<label for=\"selListaDocentes\">Elija docente: </label><select id=\"selListaDocentes\"> \r\n </select>`;\r\n for (let i = 0; i < usuarios.length; i++) {\r\n const element = usuarios[i];\r\n if(element.perfil === \"docente\"){\r\n document.querySelector(\"#selListaDocentes\").innerHTML +=\r\n `<option value=\"${element.nombreUsuario}\">${element.nombre} (${element.nombreUsuario}) </option>`\r\n }\r\n }\r\n }else{\r\n document.querySelector(\"#selDocentesRegistro\").innerHTML = \"\";//Esta funcion corre cada vez que hay alguien selecciona un perfil en el formulario de registro, si cambia para otro que no sea alumno (2) viene aca y elimina el <select> de docente\r\n }\r\n}", "function displayInseamLength(inseamLength, idx) {\n\tvar inseamLengthId = (idx != undefined) ? \"inseamLength_\" + idx : \"inSeamLength\";\n\tvar selectInseamlength = $(\"\" + inseamLengthId);\n\tselectInseamlength.innerHTML = \"\";\n\tvar arrQuarter = new Array(4);\n\tarrQuarter[0] = \"\";\n\tarrQuarter[1] = \"1/4\";\n\tarrQuarter[2] = \"1/2\";\n\tarrQuarter[3] = \"3/4\";\n\tvar optionElement = createDOM('option', {'value':'default' , 'selected':'selected'});\n\toptionElement.appendChild(document.createTextNode('Select Inseam Length'));\n\tselectInseamlength.appendChild(optionElement);\n //BUG00234\n var selectedInseamLength = getValueFromElement('selectedInseamLength');\n\n var inseamLength_min = inseamLength.inseamLength_min;\n\tvar insemaLength_max = inseamLength.inseamLength_max;\n\tif (inseamLength_min > 0 && insemaLength_max > 0) {\n\t\tvar arrQuarter_length = arrQuarter.length;\n\t\tfor (i = inseamLength_min; i <= insemaLength_max; i++) {\n\t\t\tif (i == insemaLength_max) arrQuarter_length = 1;\n\t\t\tfor (j = 0; j < arrQuarter_length; j++) {\n\t\t\t\tif (j != 0) {\n\t\t\t\t\toptionElement = createDOM('option', {'value':'' + i + '-' + arrQuarter[j]});\n //BUG00234\n if (optionElement.value == selectedInseamLength){\n optionElement.selected = true;\n }\n var displayContent = i + ' - ' + arrQuarter[j];\n\t\t\t\t\toptionElement.appendChild(document.createTextNode(displayContent));\n\t\t\t\t}\n\n\t\t\t\t//selectInseamlength.innerHTML += \"<option value='\" + i + \"@\" + arrQuarter[j] + \"'>\" + i + \" - \" + arrQuarter[j] + \"</option>\";\n\t\t\t\telse {\n\t\t\t\t\toptionElement = createDOM('option', {'value':'' + i});\n //BUG00234\n if (optionElement.value == selectedInseamLength){\n optionElement.selected = true;\n }\n\t\t\t\t\toptionElement.appendChild(document.createTextNode(i));\n\t\t\t\t}\n\t\t\t\t//selectInseamlength.innerHTML += \"<option value='\" + i + \"'>\" + i + \"</option>\";\n\t\t\t\tselectInseamlength.appendChild(optionElement);\n\t\t\t}\n\t\t}\n\t\tselectInseamlength.disabled = false;\n\t}\n\tupdateCount += 1;\n //BUG00248\n YAHOO.ebauer.productUtils.toggleAddToButton();\n}", "function setTextValue(selectObj, valueToSet) {\n\tselectObj.value = fixLen(valueToSet);\n}", "function obtenerValoresElectrica(cod_usuario,cod_inspeccion){\n db.transaction(function (tx) {\n var query = \"SELECT k_coditem,v_calificacion,o_observacion FROM puertas_valores_electrica WHERE k_codusuario = ? AND k_codinspeccion = ?\";\n tx.executeSql(query, [cod_usuario,cod_inspeccion], function (tx, resultSet) {\n for(var x = 0, i = 38; x < resultSet.rows.length; x++,i++) {\n $(\"input[name=sele_electrica\"+i+\"][value='\"+resultSet.rows.item(x).v_calificacion+\"']\").prop(\"checked\",true);\n $('#text_electrica_observacion_'+i).val(resultSet.rows.item(x).o_observacion);\n }\n },\n function (tx, error) {\n console.log('SELECT error: ' + error.message);\n });\n }, function (error) {\n console.log('transaction error: ' + error.message);\n }, function () {\n console.log('transaction ok');\n });\n}", "function addSelectVariables(selectObj)\n{\n\tvar addnValues = \"\";\n\t\n\tif(selectObj.data('val')){\n\t\tvar fields = selectObj.data('val').split('|');\n\t\tfor(var i=0; i<fields.length; i++){\n\t\t\taddnValues += '/'+fields[i]+'/'+replaceBadChars($('#'+fields[i]).val());\n\t\t}\n\t}\n\t\n\treturn addnValues;\n}", "function field_select(obj, def)\n{\n\tif (obj.value == '') obj.value = def;\n\tobj.select();\n}", "function convertidorMonedas(){\r\n\r\n // extrajendo los valores con el id y value\r\n var valorInput1 = document.getElementById(\"valor1\").value;\r\n var valorInput2 = document.getElementById(\"valor2\").value;\r\n \r\n\r\n // llamando a los dos id de html \r\n\r\n var select1 = document.getElementById(\"select1\").value;\r\n var select2 = document.getElementById(\"select2\").value;\r\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n // primera conversion dolar a a las demas monedas \r\n if(select1 == \"1\" ){\r\n \r\n switch(select2)\r\n {\r\n case \"1\":\r\n document.getElementById(\"valor2\").value = valorInput1;\r\n break;\r\n\r\n case \"2\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 56.61;\r\n break;\r\n case \"3\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 0.85;\r\n break;\r\n case \"4\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 97.00;\r\n break;\r\n \r\n } \r\n \r\n \r\n\r\n // conversion de pesos a las demas moneads \r\n \r\n }else if(select1 == \"2\"){\r\n switch(select2){\r\n case \"1\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 0.018;\r\n break;\r\n case \"2\":\r\n document.getElementById(\"valor2\").value = valorInput1;\r\n break;\r\n case \"3\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 0.015;\r\n break;\r\n case \"4\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 1.71;\r\n break; \r\n\r\n \r\n }\r\n\r\n // conversion de euro a las demas moneadas\r\n }\r\n else if(select1 == \"3\"){\r\n switch(select2){\r\n case \"1\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 1.18;\r\n break;\r\n case \"2\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 66.86;\r\n break;\r\n case \"3\":\r\n document.getElementById(\"valor2\").value = valorInput1 ;\r\n break;\r\n case \"4\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 114.47;\r\n break; \r\n\r\n }\r\n\r\n \r\n\r\n }\r\n\r\n // conversion de htg a los demas monedas\r\n \r\n else if(select1 == \"4\"){\r\n switch(select2){\r\n case \"1\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 0.010;\r\n break;\r\n case \"2\":\r\n document.getElementById(\"valor2\").value = valorInput1 * 0.57;\r\n break;\r\n case \"3\":\r\n document.getElementById(\"valor2\").value = valorInput1 *0.0086 ;\r\n break;\r\n case \"4\":\r\n document.getElementById(\"valor2\").value = valorInput1;\r\n break; \r\n \r\n } \r\n\r\n } \r\n\r\n\r\n}", "function pintaOptionsCombo(listaColectivos, idcolectivo) {\n\n var s = \"\";\n //Si el colectivo viene null, le pintamos opción en blanco. Si ya tiene valor, no pintamos opción en blanco\n if (idcolectivo == null) \n s += \"<option value=''></option>\";\n for (var i = 0; i < listaColectivos.length; i++) { \n s += \"<option value=\" + listaColectivos[i].t941_idcolectivo;\n if (listaColectivos[i].t941_idcolectivo == idcolectivo)\n {\n s += \" selected= selected\";\n }\n\n s += \">\" + listaColectivos[i].t941_denominacion + \"</option>\"; \n }\n return s;\n}", "function TipoDescuento1(){\n //recuperamos el valor descuento 1 anterior\n var descuento1=document.getElementById(\"tipo_des1\").value;\n \n //recuperamos el sueldo neto del input\n var SueldoNeto=document.getElementById('sueldoNeto').value;\n //si anteriormente ya tenia un valor, debe reestablecer\n if(descuento1 > 0)\n {\n var suma=parseFloat(SueldoNeto) + parseFloat(descuento1);\n document.getElementById(\"sueldoNeto\").value=suma;\n }\n\n //el valor que se ingreso en monto\n var monto= document.getElementById('tipoDescuento1').value;\n document.getElementById(\"tipo_des1\").value=monto;\n //Actualiza el neto a cobrar\n var SaldoNeto= document.getElementById('sueldoNeto').value;\n document.getElementById(\"sueldoNeto\").value=SaldoNeto-monto;\n \n //codigo de descuento la cual guardaremos\n var posicion=document.getElementById('tipodescuento1').options.selectedIndex;\n var codigoDescuento1=document.getElementById('tipodescuento1').options[posicion].value;\n document.getElementById(\"cod_des1\").value=codigoDescuento1;\n \n //guardamos el valor de salario neto(esto se actualizara con cada descuento)\n var sueldoneto=document.getElementById('sueldoNeto').value;\n document.getElementById(\"sal_neto\").value=sueldoneto;\n }", "function revisarDigito( dvr )\n{\ndv = dvr \"\"\nif ( dv != '0' && dv != '1' && dv != '2' && dv != '3' && dv != '4' && dv != '5' && dv != '6' && dv != '7' && dv != '8' && dv != '9' && dv != 'k' && dv != 'K')\n{\nalert(\"Debe ingresar un digito verificador valido\");\nwindow.document.form1.rut.focus();\nwindow.document.form1.rut.select();\nreturn false;\n}\nreturn true;\n}", "function escogerValorMasGrande(elemetos){\n\n}", "function entero(numero){\n return parseInt(numero);\n}", "function comboParceiro() {\r\n\r\n //Criar o HTML (option) para todos os parceiros\r\n let strHtml = \"<option value=''>Escolher</option>\"\r\n for (let i = 0; i < partners.length; i++) {\r\n strHtml += `<option value='${partners[i]._id}'>${partners[i]._name}</option>`\r\n }\r\n let selParceiro = document.getElementById(\"idSelParc\")\r\n selParceiro.innerHTML = strHtml\r\n}" ]
[ "0.63570154", "0.6355307", "0.6221464", "0.62008387", "0.6125581", "0.6115057", "0.6102905", "0.60735846", "0.6062825", "0.6053935", "0.60302675", "0.6024002", "0.6011378", "0.5986135", "0.59816086", "0.59796655", "0.59340286", "0.59290844", "0.5920496", "0.59200454", "0.5916652", "0.5915033", "0.5890988", "0.5889592", "0.58809", "0.58632386", "0.5854204", "0.58530724", "0.58488166", "0.58181906", "0.58099824", "0.5806319", "0.5806291", "0.57925546", "0.5791973", "0.57897335", "0.5778943", "0.57754457", "0.57697505", "0.5762696", "0.5750363", "0.57503", "0.57401127", "0.5728563", "0.57240504", "0.5722725", "0.5715717", "0.5708252", "0.57080007", "0.570564", "0.5699655", "0.56983125", "0.5696619", "0.5685503", "0.56851035", "0.5684914", "0.56738067", "0.56729376", "0.5666443", "0.56659836", "0.5654449", "0.56496674", "0.5647749", "0.56454283", "0.56408644", "0.5639611", "0.5637735", "0.56314415", "0.5619678", "0.5618123", "0.56147057", "0.560347", "0.56028765", "0.56018645", "0.5595342", "0.55920804", "0.5591753", "0.55906016", "0.55859596", "0.5585604", "0.5580819", "0.55797595", "0.5578552", "0.5577644", "0.5566119", "0.5563771", "0.5560286", "0.5548808", "0.55456483", "0.5542814", "0.55342144", "0.5525488", "0.55242074", "0.5521036", "0.55203193", "0.55199015", "0.5504935", "0.5503796", "0.55011314", "0.54912496" ]
0.5626096
68
Checks if user exists
userExists(user) { // Temp variable for storing the user if found let temp = ''; for (let i of this.users) { if (i === user) { console.log('user: ' + user + ' exists'); temp = user; } } let exists = (temp !== '' && temp === user); if(temp === '') console.log('user: ' + user + ' does not exist'); return exists; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkIfUserExists (callback) { \n connection.query(`SELECT * FROM user WHERE userid=${connection.escape(id)}`, (err, res)=>{\n if (err) {message.channel.send(embeds.errorOccured(message, err));}\n callback(res[0] !== undefined); \n });\n }", "doesUserExist(uname){\n\t\treturn db.one(`SELECT * FROM user_id WHERE uname=$1`, uname);\n\t}", "function doesUserExist(req, res, callback) {\n var user = req.body.username,\n pass = req.body.password;\n\n User.find({\n email: user\n }).count(function (err, count) {\n if (count > 0) {\n //username already exists\n console.log(\"Signup Error: \" + user + \" already exists\");\n res.jsonp({\n message: \"This user name already exists\"\n });\n } else {\n //username does not exist, create it\n console.log(\"User does not exist\");\n callback(req);\n res.jsonp({\n message: \"The user has been added\"\n });\n }\n });\n}", "async function checkIfUserExist () {\n try {\n const user = await fetch('https://mern-finalproj-api.herokuapp.com/Help4U/user/check', {\n method: 'POST',\n headers: new Headers({\n 'Content-Type': 'application/json; charset=utf-8'\n }),\n mode: 'cors',\n body: JSON.stringify({ google_id: response.googleId })\n\n }).then(user => user.json());\n\n if (user.status === 200 && user.data !== null) {\n // update admin access token - only for admin API requests\n if (user.data.admin == true) {\n updateAdminAccessToken(response);\n }\n\n setSession(response, user.data);\n history.replace('/home');\n }\n\n // user not exist, signup with google account\n if (user.status === 200 && user.data === null) {\n history.replace('/signup');\n }\n if (user.status === 500) {\n history.replace('/error');\n }\n } catch (e) {\n history.replace('/error');\n }\n }", "function userExists (username, db = connection) {\n return db('users')\n .count('id as n')\n .where('username', username)\n .then((count) => {\n return count[0].n > 0\n })\n}", "function checkIfUserExists(name){\n return Model.userExist(name);\n}", "function isUserExisting(username) {\n return new Promise(async (resolve, reject) => {\n try {\n if(!username) {\n throw new IncompleteDataError('The username is required to check if the user exists.');\n }\n\n const queryString = `SELECT COUNT(username) \n FROM vze_user \n WHERE username='${username}'`;\n\n const data = await helper.executeQuery(queryString);\n let isUserExisting = (data['count'] > 0);\n\n console.log('User \\'%s\\' exists: ', username, isUserExisting); \n resolve(isUserExisting);\n } catch(error) {\n reject(error);\n };\n });\n}", "async function userExist(user_id){\r\n const existing_in_users_table = await DButils.execQuery(`SELECT * FROM dbo.Users WHERE userId='${user_id}'`);\r\n if (existing_in_users_table.length==0){\r\n return false\r\n }\r\n return true\r\n}", "function doesUserExist(username, cb) {\n const query = `SELECT * FROM users WHERE username = '${username}'`;\n let sqlCallback = data => {\n //calculate if user exists or assign null if results is null\n const doesUserExist =\n data.results !== null ? (data.results.length > 0 ? true : false) : null;\n //check if there are any users with this username and return the appropriate value\n cb(data.error, doesUserExist);\n };\n connection.query(query, sqlCallback);\n}", "function userExists (userName, db = connection) {\n return db('users')\n .count('id as n')\n .where('user_name', userName)\n .then(count => {\n return count[0].n > 0\n })\n}", "async function checkUserExists(req, res, next) {\n try {\n const user = await UsersService.getById(\n req.app.get(\"db\"),\n req.params.user_id\n );\n\n if (!user)\n return res.status(404).json({\n error: `User doesn't exist`\n });\n\n res.user = user;\n next();\n } catch (error) {\n next(error);\n }\n}", "function checkIfUserExists(userId, response) {\n var usersRef = database.ref(USERS_LOCATION);\n usersRef.child(userId).once('value', function (snapshot) {\n var exists = (snapshot.val() !== null);\n //console.log(exists);\n userExistsCallback(exists, response);\n });\n }", "userExists(user) {\n return this.users.indexOf(user)!==-1;\n }", "function userExists(username){\n\treturn username.toLowerCase() == 'admin';\n}", "function exists(user) {\n\tvar flag_e =false;\n\tfirebase.database().ref('users/' + user).once('value', function(snap) {\n\t\tif(snap.exists()){\n\t\t\tflag_e = true;\n\t\t}\n\t});\n\treturn flag_e;\n}", "async function checkUserExists(userRef) {\n // grab the user doc\n const userDoc = await userRef.get();\n // return true/false\n return userDoc.exists;\n}", "function userExists(username, callback){\n db.get(\"SELECT * FROM users WHERE username=?\",[username],function(err,res){\n if (callback) callback(res);\n if (res === undefined){\n console.log('dis undefined');\n return false\n }\n else return true;\n })\n}", "function checkIfUsernameExist(req, res, next) {\n models.user.findOne({\n where: {\n 'username':req.body.username\n }\n }).then( ( user) => {\n if (user) {\n res.status(400).send({error: \"The username is in use.\"});\n }\n });\n next();\n }", "async exists(email) {\n\n // parameter email doesn't exist\n if (!this._parameterExists(email)) {\n return false;\n }\n\n try {\n // user exists\n if (await this._count('users', 'email', { email }) === 1) {\n return true;\n }\n\n // user doesn't exist\n return false;\n } catch (err) {\n this.logger.error(err);\n return false;\n }\n }", "exists(req, res) {\n let id = req.params.id;\n\n this.userdao.exists(id)\n .then(this.common.existsSuccess(res))\n .catch(this.common.findError(res));\n }", "function tenantExists(tenant, callback) {\n // Create URL for user-manager request\n var userExistsUrl = userURL + '/pool/' + tenant.userName;\n\n // see if the user already exists\n request({\n url: userExistsUrl,\n method: \"GET\",\n json: true,\n headers: {\"content-type\": \"application/json\"}\n }, function(error, response, body) {\n if (error) {\n callback(false);\n } else if ((response != null) && (response.statusCode == 400)) {\n callback(false);\n } else {\n if (body.userName === tenant.userName) {\n callback(true);\n } else {\n callback(false);\n }\n }\n });\n}", "async function userExists(usr, pwd) {\n return await userModel.findOne({usuario: usr, password: pwd})\n}", "function userExists(username) {\n console.log(\"Search if user exists\", username)\n return findUserByName(username)\n .then(() => Promise.resolve(true))\n .catch(err => {\n if (err === exports.ERR_NOT_FOUND) {\n return Promise.resolve(false)\n }\n return Promise.reject(err)\n })\n}", "function checkUserExists(req, res, next){\r\n if(!req.body.name){\r\n return res.status(400).json({ error: 'User name is required'});\r\n }\r\n return next();\r\n}", "function doesUserExist (userList) {\n if (userList.data.length === 0) {\n throw new Error('no such user exists');\n }\n}", "hasUser(userId) {\n const result = this.data[userId];\n if (!result) return false;\n return true\n }", "function userExists(username, callback) {\n pool.getConnection(function(err, connection) {\n if(err) {\n connection.release();\n return callback(err);\n }\n\n connection.query('SELECT * FROM `User` WHERE `username` = ? LIMIT 1', [username], function(err, rows) {\n if(err) {\n connection.release();\n return callback(err);\n }\n\n // Release the connection\n connection.release();\n\n // Run callback\n callback(null, rows.length>0);\n });\n });\n}", "function existingUser(value, callback) {\n User.findOne({ '_id': value }, function (err, user){\n if (user){\n callback(true);\n } else {\n callback(false);\n }\n });\n}", "function doesUserExist(username) {\n\n return User.find({'username': username}, 'username password',{})\n // function (err, users) {\n // let doesUserExist = users !== null ? users.length > 0 : null;\n // if (err)\n // console.log(err+\" error\");\n // return reject(err);\n // console.log(doesUserExist+\" exists\");\n // resolve (doesUserExist)\n // });\n}", "function doesExist(newUser){\n\tuserObjects.forEach(user => {\n\t\tif(user.username === newUser.username){\n\t\t\treturn true\n\t\t}\n\t})\n\treturn false;\n}", "static async exists(email){\n let user = await User.findOne({where: {email: email}});\n return user !== null\n }", "function checkUserExists(username) {\n return new Promise((resolve, reject) => {\n User.findOne({\n where: {\n username: username\n }\n }).then(user => {\n if (user === null) {\n reject(new Error('no user exists by this name'));\n } else {\n resolve(user);\n }\n }).catch(err => {\n console.log(\"checkUserExists\", err);\n })\n });\n}", "function user_exists(email){\n\tvar user_array = get_user_array();\n\tif(user_array.length > 0){\n\t\tfor(var i=0; i<user_array.length; ++i){\n\t\t\tif(user_array[i].email == email) return true;\n\t\t}\n\t}\n\treturn false;\n}", "function doesUserExist(userName){\n\tvar logonFile = fs.readFileSync(USER_PATH + USER_INFO_FILE_NAME);\n\tvar users = JSON.parse(logonFile);\n\tvar exist = false;\n\n\tusers.forEach(function(user){\n\t\tif (user.userName.localeCompare(userName) === 0){\n\t\t\texist = true;\n\t\t}\n\t});\n\treturn exist;\n}", "function userExists(email){\n for(user in users){\n if(users[user].email === email){\n return true;\n }\n }\n return false;\n}", "async getExistingUser () {\n\t\tconst { email } = this.request.body.user;\n\t\tif (!email) {\n\t\t\tthrow this.errorHandler.error('parameterRequired', { info: 'user.email' });\n\t\t}\n\t\tconst users = await this.data.users.getByQuery(\n\t\t\t{\n\t\t\t\tsearchableEmail: decodeURIComponent(email).toLowerCase()\n\t\t\t},\n\t\t\t{\n\t\t\t\thint: UserIndexes.bySearchableEmail\n\t\t\t}\n\t\t);\n\t\tthis.existingUser = users.find(user => {\n\t\t\treturn (\n\t\t\t\t!user.get('deactivated') &&\n\t\t\t\t(user.get('teamIds') || []).length === 0\n\t\t\t);\n\t\t});\n\t}", "checkUsername(req, res) {\n const { username } = req.params;\n // Quick client-side username validation\n if (validateUser({ username }).length) {\n res.json({ data: { available: false, exists: false } });\n // Check for conflicts with other users\n } else {\n getAuth0User.byUsername(username)\n .then(user => res.json({ data: {\n available: !user,\n exists: !!user,\n } }));\n }\n }", "function userExists(userName, usersTable){\n\tif (usersTable[\"userName\"]) return true;\n\t\n\tlet userArray = Object.keys(usersTable);\n\tfor (let i = 0; i < userArray.length; i++) {\n\t\tif (sameUser(userName, userArray[i], usersTable))\n\t\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "function usernameExists(username) {\r\n\tUser.findOne({\r\n\t\twhere : {\r\n\t\t\tusername : username\r\n\t\t}\r\n\t}).then((user)=>{\r\n\t\treturn user;\r\n\t});\r\n}", "function checkIfUserAlreadyExists(req, res, next) {\n\tlet userEmail = req.body.email\n\n\tlet findUser = `SELECT COUNT(*) AS count FROM users WHERE email=\"${userEmail}\"`;\n\n\tconn.query(findUser, (err, result) => {\n\t\tif (err) {\n\t\t\tres.status(500).send({\n\t\t\t\t\"error\": \"Something Went Wrong\"\n\t\t\t})\n\t\t}\n\n\t\tif (result[0].count == 0) {\n\t\t\tnext()\n\t\t}\n\t\telse {\n\t\t\tres.status(200).send({\n\t\t\t\tsuccess: false,\n\t\t\t\t\"message\": \"User Already Exists With This Email.\"\n\t\t\t})\n\t\t}\n\t})\n}", "function checkUser(users){\n\t\tif(users[0]){\n\t\t\tconsole.log('tried to register an existing user');\n\t\t\tres.send('you tried a bad user, you are a failure');\n\t\t}\n\t\telse database.insertUser(sess.username, sess.pswd, function (response){\n\t\t\tif(response.result.ok)res.send('everythingOK');\n\t\t\telse console.log('error adding new user');\n\t\t});\n\t}", "async checkUsername({request, response}) {\n let exist = await User.findBy('username', request.input('username'));\n return response.send(!!exist);\n }", "function checkUser(potentialUserName) {\n Meteor.call('users.checkUsername', {potentialUserName}, (error, count) => {\n if (error) {\n Bert.alert(error.reason, 'danger');\n } else {\n console.log(count)\n if (count > 0) {\n setUsernameFalse(potentialUserName)\n return false\n } else {\n setUsernameTrue(potentialUserName)\n return true\n }\n }\n });\n }", "function checkUser(userId){\n console.log(\"CouchDBServices.checkUser()\");\n var q = $q.defer();\n db.query('user/userExists', {\n key : userId,\n include_docs : false,\n limit : 1\n }).then(function (res) {\n console.log(\"success: \"+res);\n q.resolve(res);\n }).catch(function (err) {\n q.reject(err);\n console.log(\"err: \"+err);\n });\n return q.promise;\n }", "function userProfileExists(uid) {\n\n var defer = $q.defer();\n var result = false;\n\n firebase.database().ref('users/' + uid).once('value', function(snapshot) {\n if (snapshot.val() === null) {\n\n result = false;\n\n\n } else {\n\n result = true;\n }\n\n defer.resolve(result);\n\n })\n\n return defer.promise;\n\n }", "static async isRegisteredUsername(username) {\n let res = await db.query('SELECT * FROM users WHERE username = $1', [username]);\n return res.rowCount > 0;\n }", "function checkIfUserExist() {\n user\n .findOne()\n .or([{ email: email }, { username: username }])\n .exec(function(err, result) {\n if (err) throw err;\n if (result === [] || result === null || result === undefined) {\n // * SAVE NEW USER\n var userInstance = new user({\n firstName: firstName.toLowerCase(),\n lastName: lastName.toLowerCase(),\n username: username,\n email: email,\n password: password,\n role: \"user\"\n });\n\n // * HASH PASSWORD AND SAVE PROFILE\n bcrypt.genSalt(saltRounds, function(err, salt) {\n bcrypt.hash(password, salt, function(err, hash) {\n userInstance.password = hash;\n userInstance\n .save()\n .then(result => {\n req.session.userId = result._id;\n req.session.role = result.role;\n req.session.userName = result.username;\n\n // * CREATE POSTER PROFILE\n\n poster\n .findOne( { username: username } )\n .exec(function(err, resultPoster) {\n if (err) throw err;\n if (resultPoster === [] || resultPoster === null || resultPoster === undefined) {\n // * SAVE NEW USER\n var posterInstance = new poster({\n ownerUserName: username,\n });\n\n posterInstance\n .save()\n .then(resultPoster => {\n console.log(resultPoster);\n return res.redirect(\"/\");\n })\n .catch(function(err) {\n console.log(err);\n });\n }\n });\n\n })\n .catch(function(err) {\n console.log(err);\n });\n });\n });\n } else {\n let flashError = \"\";\n if (result.username === username) {\n flashError = \"Ce pseudo est déjà utilisé.\";\n }\n if (result.email === email) {\n flashError = \"Cet email est déjà utilisé.\";\n }\n if (result.username === username && result.email === email) {\n flashError = \"Ce pseudo et cet email sont déjà utilisés.\";\n }\n req.flash(\n \"wrong signup\",\n flashError + \" Veuillez réessayer.\"\n );\n return res.redirect(\"/account/signup\");\n }\n });\n }", "existUser(userId) {\n userId = userId || this.app_user.userId;\n return new Promise(resolve => {\n console.log('existUser: ' + userId);\n this.getUser(userId)\n .then(user_data => {\n resolve(user_data);\n })\n .catch(err => {\n console.log('existUser: Error', err);\n resolve(false);\n });\n });\n }", "function checkUser() {\n\tif (user) {\n\t\tconsole.log(\"Signed in as user \" + user.email);\n\t\t// console.log(user);\n\t\thideLoginScreen();\n\t} else {\n\t\tconsole.log(\"No user is signed in\");\n\t}\n}", "function checkRegistrationUser(username) {\n var blank = isBlank(username);\n var element = document.getElementById('username');\n var existence;\n if(blank) {\n\texistence = false;\n\tinputFeedback(element, existence, blank);\n } else {\n\texistence = checkUserExistence(username);\n\tinputFeedback(element, existence, blank);\n }\n}", "function existsUsername(user_input){\n for(let i in users){\n let user = users[i];\n if(user_input === user.username){\n return true;\n }\n }\n return false;\n}", "isUserLoggedIn() {\n //console.log(`User registered button should be present`);\n return this.userRegisteredButton.isExisting();\n }", "async exists(email, options = {}) {\n options = this.addAccessToken(options);\n options.params = { email };\n\n let response;\n try {\n response = await this.http.get(`/users/`, options);\n } catch (e) {\n return false;\n }\n\n return R.pathOr(false, [\"data\", \"id\"], response);\n }", "function check_if_user_is_known(doc) {\n\tlog.info(\"Checking is user %s is known.\", doc.owner);\n\treturn new Promise(function(resolve,reject) {\n\t\tusers.findOne({ login: doc.owner }, function(err,user) {\n\t\t\tlog.info(\"Checked if the user %s is known.\", doc.owner);\n\t\t\tif(err)\n\t\t\t\tthrow err;\n\t\t\tif(user)\n\t\t\t\tresolve(true);\n\t\t\telse\n\t\t\t\tresolve(false);\n\t\t});\n\t});\n}", "function isNewUser(id) {\n return users[id] == undefined;\n}", "function checkUser(username,pass,email,role){\n\tdatabase.ref('/users/'+username).once('value').then(function(ss){\n\t\tif(ss.val())\n\t\t{\n\t\t\tswal('Username already exist' ,'' ,'error');\n\t\t}\n\t\telse \n\t\t{\n\t\t\tregisterUser(username,pass,email,role);\n\t\t\tswal('Register success' ,'' ,'success').then((result) => {\n\t\t\t\twindow.location.reload();\n\t\t\t});\n\t\t}\n\t});\n}", "async function CheckUserExistence(userID) {\n try {\n await client.query(\"BEGIN\");\n await client.query(`INSERT INTO ${userDb}(discord_id) VALUES ($1)`, [userID])\n await client.query(\"COMMIT\");\n } catch (e) {\n await client.query(\"ROLLBACK\");\n }\n}", "function isUsernameAvailable(username) {\n userService.isUsernameAvailable(username).then(\n function (data) {\n validator('existLogin', data.data);\n })\n }", "static async checkUser(userId) {\n const query = 'SELECT * FROM \"Users\" WHERE user_id = $1';\n const user = await pool.connect(query, [userId]);\n if (user[0].is_admin === true) {\n return true;\n }\n return false;\n }", "async function isUserExist(email){\n const result = await User.find({email : email});\n if(result.length == 0)\n return false;\n\n return result[0];\n}", "function checkIfUserExists(name, redisClient) {\n return new Promise((resolve) => {\n redisClient.get(`${USER_PREFIX}${name}`, (err, res) => {\n resolve(Boolean(res));\n });\n });\n}", "function userExists(user) {\n for (var i = 0, len = registeredUsers.length; i < len; i++) {\n if (user.id === registeredUsers[i].id) {\n logger.log(\"User \"+user.id.yellow.bold+\" already registered, updating his socket \"+user.socket.green.bold);\n registeredUsers[i].socket = user.socket;\n return true;\n }\n }\n return false;\n }", "checkUsername(req, res, next){\n\n db.query(queries.selectUserWithUsername, [req.body.username], (err, results, fields) => {\n\n if (err) throw err;\n \n if (results.length === 0){\n req.usernameExists = false;\n } else {\n req.usernameExists = true;\n }\n next();\n });\n }", "async function userIsExist(userName) {\r\n try {\r\n const user = await User.findOne({\r\n where: {\r\n userName,\r\n },\r\n });\r\n if (user) {\r\n return user.toJSON();\r\n }\r\n return false;\r\n } catch (error) {\r\n console.error(error.message);\r\n return false;\r\n }\r\n}", "function isValidUser(userObj){\n if(!userObj){\n return false;\n }\n if(!userObj.username || !users.hasOwnProperty(userObj.username)){\n return false;\n }\n return true;\n}", "userIDExists(userID, callback) {\n let query = \"select count(*) as numberOfUsers from user where userID = \" + userID + \";\";\n this.selectQuery(query, (result) => {\n //wenn die Anzahl der user mit der angegebenen UserID 1 beträgt existiert dieser User -> true\n //ansonsten (bei 0) existiert dieser User nicht -> false\n callback(result[0].numberOfUsers == 1);\n });\n }", "function checkExistingAuth() {\n // const userRecord = configstore.get('user');\n // const tokens = configstore.get('tokens');\n // console.log({ tokens });\n //\n // if (userRecord && tokens) throw new Error('You are alread logged in!');\n\n return true;\n}", "function checkusername(req, res, next){\n var uname = req.body.uname;\n var checkNameExist = userModel.findOne({username: uname});\n checkNameExist.exec((err, data)=>{\n if(err) throw err;\n if(data){\n return res.render('signup', { title: 'Password Management System', msg: 'Username Already Exist' });\n }\n next();\n })\n }", "function userIsUnique(req, res, next) {\n // Check if user already exists in database\n db.none('SELECT password FROM users WHERE email = $1', req.body.email)\n .then(function (data) {\n // User doesn't exist, let's register it\n registerUser(req, res, next);\n })\n .catch(function (error) {\n // User is not unique, let's return error message\n return res.status(200)\n .json({\n status: 'errors',\n errors: [{\n param: 'email',\n msg: 'E-mail address is not unique!'\n }]\n });\n });\n}", "function checkIfUserExists(userId, authData, cb) {\n\n\tvar usersRef = new Firebase(\"https://phoodbuddy.firebaseio.com/users\");\n\tusersRef.once('value', function(snapshot){\n\t\tif(snapshot.hasChild(userId))\n\t\t{\n\t\t\tconsole.log(\"User Already Exists\");\n\t\t\tcb(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar ref = new Firebase(\"https://phoodbuddy.firebaseio.com\");\n\n\t\t\tvar plannerJsonInit = {sunday:{\"breakfast\":{name:\"\",recipeId:\"\"},\"lunch\":{name:\"\",recipeId:\"\"},\"dinner\":{name:\"\",recipeId:\"\"}},monday:{\"breakfast\":{name:\"\",recipeId:\"\"},\"lunch\":{name:\"\",recipeId:\"\"},\"dinner\":{name:\"\",recipeId:\"\"}},tuesday:{\"breakfast\":{name:\"\",recipeId:\"\"},\"lunch\":{name:\"\",recipeId:\"\"},\"dinner\":{name:\"\",recipeId:\"\"}},wednesday:{\"breakfast\":{name:\"\",recipeId:\"\"},\"lunch\":{name:\"\",recipeId:\"\"},\"dinner\":{name:\"\",recipeId:\"\"}},thursday:{\"breakfast\":{name:\"\",recipeId:\"\"},\"lunch\":{name:\"\",recipeId:\"\"},\"dinner\":{name:\"\",recipeId:\"\"}},friday:{\"breakfast\":{name:\"\",recipeId:\"\"},\"lunch\":{name:\"\",recipeId:\"\"},\"dinner\":{name:\"\",recipeId:\"\"}},saturday:{\"breakfast\":{name:\"\",recipeId:\"\"},\"lunch\":{name:\"\",recipeId:\"\"},\"dinner\":{name:\"\",recipeId:\"\"}},sunday:{\"breakfast\":{name:\"\",recipeId:\"\"},\"lunch\":{name:\"\",recipeId:\"\"},\"dinner\":{name:\"\",recipeId:\"\"}}};\n\n\t\tref.onAuth(function(authData)\n\t\t{\n\t\t\tif (authData)\n\t\t\t{\n\t\t\t\tconsole.log(\"This is a new user!\");\n\t\t\t\t// save the user's profile into the database so we can list users,\n\t\t\t\tref.child(\"users\").child(authData.uid).set({\n\t\t\t\t\tprovider: authData.provider,\n\t\t\t\t\tname: getName(authData), // retrieves name from payload\n\t\t\t\t\tprofile: {\n\t\t\t\t\t\tfname : \"\",\n\t\t\t\t\t\tlname : \"\",\n\t\t\t\t\t\temail : \"\", \n\t\t\t\t\t\tcity : \"\",\n\t\t\t\t\t\tstate : \"\", \n\t\t\t\t\t\tcountry : \"\",\n\t\t\t\t\t\tstreet : \"\", \n\t\t\t\t\t\tage : \"\",\n\t\t\t\t\t\tfavdish : \"\",\n\t\t\t\t\t\tfavdrink : \"\",\n\t\t\t\t\t\tgender : \"\",\n\t\t\t\t\t\tabout : \"\"\n\t\t\t\t\t},\n\t\t\t\t\tallergies: {\n\t\t\t\t\t\tcorn : false,\n\t\t\t\t\t\tegg : false,\n\t\t\t\t\t\tfish : false,\n\t\t\t\t\t\tglutten : false,\n\t\t\t\t\t\tmilk : false,\n\t\t\t\t\t\tpeanut : false,\n\t\t\t\t\t\t\"red-meat\" : false,\n\t\t\t\t\t\tsesame : false,\n\t\t\t\t\t\t\"shell-fish\" : false,\n\t\t\t\t\t\tsoy : false,\n\t\t\t\t\t\t\"tree-nut\" : false\n\t\t\t\t\t},\n\t\t\t\t\ttaste:{\n\t\t\t\t\t\tbitter: 2.5,\n\t\t\t\t\t\tsalty : 2.5,\n\t\t\t\t\t\tsour : 2.5,\n\t\t\t\t\t\tspicy : 2.5,\n\t\t\t\t\t\tsweet : 2.5\n\t\t\t\t\t},\n\t\t\t\t\thealth:{\n\t\t\t\t\t\thypertension : false,\n\t\t\t\t\t\thypotension : false,\n\t\t\t\t\t\t\"high-cholestorol\": false,\n\t\t\t\t\t\tdiabetes : false,\n\t\t\t\t\t\tvegetarian: false\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tref.child(\"grocery\").child(authData.uid).set({\n\t\t\t\t\t\"bakery\":{\n\t\t\t\t\t\tname:\"Bakery\"\n\t\t\t\t\t},\n\t\t\t\t\t\"bakingSpices\":{\n\t\t\t\t\t\tname: \"Baking and Spices\"\n\t\t\t\t\t},\n\t\t\t\t\t\"cannedGoods\":{\n\t\t\t\t\t\t\"name\": \"Beverages\"\n\t\t\t\t\t},\n\t\t\t\t\t\"cereals\":{\n\t\t\t\t\t\t\"name\": \"Cereals\"\n\t\t\t\t\t},\n\t\t\t\t\t\"condiments\":{\n\t\t\t\t\t\tname:\"Condiments\"\n\t\t\t\t\t},\n\t\t\t\t\t\"dairy\":{\n\t\t\t\t\t\tname: \"Dairy\"\n\t\t\t\t\t},\n\t\t\t\t\t\"frozen\":{\n\t\t\t\t\t\t\"name\": \"Frozen\"\n\t\t\t\t\t},\n\t\t\t\t\t\"meats\":{\n\t\t\t\t\t\t\"name\": \"Meats\"\n\t\t\t\t\t},\n\t\t\t\t\t\"miscellaneous\":{\n\t\t\t\t\t\t\"name\": \"Miscellaneous\"\n\t\t\t\t\t},\n\t\t\t\t\t\"produce\":{\n\t\t\t\t\t\t\"name\": \"Produce\"\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tref.child(\"planner\").child(authData.uid).set(plannerJsonInit);\n\t\t\t\tcb(true);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcb(false);\n\t\t\t\tconsole.log(\"invalid payload\");\n\t\t\t}\n\t\t});\n\t\t}\n\t});\n}", "function check(email, username){\n var usrobj = userobj;\n var usrs = usrobj.users;\n //Checks login info with all objects of signup json object\n for (let index = 0; index < usrs.length; index++) {\n const obj = usrs[index];\n if(obj.email_address == email || obj.username == username) {\n return true;\n }\n }\n return false;\n}", "validate_user_exist(username){\n let user_exist = EXIST_ASYNC(username, function(err, response){\n if (err) {\n console.error(err);\n }\n });\n return user_exist;\n }", "function usernameAlreadyExists(username){\n return false;\n }", "userEnUso(nick)\n {\n const user = this.usuarios.find(usuario => usuario.nickName == nick)\n return user != undefined;\n }", "function userExist(login, callback){\n /*connection.connect(function(err) {\n if (err) {\n console.error('error connecting: ' + err.stack);\n return;\n }\n\n console.log('connected as id ' + connection.threadId);\n });*/\n var sql = \"SELECT count(*) as nbUser FROM users WHERE users.`login` = ?\";\n connection.query(sql,\n [login],\n function (error, results, fields) {\n if (error) {\n console.log(error);\n throw error;\n }\n //mainWindow.webContents.send('user-exist', results)\n //console.log(results[0].nbUser);\n //console.log(error);\n user_exist = false;\n //console.log(\"user.exist : function => \" + results[0].nbUser);\n if(results[0].nbUser >= 1){\n user_exist = true;\n }\n //user.exist = user_exist;\n return callback(user_exist);\n });\n //connection.end();\n}", "userExists(){\n // set Status for previous view in case server validation failed \n this.displayMode = 'none';\n this.isAgreed = false;\n // add xhr message into form error validation message object - will be shown on screen\n for(let i in this.messageService.xhr.warn){\n this.addform.emailid.$setValidity(i, !this.messageService.xhr.warn[i]);\n }\n\n this.abortForm = true;\n }", "function userExists(userName, config) {\n return __awaiter(this, void 0, void 0, function () {\n var wallet;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, getWallet(config)];\n case 1:\n wallet = _a.sent();\n return [2 /*return*/, wallet.exists(userName)];\n }\n });\n });\n}", "async checkUserExists(email) {\n return new Promise(async (resolve, reject) => {\n try {\n const user = await UserModel.findOne({ email });\n resolve(user);\n } catch (err) {\n reject(err);\n }\n });\n }", "function createUser(){\n var info = getUserInfo();\n if (info.user.name === \"\" || info.user.username === \"\" || info.user.password === \"\"){\n alert(\"Must enter a Name, Username and Password\");\n }else{\n createUserAjax(info);\n }\n }", "async function validateUser(req, res, next){\n const username = req.body.username;\n const email = req.body.email;\n\n const usernameExists = await Users.findOne({where: {username:username}});\n const emailExists = await Users.findOne({where: {email:email}});\n\n if (usernameExists || emailExists){\n res.status(400).send({msg:'Username or email already exists'}); \n } else {\n next()\n }\n}", "isUser(userName, pass) {\n return this.users.find((u) => {\n return u.name == userName && u.pass == pass;\n });\n }", "function checkUserStatus() {\n if (firebase.auth().currentUser === null) { loadLoginPage(); }\n else { loadHomePage(); }\n }", "function checkUser (name, pass){\n for(var i=0;i<student.users.length;i++)\n {\n if (student.users[i].name==name && student.users[i].pwd==pass)\n { \n console.log(student.users[i].name+\" Exists\");\n return true;\n }\n }\n console.log(\"Check Username and Password\")\n return false;\n}", "function checkIfUserExists(userName){\n return user_Names[userName];\n}", "isUserExistenceAndUnique(username) {\n var connectionDB = this.connectDB()\n var checkExistenceAndUniqueProcess = connectionDB.then((connection) => {\n return new Promise((resolve, reject) => {\n connection.query('SELECT id FROM ' + dbTesterInfo +\n ' WHERE testerID = ?', username, (err, results, fields) => {\n\n if (!err) {\n if(results.length === 1) {\n connection.release()\n resolve()\n } else if (results.length === 0){\n connection.release()\n reject({err: {msg: 'This username does not exist!'}})\n } else {\n connection.release()\n reject({err: {msg: 'This username is duplicated!Please remove!'}})\n }\n } else {\n connection.release()\n reject({err: {msg: 'Lost database connection!'}})\n }\n })\n })\n }).catch((err) => {\n return Promise.reject(err)\n })\n return checkExistenceAndUniqueProcess\n }", "user(cb) {\n svclib.KVDataStore.get([{\n table: 'email_to_user',\n key: email,\n }], (err, items) => {\n if (err) return cb(err);\n if (!items[0].exists) {\n return cb(new Error('That user does not exist.'));\n }\n const userId = items[0].value.userId;\n svclib.KVDataStore.get([{\n table: 'users',\n key: _.toString(userId),\n }], (err, items) => {\n if (err) return cb(err);\n if (!items[0].exists) {\n return cb(new Error('That user does not exist.'));\n }\n return cb(null, items[0]);\n });\n });\n }", "function IsUseralreadyExist(user1)\n {\n for(var i=0;i<allUsers.length;i++)\n {\n if(allUsers[i].username==user1.username&&allUsers[i].userpassword==user1.userpassword)\n {\n alert(\"User already exit try Different Username\");\n return 0;\n }\n }\n return 1;\n\n }", "function isUsernameTaken(){\n return new Promise(function(resolve, reject){\n mysql.pool.getConnection(function(err, connection){\n if(err){return reject(err)};\n \n connection.query({\n sql: 'SELECT username FROM deepmes_auth_login WHERE username=?',\n values: [fields.username]\n }, function(err, results){\n if(err){return reject(err)};\n \n if(typeof results[0] !== 'undefined' && results[0] !== null && results.length > 0){\n let usernameTaken = 'Username is already taken.';\n reject(usernameTaken);\n } else {\n resolve();\n }\n\n });\n\n connection.release();\n\n });\n });\n }", "userPresent(username){\n console.log(\"userPreesent called\");\n \n if (this.users.length > 0) {\n for (var i =0; i < this.users.length; i++){\n if (this.users[i] === username){\n return true;\n }\n }\n }\n return false;\n }", "_checkUserExist (req, res, next) {\n Models.users.findOne({\n where: {\n email: req.body.email\n }\n }).then(function (result) {\n if (!result) {\n let error = new Error();\n error.message = \"User with this email does not exist\";\n error.status = 404;\n return next(error);\n }\n\n res.locals.user = result;\n next();\n })\n .catch(next);\n }", "function isUserPresent(response) {\n\n if(response) {\n\n UserService.setCurrentUser(response);\n\n // if success from user present change url to profile\n $location.url(\"/profile\");\n }\n }", "async checkForUser(){\n\n try{\n let results = await this.getUsers();\n //console.log(results)\n for(let i = 0; i < results.length; i++){\n if(results[i].FirstName === this.firstName && results[i].LastName === this.lastName ){\n console.log(\"Userfound\")\n console.log(results[i])\n return true\n }\n }\n console.log(\"Preparing to create new User\")\n return false\n }catch(e){\n console.error(e)\n }\n \n }", "function register (req, res, next) {\n users.exists(req.body.username)\n .then(exists => {\n if (exists) {\n return res.status(400).send({message: 'User exists'})\n }\n users.create(req.body.username, req.body.password)\n .then(() => next())\n })\n .catch(err => {\n res.status(400).send({message: err.message})\n })\n}", "async function auth(username, password)\n{\n var found = await userModel.exists(\n {\n username: username,\n password: password\n }\n );\n\n if (!found)\n {\n throw 'Incorrect username or password.';\n }\n\n return found;\n}", "function userExist(username) {\n return knex(TABLE_NAME)\n .count('id as n')\n .where({ username: username })\n .then((count) => {\n console.log('count in userQueries', count)\n return count[0].n > 0\n });\n}", "isUsernameAvailable(username) {\n return __awaiter(this, void 0, void 0, function* () {\n if (username == null) {\n throw new nullargumenterror_1.NullArgumentError('username');\n }\n return this.users.find(u => u.username == username) != null;\n });\n }", "handleSignUp() {\n const usersFound = firebase.database().ref('Usernames/').orderByKey().equalTo(this.state.username);\n usersFound.once('value', (snapshot) => {\n if (snapshot.val() !== null) {\n // username already exists, ask user for a different name\n console.log(\"username already exists\");\n this.setState({ errorMessage: \"Username already exists\" });\n }\n else {\n //username does not yet exist, go ahead and add new user\n console.log(\"username does not yet exist\");\n firebase\n .auth()\n .createUserWithEmailAndPassword(this.state.email, this.state.password)\n .then(() => this.createUser(this.state.username, this.state.email))\n .then(() => this.props.navigation.navigate('Login'))\n .catch(error => this.setState({ errorMessage: error.message }))\n }\n })\n }", "function isAuthenticated({ usuario, senha }) {\r\n return userdb.users.findIndex(user => user.usuario === usuario && user.senha === senha) !== -1\r\n }", "function userCheck(req, res, next) {\n if(new ObjectId(req.params.user_id).equals(req.user._id)){\n next();\n }else {\n res.status(401).send('You trying to access others data');\n }\n }", "function validateUser(req, username, password, done){\r\n var db = new sqlite3.Database(__dirname + '/db/blog.db');\r\n // select user from db based on username\r\n db.get ('SELECT userId, userName, password FROM user WHERE deleted IS NULL AND userName = ?', username, function(err, row){\r\n // if user does not exist from the database return false, else get the user\r\n if(!row){\r\n return done(null, false, req.flash('error', 'Incorrect Username or Password'));\r\n } else {\r\n var user = row;\r\n if(user.password == password){\r\n return done(null, user);\r\n }\r\n return done(null, false, req.flash('error', 'Incorrect Username or Password'));\r\n }\r\n });\r\n}" ]
[ "0.79687506", "0.7584125", "0.75582564", "0.74154276", "0.7377348", "0.735639", "0.73032147", "0.7255049", "0.72392005", "0.7198557", "0.7176431", "0.71550107", "0.71477497", "0.7145939", "0.7123984", "0.711027", "0.7105413", "0.7101344", "0.70521605", "0.70515674", "0.704523", "0.70403206", "0.6985577", "0.69619673", "0.69595385", "0.69563156", "0.6952918", "0.69343615", "0.69292617", "0.6888164", "0.68498874", "0.6815122", "0.6801826", "0.6781581", "0.6779011", "0.67738765", "0.67719954", "0.67681575", "0.6739884", "0.67255145", "0.66875374", "0.6655471", "0.6647105", "0.6638132", "0.6630463", "0.661951", "0.66150904", "0.6598992", "0.65982974", "0.65963715", "0.6586059", "0.6564811", "0.65418065", "0.65275353", "0.65197337", "0.6518731", "0.65127766", "0.64999866", "0.64947826", "0.64675105", "0.64637655", "0.6458967", "0.6457259", "0.64557266", "0.64258677", "0.6370741", "0.63580906", "0.6354327", "0.6336141", "0.6334626", "0.6330967", "0.6329714", "0.6323856", "0.6307746", "0.6300038", "0.6289758", "0.628581", "0.6283247", "0.6281621", "0.62785035", "0.6271695", "0.6266518", "0.62585235", "0.6256472", "0.6245362", "0.6242912", "0.62416977", "0.6221351", "0.62116647", "0.6208628", "0.6208246", "0.6201356", "0.6194998", "0.6193194", "0.6192432", "0.6192212", "0.6190539", "0.6178184", "0.6171078", "0.61552113" ]
0.6704347
40
Gets index of an element in an array
idx(element, array) { let cont=0; for (let i of array) { if (i === element) { return cont; } cont += 1; } return cont; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function indexOfArray(arr,index){\r\n\treturn arr[index]\r\n}", "function indexOfArray(arr,i){\n \n return arr[i];\n }", "function getIndex (item, array) {\n for (var i = 0; i < array.length; i++){\n if (item==array[i][1]){\n return i;\n }\n }\n return undefined;\n }", "function Array_IndexOf (arr, elem) \r\n\t\t{\r\n\t\t\tvar len = arr.length;\r\n\t\r\n\t\t\tvar from = Number(arguments[2]) || 0;\r\n\t\t\tfrom = (from < 0) ? Math.ceil(from) : Math.floor(from);\r\n\t\t\tif (from < 0) {\r\n\t\t\t\tfrom += len;\r\n\t\t\t}\r\n\t\r\n\t\t\tfor (; from < len; from++) {\r\n\t\t\t\tif (from in arr && arr[from] === elem) {\r\n\t\t\t\t\treturn from;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\treturn -1;\r\n\t\t}", "function arrayIndex(item, array) {\r\n var i, len = array.length;\r\n\r\n for (i = 0; i < len; ++i) {\r\n if (array[i] === item) {\r\n return i;\r\n }\r\n }\r\n return null;\r\n }", "function indexOf(arr, el) {\n for (var i=0, n=arr.length; i<n; i++) {\n if (arr[i] === el) return i;\n }\n return -1;\n }", "function indexOfArray(arr, elem) {\n return arr.indexOf(elem);\n}", "function applyIndexOfToArray(array, element) {\n\t// create an index variable\n\tlet index;\n\t// assign it to the index inside of array where element can be found\n\tindex = array.indexOf(element);\n\t// return the index variable\n\treturn index;\n}", "function indexOf(arr, element){\n for (var i = 0, n = arr.length; i < n; i += 1) {\n if (arr[i] === element) {\n return i;\n }\n }\n\n return -1;\n}", "function arrayIndexOf(array, value)\r\n{\r\n for (var i = 0; i < array.length; ++i)\r\n if (array[i] == value)\r\n return i;\r\n\r\n return -1;\r\n}", "function inArray( elem, array ) {\n if ( array.indexOf ) {\n return array.indexOf( elem );\n }\n\n for ( var i = 0, length = array.length; i < length; i++ ) {\n if ( array[ i ] === elem ) {\n return i;\n }\n }\n\n return -1;\n }", "function indexOf(element, array) {\n\tvar i = array.length;\n\twhile (i--)\t{\n\t\tif (array[i] == element) return i;\n\t}\n\treturn -1;\n}", "function findIndex(arr, val) {\n\n}", "function arrayIndexOfElementValue(arr, val) {\n var index = -1;\n for (var i = 0; i < arr.elements.length; i++) {\n var el = arr.elements[i];\n if (el.value === val) {\n index = i;\n break;\n }\n }\n return index;\n}", "function indexOfArray(array , index){\n return array.indexOf(index);\n\n}", "function findInArray(arr, element) {\n var i;\n for (i = 0; i < arr.length; ++i) {\n if (arr[i] === element) {\n return i;\n }\n }\n return -1;\n }", "function ArrayIndexOf(a, fnc) {\n if (!fnc || typeof (fnc) != 'function') {\n return -1;\n }\n if (!a || !a.length || a.length < 1) return -1;\n for (var i = 0; i < a.length; i++) {\n if (fnc(a[i])) return i;\n }\n return -1;\n}", "function indexOfElementInArray(element, array) {\n\t if (!array) return -1;\n\t\n\t if (array.indexOf) {\n\t return array.indexOf(element);\n\t }\n\t\n\t var len = array.length,\n\t i;\n\t\n\t for (i = 0; i < len; i += 1) {\n\t if (array[i] === element) {\n\t return i;\n\t }\n\t }\n\t\n\t return -1;\n\t}", "function Array_IndexOf(Input){\r\n\tvar Result = -1;\r\n\tfor (var i=0; i<this.length; i++){\r\n\t\tif (this[i] == Input){\r\n\t\t\tResult = i;\r\n\t\t}\r\n\t}\r\n\treturn Result;\r\n}", "function findIndex(arr, iterator, thisObj){\n\t iterator = makeIterator(iterator, thisObj);\n\t if (arr == null) {\n\t return -1;\n\t }\n\n\t var i = -1, len = arr.length;\n\t while (++i < len) {\n\t if (iterator(arr[i], i, arr)) {\n\t return i;\n\t }\n\t }\n\n\t return -1;\n\t }", "function FindInArray(array, x) {\n for (var i = 0; i < array.length; i++) {\n if (array[i] == x) {\n return i;\n }\n }\n return -1;\n}", "function indexOfElementInArray(element, array) {\n\t if (!array) return -1;\n\n\t if (array.indexOf) {\n\t return array.indexOf(element);\n\t }\n\n\t var len = array.length,\n\t i;\n\n\t for (i = 0; i < len; i += 1) {\n\t if (array[i] === element) {\n\t return i;\n\t }\n\t }\n\n\t return -1;\n\t}", "function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }", "function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }", "function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }", "function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }", "function indexOfElementInArray(element, array) {\n if (!array) return -1;\n\n if (array.indexOf) {\n return array.indexOf(element);\n }\n\n var len = array.length,\n i;\n\n for (i = 0; i < len; i += 1) {\n if (array[i] === element) {\n return i;\n }\n }\n\n return -1;\n}", "function index(array, item){\n\t var i = array.length;\n\t while(i--) if(array[i]===item) return i;\n\t return -1;\n\t }", "function index(array, item){\n\t var i = array.length;\n\t while(i--) if(array[i]===item) return i;\n\t return -1;\n\t }", "function index(array, item){\r\n var i = array.length;\r\n while(i--) if(array[i]===item) return i;\r\n return -1;\r\n }", "function indexOfWithLoops(arr, ele) {\n let index = -1;\n for (let i=0; i<arr.length; i++) {\n if (arr[i] === ele) {\n index = i;\n }\n }\n return index;\n}", "function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }", "function findIndex(array, comp) {\n for (let i = 0; i < array.length; i += 1) {\n if (comp(array[i])) {\n return i;\n }\n }\n\n return -1;\n}", "function indexOf(array, item) {\n\tfor (var i = 0; i < array.length; i++) {\n\t\tif (array[i] == item)\n\t\t\treturn i;\n\t}\n\treturn -1;\n}", "function arrFindIndex(arr, value){\n\tfor (var i=0; i<arr.length; i++){\n\t\tif (arr[i] == value)return i;\n\t}\n\treturn false;\n}", "function findIndex(arr, predicate) {\n let i = 0;\n if (!arr || arr.length < 1) {\n return undefined;\n }\n const len = arr.length;\n while (i < len) {\n if (predicate(arr[i], i)) {\n return i;\n }\n i++;\n }\n return undefined;\n}", "function indexOfArray(a,o){\r\n\t\tfor(var i=0,len=a.length; i<len; i++){\r\n\t\t\tif (a[i] == o) return i;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "function findIndex(array, predicate) {\n for (var i = 0; i < array.length; i++) {\n if (predicate(array[i], i, array)) {\n return i;\n }\n }\n\n return -1;\n }", "function indexOf(arr, num){\n for(var i=0; i<=arr.length; i++){\n if(num === arr[i]){\n return i;\n }\n }\n}", "function findIndex(array, cb) {\n var index = -1;\n for (var i = 0; array && i < array.length; i++) {\n if (cb(array[i], i)) {\n index = i;\n break;\n }\n }\n return index;\n}", "function findIndex(array, cb) {\n var index = -1;\n for (var i = 0; array && i < array.length; i++) {\n if (cb(array[i], i)) {\n index = i;\n break;\n }\n }\n return index;\n}", "function indexOfArray(a, o) {\n for (var i = 0, len = a.length; i < len; i++) {\n if (a[i] == o) return i;\n }\n return -1;\n}", "function findIndexFromId(array, attr, value) {\n for (var i = 0; i < array.length; i += 1) {\n if (array[i][attr] === value) {\n return i;\n }\n }\n return -1;\n }", "function findIndex(array, predicate) {\n for (var i = 0; i < array.length; i++) {\n if (predicate(array[i])) {\n return i;\n }\n }\n return null;\n}", "function _array_index(needle, haystack) {\n var i;\n for(i=0; i < haystack.length; i++) {\n if(haystack[i] == needle) \n return i;\n }\n return -1;\n }", "function findIndex(arr, fn) {\n for (let i = 0; i < arr.length; i++) {\n if (fn(arr[i])) {\n return i;\n }\n }\n}", "function _inArray(elem, array) {\n if (array.indexOf) {\n return array.indexOf(elem);\n }\n\n for (var i = 0, length = array.length; i < length; i++) {\n if (array[i] === elem) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function _array_index(needle, haystack) {\n var i;\n for(i=0; i < haystack.length; i++) {\n if(haystack[i] == needle)\n return i;\n }\n return -1;\n }", "GetArrayElementAtIndex() {}", "function findIndex(name, array) {\n for (var i = 0; i < array.length; i++) {\n if (array[i].name === name) {\n return i;\n }\n }\n}", "function getElementIndex(element, vect) {\n\tfor (var i = 0; i < vect.length; i++) {\n\t\tif (vect[i] == element) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}", "function arrayIndexOf(array, item) {\n if (array == null) return -1;\n var i, l;\n var nativeIndexOf = Array.prototype.indexOf;\n if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);\n for (i = 0, l = array.length; i < l; i++) if (array[i] === item) return i;\n return -1;\n }", "function findIndexOfElement(inputArray, key, value){\n for (var i = 0; i < inputArray.length; i++){\n if (inputArray[i][key] === value){\n return i;\n }\n }\n return -1;\n}", "function findIndex(x, a) {\n for (var i = 0, l = a.length; i < l; ++i) {\n if (x === a[i]) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for(let i = 0, len = array.length; i < len; i++) {\n if(array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function findIndex (x, a) {\n for (var i = 0, l = a.length; i < l; ++i) {\n if (x === a[i]) {\n return i\n }\n }\n return -1\n}", "function getIndex(arr, toFind, property) {\n\tfor(var i = 0; i < arr.length; i++) \n\t\tif (arr[i][property] == toFind) //I use \"==\" because the numbers are different types\t\n\t\t\treturn i;\n\treturn -1;\n }", "function findIndex(array, predicate) {\n var index = -1;\n for (var i = 0; i < array.length; i++) {\n if (predicate(array[i])) {\n index = i;\n break;\n }\n }\n return index;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n}", "function indexOf(item, theArray) {\n\n for(var i = 0; i < theArray.length; i++){\n\n if(item === theArray[i]){\n return i;\n }\n }\n return -1;\n}", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (array[i] === value) {\n return i;\n }\n }\n\n return -1;\n}", "function findIndex(array, comparator) {\n if (!Array.isArray(array)) {\n return -1;\n }\n\n for (var i = 0; i < array.length; i++) {\n if (comparator(array[i])) {\n return i;\n }\n }\n\n return -1;\n}", "function findIndex(arr, data) {\n var index;\n\n for (var i = 0; i < arr.length; i++) {\n if (arr[i].data === data) {\n index = i;\n }\n }\n\n return index;\n}", "function funcGetIndex(arr, selected) {\n var arrIndex = jQuery.map(arr, function(e, i) {\n if (e.code == selected.code) return i;\n })\n return arrIndex.length ? arrIndex[0] : 0;\n }", "function funcGetIndex(arr, selected) {\n var arrIndex = jQuery.map(arr, function(e, i) {\n if (e.code == selected.code) return i;\n })\n return arrIndex.length ? arrIndex[0] : 0;\n }", "function indexOf(array, value) {\n\t\t\tfor (var i = 0, len = array.length; i < len; i++) {\n\t\t\t\tif (array[i] === value) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn -1;\n\t\t}", "function getIndex(array,strFind){\n if(array!=undefined && array!=null && strFind!=null){\n\t for(var i=0;i<array.length;i++){\n\t if(strFind==array[i]){\n\t return i;\n\t }\n\t }\n }\n return -1;\n}", "function arrayFirstIndexOf(array, predicate, predicateOwner) {\n \n for (var i = 0, j = array.length; i < j; i++) {\n if (predicate.call(predicateOwner, array[i])) {\n return i;\n }\n }\n return -1;\n }", "function indexOf(array, value) {\n\t for (var i = 0, len = array.length; i < len; i++) {\n\t if (array[i] === value) {\n\t return i;\n\t }\n\t }\n\t return -1;\n\t}" ]
[ "0.7871964", "0.780925", "0.7764285", "0.7756045", "0.7736787", "0.7694301", "0.765524", "0.7620825", "0.75880283", "0.7522415", "0.74995375", "0.74845576", "0.7444055", "0.74311584", "0.74198276", "0.73977965", "0.7361471", "0.73556465", "0.73540646", "0.73262554", "0.7322471", "0.73095405", "0.7282727", "0.7282727", "0.7282727", "0.7282727", "0.7281555", "0.72744566", "0.72744566", "0.72528416", "0.72416735", "0.7225498", "0.72015643", "0.7187793", "0.7158838", "0.7144308", "0.71356285", "0.7119978", "0.7117461", "0.7110612", "0.7110612", "0.71075386", "0.7097027", "0.70933354", "0.709043", "0.7083656", "0.70712566", "0.70671856", "0.70671856", "0.70671856", "0.70671856", "0.70671856", "0.70671856", "0.70671856", "0.70671856", "0.7061858", "0.7059843", "0.70570457", "0.7056395", "0.70512277", "0.7047883", "0.7029141", "0.7026229", "0.70238614", "0.7022478", "0.7013287", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.7008674", "0.70080835", "0.69994444", "0.6998991", "0.69973963", "0.698282", "0.6982693", "0.6982693", "0.6982186", "0.69815576", "0.6976348", "0.6975862" ]
0.76458997
7
!svg4everybody v2.1.9 | github.com/jonathantneal/svg4everybody
function e(e, t, n) { if (n) { var i = document.createDocumentFragment(), a = !t.hasAttribute("viewBox") && n.getAttribute("viewBox"); a && t.setAttribute("viewBox", a); for (var o = n.cloneNode(!0); o.childNodes.length; ) i.appendChild(o.firstChild); e.appendChild(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SVGShape() {}", "drawSvg() {\n \n\t}", "function SVGWrap() {}", "function SigmaEnableSVG() {\n return null;\n}", "function downloadPNG4x() {\n document.getElementById('svg').removeAttribute('style');\n panZoomInstance.moveTo(0, 0);\n panZoomInstance.zoomAbs(0, 0, 1);\n saveSvgAsPng(document.getElementById(\"svg\"), \"GeometricIllustration.png\", {scale: 4});\n}", "toSVG() {\n if (this.geometryObject &&\n (\n this.geometryObject.geometryIsVisible === false ||\n this.geometryObject.geometryIsHidden === true ||\n this.geometryObject.geometryIsConstaintDraw === true\n )\n ) {\n return '';\n }\n\n let path = this.getSVGPath();\n\n let attributes = {\n d: path,\n stroke: this.strokeColor,\n fill: '#000',\n 'fill-opacity': 0,\n 'stroke-width': this.strokeWidth,\n 'stroke-opacity': 1, // toujours à 1 ?\n };\n\n let path_tag = '<path';\n for (let [key, value] of Object.entries(attributes)) {\n path_tag += ' ' + key + '=\"' + value + '\"';\n }\n path_tag += '/>\\n';\n\n let pointToDraw = [];\n if (app.settings.areShapesPointed && this.name != 'silhouette') {\n if (this.isSegment())\n pointToDraw.push(this.segments[0].vertexes[0]);\n if (!this.isCircle())\n this.segments.forEach(\n (seg) => (pointToDraw.push(seg.vertexes[1])),\n );\n }\n\n this.segments.forEach((seg) => {\n //Points sur les segments\n seg.divisionPoints.forEach((pt) => {\n pointToDraw.push(pt);\n });\n });\n if (this.isCenterShown) pointToDraw.push(this.center);\n\n let point_tags = pointToDraw.filter(pt => {\n pt.visible &&\n pt.geometryIsVisible &&\n !pt.geometryIsHidden\n }).map(pt => pt.svg).join('\\n');\n\n let comment =\n '<!-- ' + this.name.replace('é', 'e').replace('è', 'e') + ' -->\\n';\n\n return comment + path_tag + point_tags + '\\n';\n }", "_getSVGHandler(e){let root=this,temp=document.createElement(\"div\"),getID=function(element,alt){if(null===element.getAttribute(\"id\"))element.setAttribute(\"id\",alt);return element.getAttribute(\"id\")},setAriaLabelledBy=function(source,target,prefix){// adds title and desc elements to target and sets the aria-labelledby attribute\nlet svgElem=function(nodename){source=null!==source?source:root;//adds title or desc element to target\nlet attr=\"title\"===nodename?\"label\":nodename,query=source.querySelector(\"#\"+attr);var label=target.querySelector(nodename);//if the target doesn't have the element, add it\nif(null===label){label=document.createElement(nodename);target.prepend(label)}//populates the element with data from the source element\nif(null!==source.getAttribute(attr)){label.innerHTML=source.getAttribute(attr)}else if(null!==query&&\"\"!==query.innerHTML){label.innerHTML=query.innerHTML}//returns the new element's id\nreturn getID(label,prefix+\"-\"+attr)};//set aria-labelledby to the id's for title and descriptions\ntarget.setAttribute(\"aria-labelledby\",svgElem(\"desc\")+\" \"+svgElem(\"label\"))};//set up main svg and append to document\ntemp.innerHTML=e.detail.response;let svg=temp.querySelector(\"svg\"),svgid=getID(svg,\"svg-\"+Date.now()),hdata=dom(root).querySelectorAll(\"lrndesign-imagemap-hotspot\");setAriaLabelledBy(root,svg,svgid);this.shadowRoot.querySelector(\"#svg\").appendChild(svg);for(let i=0;i<hdata.length;i++){let hid=hdata[i].getAttribute(\"hotspot-id\"),hotspot=svg.querySelector(\"#\"+hid),clone=svg.cloneNode(!0);//clone svg for print versions and show hotspot as selected\nsetAriaLabelledBy(hdata[i],clone,hid);hdata[i].appendChild(clone);hdata[i].querySelector(\"#\"+hid).classList.add(\"selected\");hdata[i].setParentHeading(root.shadowRoot.querySelector(\"#heading\"));for(let j=0;j<hdata.length;j++){hdata[i].querySelector(\"#\"+hdata[j].getAttribute(\"hotspot-id\")).classList.add(\"hotspot\")}//configure hotspot on main (interactive) svg\nlet hbutton=document.createElement(\"button\");hbutton.setAttribute(\"tabindex\",0);hbutton.setAttribute(\"aria-label\",hdata[i].label);root.shadowRoot.querySelector(\"#buttons\").appendChild(hbutton);hbutton.addEventListener(\"focus\",function(){hotspot.classList.add(\"focus\")});hbutton.addEventListener(\"blur\",function(){hotspot.classList.remove(\"focus\")});hotspot.classList.add(\"hotspot\");hotspot.addEventListener(\"click\",e=>{this.openHotspot(hotspot,hdata[i])});hbutton.addEventListener(\"keyup\",e=>{if(13===e.keyCode||32===e.keyCode){if(!hotspot.classList.contains(\"selected\")){this.openHotspot(hotspot,hdata[i])}}})}}", "function RvgsToSvg()\n{\n\t// return qualifyURL(\"/survol/internals/gui_create_svg_from_several_rdfs.py\");\n\treturn LocalHost() + \"/survol/gui_create_svg_from_several_rdfs.py\";\n}", "function createIcon() {\r\n\tlet svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\n\tlet g = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\r\n\tlet path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\r\n\r\n\tsvg.setAttribute('version', '1.1');\r\n\tsvg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\r\n\tsvg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\r\n\tsvg.setAttribute('x', '0px');\r\n\tsvg.setAttribute('y', '0px');\r\n\tsvg.setAttribute('width', '40px');\r\n\tsvg.setAttribute('height', '40px');\r\n\tsvg.setAttribute('viewBox', '0 0 446.843 446.843');\r\n\tsvg.setAttribute('style', 'enable-background:new 0 0 446.843 446.843;');\r\n\tsvg.setAttribute('xml:space', 'preserve');\r\n\r\n\tpath.setAttribute('d', 'M444.09,93.103c-2.698-3.699-7.006-5.888-11.584-5.888H109.92c-0.625,0-1.249,0.038-1.85,0.119l-13.276-38.27c-1.376-3.958-4.406-7.113-8.3-8.646L19.586,14.134c-7.374-2.887-15.695,0.735-18.591,8.1c-2.891,7.369,0.73,15.695,8.1,18.591l60.768,23.872l74.381,214.399c-3.283,1.144-6.065,3.663-7.332,7.187l-21.506,59.739c-1.318,3.663-0.775,7.733,1.468,10.916c2.24,3.183,5.883,5.078,9.773,5.078h11.044c-6.844,7.616-11.044,17.646-11.044,28.675c0,23.718,19.298,43.012,43.012,43.012s43.012-19.294,43.012-43.012c0-11.029-4.2-21.059-11.044-28.675h93.776c-6.847,7.616-11.048,17.646-11.048,28.675c0,23.718,19.294,43.012,43.013,43.012c23.718,0,43.012-19.294,43.012-43.012c0-11.029-4.2-21.059-11.043-28.675h13.433c6.599,0,11.947-5.349,11.947-11.948c0-6.599-5.349-11.947-11.947-11.947H143.647l13.319-36.996c1.72,0.724,3.578,1.152,5.523,1.152h210.278c6.234,0,11.751-4.027,13.65-9.959l59.739-186.387C447.557,101.567,446.788,96.802,444.09,93.103z M169.659,409.807c-10.543,0-19.116-8.573-19.116-19.116s8.573-19.117,19.116-19.117s19.116,8.574,19.116,19.117S180.202,409.807,169.659,409.807z M327.367,409.807c-10.543,0-19.117-8.573-19.117-19.116s8.574-19.117,19.117-19.117c10.542,0,19.116,8.574,19.116,19.117S337.909,409.807,327.367,409.807z M402.52,148.149h-73.161V115.89h83.499L402.52,148.149z M381.453,213.861h-52.094v-37.038h63.967L381.453,213.861z M234.571,213.861v-37.038h66.113v37.038H234.571z M300.684,242.538v31.064h-66.113v-31.064H300.684z M139.115,176.823h66.784v37.038h-53.933L139.115,176.823z M234.571,148.149V115.89h66.113v32.259H234.571z M205.898,115.89v32.259h-76.734l-11.191-32.259H205.898z M161.916,242.538h43.982v31.064h-33.206L161.916,242.538z M329.359,273.603v-31.064h42.909l-9.955,31.064H329.359z');\r\n\r\n\tg.appendChild(path);\r\n\tsvg.appendChild(g);\r\n\r\n\tlet div = DOM.createElement('div', {\r\n\t\tid: 'cartIcon',\r\n\t});\r\n\r\n\tdiv.appendChild(svg);\r\n\r\n\treturn div;\r\n}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function SVGElement() {}", "function buildSvgFullyOptimized() {\n\t\t\n\t\tlet svgElement = document.createElementNS(\"http://www.w3.org/2000/svg\", 'svg');\n \tsvgElement.setAttribute('viewBox','0 0 103.1 103.1');\n \tsvgElement.setAttribute('class','optimization-empty-svg mt-5 svg-absolute-center');\n \t\n \tlet gElement = document.createElementNS(\"http://www.w3.org/2000/svg\", 'g');\n \t\n \tlet pathElement1 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement1.setAttribute('class','optimization-empty-path-0');\n \tpathElement1.setAttribute('d','M51.5,0C23.1,0,0,23.1,0,51.5c0,28.5,23.1,51.5,51.5,51.5c3.7,0,7.3-0.4,10.7-1.1c22.8-4.8,40-24.8,40.8-48.8 c0-0.5,0-1.1,0-1.6C103.1,23.1,80,0,51.5,0z M67,90.2c-0.1,0.2-0.2,0.3-0.4,0.4c-4.9,1.6-11.6,2.4-15.8,2.4 c-3.6,0-10.2-0.8-15.3-2.3c-0.2-0.1-0.3-0.2-0.4-0.4c-0.1-0.2,0-0.4,0.1-0.5l4.2-5.8c0.1-0.2,0.3-0.2,0.5-0.2h23 c0.2,0,0.4,0.1,0.5,0.3l3.5,5.7C67.1,89.8,67.1,90,67,90.2z M97,51.8c-0.1,17-9.5,31.7-23.3,39.5l-6.5-10.4 c-0.8-1.3-2.2-2.1-3.7-2.1H39.4c-1.4,0-2.7,0.7-3.6,1.8l-7.4,10.1C15.1,82.9,6,68.3,6,51.5C6,26.4,26.4,6,51.5,6h0.3 C76.8,6.2,97,26.5,97,51.5V51.8z');\n \tgElement.appendChild(pathElement1);\n \t\n \tlet pathElement2 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement2.setAttribute('class','optimization-empty-path-1');\n \tpathElement2.setAttribute('d','M63.4,84c-0.1-0.2-0.3-0.3-0.5-0.3h-23c-0.2,0-0.4,0.1-0.5,0.2l-4.2,5.8c-0.1,0.2-0.1,0.4-0.1,0.5 c0.1,0.2,0.2,0.3,0.4,0.4c5.1,1.5,11.7,2.3,15.3,2.3c4.2,0,10.9-0.7,15.8-2.4c0.2-0.1,0.3-0.2,0.4-0.4c0.1-0.2,0-0.4-0.1-0.5 L63.4,84z');\n \tgElement.appendChild(pathElement2);\n \t\n \tlet pathElement3 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement3.setAttribute('class','optimization-empty-path-1');\n \tpathElement3.setAttribute('d','M51.8,6h-0.3C26.4,6,6,26.4,6,51.5c0,16.7,9,31.3,22.4,39.2l7.4-10.1c0.8-1.1,2.2-1.8,3.6-1.8h24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.3,0.1-0.6,0.3-0.8l1.7-1.7c0.2-0.2,0.5-0.3,0.8-0.3 s0.6,0.1,0.8,0.3l3.6,3.6c5.6-6.4,8.7-14.2,9.3-22.6l-5,0c-0.3,0-0.6-0.1-0.8-0.3c-0.2-0.2-0.3-0.5-0.3-0.8v-2.4 c0-0.3,0.1-0.6,0.3-0.8c0.2-0.2,0.5-0.3,0.8-0.3h5c-0.5-8.4-3.7-16.3-9.3-22.6l-3.6,3.6c-0.2,0.2-0.5,0.3-0.8,0.3s-0.6-0.1-0.8-0.3 l-1.7-1.7c-0.2-0.2-0.3-0.5-0.3-0.8c0-0.3,0.1-0.6,0.3-0.8l5.9-5.9c0.2-0.2,0.5-0.3,0.8-0.3c0.3,0,0.5,0.1,0.7,0.3 c7.6,6.7,12.7,17.8,13.1,28.9C93.5,51.4,93.5,51.5,93.4,53.3z');\n \tgElement.appendChild(pathElement3);\n \t\n \tlet pathElement4 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement4.setAttribute('class','optimization-meter all-optimized');\n \tpathElement4.setAttribute('d','M80.3,21c-0.2-0.2-0.5-0.3-0.7-0.3c-0.3,0-0.6,0.1-0.8,0.3l-5.9,5.9c-0.2,0.2-0.3,0.5-0.3,0.8 c0,0.3,0.1,0.6,0.3,0.8l1.7,1.7c0.2,0.2,0.5,0.3,0.8,0.3s0.6-0.1,0.8-0.3l3.6-3.6c5.6,6.4,8.7,14.2,9.3,22.6h-5 c-0.3,0-0.6,0.1-0.8,0.3c-0.2,0.2-0.3,0.5-0.3,0.8v2.4c0,0.3,0.1,0.6,0.3,0.8c0.2,0.2,0.5,0.3,0.8,0.3l5,0 c-0.5,8.4-3.7,16.3-9.3,22.6l-3.6-3.6c-0.2-0.2-0.5-0.3-0.8-0.3s-0.6,0.1-0.8,0.3l-1.7,1.7c-0.2,0.2-0.3,0.5-0.3,0.8 c0,0.3,0.1,0.6,0.3,0.8l5.9,5.9c0.2,0.2,0.5,0.3,0.8,0.3l0,0c0.3,0,0.5-0.1,0.7-0.3c7.6-6.7,12.7-17.8,13.1-28.9 c0.1-1.8,0.1-1.8,0-3.4C93,38.7,87.9,27.7,80.3,21z');\n \tgElement.appendChild(pathElement4);\n \t\n \tlet pathElement5 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement5.setAttribute('class','optimization-meter all-optimized');\n \tpathElement5.setAttribute('d','M49.3,46.1c-3.8,0.8-6.1,4.6-5.3,8.3c0.8,3.8,4.6,6.1,8.4,5.3c3.8-0.8,6.1-4.6,5.3-8.4 c-0.2-0.6-0.4-1.2-0.7-1.8l13.2-30.4L50.6,46C50.2,46,49.8,46,49.3,46.1z');\n \tgElement.appendChild(pathElement5);\n \t\n \tlet pathElement6 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement6.setAttribute('class','optimization-empty-path-2');\n \tpathElement6.setAttribute('d','M50.3,20.2h2.4c0.6,0,1.1-0.5,1.1-1.1v-8.3c0-0.6-0.5-1.1-1.1-1.1h-2.4c-0.6,0-1.1,0.5-1.1,1.1V19 C49.2,19.7,49.7,20.2,50.3,20.2z');\n \tgElement.appendChild(pathElement6);\n \t\n \tlet pathElement7 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement7.setAttribute('class','optimization-empty-path-2');\n \tpathElement7.setAttribute('d','M24.3,21c-0.2-0.2-0.5-0.3-0.8-0.3c-0.3,0-0.6,0.1-0.8,0.3L21,22.8c-0.4,0.4-0.4,1.1,0,1.6l5.9,5.9 c0.2,0.2,0.5,0.3,0.8,0.3c0.3,0,0.6-0.1,0.8-0.3l1.7-1.7c0.4-0.4,0.4-1.1,0-1.6L24.3,21z');\n \tgElement.appendChild(pathElement7);\n \t\n \tlet pathElement8 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement8.setAttribute('class','optimization-empty-path-2');\n \tpathElement8.setAttribute('d','M19,49.2h-8.3c-0.3,0-0.6,0.1-0.8,0.3c-0.2,0.2-0.3,0.5-0.3,0.8l0,2.4c0,0.6,0.5,1.1,1.1,1.1H19 c0.3,0,0.6-0.1,0.8-0.3c0.2-0.2,0.3-0.5,0.3-0.8v-2.4C20.2,49.7,19.7,49.2,19,49.2z');\n \tgElement.appendChild(pathElement8);\n \t\n \tlet pathElement9 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement9.setAttribute('class','optimization-empty-path-2');\n \tpathElement9.setAttribute('d','M28.5,72.9c-0.2-0.2-0.5-0.3-0.8-0.3s-0.6,0.1-0.8,0.3L21,78.8c-0.2,0.2-0.3,0.5-0.3,0.8s0.1,0.6,0.3,0.8 l1.7,1.7c0.2,0.2,0.5,0.3,0.8,0.3c0.3,0,0.6-0.1,0.8-0.3l5.9-5.9c0.2-0.2,0.3-0.5,0.3-0.8c0-0.3-0.1-0.6-0.3-0.8L28.5,72.9z');\n \tgElement.appendChild(pathElement9);\n \t\n \tsvgElement.appendChild(gElement);\n \t\n \treturn svgElement;\n\t}", "function GetSGV() {\r\n var svg = project.exportSVG({ asString: true });\r\n console.log(svg);\r\n}", "function getSVGinfo() {\n console.log(this);\n S = document.getElementById(\"DYOSVG\").contentDocument;\n var STYLESVG = []\n , NUMCOLS = [];\n var i;\n\n for (var j = 0; j < S.styleSheets.length; j++) {\n var rules = S.styleSheets[j].rules || S.styleSheets[j].cssRules;\n // This CSS code may need to be modified to handle using commas in CSS for shared code\n for (i in rules) {\n if (typeof rules[i].selectorText == 'string') {\n STYLESVG.push(rules[i].selectorText)\n }\n }\n for (i in STYLESVG) {\n var start_pos = STYLESVG[i].indexOf('.') + 1;\n var end_pos = STYLESVG[i].indexOf('.', start_pos);\n if (end_pos != -1) {\n var NC = STYLESVG[i].substring(start_pos, end_pos);\n // begin IE stupidity workaround\n var NC2 = STYLESVG[i].substring(end_pos + 1);\n if (NC == \"fill\" || NC == \"stroke\" || NC == \"stopColor\") {\n NUMCOLS.push(NC2)\n } else if (NC2 == \"fill\" || NC2 == \"stroke\" || NC2 == \"stopColor\") {\n NUMCOLS.push(NC)\n }\n }\n }\n NUMCOLS = NUMCOLS.filter(function(itm, i, a) {\n return i == a.indexOf(itm)\n });\n }\n var PREVIOUS = document.getElementsByClassName(\"colourfill\");\n for (i = PREVIOUS.length; i > 0; i--) {\n var M = (PREVIOUS[i - 1].id.indexOf(\"[\") != -1) ? PREVIOUS[i - 1].id.slice(0, PREVIOUS[i - 1].id.indexOf(\"[\")) : PREVIOUS[i - 1].id;\n var A = (PREVIOUS[i - 1].id.indexOf(\"[\") != -1) ? PREVIOUS[0].id.slice(PREVIOUS[0].id.indexOf(\"[\") + 1, PREVIOUS[0].id.length - 1) : null;\n if (A != ACTIVE) {\n continue\n }\n PREVIOUS[i - 1].material = (typeof materialController == 'function') ? materialController(M) : PREVIOUS[i - 1].material;\n var col = readCookie(PREVIOUS[i - 1].id);\n if (col && PREVIOUS[i - 1].material.indexOf(col) == -1) {\n removeCookie(PREVIOUS[i - 1].id)\n }\n if (PREVIOUS[i - 1].material.indexOf(PREVIOUS[i - 1].value) == -1) {\n if (defcols[PREVIOUS[i - 1]] && PREVIOUS[i - 1].material.indexOf(defcols[PREVIOUS[i - 1]]) != -1) {\n PREVIOUS[i - 1].value = defcols[PREVIOUS[i - 1]];\n }\n {\n var rand = Math.floor(Math.random() * PREVIOUS[i - 1].material.length);\n PREVIOUS[i - 1].value = PREVIOUS[i - 1].material[rand];\n }\n colour.call(PREVIOUS[i - 1]);\n }\n if (NUMCOLS.indexOf(PREVIOUS[i - 1].id) == -1 && PREVIOUS[i - 1].id != \"S-BallColour\") {\n PREVIOUS[i - 1].parentNode.parentNode.removeChild(PREVIOUS[i - 1].parentNode)\n }\n }\n for (i in NUMCOLS) {\n if (!document.getElementById(NUMCOLS[i]) + \"[\" + ACTIVE + \"]\") {\n addColour(NUMCOLS[i] + \"[\" + ACTIVE + \"]\")\n }\n ;colour.call(document.getElementById(NUMCOLS[i] + \"[\" + ACTIVE + \"]\"))\n }\n // Re-Initialise set values\n if (typeof svgController == 'function') {\n svgController();\n }\n if (!S.getElementById(\"Content\")) {\n var CNT = document.createElementNS(SVG_NS, \"g\");\n CNT.id = \"Content\";\n S.documentElement.appendChild(CNT)\n }\n S.getElementById(\"Content\").style.visibility = \"hidden\";\n S.getElementById(\"Content\").style.visibility = \"hidden\";\n if (document.getElementById(\"SBALL[\" + ACTIVE + \"]\")) {\n drawSBall();\n // SBall();\n // colour.call(document.getElementById(\"S-BallColour[\" + ACTIVE + \"]\"));\n }\n DL = document.getElementById(\"logos[\" + ACTIVE + \"]\").getElementsByClassName(\"logoupload\");\n DT = document.getElementById(\"logos[\" + ACTIVE + \"]\").getElementsByClassName(\"addtext\");\n DS = document.getElementById(\"logos[\" + ACTIVE + \"]\").getElementsByClassName(\"uploadselect\");\n for (var i = 0; i < DS.length; i++) {\n embellish.call(DS[i])\n }\n for (var i = 0; i < DL.length; i++) {\n if (DL[i].value) {\n if (CYCLE == true) {\n DLCount++\n }\n HFS.call(DL[i])\n }\n }\n for (var i = 0; i < DT.length; i++) {\n if (DT[i].value) {\n addText.call(DT[i])\n }\n }\n // Continue with Garment Specific Logic\t\n //\tdocument.getElementById(\"Colour1\").classList.add(\"chosen\");\n //\tif(document.getElementById(\"Colour1\")){createColourPicker.call(document.getElementById(\"Colour1\"))}else{console.log(\"dfjvdfj\")}\n // colourBranding()\n //Clone the node \n if (CYCLE == true && DLCount == 0) {\n generateImages()\n }\n}", "function ɵɵnamespaceSVG() {\n _currentNamespace = 'http://www.w3.org/2000/svg';\n}", "function SvgComponent(props) {\n return (\n <Svg width={props.width || 167} height={ props.height || 315} viewBox=\"0 0 176 324\" fill=\"none\" {...props}>\n <G filter=\"url(#prefix__filter0_d)\">\n <Path\n opacity={0.9}\n d=\"M15.371 312.52l-9.828 1.971a.453.453 0 01-.543-.444v-4.044a1 1 0 011.003-1l164 .494a1 1 0 01.997 1v1.311a1 1 0 01-.648.936l-3.17 1.192a1.006 1.006 0 01-.352.064h-2.809l-4.985-.5-7.821-.981a1.033 1.033 0 00-.309.01l-7.643 1.437a.985.985 0 01-.359.002l-8.084-1.431a1.016 1.016 0 00-.418.015l-1.786.448-1.994.5-7.751.972a1.012 1.012 0 01-.44-.043c-3.062-1.016-8.976-2.82-9.755-2.429-.776.389-4.128 1.125-5.84 1.471a.955.955 0 01-.287.016l-5.217-.476a1.022 1.022 0 00-.241.007c-2.207.336-6.682.875-7.857.482-1.134-.379-5.047.71-7.15 1.392a1.009 1.009 0 01-.653-.009l-6.449-2.31a1.003 1.003 0 00-.42-.055l-5.674.474a1.005 1.005 0 00-.181.032l-5.09 1.393a1.003 1.003 0 01-.602-.023l-6.518-2.335a.995.995 0 00-.337-.059h-5.615a.99.99 0 00-.373.072l-4.522 1.814a1 1 0 01-.582.05l-6.577-1.414a.99.99 0 00-.21-.022h-5.263c-.076 0-.151.009-.225.026l-6.135 1.42a1.003 1.003 0 01-.468-.005l-5.629-1.411a.997.997 0 00-.243-.03h-8.75a1 1 0 00-.197.02z\"\n fill=\"#fff\"\n stroke=\"#fff\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M4 3v309.438a2 2 0 002.485 1.941L10 313.5l2.5-.5 2.5-.5 1.192-.397a2 2 0 01.633-.103H23.028c.31 0 .617.072.894.211l.45.225c.085.043.173.079.263.109l1.057.352a2 2 0 00.633.103h.35a2 2 0 01.633.103l1.192.397 1.192.397a2 2 0 00.633.103h.429c.163 0 .326-.02.485-.06L33 313.5l1.257-.419c.16-.053.305-.143.425-.263a1.09 1.09 0 01.768-.318h.187c.239 0 .474-.056.688-.162l.253-.127c.277-.139.584-.211.894-.211h.203a2 2 0 01.633.103l.884.294a2 2 0 00.633.103h1.85a2 2 0 01.633.103l.884.294a2 2 0 00.633.103h2.885c.16 0 .29.13.29.291 0 .125.08.236.199.275l1.025.342c.183.061.374.092.567.092h.237c.31 0 .617-.072.894-.211l.284-.142c.193-.097.406-.147.623-.147.113 0 .227-.014.337-.042l1.56-.389c.179-.045.343-.138.474-.269.192-.192.452-.3.724-.3H60.528c.31 0 .617.072.894.211l.45.225c.086.043.173.079.263.109l1.365.455 2.865.955c.09.03.178.066.262.109l.132.066a2 2 0 001.527.108L70.5 314l1.365-.455c.09-.03.178-.066.262-.109l2.677-1.338c.13-.065.267-.116.409-.151l1.548-.387c.159-.04.322-.06.485-.06h1.43a2 2 0 01.632.103l.938.312c.169.057.329.135.477.234L82 313l.873.436c.084.043.172.079.262.109L84.5 314l1.192.397a2 2 0 00.633.103h1.847a2 2 0 001.414-.586l.184-.185c.153-.152.328-.278.52-.374l.514-.257c.13-.065.267-.116.409-.151l5.548-1.387c.159-.04.322-.06.485-.06h.93a2 2 0 01.632.103L100 312l2 .5 1.5.5 1.761.44c.159.04.322.06.485.06h5.282c.31 0 .617-.072.894-.211l.288-.144c.192-.096.367-.222.519-.374l.343-.343a2.006 2.006 0 011.022-.547L116 311.5h2c.278 0 1.057.161 1.729.316.454.104.805.684 1.271.684.286 0 .929.511 1.455.985.357.321.815.515 1.295.515h.451a.72.72 0 01.51.211.723.723 0 00.685.19L127 314l2.5-.5 1.463-.366a2 2 0 00.929-.526l.254-.254c.227-.227.534-.354.854-.354h.146c.227 0 .444-.09.604-.25.16-.16.377-.25.604-.25h3.174c.31 0 .617.072.894.211L139 312l1.212.808c.19.127.402.22.624.276l1.451.363c.142.035.279.086.409.151l.19.095c.398.199.851.26 1.287.172L146 313.5l4.719-1.416c.186-.056.38-.084.575-.084h4.881c.215 0 .429.035.633.103l2.384.794c.204.068.417.101.632.11.728.027 1.833.15 2.176.493.331.331 1.141.685 1.694.892.202.075.416.108.631.108h1.429c.163 0 .326-.02.485-.06l1.425-.356c.222-.056.434-.149.624-.276l1.818-1.212c.558-.372.893-1 .891-1.67l-.988-308.098a2 2 0 00-2.673-1.877l-3.87 1.383c-.306.109-.634.142-.956.096l-6.264-.895a2.007 2.007 0 00-.493-.009l-9.08.956a1.996 1.996 0 00-.34.066l-2.709.774a2 2 0 01-1.233-.044l-4.445-1.616a1.999 1.999 0 00-.917-.107l-7.757.913a2.004 2.004 0 01-.543-.01L113.568.088a1.998 1.998 0 00-1.096.138L109.5 1.5l-3.115.89c-.254.073-.52.094-.783.063l-7.898-.929a1.998 1.998 0 01-.399-.089L93.601.2a2 2 0 00-1.207-.018L88.28 1.416a2 2 0 01-.575.084h-6.652a2 2 0 01-1.029-.285L78.679.408a2 2 0 00-1.453-.24L66.8 2.435a2 2 0 01-.606.037L55.81 1.528a2 2 0 00-.614.04l-3.913.87a2 2 0 01-.572.042l-13.93-.96a2 2 0 00-.556.039l-6.271 1.344a2 2 0 01-.904-.016l-5.372-1.343a2.001 2.001 0 00-.36-.055l-7.314-.457a2 2 0 00-.963.18L9.873 3.597A2 2 0 018.14 3.57l-2.798-1.4A.927.927 0 004 3z\"\n fill=\"#F5F5F5\"\n />\n <Path\n d=\"M4 3v309.438a2 2 0 002.485 1.941L10 313.5l2.5-.5 2.5-.5 1.192-.397a2 2 0 01.633-.103H23.028c.31 0 .617.072.894.211l.45.225c.085.043.173.079.263.109l1.057.352a2 2 0 00.633.103h.35a2 2 0 01.633.103l1.192.397 1.192.397a2 2 0 00.633.103h.429c.163 0 .326-.02.485-.06L33 313.5l1.257-.419c.16-.053.305-.143.425-.263a1.09 1.09 0 01.768-.318h.187c.239 0 .474-.056.688-.162l.253-.127c.277-.139.584-.211.894-.211h.203a2 2 0 01.633.103l.884.294a2 2 0 00.633.103h1.85a2 2 0 01.633.103l.884.294a2 2 0 00.633.103h2.885c.16 0 .29.13.29.291 0 .125.08.236.199.275l1.025.342c.183.061.374.092.567.092h.237c.31 0 .617-.072.894-.211l.284-.142c.193-.097.406-.147.623-.147.113 0 .227-.014.337-.042l1.56-.389c.179-.045.343-.138.474-.269.192-.192.452-.3.724-.3H60.528c.31 0 .617.072.894.211l.45.225c.086.043.173.079.263.109l1.365.455 2.865.955c.09.03.178.066.262.109l.132.066a2 2 0 001.527.108L70.5 314l1.365-.455c.09-.03.178-.066.262-.109l2.677-1.338c.13-.065.267-.116.409-.151l1.548-.387c.159-.04.322-.06.485-.06h1.43a2 2 0 01.632.103l.938.312c.169.057.329.135.477.234L82 313l.873.436c.084.043.172.079.262.109L84.5 314l1.192.397a2 2 0 00.633.103h1.847a2 2 0 001.414-.586l.184-.185c.153-.152.328-.278.52-.374l.514-.257c.13-.065.267-.116.409-.151l5.548-1.387c.159-.04.322-.06.485-.06h.93a2 2 0 01.632.103L100 312l2 .5 1.5.5 1.761.44c.159.04.322.06.485.06h5.282c.31 0 .617-.072.894-.211l.288-.144c.192-.096.367-.222.519-.374l.343-.343a2.006 2.006 0 011.022-.547L116 311.5h2c.278 0 1.057.161 1.729.316.454.104.805.684 1.271.684.286 0 .929.511 1.455.985.357.321.815.515 1.295.515h.451a.72.72 0 01.51.211.723.723 0 00.685.19L127 314l2.5-.5 1.463-.366a2 2 0 00.929-.526l.254-.254c.227-.227.534-.354.854-.354h.146c.227 0 .444-.09.604-.25.16-.16.377-.25.604-.25h3.174c.31 0 .617.072.894.211L139 312l1.212.808c.19.127.402.22.624.276l1.451.363c.142.035.279.086.409.151l.19.095c.398.199.851.26 1.287.172L146 313.5l4.719-1.416c.186-.056.38-.084.575-.084h4.881c.215 0 .429.035.633.103l2.384.794c.204.068.417.101.632.11.728.027 1.833.15 2.176.493.331.331 1.141.685 1.694.892.202.075.416.108.631.108h1.429c.163 0 .326-.02.485-.06l1.425-.356c.222-.056.434-.149.624-.276l1.818-1.212c.558-.372.893-1 .891-1.67l-.988-308.098a2 2 0 00-2.673-1.877l-3.87 1.383c-.306.109-.634.142-.956.096l-6.264-.895a2.007 2.007 0 00-.493-.009l-9.08.956a1.996 1.996 0 00-.34.066l-2.709.774a2 2 0 01-1.233-.044l-4.445-1.616a1.999 1.999 0 00-.917-.107l-7.757.913a2.004 2.004 0 01-.543-.01L113.568.088a1.998 1.998 0 00-1.096.138L109.5 1.5l-3.115.89c-.254.073-.52.094-.783.063l-7.898-.929a1.998 1.998 0 01-.399-.089L93.601.2a2 2 0 00-1.207-.018L88.28 1.416a2 2 0 01-.575.084h-6.652a2 2 0 01-1.029-.285L78.679.408a2 2 0 00-1.453-.24L66.8 2.435a2 2 0 01-.606.037L55.81 1.528a2 2 0 00-.614.04l-3.913.87a2 2 0 01-.572.042l-13.93-.96a2 2 0 00-.556.039l-6.271 1.344a2 2 0 01-.904-.016l-5.372-1.343a2.001 2.001 0 00-.36-.055l-7.314-.457a2 2 0 00-.963.18L9.873 3.597A2 2 0 018.14 3.57l-2.798-1.4A.927.927 0 004 3z\"\n fill=\"url(#prefix__paint0_linear)\"\n />\n </G>\n <Defs>\n <LinearGradient\n id=\"prefix__paint0_linear\"\n x1={87.5}\n y1={0}\n x2={88}\n y2={315}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#fff\" />\n <Stop offset={1} stopColor=\"#ECECEC\" />\n </LinearGradient>\n </Defs>\n </Svg>\n )\n}", "function svg() {\n return src('assets/svg/**.*')\n .pipe(dest('dist/svg'));\n}", "_transformMeasurements () {\n // Append the SVG dom to the document.\n // This allows us to use `getBBox` on the page,\n // which returns the full bounding-box of all drawn SVG\n // elements, similar to how Scratch 2.0 did measurement.\n const svgSpot = document.createElement('span');\n // Since we're adding user-provided SVG to document.body,\n // sanitizing is required. This should not affect bounding box calculation.\n // outerHTML is attribute of Element (and not HTMLElement), so use it instead of\n // calling serializer or toString()\n // NOTE: this._svgTag remains untouched!\n const rawValue = this._svgTag.outerHTML;\n const sanitizedValue = DOMPurify.sanitize(rawValue, {\n // Use SVG profile (no HTML elements)\n USE_PROFILES: {svg: true},\n // Remove some tags that Scratch does not use.\n FORBID_TAGS: ['a', 'audio', 'canvas', 'video'],\n // Allow data URI in image tags (e.g. SVGs converted from bitmap)\n ADD_DATA_URI_TAGS: ['image']\n });\n let bbox;\n try {\n // Insert sanitized value.\n svgSpot.innerHTML = sanitizedValue;\n document.body.appendChild(svgSpot);\n // Take the bounding box. We have to get elements via svgSpot\n // because we added it via innerHTML.\n bbox = svgSpot.children[0].getBBox();\n } finally {\n // Always destroy the element, even if, for example, getBBox throws.\n document.body.removeChild(svgSpot);\n }\n\n // Enlarge the bbox from the largest found stroke width\n // This may have false-positives, but at least the bbox will always\n // contain the full graphic including strokes.\n // If the width or height is zero however, don't enlarge since\n // they won't have a stroke width that needs to be enlarged.\n let halfStrokeWidth;\n if (bbox.width === 0 || bbox.height === 0) {\n halfStrokeWidth = 0;\n } else {\n halfStrokeWidth = this._findLargestStrokeWidth(this._svgTag) / 2;\n }\n const width = bbox.width + (halfStrokeWidth * 2);\n const height = bbox.height + (halfStrokeWidth * 2);\n const x = bbox.x - halfStrokeWidth;\n const y = bbox.y - halfStrokeWidth;\n\n // Set the correct measurements on the SVG tag\n this._svgTag.setAttribute('width', width);\n this._svgTag.setAttribute('height', height);\n this._svgTag.setAttribute('viewBox',\n `${x} ${y} ${width} ${height}`);\n }", "function putSvg(next) {\n if (next == VIEWS.DOT.hash) {\n goToDot(next + \"/\" + dot_top);\n return;\n }\n if (!next) next = dot_top;\n var root = d3.select(\"#svg_container\");\n d3.xml(\"lib/dot_svg/\" + next + \".svg\", function(error, documentFragment) {\n if (error) {console.log(error); return;}\n var svgNode = documentFragment.getElementsByTagName(\"svg\")[0];\n\n var w = $(root.node()).width();\n var h = $(root.node()).height();\n\n svgNode.setAttribute(\"viewBox\", \"0 0 \" + w + ' ' + h);\n svgNode.setAttribute(\"style\", \"width: \" + w + 'px;height:' + h + \"px;\");\n\n var d = d3.select(svgNode);\n\n if (root.node().childNodes.length > 0) {\n root.node().replaceChild(svgNode, root.node().childNodes[0]);\n } else {\n root.node().appendChild(svgNode);\n }\n var matrix = d.select(\"g\").node().transform.baseVal.consolidate().matrix;\n var X = matrix.e;\n var Y = matrix.f;\n var width = parseInt(svgNode.getAttribute(\"width\"), 10);\n var height = parseInt(svgNode.getAttribute(\"height\"), 10);\n var x_scale = w / width;\n var y_scale = h / height;\n var initial_scale = Math.min(x_scale, y_scale);\n initial_scale = Math.min(initial_scale, 1);\n\n var translate_x = ((w - width*initial_scale) / 2);\n var translate_y = ((h - height*initial_scale) / 2);\n\n // Setup event listeners for model nodes.\n root.selectAll(\"polygon\").each(function() {\n if (this.hasAttribute(\"fill\")) {\n // All model nodes should show the corresponding HDL, or the\n // corresponding DOT graph when clicked. dsdk::A_MODEL_NODEs\n // are magenta, dsdk::A_SCHEDULED_MODEL_NODEs are white, and\n // are not a direct descendant of the \"graph\" (the background\n // is also white, but is a direct descendant of the \"graph\".\n if (this.getAttribute(\"fill\") == \"magenta\" ||\n (this.getAttribute(\"fill\") == \"white\" && !this.parentNode.classList.contains(\"graph\"))) {\n var g = this.parentNode;\n var title = g.getElementsByTagName(\"title\")[0].innerHTML;\n g.addEventListener(\"click\", function(e){\n // Ctrl+Click opens source, plain click opens graph.\n var evt = window.event || e;\n if (evt.ctrlKey) {\n // TODO Eventually the filename will probably need\n // to include a kernel/component subdirectory.\n var filename = title.replace(/^\\d+_/, \"\")+\".vhd\";\n addHdlFileToEditor(\"lib/hdl/\" + filename);\n if (sideCollapsed) {\n collapseAceEditor();\n refreshAreaVisibility();\n adjustToWindowEvent();\n }\n } else {\n var new_hash = window.location.hash + \"/\" + title;\n VIEWS.DOT.hash = new_hash;\n goToDot(new_hash);\n }\n });\n }\n }\n });\n\n // Clickdown for edge highlighting.\n root.selectAll(\"g.edge path\")\n .on('click', function () {\n // TODO use parent\n if (dot_clickdown == this) {\n dot_clickdown = null;\n } else {\n dot_clickdown = this;\n }\n });\n\n // Edge/arrowhead highlighting.\n var highlightColor = \"#1d99c1\";\n root.selectAll(\"g.edge path\")\n .on('mouseover', function () {\n $(this).attr({\"stroke-width\":5, \"stroke\":highlightColor});\n $(this).siblings(\"polygon\").attr({\"fill\":highlightColor, \"stroke\":highlightColor, \"stroke-width\":3});\n })\n .on('mouseout', function () {\n if (dot_clickdown == this) return;\n $(this).attr({\"stroke-width\":1, \"stroke\":\"black\"});\n $(this).siblings(\"polygon\").attr({\"fill\":\"black\", \"stroke\":\"black\", \"stroke-width\":1});\n });\n root.selectAll(\"g.edge polygon\")\n .on('mouseover', function () {\n $(this).siblings(\"path\").attr({\"stroke-width\":5, \"stroke\":highlightColor});\n $(this).attr({\"fill\":highlightColor, \"stroke\":highlightColor, \"stroke-width\":3});\n })\n .on('mouseout', function () {\n if (dot_clickdown == this) return;\n $(this).siblings(\"path\").attr({\"stroke-width\":1, \"stroke\":\"black\"});\n $(this).attr({\"fill\":\"black\", \"stroke\":\"black\", \"stroke-width\":1});\n });\n\n\n // TODO use translateExtent() to prevent translating out of frame?\n //.translateExtent([10 - X, 10 - Y, 2 * X - 10, 2 * Y - 10])\n //.translateExtent([[0, 0], [2 * Y - 10]])\n\n var scaled_x = initial_scale * X;\n var scaled_y = initial_scale * Y;\n scaled_x += translate_x;\n scaled_y += translate_y;\n var zoom = d3.behavior.zoom()\n .scaleExtent([0, 1.5])\n .scale(initial_scale)\n .translate([scaled_x, scaled_y])\n .on(\"zoom\", zoomed);\n d.select(\"g\").attr(\"transform\",\"translate(\" + scaled_x + \",\" + scaled_y +\")scale(\" + initial_scale + \",\" + initial_scale + \")\");\n d.call(zoom);\n if (!$('#dot_edges_toggle').is(':checked')) {\n $(\"#svg_container\").find(\"g.edge\").toggle();\n }\n });\n updateDotHierarchy();\n}", "function fix_IE_SVGs() {\n var SVGs = $j('.pays__svg, .ships__svg, .socials__svg');\n if (SVGs.length) {\n SVGs.each(function (i, el) {\n\n var svg_class = $j(el).attr('class').replace(/light|dark|onecolor|pays__svg|\\s/g, '');\n var svgHTML = $j(el).parent().html();\n var regex = /viewBox\\=[\\\"\\'](.*?)[\\\"\\']/g;\n var viewbox = regex.exec(svgHTML);\n\n if (typeof viewbox != \"undefined\" && viewbox) {\n viewbox = viewbox[1].split(' ');\n\n var h = $j(el).height();\n var boxWidth = viewbox[2];\n var boxHeight = viewbox[3];\n var newWidth = (boxWidth * h) / boxHeight;\n\n newWidth = newWidth.toFixed(3);\n\n if ($j(el).parent().find('style').length) {\n $j(el).parent().find('style').remove();\n }\n $j(el).after('<style>svg.pays__svg.' + svg_class + '{ width: ' + newWidth + 'px }</style>');\n }\n\n });\n }\n}", "function SvgComponent(props) {\n return (\n <Svg width={18} height={12} viewBox=\"0 0 18 12\" {...props}>\n <Path\n d=\"M17.092 7.794a11.553 11.553 0 00-2.613-.236c.504-1.3.608-2.868.305-4.673a.286.286 0 00-.123-.19.276.276 0 00-.22-.038 9.8 9.8 0 00-2.674 1.227A8.915 8.915 0 009.1.06a.276.276 0 00-.37.025c-1.242 1.288-2.072 2.61-2.479 3.94a9.837 9.837 0 00-2.877-1.369.276.276 0 00-.22.039.286.286 0 00-.123.19c-.304 1.805-.199 3.372.304 4.673-.876-.021-1.753.058-2.612.236a.28.28 0 00-.184.146.29.29 0 00-.012.237C1.745 11.283 4.117 12 6.044 12a9.068 9.068 0 002.864-.484c.924.315 1.89.478 2.864.485 1.927 0 4.3-.716 5.516-3.822a.29.29 0 00-.012-.237.28.28 0 00-.184-.147zm-3.233-.205a7.267 7.267 0 00-2.939.828.274.274 0 00-.129.074 4.86 4.86 0 00-1.453 1.315 6.942 6.942 0 00-.142-1.57c.336-1.449 1.2-2.682 2.576-3.67a9.662 9.662 0 012.51-1.266c.24 1.679.095 3.119-.423 4.289zM8.949.672c.494.445 1.804 1.76 2.337 3.553a6.882 6.882 0 00-2.378 3.05A6.789 6.789 0 006.73 4.381C7.07 3.142 7.812 1.897 8.95.672zM3.535 3.298c.97.322 1.885.8 2.709 1.413A6.119 6.119 0 018.62 8.235a6.927 6.927 0 00-.142 1.57C7.343 8.252 5.54 7.717 3.957 7.588c-.518-1.17-.663-2.61-.423-4.289zm2.124 8.132c-2.096-.116-3.6-1.174-4.477-3.145 1.27-.22 5.847-.744 7.356 2.754a8.32 8.32 0 01-2.879.392v-.001zm6.5 0a8.336 8.336 0 01-2.88-.392c1.51-3.497 6.087-2.973 7.358-2.753-.878 1.971-2.382 3.029-4.479 3.146v-.001z\"\n fillRule=\"nonzero\"\n fill={`${props.fillColor}`}\n />\n </Svg>\n );\n}", "function SvgComponent(props) {\n\treturn (\n\t\t<Svg width={38} height={38} viewBox=\"0 0 38 38\" {...props}>\n\t\t\t<G fill=\"#FF2E56\" fillRule=\"nonzero\">\n\t\t\t\t<Path d=\"M29.42 10.42a6.136 6.136 0 01-6.13-6.13V0h-8.58v4.29c0 3.38-2.75 6.13-6.13 6.13C3.85 10.42 0 14.267 0 19c0 10.477 8.523 19 19 19s19-8.523 19-19c0-4.732-3.849-8.58-8.58-8.58zM19 36.773C9.2 36.774 1.226 28.8 1.226 19c0-4.056 3.3-7.355 7.355-7.355 4.055 0 7.354-3.3 7.354-7.355V1.226h1.226v1.226h1.226V1.226h1.226v6.793a8.05 8.05 0 01-.654 3.189l-.43 1.005a9.265 9.265 0 00-.755 3.671c0 1.152.289 2.27.835 3.272-.44.128-.846.34-1.208.63l-.066-.165a10.937 10.937 0 01-.787-4.081c0-1.25.296-2.503.855-3.62a9.379 9.379 0 00.984-4.17V3.678h-1.226v4.074a8.13 8.13 0 01-.855 3.62 9.379 9.379 0 00-.983 4.169c0 1.56.293 3.086.874 4.536l.15.374a3.654 3.654 0 00-2.92-1.45c-.442 0-.877.08-1.292.234l-3.927 1.473-.719-1.078a1.413 1.413 0 00-2.586.783v2.265c0 1.014.825 1.84 1.839 1.84v1.225c0 .676.55 1.226 1.226 1.226h.923a15.326 15.326 0 004.498 3.891l.805.46a6.09 6.09 0 003.58 1.165c2.516 0 4.988-.685 7.146-1.98l2.958-1.774c.306.047.616.076.928.076 3.38 0 6.13-2.749 6.13-6.129 0-3.38-2.75-6.129-6.13-6.129a6.113 6.113 0 00-3.763 1.299 1.972 1.972 0 00-.527-.073c-1.052 0-1.979.802-2.542 2.156a3.497 3.497 0 00-2.01-.897l-.018-.026A5.606 5.606 0 0119 15.884c0-1.103.22-2.176.654-3.188l.43-1.005c.501-1.167.755-2.402.755-3.672V1.226h1.226V4.29c0 4.056 3.299 7.355 7.354 7.355 4.056 0 7.355 3.3 7.355 7.355 0 9.8-7.974 17.774-17.774 17.774zm5.064-13.296a2.3 2.3 0 01-.989-1.53 3.519 3.519 0 00-.22-.748l.037-.2c.325-1.196.978-2 1.624-2 .122 0 .247.032.383.096l.365.175.305-.269a4.894 4.894 0 013.237-1.228c2.704 0 4.904 2.2 4.904 4.903 0 2.704-2.2 4.904-4.904 4.904-1.19 0-2.339-.437-3.237-1.23l-.811.92c.461.407.978.734 1.528.984l-1.997 1.199a12.675 12.675 0 01-6.515 1.804 4.909 4.909 0 01-4.903-4.903c0-.528.227-1.03.623-1.38l-.81-.919a3.081 3.081 0 00-.421.457 3.293 3.293 0 00-2.556-1.223H6.742a.613.613 0 01-.613-.613v-2.265c0-.165.248-.241.34-.103l1.26 1.887 4.837-1.814a2.45 2.45 0 01.86-.156c.936 0 1.777.52 2.196 1.357a4.176 4.176 0 003.755 2.32h.849v-1.226h-.85c-.858 0-1.65-.363-2.206-.98l.796-.796a2.287 2.287 0 011.629-.675c1.13 0 2.085.809 2.27 1.924a3.53 3.53 0 001.52 2.348l.792.528.68-1.02-.793-.528zm-12.06 4.92a14.104 14.104 0 01-2.32-2.41l-.184-.246H7.968v-1.226h1.74c.894 0 1.685.57 1.969 1.42a3.076 3.076 0 00-.032.419c0 .717.13 1.403.358 2.043z\" />\n\t\t\t\t<Path d=\"M28 30h1v1h-1zM32 16h1v1h-1zM22 13h1v1h-1zM11 17h1v1h-1zM8 29h1v1H8zM19 35h1v1h-1zM3 16h1v1H3z\" />\n\t\t\t</G>\n\t\t</Svg>\n\t);\n}", "function downloadPNG2x() {\n document.getElementById('svg').removeAttribute('style');\n panZoomInstance.moveTo(0, 0);\n panZoomInstance.zoomAbs(0, 0, 1);\n saveSvgAsPng(document.getElementById(\"svg\"), \"GeometricIllustration.png\", {scale: 2});\n}", "function setupSVG(svg, width, height) {\n //Remove children of svg to eventually tiles from the previous image\n svg.innerHTML = '';\n\n //Give to svg the same size as the image\n svg.setAttribute('viewBox', '0 0 '+width+' '+height);\n svg.setAttribute('width', '100%');\n svg.setAttribute('height', '100%');\n}", "function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}", "function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}", "function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}", "function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}", "function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}", "function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}", "function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}", "renderExtras(svg, data, x, y) {\n }", "function initSVG() {\n \t\tsvg = d3.select('body')\n \t\t.append('svg')\n \t\t.attr('viewBox', '0 0 600 600')\n \t\t.attr('style', 'width: 300px; height: 300px;');\n \t}", "function SVGParent() {}", "function svgConverter() {\n jQuery('img.svg').each(function(){\n var $img = jQuery(this);\n var imgID = $img.attr('id');\n var imgClass = $img.attr('class');\n var imgURL = $img.attr('src');\n\n jQuery.get(imgURL, function(data) {\n // Get the SVG tag, ignore the rest\n var $svg = jQuery(data).find('svg');\n\n // Add replaced image's ID to the new SVG\n if(typeof imgID !== 'undefined') {\n $svg = $svg.attr('id', imgID);\n }\n // Add replaced image's classes to the new SVG\n if(typeof imgClass !== 'undefined') {\n $svg = $svg.attr('class', imgClass + ' replaced-svg');\n }\n\n // Remove any invalid XML tags as per http://validator.w3.org\n $svg = $svg.removeAttr('xmlns:a');\n\n // Replace image with new SVG\n $img.replaceWith($svg);\n updateElements();\n });\n });\n}", "function creditCardSvg() {\n\t\tlet svgElement = document.createElementNS(\"http://www.w3.org/2000/svg\", 'svg');\n\t\tsvgElement.setAttribute('class','align-middle creditCardSvg');\n \tsvgElement.setAttribute('x','0px');\n \tsvgElement.setAttribute('y','0px');\n \tsvgElement.setAttribute('width','30');\n \tsvgElement.setAttribute('height','30');\n \tsvgElement.setAttribute('viewBox','0 0 80 80');\n \tsvgElement.setAttribute('fill','#000000');\n \t\n \tlet pathElement = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement.setAttribute('class','creditCardPath');\n \tpathElement.setAttribute('d','M 11 16 C 8.2504839 16 6 18.250484 6 21 L 6 59 C 6 61.749516 8.2504839 64 11 64 L 69 64 C 71.749516 64 74 61.749516 74 59 L 74 21 C 74 18.250484 71.749516 16 69 16 L 11 16 z M 11 18 L 69 18 C 70.668484 18 72 19.331516 72 21 L 72 26 L 8 26 L 8 21 C 8 19.331516 9.3315161 18 11 18 z M 8 30 L 72 30 L 72 59 C 72 60.668484 70.668484 62 69 62 L 11 62 C 9.3315161 62 8 60.668484 8 59 L 8 30 z M 12 35 A 1 1 0 0 0 11 36 A 1 1 0 0 0 12 37 A 1 1 0 0 0 13 36 A 1 1 0 0 0 12 35 z M 16 35 A 1 1 0 0 0 15 36 A 1 1 0 0 0 16 37 A 1 1 0 0 0 17 36 A 1 1 0 0 0 16 35 z M 20 35 A 1 1 0 0 0 19 36 A 1 1 0 0 0 20 37 A 1 1 0 0 0 21 36 A 1 1 0 0 0 20 35 z M 24 35 A 1 1 0 0 0 23 36 A 1 1 0 0 0 24 37 A 1 1 0 0 0 25 36 A 1 1 0 0 0 24 35 z M 28 35 A 1 1 0 0 0 27 36 A 1 1 0 0 0 28 37 A 1 1 0 0 0 29 36 A 1 1 0 0 0 28 35 z M 32 35 A 1 1 0 0 0 31 36 A 1 1 0 0 0 32 37 A 1 1 0 0 0 33 36 A 1 1 0 0 0 32 35 z M 36 35 A 1 1 0 0 0 35 36 A 1 1 0 0 0 36 37 A 1 1 0 0 0 37 36 A 1 1 0 0 0 36 35 z M 52 43 C 48.145666 43 45 46.145666 45 50 C 45 53.854334 48.145666 57 52 57 C 53.485878 57 54.862958 56.523344 55.996094 55.730469 A 7 7 0 0 0 60 57 A 7 7 0 0 0 67 50 A 7 7 0 0 0 60 43 A 7 7 0 0 0 55.990234 44.265625 C 54.858181 43.47519 53.483355 43 52 43 z M 52 45 C 52.915102 45 53.75982 45.253037 54.494141 45.681641 A 7 7 0 0 0 53 50 A 7 7 0 0 0 54.498047 54.314453 C 53.762696 54.74469 52.916979 55 52 55 C 49.226334 55 47 52.773666 47 50 C 47 47.226334 49.226334 45 52 45 z');\n \t\n \tsvgElement.appendChild(pathElement);\n \t\n \treturn svgElement;\n\t\t\n\t}", "function ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n }", "getSvgRef() {\n return this.svggroup;\n }", "function homesvg(){\n//Background color\nvar bgColor = $(\".headerbgcolor\").css(\"background-color\");\t\n\t\n// Tux image is from creative commons, I didn't create it!\nvar s = Snap(\"#homesvg\");\nvar g = s.group();\nvar svgsource = s.attr(\"data-svgsrc\");\n//Start\nSnap.load(svgsource, function ( loadedFragment ) {\n\ng.append( loadedFragment );\ntestPath();\n\t\t\t\t\t\t\t\t\t\n//Custom\n\n//Path function Start\nfunction testPath(){\t\t\t\t\t\t\t\t\t\nvar someObj = {};\n\nvar testPath = g.selectAll(\"path\");\n//testPath.remove();\ntestPath.forEach(function(el) {\n\nvar lenB = el.getTotalLength();\n\nvar defaultColor = el.attr(\"fill\");\nvar strokeColor = el.attr(\"stroke\");\n\nvar animationTime = 4000;\nvar animationFillTime = 1000;\nel.attr({\nid: \"#fff5e7\",\nfill: bgColor,\nstrokeWidth: \"1\",\nstroke: strokeColor,\nstrokeMiterLimit: \"2\",\n\"stroke-dasharray\": lenB + \" \" + lenB,\n\"stroke-dashoffset\": lenB\n}).animate({\"stroke-dashoffset\": 0}, animationTime ,mina.easeinout,\n\n//Callback\n function(){\nel.attr({fill: bgColor}).animate({fill:defaultColor, stroke:strokeColor}, animationFillTime,mina.easeinout,loadedEl);\n\n\n}\n//Callback\n);\n//console.log(el.attr('fill'))\n});\n//console.log( testPath, someObj );\n}\n//Path Function End\n//Custom\t\t\t\t\t\t\t\t\t\n});\n//End\n}", "function SVGBaseElement() {\n }", "function downloadPNG8x() {\n document.getElementById('svg').removeAttribute('style');\n panZoomInstance.moveTo(0, 0);\n panZoomInstance.zoomAbs(0, 0, 1);\n saveSvgAsPng(document.getElementById(\"svg\"), \"GeometricIllustration.png\", {scale: 8});\n}", "_saveContextSVG(){\n this.getGraphicsContext().saveSVG();\n }", "getSVG () {\n if (this._svg) {\n return this._svg;\n }\n }", "function get_svg()\n {\n var svg = document.getElementById('SVGobject');\n if( svg.contentDocument != null )\n { \n svg = svg.contentDocument.getElementsByTagName('svg');\n\n\t\t // Get viewbox here and check for undefined to fix IE from failing...\n\t\t var viewbox = $(svg).attr(\"viewBox\");\n if( svg != null && viewbox !== undefined )\n {\n clearInterval(get_svg_id);\n svg_elm = svg;\n viewbox = viewbox.split(/ /);\n fullwidth = parseInt(viewbox[2]);\n ratio = parseInt(viewbox[3]) / fullwidth;\n\t fitwidth = $(elm).width();\n chart_resize(fitwidth);\n $(elm).removeClass(\"noshow\"); //Makes chart show on page\n\t\t\t $(\"a.showline\").css(\"display\", \"inline\");;\n return;\n } \n }\n }", "function PersonIconPurple(props) {\n return (\n <Svg\n id=\"\\uB808\\uC774\\uC5B4_1\"\n x=\"0px\"\n y=\"0px\"\n width = {props.size}\n height = {props.size}\n viewBox=\"0 0 73.3 73.3\"\n xmlSpace=\"preserve\"\n enableBackground=\"new 0 0 73.3 73.3\"\n {...props}\n >\n <G transform=\"matrix(1, 0, 0, 1, 41.91, 153.91)\">\n <Circle\n id=\"\\uD0C0\\uC6D0_114-2\"\n cx={-5.2}\n cy={-117.2}\n r={36}\n fill={props.color}\n />\n </G>\n <Circle\n id=\"\\uD0C0\\uC6D0_115\"\n className=\"st1\"\n cx={36.5}\n cy={29.9}\n r={12.4}\n fill=\"white\"\n />\n <Path\n fill=\"white\"\n id=\"\\uD328\\uC2A4_5773\"\n className=\"st1\"\n d=\"M48.5,39.7c-5.4,6.6-15.3,7.6-21.9,2.1c-0.8-0.6-1.5-1.4-2.2-2.1c-6.8,2.7-11.3,8.1-11.3,16.6 c0,0.7,0,1.3,0.1,2c11.3,12.8,31,14,43.8,2.7c0.9-0.8,1.8-1.7,2.7-2.7c0.1-0.6,0.1-1.3,0.1-2C59.9,47.8,55.3,42.5,48.5,39.7z\"\n />\n </Svg>\n );\n}", "function SvgComponent(props) {\n\tconst width = props.style && props.style.width ? props.style.width : 17;\n\tconst height = props.style && props.style.height ? props.style.height : 20;\n\treturn (\n\t\t<Svg\n\t\t\twidth={width}\n\t\t\theight={height}\n\t\t\tviewBox=\"0 0 17 20\"\n\t\t\tpreserveAspectRatio=\"xMinYMin meet\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<Path\n\t\t\t\tfill=\"#FFCC68\"\n\t\t\t\td=\"M16.965 8.286c0-.746-.298-1.458-.824-1.984a2.801 2.801 0 00-1.462-3.744A2.54 2.54 0 0012.143.036c-1.99 0-3.949.349-5.822 1.039L3.25 2.206a2.566 2.566 0 01-.766.115H1.286a.822.822 0 00-.821.822v9.142c0 .453.369.822.821.822h1.195c.093 0 .182.04.243.11l3.375 3.856c.051.059.08.135.08.213v1.284c0 .769.631 1.394 1.407 1.394h.005c2.018-.011 3.659-1.661 3.659-3.71 0-.481-.113-.962-.327-1.39l-.308-.615h2.895c1.278 0 2.413-.817 2.76-1.987.2-.675.153-1.375-.129-1.994a2.799 2.799 0 00.824-1.982zm-9.629 7.706L3.96 12.137a1.964 1.964 0 00-1.479-.672h-.374v-7.5h.377c.431 0 .85-.065 1.292-.203l3.112-1.146a15.157 15.157 0 015.254-.937c.492 0 .893.4.893.893a.89.89 0 01-.059.305.816.816 0 00.076.725.815.815 0 00.621.379 1.167 1.167 0 01.757 1.962.817.817 0 00-.208.707.816.816 0 00.44.588c.406.203.658.605.658 1.049 0 .444-.252.847-.657 1.049a.811.811 0 00-.441.589.814.814 0 00.208.707c.294.314.391.739.265 1.165-.143.478-.63.812-1.186.812H9.285a.817.817 0 00-.699.39.817.817 0 00-.036.798l.903 1.803c.101.202.154.429.154.686 0 1.047-.798 1.915-1.786 2.027v-1.025a1.97 1.97 0 00-.485-1.296zm.25 3.722z\"\n\t\t\t/>\n\t\t</Svg>\n\t);\n}", "function SvgComponent(props) {\n return (\n <Svg\n {...props}\n width={326}\n height={135}\n viewBox=\"0 0 326 135\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <Path\n d=\"M127.383 27.793s-1.175-.169-1.64-1.088c-.478-.933-.155-2.267-.633-2.927-.464-.674-3.861-2.616-7.8-.583-3.254 1.67-3.189 3.523-3.189 3.86 0 .336-.155 3.51 6.599 4.105 3.306.298 5.488-.415 5.488-.415l1.175-2.952z\"\n fill=\"#46676C\"\n />\n <Path\n d=\"M125.757 26.705c-.478-.933-.155-2.267-.633-2.927-.464-.674-3.861-2.616-7.8-.583-1.782.907-2.544 1.878-2.905 2.616.478-.53 1.162-1.1 2.247-1.658 3.939-2.02 7.335-.077 7.8.583.465.674.155 2.008.62 2.94.478.92 1.64 1.088 1.64 1.088l-.814 2.06c.194-.053.31-.092.31-.092l1.175-2.927c-.013-.012-1.175-.18-1.64-1.1z\"\n fill=\"url(#prefix__paint0_linear)\"\n />\n <Path\n d=\"M216.632 27.793s1.175-.169 1.64-1.088c.465-.933.155-2.267.62-2.927.464-.674 3.861-2.616 7.8-.583 3.254 1.67 3.189 3.523 3.189 3.86 0 .336.168 3.51-6.599 4.105-3.306.298-5.488-.415-5.488-.415l-1.162-2.952z\"\n fill=\"#98B1C7\"\n />\n <Path\n d=\"M218.259 26.705c.465-.933.155-2.267.62-2.927.465-.674 3.861-2.616 7.8-.583 1.782.907 2.557 1.878 2.905 2.616-.465-.53-1.162-1.1-2.234-1.658-3.939-2.02-7.322-.077-7.8.583-.465.674-.155 2.008-.62 2.94-.465.92-1.64 1.088-1.64 1.088l.827 2.06c-.194-.053-.31-.092-.31-.092l-1.175-2.927c0-.012 1.162-.18 1.627-1.1z\"\n fill=\"url(#prefix__paint1_linear)\"\n />\n <Path\n d=\"M214.979 27.987h-42.733v39.901h20.534s3.37-13.831 6.754-20.151c4.158-7.81 15.445-19.75 15.445-19.75z\"\n fill=\"url(#prefix__paint2_linear)\"\n />\n <Path\n d=\"M211.505 89.387a2.594 2.594 0 002.583 2.59h10.137a2.594 2.594 0 002.583-2.59V64.366a2.594 2.594 0 00-2.583-2.59h-10.137a2.594 2.594 0 00-2.583 2.59v25.021z\"\n fill=\"#0E1714\"\n />\n <Path\n d=\"M172.246 0c6.07.09 11.403.246 15.123.557 4.674.375 14.605 1.01 18.402 3.963 5.346 4.157 8.769 18.144 12.01 24.309 2.015 3.833 8.381 10.49 8.73 14.893.826 10.102-.168 34.424-2.648 37.092-1.717 1.864-26.46 1.916-51.617 1.489V0z\"\n fill=\"#BFD2E1\"\n />\n <Path\n d=\"M226.64 45.38l-28.966 13.015-4.882 21.085s26.371 6.773 31.872-10.776c.93-2.965 1.976-23.324 1.976-23.324z\"\n fill=\"url(#prefix__paint3_linear)\"\n />\n <Path\n d=\"M197.661 53.966s20.43.739 24.175-2.175c1.743-1.36 2.518-5.712 1.408-7.046-1.395-1.67-6.199-1.152-8.265-1.049-3.474.182-13.883 2.228-13.883 2.228l-3.435 8.042z\"\n fill=\"#46676C\"\n />\n <Path\n d=\"M213.791 53.656s-8.666 1.385-15.097 6.436c-3.745 2.94-5.062 7.796-5.062 7.796h-.84l4.081-13.831 16.918-.401z\"\n fill=\"url(#prefix__paint4_linear)\"\n />\n <Path\n d=\"M226.795 44.538c.168 1.904-7.167 1.179-16.065 3.225-10.564 2.448-38.445 7.55-38.445 7.55v-13.34c12.359 0 28.527.843 34.584 0 6.56-.906 16.297-1.618 18.725 0 0 .014 1.033.661 1.201 2.565z\"\n fill=\"url(#prefix__paint5_linear)\"\n />\n <Path\n d=\"M214.992 27.987h-42.733v39.901h20.534s3.357-13.831 6.754-20.151c4.158-7.81 15.445-19.75 15.445-19.75z\"\n fill=\"url(#prefix__paint6_linear)\"\n />\n <Path\n d=\"M210.601 48.242c0 2.046 1.55 3.717 3.461 3.717 1.911 0 3.448-1.67 3.448-3.717 0-2.06-1.55-3.717-3.448-3.717-1.924 0-3.461 1.658-3.461 3.717z\"\n fill=\"url(#prefix__paint7_linear)\"\n />\n <Path\n d=\"M202.478 49.11c0 2.046 1.55 3.717 3.461 3.717 1.911 0 3.461-1.671 3.461-3.717 0-2.06-1.55-3.73-3.461-3.73-1.911 0-3.461 1.67-3.461 3.73z\"\n fill=\"url(#prefix__paint8_linear)\"\n />\n <Path\n d=\"M223.257 44.758s-2.57-2.525-11.3-.75c-8.73 1.76-10.848 1.929-10.848 1.929l-3.435 8.03s1.059-3.601 5.062-5.298c13.818-5.853 20.521-3.91 20.521-3.91z\"\n fill=\"url(#prefix__paint9_linear)\"\n />\n <Path\n d=\"M221.72 50.923c1.252-.984 2.001-3.51 1.898-5.349.478 1.787-.297 5.077-1.769 6.217-3.745 2.914-24.175 2.175-24.175 2.175l.362-.842c3.009.091 20.274.467 23.684-2.201z\"\n fill=\"url(#prefix__paint10_linear)\"\n />\n <Path\n d=\"M133.027 89.387a2.595 2.595 0 01-2.583 2.59h-10.138a2.594 2.594 0 01-2.582-2.59V64.366a2.594 2.594 0 012.582-2.59h10.138a2.595 2.595 0 012.583 2.59v25.021z\"\n fill=\"#0E1714\"\n />\n <Path\n d=\"M172.272 0c-6.069.09-11.403.246-15.122.557-4.675.375-14.606 1.01-18.402 3.963-5.347 4.157-8.769 18.144-12.01 24.309-2.015 3.833-8.382 10.49-8.73 14.893-.827 10.102.181 34.424 2.647 37.092 1.731 1.864 26.461 1.916 51.617 1.489V0z\"\n fill=\"#BFD2E1\"\n />\n <Path\n d=\"M129.54 27.987h42.732v39.901h-20.533s-3.358-13.831-6.754-20.151c-4.158-7.81-15.445-19.75-15.445-19.75z\"\n fill=\"url(#prefix__paint11_linear)\"\n />\n <Path\n d=\"M117.892 45.38l28.966 13.015 4.881 21.085s-26.37 6.773-31.872-10.776c-.929-2.965-1.975-23.324-1.975-23.324z\"\n fill=\"url(#prefix__paint12_linear)\"\n />\n <Path\n d=\"M130.741 53.656s8.678 1.385 15.109 6.436c3.745 2.94 5.062 7.796 5.062 7.796h.84l-4.081-13.831-16.93-.401z\"\n fill=\"url(#prefix__paint13_linear)\"\n />\n <Path\n d=\"M172.195 74.26h26.512c.839 0 1.576-.53 1.847-1.334l.826-2.473c.426-1.256-.516-2.565-1.846-2.565h-27.339v6.372z\"\n fill=\"#1D2C2C\"\n />\n <Path\n d=\"M172.272 74.26h-26.887a1.947 1.947 0 01-1.885-1.463l-.646-2.474a1.944 1.944 0 011.886-2.434h27.532v6.371z\"\n fill=\"#1D2C2C\"\n />\n <Path d=\"M188.828 58.667H155.91v7.201h32.918v-7.2z\" fill=\"#ECEBF3\" />\n <Path\n d=\"M117.737 44.538c-.168 1.904 7.167 1.179 16.064 3.225 10.551 2.448 38.445 7.55 38.445 7.55v-13.34c-12.358 0-28.527.843-34.583 0-6.548-.906-16.298-1.618-18.725 0 0 .014-1.034.661-1.201 2.565z\"\n fill=\"url(#prefix__paint14_linear)\"\n />\n <Path d=\"M159.035 58.667h-3.125v7.201h3.125v-7.2z\" fill=\"#0074A6\" />\n <Path\n d=\"M204.996 7.2s-24.239-1.8-32.724-1.838h-.026C163.775 5.4 139.522 7.2 139.522 7.2l-9.982 20.786H214.979L204.996 7.2z\"\n fill=\"#1D2C2C\"\n />\n <Path\n d=\"M146.857 53.966s-20.429.739-24.174-2.175c-1.731-1.36-2.519-5.699-1.408-7.046 1.395-1.67 6.199-1.152 8.265-1.049 3.474.182 13.882 2.228 13.882 2.228l3.435 8.042z\"\n fill=\"#46676C\"\n />\n <Path\n d=\"M133.944 48.242c0 2.046-1.55 3.717-3.461 3.717-1.912 0-3.461-1.67-3.461-3.717 0-2.06 1.549-3.717 3.461-3.717 1.911 0 3.461 1.658 3.461 3.717z\"\n fill=\"url(#prefix__paint15_linear)\"\n />\n <Path\n d=\"M142.054 49.11c0 2.046-1.55 3.717-3.461 3.717-1.912 0-3.461-1.671-3.461-3.717 0-2.06 1.549-3.73 3.461-3.73 1.911 0 3.461 1.67 3.461 3.73z\"\n fill=\"url(#prefix__paint16_linear)\"\n />\n <Path\n d=\"M121.275 44.758s2.57-2.525 11.313-.75c8.729 1.76 10.847 1.929 10.847 1.929l3.435 8.03s-1.058-3.601-5.062-5.298c-13.818-5.853-20.533-3.91-20.533-3.91z\"\n fill=\"url(#prefix__paint17_linear)\"\n />\n <Path\n d=\"M122.812 50.923c-1.253-.984-2.002-3.51-1.899-5.349-.477 1.787.31 5.077 1.77 6.217 3.745 2.914 24.175 2.175 24.175 2.175l-.362-.842c-2.996.091-20.262.467-23.684-2.201z\"\n fill=\"url(#prefix__paint18_linear)\"\n />\n <Path\n d=\"M171.73 5.802h.026c8.471.039 32.711 1.852 32.711 1.852l9.776 20.333h.736L204.996 7.2s-24.239-1.8-32.724-1.84h-.026c-8.484.04-32.724 1.84-32.724 1.84l-.206.414c2.854-.207 24.498-1.774 32.414-1.813zM172.272 45.095h-17.305a2.66 2.66 0 00-2.66 2.668v4.921a2.666 2.666 0 002.648 2.668c4.997.013 15.509.039 17.304-.013 1.795.052 12.294.026 17.292.013a2.657 2.657 0 002.647-2.668v-4.921a2.66 2.66 0 00-2.66-2.668h-17.266z\"\n fill=\"#46676C\"\n />\n <Path\n d=\"M203.304 72.913l5.437-4.752a9.358 9.358 0 016.16-2.319h5.075a.76.76 0 01.685 1.088l-.827 1.748a9.694 9.694 0 01-8.755 5.57h-7.284c-.684.012-1.02-.868-.491-1.335zM141.007 72.913l-5.436-4.752a9.358 9.358 0 00-6.16-2.319h-5.075a.76.76 0 00-.685 1.088l.827 1.748a9.694 9.694 0 008.755 5.57h7.284c.697.012 1.02-.868.49-1.335z\"\n fill=\"#80979A\"\n />\n <Path\n d=\"M311.201 22.444c1.498 1.347.826 2.992-.581 4.377-1.421 1.386-10.758 7.37-11.558 7.719-.582.259-2.299-2.992-1.821-3.782.529-.88 7.503-6.902 8.872-7.835 1.356-.932 3.331-2.06 5.088-.48z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M309.483 22.276c-.762-.117-3.913.53-4.946 1.554-1.472 1.45-4.507 4.002-4.507 4.002s.375 1.528 1.627 2.849c1.46 1.54 2.919 1.878 2.919 1.878s6.263-5.388 6.857-6.968c.181-.466.155-3.005-1.95-3.316z\"\n fill=\"#9A9393\"\n />\n <Path\n d=\"M313.551 14.634s.245 5.816.594 6.1c1.046.881 4.856 1.62 5.579 3.147.865 1.852-3.874 10.154-4.494 12.9-.62 2.745.658 7.006 1.072 9.7.413 2.694-8.033 5.957-8.343 5.957-.31 0-3.035-2.551-3.538-3.432-.517-.88 0-7.783 0-9.545 0-1.761-.4-7.938-.491-8.34-.529-2.694.168-4.818.271-5.388.104-.57.078-1.528.362-1.89.568-.726 3.732-1.684 3.784-2.047.051-.362.477-5.413.477-5.413l4.727-1.748z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M314.132 20.734l-5.088 3.044-.723-1.995s-3.345 1.321-3.784 2.047c-.439.725-.646 2.292-.788 2.888-.142.582-.232 3.276 0 5.62.129 1.373.104 3.173.31 5.505.181 1.994-.039 6.954-.039 6.954s1.899.078 4.843-.065c3.41-.168 6.845-.686 7-.816.658-.543-.246-5.827-.13-6.41.117-.583 4.314-10.724 4.378-12.045.065-1.333-.607-2.201-1.614-2.706-1.007-.505-4.365-2.02-4.365-2.02z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M317.98 22.509s3.319 1.839.026 4.39c-1.42 1.1-8.226 2.81-9.504 3.199-4.572 1.399 2.466 11.565 3.009 12.33.542.763.529 1.812.529 1.812l3.474-.233c1.369.272.207-6.566.723-7.978.517-1.411 3.836-9.519 3.836-10.58.025-2.37-2.093-2.94-2.093-2.94z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M308.605 18.572l5.153-1.865.129 3.056-1.589.971-3.693-2.162z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M306.694 9.532c1.123-1.36 4.752-2.966 6.947-.725 2.196 2.24 1.718 4.804.93 6.462-.62 1.295-1.291 2.06-2.699 2.94-.284.181-2.996 1.049-3.577.932-.4-.077-1.072-2.81-1.175-2.784-.103.026-.439-.09-.491-.324-.064-.324.013-2.37-.103-2.564-.116-.194-1.124-2.383.168-3.937z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M306.087 10.879s1.95-1.49 4.92.557c.633.44-.129 2.797.039 2.965.18.195 1.872-1.903 1.833-1.644-.413 2.655.607 3.95.853 3.937.71-.052 2.389-3.95.917-6.709-1.473-2.758-4.624-2.629-5.347-2.37-.736.26-2.97.725-3.215 3.264z\"\n fill=\"#8D3B26\"\n />\n <Path\n d=\"M311.717 13.495c-.142.842-.103 1.955.349 2.033.452.065.943-.557 1.072-1.412.142-.841-.129-1.592-.581-1.657-.452-.065-.711.194-.84 1.036z\"\n fill=\"#FFBD95\"\n />\n <Path d=\"M308.32 94.023h3.293V93.4h-3.293v.622z\" fill=\"#191919\" />\n <Path\n d=\"M311.485 89.063c.426.609.723 1.775.762 2.318.051.648-.336 2.02-.762 2.02-1.24 0-2.738.053-4.016.22-1.279.17-1.77.92-5.05.907-.955 0-2.647-.064-2.647-.453 0-1.71 3.151-1.1 4.158-2.02 2.531-2.344 4.21-2.901 4.21-2.901s3.254-.22 3.345-.09zM312.737 95.163l3.293-.207-.038-.635-3.293.207.038.635z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M315.566 89.853c.465.596.839 1.788.917 2.344.09.674-.207 2.111-.633 2.137-1.24.078-2.725.22-3.991.48-1.265.258-1.704 1.049-4.984 1.256-.956.052-2.674.103-2.674-.298 0-2.047 3.074-1.334 4.004-2.344 2.376-2.565 4.016-3.251 4.016-3.251s3.254-.453 3.345-.324z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M309.974 44.396s4.326 4.053 4.533 5.97c.206 1.917-1.653 8.055-2.299 12.886-.659 4.83-1.059 5.802-.891 6.942.168 1.14 1.588 5.763 1.408 8.832-.181 3.07-.801 11.112-.801 11.112s-.904.415-2.48.57c-1.575.155-2.673-1.204-2.673-1.204s-1.265-17.95-1.472-19.841c-.129-1.23-1.124-9.688-1.433-16.577-.104-2.215.154-7.343.154-8.263l5.954-.427z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M316.134 43.981s1.084 2.862 1.059 5.245c-.026 1.93-.581 5.466-1.227 10.296-.659 4.83-.71 9.312-.555 10.452.167 1.14 1.523 5.97 1.498 9.04-.026 3.613.284 11.94.284 11.94s-1.434.466-3.009.622c-1.576.155-3.681-.311-3.681-.311s-1.498-19.103-2.208-20.877c-1.137-2.823-1.304-11.72-2.092-17.782-.323-2.447-.904-7.913-.904-7.913l10.835-.712zM314.184 43.463l2.234-7.835s.775 6.98-.194 7.706c-.956.712-2.04.13-2.04.13z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M309.276 22.573l-.232 1.205 2.686-1.58-2.454.375z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M314.842 21.045l-.955-1.282-4.611 2.81.724 1.645 4.842-3.173z\"\n fill=\"#D7D4D4\"\n />\n <Path\n d=\"M309.044 23.778l-.426-1.502-.646.505 1.072.997z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M308.618 22.276l-1.098 1.256-.168-1.334.917-.88.349.957z\"\n fill=\"#CFCCCC\"\n />\n <Path\n d=\"M304.046 43.981c-1.64-1.696-.439-15.347-.439-15.347l7.025.544 1.486 14.389s-6.419 2.124-8.072.414z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M303.788 43.567l.22 1.839s4.326.31 8.42 0c4.08-.311 4.003-.583 4.003-.583l-.194-1.49s-1.253.117-4.107.234c-2.789.103-8.342 0-8.342 0z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M312.118 43.567l.981 6.087 1.085-6.19-2.066.103z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M310.632 29.178c.168-1.334 2.235-6.98 6.083-6.902.4.012 1.278.233 1.278.233l-2.208-1.024s-.865-.336-2.596.946c-1.73 1.282-3.809 4.287-4.067 6.644-.259 2.344 1.304 1.696 1.51.103zM303.607 28.634s.336-4.856 2.015-5.607c.723-.324 1.033-.518 1.033-.518s-1.24 2.344-1.524 4.286c-.284 1.943-.361 3.329-.994 3.316-.633-.026-.53-1.477-.53-1.477z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M318.484 24.296c1.95.518 2.131 2.24 1.524 4.08-.594 1.838-6.302 11.979-6.896 12.186-.594.22-3.28-.88-3.358-1.774-.077-.894 3.707-10.4 4.469-11.824.761-1.425 1.975-3.277 4.261-2.668z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M317.877 23.182c-.749.168-2.957 1.697-3.564 3.018-.865 1.878-3.5 6.656-3.5 6.656s.891 1.295 2.531 2.085c1.912.933 3.397.726 3.397.726s3.964-7.253 3.964-8.95c-.013-.491-.749-3.988-2.828-3.535z\"\n fill=\"#CFCCCC\"\n />\n <Path\n d=\"M313.37 39.176c1.007 1.943-3.241 3.73-5.372 4.494-2.118.764-8.523 2.383-8.523 2.383l-.943-2.214s4.907-3.523 10.641-5.945c.594-.246 3.164-.7 4.197 1.282z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M298.842 43.36l3.061-1.71 1.304 3.445-3.177.855-1.188-2.59z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M300.405 32.235c.839 1.657-3.319 3.574-5.424 4.248-2.118.673-8.472 2.007-8.472 2.007l-.865-2.253s5.14-3.109 10.964-5.53c.826-.35 2.544-.907 3.797 1.528z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M282.7 40.433a.431.431 0 01.142-.583l1.549-.946a.43.43 0 01.581.143.434.434 0 01-.142.583l-1.549.945a.407.407 0 01-.581-.142z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M282.222 39.798a.431.431 0 01.142-.583l1.549-.945a.43.43 0 01.582.142.436.436 0 01-.142.583l-1.55.946a.43.43 0 01-.581-.143z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M281.783 39.138a.431.431 0 01.142-.583l1.549-.946a.43.43 0 01.582.143.435.435 0 01-.143.583l-1.549.945c-.194.13-.452.065-.581-.142z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M281.434 38.477a.432.432 0 01.142-.583l1.55-.945a.43.43 0 01.581.142.436.436 0 01-.142.583l-1.55.946a.435.435 0 01-.581-.143z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M287.193 35.602s-2.983.389-3.512.635c-.53.246-2.234 1.787-2.234 1.787s.994.298 1.201.777c.206.479.632 1.787.632 1.787s1.912-.57 2.674-1.1c.761-.532 1.394-1.231 1.394-1.231l-.155-2.655z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M285.967 35.783l3.112-1.606 1.188 3.484-3.215.738-1.085-2.616z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M314.959 10.53s-.943-3.912-5.063-3.394c-4.119.518-4.055 4.818-4.055 4.818s2.273.181 5.321-.208c3.073-.388 3.797-1.217 3.797-1.217z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M312.518 11.513s-7.929 2.228-8.046 2.176c-.116-.052-.658-.414-.891-.492-.245-.078-.555.194-.645.052-.091-.143 2.944-1.67 2.944-1.67s1.718.18 2.57.245c.839.078 4.029-.583 4.068-.31z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M300.534 45.781s-1.33 1.166-2.376.44c-1.046-.724-1.576-2.097-1.757-2.421-.749-1.334-2.376-2.111-2.944-2.85-.568-.738-.245-1.113.013-.906 1.511 1.127 2.699 1.386 3.319 1.956.62.583 3.357 2.11 3.357 2.11l.388 1.671z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M263.742 28.88h-6.044v7.136l13.108 4.041-7.064-11.177z\"\n fill=\"#807D79\"\n />\n <Path d=\"M257.84 15.178h-2.144v25.255h2.144V15.178z\" fill=\"#00233F\" />\n <Path d=\"M257.853 22.133h.736l-.491-6.954h-.245v6.954z\" fill=\"#65635E\" />\n <Path\n d=\"M258.728 6.005l-1.174.068 1.243 21.71 1.173-.068-1.242-21.71z\"\n fill=\"#807D79\"\n />\n <Path\n d=\"M259.493 27.663l.413-.026-1.278-21.615-.413.026 1.278 21.615z\"\n fill=\"url(#prefix__paint19_linear)\"\n />\n <Path\n d=\"M261.495 28.88h-3.797v7.136l9.931 3.057-6.134-10.192zM288.395 96.096h-30.697v-60.08l30.697 9.48v50.6z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M257.698 28.88v46.365l30.697 11.539V81.72s-15.639-3.782-21.308-16.486c-5.67-12.705-7.181-36.366-7.181-36.366h-2.208v.013z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M278.709 74.222c9.514 0 17.227-7.735 17.227-17.277 0-9.541-7.713-17.276-17.227-17.276s-17.227 7.735-17.227 17.276c0 9.542 7.713 17.277 17.227 17.277z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M280.799 69.622c7.097-1.151 11.919-7.855 10.771-14.972-1.148-7.117-7.832-11.954-14.929-10.803-7.097 1.152-11.92 7.855-10.772 14.973 1.148 7.117 7.832 11.954 14.93 10.802z\"\n fill=\"#000\"\n />\n <Path\n d=\"M278.709 68.976c6.626 0 11.997-5.386 11.997-12.031 0-6.645-5.371-12.031-11.997-12.031-6.626 0-11.997 5.386-11.997 12.031 0 6.645 5.371 12.031 11.997 12.031z\"\n fill=\"#46676C\"\n />\n <Path\n d=\"M266.467 56.944c0 6.786 5.475 12.277 12.242 12.277 6.767 0 12.243-5.49 12.243-12.277 0-6.786-5.476-12.277-12.243-12.277-6.754 0-12.242 5.504-12.242 12.277zm2.996-.155c0-5.129 4.145-9.286 9.259-9.286 5.114 0 9.259 4.157 9.259 9.286 0 5.128-4.145 9.285-9.259 9.285-5.127 0-9.259-4.157-9.259-9.285z\"\n fill=\"url(#prefix__paint20_linear)\"\n />\n <Path\n d=\"M278.709 44.655c-2.634.026-1.575 10.451-1.575 10.451s-9.169-4.43-9.996-2.007c-.839 2.447 9.221 4.597 9.221 4.597s-6.845 7.512-4.804 9.053c2.053 1.554 7.412-7.162 7.412-7.162s4.882 8.612 6.897 7.162c2.014-1.438-4.456-8.871-4.456-8.871s9.712-2.383 8.885-4.78c-.814-2.356-9.802 1.749-9.802 1.749s.801-10.218-1.782-10.192z\"\n fill=\"url(#prefix__paint21_linear)\"\n />\n <Path\n d=\"M278.709 61.141a4.19 4.19 0 004.184-4.196 4.19 4.19 0 00-4.184-4.196 4.19 4.19 0 00-4.184 4.196 4.19 4.19 0 004.184 4.196z\"\n fill=\"url(#prefix__paint22_linear)\"\n />\n <Path\n d=\"M279.768 54.562c0 .389.31.7.698.7.387 0 .697-.311.697-.7 0-.388-.31-.7-.697-.7a.713.713 0 00-.698.7zM276.165 54.562c0 .389.31.7.698.7.387 0 .697-.311.697-.7 0-.388-.31-.7-.697-.7a.704.704 0 00-.698.7zM275.158 57.722c0 .389.31.7.697.7.388 0 .698-.311.698-.7 0-.388-.31-.7-.698-.7-.387-.012-.697.312-.697.7zM280.866 57.722c0 .389.31.7.697.7.388 0 .698-.311.698-.7 0-.388-.31-.7-.698-.7-.374-.012-.697.312-.697.7zM278.115 59.859c0 .389.31.7.698.7.387 0 .697-.311.697-.7 0-.389-.31-.7-.697-.7a.696.696 0 00-.698.7z\"\n fill=\"#46676C\"\n />\n <Path\n d=\"M264.323 80.088c-6.896-4.092-11.519-11.617-11.519-20.229 0-12.977 10.486-23.493 23.426-23.493 11.88 0 21.695 8.871 23.219 20.372h2.337c-1.536-12.783-12.384-22.703-25.556-22.703-14.219 0-25.751 11.565-25.751 25.824 0 9.946 5.618 18.572 13.831 22.884v-2.655h.013z\"\n fill=\"#3D3D3D\"\n />\n <Path\n d=\"M294.722 96.096h-39.129v-25.06l39.129 18.791v6.269z\"\n fill=\"#E5C77A\"\n />\n <Path d=\"M302.187 56.116h-51.256v1.658h51.256v-1.658z\" fill=\"#CFCCCC\" />\n <Path\n d=\"M274.628 56.398L251.15 61.1l.543 2.731 23.478-4.701-.543-2.73z\"\n fill=\"#9A9393\"\n />\n <Path\n d=\"M278.709 56.738l-4.068-.337.543 2.733 3.641-1.878-.116-.518z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M278.709 58.94a1.992 1.992 0 001.989-1.995 1.992 1.992 0 00-1.989-1.994 1.992 1.992 0 00-1.989 1.994c0 1.102.891 1.995 1.989 1.995zM252.016 64.547a1.992 1.992 0 001.989-1.994 1.992 1.992 0 00-1.989-1.995 1.992 1.992 0 00-1.989 1.995c0 1.101.891 1.994 1.989 1.994zM302.187 55.274h-3.306v3.666h3.306v-3.666zM254.207 53.166l-3.196-.454-.977 6.911 3.197.455.976-6.912z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M54.484 31.846c-1.123-2.11-5.14.622-7.116 2.02-1.962 1.4-7.955 6.126-7.955 6.126l1.628 1.71s6.353-1.852 12.023-5.349c1.343-.816 2.556-2.357 1.42-4.507z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M64.647 22.25c1.782 1.32 1.227 3.186-.18 4.856-1.408 1.67-10.332 8.716-11.042 8.703-.697-.013-3.009-2.227-2.686-3.199.31-.971 6.986-8.12 8.381-9.298 1.395-1.166 3.435-2.604 5.527-1.062z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M61.367 20.566c-.84-.039-1.717 1.49-2.75 2.72-1.46 1.748-5.618 6.048-5.618 6.048s.568 1.619 2.092 2.94c1.756 1.528 3.396 1.748 3.396 1.748s6.276-6.553 6.754-8.353c.142-.531-1.55-5-3.874-5.103z\"\n fill=\"#9A9393\"\n />\n <Path\n d=\"M62.684 10.71s3.229 5.35 3.526 5.725c1.136 1.398 1.898 1.152 3.345 2.305 1.743 1.399 5.862 8.923 7.8 13.857 1.136 2.875 2.647 9.74 2.427 12.718-.297 3.989-6.74 4.947-7.05 5.103-.31.155-2.79-1.787-3.72-2.41-.93-.62-.478-7.33-1.33-9.065-.852-1.735-6.25-6.954-6.534-7.304-1.821-2.396-2.17-4.83-2.338-5.452-.168-.609-.658-1.542-.555-2.034.206-.997 2.867-3.47 2.738-3.859-.13-.389-2.144-5.569-2.144-5.569l3.835-4.015z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M66.223 16.435l-4.326 5.374-.891-1.502s-2.66 2.927-2.738 3.86c-.078.919.478 2.577.62 3.224.142.648 1.369 3.342 2.712 5.543.787 1.282 2.97 2.513 4.3 4.701 1.136 1.878.736 5.038.736 5.038s2.79-.544 5.98 0c3.848.648 6.973-.816 7.05-1.023.388-.855-2.389-10.024-2.557-10.659-.168-.634-3.796-8.43-4.623-9.635-1.2-1.748-2.647-3.562-4.61-4.183-1.163-.363-1.653-.738-1.653-.738z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M66.597 16.862s2.131 2.551.117 6.657c-.866 1.774-.44 3.885-1.511 4.895-3.836 3.6 4.377 14.052 5.281 14.557.904.492 3.81-.052 3.81-.052l5.398-1.256c1.472-.401-2.466-9.402-2.634-11.047-.168-1.645-3.707-7.796-4.275-8.82-2.686-4.804-6.186-4.934-6.186-4.934z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M59.714 16.992l4.184-4.339 1.602 2.953-1.098 1.735-4.688-.35z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M54.573 9.078c.685-1.8 3.9-4.753 6.974-3.199 3.06 1.554 3.474 4.403 3.228 6.41-.194 1.568-.62 2.59-1.77 4.016-.232.284-2.75 2.15-3.395 2.227-.44.065-2.105-2.551-2.209-2.486-.103.064-.49.051-.62-.156-.18-.31-.813-2.474-1.007-2.642-.18-.168-1.989-2.098-1.2-4.17z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M54.432 10.684s1.511-2.24 5.308-1.152c.814.233.84 2.953 1.085 3.07.258.129 1.278-2.643 1.33-2.358.503 2.914 2.027 3.898 2.26 3.795.723-.298 1.097-4.947-1.408-7.305-2.505-2.357-5.734-1.1-6.392-.57-.672.519-2.815 1.8-2.183 4.52z\"\n fill=\"#8D3B26\"\n />\n <Path\n d=\"M61.2 11.436c.154.932.58 2.072 1.084 1.981.504-.09.775-.906.62-1.839-.155-.932-.685-1.606-1.188-1.528-.504.09-.672.453-.517 1.386z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M84.517 95.9l3.365-1.327-.246-.627-3.365 1.327.246.627z\"\n fill=\"#000\"\n />\n <Path\n d=\"M85.762 89.555c.684.44 1.459 1.529 1.717 2.06.31.647.465 2.201.026 2.37-1.278.505-2.777 1.152-4.016 1.852-1.24.699-.44 1.217-3.797 2.538-.981.388-3.822.44-3.99.039-.685-1.749 2.867-1.399 3.525-2.746 1.653-3.406 3.151-4.662 3.151-4.662s3.242-1.541 3.384-1.45z\"\n fill=\"#000\"\n />\n <Path\n d=\"M72.99 99.411l3.616.117.025-.7-3.615-.116-.026.699z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M76.631 93.894c.452.7.737 2.046.762 2.655.04.738-.439 2.28-.904 2.266-1.368-.039-3.009-.039-4.416.117-1.42.155-1.963.984-5.579.855-1.059-.04-2.931-.156-2.893-.61.207-2.24 3.5-1.139 4.623-2.162 2.854-2.564 4.727-3.147 4.727-3.147s3.577-.117 3.68.026z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M71.905 42.829s5.695 3.16 6.418 5.141c.723 1.995.917 7.913 1.511 13.236.594 5.323.814 6.941 1.291 8.107.478 1.166 3.126 6.294 3.746 9.623.62 3.328 3.008 11.694 3.008 11.694s-2.143.933-3.783 1.529c-1.64.582-3.565-.428-3.565-.428s-6.147-18.779-6.87-20.747c-.465-1.27-3.784-10.011-5.953-17.277-.698-2.33-1.795-7.874-2.04-8.845l6.237-2.033z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M80.002 43.062s.969 3.224.749 5.828c-.18 2.11-1.059 5.944-2.144 11.19-1.085 5.244-1.51 10.153-1.407 11.409.09 1.256 1.2 6.657.942 10.024-.297 3.963-.607 13.106-.607 13.106s-1.6.402-3.344.453c-1.744.04-4.017-.621-4.017-.621s-.167-21.058-.813-23.053c-1.033-3.186-.53-12.95-.917-19.646-.155-2.707-.387-8.742-.387-8.742l11.945.052zM77.845 42.246l-.8-11.643s1.976 4.675 2.905 9.325c.078.388.388 1.437-.27 1.722-.814.337-1.835.596-1.835.596z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M62.31 20.618l-.426 1.191 2.66-2.758-2.234 1.567zM61.884 21.81l-.891-1.503-.259.88 1.15.622z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M61.122 20.54l-.207 1.464-.671-.83.58-1.294.298.66z\"\n fill=\"#CFCCCC\"\n />\n <Path\n d=\"M65.564 42.829c-.684-.13-.297-2.396-1.02-3.86-1.937-3.976-4.881-9.622-4.881-9.622l7.18-2.888 8.82 15.903c.013.013-4.262 1.567-10.099.467z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M65.564 42.829l.116 2.072s5.708.401 10.125-.48c4.416-.88 4.287-1.165 4.287-1.165l-.4-1.593s-1.343.298-4.455.803c-3.022.466-9.673.363-9.673.363z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M75.676 42.375l1.188 8.237 1.007-8.677-2.195.44z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M65.797 27.041c-.478-1.398-.556-9.544 4.571-8.353l-1.666-1.191s-2.014-.635-3.68 2.214c-1.55 2.642-1.679 5.504-.788 7.952.891 2.448 2.13 1.05 1.563-.622zM59.663 29.347s-2.015-4.948-.737-6.502c.556-.66.775-1.023.775-1.023s-.09 2.914.568 4.96c.672 2.047 1.253 3.458.62 3.743-.633.298-1.227-1.178-1.227-1.178z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M68.65 20.579c2.183.375 2.545 2.24 2.08 4.3-.478 2.072-6.083 14.673-6.716 14.97-.632.299-3.68-.634-3.848-1.605-.168-.971 3.397-12.692 4.094-14.324.684-1.619 1.834-3.768 4.39-3.341z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M67.902 19.737c-1.098.169-3.074 2.15-3.603 3.665-.762 2.15-3.177 7.628-3.177 7.628s1.097 1.321 2.983 2.034c2.182.828 3.784.453 3.784.453s3.267-8.34 3.448-10.193c.129-1.256-.775-3.988-3.435-3.587z\"\n fill=\"#CFCCCC\"\n />\n <Path\n d=\"M64.35 38.775c.414 2.383-4.83 3.328-7.257 3.574-2.428.247-9.57.22-9.57.22l-.361-2.292s6.38-2.033 12.914-3.535c.671-.143 3.642-1.632 4.274 2.033z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M41.764 40.446s.013 1.864-1.318 2.279c-1.343.414-2.931-.22-3.331-.272-1.666-.259-3.345 1.01-4.378.997-1.033-.013-1.06-.544-.698-.647 2.015-.557 2.97-1.528 3.9-1.684.93-.155 4.133-1.49 4.133-1.49l1.692.817z\"\n fill=\"#9A9393\"\n />\n <Path\n d=\"M41.39 41.65s0 .958-1.538 1.554c-.839.324-1.962-.078-2.698.143-.737.22-.608-.182-.569-.285.039-.104.956-.376 1.356-.544.4-.156 1.705-1.58 3.448-.868z\"\n fill=\"#9A9393\"\n />\n <Path\n d=\"M67.062 16.409l-1.562-.803-3.19 5.012 1.498 1.58 3.254-5.79z\"\n fill=\"#D7D4D4\"\n />\n <Path\n d=\"M47.407 40.2l-3.306 1.243s-.568 1.917-.516 2.344c.051.414.955 2.033 1.084 2.266.117.233.427.467.53.389.103-.078-.168-1.075.723-1.84.891-.763 1.705-1.281 2.092-1.89.878-1.373-.607-2.512-.607-2.512z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M46.206 41.572s-1.253 1.23-1.15 1.541c.104.311.401 2.163.44 2.37.026.208.064.493.503-.051.44-.544.22-1.373.427-1.49.206-.116 1.278-.22 1.782-.971.516-.738.245-1.399.09-1.645-.168-.246-1.86-.427-2.092.246z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M48.195 42.971l4.08-.026-.606-4.131-4.43 1.45.956 2.707z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M45.044 40.303l-2.08-3.082-3.55 2.784 1.975 1.645 3.655-1.347z\"\n fill=\"#9A9393\"\n />\n <Path\n d=\"M63.692 7.524s-2.157-3.885-6.393-2.11c-4.236 1.774-2.892 6.332-2.892 6.332s2.466-.479 5.617-1.8c3.138-1.32 3.668-2.422 3.668-2.422z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M61.38 9.312s-7.8 4.74-7.942 4.714c-.142-.026-.814-.246-1.098-.26-.284-.012-.53.376-.671.247-.13-.13 2.647-2.655 2.647-2.655s1.886-.31 2.802-.492c.93-.194 4.133-1.826 4.262-1.554z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M24.122 52.865v-6.812a2.655 2.655 0 012.648-2.655h28.178a2.655 2.655 0 012.647 2.655v6.813a2.655 2.655 0 01-2.647 2.654H26.77c-1.46.013-2.648-1.191-2.648-2.655z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M57.589 49.9v-.868H24.116v.867h33.473zM57.59 51.894v-.363H24.115v.363H57.59zM57.593 53.31v-.363H24.12v.362h33.473zM57.6 46.064V45.7H24.127v.363H57.6zM57.59 47.479v-.363H24.119v.363H57.59z\"\n fill=\"#000\"\n />\n <Path\n d=\"M57.57 53.137c-.129.013-.258.039-.387.039H29.005a2.655 2.655 0 01-2.648-2.655v-6.812c0-.09.013-.169.026-.26a2.657 2.657 0 00-2.26 2.617v6.812a2.655 2.655 0 002.647 2.655H54.95c1.369 0 2.48-1.062 2.621-2.396z\"\n fill=\"#979797\"\n />\n <Path d=\"M52.03 56.116H29.69v1.658h22.34v-1.658z\" fill=\"#625757\" />\n <Path d=\"M47.872 57.774H33.809v3.704h14.063v-3.704z\" fill=\"#3D3D3D\" />\n <Path\n d=\"M47.872 57.774H33.809v3.69h14.063l-12.126-1.022v-1.05l12.126-1.618z\"\n fill=\"#2C2C2C\"\n />\n <Path\n d=\"M61.56 100.512H10.732v-7.007l-2.389-2.318V61.374H63.95v29.813l-2.39 2.318v7.007z\"\n fill=\"#E5C77A\"\n />\n <Path\n d=\"M63.95 91.187H8.342v2.318H63.95v-2.318zM40.86 19.012H23.245v2.85H40.86v-2.85z\"\n fill=\"#3D3D3D\"\n />\n <Path d=\"M19.849 19.258h-7.503V73.6h7.503V19.258z\" fill=\"#E5C77A\" />\n <Path\n d=\"M28.256 17.82H9.982v5.466h18.274V17.82zM39.437 9.152v28h2.842v-28h-2.842z\"\n fill=\"#E5C77A\"\n />\n <Path d=\"M40.014 15.98v28h1.653v-28h-1.653z\" fill=\"#E5C77A\" />\n <Path\n d=\"M43.585 14.829h-5.463v13.145h5.463V14.829zM36.146 43.981l3.874-1.93h1.653v1.93h-5.527zM42.771 8.017h-3.822v2.655h3.822V8.017z\"\n fill=\"#E5C77A\"\n />\n <Path d=\"M38.122 17.82h-1.976v5.09h1.976v-5.09z\" fill=\"#625757\" />\n <Path\n d=\"M19.849 23.286l-5.618 1.968v33.931l5.618 2.28h-7.503v-38.18h7.503z\"\n fill=\"#D8AF55\"\n />\n <Path d=\"M61.56 93.505H10.732v7.007h50.83v-7.007z\" fill=\"#E5C77A\" />\n <Path d=\"M61.56 93.505H10.732v3.899l50.83-2.694v-1.205z\" fill=\"#D8AF55\" />\n <Path\n d=\"M209.232 53.15c-2.312-1.463-4.765 3.549-5.928 6.061-1.162 2.513-4.442 10.633-4.442 10.633l2.596.777s5.269-5.465 8.936-12.174c.853-1.593 1.188-3.807-1.162-5.297z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M213.907 37.79c2.518.299 3.022 2.474 2.57 4.935-.452 2.46-5.347 14.57-6.057 14.958-.71.389-4.249-.505-4.494-1.645-.233-1.14 2.363-12.07 3.086-14.025.736-1.969 1.95-4.559 4.895-4.222z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M209.697 37.985c-.865.44-.865 2.46-1.201 4.274-.465 2.564-2.17 9.22-2.17 9.22s1.485 1.296 3.745 1.75c2.622.517 4.365-.195 4.365-.195s2.544-10.102 2.002-12.161c-.155-.622-4.365-4.105-6.741-2.888z\"\n fill=\"#9A9393\"\n />\n <Path\n d=\"M206.623 25.345s5.992 3.911 6.496 4.144c1.873.868 2.531.233 4.597.712 2.506.57 10.487 6.282 14.942 10.4 2.596 2.396 7.58 8.716 8.833 11.915 1.679 4.26-4.494 8.483-4.739 8.794-.246.31-3.758-.454-5.037-.622-1.265-.169-4.132-7.317-5.876-8.69-1.743-1.36-9.918-4.04-10.37-4.274-3.073-1.567-4.649-3.898-5.126-4.442-.478-.544-1.447-1.256-1.589-1.813-.271-1.127 1.227-5.012.904-5.349-.323-.337-4.985-4.675-4.985-4.675l1.95-6.1z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M213.119 29.49l-1.795 7.705-1.666-1.1s-1.291 4.35-.904 5.348c.388.997 1.782 2.422 2.247 3.017.465.596 3.074 2.772 5.553 4.352 1.459.932 4.313 1.1 6.78 2.707 2.105 1.372 3.267 4.817 3.267 4.817s2.609-1.955 6.173-3.004c4.287-1.257 8.459-2.655 8.459-2.914-.026-1.075-9.13-10.827-9.621-11.397-.491-.57-8.11-6.786-9.557-7.628-2.105-1.204-4.494-2.344-6.844-2.007-1.395.233-2.092.103-2.092.103z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M213.713 29.735s3.474 1.554 3.435 6.812c-.013 2.267 1.472 4.222.865 5.802-2.156 5.634 11.507 12.317 12.682 12.369 1.175.051 3.9-1.956 3.9-1.956L241 50.949c1.33-1.153-8.678-10.646-9.685-12.265-.995-1.619-7.71-6.19-8.808-6.954-5.113-3.614-8.794-1.995-8.794-1.995z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M206.688 33.31l2.156-6.566 3.126 2.253-.284 2.331-4.998 1.982z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M197.454 27.715c-.18-2.215 1.666-6.864 5.605-6.786 3.939.077 5.773 2.797 6.522 4.986.581 1.71.658 2.991.168 5.025-.104.414-1.77 3.587-2.402 4.001-.427.285-3.436-1.58-3.513-1.463-.078.117-.478.298-.723.142-.349-.233-2.079-2.136-2.351-2.214-.271-.078-3.099-1.153-3.306-3.691z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M198.087 29.45s.439-3.069 4.908-3.846c.955-.168 2.337 2.616 2.647 2.629.323.013 0-3.367.194-3.095 1.962 2.758 4.016 3.004 4.222 2.784.594-.673-1.33-5.66-5.088-6.838s-6.47 1.736-6.883 2.603c-.426.88-2.001 3.277 0 5.763z\"\n fill=\"#8D3B26\"\n />\n <Path\n d=\"M205.448 26.834c.62.88 1.627 1.852 2.105 1.503.478-.337.349-1.334-.271-2.215-.62-.88-1.511-1.321-1.976-.971-.478.336-.478.803.142 1.683z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M225.518 114.472l4.141-.184-.034-.776-4.141.184.034.776z\"\n fill=\"#000\"\n />\n <Path\n d=\"M229.21 108.049c.581.738 1.007 2.202 1.098 2.875.103.816-.31 2.565-.853 2.59-1.562.065-3.435.221-5.049.506-1.601.284-2.17 1.243-6.302 1.424-1.201.052-3.332.078-3.358-.427-.09-2.15 3.9-1.554 5.114-2.785 3.048-3.082 5.14-3.885 5.14-3.885s4.094-.453 4.21-.298z\"\n fill=\"#000\"\n />\n <Path\n d=\"M246.037 116.493l4.158-.013-.013-.803-4.145.013v.803z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M249.988 110.031c.543.79.93 2.305.982 3.004.064.842-.4 2.629-.943 2.629-1.562.013-3.448.078-5.062.311-1.614.233-2.221 1.205-6.354 1.205-1.201 0-3.37-.065-3.345-.57.155-2.577 3.965-1.451 5.205-2.655 3.164-3.057 5.282-3.795 5.282-3.795s4.119-.285 4.235-.129z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M234.337 52.503s4.83 5.698 4.804 8.12c-.026 2.422-2.222 8.858-3.732 14.803-1.511 5.944-1.938 7.77-1.899 9.221.039 1.45.801 8.03.129 11.837-.671 3.821-1.498 13.754-1.498 13.754s-2.686.129-4.675.091c-2.001-.039-3.641-1.904-3.641-1.904s.994-22.638 1.02-25.034c.013-1.554-.013-12.278.594-20.942.194-2.784 1.253-9.17 1.382-10.309l7.516.363z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M241.891 51.44s1.834 3.407 2.183 6.373c.284 2.409.168 6.915.142 13.054-.026 6.139.633 11.747 1.02 13.145.387 1.4 2.867 7.201 3.358 11.047.568 4.52 2.311 14.855 2.311 14.855s-1.704.816-3.654 1.269c-1.95.454-4.649.22-4.649.22s-4.998-23.609-6.173-25.694c-1.886-3.341-3.552-14.414-5.527-21.861-.801-3.005-2.428-9.726-2.428-9.726l13.417-2.681zM239.412 50.832l-8.924-13.093s7.038 6.242 10.319 10.58c.271.363 1.11 1.296.581 1.917-.672.752-1.976.596-1.976.596z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M211.169 35.757l.155 1.438 1.369-4.183-1.524 2.745zM211.324 37.195l-1.666-1.088.168 1.023 1.498.065z\"\n fill=\"#A39D9D\"\n />\n <Path\n d=\"M209.903 36.263l.517 1.618-1.111-.518-.038-1.632.632.532z\"\n fill=\"#CFCCCC\"\n />\n <Path\n d=\"M225.658 54.173c-.8.04-3.848-.699-5.32-1.851a241.223 241.223 0 01-7.555-6.23l5.979-6.566L237.01 51.74s-5.049 2.163-11.352 2.434z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M225.659 54.173l.516 2.319s6.522-.635 11.351-2.46c4.83-1.827 4.624-2.138 4.624-2.138l-.762-1.735s-1.46.596-4.882 1.748c-3.306 1.114-10.847 2.267-10.847 2.267z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M237.01 51.739l2.893 9.091-.491-9.998-2.402.907z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M217.962 40.64c-1.188-1.205-5.321-9.57.568-10.918l-2.312-.401s-2.389.35-2.686 4.131c-.284 3.51 1.008 6.514 3.138 8.6 2.131 2.085 2.712.025 1.292-1.412zM212.783 46.092s-4.545-4.105-3.99-6.346c.232-.958.284-1.437.284-1.437s1.343 3.056 3.061 4.83c1.717 1.775 3.009 2.94 2.505 3.562-.517.621-1.86-.609-1.86-.609z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M217.691 32.546c2.427-.713 3.745 1.036 4.287 3.406.542 2.37 1.02 18.183.517 18.804-.504.622-4.107 1.192-4.766.26-.658-.92-2.802-14.803-2.905-16.824-.104-2.02.013-4.805 2.867-5.646z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M216.502 32.053c-1.046.726-2.092 3.756-1.898 5.582.284 2.59.53 9.454.53 9.454s1.795.816 4.08.61c2.661-.247 4.133-1.425 4.133-1.425s-.788-10.232-1.511-12.24c-.504-1.372-2.79-3.729-5.334-1.98z\"\n fill=\"#CFCCCC\"\n />\n <Path\n d=\"M221.565 52.425c2.699.907.865 6.877-.207 9.532-1.059 2.655-4.959 10.037-4.959 10.037l-2.583-.907s1.331-7.744 3.306-15.372c.22-.777.272-4.689 4.443-3.29z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M201.445 68.95s1.072 1.84-.026 3.018c-1.098 1.179-3.035 1.45-3.474 1.619-1.808.686-2.763 2.9-3.784 3.484-1.033.57-1.369.064-1.059-.246 1.692-1.697 2.092-3.225 2.932-3.899.839-.673 3.267-3.833 3.267-3.833l2.144-.142z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M201.755 70.362s.542.946-.646 2.422c-.646.803-1.989 1.049-2.609 1.684-.619.647-.71.168-.723.038-.013-.13.749-.92 1.046-1.308.297-.401.788-2.55 2.932-2.836z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M216.503 71.774s-.155 2.227-1.731 2.525c-1.575.298-3.28-.453-3.732-.583-1.86-.518-4.016.26-5.179.104-1.162-.155-1.226-.764-.8-.829 2.376-.35 3.654-1.191 4.726-1.243 1.072-.039 4.895-1.14 4.895-1.14l1.821 1.166z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M213.971 29.036l-2.001-.039-.801 6.76 2.325.881.477-7.602z\"\n fill=\"#D7D4D4\"\n />\n <Path\n d=\"M206.882 22.003s-4.146-3.224-7.968.726c-3.823 3.95-.259 8.288-.259 8.288s2.48-1.696 5.321-4.636c2.841-2.94 2.906-4.378 2.906-4.378z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M205.164 25.047s-6.354 8.858-6.521 8.897c-.168.04-1.008.117-1.331.246-.322.117-.413.66-.62.596-.206-.078 1.666-4.157 1.666-4.157s1.912-1.243 2.841-1.878c.943-.635 3.707-3.95 3.965-3.704z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M227.907 100.325c2.792-11.775-4.462-23.59-16.202-26.39-11.741-2.8-23.522 4.474-26.315 16.248-2.792 11.775 4.462 23.59 16.202 26.39 11.741 2.8 23.522-4.474 26.315-16.248z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M206.649 111.559c9.115 0 16.504-7.41 16.504-16.551 0-9.141-7.389-16.551-16.504-16.551-9.115 0-16.504 7.41-16.504 16.55 0 9.142 7.389 16.552 16.504 16.552z\"\n fill=\"#000\"\n />\n <Path\n d=\"M221.455 98.791c1.94-8.198-3.114-16.421-11.289-18.367-8.175-1.945-16.375 3.124-18.315 11.322-1.94 8.198 3.115 16.421 11.29 18.367 8.174 1.945 16.374-3.123 18.314-11.322z\"\n fill=\"#46676C\"\n />\n <Path\n d=\"M206.649 79.71c-8.575 0-15.522 6.968-15.522 15.567 0 8.6 6.947 15.567 15.522 15.567s15.523-6.967 15.523-15.567c0-8.599-6.948-15.567-15.523-15.567zm0 27.133c-6.483 0-11.739-5.271-11.739-11.773 0-6.501 5.256-11.772 11.739-11.772 6.483 0 11.739 5.27 11.739 11.772 0 6.502-5.256 11.773-11.739 11.773z\"\n fill=\"url(#prefix__paint23_linear)\"\n />\n <Path\n d=\"M206.649 79.687c3.345.039 2.002 13.249 2.002 13.249s11.635-5.621 12.681-2.552c1.059 3.096-11.7 5.828-11.7 5.828s8.679 9.519 6.083 11.475c-2.609 1.968-9.389-9.079-9.389-9.079s-6.185 10.918-8.755 9.079c-2.557-1.826 5.656-11.255 5.656-11.255s-12.307-3.03-11.261-6.048c1.033-2.991 12.436 2.215 12.436 2.215s-1.02-12.938 2.247-12.912z\"\n fill=\"url(#prefix__paint24_linear)\"\n />\n <Path\n d=\"M206.649 100.602c2.932 0 5.308-2.383 5.308-5.322 0-2.94-2.376-5.323-5.308-5.323-2.931 0-5.307 2.383-5.307 5.323 0 2.94 2.376 5.322 5.307 5.322z\"\n fill=\"url(#prefix__paint25_linear)\"\n />\n <Path\n d=\"M205.306 92.262c0 .492-.4.894-.891.894a.894.894 0 010-1.788c.491 0 .891.402.891.894zM209.891 92.262a.895.895 0 01-.891.894.894.894 0 010-1.788c.49 0 .891.402.891.894zM210.278 97.145c.492 0 .891-.4.891-.894a.892.892 0 00-.891-.894c-.492 0-.891.4-.891.894 0 .493.399.894.891.894zM203.911 96.251c0 .492-.4.894-.891.894a.895.895 0 010-1.788c.491 0 .891.402.891.894zM207.398 98.958c0 .492-.4.893-.891.893a.894.894 0 010-1.787.902.902 0 01.891.894z\"\n fill=\"#46676C\"\n />\n <Path\n d=\"M206.649 97.805a2.522 2.522 0 002.518-2.525 2.522 2.522 0 00-2.518-2.526 2.522 2.522 0 00-2.518 2.526 2.522 2.522 0 002.518 2.525z\"\n fill=\"url(#prefix__paint26_linear)\"\n />\n <Path\n d=\"M87.595 69.119l-2.983 3.73s.594 2.577.93 3.017c.336.44 2.415 1.632 2.699 1.826.284.195.788.234.852.065.065-.168-.878-1.1-.348-2.603.53-1.49 1.136-2.655 1.175-3.626.116-2.15-2.325-2.41-2.325-2.41zM119.842 45.173c1.73-5.323 6.211-14.428 3.603-16.02-3.41-2.073-13.211-3.355-13.211-3.355v.169s-9.893.815-13.315 2.875c-2.621 1.58 1.924 11.15 3.642 16.473.413 1.282.362 7.007.194 12.083-.039 1.257-1.06 7.007-.891 9.39.051.712 8.058 5.115 10.305 5.232v-.168c2.247-.104 10.267-4.495 10.318-5.207.181-2.383-.826-8.133-.865-9.39-.168-5.076-.194-10.8.22-12.082z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M120.978 28.686c-1.808.88-2.079 4.157-.297 7.46 1.782 3.302 3.345 5.349 3.823 6.203.503.868 3.008 6.152 3.9 7.447.891 1.295 2.854 2.448 4.248 1.697 1.175-.635 2.48-1.179 1.666-3.782-.788-2.603-7.632-21.796-13.34-19.025zM114.327 24.218c-.219-1.01-.775-6.022-.775-6.022h-3.306v.168h-3.318s-.569 5.012-.801 6.023c-.233 1.01-2.957 2.538-2.957 2.538l7.051.013v-.168l7.051.012c0-.012-2.725-1.54-2.945-2.564z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M114.108 22.806c-.207-1.54-.452-3.716-.53-4.403l-.206-.207h-3.126v.168h-3.318s-.569 5.012-.801 6.023c-.233 1.01-2.957 2.538-2.957 2.538h.335c3.151-.842 6.277-1.67 6.703-1.787.878-.26 3.9-2.332 3.9-2.332z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M104.9 61.206c-4.042-.013-5.618 2.81-5.514 11.474.103 8.677 1.369 18.08 1.937 19.427.555 1.347 6.289 1.385 6.844.595.569-.79 1.989-18.778 2.002-21.589 0-2.81-.865-9.894-5.269-9.907z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M105.145 99.048l-1.071-.026c-1.602-.038-2.88-1.385-2.842-3.004l.091-3.6a2.93 2.93 0 012.996-2.85l1.072.026c1.601.04 2.88 1.386 2.841 3.005l-.091 3.6c-.038 1.606-1.394 2.888-2.996 2.85z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M104.564 93.739c-1.239 0-4.261.401-4.106 8.482.155 8.082 3.564 19.155 3.564 19.155h2.918s1.447-14.959 1.46-17.834c.026-6.514.064-9.79-3.836-9.803zM115.554 61.27c4.016-.44 5.876 2.215 6.664 10.854.787 8.638 1.162 18.118.749 19.53-.414 1.398-6.109 2.033-6.754 1.307-.646-.725-4.585-18.468-4.882-21.265-.284-2.81-.155-9.946 4.223-10.425z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M119.867 98.945l1.072-.143c1.589-.207 2.725-1.683 2.518-3.29l-.465-3.56c-.206-1.594-1.678-2.733-3.254-2.54l-1.072.143c-1.588.208-2.725 1.684-2.518 3.29l.465 3.561a2.911 2.911 0 003.254 2.539z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M119.906 93.609c1.227-.13 4.288-.039 4.959 8.017.672 8.055-.646 19.426-.646 19.426l-2.905.311s-3.9-14.738-4.21-17.588c-.698-6.5-1.085-9.765 2.802-10.166zM98.56 28.725c1.936.531 2.802 3.704 1.665 7.279-1.136 3.574-2.298 5.88-2.621 6.799-.323.945-1.821 6.592-2.467 8.042-.646 1.438-2.35 2.94-3.861 2.448-1.266-.402-2.647-.7-2.338-3.406.31-2.707 3.5-22.846 9.621-21.162z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M100.509 59.458s-1.459 7.135-1.691 11.02c-.233 3.886 1.64 20.865 1.64 22.743 0 1.864-.129 7.615-.026 13.248.116 5.634 1.537 16.72 1.537 16.72l7.18-.169s.051-23.803.051-27.546c0-3.743.93-23.441.93-23.441l.013-12.252-9.634-.323z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M124.297 29.256c-.439-.738-2.828-1.36-5.024-2.046-1.937-.609-3.499-1.425-3.499-1.425l-1.227.648a8.698 8.698 0 01-8.665-.013l-1.046-.609s-1.731.764-3.681 1.36c-2.195.673-4.662 1.243-5.036 2.02-.388.79 3.538 15.943 3.977 17.238.439 1.295-.71 10.309.413 13.003l9.647.31h.013l9.647-.284c.891-3.096 0-11.89.439-13.172.452-1.256 4.791-15.787 4.042-17.03z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M119.738 59.263s2.183 6.955 2.815 10.788c.633 3.834 1.189 20.929 1.369 22.78.194 1.866.917 7.564 1.382 13.172.465 5.608 1.085 16.784 1.085 16.784l-7.167.57s-3.397-23.674-3.784-27.391c-.388-3.717-5.321-23.337-5.321-23.337l.052-12.86 9.569-.506z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M102.743 123.163s-2.453 2.875-2.324 3.639c.077.427 1.11 1.995 2.996 2.111 1.433.091 3.771-1.217 4.132-1.256.827-.091.827-4.624.827-4.624l-5.631.13zM125.394 122.878s2.738 2.603 2.687 3.38c-.026.44-.904 2.098-2.764 2.409-1.421.233-3.874-.829-4.236-.829-.852 0-1.304-4.52-1.304-4.52l5.617-.44z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M118.899 73.82c.4 2.551 1.537 19.647 1.601 20.618.065.945 3.422 27.326 3.539 28.544l2.363-.195s-.62-11.176-1.085-16.784c-.465-5.608-1.188-11.306-1.382-13.171-.193-1.865-.749-18.947-1.369-22.78-.632-3.847-2.815-10.789-2.815-10.789l-5.695.402c-.013 0 4.43 11.604 4.843 14.155zM109.033 67.28c-1.331-2.357-4.895-1.567-5.127 1.14-.233 2.771-.297 4.688-.052 5.97.607 3.212 1.472 18.934 1.356 19.349-.116.414-.039 29.281-.039 29.281l.129.078 3.875-.091s.051-23.803.051-27.546c0-3.743.93-23.441.93-23.441v-1.075l.078-1.541-1.201-2.124z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M132.161 47.646c1.615-.246 3.074.402 3.978 4.896.917 4.494 1.679 15.178 1.679 15.178l-2.609.389s-3.887-8.483-4.494-10.905c-.581-2.409-2.776-8.923 1.446-9.558z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M134.809 65.661s-.995 2.409-1.085 3.173c-.09.764.336 3.523.349 4.131 0 1.023-1.963 3.329-1.292 3.42.685.09 3.41-2.047 3.41-2.047s2.13-2.94 2.053-4.157c-.078-1.218-.491-3.445-.491-3.445l-2.944-1.075zM115.98 13.935c0 4.183-3.164 8.353-5.85 8.353-2.557 0-5.824-4.183-5.824-8.366s2.622-7.576 5.85-7.576c3.216 0 5.824 3.406 5.824 7.59z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M104.306 14.764c-.258-.453-1.123-2.396-.93-3.264.194-.867 1.214-2.771 1.563-3.34.336-.57 3.37-2.086 3.835-2.125.452-.039 1.666-.155 2.609 0 .943.156 2.608.803 2.996 1.567.374.764 1.317 1.632 1.627 2.24.31.61.839 2.163.762 2.397-.077.233-.491 2.123-.529 2.279-.039.155-.31.583-.31.583s-1.563-4.002-1.602-4.378c-.038-.375-7.993-.505-8.484-.246-.53.26-1.537 4.287-1.537 4.287z\"\n fill=\"#8D3B26\"\n />\n <Path\n d=\"M106.592 77.924h-7.787l-.22-.375-.568-.26.762-11.163 7.219-.181.594 11.98z\"\n fill=\"#1C5C92\"\n />\n <Path d=\"M105.804 77.29h-7.787l.413-11.357h7.374V77.29z\" fill=\"#002D56\" />\n <Path\n d=\"M98.805 77.925l-.22-.375h7.477l-.064-11.604.594 11.98h-7.787z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M115.515 77.977l7.762-.764.168-.388.542-.311-1.847-11.034-7.193.53.568 11.967z\"\n fill=\"#1C5C92\"\n />\n <Path\n d=\"M116.239 77.278l7.749-.764-1.524-11.267-7.322.712 1.097 11.319z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M123.277 77.213l.168-.388-7.439.725-1.059-11.54.568 11.967 7.762-.764z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M91.47 49.783c-1.628-.142-3.035.596-3.68 5.129-.647 4.546-.776 15.256-.776 15.256l2.635.233s3.37-8.703 3.835-11.15c.44-2.448 2.234-9.08-2.014-9.468z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M110.182 59.768l9.595-.31-.233-2.06-1.704-21.019h-15.316l-1.782 21.02-.233 2.059 9.595.31h.078z\"\n fill=\"#002D56\"\n />\n <Path\n d=\"M105.249 36.379s1.42 16.525 3.138 19.672c1.73 3.148 11.299 2.63 11.299 2.63l.091 1.087s-4.688 1.114-9.079 1.114c-4.39 0-10.227-1.114-10.227-1.114l2.053-23.389h2.725z\"\n fill=\"#00233F\"\n />\n <Path\n d=\"M117.349 37.596l1.446-10.529-2.182-.867-1.627 11.396 1.046 1.749 1.317-1.749zM103.053 37.596l-1.446-10.529 2.182-.867 1.628 11.396-1.046 1.749-1.318-1.749zM100.316 60.455l-.039-1.826s5.153.829 9.905.829 9.814-.83 9.814-.83l.104 1.827s-6.121 1.1-9.983 1.1c-3.848 0-9.801-1.1-9.801-1.1z\"\n fill=\"#004877\"\n />\n <Path\n d=\"M104.693 37.39a.593.593 0 11-1.188 0 .594.594 0 111.188 0zM116.897 37.39a.593.593 0 11-1.188 0 .593.593 0 111.188 0z\"\n fill=\"#303030\"\n />\n <Path\n d=\"M96.674 28.712s-2.493.725-4.417 5.336C90.32 38.658 88.9 48.074 88.9 48.074s1.356 1.062 3.887 1.696c2.53.635 3.603.376 3.603.376l2.763-9.752s.633-11.513-2.48-11.682zM122.683 28.298s2.569.336 5.191 4.584c2.622 4.261 6.276 13.21 6.276 13.21s-1.162 1.256-3.564 2.28c-2.402 1.01-3.564.984-3.564.984l-4.985-9.13s-2.402-11.28.646-11.928z\"\n fill=\"#B8B3B3\"\n />\n <Path\n d=\"M87.595 73.535s.349 1.464.543 1.774c.206.324.58.7.852.985.258.285.4.88.336.971-.194.285-.659-.065-.865-.298-.207-.233-.71-.764-.93-1.165-.22-.389-.814-1.322-.84-1.658-.025-.324.904-.609.904-.609z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M87.388 73.12s.697 1.205.968 1.438c.272.233.504.194.917.324.349.104.775.376.801.7.026.31-.516.207-.8.155-.375-.052-1.02-.285-1.318-.57-.31-.285-1.085-.958-1.2-1.256-.13-.285.632-.79.632-.79z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M87.377 72.9s.762.894 1.007 1.05c.258.155.452.077.814.13.297.038.697.193.762.452.077.26-.4.246-.646.26-.323.012-.891-.078-1.188-.273-.297-.194-1.033-.634-1.175-.854-.13-.22.426-.765.426-.765z\"\n fill=\"#FFA47C\"\n />\n <Path\n d=\"M93.453 65.47L81.667 82.99l.92.623 11.786-17.521-.92-.623z\"\n fill=\"#7F7F7F\"\n />\n <Path\n d=\"M95.553 79.104L80.586 67.82l-.667.89 14.967 11.284.667-.89z\"\n fill=\"#7F7F7F\"\n />\n <Path\n d=\"M79.627 69.119l-1.924-1.58 1.343-1.645 1.924 1.58c.453.376.517 1.036.143 1.49a1.038 1.038 0 01-1.486.155zM95.757 78.599l1.924 1.58-1.343 1.645-1.924-1.58a1.054 1.054 0 01-.142-1.49 1.037 1.037 0 011.485-.155zM82.998 84.064l-1.317 2.111-1.795-1.127 1.317-2.11c.31-.493.968-.648 1.46-.337.503.31.645.958.335 1.463zM93.006 65.35l1.33-2.11 1.783 1.139-1.33 2.11c-.31.493-.97.648-1.46.325a1.054 1.054 0 01-.323-1.464z\"\n fill=\"#7F7F7F\"\n />\n <Path\n d=\"M87.105 71.528s-.646 2.28-.323 2.551c.323.285 1.86 2.176 2.027 2.383.168.22.388.518.543-.401.155-.92-.646-1.723-.478-1.995.168-.272 1.317-1.14 1.42-2.357.104-1.204-.62-1.761-.968-1.943-.336-.155-2.39.83-2.221 1.762z\"\n fill=\"#FFBD95\"\n />\n <Path\n d=\"M134.809 99.242l-6.651.816a2.89 2.89 0 01-3.215-2.512l-3.991-32.507c-.194-1.58.93-3.03 2.505-3.225l6.651-.816a2.89 2.89 0 013.216 2.513l3.99 32.506c.194 1.58-.93 3.031-2.505 3.225z\"\n fill=\"#191919\"\n />\n <Path\n d=\"M127.227 61.362l-.884.11 4.702 38.24.885-.11-4.703-38.24zM129.258 61.104l-.371.046 4.698 38.24.372-.046-4.699-38.24zM130.704 60.922l-.371.047 4.698 38.24.372-.047-4.699-38.24zM123.317 61.843l-.371.046 4.71 38.24.372-.046-4.711-38.24zM124.748 61.668l-.372.046 4.695 38.24.372-.046-4.695-38.24z\"\n fill=\"#000\"\n />\n <Path\n d=\"M130.534 60.986c.039.142.078.285.091.44l3.951 32.183c.207 1.67-.852 3.173-2.337 3.367l-6.948.855c-.09.013-.181 0-.271 0 .375 1.438 1.627 2.422 2.983 2.253l6.948-.854c1.498-.182 2.544-1.697 2.337-3.368l-3.951-32.182c-.181-1.568-1.421-2.72-2.803-2.694z\"\n fill=\"#979797\"\n />\n <Defs>\n <LinearGradient\n id=\"prefix__paint0_linear\"\n x1={114.42}\n y1={26.556}\n x2={127.388}\n y2={26.556}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint1_linear\"\n x1={229.59}\n y1={26.556}\n x2={216.627}\n y2={26.556}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint2_linear\"\n x1={213.048}\n y1={56.441}\n x2={192.768}\n y2={47.617}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint3_linear\"\n x1={214.109}\n y1={63.107}\n x2={204.202}\n y2={63.322}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#D9E8E6\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint4_linear\"\n x1={205.988}\n y1={60.724}\n x2={187.001}\n y2={61.135}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint5_linear\"\n x1={199.656}\n y1={55.226}\n x2={199.407}\n y2={43.805}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint6_linear\"\n x1={213.061}\n y1={56.443}\n x2={192.778}\n y2={47.617}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={0.135} stopColor=\"#C1C9C9\" />\n <Stop offset={0.71} stopColor=\"#EEF0F0\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint7_linear\"\n x1={214.14}\n y1={52.236}\n x2={214.001}\n y2={45.87}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint8_linear\"\n x1={206.024}\n y1={53.101}\n x2={205.885}\n y2={46.732}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint9_linear\"\n x1={210.567}\n y1={54.064}\n x2={210.376}\n y2={45.364}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint10_linear\"\n x1={223.764}\n y1={49.811}\n x2={197.675}\n y2={49.811}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint11_linear\"\n x1={131.472}\n y1={56.443}\n x2={151.755}\n y2={47.617}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={0.135} stopColor=\"#C1C9C9\" />\n <Stop offset={0.71} stopColor=\"#EEF0F0\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint12_linear\"\n x1={130.424}\n y1={63.107}\n x2={140.332}\n y2={63.322}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#D9E8E6\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint13_linear\"\n x1={138.545}\n y1={60.724}\n x2={157.535}\n y2={61.135}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint14_linear\"\n x1={144.879}\n y1={55.226}\n x2={145.129}\n y2={43.805}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint15_linear\"\n x1={130.394}\n y1={52.236}\n x2={130.533}\n y2={45.87}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint16_linear\"\n x1={138.505}\n y1={53.101}\n x2={138.645}\n y2={46.732}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint17_linear\"\n x1={133.966}\n y1={54.064}\n x2={134.156}\n y2={45.364}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint18_linear\"\n x1={120.768}\n y1={49.811}\n x2={146.86}\n y2={49.811}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#B5BFBF\" />\n <Stop offset={1} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint19_linear\"\n x1={259.902}\n y1={16.846}\n x2={258.217}\n y2={16.846}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop />\n <Stop offset={0.07} stopColor=\"#313131\" />\n <Stop offset={0.158} stopColor=\"#676767\" />\n <Stop offset={0.247} stopColor=\"#959595\" />\n <Stop offset={0.335} stopColor=\"#BBB\" />\n <Stop offset={0.422} stopColor=\"#D9D9D9\" />\n <Stop offset={0.508} stopColor=\"#EEE\" />\n <Stop offset={0.592} stopColor=\"#FBFBFB\" />\n <Stop offset={0.671} stopColor=\"#fff\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint20_linear\"\n x1={278.713}\n y1={67.573}\n x2={278.713}\n y2={50.588}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#9FB2B2\" />\n <Stop offset={0.329} stopColor=\"#A3B4B4\" />\n <Stop offset={0.637} stopColor=\"#AEBABA\" />\n <Stop offset={0.934} stopColor=\"#C1C3C3\" />\n <Stop offset={1} stopColor=\"#C6C6C6\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint21_linear\"\n x1={278.713}\n y1={65.431}\n x2={278.713}\n y2={50.025}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#9FB2B2\" />\n <Stop offset={0.329} stopColor=\"#A3B4B4\" />\n <Stop offset={0.637} stopColor=\"#AEBABA\" />\n <Stop offset={0.934} stopColor=\"#C1C3C3\" />\n <Stop offset={1} stopColor=\"#C6C6C6\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint22_linear\"\n x1={278.713}\n y1={60.584}\n x2={278.713}\n y2={54.771}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#9FB2B2\" />\n <Stop offset={0.329} stopColor=\"#A3B4B4\" />\n <Stop offset={0.637} stopColor=\"#AEBABA\" />\n <Stop offset={0.934} stopColor=\"#C1C3C3\" />\n <Stop offset={1} stopColor=\"#C6C6C6\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint23_linear\"\n x1={206.649}\n y1={108.749}\n x2={206.649}\n y2={87.21}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#9FB2B2\" />\n <Stop offset={0.329} stopColor=\"#A3B4B4\" />\n <Stop offset={0.637} stopColor=\"#AEBABA\" />\n <Stop offset={0.934} stopColor=\"#C1C3C3\" />\n <Stop offset={1} stopColor=\"#C6C6C6\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint24_linear\"\n x1={206.649}\n y1={106.033}\n x2={206.649}\n y2={86.498}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#9FB2B2\" />\n <Stop offset={0.329} stopColor=\"#A3B4B4\" />\n <Stop offset={0.637} stopColor=\"#AEBABA\" />\n <Stop offset={0.934} stopColor=\"#C1C3C3\" />\n <Stop offset={1} stopColor=\"#C6C6C6\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint25_linear\"\n x1={206.649}\n y1={99.886}\n x2={206.649}\n y2={92.516}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#9FB2B2\" />\n <Stop offset={0.329} stopColor=\"#A3B4B4\" />\n <Stop offset={0.637} stopColor=\"#AEBABA\" />\n <Stop offset={0.934} stopColor=\"#C1C3C3\" />\n <Stop offset={1} stopColor=\"#C6C6C6\" />\n </LinearGradient>\n <LinearGradient\n id=\"prefix__paint26_linear\"\n x1={206.649}\n y1={97.461}\n x2={206.649}\n y2={93.967}\n gradientUnits=\"userSpaceOnUse\"\n >\n <Stop stopColor=\"#9FB2B2\" />\n <Stop offset={0.329} stopColor=\"#A3B4B4\" />\n <Stop offset={0.637} stopColor=\"#AEBABA\" />\n <Stop offset={0.934} stopColor=\"#C1C3C3\" />\n <Stop offset={1} stopColor=\"#C6C6C6\" />\n </LinearGradient>\n </Defs>\n </Svg>\n )\n}", "getSVGPath(scaling = 'scale', infiniteCheck = true, forDrawing = false, forDrawingButInvisible = false) {\n let path = '';\n path = this.segments\n .map((seg) => seg.getSVGPath(scaling, false, infiniteCheck))\n .join('\\n');\n if (forDrawingButInvisible) {\n if (this.vertexes[1] && this.segments[0].isArc()) {\n let arcCenterCoordinates = this.segments[0].arcCenter.coordinates;\n let firstVertex = this.vertexes[0].coordinates;\n let secondVertex = this.vertexes[1].coordinates;\n if (scaling == 'scale') {\n arcCenterCoordinates = arcCenterCoordinates.toCanvasCoordinates();\n firstVertex = firstVertex.toCanvasCoordinates();\n secondVertex = secondVertex.toCanvasCoordinates();\n }\n path += ['M', arcCenterCoordinates.x, arcCenterCoordinates.y, 'L', firstVertex.x, firstVertex.y, 'L', secondVertex.x, secondVertex.y, 'L', arcCenterCoordinates.x, arcCenterCoordinates.y].join(' ');\n }\n }\n if (forDrawing) {\n let seg = this.segments[0];\n let arrowEndCoordinates = seg.vertexes[1].coordinates;\n let arrowAngle = seg.getAngleWithHorizontal() + Math.PI;\n if (seg.isArc()) {\n let originVector = this.segments[0].getArcTangent(1);\n arrowAngle = Math.atan2(originVector.y, originVector.x) + Math.PI;\n }\n let firstTriangleCoord = arrowEndCoordinates.add(new Coordinates({\n x: 20 * Math.cos(arrowAngle + 0.35),\n y: 20 * Math.sin(arrowAngle + 0.35),\n }));\n let secondTriangleCoord = arrowEndCoordinates.add(new Coordinates({\n x: 20 * Math.cos(arrowAngle - 0.35),\n y: 20 * Math.sin(arrowAngle - 0.35),\n }));\n if (scaling == 'scale') {\n arrowEndCoordinates = arrowEndCoordinates.toCanvasCoordinates();\n firstTriangleCoord = firstTriangleCoord.toCanvasCoordinates();\n secondTriangleCoord = secondTriangleCoord.toCanvasCoordinates();\n }\n path += ` M ${arrowEndCoordinates.x} ${arrowEndCoordinates.y} L ${firstTriangleCoord.x} ${firstTriangleCoord.y} M ${arrowEndCoordinates.x} ${arrowEndCoordinates.y} L ${secondTriangleCoord.x} ${secondTriangleCoord.y}`;\n }\n return path;\n }", "constructor (config) {\n super(config)\n this.svg.height = this.svg.width * (204/114)\n this.svg.svgRoot = document.createElementNS(this.NS, 'svg')\n this.svg.svgRoot.setAttribute('width', this.svg.width)\n this.svg.svgRoot.setAttribute('height', this.svg.height)\n this.svg.snapRoot = Snap(this.svg.svgRoot)\n }", "function SvgComponent(props) {\n return (\n <Svg\n width={336}\n height={344}\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n {...props}\n >\n <Ellipse cx={45.875} cy={44.354} rx={44.875} ry={44.354} fill=\"#C4C4C4\" />\n <Ellipse\n cx={45.875}\n cy={44.354}\n rx={44.875}\n ry={44.354}\n fill=\"url(#prefix__pattern0)\"\n />\n <G opacity={0.3} filter=\"url(#prefix__filter0_f)\">\n <Circle cx={166} cy={178} r={86} fill=\"url(#prefix__pattern1)\" />\n </G>\n <Ellipse\n cx={165.891}\n cy={154.977}\n rx={85.576}\n ry={85.055}\n fill=\"url(#prefix__pattern2)\"\n />\n <Circle cx={279.123} cy={44.353} r={39.136} fill=\"#C4C4C4\" />\n <Circle\n cx={279.123}\n cy={44.353}\n r={39.136}\n fill=\"url(#prefix__pattern3)\"\n />\n <Circle cx={49.006} cy={184.72} r={26.09} fill=\"#C4C4C4\" />\n <Circle cx={49.006} cy={184.72} r={26.09} fill=\"url(#prefix__pattern4)\" />\n <Ellipse\n cx={154.933}\n cy={30.265}\n rx={20.351}\n ry={20.872}\n fill=\"#C4C4C4\"\n />\n <Ellipse\n cx={154.933}\n cy={30.265}\n rx={20.351}\n ry={20.872}\n fill=\"url(#prefix__pattern5)\"\n />\n <Circle\n cx={88.664}\n cy={253.598}\n r={13.567}\n fill=\"url(#prefix__pattern6)\"\n />\n <Circle cx={302.082} cy={197.765} r={33.917} fill=\"#C4C4C4\" />\n <Circle\n cx={302.082}\n cy={197.765}\n r={33.917}\n fill=\"url(#prefix__pattern7)\"\n />\n <Defs>\n <Pattern\n id=\"prefix__pattern0\"\n patternContentUnits=\"objectBoundingBox\"\n width={1}\n height={1}\n >\n <Use\n xlinkHref=\"#prefix__image0\"\n transform=\"matrix(.00309 0 0 .00309 -.241 0)\"\n />\n </Pattern>\n <Pattern\n id=\"prefix__pattern1\"\n patternContentUnits=\"objectBoundingBox\"\n width={1}\n height={1}\n >\n <Use\n xlinkHref=\"#prefix__image1\"\n transform=\"matrix(.0026 0 0 .0026 0 -.125)\"\n />\n </Pattern>\n <Pattern\n id=\"prefix__pattern2\"\n patternContentUnits=\"objectBoundingBox\"\n width={1}\n height={1}\n >\n <Use\n xlinkHref=\"#prefix__image1\"\n transform=\"matrix(.0026 0 0 .0026 0 -.108)\"\n />\n </Pattern>\n <Pattern\n id=\"prefix__pattern3\"\n patternContentUnits=\"objectBoundingBox\"\n width={1}\n height={1}\n >\n <Use\n xlinkHref=\"#prefix__image2\"\n transform=\"matrix(.0027 0 0 .0027 0 -.147)\"\n />\n </Pattern>\n <Pattern\n id=\"prefix__pattern4\"\n patternContentUnits=\"objectBoundingBox\"\n width={1}\n height={1}\n >\n <Use\n xlinkHref=\"#prefix__image3\"\n transform=\"matrix(.00313 0 0 .00313 -.25 0)\"\n />\n </Pattern>\n <Pattern\n id=\"prefix__pattern5\"\n patternContentUnits=\"objectBoundingBox\"\n width={1}\n height={1}\n >\n <Use\n xlinkHref=\"#prefix__image4\"\n transform=\"matrix(.0032 0 0 .0032 -.27 0)\"\n />\n </Pattern>\n <Pattern\n id=\"prefix__pattern6\"\n patternContentUnits=\"objectBoundingBox\"\n width={1}\n height={1}\n >\n <Use\n xlinkHref=\"#prefix__image5\"\n transform=\"matrix(.0026 0 0 .0026 0 -.125)\"\n />\n </Pattern>\n <Pattern\n id=\"prefix__pattern7\"\n patternContentUnits=\"objectBoundingBox\"\n width={1}\n height={1}\n >\n <Use\n xlinkHref=\"#prefix__image6\"\n transform=\"matrix(.00252 0 0 .00252 0 -.105)\"\n />\n </Pattern>\n <Image\n id=\"prefix__image0\"\n width={480}\n height={320}\n xlinkHref=\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnR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LoZI8WlKMPpmYse6uJT9mq6hCBIZBLMnMtZEUWm3EoAlOofAv8AJnlfioNjFSrINOKG5aTMwCnDlGjc4T+Ywkgrl7/NTAmXdVX7Y0d6o4H4qzdVKO45Ytbpm3O0LIMXU2/Mvb5ikZTwkqF3CLBAhLBFrUvh+YKrH1/kyhXhSUhZSNQZl89ygd8SuEapa42McEbB/WLYDeQyxfojibELsWlKg1OfXwis+pwn7EUyGvLOEXpYhocQO5B1FWpYmQdovKsQ1Fi8tEspuA2QY7q155XzEd5vaX5Zs/zrY4qbskVg/azsR8aASvaJhd1q5iSp7jTHjH2MXxK3l7JuzIPJI5lI8SzhPIidyqrUWdWEtcSOrlStWMA6LVMVlt3lSlEVwSOe5HPeFeYA3kucQrxDnz9xW7ZuxeomCRFTFEd5cOmpUa78mJgIfQMALYIBf6ShEXjSs7w7M7KgMP4I27T3N+o5LMXBneWWjMoWzHglYCB7Ewe3HjApOKhkNwnnUcmCeZ5GW6GjUEuXL8xpjpKIG2MGPMxNPKOgmB2W7fxLgXd3ZFeiLzFXOYEDQfMU7xPefOJ7xEZ2kYNO8OxQ72ebov/Z\"\n />\n </Defs>\n </Svg>\n )\n}", "function node_modules_r6operators_svg() {\n return gulp.src([\n 'node_modules/r6operators/dist/icons/*.*'\n ])\n .pipe(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true }))\n .pipe(gulp.dest(conf.paths.dist + '/img/svg'))\n .pipe(connect.reload());\n}", "function SvgComponent(props) {\n return (\n <Svg\n width={42}\n height={42}\n viewBox=\"0 0 42 42\"\n {...props}\n >\n <Defs>\n <LinearGradient\n id=\"prefix__b\"\n x1={0.067}\n y1={0.1}\n x2={0.748}\n y2={0.918}\n gradientUnits=\"objectBoundingBox\"\n >\n <Stop offset={0} stopColor={Colors.primaryColor} />\n <Stop offset={1} stopColor=\"#f10\" stopOpacity={0.929} />\n </LinearGradient>\n </Defs>\n <G data-name=\"Componente 18 \\u2013 1\">\n <G>\n <Circle\n data-name=\"Elipse 13\"\n cx={12}\n cy={12}\n r={12}\n transform=\"translate(9 6)\"\n fill=\"url(#prefix__b)\"\n />\n </G>\n <Path\n data-name=\"Caminho 5\"\n d=\"M15.791 16.991l10.647.07c.552 0 .808.572.808 1.124s-.256 1.107-.808 1.107H15.721c-.552 0-.949-.387-.966-1.107a1.089 1.089 0 011.036-1.194z\"\n fill=\"#fff\"\n />\n </G>\n </Svg>\n )\n}", "function SvgComponent(props) {\n return (\n <Svg width=\"14px\" height=\"11px\" viewBox=\"0 0 14 11\" {...props}>\n <G\n id=\"Toasts\"\n stroke=\"none\"\n strokeWidth={1}\n fill=\"none\"\n fillRule=\"evenodd\"\n >\n <G\n id=\"terms-/-S\"\n transform=\"translate(-39.000000, -459.000000)\"\n fill=\"#FFFFFF\"\n fillRule=\"nonzero\"\n >\n <G id=\"Group\" transform=\"translate(32.000000, 450.000000)\">\n <Path\n d=\"M20.6174332,10.0401805 C20.2971286,9.7199305 19.7777067,9.7199305 19.457402,10.0402352 L12.2135506,17.2840866 L8.40035533,13.4708914 C8.08005064,13.1505867 7.56062878,13.1505867 7.24026941,13.4708914 C6.91991004,13.7911961 6.91991004,14.3106179 7.24026941,14.6309773 L11.6334803,19.0241882 C11.79366,19.1843678 12.0036053,19.2644303 12.2134959,19.2644303 C12.4233865,19.2644303 12.6333865,19.1843132 12.7935115,19.0241882 L20.6174332,11.2002664 C20.9377926,10.8799617 20.9377926,10.3605399 20.6174332,10.0401805 Z\"\n id=\"Path\"\n />\n </G>\n </G>\n </G>\n </Svg>\n )\n}", "function jQueryPluginSVG(Tn){var Un=Tn.fn.attr;return Tn.fn.attr=function(Tn,Qn){var Dn=this.length;if(!Dn)return Un.call(this,Tn,Qn);for(var Hn=0;Hn<Dn;++Hn){var Gn=this[Hn];if(\"http://www.w3.org/2000/svg\"!==Gn.namespaceURI)return Un.call(this,Tn,Qn);if(void 0!==Qn)Gn.setAttribute(Tn,Qn);else if(Array.isArray(Tn)){for(var Vn={},zn=Tn.length;zn--;){var Kn=Tn[zn],Xn=Gn.getAttribute(Kn);(Xn||\"0\"===Xn)&&(Xn=isNaN(Xn)?Xn:Xn-0),Vn[Kn]=Xn}return Vn}if(\"object\"!==_typeof(Tn)){var Wn=Gn.getAttribute(Tn);return(Wn||\"0\"===Wn)&&(Wn=isNaN(Wn)?Wn:Wn-0),Wn}for(var Yn=0,Jn=Object.entries(Tn);Yn<Jn.length;Yn++){var $n=_slicedToArray(Jn[Yn],2),Zn=$n[0],er=$n[1];Gn.setAttribute(Zn,er)}}return this},Tn}", "function buildSvgSpan_() {\n var viewBoxWidth = 400000; // default\n var label = group.value.label.substr(1);\n if (__WEBPACK_IMPORTED_MODULE_4__utils__[\"a\" /* default */].contains([\"widehat\", \"widetilde\", \"utilde\"], label)) {\n // There are four SVG images available for each function.\n // Choose a taller image when there are more characters.\n var numChars = groupLength(group.value.base);\n var viewBoxHeight = void 0;\n var pathName = void 0;\n var _height = void 0;\n\n if (numChars > 5) {\n viewBoxHeight = label === \"widehat\" ? 420 : 312;\n viewBoxWidth = label === \"widehat\" ? 2364 : 2340;\n // Next get the span height, in 1000 ems\n _height = label === \"widehat\" ? 0.42 : 0.34;\n pathName = (label === \"widehat\" ? \"widehat\" : \"tilde\") + \"4\";\n } else {\n var imgIndex = [1, 1, 2, 2, 3, 3][numChars];\n if (label === \"widehat\") {\n viewBoxWidth = [0, 1062, 2364, 2364, 2364][imgIndex];\n viewBoxHeight = [0, 239, 300, 360, 420][imgIndex];\n _height = [0, 0.24, 0.3, 0.3, 0.36, 0.42][imgIndex];\n pathName = \"widehat\" + imgIndex;\n } else {\n viewBoxWidth = [0, 600, 1033, 2339, 2340][imgIndex];\n viewBoxHeight = [0, 260, 286, 306, 312][imgIndex];\n _height = [0, 0.26, 0.286, 0.3, 0.306, 0.34][imgIndex];\n pathName = \"tilde\" + imgIndex;\n }\n }\n var path = new __WEBPACK_IMPORTED_MODULE_1__domTree__[\"a\" /* default */].pathNode(pathName);\n var svgNode = new __WEBPACK_IMPORTED_MODULE_1__domTree__[\"a\" /* default */].svgNode([path], {\n \"width\": \"100%\",\n \"height\": _height + \"em\",\n \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + viewBoxHeight,\n \"preserveAspectRatio\": \"none\"\n });\n return {\n span: __WEBPACK_IMPORTED_MODULE_2__buildCommon__[\"a\" /* default */].makeSpan([], [svgNode], options),\n minWidth: 0,\n height: _height\n };\n } else {\n var spans = [];\n\n var _katexImagesData$labe = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_slicedToArray___default()(katexImagesData[label], 4),\n paths = _katexImagesData$labe[0],\n _minWidth = _katexImagesData$labe[1],\n _viewBoxHeight = _katexImagesData$labe[2],\n align1 = _katexImagesData$labe[3];\n\n var _height2 = _viewBoxHeight / 1000;\n\n var numSvgChildren = paths.length;\n var widthClasses = void 0;\n var aligns = void 0;\n if (numSvgChildren === 1) {\n widthClasses = [\"hide-tail\"];\n aligns = [align1];\n } else if (numSvgChildren === 2) {\n widthClasses = [\"halfarrow-left\", \"halfarrow-right\"];\n aligns = [\"xMinYMin\", \"xMaxYMin\"];\n } else if (numSvgChildren === 3) {\n widthClasses = [\"brace-left\", \"brace-center\", \"brace-right\"];\n aligns = [\"xMinYMin\", \"xMidYMin\", \"xMaxYMin\"];\n } else {\n throw new Error(\"Correct katexImagesData or update code here to support\\n \" + numSvgChildren + \" children.\");\n }\n\n for (var i = 0; i < numSvgChildren; i++) {\n var _path = new __WEBPACK_IMPORTED_MODULE_1__domTree__[\"a\" /* default */].pathNode(paths[i]);\n\n var _svgNode = new __WEBPACK_IMPORTED_MODULE_1__domTree__[\"a\" /* default */].svgNode([_path], {\n \"width\": \"400em\",\n \"height\": _height2 + \"em\",\n \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + _viewBoxHeight,\n \"preserveAspectRatio\": aligns[i] + \" slice\"\n });\n\n var _span = __WEBPACK_IMPORTED_MODULE_2__buildCommon__[\"a\" /* default */].makeSpan([widthClasses[i]], [_svgNode], options);\n if (numSvgChildren === 1) {\n return { span: _span, minWidth: _minWidth, height: _height2 };\n } else {\n _span.style.height = _height2 + \"em\";\n spans.push(_span);\n }\n }\n\n return {\n span: __WEBPACK_IMPORTED_MODULE_2__buildCommon__[\"a\" /* default */].makeSpan([\"stretchy\"], spans, options),\n minWidth: _minWidth,\n height: _height2\n };\n }\n } // buildSvgSpan_()", "function conditionSVG(condition) {\n let svgItems = {\n \"Rainy Thunderstorm\": '<svg data-name=\"Rainy Thunderstorm\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 50.5a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M20.15 46.24l15.7 15.7M44.15 46.24l15.7 15.7\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M43.85 61.94L36 54.09h8l-7.85-7.85\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Thunderstorm\": '<svg data-name=\"Thunderstorm\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M46.3 50.5h8.2a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22h12.93\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M43.85 61.94L36 54.09h8l-7.85-7.85\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Tornado\": '<svg data-name=\"Tornado\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M53.12 12h-33.2a4 4 0 000 8h38.44a4 4 0 010 8H35.43a4 4 0 000 8H48a4 4 0 010 8H27.35a4 4 0 100 8h8.15a4 4 0 010 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Mist\": '<svg data-name=\"Mist\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Smoke\": '<svg data-name=\"Smoke\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Haze\": '<svg data-name=\"Haze\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Dust\": '<svg data-name=\"Dust\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Fog\": '<svg data-name=\"Fog\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Sand\": '<svg data-name=\"Sand\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Ash\": '<svg data-name=\"Ash\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Squall\": '<svg data-name=\"Squall\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Clear Night\": '<svg data-name=\"Clear Night\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M46.65 50.5a14.5 14.5 0 010-29 14.21 14.21 0 012.63.25 19.5 19.5 0 100 28.5 14.21 14.21 0 01-2.63.25z\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Clear Day\": '<svg data-name=\"Clear Day\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><circle cx=\"36\" cy=\"36\" r=\"17.85\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M36 4.95v8.1M36 67.05v-8.1M67.05 36h-8.1M4.95 36h8.1M56.2 15.8l-3.97 3.97M15.8 56.2l3.97-3.97M56.2 56.2l-3.97-3.97M15.8 15.8l3.97 3.97\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Windy Clear Day\": '<svg data-name=\"Windy Clear Day\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M31.48 8.72v6.92M31.48 61.77v-6.92M58 35.24h-6.92M4.95 35.24h6.92M48.73 17.99l-3.39 3.39M14.22 52.5l3.39-3.39M14.22 17.99l3.39 3.39\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M50.5 50.5h13a4 4 0 010 8\" stroke-dasharray=\"1 2 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M29.5 47.5h19a5 5 0 000-10\" stroke-dasharray=\"2 4 1000\" fill=\"none\" stroke=\"#000\" stroke-miterlimit=\"10\"/><path d=\"M56.5 47.5h5a3 3 0 000-6\" stroke-dasharray=\"1 2 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M42.5 64.5a7 7 0 000-14h-11a15.24 15.24 0 1113.64-8.44\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Few Clouds\": '<svg data-name=\"Few Clouds\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M15.75 33.28a12.5 12.5 0 0119.44-15.2M26.69 5.5v5.67M4.95 27.24h5.67M40.82 13.1l-2.78 2.78M12.55 13.1l2.78 2.78\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M57.59 35.59a18 18 0 00-35.54-4h-.46a11 11 0 000 22h36a9 9 0 000-18z\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Cloudy\": '<svg data-name=\"Cloudy\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 32.5a18 18 0 00-35.54-4h-.46a11 11 0 000 22h36a9 9 0 000-18z\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Windy Clouds\": '<svg data-name=\"Windy Clouds\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M63 38.55a9 9 0 00-8.51-6 18 18 0 00-35.54-4h-.46a11 11 0 000 22h24a7 7 0 010 14\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M50.5 50.5h13a4 4 0 010 8\" stroke-dasharray=\"1 2 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M29.5 47.5h19a5 5 0 000-10\" stroke-dasharray=\"2 4 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M56.5 47.5h5a3 3 0 000-6\" stroke-dasharray=\"1 2 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Partly Sunny Drizzle\": '<svg data-name=\"Partly Sunny Drizzle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M39.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M39.59 51.72v12.74\" stroke-dasharray=\"3.64 3.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M39.59 66.28v2M47.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M47.59 52.72v6.96\" stroke-dasharray=\"4.64 4.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M47.59 62v2M55.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M55.59 51.19v4.66\" stroke-dasharray=\"3.11 3.11\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M55.59 57.4v2M31.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M31.59 52.72v6.96\" stroke-dasharray=\"4.64 4.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M31.59 62v2M23.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M23.59 51.19v4.66\" stroke-dasharray=\"3.11 3.11\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M23.59 57.4v2M15.75 33.28a12.5 12.5 0 0119.44-15.2M26.69 5.5v5.67M4.95 27.24h5.67M40.82 13.1l-2.78 2.78M12.55 13.1l2.78 2.78\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M57.59 53.59a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Drizzle\": '<svg data-name=\"Drizzle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 50.5a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M36.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M36.5 48.63v12.74\" stroke-dasharray=\"3.64 3.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M36.5 63.19v2M44.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M44.5 49.63v6.96\" stroke-dasharray=\"4.64 4.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M44.5 58.91v2M52.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M52.5 48.1v4.66\" stroke-dasharray=\"3.11 3.11\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M52.5 54.31v2M28.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M28.5 49.63v6.96\" stroke-dasharray=\"4.64 4.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M28.5 58.91v2M20.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M20.5 48.1v4.66\" stroke-dasharray=\"3.11 3.11\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M20.5 54.31v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Partly Sunny Snow\": '<svg data-name=\"Partly Sunny Snow\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M57.59 53.59a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M15.75 33.28a12.5 12.5 0 0119.44-15.2M26.69 5.5v5.67M4.95 27.24h5.67M40.82 13.1l-2.78 2.78M12.55 13.1l2.78 2.78\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path class=\"cls-2\" d=\"M22.53 53.48l2.12 2.12M22.53 46.48l2.12 2.12M22.53 55.6l2.12-2.12M22.53 48.6l2.12-2.12M54.53 53.48l2.12 2.12M54.53 46.48l2.12 2.12M54.53 55.6l2.12-2.12M54.53 48.6l2.12-2.12M30.53 56.48l2.12 2.12M30.53 49.48l2.12 2.12M30.53 58.6l2.12-2.12M30.53 63.48l2.12 2.12M30.53 65.6l2.12-2.12M30.53 51.6l2.12-2.12M46.53 56.48l2.12 2.12M46.53 49.48l2.12 2.12M46.53 58.6l2.12-2.12M46.53 63.48l2.12 2.12M46.53 65.6l2.12-2.12M46.53 51.6l2.12-2.12M38.53 53.48l2.12 2.12M38.53 46.48l2.12 2.12M38.53 55.6l2.12-2.12M38.53 60.48l2.12 2.12M38.53 62.6l2.12-2.12M38.53 67.48l2.12 2.12M38.53 69.6l2.12-2.12M38.53 48.6l2.12-2.12\" stroke-dasharray=\"3 4\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Snow\": '<svg data-name=\"Snow\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 50.5a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M19.44 50.43l2.12 2.12M19.44 43.43l2.12 2.12M19.44 52.55l2.12-2.12M19.44 45.55l2.12-2.12M51.44 50.43l2.12 2.12M51.44 43.43l2.12 2.12M51.44 52.55l2.12-2.12M51.44 45.55l2.12-2.12M27.44 53.43l2.12 2.12M27.44 46.43l2.12 2.12M27.44 55.55l2.12-2.12M27.44 60.43l2.12 2.12M27.44 62.55l2.12-2.12M27.44 48.55l2.12-2.12M43.44 53.43l2.12 2.12M43.44 46.43l2.12 2.12M43.44 55.55l2.12-2.12M43.44 60.43l2.12 2.12M43.44 62.55l2.12-2.12M43.44 48.55l2.12-2.12M35.44 50.43l2.12 2.12M35.44 43.43l2.12 2.12M35.44 52.55l2.12-2.12M35.44 57.43l2.12 2.12M35.44 59.55l2.12-2.12M35.44 64.43l2.12 2.12M35.44 66.55l2.12-2.12M35.44 45.55l2.12-2.12\" stroke-dasharray=\"3 4\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Partly Sunny Rain\": '<svg data-name=\"Partly Sunny Rain\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M57.59 53.59a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M15.75 33.28a12.5 12.5 0 0119.44-15.2M26.69 5.5v5.67M4.95 27.24h5.67M40.82 13.1l-2.78 2.78M12.55 13.1l2.78 2.78M35.62 49.21l15.7 15.7M23.62 49.21l15.7 15.7M47.62 49.21l15.7 15.7\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Rain\": '<svg data-name=\"Rain\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 50.5a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M32.15 46.24l15.7 15.7M20.15 46.24l15.7 15.7M44.15 46.24l15.7 15.7\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>'\n }\n\n return svgItems[condition];\n}", "boundaryToSVG() {\n var points = this.getOrientedEdges();\n var svgString = \"M\";\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n svgString += point.x.toString() + \" \" + point.y.toString() + \" \";\n }\n svgString += points[0].x.toString() + \" \" + points[0].y.toString() + \" \";\n this.svg = svgString;\n return svgString;\n }", "function hackSVG() {\n\tif (SVGElement && SVGElement.prototype) {\n\n\t\tSVGElement.prototype.hasClass = function(className) {\n\t\t\treturn new RegExp('(\\\\s|^)' + className + '(\\\\s|$)').test(this\n\t\t\t\t\t.getAttribute('class'));\n\t\t};\n\n\t\tSVGElement.prototype.addClass = function(className) {\n\t\t\tif (!this.hasClass(className)) {\n\t\t\t\tthis.setAttribute('class', this.getAttribute('class') + ' '\n\t\t\t\t\t\t+ className);\n\t\t\t}\n\t\t};\n\n\t\tSVGElement.prototype.removeClass = function(className) {\n\t\t\tvar removedClass = this.getAttribute('class').replace(\n\t\t\t\t\tnew RegExp('(\\\\s|^)' + className + '(\\\\s|$)', 'g'), '$2');\n\t\t\tif (this.hasClass(className)) {\n\t\t\t\tthis.setAttribute('class', removedClass);\n\t\t\t}\n\t\t};\n\t\tSVGElement.prototype.toggleClass = function(className) {\n\t\t\tif (this.hasClass(className)) {\n\t\t\t\tthis.removeClass(className);\n\t\t\t} else {\n\t\t\t\tthis.addClass(className);\n\t\t\t}\n\t\t};\n\n\t}\n}", "function loadSVG(path,name) {\n svg[name] = pd.xmlmin(fs.readFileSync(__dirname+path,\"utf8\"))\n}", "loadSVG(e) {\n var svgDoc = e.currentTarget.contentDocument;\n var svgItems = svgDoc.getElementsByTagName(\"path\");\n for (var i = 0; i < 51; i++) {\n if (this.props.campus.sts.indexOf(svgItems[i].id) > -1) {\n svgItems[i].style.fill = \"#61DAFB\";\n svgItems[i].addEventListener(\"click\", (e) => {\n this.selectState(e.target.id);\n });\n } else {\n svgItems[i].style.fill = \"#525252\";\n }\n }\n e.currentTarget.style.opacity = \"1.0\";\n }", "drawSvgWrapper() {\n //Construct Body\n var body = d3.select(\"#root\")\n\n //Construct SVG\n var svg = body\n .append(\"div\")\n .append(\"svg\")\n .attr(\"class\", \"svg\")\n .attr(\"id\", \"content\")\n .attr(\"width\", this.width)\n .attr(\"height\", this.height)\n .attr(\"viewBox\", this.viewBox)\n .attr(\n \"transform\",\n \"translate(\" +\n this.width / 2 +\n \",\" +\n this.height / 2 +\n \")\"\n )\n ;\n //Draw G for map\n return svg;\n }", "function SaveAsSVG(document, newname)\r{\r var targetFolder = Folder(MATERIAL_EXPORT_PATH);\r\r if (! targetFolder.exists) {\r // geef een melding en \r throw(\"Onderstaande folder niet gevonden, is de netwerkverbinding gemaakt? \\n\\n\" +\r MATERIAL_EXPORT_PATH);\r }\r\r var exportOptions = new ExportOptionsSVG();\r var exportType = ExportType.SVG;\r\r var targetFile = MakeTempInvisibleFile(targetFolder, newname, \".ai\");\r // alert(targetFile);\r\r exportOptions.embedRasterImages = true;\r exportOptions.compressed = true;\r exportOptions.embedAllFonts = false;\r exportOptions.fontSubsetting = SVGFontSubsetting.GLYPHSUSED;\r exportOptions.cssProperties = SVGCSSPropertyLocation.PRESENTATIONATTRIBUTES;\r exportOptions.optimezForSVGViewer = true;\r\r document.exportFile( targetFile, exportType, exportOptions );\r document.close( SaveOptions.DONOTSAVECHANGES );\r\r var exportedFile = MakeTempInvisibleFile(targetFolder, newname, \".svgz\");\r // alert(exportedFile);\r if (exportedFile.exists) {\r if (! exportedFile.rename(newname+ \".svgz\")) {\r // bij aanwezig zijn oude file, deze proberen te deleten en vervolgens nogmaal renamen:\r var fl = new File(targetFolder + \"/\" + newname + \".svgz\");\r // alert(fl);\r if (fl.remove()) \r exportedFile.rename(newname+ \".svgz\")\r else\r alert(SCRIPT_NAME + \" is niet goed gelukt, oude file is nog aanwezig en niet te overschrijven!\") \r }\r } \r else\r alert(SCRIPT_NAME + \" is niet goed gelukt!\") \r}", "function refresh() {\r\n forAllDOMBoxes((box, i) => {\r\n if (state.array[i] == \"x\") {\r\n console.log(\"putting x\");\r\n box.innerHTML = `\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"300\"\r\n height=\"300\"\r\n viewBox=\"0 0 79.374998 79.375002\"\r\n version=\"1.1\"\r\n id=\"svg8\"\r\n >\r\n <g\r\n inkscape:label=\"Layer 1\"\r\n inkscape:groupmode=\"layer\"\r\n id=\"layer1\"\r\n transform=\"translate(0,-217.62498)\"\r\n >\r\n <path\r\n style=\"opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;\r\n stroke-width:0.47560433;stroke-linecap:square;stroke-linejoin:miter;\r\n stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:124.72441101;\r\n stroke-opacity:1;paint-order:stroke fill markers\"\r\n d=\"m 20.425591,238.48491 c -0.815612,0.99134 -0.886251,2.45461 0.02231,3.36317 l \r\n 15.466489,15.4663 -15.421022,15.42084 c -1.023106,1.02309 -0.819417,2.67934 \r\n 0.167816,3.66223 1.141655,1.13664 2.803463,0.91688 3.901463,-0.18111 l \r\n 15.126822,-15.12664 15.426678,15.42649 c 1.021295,1.02133 2.669692,0.81239 \r\n 3.657394,-0.17301 0.991,-0.98869 1.097421,-2.62199 0.136391,-3.58314 L \r\n 43.464623,257.31487 58.885645,241.89404 c 0.949784,-0.94978 0.835936,-2.46452 \r\n 0.01466,-3.46635 -0.95485,-1.16477 -2.736668,-1.36259 -3.768744,-0.33022 l \r\n -15.44194,15.44207 -15.472875,-15.47268 c -1.078657,-1.07864 -2.851011,-0.72465 \r\n -3.791155,0.41805 z\"\r\n id=\"path8537\"\r\n />\r\n </g>\r\n </svg>\r\n `;\r\n } else if (state.array[i] == \"o\") {\r\n console.log(\"putting o\");\r\n box.innerHTML = `\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"300\"\r\n height=\"300\"\r\n viewBox=\"0 0 79.374999 79.374999\"\r\n version=\"1.1\"\r\n id=\"svg8551\"\r\n >\r\n <g\r\n id=\"layer1\"\r\n transform=\"translate(0,-217.625)\"\r\n >\r\n <path\r\n style=\"opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;\r\n stroke-width:0.47593662;stroke-linecap:square;stroke-linejoin:miter;\r\n stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:124.72441101;\r\n stroke-opacity:1;paint-order:stroke fill markers\"\r\n d=\"M 39.687498,237.46875 A 19.843726,19.843724 0 0 0 19.84375,257.3125 \r\n 19.843726,19.843724 0 0 0 39.687498,277.15625 19.843726,19.843724 0 0 0 \r\n 59.53125,257.3125 19.843726,19.843724 0 0 0 39.687498,237.46875 Z m 0,5.34246 \r\n A 14.501184,14.501182 0 0 1 54.188535,257.3125 14.501184,14.501182 0 0 1 \r\n 39.687498,271.81354 14.501184,14.501182 0 0 1 25.186213,257.3125 \r\n 14.501184,14.501182 0 0 1 39.687498,242.81121 Z\"\r\n id=\"path815\"\r\n />\r\n </g>\r\n </svg>\r\n `;\r\n } else {\r\n box.innerHTML = \" \";\r\n console.log(\"clearing box\");\r\n }\r\n });\r\n}", "function getSvgElement() {\n\n let svg = getSvg('svg');\n svg.setAttribute('width', '100%');\n svg.setAttribute('height', '100%');\n \n // Set up SVG defs\n \n const rectDef = getSvg('rect'),\n defs = getSvg('defs');\n \n rectDef.setAttribute('class', 'note');\n rectDef.setAttribute('id', rectId);\n rectDef.setAttribute('height', PIANO_ROLL_OPTIONS.barHeight);\n defs.appendChild(rectDef);\n svg.appendChild(defs);\n\n return svg;\n }", "render() {\n return (\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n <svg xmlns='http://www.w3.org/2000/svg' width={100} height={100}>\n <rect width={100} height={100} fill='#269' />\n <g fill='#6494b7'>\n <rect width={100} height={1} y={20} />\n <rect width={100} height={1} y={40} />\n <rect width={100} height={1} y={60} />\n <rect width={100} height={1} y={80} />\n <rect width={1} height={100} x={20} />\n <rect width={1} height={100} x={40} />\n <rect width={1} height={100} x={60} />\n <rect width={1} height={100} x={80} />\n </g>\n <rect\n width={100}\n height={100}\n fill='none'\n strokeWidth={2}\n stroke='#fff'\n />\n </svg>\n );\n }", "function SVGComic(evt, opts) {\n /// <summary>The main SVGComic object</summary>\n /// <param name=\"evt\">The calling event</param>\n /// <param name=\"opts\">The desired options</param>\n /// <option name=\"author\">The author's name (defaults to A. N. Onymous)</option>\n /// <option name=\"copyright\">The preferred copyright statement (defaults to \"&copy YEAR AUTHOR. All rights \n /// reserved\")</option>\n /// <option name=\"fill\">Preferred gutter color (defaults to black)</option>\n /// <option name=\"fontSize\">Preferred font size for title/author/subtitle/copyright (defaults to 12)</option>\n /// <option name=\"height\">Preferred comic height (defaults to 300)</option>\n /// <option name=\"subtitle\">Preferred secondary/episode title (defaults to blank)</option>\n /// <option name=\"textColor\">Preferred color for title/etc. text (defaults to white)</option>\n /// <option name=\"title\">Preferred title (defaults to \"untitled\")</option>\n /// <option name=\"width\">Preferred comic width (defaults to 800)</option>\n /// <option name=\"xGutter\">Preferred horizontal gutter (defaults to 10)</option>\n \n if (window.svgDocument == null) {\n svgDocument = evt.target.ownerDocument;\n }\n\n this.document = svgDocument;\n this.svg = this.document.rootElement;\n this.ns = 'http://www.w3.org/2000/svg';\n\n if (opts == null) {\n opts = new Array();\n }\n\n var date = new Date();\n\n this.author = opts['author'] || 'A. N. Onymous';\n\n this.copyright = opts['copyright'] || \"© \" + date.getFullYear() + \" \" + this.author + \". All rights reserved.\";\n this.fill = opts['fill'] || 'black';\n this.fontSize = opts['fontSize'] || 12;\n this.height = opts['height'] || 300;\n this.subtitle = opts['subtitle'] || '';\n this.textColor = opts['textColor'] || 'white';\n this.title = opts['title'] || 'Untitled';\n this.width = opts['width'] || 800;\n this.xGutter = opts['xGutter'] || 10;\n\n// this.x = opts['x'] || window.innerWidth / 2 - this.width / 2;\n// this.y = opts['y'] || window.innerHeight / 2 - this.height / 2;\n\n this.panels = new Array();\n\n this.initialize();\n}", "function SvgComponent(props) {\n return (\n <Svg\n width={260}\n height={231}\n viewBox=\"0 0 260 231\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}>\n <Defs>\n <Path id=\"prefix__a\" d=\"M0 0h260v192.52H0z\" />\n </Defs>\n <G fill=\"none\" fillRule=\"evenodd\">\n <Path\n d=\"M56.827 192.312c-15.44-.822-32.42-7.954-42.531-19.627-6.08-7.02-9.748-15.848-11.933-24.866-3.365-13.889-3.353-28.782 1.445-42.245 5.63-15.802 17.542-29.117 21.187-45.488 2.087-9.377 1.335-19.315 4.365-28.431C35.038 14.577 53.2 4.055 71.133 2.16c17.932-1.894 35.803 3.219 52.975 8.712 10.955 3.504 22.09 7.225 33.593 7.213 9.748-.01 19.34-2.73 28.25-6.673C195.543 7.168 204.775 1.409 215.2.215c14.934-1.71 30.025 6.942 37.805 19.775 7.78 12.833 8.74 29.089 4.515 43.482-4.226 14.393-13.243 27.04-24.046 37.47a125.183 125.183 0 01-31.43 22.122c-17.124 8.461-36.34 13.095-51.61 24.556-14.9 11.182-25.147 27.638-48.874 37.257-19.521 6.798-29.291 8.257-44.732 7.435z\"\n fill=\"#E8F4F9\"\n />\n <Path\n d=\"M185.389 186.796a.704.704 0 01.994.037 15.136 15.136 0 003.627 2.864c.272.154.41.471.336.776-.085.353-.202.71-.346 1.06-.725 1.75-1.88 2.55-2.114 2.699a1.442 1.442 0 00-.477.605c-.378.913.27 2.053 1.445 2.54.59.244 1.22.286 1.77.116.501-.156.873-.472 1.047-.891a1.432 1.432 0 00.08-.81l-.014-.07c-.066-.352-.235-1.66.439-3.287a7.203 7.203 0 01.505-.997.7.7 0 01.786-.31c1.499.415 3.043.592 4.591.54.36-.039.715.288.728.677a.701.701 0 01-.677.728 16.365 16.365 0 01-4.477-.45 7.828 7.828 0 00-.158.35c-.603 1.457-.345 2.543-.342 2.552.1.598.038 1.132-.162 1.615-.336.813-1.022 1.415-1.931 1.696a3.747 3.747 0 01-1.113.166c-.538 0-1.087-.11-1.61-.327-1.891-.782-2.88-2.746-2.205-4.377.199-.48.534-.902.967-1.217l.06-.039c.004-.003.961-.596 1.562-2.047.05-.119.095-.239.136-.358a16.494 16.494 0 01-3.483-2.847.703.703 0 01.036-.994zm19.236-1.524a.703.703 0 111.29.561c-.02.048-.54 1.357.277 3.33.729 1.761 1.937 2.425 1.988 2.452.593.387 1 .87 1.232 1.432.775 1.875-.528 4.202-2.908 5.188a5.72 5.72 0 01-2.18.447c-.408 0-.81-.049-1.191-.147-1.127-.288-1.964-.967-2.354-1.911a3.096 3.096 0 01-.14-1.889c.015-.05.4-1.375-.33-3.135-.696-1.68-1.738-2.334-2.065-2.505l-.069-.034a.706.706 0 01-.416-.928.7.7 0 01.906-.393c.076.03 1.884.766 2.943 3.321.865 2.086.468 3.753.384 4.054a1.67 1.67 0 00.086.97c.218.525.716.912 1.404 1.088.76.194 1.643.112 2.484-.237 1.635-.677 2.618-2.212 2.146-3.35a1.665 1.665 0 00-.625-.747c-.271-.153-1.73-1.052-2.595-3.138-.854-2.06-.526-3.63-.35-4.199l.04-.117c.022-.065.039-.104.043-.113zm8.72-10.056c.362-.031.714.289.728.677a16.525 16.525 0 01-.45 4.477c.111.054.227.107.35.157 1.45.601 2.548.342 2.558.341.591-.097 1.128-.036 1.61.164.81.336 1.414 1.022 1.695 1.931.266.863.21 1.83-.161 2.723-.784 1.891-2.746 2.882-4.377 2.206a2.867 2.867 0 01-1.255-1.025.858.858 0 00-.023-.035l-.055-.077c-.204-.273-.815-.975-1.97-1.454-.12-.049-.239-.095-.358-.135a16.531 16.531 0 01-2.847 3.483.7.7 0 01-.994-.037.703.703 0 01.037-.993 15.13 15.13 0 002.864-3.627.705.705 0 01.774-.337c.35.084.707.2 1.062.348 1.373.569 2.329 1.5 2.675 2.102l.01-.008c.165.227.373.393.62.495.91.38 2.05-.27 2.538-1.445.245-.59.286-1.219.117-1.768-.156-.502-.472-.874-.892-1.048a1.453 1.453 0 00-.764-.091c-.273.062-1.655.31-3.403-.413a7.23 7.23 0 01-.996-.506.702.702 0 01-.31-.786c.415-1.5.596-3.044.54-4.59a.702.702 0 01.677-.73zm-28.39 1.927a.702.702 0 011.306.52c-.03.078-.765 1.886-3.321 2.945-2.09.864-3.753.468-4.053.385a1.665 1.665 0 00-.97.085c-.525.218-.912.716-1.088 1.404-.195.762-.111 1.643.237 2.483.347.84.912 1.523 1.588 1.924.611.362 1.239.442 1.762.224.298-.124.55-.335.746-.627.152-.268 1.05-1.729 3.138-2.593 2.556-1.06 4.355-.3 4.43-.268a.703.703 0 11-.561 1.29c-.048-.02-1.36-.54-3.33.277-1.761.73-2.426 1.937-2.453 1.988-.385.592-.869.999-1.432 1.232-.37.153-.76.23-1.158.23-.616 0-1.25-.183-1.859-.543-.936-.555-1.706-1.476-2.17-2.596-.464-1.119-.57-2.316-.3-3.37.288-1.127.968-1.963 1.911-2.354a3.099 3.099 0 011.888-.14.78.78 0 00.012.003l.06.016c.304.072 1.516.293 3.064-.35 1.973-.816 2.53-2.11 2.553-2.165zm7.471 2.292a3.541 3.541 0 012.604-.777 3.544 3.544 0 013.166 3.898.71.71 0 01-.771.626.704.704 0 01-.628-.772 2.14 2.14 0 00-1.912-2.353 2.117 2.117 0 00-1.572.469 2.128 2.128 0 00-.78 1.443c-.06.57.107 1.129.468 1.573.36.445.873.722 1.443.78a.703.703 0 11-.144 1.4 3.527 3.527 0 01-2.39-1.293 3.53 3.53 0 01-.777-2.604 3.529 3.529 0 011.293-2.39zm10.768-5.534a3.555 3.555 0 013.551 3.55 3.555 3.555 0 01-3.55 3.55.702.702 0 110-1.405 2.147 2.147 0 002.144-2.144 2.147 2.147 0 00-2.145-2.145 2.147 2.147 0 00-2.144 2.145.702.702 0 11-1.407 0 3.555 3.555 0 013.551-3.551zm-16.982-9.548a.703.703 0 11.957 1.03 15.116 15.116 0 00-2.864 3.627.7.7 0 01-.777.337 7.281 7.281 0 01-1.06-.347c-1.75-.725-2.549-1.878-2.698-2.113a1.43 1.43 0 00-.605-.477c-.419-.174-.907-.134-1.37.11-.509.269-.924.743-1.17 1.334-.245.592-.286 1.22-.116 1.77.155.501.471.873.89 1.047.248.103.512.131.788.087-.007-.002 1.467-.375 3.38.418a7.147 7.147 0 01.996.505.701.701 0 01.31.786 15.126 15.126 0 00-.54 4.591.701.701 0 01-.677.728h-.026a.702.702 0 01-.702-.677c-.055-1.506.097-3.01.45-4.477a6.526 6.526 0 00-.349-.157c-1.453-.602-2.548-.344-2.558-.342-.594.1-1.126.036-1.609-.163-.814-.336-1.416-1.022-1.697-1.931-.266-.862-.21-1.83.161-2.723.37-.894 1.014-1.618 1.812-2.04.841-.443 1.752-.501 2.565-.165a2.857 2.857 0 011.257 1.026l.015.024c.102.152.712.993 2.032 1.54.118.05.238.094.358.135a16.514 16.514 0 012.847-3.483zm27.835.237c1.876-.773 4.2.528 5.188 2.908.986 2.38.263 4.948-1.611 5.726a3.117 3.117 0 01-1.89.14.814.814 0 00-.012-.004l-.06-.015c-.301-.072-1.512-.293-3.063.348-1.977.82-2.545 2.146-2.55 2.159a.703.703 0 11-1.309-.515c.03-.076.766-1.884 3.321-2.943 2.086-.864 3.753-.468 4.053-.385.344.067.672.039.972-.085 1.137-.472 1.528-2.252.85-3.887-.678-1.636-2.21-2.622-3.35-2.148-.299.124-.55.335-.747.627-.154.27-1.052 1.73-3.138 2.593-2.557 1.058-4.355.3-4.43.267a.703.703 0 11.562-1.29c.048.021 1.356.541 3.329-.276 1.615-.669 2.307-1.739 2.433-1.953l.02-.036c.387-.593.87-.998 1.432-1.231zm-19.395 3.616a.702.702 0 110 1.406 2.147 2.147 0 00-2.144 2.145c0 1.182.962 2.144 2.144 2.144a2.147 2.147 0 002.144-2.144.702.702 0 111.406 0 3.555 3.555 0 01-3.55 3.55 3.555 3.555 0 01-3.55-3.55 3.555 3.555 0 013.55-3.55zm-6.154-13.44c2.379-.983 4.949-.262 5.725 1.613a3.101 3.101 0 01.14 1.888c-.015.05-.4 1.375.33 3.135.817 1.973 2.11 2.53 2.165 2.553.355.148.529.557.384.914a.7.7 0 01-.905.392c-.076-.03-1.884-.765-2.943-3.32-.865-2.087-.468-3.754-.385-4.054a1.678 1.678 0 00-.085-.97c-.472-1.14-2.253-1.527-3.888-.851-1.635.677-2.618 2.212-2.147 3.35.123.298.334.55.626.747.272.153 1.73 1.052 2.595 3.138 1.058 2.555.3 4.354.266 4.43a.704.704 0 01-1.29-.561c.02-.05.54-1.358-.276-3.331-.729-1.76-1.938-2.425-1.989-2.453-.593-.387-.998-.87-1.231-1.431-.776-1.875.528-4.203 2.908-5.189zm15.465-.6c.863-.267 1.83-.21 2.722.16.894.371 1.618 1.015 2.04 1.811.444.843.503 1.754.166 2.566-.199.481-.533.903-.967 1.218-.02.015-.039.027-.06.04-.004.002-.961.595-1.562 2.046-.05.12-.095.24-.136.358a16.51 16.51 0 013.482 2.848.703.703 0 11-1.03.957 15.13 15.13 0 00-3.626-2.864.703.703 0 01-.337-.776c.084-.35.2-.706.347-1.062.725-1.749 1.879-2.55 2.114-2.698.217-.163.377-.366.477-.605.173-.42.133-.906-.112-1.37-.269-.51-.742-.924-1.333-1.169-.592-.246-1.22-.286-1.77-.117-.502.155-.873.472-1.047.89-.1.239-.13.496-.09.766.06.272.31 1.653-.415 3.402a7.042 7.042 0 01-.506.996.704.704 0 01-.786.31 15.273 15.273 0 00-4.59-.54c-.365.043-.715-.288-.728-.677a.701.701 0 01.677-.727c1.498-.06 3.008.096 4.477.45.054-.112.106-.227.157-.35.6-1.452.343-2.547.34-2.558-.096-.595-.035-1.129.164-1.61.337-.812 1.023-1.415 1.932-1.695z\"\n fill=\"#A4D5E8\"\n />\n <Path\n d=\"M142.885 84.82c-1.832 7.363-6.183 10.764-6.653 19.005-2.2-4.764-8.509-10.523-9.709-15.633-1.054-4.492-3.569-6.246-6.068-7.908a1.208 1.208 0 00-.417-.36c-6.99-3.568-9.306-5.412-13.193-7.93.026.11.047.22.072.33l4.952 8.548-3.614 4.476a28.31 28.31 0 01-.233 2.006c-.39-.03-.78-.052-1.17-.072-.281-.442-.584-.86-.906-1.261-4.15-5.165-11.423-7.208-14.52-13.426-.038.062-.075.137-.114.19-1.504 2.087-15.22 8.435-15.173 11.769.003.18.038.333.074.484-.51 1.41-.812 3.02-1.337 4.484-2.105 5.878-2.907 7.719-4.743 14.46-.5 1.835-1.433 7.968-1.455 9.872-.017 1.613 2.831 2.913 4.306 4.609 4.15 4.772 17.602 14.99 19.473 16.2.106 1.236.197 2.48.27 3.738-.199.735-.377 1.598-.585 2.626-1.88 9.356-3.937 21.235-6.558 30.468 4.138 2.175 13.716 6.302 18.554 7.244 1.174-2.664 3.635-12.023 3.967-13.894-.132 2.038-.29 4.094-.476 6.11-.27 2.916-.591 5.741-.957 8.273 5.532 1.765 17.718 1.765 22.174-.086.077-.27.91-8.679.921-8.961.079-2.106.151-4.044.214-5.877.402-11.667.397-18.712-1.135-32.26-.17-4.134-.915-8.535-1.467-11.507-.955-5.134-1.217-7.434-2.199-12.498 3.103 3.971 5.533 6.433 11.49 8.901.762.316 1.685.152 2.254-.446 6.81-7.138 6.96-20.297 7.766-30.827l-3.805-.847zM85.2 116.237c-1.613-2.554-4.31-4.043-4.31-4.043 4.427-5.293 4.934-12.57 5.139-11.76 2.156 8.574 4.008 16.49 5.251 24.515-1.741-2.562-3.927-5.302-6.08-8.712z\"\n stroke=\"#1D1C3C\"\n strokeWidth={0.5}\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M109.146 230.841c.071-.584.307-1.839-.392-2.247-.51-.298-2.53-.13-2.842-.224-.382-.114-2.261-2.826-2.636-3.325l-4.049.048-2.02 1.899-.488 3.995 12.427-.146zM83.587 230.841c.071-.584.307-1.839-.392-2.247-.51-.298-2.53-.13-2.842-.224-.382-.114-2.261-2.826-2.636-3.325l-4.049.048-2.02 1.899-.488 3.995 12.427-.146z\"\n fill=\"#1D1C3C\"\n />\n <Path\n d=\"M108.894 179.646c3.595.566 7.232.787 10.883.586a3477.67 3477.67 0 00-2.439 8.503l-1.548 5.416c-3.098 10.873-7.188 21.77-10.12 32.688.418.748-7.955-1.438-7.955-1.438s9.674-42.391 11.18-45.755zM85.49 171.835l.095-.339c4.139 2.175 8.449 4.083 12.875 5.563-1.704 2.937-16.73 44.962-19.114 49.835-1.825.277-7.553.43-7.376-.217 3.514-12.302 5.731-21.367 8.688-37.227 1.39-7.465 2.735-10.32 4.832-17.615z\"\n fill=\"#0D47A1\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M119.779 180.23c-.338 1.173-.674 2.345-1.01 3.516-3.288.354-6.689.34-10.116-.004.164-1.234.235-2.609.241-4.098 3.596.568 7.232.789 10.885.587zM85.49 171.835l.095-.339c4.139 2.175 8.449 4.083 12.875 5.563a850.272 850.272 0 00-2.313 4.008 61.85 61.85 0 01-11.829-5.323c.366-1.177.753-2.452 1.172-3.91z\"\n fill=\"#030304\"\n fillRule=\"nonzero\"\n opacity={0.1}\n />\n <Path\n d=\"M145.663 83.848c-.13-.539-.317-1.081-.679-1.56-.352-.465-.265-.562-.704-.978a7.45 7.45 0 01-1.277-1.586c-.104-.175-.205-.36-.383-.491-.505-.371-1.904-.33-2.06.174-.155.503.128 1.056.426 1.55.55.909.802 1.513 1.36 2.417.245.395.172.878.471 1.46.287.56 2.079 1.253 2.079 1.253.432-1.003.878-1.775.767-2.24z\"\n fill=\"#F2B98E\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M143.934 85.28c.214.277.462.535.766.712.723.42 1.392.408 2.158.074.572-.25 1.01-.754 1.334-1.287.266-.44.758-1.612.806-2.123.119-1.235-.243-1.81-1.082-2.724-.841-.914-2.281-1.311-3.264-.553-.293.226-.52.526-.726.833-1.144 1.696-1.287 3.387.008 5.067z\"\n fill=\"#F2B98E\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M146.49 79.81c.38-1.877.069-3.904-.196-4.466-.116-.245-.079-.454-.372-.499-.416-.065-.724.31-.869.655-.188.45-.102 1.106-.195 1.582-.211 1.096-.681 2.438-1.155 3.654-.137.352.216.257.503.544 1.684 1.69 2.179-.949 2.284-1.47z\"\n fill=\"#F2B98E\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M110.133 60.055s-.11-.143-.185-.235c-.162-.201-.298-.38-.49-.553-.013-.013-.017 0-.036 0-.043-.005-.062.05-.068.092a9.498 9.498 0 00-.083 1.712c.1-.238.292-.413.495-.563.151-.112.355-.384.367-.453z\"\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M93.042 60.418c2.907.003 4.736.006 7.642.008.41 0 .848.008 1.188.237.367.247 1.613.691 1.762 1.108 1.129 3.154 2.082 7.07 3.211 10.224.21.15.429.284.647.42-.63 5.638-3.919 10.262-10.638 5.464-1.284-1.07-2.739-2.183-4.228-3.357-.44-.601-.853-1.23-1.2-1.927 1.457-2.36 2.71-10.76 1.616-12.177z\"\n fill=\"#F2B98E\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M107.492 72.414c.054.034.106.07.16.103.62 5.46 1.308 10.922.092 16.383-3.06-6.772-10.958-8.707-15.118-14.379 1.49 1.172 2.944 2.286 4.228 3.356 6.718 4.799 10.007.174 10.638-5.463z\"\n fill=\"#A5D4E7\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M108.257 85.348c.328-4.207-1.686-14.148-1.686-14.148 3.229.849 5.867 9.697 5.867 9.697l-4.181 4.45z\"\n stroke=\"#1D1C3C\"\n strokeWidth={0.5}\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M94.166 133.621c-1.616.044-2.816-.256-4.124-.935l1.554-3.404c1.685 2.155 3.423 2.105 2.57 4.339z\"\n fill=\"#F9BC83\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M93.28 131.437c-.67-.13-1.747.064-2.133.708-.576.96-.099.867.612 1.48.247.213.64.782.935.921.592.28 1.354.16 1.877-.235.057-.044.121-.091.182-.136l-.666-2.754c-.236.105-.534.07-.806.016z\"\n fill=\"#F9BC83\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M90.585 73.482c-.189-.949.667-3.578.842-4.243.156-.59 1.02-1.291 1.536-1.684-1.536 5.04 2.25 7.283 5.664 10.38 1.748 1.584 3.663 2.66 5.186 3.598-.167.033-2.442 4.338-2.783 5.939-2.037-3.528-5.01-6.446-7.94-9.537-1.211-1.748-2.295-3.394-2.505-4.453z\"\n stroke=\"#1D1C3C\"\n strokeWidth={0.5}\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M93.018 60.555l7.642.008c.41 0 .848.008 1.188.237.367.246 1.613.691 1.761 1.108.816 2.28 1.606 5.136 2.372 7.638-2.633 2.34-9.621-.528-12.726-3.935.272-2.315.262-4.41-.237-5.056z\"\n fill=\"#DEA076\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M113.013 50.923c-.037.085-.08.175-.168.22-.063.033-.138.036-.21.04-1.63.076-3.204.854-4.167 2.06-.061.078-.146.167-.247.148-.055-.01-.098-.05-.136-.088-.703-.725-.973-1.724-1.038-2.69-.022-.345-.021-.7.114-1.023.216-.515.753-.877 1.329-1.042.576-.165 1.193-.158 1.796-.124.632.034 2.25-.035 2.763.344.576.424.198 1.598-.036 2.155z\"\n fill=\"#1D1D3C\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M108.605 50.18c1.377 3.88 1.631 7.72.335 11.622a10.91 10.91 0 01-3.46 5.025c-1.93 1.568-4.23.783-6.336-.564-2.105-1.347-4.411-4.23-5.58-6.372-1.791-3.284-2.879-6.166-2.506-9.85.474-4.688 4.078-7.963 8.315-7.778 4.26.186 7.984 4.398 9.232 7.918z\"\n fill=\"#F2B98E\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M90.634 58.594c-.444-2.009-.656-3.352-1.41-5.623-.659-1.984-1.181-4.41.489-5.812l2.178 1.143c.42.22.855.454 1.127.82.26.349.504.784.418 1.2-.636 3.07-.992 5.012.492 9.302-.89-1.41-2.382-1.627-3.294-1.03z\"\n fill=\"#1D1D3C\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M105.677 51.606c1.013-.323 1.986-1.176 3.036-1.343 1.05-.168 2.178-.172 3.126.274a7.14 7.14 0 011.006.607c1.57-.448 1.933-1.73 1.871-3.186-.083-1.98-2.44-2.287-4.012-3.06a5.578 5.578 0 01-2.032-1.681c-.447-.609-.76-1.308-1.318-1.833-1.047-.987-1.733-1.392-3.218-1.172-1.662.248-2.623 1.768-2.623 1.768l.006-.042c.13-.931-.88-1.701-1.828-1.344l-.015.006c-1.36.526-2.455 1.674-3.924 1.805-1.43.127-2.767-.762-4.203-.735-1.022.018-2.017.542-2.55 1.34-.509.764-.59 1.703-.548 2.597.06 1.289.374 2.62 1.257 3.624.108.125.245.25.418.261.156.01-.272 1.124.271.513.658-.739 2.344-1.494 4.42-.415 6.449 3.351 8.07 2.906 10.86 2.016z\"\n fill=\"#1D1D3C\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M92.843 58.45c-.405-.176-.84-.314-1.28-.28-.438.033-.884.269-1.068.67-.14.306-.112.67.007.986.12.316.324.592.534.856.535.67 1.139 1.3 1.877 1.737.328.194.705.352 1.083.294.516-.08.892-.543 1.098-1.022.754-1.75-.89-2.645-2.251-3.24z\"\n fill=\"#F9BC83\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M106.15 61.646c-.27.042-.82-.182-1.065-.337-.243-.155-.53-.281-.778-.14-.033.018-.076.04-.104.01-.008-.01-.014-.023-.019-.035-.062-.171-.007-.399.12-.493.16-.12.36-.02.535.065.292.142.599.233.908.269.12.013.238.02.356.001.306-.045.623-.277.931-.18-.13.369-.488.78-.884.84z\"\n fill=\"#1D1D3C\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M92.986 60.275c-.156-.06-.359-.056-.466.074-.09.11-.082.276-.04.414.118.397.462.72.866.814.06.013.121.023.18.01a.443.443 0 00.193-.117\"\n stroke=\"#1D1D3C\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M106.32 61.496c-2.89.196-5.653-.263-8.638-1.301-.295-.102-4.681-1.807-4.792-1.853-.03.117 4.46 2.3 4.53 2.453.141.302.593 1.078.765 1.394a759.89 759.89 0 002.668 4.85c.032.057-4.508-3.445-6.061-4.659 0 0-.09.055-.078.065.08.064 6.272 5.813 7.478 6.334.168.073.357.104.539.133.743.123 3.528.173 4.027 0 .705-.244 1.007-.67 1.428-1.284 1.385-2.032 2.496-5.1 1.948-7.573-.45.457-1.9 1.312-3.814 1.441z\"\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M98.477 132.184a4.752 4.752 0 00-2.875-1.882c-.36-.075-.801-.076-1.013.223-.178.25-.124.628-.343.843-.042.042-.107.03-.158.053l.666 2.754c.41-.3.856-.609 1.17-.99.362-.439.848-.704 1.39-.535.224.071.496.125.724.19.226.066.532-.013.581-.245.03-.146-.055-.29-.142-.411z\"\n fill=\"#F2B98E\"\n fillRule=\"nonzero\"\n />\n <Path\n stroke=\"#1D1C3C\"\n strokeWidth={0.5}\n strokeLinecap=\"round\"\n d=\"M101.381 54.122l-1.776.549M107.409 54.141l-1.258.026\"\n />\n <Path\n d=\"M100.836 56.33c-.406.084-.665.555-.579 1.056.086.501.482.839.888.757.405-.083.664-.556.579-1.056-.086-.5-.482-.84-.888-.756M106.867 56.174c-.327.067-.537.449-.468.853.068.405.39.678.717.61.326-.066.535-.448.467-.852-.068-.405-.388-.678-.716-.61\"\n fill=\"#1D1C3C\"\n />\n <Path\n d=\"M98.887 51.923s2.609 1.598 6.283.213\"\n stroke=\"#1D1C3C\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M74.878 89.524c-2.106 5.878-2.908 7.718-4.744 14.459-.5 1.836-1.433 7.968-1.455 9.873-.017 1.612 2.832 2.913 4.306 4.608 4.313 4.958 18.669 15.797 19.641 16.302 0 0 1.717-3.829 1.702-3.884-1.346-4.611-5.286-8.563-9.127-14.644-1.613-2.554-4.31-4.043-4.31-4.043 4.428-5.293 4.934-12.57 5.139-11.759\"\n stroke=\"#1D1C3C\"\n strokeWidth={0.5}\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n />\n <Path\n d=\"M106.555 132.004c-.013.468.322.855.75.866.425.01.782-.358.794-.825.012-.466-.323-.855-.75-.866-.428-.01-.782.358-.794.825zM103.366 95.879c-.012.467.322.854.75.865.426.01.782-.358.794-.825.012-.468-.323-.855-.75-.865-.427-.011-.782.357-.794.825zM105.936 113.808c-.012.466.323.854.75.865.426.01.782-.358.794-.825.012-.466-.323-.855-.75-.865-.427-.012-.782.357-.794.825zM105.183 149.74c-.012.468.323.855.75.866.426.01.782-.358.794-.825.012-.468-.322-.855-.75-.865-.427-.011-.782.359-.794.825z\"\n fill=\"#9CB2D6\"\n fillRule=\"nonzero\"\n />\n <Rect\n stroke=\"#9CB2D6\"\n strokeWidth={0.5}\n fill=\"#FFF\"\n x={130.25}\n y={8.25}\n width={44.5}\n height={54.5}\n rx={2}\n />\n <Path\n fill=\"#0D0C40\"\n d=\"M138.118 39.758l2.97-2.465.659.793-2.971 2.465zM149.322 30.734l3.427-2.844c.052-.044.525-.107.472-.063l-3.74 3.098a.124.124 0 11-.16-.191\"\n />\n <Path\n d=\"M146.758 32.334l2.782-2.308a.544.544 0 01.694.836l-2.782 2.309a.544.544 0 01-.694-.837\"\n fill=\"#C3D1E2\"\n />\n <Path\n fill=\"#C3D1E2\"\n d=\"M139.398 37.49l8.765-7.273 1.633 1.968-8.765 7.273z\"\n />\n <Path\n fill=\"#FFF\"\n d=\"M146.893 34.554l-1.672-1.891 2.843-2.415.186.08 1.561 1.849z\"\n />\n <Path\n stroke=\"#0D0C40\"\n strokeWidth={0.5}\n d=\"M139.398 37.49l8.765-7.273 1.633 1.968-8.765 7.273z\"\n />\n <Path\n fill=\"#0D0C40\"\n d=\"M136.643 38.843l.657-.545 2.703 3.257-.657.545z\"\n />\n <Path\n d=\"M168.164 45.448s-1.102.036-2.743-.31c-1.098-.23-2.196-.677-2.68-.888a8.067 8.067 0 01-.128-.057 7.679 7.679 0 01-.128.057c-.484.21-1.581.657-2.68.889-1.642.345-2.744.309-2.744.309s-.411 4.547 2.048 8.075c1.722 2.47 3.398 2.838 3.501 2.859h.006c.103-.021 1.779-.388 3.5-2.859 2.46-3.528 2.048-8.075 2.048-8.075\"\n fill=\"#C3D1E2\"\n />\n <Path\n d=\"M168.97 44.745s-1.261.041-3.14-.354c-1.259-.265-2.516-.777-3.07-1.018a9.582 9.582 0 01-.147-.065c-.04.019-.09.04-.146.065-.554.241-1.812.753-3.07 1.018-1.88.395-3.142.354-3.142.354s-.471 5.207 2.345 9.248c1.972 2.83 3.892 3.25 4.01 3.274h.006c.118-.024 2.038-.444 4.01-3.274 2.817-4.04 2.345-9.248 2.345-9.248z\"\n stroke=\"#132B42\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M147.32 46.025a379.516 379.516 0 00-10.122 0M150.246 49.438c-3.925.008-9.077.008-12.97.002M150.26 52.765c-2.55.032-5.81.032-8.37 0M149.503 56.4c-2.03-.008-3.991-.008-6.061.004\"\n stroke=\"#0D0C40\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M144.487 18.249a1.333 1.333 0 01-.334-.746c-.045-.311-.028-1.227.051-1.606.017-.079.074-.209.13-.35a.987.987 0 01.215-.356c.265-.3.622-.48.944-.48a.73.73 0 01.514.226c.108.107.141.169.119.231-.045.119-.17.102-.34-.05a.732.732 0 00-.169-.125c-.192-.068-.605.124-.825.396-.226.277-.317.56-.35 1.158-.034.645.073 1.266.27 1.47.227.237.634.362.849.243.152-.085.203-.21.282-.554a1.81 1.81 0 00.045-.463 2.4 2.4 0 00-.017-.356l-.01-.085-.329-.012c-.491-.017-.65-.05-.684-.13-.022-.056-.011-.113.023-.147.034-.033.057-.033.396-.022.197.006.412.006.491-.006.243-.034.357.051.419.283.04.147.04.305-.012.69-.045.35-.09.548-.14.666-.091.21-.272.39-.425.441-.124.04-.339.051-.492.023-.294-.057-.452-.141-.621-.34\"\n fill=\"#0D0C40\"\n />\n <Path\n d=\"M144.487 18.249a1.333 1.333 0 01-.334-.746c-.045-.311-.028-1.227.051-1.606.017-.079.074-.209.13-.35a.987.987 0 01.215-.356c.265-.3.622-.48.944-.48a.73.73 0 01.514.226c.108.107.141.169.119.231-.045.119-.17.102-.34-.05a.732.732 0 00-.169-.125c-.192-.068-.605.124-.825.396-.226.277-.317.56-.35 1.158-.034.645.073 1.266.27 1.47.227.237.634.362.849.243.152-.085.203-.21.282-.554a1.81 1.81 0 00.045-.463 2.4 2.4 0 00-.017-.356l-.01-.085-.329-.012c-.491-.017-.65-.05-.684-.13-.022-.056-.011-.113.023-.147.034-.033.057-.033.396-.022.197.006.412.006.491-.006.243-.034.357.051.419.283.04.147.04.305-.012.69-.045.35-.09.548-.14.666-.091.21-.272.39-.425.441-.124.04-.339.051-.492.023-.294-.057-.452-.141-.621-.34z\"\n stroke=\"#000\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M147.041 18.61c-.011 0-.017 0-.023-.005-.067-.028-.084-.08-.067-.277.011-.113.011-.712.005-1.52-.005-.73-.005-1.408-.005-1.51 0-.265.022-.328.17-.362.13-.028.694-.062.943-.062.294 0 .401.006.441.068.028.045.017.124-.034.153a9.532 9.532 0 01-.469.028c-.401.017-.644.04-.746.073-.04.012-.045.017-.04.085.006.272.017.939.029 1.069l.01.17.487.005c.305.005.486.017.514.034.04.022.051.073.034.13-.034.09-.056.096-.548.101l-.458.006-.006.113c-.017.356-.04 1.26-.022 1.357l.017.05h.542c.583 0 .645.012.662.085a.177.177 0 01-.08.159c-.028.011-.237.028-.593.034-.294.005-.593.01-.65.016-.034.006-.079.006-.102.006 0 0-.005 0-.01-.006\"\n fill=\"#0D0C40\"\n />\n <Path\n d=\"M147.041 18.61c-.011 0-.017 0-.023-.005-.067-.028-.084-.08-.067-.277.011-.113.011-.712.005-1.52-.005-.73-.005-1.408-.005-1.51 0-.265.022-.328.17-.362.13-.028.694-.062.943-.062.294 0 .401.006.441.068.028.045.017.124-.034.153a9.532 9.532 0 01-.469.028c-.401.017-.644.04-.746.073-.04.012-.045.017-.04.085.006.272.017.939.029 1.069l.01.17.487.005c.305.005.486.017.514.034.04.022.051.073.034.13-.034.09-.056.096-.548.101l-.458.006-.006.113c-.017.356-.04 1.26-.022 1.357l.017.05h.542c.583 0 .645.012.662.085a.177.177 0 01-.08.159c-.028.011-.237.028-.593.034-.294.005-.593.01-.65.016-.034.006-.079.006-.102.006 0 0-.005 0-.01-.006z\"\n stroke=\"#000\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M150.025 18.486c-.006-.017 0-.333 0-.7 0-.368-.006-.82-.011-1.007a27.422 27.422 0 01-.034-.989l-.017-.65-.407-.017c-.435-.017-.537-.045-.52-.164.006-.119.232-.136 1.413-.136h.35c.537 0 .51.006.51.142 0 .141-.057.152-.566.175a5.301 5.301 0 00-.47.023c-.01 0-.016.356-.005.95.011.52.011 1.265.011 1.655 0 .673 0 .712-.028.752-.034.04-.124.045-.186.017-.023-.011-.04-.034-.04-.05\"\n fill=\"#0D0C40\"\n />\n <Path\n d=\"M150.025 18.486c-.006-.017 0-.333 0-.7 0-.368-.006-.82-.011-1.007a27.422 27.422 0 01-.034-.989l-.017-.65-.407-.017c-.435-.017-.537-.045-.52-.164.006-.119.232-.136 1.413-.136h.35c.537 0 .51.006.51.142 0 .141-.057.152-.566.175a5.301 5.301 0 00-.47.023c-.01 0-.016.356-.005.95.011.52.011 1.265.011 1.655 0 .673 0 .712-.028.752-.034.04-.124.045-.186.017-.023-.011-.04-.034-.04-.05z\"\n stroke=\"#000\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M154.365 17.44c0-.384-.005-.734-.01-.802a1.028 1.028 0 00-.091-.249c-.147-.3-.52-.882-.735-1.147-.204-.255-.237-.345-.147-.436.034-.022.056-.04.073-.04a.36.36 0 01.09.04c.052.029.233.243.346.413.158.243.474.724.52.803.028.04.062.096.084.118.04.029.04.029.074-.005.028-.034.192-.272.492-.724.17-.248.373-.508.452-.582.085-.073.141-.08.192-.023.085.108.057.193-.158.453a8.072 8.072 0 00-.758 1.153c-.079.152-.096.316-.101 1.238-.006.395-.023.746-.029.774-.034.096-.203.18-.243.113-.034-.04-.05-.463-.05-1.097\"\n fill=\"#0D0C40\"\n />\n <Path\n d=\"M154.365 17.44c0-.384-.005-.734-.01-.802a1.028 1.028 0 00-.091-.249c-.147-.3-.52-.882-.735-1.147-.204-.255-.237-.345-.147-.436.034-.022.056-.04.073-.04a.36.36 0 01.09.04c.052.029.233.243.346.413.158.243.474.724.52.803.028.04.062.096.084.118.04.029.04.029.074-.005.028-.034.192-.272.492-.724.17-.248.373-.508.452-.582.085-.073.141-.08.192-.023.085.108.057.193-.158.453a8.072 8.072 0 00-.758 1.153c-.079.152-.096.316-.101 1.238-.006.395-.023.746-.029.774-.034.096-.203.18-.243.113-.034-.04-.05-.463-.05-1.097z\"\n stroke=\"#000\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M157.75 17.802c.125-.435.142-1.532.04-2.08-.05-.288-.22-.57-.39-.655a.286.286 0 00-.13-.029c-.164 0-.322.136-.44.407-.17.35-.221.656-.244 1.317-.01.492.023.888.113 1.142.034.113.181.305.26.35.113.068.294.068.447.017.158-.062.277-.214.345-.469m-.701.82c-.254-.057-.543-.317-.633-.594-.102-.294-.153-.717-.153-1.215 0-.684.108-1.21.322-1.616.074-.142.323-.407.402-.441a.586.586 0 01.186-.029c.113 0 .215.017.289.051.327.125.525.413.616.899.079.418.096 1.6.022 1.944-.107.532-.345.922-.627 1.006a1.338 1.338 0 01-.424-.005\"\n fill=\"#0D0C40\"\n />\n <Path\n d=\"M157.75 17.802c.125-.435.142-1.532.04-2.08-.05-.288-.22-.57-.39-.655a.286.286 0 00-.13-.029c-.164 0-.322.136-.44.407-.17.35-.221.656-.244 1.317-.01.492.023.888.113 1.142.034.113.181.305.26.35.113.068.294.068.447.017.158-.062.277-.214.345-.469zm-.7.82c-.254-.057-.543-.317-.633-.594-.102-.294-.153-.717-.153-1.215 0-.684.108-1.21.322-1.616.074-.142.323-.407.402-.441a.586.586 0 01.186-.029c.113 0 .215.017.289.051.327.125.525.413.616.899.079.418.096 1.6.022 1.944-.107.532-.345.922-.627 1.006a1.338 1.338 0 01-.424-.005z\"\n stroke=\"#000\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M159.079 18.22c-.119-.158-.159-.423-.187-1.158a71.367 71.367 0 010-2.227c.012-.074.012-.08.068-.085.08-.006.13.023.147.102.006.04.011.316.017.621.023 1.238.085 2.194.147 2.408.05.136.153.26.254.311.062.023.13.028.277.028.175 0 .21-.005.277-.04a.547.547 0 00.238-.333c.062-.248.14-1.57.14-2.464 0-.413.012-.56.063-.6.017-.022.057-.033.09-.033.04-.006.068.006.074.028.017.057.023 1.091.011 1.786-.022 1.233-.068 1.515-.231 1.719a.884.884 0 01-.357.231 1.4 1.4 0 01-.508.023c-.232-.057-.413-.17-.52-.317\"\n fill=\"#0D0C40\"\n />\n <Path\n d=\"M159.079 18.22c-.119-.158-.159-.423-.187-1.158a71.367 71.367 0 010-2.227c.012-.074.012-.08.068-.085.08-.006.13.023.147.102.006.04.011.316.017.621.023 1.238.085 2.194.147 2.408.05.136.153.26.254.311.062.023.13.028.277.028.175 0 .21-.005.277-.04a.547.547 0 00.238-.333c.062-.248.14-1.57.14-2.464 0-.413.012-.56.063-.6.017-.022.057-.033.09-.033.04-.006.068.006.074.028.017.057.023 1.091.011 1.786-.022 1.233-.068 1.515-.231 1.719a.884.884 0 01-.357.231 1.4 1.4 0 01-.508.023c-.232-.057-.413-.17-.52-.317z\"\n stroke=\"#000\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M162.198 16.4c.498-.113.809-.412.837-.802.006-.113.006-.136-.034-.21-.096-.186-.373-.316-.65-.322-.028 0-.062.006-.09.006a2.258 2.258 0 00-.407.09c0 .006-.006.244-.006.543 0 .554.006.667.068.707.04.022.147.017.282-.012m-.604.17c-.034-1.396-.023-1.588.079-1.645.034-.028.587-.147.661-.147.17 0 .543.147.712.283a.74.74 0 01.3.509c.022.203-.096.446-.385.757-.17.192-.17.192-.17.283 0 .152.244.723.538 1.26.068.13.158.305.186.384.08.17.08.232 0 .3-.056.05-.113.04-.18-.034-.193-.215-.56-.955-.775-1.537a1.919 1.919 0 00-.113-.277l-.028-.04-.249.057-.254.05.005.09c.023.125.012 1.504-.005 1.584-.017.079-.068.118-.136.118-.141 0-.136.085-.186-1.995\"\n fill=\"#0D0C40\"\n />\n <Path\n d=\"M162.198 16.4c.498-.113.809-.412.837-.802.006-.113.006-.136-.034-.21-.096-.186-.373-.316-.65-.322-.028 0-.062.006-.09.006a2.258 2.258 0 00-.407.09c0 .006-.006.244-.006.543 0 .554.006.667.068.707.04.022.147.017.282-.012zm-.604.17c-.034-1.396-.023-1.588.079-1.645.034-.028.587-.147.661-.147.17 0 .543.147.712.283a.74.74 0 01.3.509c.022.203-.096.446-.385.757-.17.192-.17.192-.17.283 0 .152.244.723.538 1.26.068.13.158.305.186.384.08.17.08.232 0 .3-.056.05-.113.04-.18-.034-.193-.215-.56-.955-.775-1.537a1.919 1.919 0 00-.113-.277l-.028-.04-.249.057-.254.05.005.09c.023.125.012 1.504-.005 1.584-.017.079-.068.118-.136.118-.141 0-.136.085-.186-1.995z\"\n stroke=\"#000\"\n strokeWidth={0.5}\n />\n <Path\n d=\"M144.806 22.344l-.362-1.423a3.333 3.333 0 01-.092-.442c-.007-.131-.007-.138.046-.197.112-.112.217-.04.27.184.118.508.178.732.296 1.232.073.31.178.685.224.83.046.145.139.488.211.745.072.263.132.48.132.494.006.006.079-.204.151-.488.08-.276.172-.612.218-.744.066-.224.316-1.2.434-1.733a11.4 11.4 0 00.086-.355c.033-.139.099-.211.165-.218.033 0 .072.02.112.06a.266.266 0 01.046.131c0 .099-.066.395-.171.79-.053.179-.178.68-.29 1.12-.488 1.905-.56 2.162-.685 2.293-.06.053-.093.06-.139.007-.079-.099-.158-.35-.652-2.286M148.785 22.33c-.046-.124-.316-1.1-.316-1.12a.171.171 0 00-.027-.065c-.006-.013-.013-.013-.02-.013-.019 0-.032.04-.092.17-.112.245-.283.811-.283.904 0 .112.099.151.514.151.178 0 .23 0 .224-.026m.435 1.693a34.428 34.428 0 00-.35-1.252 4.518 4.518 0 00-.408-.06 9.813 9.813 0 01-.448-.065c-.092-.013-.125.033-.23.33-.053.144-.172.467-.277.717-.105.25-.204.534-.244.62-.118.25-.204.355-.276.25-.02-.02-.033-.086-.027-.21 0-.231.04-.403.316-1.055.112-.263.27-.698.363-.962l.349-1.001a34.606 34.606 0 00.342-1.041c.014-.033.073-.06.126-.06.013 0 .026.007.04.007.072.033.098.099.124.284.014.092.08.382.165.652.086.27.184.612.217.744.08.316.126.409.198.448.073.053.086.099.066.204-.02.106.007.29.151.804.205.725.25.962.198 1.08a.312.312 0 01-.086.113c-.039.033-.046.033-.092 0-.066-.047-.112-.152-.217-.547M150.82 24.182c-.296-.362-.408-.745-.44-1.535-.014-.35.019-.672.111-1.06.132-.567.316-.897.679-1.193.217-.178.336-.237.494-.27a.679.679 0 01.79.408c.1.23.086.376-.052.376-.046 0-.093-.04-.238-.205-.25-.29-.342-.329-.586-.19-.33.184-.566.5-.685.935-.112.408-.171 1.107-.138 1.43.026.276.098.592.171.757.112.25.382.481.613.514.079.02.29-.027.434-.092.06-.02.198-.106.336-.191.178-.112.244-.145.284-.132.112.04.026.244-.205.448a1.31 1.31 0 01-.487.29c-.145.04-.547.059-.665.033-.112-.027-.264-.139-.415-.323M153.89 24.182c-.296-.362-.408-.745-.441-1.535-.013-.35.02-.672.112-1.06.132-.567.316-.897.678-1.193.218-.178.337-.237.495-.27a.679.679 0 01.79.408c.099.23.086.376-.053.376-.046 0-.092-.04-.237-.205-.25-.29-.342-.329-.586-.19-.33.184-.567.5-.685.935-.112.408-.171 1.107-.139 1.43.027.276.1.592.172.757.112.25.382.481.612.514.08.02.29-.027.435-.092.06-.02.198-.106.336-.191.178-.112.244-.145.283-.132.112.04.027.244-.204.448a1.31 1.31 0 01-.487.29c-.145.04-.547.059-.666.033-.112-.027-.263-.139-.415-.323M156.92 20.157c.047.052.053.184.086 1.462.02.64.007 1.502.02 1.865.013.362 0 .685-.007.784-.006.164-.013.197-.059.243-.06.066-.118.08-.171.033-.04-.04-.086-.21-.125-.52-.027-.224-.013-2.682-.007-3.452 0-.139-.02-.343.073-.409a.23.23 0 01.118-.04c.033-.006.06.007.073.034M158.16 23.036c-.034-1.364-.034-2.438-.008-2.629.033-.198.086-.296.152-.323 0-.006.013-.006.026-.006.066 0 .139.098.29.434.092.178.244.481.33.672.105.178.322.633.494.989.316.658.56 1.133.698 1.376l.079.126v-.442c0-.244-.013-.81-.033-1.252a57.002 57.002 0 01-.026-1.304c0-.56.006-.586.125-.586.086 0 .138.033.158.112.013.04.033.382.046.764.013.382.02.968.033 1.291.033.975.04 2.082 0 2.161-.046.138-.165.171-.257.073-.112-.139-.342-.574-.79-1.49a16.084 16.084 0 00-.422-.836l-.356-.698c-.145-.284-.184-.356-.197-.33-.02.053-.007 1.825.026 2.543.026.587.013.771-.06.83-.059.053-.125.053-.17 0-.086-.099-.113-.356-.139-1.475M161.63 24.544c-.013 0-.019 0-.026-.006-.079-.033-.099-.093-.079-.323.013-.132.013-.83.007-1.772-.007-.85-.007-1.64-.007-1.76 0-.309.027-.381.198-.421.151-.033.81-.072 1.1-.072.343 0 .468.006.514.079.033.052.02.145-.04.177-.033.007-.27.02-.546.033-.468.02-.751.047-.87.086-.046.013-.053.02-.046.099.006.316.02 1.093.033 1.245l.013.198.567.006c.355.007.566.02.6.04.045.026.058.085.039.151-.04.106-.066.112-.64.119l-.533.006-.007.132c-.02.415-.046 1.47-.026 1.581l.02.06h.632c.679 0 .751.013.771.098a.206.206 0 01-.092.185c-.033.013-.277.033-.692.04-.342.006-.692.013-.758.02-.039.006-.092.006-.118.006 0 0-.007 0-.013-.007\"\n fill=\"#0D0C40\"\n />\n <Path\n d=\"M157.367 28.907c3.695.01 7.537.01 11.285 0M159.87 32.097a391.075 391.075 0 0110.077-.006M157.367 35.511c3.392-.022 6.93-.022 10.335 0M157.367 38.836c4.195.008 8.408.008 12.605 0\"\n stroke=\"#0D0C40\"\n strokeWidth={0.5}\n />\n </G>\n </Svg>\n );\n}", "function toSVG() {\n return '';\n\n /* Note: Support for SVG is suspended\n *\n var canvas = getCanvas();\n //@see http://www.w3schools.com/svg/svg_example.asp\n var v2 = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>';\n v2 += \"\\n\" + '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"'\n + canvas.width +'\" height=\"' + canvas.height\n + '\" viewBox=\"0 0 ' + canvas.width + ' ' + canvas.height + '\" version=\"1.1\">';\n INDENTATION++;\n v2 += STACK.toSVG();\n v2 += CONNECTOR_MANAGER.toSVG();\n INDENTATION--;\n v2 += \"\\n\" + '</svg>';\n \n return v2;\n */\n}", "function downloadPNG() {\n document.getElementById('svg').removeAttribute('style');\n panZoomInstance.moveTo(0, 0);\n panZoomInstance.zoomAbs(0, 0, 1);\n saveSvgAsPng(document.getElementById(\"svg\"), \"GeometricIllustration.png\");\n}", "function portfolioSVG() {\n return src(input)\n .pipe(svgSprite(config))\n .pipe(dest(output))\n}", "function targetShapeSvgUri() {\n var bullseyePath = 'M256 72c101.689 0 184 82.295 184 184 0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-101.689 82.295-184 184-184m0-64C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 184c35.29 0 64 28.71 64 64s-28.71 64-64 64-64-28.71-64-64 28.71-64 64-64m0-64c-70.692 0-128 57.308-128 128s57.308 128 128 128 128-57.308 128-128-57.308-128-128-128z';\n\n var circlePath = 'M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z';\n\n var svgString = '<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"' + circlePath + '\" fill=\"white\"/><path d=\"' + bullseyePath + '\" fill=\"currentColor\"/></svg>';\n\n //js/mini-svg-data-uri.js\n var svg = svgToTinyDataUri(svgString);\n return svg.replace('currentColor', g_fillColor);\n\n}", "function svg2Stng(svgElem)\r\n{\r\n console.log(new XMLSerializer().serializeToString(svgElem))\r\n}", "function svgo() {\n // Source\n return gulp.src('./src/Images/src/**/*.svg')\n .pipe(svgmin({\n js2svg: {\n pretty: true\n },\n plugins: [\n {\n removeTitle: true\n }\n ]\n }))\n .pipe(gulp.dest('./src/Images/dist'))\n .pipe(browserSync.stream());\n}", "serialize() {\n var svg = document.getElementsByTagName(\"svg\")\n var editor = atom.workspace.getActiveTextEditor()\n if(editor && (svg.length == 0)){\n this.createGraph(editor);\n }\n }", "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "get SUPPORT_SVG_DRAWING() {\n 'use strict';\n\n var value = testSVG(document);\n Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });\n return value;\n }", "render(svg, events) {\n let prevSvg = document.querySelector(`${this.eCfg.selector} svg`);\n if (prevSvg) prevSvg.remove();\n\n svg._visualization = this.drawableElement._visualization;\n this.drawableElement = svg;\n d3.select(svg).selectAll('path').attr('vector-effect', 'non-scaling-stroke'); // for zoom\n\n svg.style.top = '0px';\n svg.style.left = '0px';\n svg.style.position = 'absolute';\n this.element.append(svg) // this.v.element.selector\n\n return this.attachEvents(svg, events);;\n }", "function svg(id = null, classList) {\n let svg = document.createElementNS(Svg.svgNS, \"svg\");\n if (id != null)\n svg.id = id;\n if (classList != undefined) {\n svg.classList.add(...classList);\n }\n return svg;\n }", "function SVGElement(type, options) {\n this.create = function(type) {\n this.elem = document.createElementNS('http://www.w3.org/2000/svg', type);\n };\n this.get = function(key) {\n return this.elem.getAttributeNS(null, key);\n };\n this.set = function(key, val) {\n this.elem.setAttributeNS(null, key, val);\n };\n this.setBulk = function(options) {\n for (let key in options) {\n if (options.hasOwnProperty(key)) {\n this.set(key, options[key]);\n }\n }\n };\n this.addClass = function(cls) {\n this.elem.classList.add(cls);\n };\n this.removeClass = function(cls) {\n this.elem.classList.remove(cls);\n };\n this.addEventListener = function(type, func) {\n this.elem.addEventListener(type, func);\n };\n this.removeEventListener = function(type, func) {\n this.elem.removeEventListener(type, func);\n };\n this.appendChild = function(child) {\n this.elem.appendChild(child);\n };\n this.removeChild = function(child) {\n this.elem.removeChild(child);\n };\n this.element = function() {\n return this.elem;\n };\n\n this.create(type);\n if (options !== null) {\n this.setBulk(options);\n }\n}", "function v(e){const t=e.fn.attr;return e.fn.attr=function(e,n){const r=this.length;if(!r)return t.call(this,e,n);for(let i=0;i<r;++i){const r=this[i];if(\"http://www.w3.org/2000/svg\"!==r.namespaceURI)return t.call(this,e,n);if(void 0!==n)r.setAttribute(e,n);else if(Array.isArray(e)){const t={};let n=e.length;for(;n--;){const i=e[n];let o=r.getAttribute(i);(o||\"0\"===o)&&(o=isNaN(o)?o:o-0),t[i]=o}return t}if(\"object\"!=typeof e){let t=r.getAttribute(e);return(t||\"0\"===t)&&(t=isNaN(t)?t:t-0),t}for(const[t,n]of Object.entries(e))r.setAttribute(t,n)}return this},e}", "function getIcon(code) {\n if (code === '01d') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"3 3 26 26\">\n <title>sun</title>\n <path d=\"M16 9c-3.859 0-7 3.141-7 7s3.141 7 7 7 7-3.141 7-7c0-3.859-3.141-7-7-7zM16 21c-2.762 0-5-2.238-5-5s2.238-5 5-5 5 2.238 5 5-2.238 5-5 5zM16 7c0.552 0 1-0.448 1-1v-2c0-0.552-0.448-1-1-1s-1 0.448-1 1v2c0 0.552 0.448 1 1 1zM16 25c-0.552 0-1 0.448-1 1v2c0 0.552 0.448 1 1 1s1-0.448 1-1v-2c0-0.552-0.448-1-1-1zM23.777 9.635l1.414-1.414c0.391-0.391 0.391-1.023 0-1.414s-1.023-0.391-1.414 0l-1.414 1.414c-0.391 0.391-0.391 1.023 0 1.414s1.023 0.391 1.414 0zM8.223 22.365l-1.414 1.414c-0.391 0.391-0.391 1.023 0 1.414s1.023 0.391 1.414 0l1.414-1.414c0.391-0.392 0.391-1.023 0-1.414s-1.023-0.392-1.414 0zM7 16c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1s0.448 1 1 1h2c0.552 0 1-0.448 1-1zM28 15h-2c-0.552 0-1 0.448-1 1s0.448 1 1 1h2c0.552 0 1-0.448 1-1s-0.448-1-1-1zM8.221 9.635c0.391 0.391 1.024 0.391 1.414 0s0.391-1.023 0-1.414l-1.414-1.414c-0.391-0.391-1.023-0.391-1.414 0s-0.391 1.023 0 1.414l1.414 1.414zM23.779 22.363c-0.392-0.391-1.023-0.391-1.414 0s-0.392 1.023 0 1.414l1.414 1.414c0.391 0.391 1.023 0.391 1.414 0s0.391-1.023 0-1.414l-1.414-1.414z\"/>\n </svg>`;\n }\n\n if (code === '01n') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"8.21 8.21 15.57 15.57\">\n <title>moon</title>\n <path d=\"M21.866 21.447c-3.117 3.12-8.193 3.12-11.313 0s-3.12-8.195 0-11.314c0.826-0.824 1.832-1.453 2.989-1.863 0.365-0.128 0.768-0.035 1.039 0.237 0.274 0.273 0.366 0.677 0.237 1.039-0.784 2.211-0.25 4.604 1.391 6.245 1.638 1.639 4.031 2.172 6.245 1.391 0.362-0.129 0.767-0.036 1.039 0.237 0.273 0.271 0.365 0.676 0.236 1.039-0.408 1.157-1.038 2.164-1.863 2.989zM11.967 11.547c-2.34 2.34-2.34 6.147 0 8.486 2.5 2.501 6.758 2.276 8.937-0.51-2.247 0.141-4.461-0.671-6.109-2.318s-2.458-3.861-2.318-6.108c-0.18 0.141-0.35 0.29-0.51 0.451z\"/>\n </svg>`;\n }\n if (code === '02d') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"0 0 32 32\">\n <title>cloudy-day</title>\n <path d=\"M13 4c0.552 0 1-0.448 1-1v-2c0-0.552-0.448-1-1-1s-1 0.448-1 1v2c0 0.552 0.448 1 1 1zM20.777 6.635l1.414-1.414c0.391-0.391 0.391-1.023 0-1.414s-1.023-0.391-1.414 0l-1.414 1.414c-0.391 0.391-0.391 1.023 0 1.414s1.023 0.391 1.414 0zM1 14h2c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1s0.448 1 1 1zM22 13c0 0.552 0.448 1 1 1h2c0.552 0 1-0.448 1-1s-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1zM5.221 6.635c0.391 0.391 1.024 0.391 1.414 0s0.391-1.023 0-1.414l-1.414-1.414c-0.391-0.391-1.023-0.391-1.414 0s-0.391 1.023 0 1.414l1.414 1.414zM25 16c-0.332 0-0.66 0.023-0.987 0.070-1.048-1.43-2.445-2.521-4.029-3.219-0.081-3.789-3.176-6.852-6.984-6.852-3.859 0-7 3.141-7 7 0 1.090 0.271 2.109 0.719 3.027-3.727 0.152-6.719 3.211-6.719 6.973 0 3.859 3.141 7 7 7 0.856 0 1.693-0.156 2.482-0.458 1.81 1.578 4.112 2.458 6.518 2.458 2.409 0 4.708-0.88 6.518-2.458 0.789 0.302 1.626 0.458 2.482 0.458 3.859 0 7-3.141 7-7s-3.141-7-7-7zM13 8c2.488 0 4.535 1.823 4.919 4.203-0.626-0.125-1.266-0.203-1.919-0.203-2.871 0-5.531 1.238-7.398 3.328-0.371-0.698-0.602-1.482-0.602-2.328 0-2.762 2.238-5 5-5zM25 28c-1.070 0-2.057-0.344-2.871-0.917-1.467 1.768-3.652 2.917-6.129 2.917s-4.662-1.148-6.129-2.917c-0.813 0.573-1.801 0.917-2.871 0.917-2.762 0-5-2.238-5-5s2.238-5 5-5c0.484 0 0.941 0.091 1.383 0.221 0.176 0.049 0.354 0.089 0.52 0.158 0.273-0.535 0.617-1.025 0.999-1.484 1.461-1.758 3.634-2.895 6.099-2.895 0.633 0 1.24 0.091 1.828 0.232 0.66 0.156 1.284 0.393 1.865 0.706 1.456 0.773 2.651 1.971 3.404 3.441 0.587-0.242 1.229-0.379 1.904-0.379 2.762 0 5 2.238 5 5s-2.238 5-5 5z\"/>\n </svg>`;\n }\n if (code === '02n') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"0 2.42 32 29.57\">\n <title>cloudy-night</title>\n <path d=\"M27.191 16.385c0.305-0.227 0.613-0.449 0.889-0.725 0.826-0.827 1.454-1.833 1.862-2.991 0.13-0.362 0.038-0.768-0.236-1.039-0.272-0.273-0.676-0.366-1.039-0.237-2.212 0.781-4.605 0.25-6.244-1.391-1.641-1.641-2.174-4.033-1.391-6.244 0.128-0.363 0.036-0.767-0.237-1.040-0.271-0.271-0.676-0.365-1.039-0.237-1.159 0.411-2.164 1.039-2.99 1.864-2.096 2.094-2.749 5.063-2.030 7.737-2.703 0.345-5.133 1.781-6.751 3.987-0.327-0.047-0.655-0.070-0.987-0.070-3.859 0-7 3.141-7 7s3.141 7 7 7c0.856 0 1.693-0.156 2.482-0.458 1.81 1.578 4.112 2.458 6.518 2.458 2.409 0 4.708-0.88 6.518-2.458 0.789 0.302 1.626 0.458 2.482 0.458 3.859 0 7-3.141 7-7 0-3.090-2.026-5.689-4.809-6.615zM18.182 5.76c0.159-0.161 0.329-0.311 0.509-0.452-0.141 2.249 0.671 4.461 2.319 6.108 1.648 1.648 3.861 2.458 6.109 2.319-0.862 1.099-2.050 1.783-3.32 2.074-1.711-2.172-4.225-3.539-6.997-3.762-0.767-2.122-0.318-4.59 1.38-6.288zM25 28c-1.070 0-2.057-0.344-2.871-0.917-1.467 1.768-3.652 2.917-6.129 2.917s-4.662-1.148-6.129-2.917c-0.813 0.573-1.801 0.917-2.871 0.917-2.762 0-5-2.238-5-5s2.238-5 5-5c0.676 0 1.316 0.137 1.902 0.379 1.262-2.46 3.734-4.181 6.645-4.346 0.152-0.009 0.301-0.033 0.453-0.033 0.807 0 1.582 0.126 2.313 0.349 0.987 0.302 1.887 0.794 2.668 1.428 0.746 0.605 1.371 1.348 1.863 2.181 0.083 0.141 0.177 0.273 0.253 0.421 0.587-0.242 1.229-0.379 1.904-0.379 2.762 0 5 2.238 5 5s-2.238 5-5 5z\"/>\n </svg>`;\n }\n if (code === '03d' || code === '03n') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"0 6 32 20\">\n <title>cloud</title>\n <path d=\"M25 10c-0.332 0-0.66 0.023-0.987 0.070-1.867-2.544-4.814-4.070-8.013-4.070s-6.145 1.526-8.013 4.070c-0.327-0.047-0.655-0.070-0.987-0.070-3.859 0-7 3.141-7 7s3.141 7 7 7c0.856 0 1.693-0.156 2.482-0.458 1.81 1.578 4.112 2.458 6.518 2.458 2.409 0 4.708-0.88 6.518-2.458 0.789 0.302 1.626 0.458 2.482 0.458 3.859 0 7-3.141 7-7s-3.141-7-7-7zM25 22c-1.070 0-2.057-0.344-2.871-0.917-1.467 1.768-3.652 2.917-6.129 2.917s-4.662-1.148-6.129-2.917c-0.813 0.573-1.801 0.917-2.871 0.917-2.762 0-5-2.238-5-5s2.238-5 5-5c0.676 0 1.316 0.138 1.902 0.38 1.327-2.588 3.991-4.38 7.098-4.38s5.771 1.792 7.096 4.38c0.587-0.242 1.229-0.38 1.904-0.38 2.762 0 5 2.238 5 5s-2.238 5-5 5z\"/>\n </svg>`;\n }\n if (code === '04d' || code === '04n') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"0 6.57 32 25.43\">\n <title>cloudy</title>\n <path d=\"M32 15c0-3.073-2.5-5.572-5.573-5.572-0.15 0-0.298 0.007-0.447 0.018-1.445-1.803-3.624-2.874-5.98-2.874-2.355 0-4.535 1.070-5.98 2.874-0.148-0.012-0.298-0.018-0.449-0.018-3.070-0-5.57 2.499-5.57 5.572 0 0.322 0.043 0.631 0.094 0.94-0.034 0.044-0.074 0.085-0.107 0.13-0.327-0.047-0.655-0.070-0.987-0.070-3.859 0-7 3.141-7 7s3.141 7 7 7c0.856 0 1.693-0.156 2.482-0.458 1.81 1.578 4.112 2.458 6.518 2.458 2.409 0 4.708-0.88 6.518-2.458 0.789 0.302 1.626 0.458 2.482 0.458 3.859 0 7-3.141 7-7 0-1.605-0.565-3.068-1.479-4.25 0.911-0.994 1.479-2.302 1.479-3.75zM25 28c-1.070 0-2.057-0.344-2.871-0.917-1.467 1.768-3.652 2.917-6.129 2.917s-4.662-1.148-6.129-2.917c-0.813 0.573-1.801 0.917-2.871 0.917-2.762 0-5-2.238-5-5s2.238-5 5-5c0.676 0 1.316 0.137 1.902 0.379 0.035-0.066 0.078-0.125 0.113-0.189 0.352-0.642 0.785-1.23 1.292-1.753 1.443-1.495 3.448-2.438 5.693-2.438 3.107 0 5.771 1.792 7.096 4.379 0.353-0.145 0.729-0.238 1.117-0.301l0.787-0.078c0.771 0 1.492 0.19 2.145 0.5 0.707 0.338 1.314 0.836 1.79 1.449 0.656 0.845 1.065 1.897 1.065 3.051 0 2.762-2.238 5-5 5zM29.098 17.352c-1.155-0.841-2.563-1.352-4.098-1.352-0.332 0-0.66 0.023-0.987 0.070-1.867-2.544-4.814-4.070-8.013-4.070-2.133 0-4.145 0.69-5.809 1.896 0.467-1.428 1.796-2.467 3.379-2.467 0.484 0 0.941 0.098 1.359 0.271 0.949-1.848 2.852-3.126 5.070-3.126s4.122 1.279 5.068 3.126c0.421-0.173 0.88-0.271 1.359-0.271 1.974 0 3.573 1.599 3.573 3.572 0 0.905-0.348 1.721-0.902 2.351z\"/>\n </svg>`;\n }\n if (code === '09d' || code === '09n' || code === '10d' || code === '10n') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"0 0 32 32\">\n <title>rainy</title>\n <path d=\"M25 4c-0.332 0-0.66 0.023-0.987 0.070-1.867-2.544-4.814-4.070-8.013-4.070s-6.145 1.526-8.013 4.070c-0.327-0.047-0.655-0.070-0.987-0.070-3.859 0-7 3.141-7 7s3.141 7 7 7c0.856 0 1.693-0.156 2.482-0.458 1.81 1.578 4.112 2.458 6.518 2.458 2.409 0 4.708-0.88 6.518-2.458 0.789 0.302 1.626 0.458 2.482 0.458 3.859 0 7-3.141 7-7s-3.141-7-7-7zM25 16c-1.070 0-2.057-0.344-2.871-0.917-1.467 1.768-3.652 2.917-6.129 2.917s-4.662-1.148-6.129-2.917c-0.813 0.573-1.801 0.917-2.871 0.917-2.762 0-5-2.238-5-5s2.238-5 5-5c0.676 0 1.316 0.138 1.902 0.38 1.327-2.588 3.991-4.38 7.098-4.38s5.771 1.792 7.096 4.38c0.587-0.242 1.229-0.38 1.904-0.38 2.762 0 5 2.238 5 5s-2.238 5-5 5zM14.063 30c0 1.105 0.895 2 2 2s2-0.895 2-2-2-4-2-4-2 2.895-2 4zM22 28c0 1.105 0.895 2 2 2s2-0.895 2-2-2-4-2-4-2 2.895-2 4zM6 24c0 1.105 0.894 2 2 2s2-0.895 2-2-2-4-2-4-2 2.895-2 4z\"/>\n </svg>`;\n }\n if (code === '11d' || code === '11n') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"0 0 32 32\">\n <title>lightning</title>\n <path d=\"M12 24l2 2-2 6 6-6-2-2 2-4-6 4zM32 8.427c0-3.072-2.5-5.57-5.573-5.57-0.15 0-0.298 0.005-0.447 0.017-1.445-1.802-3.624-2.874-5.98-2.874-2.355 0-4.535 1.072-5.98 2.874-0.148-0.012-0.298-0.017-0.449-0.017-3.070 0-5.57 2.499-5.57 5.57 0 0.322 0.043 0.633 0.094 0.94-0.034 0.044-0.074 0.085-0.107 0.13-0.327-0.047-0.655-0.070-0.987-0.070-3.859 0-7 3.141-7 7s3.141 7 7 7c0.856 0 1.693-0.156 2.482-0.458 0.069 0.060 0.151 0.102 0.221 0.16l1.77-1.18c-0.59-0.418-1.141-0.883-1.602-1.438-0.813 0.572-1.801 0.915-2.871 0.915-2.762 0-5-2.237-5-5 0-2.76 2.238-5 5-5 0.676 0 1.316 0.138 1.902 0.38 0.035-0.068 0.078-0.125 0.113-0.19 0.352-0.642 0.785-1.229 1.292-1.753 1.443-1.493 3.448-2.438 5.693-2.438 3.107 0 5.771 1.792 7.096 4.38 0.353-0.146 0.729-0.24 1.117-0.302l0.787-0.078c0.771 0 1.492 0.19 2.145 0.5 0.707 0.339 1.314 0.836 1.79 1.45 0.656 0.845 1.065 1.896 1.065 3.050 0 2.763-2.238 5-5 5-1.070 0-2.057-0.344-2.871-0.915-0.875 1.055-2.027 1.848-3.322 2.348l-0.374 0.746 1.141 1.141c1.066-0.415 2.064-1.012 2.944-1.777 0.789 0.302 1.626 0.458 2.482 0.458 3.859 0 7-3.141 7-7 0-1.604-0.565-3.068-1.479-4.25 0.911-0.992 1.479-2.301 1.479-3.75zM29.098 10.779c-1.155-0.84-2.563-1.352-4.098-1.352-0.332 0-0.66 0.023-0.987 0.070-1.867-2.543-4.814-4.070-8.013-4.070-2.133 0-4.145 0.691-5.809 1.897 0.467-1.428 1.796-2.467 3.379-2.467 0.484 0 0.941 0.098 1.359 0.271 0.949-1.849 2.852-3.128 5.070-3.128s4.122 1.279 5.068 3.128c0.421-0.173 0.88-0.271 1.359-0.271 1.974 0 3.573 1.599 3.573 3.57 0 0.906-0.348 1.723-0.902 2.352z\"/>\n </svg>`;\n }\n if (code === '13d' || code === '13n') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"0.5 1 47.01 47.01\">\n <title>snow</title>\n <path d=\"M14.5 24.502c0 1 0.16 1.97 0.44 2.871l-4.080 2.35-7.26-1.94c-1.31-0.35-2.66 0.43-3.020 1.729-0.35 1.311 0.43 2.65 1.75 3l5.87 1.57-1.58 5.84c-0.35 1.301 0.43 2.65 1.74 3 1.32 0.35 2.67-0.43 3.020-1.738l1.94-7.221 4.27-2.451c1.11 1.010 2.46 1.771 3.95 2.172v5.5l-5.32 4.488c-0.96 0.99-0.96 2.59 0 3.59 0.96 0.99 2.52 0.99 3.48 0l4.3-4.439 4.3 4.439c0.96 0.99 2.52 0.99 3.479 0 0.961-1 0.961-2.6 0-3.59l-5.319-4.488v-5.5c1.49-0.4 2.84-1.162 3.95-2.172l4.27 2.451 1.94 7.221c0.35 1.309 1.699 2.088 3.020 1.738 1.311-0.35 2.091-1.699 1.74-3l-1.58-5.84 5.87-1.57c1.32-0.35 2.1-1.689 1.75-3-0.359-1.299-1.71-2.078-3.020-1.729l-7.261 1.939-4.079-2.35c0.279-0.9 0.439-1.871 0.439-2.871s-0.16-1.97-0.439-2.88l4.079-2.34 7.261 1.94c1.31 0.35 2.66-0.431 3.020-1.73 0.35-1.31-0.43-2.65-1.75-3l-5.87-1.57 1.58-5.84c0.351-1.3-0.43-2.649-1.74-3-1.32-0.35-2.67 0.43-3.020 1.74l-1.94 7.22-4.27 2.45c-1.11-1.010-2.46-1.77-3.95-2.17v-4.5l5.319-5.49c0.961-0.99 0.961-2.59 0-3.59-0.96-0.99-2.52-0.99-3.479 0l-4.3 4.442-4.3-4.44c-0.96-0.99-2.52-0.99-3.48 0-0.96 1-0.96 2.6 0 3.59l5.32 5.49v4.5c-1.49 0.4-2.84 1.16-3.95 2.17l-4.27-2.45-1.94-7.22c-0.35-1.311-1.7-2.090-3.020-1.74-1.31 0.351-2.090 1.7-1.74 3l1.58 5.84-5.87 1.57c-1.32 0.35-2.1 1.69-1.75 3 0.36 1.3 1.71 2.080 3.020 1.73l7.26-1.94 4.080 2.34c-0.28 0.91-0.44 1.879-0.44 2.879zM24 29.002c-2.49 0-4.5-2.010-4.5-4.5s2.010-4.5 4.5-4.5 4.5 2.010 4.5 4.5c0 2.49-2.010 4.5-4.5 4.5z\"/>\n </svg>`;\n }\n if (code === '50d' || code === '50n') {\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" fill=\"#f5f5f5\" viewBox=\"1.94 5.94 30 18\">\n <title>mist</title>\n <path d=\"M30.938 13.938h-5.102c-0.504-4.487-4.277-8-8.898-8-3.113 0-5.859 1.591-7.477 4h-6.523c-0.552 0-1 0.448-1 1s0.448 1 1 1h5.552c-0.226 0.638-0.374 1.306-0.45 2h-3.102c-0.552 0-1 0.448-1 1s0.448 1 1 1h3.102c0.077 0.693 0.224 1.363 0.45 2h-5.37c-0.654 0-1.182 0.448-1.182 1s0.529 1 1.182 1h6.341c1.617 2.41 4.363 4 7.477 4s5.859-1.59 7.477-4h2.341c0.654 0 1.182-0.448 1.182-1s-0.529-1-1.182-1h-1.37c0.227-0.637 0.372-1.307 0.451-2h5.102c0.552 0 1-0.448 1-1s-0.448-1-1-1zM10.639 11.938h6.298c0.552 0 1-0.448 1-1s-0.448-1-1-1h-4.884c1.263-1.233 2.983-2 4.884-2 3.518 0 6.409 2.617 6.898 6h-13.797c0.102-0.707 0.302-1.378 0.6-2zM16.938 21.938c-1.901 0-3.621-0.768-4.884-2h9.767c-1.262 1.232-2.982 2-4.883 2zM23.234 17.938h-12.595c-0.298-0.622-0.499-1.293-0.6-2h13.797c-0.102 0.707-0.302 1.378-0.602 2z\"/>\n </svg>`;\n }\n\n return '';\n}", "function SvgComponent(props) {\n return (\n <View {...props}>\n <Svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 462 131\" {...props}>\n <Defs></Defs>\n <G filter=\"url(#prefix__a)\" data-name=\"Group 293\">\n <Path\n data-name=\"Rectangle 15\"\n d=\"M34 27h394a10 10 0 0110 10v73H24V37a10 10 0 0110-10z\"\n fill=\"#fff\"\n />\n </G>\n </Svg>\n </View>\n );\n}", "function LogoSvg(props) {\n return (\n <Svg\n id=\"prefix__Layer_1\"\n data-name=\"Layer 1\"\n viewBox=\"0 0 132.32 197.94\"\n {...props}\n >\n <Defs>\n <ClipPath id=\"prefix__clip-path\" transform=\"translate(18.71 24.68)\">\n <Path\n className=\"prefix__cls-1\"\n transform=\"rotate(-45 47.5 47.535)\"\n d=\"M14.59 14.63h65.83v65.81H14.59z\"\n />\n </ClipPath>\n </Defs>\n <G id=\"prefix__Grupo_34\" data-name=\"Grupo 34\">\n <G id=\"prefix__Grupo_33\" data-name=\"Grupo 33\">\n <G clipPath=\"url(#prefix__clip-path)\">\n <G id=\"prefix__Grupo_32\" data-name=\"Grupo 32\">\n <G id=\"prefix__Grupo_27\" data-name=\"Grupo 27\">\n <G id=\"prefix__Grupo_22\" data-name=\"Grupo 22\">\n <G id=\"prefix__Grupo_19\" data-name=\"Grupo 19\">\n <Path\n id=\"prefix__Caminho_16\"\n data-name=\"Caminho 16\"\n className=\"prefix__cls-3\"\n d=\"M47.5 106.83l-65.4-65.4L47.5-24l65.4 65.4zm-59.89-65.4l59.9 59.9 59.9-59.9-59.9-59.9z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n <G id=\"prefix__Grupo_20\" data-name=\"Grupo 20\">\n <Path\n id=\"prefix__Caminho_17\"\n data-name=\"Caminho 17\"\n className=\"prefix__cls-3\"\n d=\"M47.5 94.3L-5.37 41.43 47.5-11.44l52.87 52.87zM.14 41.43L47.5 88.8l47.37-47.37L47.5-5.94z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n <G id=\"prefix__Grupo_21\" data-name=\"Grupo 21\">\n <Path\n id=\"prefix__Caminho_18\"\n data-name=\"Caminho 18\"\n className=\"prefix__cls-3\"\n d=\"M47.51 82.07L6.87 41.43 47.51.79l40.63 40.64zM12.37 41.43l35.14 35.14 35.14-35.14L47.51 6.29z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n </G>\n <G id=\"prefix__Grupo_26\" data-name=\"Grupo 26\">\n <G id=\"prefix__Grupo_23\" data-name=\"Grupo 23\">\n <Path\n id=\"prefix__Caminho_19\"\n data-name=\"Caminho 19\"\n className=\"prefix__cls-3\"\n d=\"M47.4 172.55l-65.4-65.4 65.4-65.4 65.4 65.4zm-59.9-65.4l59.9 59.9 59.9-59.9-59.9-59.9z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n <G id=\"prefix__Grupo_24\" data-name=\"Grupo 24\">\n <Path\n id=\"prefix__Caminho_20\"\n data-name=\"Caminho 20\"\n className=\"prefix__cls-3\"\n d=\"M47.4 160l-52.87-52.84L47.4 54.29l52.87 52.87zM0 107.16l47.4 47.36 47.37-47.36L47.4 59.79z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n <G id=\"prefix__Grupo_25\" data-name=\"Grupo 25\">\n <Path\n id=\"prefix__Caminho_21\"\n data-name=\"Caminho 21\"\n className=\"prefix__cls-3\"\n d=\"M47.4 147.79L6.76 107.15 47.4 66.52 88 107.15zm-35.14-40.64l35.14 35.14 35.14-35.14L47.4 72z\"\n transform=\"translate(18.71 24.68)\"\n />\n </G>\n </G>\n </G>\n <G id=\"prefix__Grupo_28\" data-name=\"Grupo 28\">\n <Path\n id=\"prefix__Ret\\xE2ngulo_13\"\n data-name=\"Ret\\xE2ngulo 13\"\n className=\"prefix__cls-3\"\n transform=\"rotate(-45 74.87 69.578)\"\n d=\"M33.94 61.41h3.56v36.81h-3.56z\"\n />\n </G>\n <G id=\"prefix__Grupo_29\" data-name=\"Grupo 29\">\n <Path\n id=\"prefix__Ret\\xE2ngulo_14\"\n data-name=\"Ret\\xE2ngulo 14\"\n className=\"prefix__cls-3\"\n transform=\"rotate(-45 125.44 32.061)\"\n d=\"M84.51 33.13h3.56v18.35h-3.56z\"\n />\n </G>\n <G id=\"prefix__Grupo_30\" data-name=\"Grupo 30\">\n <Path\n id=\"prefix__Ret\\xE2ngulo_15\"\n data-name=\"Ret\\xE2ngulo 15\"\n className=\"prefix__cls-3\"\n transform=\"rotate(-45 99.625 68.334)\"\n d=\"M41.24 76.8h38.47v3.56H41.24z\"\n />\n </G>\n <G id=\"prefix__Grupo_31\" data-name=\"Grupo 31\">\n <Path\n id=\"prefix__Ret\\xE2ngulo_16\"\n data-name=\"Ret\\xE2ngulo 16\"\n className=\"prefix__cls-3\"\n transform=\"rotate(-45 48.487 31.426)\"\n d=\"M.17 39.89h18.35v3.56H.17z\"\n />\n </G>\n </G>\n </G>\n <Path\n className=\"prefix__cls-1\"\n transform=\"rotate(-45 86.641 37.302)\"\n d=\"M14.59 14.63h65.83v65.81H14.59z\"\n />\n </G>\n </G>\n <Path\n id=\"prefix__Ret\\xE2ngulo_18\"\n data-name=\"Ret\\xE2ngulo 18\"\n transform=\"rotate(-45 86.551 15.6)\"\n fill=\"#04b2d9\"\n d=\"M42.22 20.65H52.6v10.38H42.22z\"\n />\n </Svg>\n )\n}", "function convertSVGtoPNG() {\n var canvas = document.getElementById('the-canvas');\n var context = canvas.getContext('2d');\n canvas.width = triOptions.width();\n canvas.height = triOptions.height();\n\n var image = new Image();\n\n $(image).on(\"load\", function() {\n context.drawImage(image, 0, 0);\n $(\"#download-btn\").attr(\"href\", canvas.toDataURL(\"image/png\"));\n });\n\n image.src = currentPattern.dataUri;\n var imagePath = canvas.toDataURL(\"image/png\");\n \n \n\n }", "function Xf(){this.ha=E(\"g\",{},null);this.Zh=E(\"path\",{\"class\":\"blocklyPathDark\",transform:\"translate(1, 1)\"},this.ha);this.gd=E(\"path\",{\"class\":\"blocklyPath\"},this.ha);this.$h=E(\"path\",{\"class\":\"blocklyPathLight\"},this.ha);this.gd.gc=this;Gf(this.gd);bg(this)}", "function SvgComponent(props) {\n return (\n <Svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 511 513.01\" {...props} fill=\"#000\">\n <G data-name=\"Capa 2\">\n <G data-name=\"Capa 1\">\n <Path\n d=\"M322.7 347.51a157.67 157.67 0 01-77.42 135.65q-2.49 1.47-5 2.85A157.53 157.53 0 017.7 347.51a152.17 152.17 0 0149.43-112.39 160.67 160.67 0 0039.6-55.38A160.85 160.85 0 00108.28 138a56.23 56.23 0 0155.59-49h2.66a56.22 56.22 0 0155.59 49 160.85 160.85 0 0011.55 41.79 157.34 157.34 0 007.17 14.57q2.41 4.35 5 8.39a163.5 163.5 0 0027.41 32.42 152.17 152.17 0 0149.45 112.34z\"\n fill={props.fill}\n />\n <Path\n d=\"M503.7 348a157.5 157.5 0 01-315 0 152.17 152.17 0 0149.43-112.39 159.64 159.64 0 0051.15-97.17c.16-1.17.35-2.32.58-3.46a56.19 56.19 0 0152.79-45.43H347.53a56.22 56.22 0 0155.59 48.94 159.64 159.64 0 0051.15 97.17A152.17 152.17 0 01503.7 348z\"\n fill=\"#fff4ca\"\n />\n <Path\n d=\"M359.94 127c-30.13 9.86-64.5 5.7-93.24-14.41a114.44 114.44 0 01-45.85-68.7q-1.2-5.24-1.9-10.55c3.07-1 6.19-1.87 9.34-2.57 27.74-6.28 58.09-1.08 83.9 17A114.91 114.91 0 01359.94 127z\"\n fill=\"#37b678\"\n />\n <Path\n d=\"M294.15 313.57c8-8 36.07-7.07 36.07-7.07s.93 28.05-7.07 36.06a20.5 20.5 0 01-29-29zm104.1 0c-8-8-36.07-7.07-36.07-7.07s-.93 28.05 7.07 36.06a20.5 20.5 0 0029-29z\"\n fill=\"#58565d\"\n />\n <Path d=\"M361.73 299a7.5 7.5 0 00-7.24 7.25c-.25 7.34-.3 32.05 9.26 41.62a28 28 0 0039.64-39.57c-9.6-9.6-34.31-9.53-41.66-9.3zm31 38.26a13 13 0 01-18.38 0c-2.74-2.74-4.48-13.06-4.86-23.24 10.18.38 20.51 2.12 23.24 4.85a13 13 0 01.01 18.39zm66.39-107.17a152.14 152.14 0 01-48.78-92.64 64.33 64.33 0 00-20.78-39.28 63.33 63.33 0 00-36.82-15.9 121 121 0 00-36.46-40.65c-28.74-20.11-63.67-26-96.4-16.46a53.14 53.14 0 00-51-1.44q-3.24-9.66-7.5-19.25a7.5 7.5 0 00-13.72 6.06A187.18 187.18 0 01163 66.32c.57 5.22.86 10.31.91 15.2h-.28c-31.64 0-58.74 23.83-63 55.42a153.69 153.69 0 01-11 39.85 153.18 153.18 0 01-37.77 52.8A159.69 159.69 0 000 347.52c0 91 74 165 165 165a164.06 164.06 0 0090.18-26.82A165 165 0 00511 348a160.05 160.05 0 00-51.87-117.93zM297 79.68L236.56 36.8c24.57-3.75 49.8 2.18 71.13 17.11a107.43 107.43 0 0143.59 67.76A96 96 0 01295 119h-.1l-.3-.1a102.25 102.25 0 01-23.77-12.39 107 107 0 01-40.56-55.75l58.07 41.21A7.5 7.5 0 00297 79.69zM195.94 33a38.26 38.26 0 0115.89 4.84 122.59 122.59 0 0050.37 80.92 117.87 117.87 0 0020.8 11.62 65.6 65.6 0 00-1.36 7.06 153.69 153.69 0 01-11 39.85 150.21 150.21 0 01-15 26.86 150.67 150.67 0 01-15.31-27.36 153.62 153.62 0 01-11-39.84A64.18 64.18 0 00179 82.82a168.51 168.51 0 00-1-18.11 190 190 0 00-4.77-26.26A39.46 39.46 0 01195.94 33zM165 497.52c-82.71 0-150-67.29-150-150a144.66 144.66 0 0147-106.86 168 168 0 0041.43-58A168.69 168.69 0 00115.51 139c3.26-24 23.71-42.19 47.67-42.43 0 .33-.07.67-.11 1a117.09 117.09 0 01-3.88 18 37.12 37.12 0 01-7.46-2 7.5 7.5 0 10-5.46 14A51.21 51.21 0 00165 131h1.78a51.21 51.21 0 0017-3.51 7.5 7.5 0 00-5.46-14c-1.08.42-2.17.78-3.27 1.1a131.61 131.61 0 002.93-15.13c.07-.49.12-1 .18-1.5a49.17 49.17 0 0136.38 41 168.69 168.69 0 0012.09 43.74 165.8 165.8 0 0019.51 33.77 161.76 161.76 0 01-13.22 13.61A159.69 159.69 0 00181 348a164.76 164.76 0 0061.17 128.12 149.16 149.16 0 01-77.17 21.4zm287.07-43.44A149.09 149.09 0 01346 498c-82.71 0-150-67.29-150-150a144.66 144.66 0 0147-106.86 167.16 167.16 0 0053.52-101.7c.18-1.34.44-2.67.73-4a110.55 110.55 0 0064.83-1.32 7.49 7.49 0 005.1-8.11 123.75 123.75 0 00-6.81-27.25 48.61 48.61 0 0135.13 40.69A167.1 167.1 0 00449 241.16 145 145 0 01496 348a149 149 0 01-43.93 106.08zM330.27 299c-7.35-.24-32.06-.3-41.62 9.27a28 28 0 0039.6 39.59c9.56-9.56 9.51-34.27 9.26-41.61a7.5 7.5 0 00-7.24-7.25zm-12.63 38.26a13 13 0 01-18.38-18.39c2.73-2.73 13.06-4.47 23.24-4.85-.38 10.18-2.12 20.5-4.86 23.24z\" />\n </G>\n </G>\n </Svg>\n )\n}", "function SvgComponent(props) {\n\tconst width = props.style && props.style.width ? props.style.width : 16;\n\tconst height = props.style && props.style.height ? props.style.height : 16;\n\n\treturn (\n\t\t<Svg\n\t\t\twidth={width}\n\t\t\theight={height}\n\t\t\tviewBox=\"0 0 16 16\"\n\t\t\tpreserveAspectRatio=\"xMinYMin slice\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<Path\n\t\t\t\tfill=\"#EDA3A3\"\n\t\t\t\td=\"M4.067 16.051c-.2 0-.39-.078-.53-.22l-3.55-3.55a.749.749 0 010-1.06l3.237-3.237-3.171-3.17a.749.749 0 010-1.06L3.468.335a.75.75 0 011.06 0L7.7 3.507 10.947.262a.75.75 0 011.06 0l3.55 3.55a.751.751 0 010 1.06L12.312 8.12l3.178 3.18a.75.75 0 010 1.06l-3.414 3.414a.75.75 0 01-1.06 0l-3.18-3.178-3.238 3.238a.758.758 0 01-.53.218zm-2.49-4.301l2.49 2.49 3.238-3.238a.75.75 0 011.06 0l3.18 3.178 2.353-2.352-3.178-3.18a.75.75 0 010-1.061l3.247-3.247-2.49-2.49L8.23 5.097a.772.772 0 01-1.06 0L4 1.927 1.644 4.281l3.17 3.171a.75.75 0 010 1.061L1.577 11.75z\"\n\t\t\t/>\n\t\t</Svg>\n\t);\n}", "function supportsInlineSVG() {\n\t\tvar div = document.createElement( 'div' );\n\t\tdiv.innerHTML = '<svg/>';\n\t\treturn 'http://www.w3.org/2000/svg' === ( 'undefined' !== typeof SVGRect && div.firstChild && div.firstChild.namespaceURI );\n\t}", "function SvgParser(){\n\t// the SVG document\n\tthis.svg;\n\t\n\t// the top level SVG element of the SVG document\n\tthis.svgRoot;\n\t\n\tthis.allowedElements = ['svg','circle','ellipse','path','polygon','polyline','rect', 'line'];\n\t\t\t\n\tthis.conf = {\n\t\ttolerance: 2, // max bound for bezier->line segment conversion, in native SVG units\n\t\ttoleranceSvg: 0.005 // fudge factor for browser inaccuracy in SVG unit handling\n\t}; \n}", "createSmallSVG(initDiv) {\n return initDiv.append('svg')\n .attr('width', 20)\n .attr('height', 40)\n .style(\"margin\", \"5px\")\n .style(\"display\",\"table-row\")\n .style(\"background-color\", \"Blue\");\n }", "function createSvg () {\r\n // Remove the existing one\r\n d3\r\n .select(canvasId)\r\n .selectAll('svg')\r\n .remove();\r\n // Create a new svg node\r\n svg = d3\r\n .select(canvasId)\r\n .append('svg:svg')\r\n .attr('width', 500)\r\n .attr('height', 500)\r\n .append('g') // Group all element to make alignment easier\r\n .attr('transform', function () { // Place in center of the page\r\n return 'translate(' + (500 / 2) + ', ' + (500 / 2) + ')';\r\n });\r\n }", "_initSvgEls() {\n const _this = this;\n\n this.svgEls = {\n bgArc: document.createElementNS(this.SVG_NS, \"path\"),\n activeArc: document.createElementNS(this.SVG_NS, \"path\"),\n needle: document.createElementNS(this.SVG_NS, \"line\")\n };\n\n // draw the background arc\n this.svgEls.bgArc.setAttribute(\"d\",\n _this._calcSvgArcPath(\n _this._calcNeedleCenter().x,\n _this._calcNeedleCenter().y,\n _this._calcDialRadius(),\n 0.67 * Math.PI,\n 2.35 * Math.PI\n ));\n this.svgEls.bgArc.setAttribute(\"stroke-width\", _this._calcArcStrokeWidth());\n this.svgEls.bgArc.setAttribute(\"stroke\", _this.o.needleColor);\n this.svgEls.bgArc.setAttribute(\"fill\", \"transparent\");\n this.svgEls.bgArc.setAttribute(\"stroke-linecap\", \"round\");\n\n // draw the active arc\n this.svgEls.activeArc.setAttribute(\"stroke-width\", _this._calcArcStrokeWidth());\n this.svgEls.activeArc.setAttribute(\"stroke\", _this.o.activeColor);\n this.svgEls.activeArc.setAttribute(\"fill\", \"transparent\");\n this.svgEls.activeArc.setAttribute(\"stroke-linecap\", \"round\");\n\n // draw the needle\n this.svgEls.needle.setAttribute(\"x1\", _this._calcNeedleCenter().x);\n this.svgEls.needle.setAttribute(\"y1\", _this._calcNeedleCenter().y);\n this.svgEls.needle.setAttribute(\"x2\", _this._calcNeedleEnd().x);\n this.svgEls.needle.setAttribute(\"y2\", _this._calcNeedleEnd().y);\n this.svgEls.needle.setAttribute(\"stroke-width\", _this._calcNeedleWidth());\n this.svgEls.needle.setAttribute(\"stroke\", _this.o.needleColor);\n this.svgEls.needle.setAttribute(\"z-index\", \"1000\");\n this.svgEls.needle.setAttribute(\"stroke-linecap\", \"round\");\n\n this._appendSvgEls();\n this._update();\n }", "function svgToCanvas(downloadlinkid){\n\t\t//get svg element.\n\t\tvar svg = document.getElementById(\"svg\");\n\n\t\t//get svg source.\n\t\tvar serializer = new XMLSerializer();\n\t\tvar source = serializer.serializeToString(svg);\n\n\t\t//add name spaces.\n\t\tif(!source.match(/^<svg[^>]+xmlns=\"http\\:\\/\\/www\\.w3\\.org\\/2000\\/svg\"/)){\n\t\t\tsource = source.replace(/^<svg/, '<svg xmlns=\"http://www.w3.org/2000/svg\"');\n\t\t}\n\t\tif(!source.match(/^<svg[^>]+\"http\\:\\/\\/www\\.w3\\.org\\/1999\\/xlink\"/)){\n\t\t\tsource = source.replace(/^<svg/, '<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\"');\n\t\t}\n\n\t\t//add xml declaration\n\t\tsource = '<?xml version=\"1.0\" standalone=\"no\"?>\\n' + source;\n\n\t\t//convert svg source to URI data scheme.\n\t\tvar url = \"data:image/svg+xml;charset=utf-8,\"+encodeURIComponent(source);\n\n\t\t//set url value to a element's href attribute.\n\t\tdocument.getElementById(downloadlinkid).href = url;\n\t\tdocument.getElementById(downloadlinkid).innerHTML=\"Figure ready,Right click me to save!\"\n\t\t//you can download svg file by right click menu\t\n\t}", "function SvgPathHelper() {\n this.commands = [];\n }", "function albano_tm_imgtosvg(){\n\t\n\t\"use strict\";\n\t\n\tjQuery('img.svg').each(function(){\n\t\t\n\t\tvar jQueryimg \t\t= jQuery(this);\n\t\tvar imgClass\t\t= jQueryimg.attr('class');\n\t\tvar imgURL\t\t\t= jQueryimg.attr('src');\n\n\t\tjQuery.get(imgURL, function(data) {\n\t\t\t// Get the SVG tag, ignore the rest\n\t\t\tvar jQuerysvg = jQuery(data).find('svg');\n\n\t\t\t// Add replaced image's classes to the new SVG\n\t\t\tif(typeof imgClass !== 'undefined') {\n\t\t\t\tjQuerysvg = jQuerysvg.attr('class', imgClass+' replaced-svg');\n\t\t\t}\n\n\t\t\t// Remove any invalid XML tags as per http://validator.w3.org\n\t\t\tjQuerysvg = jQuerysvg.removeAttr('xmlns:a');\n\n\t\t\t// Replace image with new SVG\n\t\t\tjQueryimg.replaceWith(jQuerysvg);\n\n\t\t}, 'xml');\n\n\t});\n}", "render () {\n return (\n <Container>\n <svg width='900px' height='900px' viewBox='0 0 900 900' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlnsXlink='http://www.w3.org/1999/xlink'>\n <g id='Artboard' stroke='none' strokeWidth='1' fill='none' fillRule='evenodd' opacity='0.5'>\n <g name='brandParticles' id='brandParticles' transform='translate(9,79)' fill='#434343'>\n <path d='M510,171 C507.790861,171 506,169.209139 506,167 C506,164.790861 507.790861,163 510,163 C512.209139,163 514,164.790861 514,167 C514,169.209139 512.209139,171 510,171 Z M446.92,176.38 C448.27,175.43 449.65,177.71 448.45,178.64 C447.11,179.61 445.61,177.3 446.92,176.38 Z M496,213.557921 C497.15,212.627921 497.81,212.857921 497.99,214.267921 C496.82,215.207921 496.16,214.967921 496,213.557921 Z M363,198.46 C363.51,197.27 364.05,196.1 364.73,195 C365.06,196.19 365.38,197.38 365.68,198.59 C365.01,198.56 363.67,198.49 363,198.46 Z M391.83,197.35 C393.42,196.85 393.95,197.43 393.42,199.08 C391.82,199.59 391.29,199.01 391.83,197.35 Z M405.47,198.15 C406.47,196.55 408.92,198.39 407.74,199.82 C406.73,201.36 404.35,199.56 405.47,198.15 Z M500.06,203.46 C501.44,202.38 503.37,204.69 501.77,205.69 C500.35,206.84 498.42,204.48 500.06,203.46 Z M347.34,207.8 C348.3,208.43 350.64,208.72 349.62,210.35 C349.03,210.58 347.84,211.02 347.25,211.24 C347.28,210.38 347.32,208.66 347.34,207.8 Z M500.57,222.69 C501.05,222.66 502.03,222.62 502.51,222.59 C502.49,223.54 502.48,224.49 502.47,225.44 C501.99,225.43 501.02,225.39 500.53,225.37 C500.54,224.47 500.55,223.58 500.57,222.69 Z M575.09,260.47 C576.5,260.64 576.74,261.31 575.83,262.46 C574.41,262.29 574.16,261.62 575.09,260.47 Z M351.54,270.51 C351.95,270.6 352.78,270.78 353.19,270.87 C353.3,271.29 353.51,272.15 353.62,272.57 C353.02,272.63 351.83,272.74 351.23,272.79 C351.31,272.22 351.46,271.08 351.54,270.51 Z M522.41,284.16 C523.4,282.51 525.73,284.46 524.66,285.86 C523.64,287.45 521.28,285.57 522.41,284.16 Z M351.3,313.34 C351.83,313.36 352.89,313.4 353.43,313.41 C353.41,313.9 353.37,314.88 353.35,315.37 C352.86,315.39 351.89,315.42 351.4,315.43 C351.37,314.91 351.32,313.86 351.3,313.34 Z M280,325.52 C281.38,324.55 282.71,326.89 281.37,327.74 C279.98,328.81 278.6,326.35 280,325.52 Z M339.14,356.37 C340.57,355.21 342.33,357.66 340.82,358.67 C339.37,359.83 337.62,357.37 339.14,356.37 Z M530.22,367.46 C531.63,366.32 533.43,368.73 531.91,369.76 C530.49,370.89 528.67,368.47 530.22,367.46 Z M354.3,370.69 C353.51,368.81 355.59,368.33 356.91,367.87 C356.83,369.66 356.54,371.51 354.3,370.69 Z M533.43,402.27 C534.45,400.68 536.73,402.66 535.66,404.03 C534.59,405.56 532.23,403.66 533.43,402.27 Z M394.53,408.26 C396.16,407.86 396.66,408.46 396.03,410.08 C394.41,410.47 393.91,409.86 394.53,408.26 Z M513.03,411.42 C513.23,410.43 513.52,409.46 513.88,408.53 C515.72,408.55 515.62,410.21 515.83,411.55 C515.13,411.52 513.73,411.45 513.03,411.42 Z M436.37,155.93 C437.99,155.35 438.55,155.88 438.07,157.53 C436.46,158.08 435.89,157.55 436.37,155.93 Z M430.23,161.04 C431.28,159.55 433.57,161.46 432.56,162.85 C431.5,164.34 429.15,162.44 430.23,161.04 Z M355.42,162.35 C356.68,161.16 358.66,163.29 357.47,164.5 C356.2,165.82 354.2,163.57 355.42,162.35 Z M450.2,180.22 C451.74,179.54 452.8,182.08 451.07,182.51 C449.51,183.21 448.43,180.59 450.2,180.22 Z M349.2,203.39 C350.56,202.33 352.57,204.6 351.03,205.67 C349.65,206.7 347.67,204.46 349.2,203.39 Z M602.84,203.96 C604.45,203.44 605,204 604.5,205.63 C602.87,206.13 602.32,205.57 602.84,203.96 Z M535.4,212.92 C537.02,212.38 537.58,212.92 537.07,214.55 C535.45,215.08 534.89,214.54 535.4,212.92 Z M518.267068,241.550572 C519.247068,240.170572 521.957068,241.640572 520.747068,243.150572 C519.757068,244.510572 517.167068,243.020572 518.267068,241.550572 Z M330.49,233.57 C331.85,232.15 333.9,234.56 332.66,235.88 C331.29,237.43 329.25,234.88 330.49,233.57 Z M554.11,249.2 C555.96,248.67 556.61,251.74 554.91,252.3 C553.06,252.87 552.28,249.67 554.11,249.2 Z M341.5,275.37 C343.13,274.88 343.67,275.45 343.14,277.06 C341.51,277.55 340.97,276.98 341.5,275.37 Z M349.33,281.59 C350.95,280.99 351.55,281.5 351.13,283.11 C349.49,283.72 348.89,283.21 349.33,281.59 Z M323.33,300.13 C324.61,300.83 324.56,301.49 323.18,302.1 C321.91,301.38 321.96,300.73 323.33,300.13 Z M517.13,303.6 C518.77,303.03 519.37,303.55 518.92,305.14 C517.25,305.7 516.65,305.19 517.13,303.6 Z M330.53,304.94 C332.17,304.47 332.69,305.04 332.11,306.65 C330.47,307.11 329.94,306.54 330.53,304.94 Z M528.06,312.55 C529.29,311.56 530.46,313.69 529.3,314.48 C528.07,315.5 526.83,313.31 528.06,312.55 Z M538.92,324.87 C540.54,324.4 541.08,324.97 540.53,326.58 C538.89,327.04 538.35,326.47 538.92,324.87 Z M348.39,367.45 C349.99,366.9 350.56,367.44 350.09,369.07 C348.48,369.62 347.91,369.08 348.39,367.45 Z M524.41,377.15 C525.42,375.62 527.88,377.37 526.71,378.81 C525.69,380.34 523.26,378.56 524.41,377.15 Z M467.02,408.88 C468.67,408.36 469.22,408.9 468.67,410.51 C467.01,411.02 466.46,410.47 467.02,408.88 Z M351.38,416.33 C351.89,416.36 352.92,416.43 353.43,416.46 C353.41,416.99 353.36,418.05 353.33,418.59 C352.8,418.67 351.73,418.85 351.2,418.94 C351.24,418.29 351.34,416.98 351.38,416.33 Z M399.29,436.13 C401.01,436.08 400.63,438.85 399.08,438.77 C397.33,438.79 397.72,436.07 399.29,436.13 Z M455.26,202.55 C456.66,201.42 458.45,203.8 457,204.86 C455.59,206.02 453.75,203.57 455.26,202.55 Z M503.14,119.34 C504.76,118.83 505.32,119.38 504.81,121 C503.16,121.52 502.61,120.96 503.14,119.34 Z M298,380 C292.477153,380 288,375.522847 288,370 C288,364.477153 292.477153,360 298,360 C303.522847,360 308,364.477153 308,370 C308,375.522847 303.522847,380 298,380 Z M358.13,152.1 C359.75,151.56 360.31,152.11 359.81,153.74 C358.18,154.28 357.62,153.73 358.13,152.1 Z M349.16,185.31 C350.78,184.8 351.34,185.35 350.81,186.97 C349.17,187.49 348.62,186.93 349.16,185.31 Z M391.31,187.22 C392.94,186.69 393.47,187.24 392.89,188.87 C391.24,189.4 390.71,188.85 391.31,187.22 Z M410.21,197.28 C411.81,196.7 412.36,197.25 411.84,198.9 C410.23,199.47 409.68,198.93 410.21,197.28 Z M325.26,204.26 C326.87,203.66 327.44,204.18 326.95,205.83 C325.33,206.43 324.77,205.91 325.26,204.26 Z M511.28,218.24 C512.91,217.76 513.45,218.33 512.89,219.94 C511.24,220.41 510.7,219.84 511.28,218.24 Z M519.18,233.61 C518.43,231.21 520.22,231.01 522.18,231.22 C521.4,232.33 520.94,234.27 519.18,233.61 Z M341.81,224.76 C342.1,224.49 342.68,223.95 342.97,223.67 C345.56,224.1 341.87,227.41 341.81,224.76 Z M539.96,247.23 C541.6,246.71 542.16,247.26 541.65,248.86 C539.99,249.38 539.42,248.83 539.96,247.23 Z M353.21,260.26 C354.83,259.72 355.39,260.27 354.89,261.9 C353.26,262.43 352.7,261.89 353.21,260.26 Z M333.26,261.28 C334.86,260.74 335.41,261.3 334.9,262.96 C333.29,263.48 332.74,262.92 333.26,261.28 Z M544.29,267.16 C545.92,266.66 546.46,267.22 545.92,268.85 C544.28,269.34 543.74,268.77 544.29,267.16 Z M521.3,268.19 C522.92,267.66 523.48,268.22 522.96,269.85 C521.32,270.37 520.77,269.82 521.3,268.19 Z M571.37,274.11 C572.75,273.64 573.26,274.11 572.89,275.52 C571.5,275.98 570.99,275.51 571.37,274.11 Z M616,280.15 C617.62,279.64 618.17,280.2 617.65,281.82 C616.01,282.34 615.46,281.78 616,280.15 Z M338.25,289.29 C339.66,288.25 341.72,290.57 340.78,291.94 C339.34,293.04 337.23,290.67 338.25,289.29 Z M527.17,295.04 C528.76,294.48 529.32,295.03 528.85,296.69 C527.25,297.25 526.69,296.7 527.17,295.04 Z M340.2,312.34 C341.82,311.84 342.37,312.4 341.83,314.02 C340.19,314.52 339.64,313.96 340.2,312.34 Z M521.3,316.26 C522.92,315.74 523.47,316.3 522.95,317.93 C521.31,318.44 520.76,317.88 521.3,316.26 Z M352.03,318.11 C353.66,317.61 354.21,318.17 353.67,319.79 C352.03,320.29 351.48,319.73 352.03,318.11 Z M542.27,327.23 C543.87,326.69 544.42,327.25 543.91,328.91 C542.29,329.43 541.75,328.87 542.27,327.23 Z M324.32,336.94 C325.93,336.46 326.46,337.04 325.91,338.69 C324.29,339.16 323.76,338.58 324.32,336.94 Z M321.99,350.15 C323.6,349.62 324.16,350.18 323.67,351.81 C322.04,352.33 321.48,351.78 321.99,350.15 Z M532.23,356.2 C533.22,355.03 535.46,356.59 534.47,357.88 C533.46,359.03 531.18,357.51 532.23,356.2 Z M602.15,362.03 C603.79,361.54 604.33,362.1 603.78,363.71 C602.13,364.2 601.59,363.64 602.15,362.03 Z M323.09,375.08 C324.73,374.58 325.27,375.13 324.73,376.76 C323.09,377.26 322.54,376.7 323.09,375.08 Z M514.9,374.63 C516.29,375.15 518.31,375.66 517.92,377.6 C517.16,377.79 515.62,378.15 514.86,378.34 C514.87,377.41 514.89,375.55 514.9,374.63 Z M607.17,380.98 C608.79,380.46 609.34,381.02 608.83,382.66 C607.2,383.16 606.65,382.6 607.17,380.98 Z M349.16,381.99 C350.8,381.49 351.34,382.05 350.79,383.67 C349.15,384.16 348.6,383.59 349.16,381.99 Z M349.23,399.32 C350.88,398.77 351.43,399.3 350.88,400.92 C349.21,401.46 348.66,400.93 349.23,399.32 Z M448.13,420.27 C449.75,419.76 450.31,420.31 449.8,421.94 C448.16,422.45 447.6,421.89 448.13,420.27 Z M498.07,420.14 C499.68,419.55 500.24,420.08 499.74,421.73 C498.11,422.31 497.55,421.78 498.07,420.14 Z M360.97,427.19 C362.58,426.65 363.14,427.2 362.65,428.83 C361.02,429.37 360.46,428.82 360.97,427.19 Z M457.24,407.26 C458.57,406.25 460.01,408.58 458.84,409.55 C457.51,410.53 456.06,408.21 457.24,407.26 Z M462.34,406 C464.26,405.27 465.05,408.62 463.09,408.94 C461.23,409.4 460.43,406.44 462.34,406 Z M482.27,414.24 C483.59,413.19 485.11,415.5 483.85,416.45 C482.53,417.43 481.01,415.18 482.27,414.24 Z M517.03,427.18 C518.66,426.68 519.2,427.24 518.66,428.86 C517.02,429.35 516.47,428.79 517.03,427.18 Z M416.35,405.17 C417.99,404.69 418.53,405.26 417.96,406.88 C416.31,407.33 415.77,406.76 416.35,405.17 Z M400.39,406.31 C401.73,404.82 404.08,407.09 402.55,408.45 C401.26,409.93 399.02,407.6 400.39,406.31 Z M254.19,407.28 C255.82,406.75 256.37,407.3 255.86,408.93 C254.22,409.45 253.67,408.9 254.19,407.28 Z M437.11,429.23 C438.72,428.68 439.29,429.23 438.8,430.87 C437.17,431.4 436.61,430.86 437.11,429.23 Z M464,191.2 C465.59,190.67 466.14,191.23 465.65,192.88 C464.04,193.42 463.49,192.86 464,191.2 Z M416.16,170.17 C417.44,170.85 417.41,171.52 416.07,172.18 C414.77,171.5 414.8,170.84 416.16,170.17 Z M421.55,180.68 C421.94,180.7 422.71,180.73 423.09,180.75 C423.41,181.04 424.03,181.61 424.34,181.9 L424.71,182.27 C424.27,182.74 423.82,183.2 423.36,183.66 C422.85,183.31 421.83,182.61 421.31,182.27 C421.37,181.87 421.49,181.08 421.55,180.68 Z M472.28,205.02 C473.15,203.61 475.53,205.09 474.36,206.43 C473.46,207.81 471.13,206.37 472.28,205.02 Z M328.32,244.21 C329.54,243.6 331.55,244.5 331.51,245.99 C330.76,248.11 327.17,245.86 328.32,244.21 Z M537.67,341.6 C538.18,341.56 539.2,341.47 539.71,341.43 C539.73,341.96 539.77,343.03 539.79,343.56 C539.23,343.54 538.12,343.51 537.56,343.5 C537.59,343.03 537.65,342.07 537.67,341.6 Z M372.43,416.1 C373.7,416.52 375.46,416.62 375.56,418.32 C374.9,418.55 373.59,419.01 372.93,419.24 C372.72,418.19 372.56,417.15 372.43,416.1 Z M348.39,299.15 C349.49,298.14 351.57,298.85 352.09,300.19 C351.9,302.31 347.78,300.94 348.39,299.15 Z M441.96,403.21 C443.75,402.82 444.41,405.7 442.65,406.16 C440.67,406.83 439.8,403.41 441.96,403.21 Z M424.84,406.42 C425.74,405.33 428.65,406.23 427.59,407.81 C426.67,409.14 423.66,408.07 424.84,406.42 Z M557.24,455.39 C558.67,454.18 560.55,456.59 558.84,457.55 C557.4,458.72 555.51,456.34 557.24,455.39 Z' id='a' />\n <path d='M420.5,175.5 C421.08,175.42 422.24,175.27 422.83,175.19 C422.78,175.78 422.68,176.94 422.62,177.52 C422.19,177.43 421.33,177.26 420.9,177.17 C420.8,176.75 420.6,175.91 420.5,175.5 Z M328.47,180.94 C330.06,180.41 330.6,180.98 330.09,182.65 C328.5,183.16 327.96,182.59 328.47,180.94 Z M404.21,192.04 C405.13,192.38 406.04,192.76 406.95,193.16 C406.61,194.35 405.89,195.27 404.78,195.93 C404.56,194.63 404.37,193.34 404.21,192.04 Z M509,192.557921 C510.15,191.627921 510.81,191.857921 510.99,193.267921 C509.82,194.207921 509.16,193.967921 509,192.557921 Z M358.287287,191.46 C358.797287,190.27 359.337287,189.1 360.017287,188 C360.347287,189.19 360.667287,190.38 360.967287,191.59 C360.297287,191.56 358.957287,191.49 358.287287,191.46 Z M343.02,204.67 C343.97,204.73 344.93,204.78 345.89,204.84 C345.79,205.65 345.57,207.27 345.46,208.08 C344.04,207.39 343.02,206.33 343.02,204.67 Z M324.54,242.59 C325.04,242.58 326.03,242.55 326.52,242.53 C326.53,243.06 326.56,244.11 326.57,244.64 C326.05,244.63 324.99,244.6 324.47,244.59 C324.49,244.09 324.52,243.09 324.54,242.59 Z M589.8,257.16 C591.36,256.62 591.89,257.19 591.41,258.87 C589.83,259.42 589.29,258.85 589.8,257.16 Z M526.14,266.49 C527.55,265.34 529.34,267.75 527.82,268.77 C526.39,269.96 524.59,267.5 526.14,266.49 Z M346.49,269.38 C347.01,269.39 348.06,269.41 348.59,269.41 C348.56,269.93 348.51,270.96 348.48,271.48 C347.99,271.46 347,271.42 346.51,271.4 C346.5,270.89 346.49,269.89 346.49,269.38 Z M528.16,283.54 C529.58,282.36 531.44,284.75 529.76,285.72 C528.31,286.97 526.48,284.5 528.16,283.54 Z M345.13,299.41 C346.55,298.32 348.38,300.73 346.75,301.69 C345.29,302.84 343.52,300.37 345.13,299.41 Z M563.2,309.81 C564.89,309.32 565.45,309.87 564.88,311.44 C563.2,311.9 562.63,311.36 563.2,309.81 Z M346.47,314.58 C346.99,314.58 348.01,314.58 348.53,314.58 C349.58,315.54 348.63,317.72 347.15,317.26 C345.99,316.6 345.76,315.71 346.47,314.58 Z M526.11,317.36 C527.5,316.21 529.39,318.58 527.83,319.61 C526.41,320.75 524.55,318.39 526.11,317.36 Z M264.48,329.21 C265.47,327.56 267.87,329.43 266.65,330.86 C265.66,332.52 263.28,330.62 264.48,329.21 Z M557.02,331.84 C558.67,331.27 559.26,331.79 558.79,333.39 C557.14,333.94 556.55,333.43 557.02,331.84 Z M542.48,343.55 C542.98,343.55 543.98,343.55 544.48,343.55 C544.49,344.07 544.51,345.1 544.52,345.61 C544,345.61 542.95,345.62 542.43,345.62 C542.45,345.1 542.47,344.07 542.48,343.55 Z M295.6,348.44 C296.11,348.42 297.15,348.37 297.67,348.35 C297.65,348.88 297.63,349.95 297.61,350.48 C297.12,350.46 296.12,350.42 295.62,350.4 C295.62,349.91 295.6,348.93 295.6,348.44 Z M335.01,359.3 C336.38,358.13 338.31,360.45 336.79,361.52 C335.41,362.7 333.49,360.36 335.01,359.3 Z M542.37,377.26 C543.41,375.7 545.71,377.63 544.58,379.02 C543.52,380.58 541.18,378.65 542.37,377.26 Z M519.56,378.7 C521.21,377.5 521.9,382.45 519.8,381.8 C518.05,382.32 517.77,378.78 519.56,378.7 Z M322.89,391.92 C323.26,391.8 324.01,391.56 324.38,391.44 C324.43,392 324.53,393.12 324.58,393.68 C324,393.66 322.83,393.62 322.25,393.6 C322.41,393.18 322.73,392.34 322.89,391.92 Z M441.29,409.08 C442.26,407.49 444.71,409.25 443.61,410.71 C442.63,412.29 440.19,410.52 441.29,409.08 Z M339.7,411.13 C340.75,411.14 342,411.17 341.66,412.6 C340.98,413.1 340.28,413.58 339.56,414.04 C339.6,413.31 339.67,411.86 339.7,411.13 Z M398.4,413.5 C398.86,412.51 398.54,410.83 400,410.63 C401.73,410.72 401.44,412.43 401.73,413.62 C400.61,413.58 399.5,413.54 398.4,413.5 Z M462,412.2 C462.58,411.85 463.75,411.15 464.33,410.8 C465.98,411.06 465.24,412.93 465.55,414.05 C464.34,413.46 463.16,412.84 462,412.2 Z M414.27,420.39 C415.7,419.23 417.51,421.66 415.93,422.66 C414.51,423.72 412.63,421.36 414.27,420.39 Z M370.58,420.97 C371.48,421.37 372.75,421.36 373.32,422.3 C373.79,423.85 371.42,423.48 370.55,424.06 C370.55,423.29 370.57,421.74 370.58,420.97 Z M438.42,104.39 C440.01,103.79 440.59,104.31 440.17,105.96 C438.58,106.57 438,106.05 438.42,104.39 Z M386.19,172.36 C387.62,171.25 389.42,173.67 387.85,174.66 C386.42,175.75 384.59,173.34 386.19,172.36 Z M406.89,182.3 C408.46,181.74 409.01,182.29 408.54,183.96 C406.96,184.53 406.41,183.98 406.89,182.3 Z M313.38,194.04 C314.4,192.47 316.81,194.32 315.64,195.74 C314.62,197.29 312.25,195.45 313.38,194.04 Z M503.17,205.34 C504.6,204.24 506.38,206.68 504.81,207.65 C503.35,208.76 501.59,206.31 503.17,205.34 Z M317.49,227.45 C315.41,224.9 320.61,224.06 320.19,226.97 C319.49,228.09 318.59,228.25 317.49,227.45 Z M532.267068,234.550572 C533.247068,233.170572 535.957068,234.640572 534.747068,236.150572 C533.757068,237.510572 531.167068,236.020572 532.267068,234.550572 Z M568.15,244.43 C569.59,243.34 571.31,245.79 569.74,246.75 C568.26,247.89 566.52,245.37 568.15,244.43 Z M334.23,279.56 C335.86,278.97 336.46,279.48 336.02,281.09 C334.38,281.68 333.78,281.17 334.23,279.56 Z M278.98,311.86 C280.59,311.33 281.15,311.88 280.65,313.51 C279.02,314.02 278.47,313.47 278.98,311.86 Z M542.96,315.43 C544.26,314.47 545.74,316.71 544.55,317.67 C543.23,318.66 541.69,316.39 542.96,315.43 Z M545.3,363.37 C546.74,362.23 548.55,364.68 546.95,365.66 C545.51,366.75 543.71,364.35 545.3,363.37 Z M260.42,380.43 C262.06,379.99 262.59,380.57 262.02,382.16 C260.38,382.61 259.85,382.03 260.42,380.43 Z M328.76,404.8 C329.19,404.73 330.05,404.58 330.48,404.5 C330.56,405.06 330.72,406.17 330.8,406.73 C330.2,406.69 329.01,406.63 328.41,406.59 C328.5,406.15 328.67,405.25 328.76,404.8 Z M424.33,421.94 C425.95,421.37 426.54,421.9 426.08,423.54 C424.46,424.08 423.88,423.55 424.33,421.94 Z M505.05,433.45 C505.64,433.5 506.81,433.59 507.39,433.64 C507.36,434.83 507.33,436.02 507.3,437.22 C506,436.33 505.42,434.91 505.05,433.45 Z M476.57,437.93 C477.55,436.54 479.7,438.29 478.63,439.57 C477.65,440.86 475.53,439.18 476.57,437.93 Z M531.31,448.49 C532.93,447.99 533.49,448.54 532.96,450.15 C531.32,450.65 530.77,450.09 531.31,448.49 Z M395.3,451.41 C395.82,451.42 396.88,451.45 397.41,451.47 C397.4,451.97 397.38,452.97 397.37,453.47 C396.87,453.48 395.86,453.51 395.36,453.52 C395.34,452.99 395.31,451.94 395.3,451.41 Z M463.93,437.5 C465.54,436.97 466.09,437.52 465.59,439.14 C463.95,439.66 463.4,439.12 463.93,437.5 Z M448.86,160.99 C450.44,160.49 450.97,161.07 450.44,162.73 C448.84,163.23 448.32,162.65 448.86,160.99 Z M457.18,197.19 C459.03,196.7 459.63,199.83 457.91,200.33 C456,200.87 455.41,197.66 457.18,197.19 Z M346.3,129.1 C347.94,128.63 348.47,129.21 347.9,130.83 C346.25,131.28 345.72,130.71 346.3,129.1 Z M318.16,145 C319.79,144.48 320.34,145.04 319.82,146.67 C318.19,147.18 317.64,146.62 318.16,145 Z M412.06,145.1 C413.69,144.59 414.24,145.15 413.73,146.77 C412.1,147.28 411.54,146.73 412.06,145.1 Z M430.59,145.68 C431.1,145.68 432.11,145.68 432.62,145.68 C434.16,147.75 429.9,149.08 430.22,146.37 L430.59,145.68 Z M519.05,155.36 C520.45,155.01 520.92,155.53 520.44,156.91 C519.02,157.26 518.56,156.74 519.05,155.36 Z M452.73,166.9 C453,166.62 453.56,166.05 453.84,165.76 C456.46,165.97 453.01,169.52 452.73,166.9 Z M385.94,183.19 C387.55,182.66 388.12,183.21 387.65,184.84 C386.01,185.37 385.44,184.82 385.94,183.19 Z M625.33,192.21 C626.96,191.7 627.51,192.25 626.99,193.88 C625.34,194.38 624.79,193.82 625.33,192.21 Z M556.07,197.15 C557.68,196.57 558.25,197.11 557.78,198.75 C556.16,199.33 555.59,198.79 556.07,197.15 Z M468.37,176.46 C470.02,175.97 470.58,176.51 470.05,178.1 C468.38,178.59 467.82,178.05 468.37,176.46 Z M523.1,208.11 C524.73,207.59 525.28,208.15 524.75,209.78 C523.12,210.3 522.57,209.74 523.1,208.11 Z M234.05,211.26 C235.66,210.74 236.23,211.3 235.78,212.94 C234.16,213.45 233.59,212.89 234.05,211.26 Z M523.64,227.76 C524.13,227.67 525.12,227.51 525.61,227.43 C525.6,228.47 525.59,229.52 525.59,230.56 C525.1,230.47 524.13,230.3 523.64,230.21 C523.63,229.39 523.63,228.57 523.64,227.76 Z M341.81,224.76 C339.14,224.56 342.71,221.06 342.97,223.67 C342.68,223.95 342.1,224.49 341.81,224.76 Z M582.17,255.15 C583.76,254.6 584.32,255.15 583.84,256.81 C582.23,257.36 581.68,256.81 582.17,255.15 Z M318.17,256.99 C319.79,256.44 320.36,256.99 319.86,258.62 C318.24,259.16 317.67,258.61 318.17,256.99 Z M622.3,267.19 C623.92,266.62 624.5,267.15 624.03,268.78 C622.39,269.34 621.82,268.81 622.3,267.19 Z M326.24,272.31 C327.85,271.74 328.41,272.28 327.91,273.93 C326.29,274.49 325.73,273.94 326.24,272.31 Z M323.96,290.2 C325.58,289.75 326.14,290.33 325.65,291.94 C324.02,292.4 323.45,291.82 323.96,290.2 Z M538.26,296.2 C539.88,295.66 540.43,296.2 539.89,297.84 C538.25,298.37 537.71,297.83 538.26,296.2 Z M219.99,307.11 C221.62,306.6 222.16,307.15 221.63,308.78 C219.99,309.29 219.45,308.73 219.99,307.11 Z M325.1,316.06 C326.72,315.52 327.28,316.06 326.78,317.7 C325.16,318.24 324.6,317.7 325.1,316.06 Z M337.28,323.11 C338.9,322.55 339.44,323.1 338.91,324.75 C337.29,325.29 336.75,324.75 337.28,323.11 Z M613.12,346.26 C614.74,345.75 615.26,346.32 614.7,347.96 C613.07,348.46 612.54,347.9 613.12,346.26 Z M626.25,371.99 C627.66,371.56 628.11,372.05 627.57,373.46 C626.15,373.88 625.71,373.39 626.25,371.99 Z M303.1,390.12 C306.53,389.69 303.27,394.27 302.28,391.19 C302.49,390.92 302.89,390.39 303.1,390.12 Z M630.23,392.2 C631.84,391.65 632.4,392.2 631.91,393.84 C630.28,394.37 629.72,393.83 630.23,392.2 Z M548.15,397.3 C549.77,396.8 550.32,397.36 549.79,398.98 C548.15,399.48 547.6,398.92 548.15,397.3 Z M488.31,428.25 C489.94,427.75 490.49,428.31 489.95,429.94 C488.3,430.43 487.75,429.87 488.31,428.25 Z M211.44,436.21 C212.83,435.75 213.34,436.23 212.96,437.65 C211.57,438.09 211.06,437.61 211.44,436.21 Z M335.5,442.17 C336.9,441.81 337.36,442.33 336.89,443.73 C335.48,444.07 335.02,443.55 335.5,442.17 Z M455.07,472.16 C456.7,471.67 457.24,472.24 456.69,473.86 C455.05,474.35 454.51,473.78 455.07,472.16 Z M338.13,473.22 C339.75,472.7 340.31,473.25 339.79,474.88 C338.15,475.39 337.6,474.84 338.13,473.22 Z M572.96,476.09 C574.61,475.54 575.18,476.08 574.68,477.69 C573.02,478.23 572.45,477.69 572.96,476.09 Z M642.05,278.17 C643.67,277.64 644.22,278.2 643.72,279.83 C642.09,280.36 641.54,279.81 642.05,278.17 Z M474.29,200.17 C475.27,198.59 477.68,200.39 476.6,201.82 C475.61,203.42 473.17,201.61 474.29,200.17 Z M504.15,219.36 C505.46,218.14 507.83,220.19 506.45,221.55 C505.14,222.91 502.65,220.7 504.15,219.36 Z M554.27,241.15 C555.71,239.91 557.48,242.46 555.9,243.44 C554.46,244.57 552.73,242.15 554.27,241.15 Z M350.36,374.8 C350.5,373.4 350.83,371.98 352.17,371.26 C352.58,371.79 353.42,372.85 353.83,373.39 C352.68,373.88 351.52,374.35 350.36,374.8 Z M516.26,412.88 C516.88,413.02 518.14,413.31 518.77,413.45 C519.43,415.17 517.7,415.61 516.48,416.08 C516.42,415.28 516.31,413.68 516.26,412.88 Z M541.26,413.22 C542.03,412.43 542.82,411.66 543.66,410.93 C543.67,411.72 543.7,413.29 543.71,414.08 L545.83,413.54 C545.79,414.21 545.7,415.54 545.66,416.2 C544.15,415.26 542.71,414.23 541.26,413.22 Z M385.2,437.48 C386.65,436.3 388.44,438.75 386.76,439.69 C385.29,440.91 383.52,438.42 385.2,437.48 Z M522.38,72.14 C523.38,70.58 525.81,72.38 524.64,73.81 C523.63,75.39 521.24,73.55 522.38,72.14 Z' id='b' />\n <path d='M532.49,48.35 C534.09,47.79 534.64,48.34 534.13,50 C532.52,50.54 531.98,50 532.49,48.35 Z M439.88,78.94 C441.49,78.43 442.05,78.98 441.55,80.6 C439.92,81.11 439.36,80.55 439.88,78.94 Z M302.04,183.36 C303.44,182.23 305.29,184.59 303.74,185.62 C302.32,186.8 300.47,184.38 302.04,183.36 Z M544.267068,228.550572 C545.247068,227.170572 547.957068,228.640572 546.747068,230.150572 C545.757068,231.510572 543.167068,230.020572 544.267068,228.550572 Z M582.26,240.03 C583.3,238.53 585.68,240.35 584.54,241.76 C583.5,243.28 581.1,241.43 582.26,240.03 Z M693.21,274.86 C694.89,274.4 695.43,274.96 694.85,276.54 C693.17,276.98 692.62,276.42 693.21,274.86 Z M543.24611,296.592588 C544.24611,295.022588 546.58611,296.912588 545.60611,298.322588 C544.59611,299.872588 542.23611,298.012588 543.24611,296.592588 Z M339.1,300.59 C339.77,300.5 341.12,300.31 341.8,300.21 C341.69,300.87 341.48,302.19 341.37,302.85 C340.61,302.1 339.85,301.34 339.1,300.59 Z M573.17,321.54 C574.41,320.47 576.16,322.55 574.79,323.54 C573.54,324.62 571.71,322.5 573.17,321.54 Z M322.58,327.99 C323.56,326.6 325.67,328.36 324.63,329.63 C323.66,331.01 321.56,329.23 322.58,327.99 Z M649.92,381.54 C651.14,380.5 652.93,382.58 651.62,383.58 C650.37,384.62 648.56,382.56 649.92,381.54 Z M559.58,407.52 C560.09,407.48 561.11,407.41 561.62,407.37 C561.63,407.91 561.66,408.99 561.67,409.53 C561.16,409.52 560.13,409.49 559.62,409.48 C559.61,408.99 559.59,408.01 559.58,407.52 Z M318.31,416.35 C318.83,416.37 319.89,416.4 320.41,416.42 C320.4,416.92 320.38,417.92 320.37,418.41 C319.87,418.43 318.87,418.47 318.37,418.49 C318.35,417.96 318.32,416.89 318.31,416.35 Z M392.41,466.52 C392.85,466.56 393.74,466.66 394.19,466.71 C394.34,467.15 394.64,468.04 394.79,468.48 C394.11,468.54 392.74,468.65 392.06,468.71 C392.15,468.16 392.32,467.06 392.41,466.52 Z M529.95,480.86 C531.55,480.33 532.11,480.89 531.61,482.53 C529.98,483.02 529.43,482.47 529.95,480.86 Z M326.31,496.07 C327.32,494.46 329.61,496.44 328.62,497.84 C327.6,499.44 325.33,497.45 326.31,496.07 Z M588.38,496.34 C589.39,495.12 591.53,496.83 590.51,498.08 C589.46,499.27 587.34,497.59 588.38,496.34 Z M318.9,277.44 C320.51,276.91 321.06,277.46 320.55,279.08 C318.92,279.62 318.37,279.07 318.9,277.44 Z M572.195366,336.221176 C573.795366,335.651176 574.335366,336.181176 573.825366,337.831176 C572.215366,338.411176 571.665366,337.871176 572.195366,336.221176 Z M555.12,425.37 C556.53,425.52 556.77,426.19 555.86,427.36 C554.45,427.19 554.2,426.53 555.12,425.37 Z M405.33,94.25 C406.93,93.67 407.49,94.21 406.99,95.87 C405.38,96.44 404.83,95.9 405.33,94.25 Z M546.38,112.2 C547.98,111.69 548.52,112.26 547.98,113.91 C546.36,114.41 545.83,113.84 546.38,112.2 Z M458.19,192.46 C459.7,191.29 461.04,193.99 459.7,194.95 C458.16,196.2 456.78,193.4 458.19,192.46 Z M302.28,124.19 C303.91,123.7 304.46,124.26 303.9,125.89 C302.26,126.37 301.72,125.8 302.28,124.19 Z M381.35,158.25 C382.94,157.67 383.49,158.22 383.01,159.89 C381.41,160.45 380.86,159.9 381.35,158.25 Z M452.73,166.9 C450.09,166.67 453.6,163.12 453.84,165.76 C453.56,166.05 453,166.62 452.73,166.9 Z M648.18,180.22 C649.78,179.7 650.33,180.26 649.82,181.91 C648.2,182.43 647.65,181.87 648.18,180.22 Z M513.17,194.05 C514.8,193.62 515.36,194.2 514.83,195.81 C513.19,196.23 512.63,195.65 513.17,194.05 Z M210.22,201.19 C211.72,199.95 213.15,202.67 211.79,203.66 C210.29,204.87 208.87,202.17 210.22,201.19 Z M482.13,132.52 C483.8,132.03 484.37,132.57 483.83,134.13 C482.13,134.62 481.57,134.08 482.13,132.52 Z M607.18,249.1 C608.81,248.54 609.35,249.07 608.8,250.71 C607.15,251.27 606.61,250.73 607.18,249.1 Z M531.36,265.86 C532.93,265.43 533.5,266.06 533.06,267.74 C531.49,268.15 530.92,267.53 531.36,265.86 Z M310.98,269.24 C312.61,268.68 313.19,269.21 312.72,270.84 C311.09,271.4 310.51,270.87 310.98,269.24 Z M535.20625,283.176756 C536.83625,282.676756 537.38625,283.236756 536.85625,284.866756 C535.20625,285.356756 534.65625,284.796756 535.20625,283.176756 Z M294.25,291.49 C292.3,292.24 292.41,288.38 294.32,289.24 C294.3,289.81 294.27,290.93 294.25,291.49 Z M228.16,318.26 C229.77,317.77 230.31,318.35 229.77,319.98 C228.14,320.47 227.6,319.89 228.16,318.26 Z M310.02,319.23 C311.64,318.71 312.19,319.26 311.69,320.9 C310.06,321.42 309.51,320.87 310.02,319.23 Z M238.29,392.08 C239.59,392.74 239.57,393.41 238.23,394.1 C236.93,393.44 236.95,392.77 238.29,392.08 Z M518.92,416.89 C519.67,416.93 521.16,417.01 521.91,417.05 C521.92,417.76 521.93,419.17 521.93,419.88 C521.19,419.88 519.71,419.89 518.97,419.9 C518.96,419.15 518.93,417.64 518.92,416.89 Z M424.18,437.13 C425.84,436.59 426.39,437.12 425.82,438.74 C424.15,439.27 423.6,438.74 424.18,437.13 Z M464.02,443.13 C465.63,442.57 466.19,443.11 465.7,444.76 C464.08,445.31 463.52,444.77 464.02,443.13 Z M381.96,449.07 C383.35,448.57 383.83,449.03 383.42,450.46 C382.03,450.95 381.54,450.49 381.96,449.07 Z M190.09,450.33 C191.73,449.78 192.28,450.32 191.73,451.95 C190.07,452.48 189.53,451.94 190.09,450.33 Z M482.05,452.31 C483.66,451.84 484.23,452.42 483.75,454.03 C482.11,454.5 481.54,453.92 482.05,452.31 Z M329.302273,426.38662 C328.583047,424.297838 329.693292,422.021498 331.782074,421.302273 C333.870856,420.583047 336.147196,421.693292 336.866421,423.782074 C337.585647,425.870856 336.475401,428.147196 334.38662,428.866421 C332.297838,429.585647 330.021498,428.475401 329.302273,426.38662 Z M282.31,406.03 C283.94,405.55 284.49,406.11 283.94,407.74 C282.3,408.21 281.76,407.64 282.31,406.03 Z M334.5,205 C330.357864,205 327,201.642136 327,197.5 C327,193.357864 330.357864,190 334.5,190 C338.642136,190 342,193.357864 342,197.5 C342,201.642136 338.642136,205 334.5,205 Z M396.5,432 C392.357864,432 389,428.642136 389,424.5 C389,420.357864 392.357864,417 396.5,417 C400.642136,417 404,420.357864 404,424.5 C404,428.642136 400.642136,432 396.5,432 Z M467.5,433 C463.357864,433 460,429.642136 460,425.5 C460,421.357864 463.357864,418 467.5,418 C471.642136,418 475,421.357864 475,425.5 C475,429.642136 471.642136,433 467.5,433 Z M431.5,141 C425.70101,141 421,136.29899 421,130.5 C421,124.70101 425.70101,120 431.5,120 C437.29899,120 442,124.70101 442,130.5 C442,136.29899 437.29899,141 431.5,141 Z M298,223 C292.477153,223 288,218.522847 288,213 C288,207.477153 292.477153,203 298,203 C303.522847,203 308,207.477153 308,213 C308,218.522847 303.522847,223 298,223 Z M560.5,385 C554.70101,385 550,380.29899 550,374.5 C550,368.70101 554.70101,364 560.5,364 C566.29899,364 571,368.70101 571,374.5 C571,380.29899 566.29899,385 560.5,385 Z M700.5,258 C697.462434,258 695,255.537566 695,252.5 C695,249.462434 697.462434,247 700.5,247 C703.537566,247 706,249.462434 706,252.5 C706,255.537566 703.537566,258 700.5,258 Z M396.23,138.05 C396.15,136.21 399.11,136.29 399.14,138.06 C399.21,139.86 396.18,139.83 396.23,138.05 Z M450.39,146.14 C451.3,144.48 453.89,146.15 452.66,147.64 C451.73,149.27 449.2,147.63 450.39,146.14 Z M317.6,169.54 C318.82,168.33 321.15,170.25 319.62,171.48 C318.39,172.78 316.22,170.76 317.6,169.54 Z M379.53,169.13 C380.51,167.8 382.61,169.54 381.65,170.81 C380.68,172.18 378.58,170.38 379.53,169.13 Z M420.17,170.44 C420.81,170.43 422.1,170.41 422.74,170.41 C422.73,170.93 422.71,171.99 422.69,172.52 C422.08,172.52 420.86,172.53 420.25,172.53 C420.23,172 420.19,170.96 420.17,170.44 Z M353.233931,183.65307 C352.473931,182.36307 353.733931,181.52307 354.613931,180.79307 C355.533931,181.62307 355.853931,182.84307 356.193931,183.99307 C355.203931,183.92307 354.213931,183.81307 353.233931,183.65307 Z M518.44,179.12 C519.81,177.55 521.84,180.19 520.55,181.47 C519.15,182.84 517.19,180.42 518.44,179.12 Z M403.24,186.93 C404.15,187.58 405.06,188.24 405.91,188.99 C405.32,189.78 404.49,190.29 403.57,190.58 C403.27,189.38 403.16,188.16 403.24,186.93 Z M545.83,187.09 C547.4,186.6 547.92,187.19 547.38,188.85 C545.79,189.34 545.27,188.75 545.83,187.09 Z M476.33,195.32 C477.28,193.72 479.71,195.47 478.65,196.93 C477.69,198.55 475.21,196.79 476.33,195.32 Z M329.28,214.2 C330.26,212.6 332.66,214.42 331.56,215.85 C330.56,217.43 328.12,215.63 329.28,214.2 Z M507.55,215.43 C508.99,215.6 510.2,216.18 510.54,217.75 C509.73,217.75 508.11,217.74 507.3,217.74 C507.36,217.16 507.48,216.01 507.55,215.43 Z M527.64,224.18 C528.69,224.86 529.64,225.66 530.4,226.68 C529.6,226.68 528,226.69 527.19,226.7 C527.3,226.07 527.53,224.81 527.64,224.18 Z M568.46,235.28 C569.48,233.99 571.55,235.83 570.53,237.05 C569.47,238.27 567.42,236.51 568.46,235.28 Z M319.62,240.51 C320.75,239.82 321.67,240.02 322.39,241.13 C322.85,242.64 320.6,243.5 319.63,242.51 C319.63,242.01 319.63,241.01 319.62,240.51 Z M288.71,247.49 C289.2,247.44 290.2,247.33 290.69,247.27 C290.7,247.83 290.71,248.94 290.72,249.5 C290.22,249.47 289.22,249.4 288.71,249.37 C288.71,248.9 288.71,247.96 288.71,247.49 Z M605.04,253.45 C606.41,252.42 607.66,254.81 606.46,255.7 C605.08,256.77 603.71,254.32 605.04,253.45 Z M341.28,268.33 C342.22,266.78 344.73,268.43 343.67,269.9 C342.7,271.39 340.08,269.83 341.28,268.33 Z M193.97,308.81 C195.6,308.26 196.16,308.81 195.67,310.44 C194.05,310.96 193.48,310.41 193.97,308.81 Z M580.35,313.4 C577.71,315.54 576.82,310.33 579.91,310.81 C580.94,311.49 581.08,312.35 580.35,313.4 Z M341.42,316.25 C342.43,314.73 344.89,316.49 343.72,317.92 C342.7,319.41 340.22,317.68 341.42,316.25 Z M530.1,320.68 C530.7,319.74 531.3,318.8 532,317.92 C532.68,318.44 533.27,319.05 533.77,319.77 C532.84,320.88 531.36,320.58 530.1,320.68 Z M249.62,332.6 C250.1,332.57 251.06,332.51 251.54,332.48 C251.56,333.01 251.62,334.09 251.64,334.62 C251.09,334.6 249.99,334.55 249.44,334.53 C249.48,334.05 249.57,333.08 249.62,332.6 Z M547.35,345.43 C547.84,345.51 548.82,345.68 549.31,345.77 C549.29,346.58 549.28,347.39 549.27,348.21 C548.8,348.3 547.84,348.46 547.36,348.55 C547.35,347.5 547.34,346.46 547.35,345.43 Z M637.34,353.58 C638.29,352.4 640.54,353.81 639.57,355.15 C638.63,356.44 636.33,354.9 637.34,353.58 Z M281.29,354.42 C282.7,353.26 284.56,355.65 283,356.68 C281.59,357.79 279.72,355.43 281.29,354.42 Z M330.52,362.22 C331.56,360.71 333.96,362.59 332.79,363.99 C331.72,365.45 329.37,363.61 330.52,362.22 Z M347.34,374.77 C348.44,375.29 350.62,375.68 349.56,377.37 C348.99,377.58 347.84,378.01 347.26,378.23 C347.28,377.37 347.32,375.64 347.34,374.77 Z M520.98,383.87 C522.79,381.96 525.39,382.49 525.68,385.32 C523.89,385.54 522.32,385.05 520.98,383.87 Z M555.04,386.08 C556.47,384.95 558.24,387.44 556.72,388.43 C555.28,389.52 553.54,387.09 555.04,386.08 Z M311.28,402.26 C312.6,400.68 314.72,403.19 313.34,404.45 C311.98,405.92 309.77,403.56 311.28,402.26 Z M653.34,403.52 C654.95,402.96 655.52,403.5 655.07,405.12 C653.45,405.68 652.87,405.15 653.34,403.52 Z M442.34,413.39 C443.32,413.37 443.99,413.85 444.35,414.84 C443.71,415.59 443.05,416.32 442.38,417.03 C442.31,415.81 442.3,414.6 442.34,413.39 Z M368.1,426.29 C368.76,426.23 370.09,426.12 370.76,426.07 C370.72,426.72 370.65,428.01 370.62,428.66 C370.03,428.65 368.87,428.64 368.28,428.63 C368.23,428.05 368.14,426.87 368.1,426.29 Z M412.57,435.47 C412.95,435.56 413.73,435.75 414.12,435.84 C414.27,436.27 414.58,437.14 414.73,437.57 C414.16,437.6 413.02,437.65 412.45,437.67 C412.48,437.12 412.54,436.02 412.57,435.47 Z M494.33,442.38 C494.82,442.43 495.81,442.54 496.31,442.59 C496.35,443.06 496.43,444 496.47,444.47 C495.9,444.48 494.74,444.52 494.16,444.53 C494.2,444 494.29,442.92 494.33,442.38 Z M577.24,181.17 C578.56,181.8 578.55,182.47 577.22,183.17 C575.9,182.54 575.91,181.88 577.24,181.17 Z' id='c' />\n <path d='M568.5,401 C566.567003,401 565,399.432997 565,397.5 C565,395.567003 566.567003,394 568.5,394 C570.432997,394 572,395.567003 572,397.5 C572,399.432997 570.432997,401 568.5,401 Z M538.5,35 C535.462434,35 533,32.5375661 533,29.5 C533,26.4624339 535.462434,24 538.5,24 C541.537566,24 544,26.4624339 544,29.5 C544,32.5375661 541.537566,35 538.5,35 Z M531,400 C527.134007,400 524,396.865993 524,393 C524,389.134007 527.134007,386 531,386 C534.865993,386 538,389.134007 538,393 C538,396.865993 534.865993,400 531,400 Z M393.25,122.24 C394.25,120.63 396.58,122.53 395.49,123.93 C394.49,125.57 392.1,123.65 393.25,122.24 Z M452.55,130.16 C453.33,130.77 455.61,130.83 454.55,132.25 C454.02,132.44 452.95,132.81 452.42,132.99 C452.45,132.28 452.52,130.87 452.55,130.16 Z M374.14,154.52 C375.5,153.33 377.42,155.63 375.93,156.71 C374.56,157.93 372.6,155.59 374.14,154.52 Z M307.27,158.23 C308.27,156.67 310.66,158.48 309.54,159.9 C308.53,161.48 306.09,159.66 307.27,158.23 Z M418.29,165.39 C419.67,165.31 421.06,165.23 422.45,165.14 C422.07,166.15 421.69,167.16 421.31,168.17 C420.31,167.23 419.31,166.3 418.29,165.39 Z M348.233931,176.86 C347.473931,175.57 348.733931,174.73 349.613931,174 C350.533931,174.83 350.853931,176.05 351.193931,177.2 C350.203931,177.13 349.213931,177.02 348.233931,176.86 Z M557.16,176.42 C558.61,175.36 560.32,177.82 558.73,178.76 C557.24,179.88 555.52,177.35 557.16,176.42 Z M401.3,182.74 C402.4,182.77 403.51,182.82 404.61,182.87 C404,183.77 404.06,186.19 402.45,185.32 C401.32,185.18 401.74,183.5 401.3,182.74 Z M317.18,204.56 C318.62,203.46 320.35,205.88 318.81,206.87 C317.35,208.05 315.58,205.52 317.18,204.56 Z M582.55,229.01 C583.57,229.57 584.48,230.28 585.03,231.34 C584.35,231.41 582.99,231.56 582.31,231.63 C582.37,230.97 582.49,229.67 582.55,229.01 Z M314.87,240.59 C314.78,238.79 315.67,237.89 317.47,238 C317.51,238.61 317.6,239.82 317.65,240.43 C316.95,240.47 315.56,240.55 314.87,240.59 Z M620.17,250.08 C621.77,249.32 622.55,251.99 620.95,252.43 C619.31,253.19 618.52,250.51 620.17,250.08 Z M535.51,266.64 C534.84,264.46 537.01,262.5 538.7,264.66 C538.2,266.08 536.94,266.63 535.51,266.64 Z M336.13,266.16 C338.01,266.66 339.63,267.57 338.14,269.63 C336.27,269.4 336.35,267.55 336.13,266.16 Z M543.28,282.33 C544.73,281.17 546.52,283.64 544.92,284.62 C543.48,285.71 541.69,283.3 543.28,282.33 Z M334.94,300.34 C336.22,299.38 337.84,301.56 336.6,302.54 C335.3,303.49 333.67,301.32 334.94,300.34 Z M593.46,313.38 C594.8,311.64 596.88,314.22 595.43,315.48 C594.06,316.96 591.81,314.65 593.46,313.38 Z M535.79,322.22 C534.94,320.89 536.53,319.87 537.06,318.81 C537.55,319.72 538.11,320.62 538.48,321.6 C537.8,322.46 536.75,322.41 535.79,322.22 Z M234.69,334.81 C235.51,335.69 236.32,336.58 237.13,337.48 C236.43,337.61 235.03,337.86 234.33,337.99 C234.42,337.19 234.6,335.61 234.69,334.81 Z M551.07,348.95 C551.78,348.32 552.55,347.74 553.4,347.27 C554.11,348.48 554.17,349.75 553.57,351.09 C552.71,350.4 551.86,349.71 551.07,348.95 Z M343.24,379.18 C343.87,379.18 345.13,379.18 345.76,379.18 C345.77,379.87 345.79,381.25 345.8,381.94 C345.17,381.86 343.91,381.71 343.28,381.64 C343.27,381.03 343.25,379.8 343.24,379.18 Z M300,412.38 C301.37,411.34 303.39,413.62 301.73,414.62 C300.33,415.68 298.34,413.39 300,412.38 Z M676.36,414.9 C677.98,414.36 678.53,414.9 678.02,416.53 C676.4,417.05 675.84,416.51 676.36,414.9 Z M443.23,417.71 C443.92,418.82 444.52,419.98 445.06,421.18 C444.29,421.19 442.75,421.22 441.99,421.23 C442.37,420.05 442.78,418.87 443.23,417.71 Z M521.44,423.82 C521.79,422.19 522.81,421.14 524.47,420.9 C524.51,421.62 524.6,423.05 524.64,423.77 C523.84,423.79 522.24,423.81 521.44,423.82 Z M410.34,451 C411.36,449.42 413.74,451.29 412.59,452.71 C411.56,454.28 409.21,452.4 410.34,451 Z M381.07,451.98 C384.74,451.47 380.85,456.79 380.08,453.27 C380.33,452.95 380.82,452.3 381.07,451.98 Z M168.46,464.36 C169.09,464.46 170.36,464.67 170.99,464.77 C170.2,465.49 169.41,466.22 168.62,466.95 C168.58,466.31 168.5,465.01 168.46,464.36 Z M286.52,104 C288.12,103.47 288.65,104.04 288.13,105.7 C286.54,106.21 286,105.64 286.52,104 Z M431.24,114.57 C432.67,113.47 434.39,115.9 432.91,116.91 C431.46,118.06 429.7,115.55 431.24,114.57 Z M376.18,143.37 C377.57,142.27 379.56,144.55 377.94,145.59 C376.56,146.66 374.55,144.38 376.18,143.37 Z M456.1,150.42 C459.52,148.9 457.24,155.09 455.52,151.92 C455.66,151.54 455.95,150.79 456.1,150.42 Z M533.41,171.1 C534.45,169.52 536.77,171.43 535.63,172.83 C534.6,174.46 532.29,172.47 533.41,171.1 Z M290.32,173.89 C291.97,173.4 292.53,173.95 292,175.56 C290.35,176.04 289.79,175.48 290.32,173.89 Z M318.28,178.3 C319.59,179 319.57,179.67 318.25,180.32 C316.96,179.6 316.97,178.93 318.28,178.3 Z M186.27,191.6 C187.16,190.4 189.55,191.63 188.52,193.02 C187.64,194.34 185.16,192.98 186.27,191.6 Z M558.17,222.59 C556.61,221.25 559.08,219.16 560.38,220.48 C561.86,221.84 559.5,224 558.17,222.59 Z M597.02,235.11 C598.02,233.78 600.65,235.22 599.45,236.71 C598.48,238.15 595.78,236.58 597.02,235.11 Z M277.27,289.22 C278.57,287.71 281.02,289.89 279.5,291.28 C278.25,292.63 275.8,290.56 277.27,289.22 Z M615.88,299.45 C617.47,298.88 618.04,299.41 617.58,301.04 C615.95,301.62 615.38,301.08 615.88,299.45 Z M203.09,321.57 C204.5,321.72 204.76,322.38 203.86,323.56 C202.45,323.41 202.19,322.75 203.09,321.57 Z M588.1,324.39 C589.49,323.13 591.4,325.49 589.79,326.53 C588.4,327.77 586.46,325.42 588.1,324.39 Z M570.26,417.72 C571.53,417.86 572.8,418.09 574.05,418.41 C573.19,418.93 572.33,419.46 571.47,419.98 C571.17,419.42 570.56,418.29 570.26,417.72 Z M486.68,466.73 C487.18,466.62 488.17,466.38 488.66,466.27 C488.67,467.33 488.68,468.4 488.7,469.48 C488.22,469.4 487.26,469.24 486.79,469.16 C486.75,468.34 486.71,467.54 486.68,466.73 Z M389.26,481.47 C390.69,480.34 392.45,482.76 390.96,483.79 C389.53,484.93 387.74,482.47 389.26,481.47 Z M402.09,69.02 C403.7,68.5 404.24,69.06 403.72,70.71 C402.11,71.23 401.57,70.67 402.09,69.02 Z M588.195366,341.221176 C589.795366,340.651176 590.335366,341.181176 589.825366,342.831176 C588.215366,343.411176 587.665366,342.871176 588.195366,341.221176 Z M617.19,150.3 C618.81,149.76 619.37,150.31 618.87,151.94 C617.23,152.48 616.67,151.93 617.19,150.3 Z M670.95,168.22 C672.54,167.64 673.12,168.18 672.67,169.82 C671.06,170.4 670.48,169.87 670.95,168.22 Z M487.04,117.4 C488.46,116.3 490.28,118.68 488.69,119.67 C487.25,120.83 485.42,118.39 487.04,117.4 Z M296.21,266.09 C297.61,265.49 298.51,267.87 296.94,268.19 C295.53,268.75 294.68,266.46 296.21,266.09 Z M718.91,273.21 C720.53,272.69 721.12,273.24 720.66,274.85 C719.01,275.37 718.43,274.83 718.91,273.21 Z M168.23,310.31 C169.86,309.8 170.4,310.36 169.87,311.99 C168.22,312.48 167.68,311.92 168.23,310.31 Z M278.25,329.05 C279.88,328.55 280.43,329.11 279.89,330.74 C278.25,331.22 277.71,330.66 278.25,329.05 Z M308.17,333.05 C309.79,332.48 310.36,333.02 309.88,334.66 C308.26,335.22 307.69,334.68 308.17,333.05 Z M267.09,360.35 C268.73,359.79 269.28,360.32 268.75,361.96 C267.1,362.51 266.55,361.97 267.09,360.35 Z M697.31,401.21 C698.94,400.72 699.49,401.29 698.96,402.91 C697.31,403.39 696.76,402.82 697.31,401.21 Z M214.31,404.22 C215.91,403.65 216.46,404.21 215.96,405.88 C214.37,406.42 213.82,405.87 214.31,404.22 Z M620.51,412.12 C621.92,411.73 622.4,412.23 621.96,413.62 C620.54,413.99 620.05,413.5 620.51,412.12 Z M241.25,437.27 C242.23,436.04 244.44,437.64 243.43,438.92 C242.44,440.15 240.19,438.56 241.25,437.27 Z M308.19,428.27 C309.8,427.71 310.37,428.25 309.88,429.89 C308.25,430.44 307.69,429.9 308.19,428.27 Z M423.25,482.97 C424.89,482.49 425.43,483.06 424.87,484.68 C423.22,485.15 422.69,484.57 423.25,482.97 Z M275.302273,203.38662 C274.583047,201.297838 275.693292,199.021498 277.782074,198.302273 C279.870856,197.583047 282.147196,198.693292 282.866421,200.782074 C283.585647,202.870856 282.475401,205.147196 280.38662,205.866421 C278.297838,206.585647 276.021498,205.475401 275.302273,203.38662 Z M467.16,452.38 C468.79,451.83 469.33,452.37 468.79,454.01 C467.13,454.54 466.59,454 467.16,452.38 Z M632.22,243 C633.82,242.48 634.38,243.05 633.9,244.7 C632.29,245.2 631.73,244.63 632.22,243 Z M531.44,222.23 C532.4,220.85 535.16,222.24 533.94,223.77 C532.96,225.09 530.25,223.73 531.44,222.23 Z M478.5,190.4 C479.03,190.4 480.08,190.4 480.6,190.4 C480.58,190.91 480.54,191.94 480.52,192.45 C480.02,192.44 479.03,192.43 478.53,192.43 C478.52,191.92 478.51,190.9 478.5,190.4 Z M511.52,211.65 C512.02,211.65 513.03,211.65 513.54,211.64 C513.54,212.57 513.54,213.5 513.55,214.43 C512.98,214.41 511.85,214.38 511.28,214.36 C511.35,213.45 511.43,212.55 511.52,211.65 Z M274.09,242.45 C275.48,241.33 277.38,243.67 275.8,244.69 C274.4,245.82 272.47,243.47 274.09,242.45 Z M288.22,273.36 C289.63,272.21 291.48,274.6 289.93,275.62 C288.52,276.75 286.65,274.37 288.22,273.36 Z M336.2,317.42 C336.97,317.46 338.5,317.54 339.27,317.58 C338.49,318.55 337.55,319.37 336.53,320.08 C336.45,319.41 336.28,318.08 336.2,317.42 Z M662.13,360.48 C663.46,359.33 665.58,361.51 663.98,362.61 C662.64,363.73 660.51,361.56 662.13,360.48 Z M326.12,367.46 C325.82,365.57 326.92,364.86 328.69,364.86 C328.66,365.55 328.58,366.94 328.55,367.63 C327.94,367.59 326.73,367.5 326.12,367.46 Z M559.49,430.29 C561.09,429.79 561.62,430.37 561.08,432.02 C559.48,432.51 558.95,431.93 559.49,430.29 Z M459.46,187.38 C459.92,187.48 460.84,187.69 461.3,187.8 C461.3,188.6 461.3,189.41 461.3,190.21 C459.78,190.39 458.26,190.58 456.76,190.75 C457.36,190.58 458.58,190.23 459.18,190.06 C459.25,189.39 459.39,188.05 459.46,187.38 Z M528.2,167.22 C529.82,166.68 530.38,167.23 529.88,168.86 C528.25,169.39 527.69,168.85 528.2,167.22 Z M366.4,430.53 C367.85,429.23 369.62,432.18 367.99,433.01 C366.66,435.05 364.48,431.21 366.4,430.53 Z' id='d' />\n <path d='M400,175 C396.134007,175 393,171.865993 393,168 C393,164.134007 396.134007,161 400,161 C403.865993,161 407,164.134007 407,168 C407,171.865993 403.865993,175 400,175 Z M333.5,398 C329.357864,398 326,394.642136 326,390.5 C326,386.357864 329.357864,383 333.5,383 C337.642136,383 341,386.357864 341,390.5 C341,394.642136 337.642136,398 333.5,398 Z M263.5,296 C259.357864,296 256,292.642136 256,288.5 C256,284.357864 259.357864,281 263.5,281 C267.642136,281 271,284.357864 271,288.5 C271,292.642136 267.642136,296 263.5,296 Z M570.5,224 C564.70101,224 560,219.29899 560,213.5 C560,207.70101 564.70101,203 570.5,203 C576.29899,203 581,207.70101 581,213.5 C581,219.29899 576.29899,224 570.5,224 Z M431,105 C428.790861,105 427,103.209139 427,101 C427,98.790861 428.790861,97 431,97 C433.209139,97 435,98.790861 435,101 C435,103.209139 433.209139,105 431,105 Z M455,124 C452.790861,124 451,122.209139 451,120 C451,117.790861 452.790861,116 455,116 C457.209139,116 459,117.790861 459,120 C459,122.209139 457.209139,124 455,124 Z M614,235 C611.790861,235 610,233.209139 610,231 C610,228.790861 611.790861,227 614,227 C616.209139,227 618,228.790861 618,231 C618,233.209139 616.209139,235 614,235 Z M687.5,374 C684.462434,374 682,371.537566 682,368.5 C682,365.462434 684.462434,363 687.5,363 C690.537566,363 693,365.462434 693,368.5 C693,371.537566 690.537566,374 687.5,374 Z M389.99,107.19 C391.36,105.98 393.26,108.39 391.78,109.45 C390.39,110.61 388.55,108.28 389.99,107.19 Z M367.99,140.17 C369.37,138.98 371.26,141.38 369.78,142.44 C368.39,143.59 366.54,141.25 367.99,140.17 Z M297.25,146.6 C298.72,145.47 300.23,148.04 298.83,149.02 C297.33,150.24 295.76,147.56 297.25,146.6 Z M537.88,154.9 C539.5,154.38 540.05,154.93 539.54,156.56 C537.9,157.08 537.35,156.53 537.88,154.9 Z M419.34,159.95 C420.57,160.06 421.68,160.45 422.67,161.13 C421.79,161.98 420.6,162.2 419.5,162.59 C419.46,161.93 419.38,160.61 419.34,159.95 Z M568.28,166.3 C569.73,165.11 571.5,167.59 569.9,168.57 C568.47,169.65 566.64,167.25 568.28,166.3 Z M345.48,170.22 C346.6,170.66 348.6,170.33 348.53,172.03 C349.23,173.33 347.16,173.24 346.42,173.34 C345.76,172.44 345.78,171.24 345.48,170.22 Z M480,185.41 C480.59,185.31 481.78,185.11 482.37,185 C482.38,185.8 482.41,187.39 482.43,188.18 C481.25,187.57 480.16,186.83 480,185.41 Z M304.41,195.31 C305.37,193.74 307.81,195.51 306.74,196.95 C305.75,198.52 303.29,196.76 304.41,195.31 Z M540.59,215.48 C541.75,215.8 542.4,216.64 542.62,217.8 C541.76,218.55 540.98,219.37 540.29,220.26 L539.37,219.54 C538.59,220.23 537.8,220.89 536.99,221.52 C536.27,220.85 535.64,220.1 535,219.37 C536.37,218.72 537.79,218.42 539.04,219.74 C539.96,218.5 540.24,216.95 540.59,215.48 Z M596.69,223.44 C597.22,223.4 598.28,223.33 598.81,223.29 C598.76,223.9 598.68,225.11 598.64,225.72 C598.17,225.68 597.22,225.59 596.75,225.54 C596.73,225.02 596.71,223.97 596.69,223.44 Z M312.79,238.96 C310.92,238.37 309.41,237.39 310.87,235.36 C312.74,235.72 312.67,237.46 312.79,238.96 Z M634.58,247.1 C635.65,245.4 637.88,247.5 636.65,248.86 C635.58,250.54 633.37,248.43 634.58,247.1 Z M541.52,262.62 C543.3,261.29 543.83,264.81 542.38,265.61 C540.85,265.09 539.24,263.46 541.52,262.62 Z M331.41,265.26 C331.92,265.28 332.94,265.31 333.46,265.33 C333.47,265.94 333.49,267.17 333.5,267.79 C332.95,267.79 331.86,267.79 331.31,267.8 C331.34,267.16 331.39,265.89 331.41,265.26 Z M273.08,271.35 C274.45,270.17 276.39,272.5 274.85,273.57 C273.47,274.74 271.55,272.41 273.08,271.35 Z M744.14,271.48 C745.41,270.12 747.91,272.07 746.45,273.49 C745.21,274.83 742.53,272.85 744.14,271.48 Z M548.26,283.84 C546.81,282.48 549.3,280.48 550.59,281.62 C551.99,282.98 549.6,285.17 548.26,283.84 Z M329.23,301.17 C330.21,299.61 332.65,301.37 331.55,302.81 C330.57,304.39 328.09,302.62 329.23,301.17 Z M609.27,315.3 C610.71,314.16 612.5,316.62 610.91,317.6 C609.46,318.7 607.68,316.28 609.27,315.3 Z M331.28,319.07 C332.28,317.51 334.72,319.31 333.58,320.74 C332.58,322.29 330.16,320.49 331.28,319.07 Z M540.5,322.57 C539.8,320.91 542.63,321.25 543.31,320.44 C543.15,321.31 542.84,323.04 542.68,323.9 C541.68,323.77 540.95,323.33 540.5,322.57 Z M293.39,337.95 C294.99,337.37 295.56,337.9 295.09,339.54 C293.48,340.1 292.92,339.57 293.39,337.95 Z M601.05,347.49 C599.37,346.03 602.18,344.2 603.39,345.63 C604.86,347.08 602.25,348.88 601.05,347.49 Z M555.87,352.42 C556.4,351.21 557.07,350.06 557.94,349.05 C558.31,350.18 558.68,351.32 559.04,352.47 C558.25,352.46 556.66,352.43 555.87,352.42 Z M251.77,366.52 C252.6,366.43 254.25,366.25 255.07,366.16 C254.91,366.85 254.6,368.22 254.44,368.9 C253.54,368.11 252.65,367.32 251.77,366.52 Z M322.59,367.34 C324.07,367.64 324.42,369.06 324.8,370.33 C324.12,370.33 322.77,370.33 322.09,370.33 C322.22,369.32 322.39,368.33 322.59,367.34 Z M444.71,427.25 C444.12,426.52 441.47,424.98 443.01,424.22 C445.25,422.42 444.77,426.08 444.71,427.25 Z M524.14,427.4 C524.76,426.76 524.94,425.39 525.99,425.38 C527.81,424.8 527.68,426.99 528.24,428.1 C526.86,427.88 525.5,427.65 524.14,427.4 Z M699.38,426.13 C700.4,424.47 702.64,426.51 701.54,427.88 C700.5,429.55 698.23,427.5 699.38,426.13 Z M363.16,437.44 C363.74,435.95 364.83,434.99 366.47,434.87 C366.46,435.58 366.44,437 366.43,437.71 C365.34,437.62 364.25,437.53 363.16,437.44 Z M565.27,436.25 C566.71,435.07 568.51,437.54 566.92,438.53 C565.49,439.64 563.7,437.24 565.27,436.25 Z M408.3,465.9 C408.88,465.97 410.06,466.12 410.65,466.19 C410.53,466.69 410.3,467.69 410.19,468.19 C409.75,468.32 408.88,468.57 408.44,468.7 C408.4,468 408.33,466.6 408.3,465.9 Z M375.33,467.22 C376.33,465.64 378.67,467.53 377.67,468.95 C376.67,470.54 374.32,468.62 375.33,467.22 Z M398.61,43.3 C399.96,42.17 401.36,44.61 400.08,45.52 C398.72,46.58 397.43,44.21 398.61,43.3 Z M371.2,128.46 C372.56,127.4 374.55,129.66 373.04,130.73 C371.66,131.79 369.67,129.54 371.2,128.46 Z M637.31,134.56 C638.24,133.38 640.58,134.72 639.5,136.06 C638.57,137.35 636.15,135.9 637.31,134.56 Z M458.45,135.48 C459,135.45 460.1,135.39 460.65,135.36 C460.62,135.92 460.57,137.02 460.54,137.58 C460.06,137.53 459.11,137.44 458.64,137.39 C458.59,136.91 458.49,135.96 458.45,135.48 Z M693.92,156.54 C695.56,156 696.13,156.53 695.64,158.13 C693.97,158.66 693.4,158.13 693.92,156.54 Z M544.12,159.35 C547.55,157.87 545.24,164.04 543.55,160.85 C543.69,160.47 543.98,159.72 544.12,159.35 Z M278.51,163.51 C279,163.52 279.97,163.55 280.46,163.57 C280.49,164.07 280.54,165.06 280.57,165.56 C280.03,165.58 278.95,165.62 278.41,165.63 C278.43,165.1 278.48,164.04 278.51,163.51 Z M162.51,183.5 C161.06,182.25 163.3,180.16 164.47,181.65 C165.8,182.92 163.72,184.93 162.51,183.5 Z M280.43,263.24 C281.49,261.71 283.79,263.63 282.65,265.01 C281.58,266.55 279.23,264.62 280.43,263.24 Z M641.32,300.86 C642.95,300.35 643.49,300.91 642.94,302.53 C641.32,303.02 640.77,302.46 641.32,300.86 Z M142.41,312.12 C143.44,310.47 145.72,312.48 144.61,313.87 C143.58,315.5 141.31,313.49 142.41,312.12 Z M603.13,327.49 C604.5,326.44 606.47,328.69 604.96,329.77 C603.58,330.79 601.55,328.53 603.13,327.49 Z M293.37,423.31 C291.81,423.13 291.58,420.28 293.26,420.15 C294.99,420.17 295.15,423.23 293.37,423.31 Z M641.94,425.91 C643.54,425.33 644.11,425.86 643.67,427.51 C642.05,428.07 641.48,427.53 641.94,425.91 Z M583.48,427.52 C585.09,426.34 585.55,430.78 583.83,429.8 C581.85,430.74 581.94,427.33 583.48,427.52 Z M297.44,440.63 C297.98,438.71 299.85,439.43 301.16,440.09 C300.17,441.09 298.37,442.57 297.44,440.63 Z M220.58,453.01 C221.47,451.67 223.83,453.15 222.83,454.51 C221.92,455.75 219.64,454.35 220.58,453.01 Z M255.2,63.34 C256.83,62.8 257.37,63.34 256.82,64.98 C255.19,65.53 254.65,64.98 255.2,63.34 Z M470.31,467.19 C470.87,467.26 471.98,467.4 472.53,467.47 C472.45,467.88 472.27,468.69 472.18,469.09 C471.66,469.28 470.62,469.67 470.11,469.86 C470.16,469.19 470.26,467.86 470.31,467.19 Z M460.34,183.18 C461.68,181.5 463.97,183.89 462.41,185.24 C461.14,186.71 458.84,184.47 460.34,183.18 Z M264.16,122.98 C265.82,122.47 266.38,123.01 265.84,124.61 C264.19,125.12 263.63,124.58 264.16,122.98 Z M256.02,181.26 C257.67,180.75 258.23,181.3 257.7,182.91 C256.04,183.41 255.48,182.86 256.02,181.26 Z M491.41,103.2 C492.43,101.58 494.82,103.44 493.57,104.85 C492.55,106.5 490.17,104.6 491.41,103.2 Z M515.2,208.43 C516.46,207.11 518.79,209.22 517.41,210.55 C516.09,212.14 513.69,209.82 515.2,208.43 Z M657.3,237.04 C658.94,236.5 659.52,237.03 659.04,238.64 C657.39,239.18 656.81,238.64 657.3,237.04 Z M259.36,238.16 C261.01,237.67 261.54,238.23 260.98,239.85 C259.33,240.33 258.79,239.77 259.36,238.16 Z M177.22,325.19 C178.82,324.65 179.37,325.2 178.88,326.86 C177.27,327.4 176.72,326.84 177.22,325.19 Z M253.19,335.16 C254.84,334.64 255.4,335.18 254.88,336.8 C253.23,337.32 252.67,336.77 253.19,335.16 Z M169.11,428.05 C170.74,427.53 171.29,428.08 170.76,429.71 C169.13,430.22 168.58,429.67 169.11,428.05 Z M145.607311,479.88259 C144.719617,477.304542 146.089921,474.495004 148.667969,473.607311 C151.246017,472.719617 154.055556,474.089921 154.943249,476.667969 C155.830942,479.246017 154.460639,482.055556 151.88259,482.943249 C149.304542,483.830942 146.495004,482.460639 145.607311,479.88259 Z M217.302273,341.38662 C216.583047,339.297838 217.693292,337.021498 219.782074,336.302273 C221.870856,335.583047 224.147196,336.693292 224.866421,338.782074 C225.585647,340.870856 224.475401,343.147196 222.38662,343.866421 C220.297838,344.585647 218.021498,343.475401 217.302273,341.38662 Z M489.302273,484.38662 C488.583047,482.297838 489.693292,480.021498 491.782074,479.302273 C493.870856,478.583047 496.147196,479.693292 496.866421,481.782074 C497.585647,483.870856 496.475401,486.147196 494.38662,486.866421 C492.297838,487.585647 490.021498,486.475401 489.302273,484.38662 Z M721.18,411.08 C722.79,410.54 723.35,411.09 722.85,412.73 C721.22,413.26 720.66,412.72 721.18,411.08 Z' id='e' />\n <path d='M386.32,92.26 C387.33,90.69 389.71,92.53 388.58,93.94 C387.57,95.52 385.15,93.68 386.32,92.26 Z M547,148 C544.790861,148 543,146.209139 543,144 C543,141.790861 544.790861,140 547,140 C549.209139,140 551,141.790861 551,144 C551,146.209139 549.209139,148 547,148 Z M593,440 C590.790861,440 589,438.209139 589,436 C589,433.790861 590.790861,432 593,432 C595.209139,432 597,433.790861 597,436 C597,438.209139 595.209139,440 593,440 Z M399.5,28 C396.462434,28 394,25.5375661 394,22.5 C394,19.4624339 396.462434,17 399.5,17 C402.537566,17 405,19.4624339 405,22.5 C405,25.5375661 402.537566,28 399.5,28 Z M139.5,178 C136.462434,178 134,175.537566 134,172.5 C134,169.462434 136.462434,167 139.5,167 C142.537566,167 145,169.462434 145,172.5 C145,175.537566 142.537566,178 139.5,178 Z M363.5,131 C360.462434,131 358,128.537566 358,125.5 C358,122.462434 360.462434,120 363.5,120 C366.537566,120 369,122.462434 369,125.5 C369,128.537566 366.537566,131 363.5,131 Z M772.5,275 C769.462434,275 767,272.537566 767,269.5 C767,266.462434 769.462434,264 772.5,264 C775.537566,264 778,266.462434 778,269.5 C778,272.537566 775.537566,275 772.5,275 Z M533,443 C529.134007,443 526,439.865993 526,436 C526,432.134007 529.134007,429 533,429 C536.865993,429 540,432.134007 540,436 C540,439.865993 536.865993,443 533,443 Z M746.5,422 C743.462434,422 741,419.537566 741,416.5 C741,413.462434 743.462434,411 746.5,411 C749.537566,411 752,413.462434 752,416.5 C752,419.537566 749.537566,422 746.5,422 Z M418.65,155.53 C419.52,155.02 420.44,154.62 421.36,154.2 C421.36,155.4 421.37,156.6 421.37,157.8 C420.44,157.1 418.22,157.12 418.65,155.53 Z M579.42,156.19 C580.42,154.6 582.83,156.44 581.7,157.87 C580.69,159.43 578.29,157.6 579.42,156.19 Z M342.37,168.54 C342.22,167.01 343.49,166.42 344.68,165.89 C345.06,166.88 345.43,167.88 345.81,168.87 C344.65,168.8 343.51,168.69 342.37,168.54 Z M484,178.41 C484.59,178.31 485.78,178.11 486.37,178 C486.38,178.8 486.41,180.39 486.43,181.18 C485.25,180.57 484.16,179.83 484,178.41 Z M518.14,204.52 C519.62,204.59 522.63,204.93 520.63,207.05 C519.35,208.76 518.15,205.75 518.14,204.52 Z M544.18,215.61 C543.43,213.21 545.22,213.01 547.18,213.22 C546.4,214.33 545.94,216.27 544.18,215.61 Z M244.33,233.48 C245.6,232.26 248.22,234.05 246.64,235.47 C245.42,236.91 242.71,234.82 244.33,233.48 Z M304.92,233.02 C306.86,233.2 309.29,234.5 307.46,236.66 C305.76,236.55 305.78,234.12 304.92,233.02 Z M650.08,243.44 C651.5,242.21 653.19,244.68 651.76,245.72 C650.34,246.96 648.57,244.46 650.08,243.44 Z M546.23,261.16 C547.37,260.9 549.76,262.02 548.23,263.22 C546.85,265.36 543.49,262.08 546.23,261.16 Z M326.14,264.17 C326.78,264.15 328.06,264.11 328.7,264.09 C328.67,264.73 328.6,266.01 328.56,266.66 C328,266.61 326.87,266.51 326.31,266.46 C326.26,265.89 326.18,264.74 326.14,264.17 Z M257.12,269.32 C257.91,269.38 259.51,269.49 260.31,269.55 C259.45,270.44 258.52,271.25 257.55,272.02 C257.44,271.34 257.22,269.99 257.12,269.32 Z M560.008573,280.10621 C561.858573,279.37621 563.028573,282.63621 560.918573,282.97621 C559.118573,283.49621 558.138573,280.61621 560.008573,280.10621 Z M325.19,301.41 C326.9,300.69 327.31,303.44 325.74,303.8 C324.05,304.53 323.61,301.75 325.19,301.41 Z M117,313.94 C118.64,313.37 119.23,313.89 118.76,315.5 C117.11,316.05 116.53,315.53 117,313.94 Z M326.8,320.11 C328.38,319.62 328.92,320.21 328.42,321.87 C326.82,322.35 326.27,321.76 326.8,320.11 Z M546.19,322.23 C547.67,322.03 548.85,322.87 548.61,324.43 C546.8,325.96 543.63,323.84 546.19,322.23 Z M616.21,350.13 C617.67,348.82 619.3,351.49 617.74,352.42 C616.25,353.68 614.7,351.1 616.21,350.13 Z M560.93,354.59 C560.92,352.87 561.77,351.89 563.53,351.96 C563.59,352.59 563.69,353.87 563.74,354.51 C563.04,354.53 561.63,354.57 560.93,354.59 Z M317.22,371.51 C318.34,371.33 319.46,371.19 320.59,371.08 C320.47,371.7 320.22,372.93 320.1,373.54 C319.1,372.92 317.44,372.93 317.22,371.51 Z M288.53,425.36 C287.3,423.98 289.45,421.63 290.79,423.15 C292.14,424.49 289.79,426.72 288.53,425.36 Z M443.16,428.73 C443.74,428.72 444.89,428.72 445.47,428.71 C445.46,429.75 445.44,430.8 445.43,431.85 C443.67,431.59 442.83,430.52 443.16,428.73 Z M723.2,437.15 C724.75,436.52 725.71,439.1 723.98,439.47 C722.39,440.13 721.4,437.46 723.2,437.15 Z M361.48,439.43 C363.58,439.38 364.73,440.52 364.66,442.64 C362.43,442.78 361.15,441.76 361.48,439.43 Z M575.15,448.22 C577.13,447.72 579.18,448.71 579.08,450.99 C577.73,450.19 575.09,450.29 575.15,448.22 Z M371.4,481.44 C371.84,481.53 372.74,481.7 373.19,481.78 C373.26,482.22 373.41,483.08 373.48,483.51 C372.92,483.58 371.81,483.71 371.25,483.78 C371.29,483.2 371.36,482.03 371.4,481.44 Z M239.33,44.89 C238.02,43.59 240.13,41.21 241.48,42.56 C242.75,43.87 240.71,46.39 239.33,44.89 Z M366.35,114.24 C367.36,112.69 369.75,114.51 368.62,115.93 C367.6,117.49 365.17,115.67 366.35,114.24 Z M461.14,120.39 C461.84,120.34 463.26,120.25 463.96,120.2 C463.83,120.77 463.56,121.92 463.43,122.5 C463.01,122.41 462.19,122.23 461.78,122.15 C461.62,121.71 461.3,120.83 461.14,120.39 Z M716.3,145.05 C717.28,143.46 719.71,145.26 718.59,146.71 C717.62,148.34 715.24,146.46 716.3,145.05 Z M554.13,147.56 C555.51,146.51 557.47,148.78 555.87,149.8 C554.48,150.9 552.46,148.56 554.13,147.56 Z M266.49,153.5 C267.07,153.41 268.24,153.24 268.82,153.16 C268.76,153.76 268.65,154.97 268.59,155.58 C268.17,155.48 267.32,155.27 266.89,155.17 C266.79,154.75 266.59,153.92 266.49,153.5 Z M212.3,153.86 C213.93,153.31 214.49,153.85 213.98,155.48 C212.36,156.01 211.8,155.47 212.3,153.86 Z M265.38,260.23 C266.44,258.64 268.68,260.65 267.54,262.01 C266.48,263.62 264.18,261.59 265.38,260.23 Z M619.16,330.28 C620.74,329.79 621.42,332.43 619.77,332.73 C618.17,333.23 617.48,330.56 619.16,330.28 Z M278.45,342.99 C279.43,341.71 281.61,343.34 280.63,344.64 C279.67,345.94 277.5,344.26 278.45,342.99 Z M146.05,439.42 C147.47,438.35 149.39,440.67 147.69,441.64 C146.26,442.78 144.34,440.36 146.05,439.42 Z M286.67,135.44 C287.18,135.43 288.21,135.41 288.72,135.4 C288.7,135.93 288.66,136.99 288.64,137.52 C288.15,137.49 287.16,137.44 286.66,137.41 C286.66,136.92 286.67,135.93 286.67,135.44 Z M623.73,318.89 C623.24,317.41 625.42,316.42 626.41,317.48 C626.41,317.99 626.41,319.02 626.41,319.54 C625.29,320.24 624.4,320.02 623.73,318.89 Z M473.51,482.52 C474.06,482.45 475.17,482.32 475.73,482.25 C475.69,482.83 475.63,483.99 475.6,484.57 C475.15,484.49 474.26,484.34 473.81,484.26 C473.73,483.82 473.59,482.96 473.51,482.52 Z M246.25,104.31 C247.89,103.77 248.46,104.31 247.95,105.92 C246.3,106.45 245.73,105.91 246.25,104.31 Z M184.13,282.22 C185.76,281.7 186.31,282.26 185.79,283.89 C184.16,284.4 183.61,283.85 184.13,282.22 Z M667.03,301.59 C668.42,301.12 668.93,301.59 668.57,302.99 C667.16,303.45 666.64,302.99 667.03,301.59 Z M151.36,328.37 C152.98,327.83 153.55,328.37 153.06,330.01 C151.44,330.54 150.87,330 151.36,328.37 Z M664.1,439.4 C665.48,439.02 665.95,439.53 665.5,440.93 C664.1,441.32 663.63,440.81 664.1,439.4 Z M228.16,341.03 C229.78,340.53 230.32,341.09 229.78,342.73 C228.16,343.23 227.62,342.66 228.16,341.03 Z M290.302273,188.38662 C289.583047,186.297838 290.693292,184.021498 292.782074,183.302273 C294.870856,182.583047 297.147196,183.693292 297.866421,185.782074 C298.585647,187.870856 297.475401,190.147196 295.38662,190.866421 C293.297838,191.585647 291.021498,190.475401 290.302273,188.38662 Z M200.607311,467.88259 C199.719617,465.304542 201.089921,462.495004 203.667969,461.607311 C206.246017,460.719617 209.055556,462.089921 209.943249,464.667969 C210.830942,467.246017 209.460639,470.055556 206.88259,470.943249 C204.304542,471.830942 201.495004,470.460639 200.607311,467.88259 Z M285.302273,452.38662 C284.583047,450.297838 285.693292,448.021498 287.782074,447.302273 C289.870856,446.583047 292.147196,447.693292 292.866421,449.782074 C293.585647,451.870856 292.475401,454.147196 290.38662,454.866421 C288.297838,455.585647 286.021498,454.475401 285.302273,452.38662 Z M236.302273,374.38662 C235.583047,372.297838 236.693292,370.021498 238.782074,369.302273 C240.870856,368.583047 243.147196,369.693292 243.866421,371.782074 C244.585647,373.870856 243.475401,376.147196 241.38662,376.866421 C239.297838,377.585647 237.021498,376.475401 236.302273,374.38662 Z M496.08,88.34 C497.4,87.03 499.73,89.16 498.27,90.48 C496.94,91.85 494.44,89.66 496.08,88.34 Z M612,223 C609.790861,223 608,221.209139 608,219 C608,216.790861 609.790861,215 612,215 C614.209139,215 616,216.790861 616,219 C616,221.209139 614.209139,223 612,223 Z M460.85,179.63 C461.41,178.52 461.93,177.21 463.42,177.33 C463.62,178.06 464.02,179.51 464.22,180.24 C463.38,180.09 461.7,179.78 460.85,179.63 Z M658.13,119.12 C659.74,118.58 660.3,119.13 659.8,120.76 C658.17,121.3 657.61,120.75 658.13,119.12 Z M386.22,126.25 C387.84,125.73 388.39,126.29 387.87,127.91 C386.22,128.42 385.67,127.87 386.22,126.25 Z' id='f' />\n <path d='M374.02,76.32 C375.36,75.29 377.42,77.52 375.89,78.59 C374.52,79.64 372.52,77.42 374.02,76.32 Z M383.04,77.19 C384.04,75.79 386.57,77.38 385.4,78.83 C384.4,80.29 381.77,78.66 383.04,77.19 Z M679.5,109 C676.462434,109 674,106.537566 674,103.5 C674,100.462434 676.462434,98 679.5,98 C682.537566,98 685,100.462434 685,103.5 C685,106.537566 682.537566,109 679.5,109 Z M336.5,165 C332.357864,165 329,161.642136 329,157.5 C329,153.357864 332.357864,150 336.5,150 C340.642136,150 344,153.357864 344,157.5 C344,161.642136 340.642136,165 336.5,165 Z M274.302273,126.38662 C273.583047,124.297838 274.693292,122.021498 276.782074,121.302273 C278.870856,120.583047 281.147196,121.693292 281.866421,123.782074 C282.585647,125.870856 281.475401,128.147196 279.38662,128.866421 C277.297838,129.585647 275.021498,128.475401 274.302273,126.38662 Z M640,324 C637.790861,324 636,322.209139 636,320 C636,317.790861 637.790861,316 640,316 C642.209139,316 644,317.790861 644,320 C644,322.209139 642.209139,324 640,324 Z M224.5,30 C221.462434,30 219,27.5375661 219,24.5 C219,21.4624339 221.462434,19 224.5,19 C227.537566,19 230,21.4624339 230,24.5 C230,27.5375661 227.537566,30 224.5,30 Z M229.5,92 C226.462434,92 224,89.5375661 224,86.5 C224,83.4624339 226.462434,81 229.5,81 C232.537566,81 235,83.4624339 235,86.5 C235,89.5375661 232.537566,92 229.5,92 Z M126.5,338 C123.462434,338 121,335.537566 121,332.5 C121,329.462434 123.462434,327 126.5,327 C129.537566,327 132,329.462434 132,332.5 C132,335.537566 129.537566,338 126.5,338 Z M747.5,455 C744.462434,455 742,452.537566 742,449.5 C742,446.462434 744.462434,444 747.5,444 C750.537566,444 753,446.462434 753,449.5 C753,452.537566 750.537566,455 747.5,455 Z M591.23,145.53 C592.56,144.3 594.61,146.52 593.01,147.62 C591.66,148.86 589.6,146.61 591.23,145.53 Z M418.51,150.06 C419.94,148.38 422,151.11 420.45,152.36 C419.03,153.84 417.28,151.28 418.51,150.06 Z M521.38,202.06 C522.09,201.64 523.52,200.81 524.23,200.39 C524.48,201.46 524.71,202.54 524.9,203.63 C523.59,203.39 521.96,203.6 521.38,202.06 Z M548.64,209.76 C549.13,209.67 550.12,209.51 550.61,209.43 C550.6,210.47 550.59,211.52 550.59,212.56 C550.1,212.47 549.13,212.3 548.64,212.21 C548.63,211.39 548.63,210.57 548.64,209.76 Z M301.37,231.02 C302.28,231.73 304.39,232 303.54,233.58 C302.84,234.05 302.12,234.48 301.39,234.9 C301.36,233.6 301.35,232.31 301.37,231.02 Z M665.09,240.18 C666.55,239.07 668.13,241.65 666.7,242.62 C665.19,243.75 663.64,241.16 665.09,240.18 Z M550.71,259.81 C551.14,259.77 551.98,259.69 552.41,259.65 C552.78,260.07 553.53,260.91 553.91,261.32 C552.84,261.83 551.78,262.33 550.72,262.83 C550.71,261.82 550.71,260.81 550.71,259.81 Z M321.19,263.26 C321.99,262.81 322.81,262.4 323.64,262.02 C323.63,263.27 323.61,264.53 323.58,265.79 C322.54,265.15 320.98,264.8 321.19,263.26 Z M569.008573,279.10621 C570.858573,278.37621 572.028573,281.63621 569.918573,281.97621 C568.118573,282.49621 567.138573,279.61621 569.008573,279.10621 Z M319.27,301.52 C320.78,300.44 322.23,303.05 320.8,304 C319.29,305.12 317.79,302.43 319.27,301.52 Z M91.21,315.31 C92.66,314.17 94.43,316.61 92.85,317.6 C91.42,318.68 89.6,316.27 91.21,315.31 Z M320.81,323.57 C321,322.53 321.45,321.68 322.15,321.01 C323.73,320.84 323.64,322.54 324.1,323.58 C323.27,323.57 321.63,323.57 320.81,323.57 Z M550.69,323.66 C551.71,323.66 552.73,323.68 553.77,323.7 C553.54,325.43 552.47,326.49 550.74,326.7 C550.71,325.69 550.7,324.67 550.69,323.66 Z M565.73,354.14 C566.55,354.3 568.18,354.62 569,354.78 C568.19,355.73 567.42,356.79 566.12,357.07 C566.02,356.34 565.83,354.87 565.73,354.14 Z M630.48,354.54 C631.01,354.55 632.06,354.57 632.59,354.58 C632.69,355.11 632.89,356.16 632.99,356.68 C632.35,356.66 631.08,356.61 630.44,356.59 C630.45,356.07 630.47,355.05 630.48,354.54 Z M312.98,374.05 C314.16,373.97 315.57,373.36 316.49,374.47 C316.06,375.4 315.52,376.27 315.02,377.17 C314.32,376.14 313.64,375.1 312.98,374.05 Z M585.55,459.19 C586.53,457.61 589.03,459.41 587.85,460.85 C586.84,462.36 584.43,460.61 585.55,459.19 Z M360.69,101.73 C360.85,100.06 362.02,99.46 363.54,99.37 C363.6,99.94 363.71,101.09 363.77,101.66 C363,101.68 361.46,101.71 360.69,101.73 Z M464.48,105.4 C465.08,105.34 466.28,105.21 466.88,105.15 C466.8,105.73 466.63,106.91 466.55,107.5 C466.14,107.4 465.31,107.2 464.9,107.11 C464.8,106.68 464.59,105.83 464.48,105.4 Z M740.31,132.25 C741.93,132.16 741.99,134.96 740.39,135.01 C738.82,135.03 738.76,132.36 740.31,132.25 Z M563.53,136.33 C564.47,134.89 567.17,136.4 566.04,137.9 C565.05,139.27 562.47,137.82 563.53,136.33 Z M250.18,257.2 C251.17,255.66 253.61,257.41 252.48,258.84 C251.5,260.41 248.99,258.64 250.18,257.2 Z M692.89,302.91 C694.49,302.37 695.05,302.92 694.57,304.55 C692.93,305.07 692.37,304.52 692.89,302.91 Z M634.18,333.11 C636.08,332.58 636.71,335.71 634.88,336.17 C633.02,336.66 632.31,333.5 634.18,333.11 Z M264.16,347.53 C265.55,346.37 267.39,348.73 265.9,349.79 C264.5,350.98 262.62,348.56 264.16,347.53 Z M123.14,451.39 C124.5,450.16 126.47,452.47 124.96,453.58 C123.6,454.75 121.65,452.48 123.14,451.39 Z M685.35,453.17 C686.32,451.51 688.68,453.42 687.63,454.84 C686.63,456.44 684.23,454.6 685.35,453.17 Z M229.48,229.09 C230.48,227.52 232.97,229.32 231.75,230.75 C230.74,232.28 228.34,230.51 229.48,229.09 Z M463.17,172.55 C463.75,172.54 464.91,172.52 465.48,172.51 C465.44,173.44 465.4,174.37 465.36,175.3 C464.42,175.27 463.48,175.23 462.54,175.21 C462.74,174.32 462.95,173.43 463.17,172.55 Z M191.05,140.12 C192.67,139.59 193.22,140.15 192.7,141.78 C191.08,142.31 190.53,141.76 191.05,140.12 Z M255.16,143.19 C256.18,141.89 258.76,143.43 257.66,144.89 C256.62,146.19 254,144.68 255.16,143.19 Z M487.207822,171.171373 C488.847822,170.681373 489.397822,171.241373 488.847822,172.861373 C487.197822,173.341373 486.657822,172.781373 487.207822,171.171373 Z M500.61,73.63 C501.07,73.59 501.99,73.52 502.45,73.49 C502.5,74.02 502.59,75.07 502.63,75.6 C502.08,75.59 500.97,75.57 500.41,75.55 C500.46,75.07 500.56,74.11 500.61,73.63 Z M132.39,280.18 C134.02,279.65 134.57,280.2 134.06,281.84 C132.43,282.35 131.88,281.8 132.39,280.18 Z M203.08,347.1 C204.69,346.57 205.27,347.12 204.82,348.76 C203.2,349.28 202.62,348.72 203.08,347.1 Z M238.302273,270.38662 C237.583047,268.297838 238.693292,266.021498 240.782074,265.302273 C242.870856,264.583047 245.147196,265.693292 245.866421,267.782074 C246.585647,269.870856 245.475401,272.147196 243.38662,272.866421 C241.297838,273.585647 239.021498,272.475401 238.302273,270.38662 Z M277.21,433.42 C278.62,432.26 280.47,434.65 278.92,435.68 C277.51,436.82 275.65,434.44 277.21,433.42 Z M442.95,434.48 C443.84,434.42 445.62,434.28 446.5,434.21 C445.98,435.31 445.98,437.23 444.26,436.8 C443.8,436.04 443.36,435.26 442.95,434.48 Z' id='g' />\n <path d='M532,202 C528.134007,202 525,198.865993 525,195 C525,191.134007 528.134007,188 532,188 C535.865993,188 539,191.134007 539,195 C539,198.865993 535.865993,202 532,202 Z M467,101 C464.790861,101 463,99.209139 463,97 C463,94.790861 464.790861,93 467,93 C469.209139,93 471,94.790861 471,97 C471,99.209139 469.209139,101 467,101 Z M377.302273,64.3866195 C376.583047,62.2978376 377.693292,60.0214979 379.782074,59.3022726 C381.870856,58.5830473 384.147196,59.6932923 384.866421,61.7820743 C385.585647,63.8708563 384.475401,66.1471959 382.38662,66.8664212 C380.297838,67.5856465 378.021498,66.4754015 377.302273,64.3866195 Z M241.302273,134.38662 C240.583047,132.297838 241.693292,130.021498 243.782074,129.302273 C245.870856,128.583047 248.147196,129.693292 248.866421,131.782074 C249.585647,133.870856 248.475401,136.147196 246.38662,136.866421 C244.297838,137.585647 242.021498,136.475401 241.302273,134.38662 Z M210.302273,226.38662 C209.583047,224.297838 210.693292,222.021498 212.782074,221.302273 C214.870856,220.583047 217.147196,221.693292 217.866421,223.782074 C218.585647,225.870856 217.475401,228.147196 215.38662,228.866421 C213.297838,229.585647 211.021498,228.475401 210.302273,226.38662 Z M504,67 C501.790861,67 500,65.209139 500,63 C500,60.790861 501.790861,59 504,59 C506.209139,59 508,60.790861 508,63 C508,65.209139 506.209139,67 504,67 Z M646,364 C643.790861,364 642,362.209139 642,360 C642,357.790861 643.790861,356 646,356 C648.209139,356 650,357.790861 650,360 C650,362.209139 648.209139,364 646,364 Z M368.5,58 C365.462434,58 363,55.5375661 363,52.5 C363,49.4624339 365.462434,47 368.5,47 C371.537566,47 374,49.4624339 374,52.5 C374,55.5375661 371.537566,58 368.5,58 Z M682.5,242 C679.462434,242 677,239.537566 677,236.5 C677,233.462434 679.462434,231 682.5,231 C685.537566,231 688,233.462434 688,236.5 C688,239.537566 685.537566,242 682.5,242 Z M564,265 C560.134007,265 557,261.865993 557,258 C557,254.134007 560.134007,251 564,251 C567.865993,251 571,254.134007 571,258 C571,261.865993 567.865993,265 564,265 Z M564,334 C560.134007,334 557,330.865993 557,327 C557,323.134007 560.134007,320 564,320 C567.865993,320 571,323.134007 571,327 C571,330.865993 567.865993,334 564,334 Z M602.45,135 C603.87,133.34 605.66,136.09 604.49,137.37 C603.11,138.88 601.17,136.26 602.45,135 Z M418.22,144.18 C418.76,144.29 419.86,144.5 420.41,144.61 C420.53,145.15 420.77,146.24 420.89,146.79 C420.2,146.9 418.81,147.13 418.12,147.24 C418.15,146.48 418.19,144.95 418.22,144.18 Z M552.49,209.85 C552.47,208.65 553.21,205.01 554.99,207.32 C556.71,208.7 553.73,209.78 552.49,209.85 Z M295.99,229.59 C296.78,229.56 298.35,229.5 299.13,229.47 C298.93,230.58 298.51,231.59 297.87,232.5 C296.66,231.95 296.38,230.7 295.99,229.59 Z M580.008573,278.10621 C581.858573,277.37621 583.028573,280.63621 580.918573,280.97621 C579.118573,281.49621 578.138573,278.61621 580.008573,278.10621 Z M314.19,302.25 C314.75,302.31 315.87,302.44 316.42,302.5 C316.36,302.93 316.22,303.79 316.15,304.22 C315.72,304.33 314.84,304.53 314.41,304.64 C314.35,304.04 314.25,302.85 314.19,302.25 Z M65.3,317.14 C66.29,315.5 68.63,317.41 67.55,318.82 C66.54,320.43 64.16,318.56 65.3,317.14 Z M316.34,322.2 C316.91,322.27 318.05,322.41 318.62,322.48 C318.7,323.09 318.87,324.3 318.96,324.9 C318.27,324.88 316.9,324.84 316.21,324.83 C316.24,324.17 316.31,322.86 316.34,322.2 Z M570.28,356.53 C570.85,356.54 571.99,356.57 572.57,356.59 C572.65,357.28 572.83,358.66 572.92,359.36 C572.13,359.34 570.55,359.3 569.76,359.28 C569.89,358.59 570.15,357.22 570.28,356.53 Z M309.46,376.12 C310.49,376.62 311.78,376.84 312.38,377.98 C312.25,379.54 310.46,379.15 309.45,379.61 C309.44,378.44 309.44,377.28 309.46,376.12 Z M444.25,438.69 C445.27,439.21 446.83,439.31 446.97,440.76 C446.1,441.29 445.22,441.8 444.31,442.27 C444.3,441.37 444.27,439.58 444.25,438.69 Z M356.28,85.18 C357.71,83.92 359.47,86.47 357.92,87.46 C356.48,88.62 354.77,86.19 356.28,85.18 Z M574.26,124.34 C575.71,123.22 577.39,125.71 575.9,126.71 C574.44,127.82 572.73,125.32 574.26,124.34 Z M235.32,254.17 C236.8,253 238.48,255.58 236.88,256.52 C235.41,257.6 233.76,255.12 235.32,254.17 Z M106.35,279.11 C107.4,277.49 109.64,279.54 108.51,280.9 C107.45,282.53 105.22,280.47 106.35,279.11 Z M648.37,336.65 C650.34,336.02 651.21,337.17 651.26,339.14 C650.07,338.64 647.94,338.48 648.37,336.65 Z M249.52,352.54 C250.04,352.51 251.08,352.47 251.59,352.45 C251.6,352.98 251.6,354.04 251.61,354.58 C251.09,354.56 250.07,354.53 249.55,354.51 C249.54,354.02 249.53,353.03 249.52,352.54 Z M100.27,463.41 C101.23,462.18 103.45,463.73 102.48,465.03 C101.51,466.29 99.26,464.72 100.27,463.41 Z M464.06,167.62 C464.76,167.65 466.16,167.72 466.86,167.75 C466.82,168.43 466.74,169.78 466.69,170.46 C466.09,170.46 464.88,170.47 464.28,170.48 C464.22,169.76 464.12,168.33 464.06,167.62 Z M310.03,117.28 C311.64,116.74 312.2,117.29 311.72,118.92 C310.09,119.46 309.53,118.91 310.03,117.28 Z M762.29,121.15 C763.89,120.64 764.43,121.21 763.9,122.86 C762.28,123.36 761.74,122.79 762.29,121.15 Z M169.1,126.21 C170.73,125.74 171.27,126.31 170.72,127.92 C169.08,128.4 168.53,127.83 169.1,126.21 Z M316.13,261.08 C316.88,261.06 318.38,261.01 319.13,260.99 C319.11,261.74 319.08,263.23 319.06,263.98 C318.34,263.97 316.89,263.95 316.16,263.95 C316.15,263.23 316.14,261.8 316.13,261.08 Z M718.31,303.96 C719.92,303.51 720.44,304.1 719.86,305.74 C718.23,306.17 717.71,305.58 718.31,303.96 Z M274.04,438.37 C275.66,437.81 276.21,438.35 275.67,439.99 C274.03,440.54 273.49,440 274.04,438.37 Z M591.6784,469.478974 C590.751445,466.786901 592.182356,463.8531 594.874429,462.926145 C597.566501,461.99919 600.500303,463.430101 601.427258,466.122173 C602.354213,468.814246 600.923302,471.748047 598.231229,472.675002 C595.539157,473.601957 592.605355,472.171047 591.6784,469.478974 Z M707.18,466.41 C708.58,465.23 710.4,467.63 708.89,468.68 C707.48,469.8 705.63,467.42 707.18,466.41 Z M489.207822,166.141616 C490.847822,165.651616 491.397822,166.211616 490.847822,167.831616 C489.197822,168.311616 488.657822,167.751616 489.207822,166.141616 Z' id='h' />\n <path d='M585,118 C582.790861,118 581,116.209139 581,114 C581,111.790861 582.790861,110 585,110 C587.209139,110 589,111.790861 589,114 C589,116.209139 587.209139,118 585,118 Z M349.302273,76.3866195 C348.583047,74.2978376 349.693292,72.0214979 351.782074,71.3022726 C353.870856,70.5830473 356.147196,71.6932923 356.866421,73.7820743 C357.585647,75.8708563 356.475401,78.1471959 354.38662,78.8664212 C352.297838,79.5856465 350.021498,78.4754015 349.302273,76.3866195 Z M661,342 C658.790861,342 657,340.209139 657,338 C657,335.790861 658.790861,334 661,334 C663.209139,334 665,335.790861 665,338 C665,340.209139 663.209139,342 661,342 Z M40.5,326 C37.4624339,326 35,323.537566 35,320.5 C35,317.462434 37.4624339,315 40.5,315 C43.5375661,315 46,317.462434 46,320.5 C46,323.537566 43.5375661,326 40.5,326 Z M588,373 C584.134007,373 581,369.865993 581,366 C581,362.134007 584.134007,359 588,359 C591.865993,359 595,362.134007 595,366 C595,369.865993 591.865993,373 588,373 Z M729.5,487 C726.462434,487 724,484.537566 724,481.5 C724,478.462434 726.462434,476 729.5,476 C732.537566,476 735,478.462434 735,481.5 C735,484.537566 732.537566,487 729.5,487 Z M295.5,95.95 C297.09,95.36 297.64,95.89 297.14,97.57 C295.55,98.14 295,97.6 295.5,95.95 Z M614.21,124.45 C615.74,123.22 617.11,125.94 615.64,126.86 C614.09,128.18 612.73,125.35 614.21,124.45 Z M491.64,161.92 C493.12,162.26 494.18,163.23 494.94,164.52 C493.78,164.64 492.62,164.75 491.47,164.86 C491.52,164.13 491.6,162.65 491.64,161.92 Z M562.36,200.66 C564.42,200.6 564.03,204.94 562.06,203.83 C560.34,204.02 561.09,200.13 562.36,200.66 Z M291.56,227.23 C292.45,227.25 293.36,227.28 294.26,227.31 C294.27,227.9 294.28,229.08 294.28,229.67 C293.37,229.7 292.46,229.73 291.56,229.75 C291.56,229.12 291.56,227.86 291.56,227.23 Z M311.56,259.27 C312.57,259.78 313.58,260.3 314.51,260.97 C314.24,262.59 312.65,262.46 311.45,262.76 C311.47,261.59 311.51,260.43 311.56,259.27 Z M311.53,323.18 C312.59,323.68 313.67,324.15 314.57,324.93 C314.24,326.41 312.59,326.28 311.52,326.76 C311.5,325.56 311.51,324.37 311.53,323.18 Z M147.24,112.59 C148.87,112.01 149.46,112.52 149.03,114.12 C147.39,114.72 146.79,114.2 147.24,112.59 Z M541.04,184.49 C542.65,183.93 543.18,184.48 542.64,186.12 C541,186.67 540.47,186.13 541.04,184.49 Z M81.04,278.19 C82.65,277.64 83.21,278.18 82.74,279.82 C81.13,280.38 80.56,279.84 81.04,278.19 Z M744.09,305.04 C745.73,304.5 746.3,305.04 745.79,306.65 C744.14,307.18 743.57,306.65 744.09,305.04 Z M234.6,358.9 C235.15,358.62 236.25,358.07 236.8,357.79 C238.65,359.31 234.74,361.25 234.6,358.9 Z M306.05,379.16 C307.82,378.67 308.94,381.72 306.96,382.14 C305.12,382.7 304.13,379.6 306.05,379.16 Z M265.42,444.14 C266.41,442.78 269.16,444.2 267.89,445.72 C266.9,447.02 264.2,445.63 265.42,444.14 Z M74.9278687,478.454674 C73.8631362,475.362467 75.5067295,471.992601 78.5989371,470.927869 C81.6911447,469.863136 85.0610105,471.50673 86.1257429,474.598937 C87.1904754,477.691145 85.5468821,481.06101 82.4546745,482.125743 C79.3624669,483.190475 75.9926011,481.546882 74.9278687,478.454674 Z M470,165 C466.134007,165 463,161.865993 463,158 C463,154.134007 466.134007,151 470,151 C473.865993,151 477,154.134007 477,158 C477,161.865993 473.865993,165 470,165 Z M417.06,140.64 C419.073333,139.266667 420.16,139.376667 420.32,140.97 C419.786667,143.27 418.7,143.16 417.06,140.64 Z M645.57,148.07 C646.73,147.16 647.39,147.4 647.56,148.82 C646.39,149.73 645.72,149.48 645.57,148.07 Z M307.08,303.07 C307.63,303.06 308.74,303.02 309.29,303 C309.29,303.95 309.3,304.9 309.32,305.86 C308.74,305.82 307.58,305.74 307,305.7 C307.02,304.82 307.05,303.94 307.08,303.07 Z M220.22,251.02 C221.75,249.71 223.18,252.5 221.69,253.43 C220.17,254.68 218.83,251.96 220.22,251.02 Z M785.25,109.19 C786.87,108.62 787.45,109.16 786.98,110.79 C785.35,111.35 784.77,110.81 785.25,109.19 Z' id='i' />\n <path d='M807,106 C803.686292,106 801,103.313708 801,100 C801,96.6862915 803.686292,94 807,94 C810.313708,94 813,96.6862915 813,100 C813,103.313708 810.313708,106 807,106 Z M299.5,335 C295.357864,335 292,331.642136 292,327.5 C292,323.357864 295.357864,320 299.5,320 C303.642136,320 307,323.357864 307,327.5 C307,331.642136 303.642136,335 299.5,335 Z M575,199 C571.134007,199 568,195.865993 568,192 C568,188.134007 571.134007,185 575,185 C578.865993,185 582,188.134007 582,192 C582,195.865993 578.865993,199 575,199 Z M626,120 C623.790861,120 622,118.209139 622,116 C622,113.790861 623.790861,112 626,112 C628.209139,112 630,113.790861 630,116 C630,118.209139 628.209139,120 626,120 Z M417.06,136.63 C417.71,134.99 417.73,133.61 419.71,134.25 C420.73,137.14 419.07,136.73 417.06,136.63 Z M493.66,159.53 C493.19,158.51 494.72,157.65 495.01,156.73 C495.45,157.79 497.09,158.83 496.1,160.06 C495.6,161.25 493.75,160.77 493.66,159.53 Z M559.43,166.92 C561.04,166.34 561.6,166.87 561.12,168.52 C559.52,169.08 558.95,168.54 559.43,166.92 Z M287.27,224.56 C287.78,224.61 288.81,224.7 289.32,224.74 C289.37,225.76 289.42,226.78 289.47,227.81 C288.85,227.76 287.61,227.67 286.98,227.63 C286.85,226.61 286.94,225.58 287.27,224.56 Z M306,261.21 C305.85,259.74 306.3,258.21 308.02,258.23 C308.7,258.9 309.31,259.65 309.93,260.38 C308.62,260.69 307.31,260.96 306,261.21 Z M299.76,303.07 C300.31,303.06 301.42,303.02 301.97,303 C301.97,303.95 301.98,304.9 302,305.86 C301.42,305.82 300.26,305.74 299.68,305.7 C299.7,304.82 299.73,303.94 299.76,303.07 Z M300.29,384 C300.94,382.57 302.67,382.77 303.93,382.37 C303.75,383.36 303.51,384.35 303.21,385.32 C302.02,385.81 300.63,385.29 300.29,384 Z M126.16,98.39 C127.57,98.58 127.81,99.25 126.88,100.4 C125.47,100.21 125.24,99.54 126.16,98.39 Z M769.94,305.94 C771.53,305.47 772.05,306.05 771.5,307.7 C769.87,308.16 769.35,307.57 769.94,305.94 Z M55.19,276.95 C56.86,276.48 57.4,277.05 56.83,278.65 C55.18,279.11 54.63,278.54 55.19,276.95 Z M234.6,358.9 C231.95,357.92 236.76,355.16 236.8,357.79 C236.25,358.07 235.15,358.62 234.6,358.9 Z M200.302273,250.38662 C199.583047,248.297838 200.693292,246.021498 202.782074,245.302273 C204.870856,244.583047 207.147196,245.693292 207.866421,247.782074 C208.585647,249.870856 207.475401,252.147196 205.38662,252.866421 C203.297838,253.585647 201.021498,252.475401 200.302273,250.38662 Z M251.302273,456.38662 C250.583047,454.297838 251.693292,452.021498 253.782074,451.302273 C255.870856,450.583047 258.147196,451.693292 258.866421,453.782074 C259.585647,455.870856 258.475401,458.147196 256.38662,458.866421 C254.297838,459.585647 252.021498,458.475401 251.302273,456.38662 Z M478.23,116.13 C479.84,115.56 480.41,116.1 479.95,117.74 C478.33,118.31 477.76,117.77 478.23,116.13 Z' id='j' />\n <path d='M295.5,264 C291.357864,264 288,260.642136 288,256.5 C288,252.357864 291.357864,249 295.5,249 C299.642136,249 303,252.357864 303,256.5 C303,260.642136 299.642136,264 295.5,264 Z M274.5,228 C270.357864,228 267,224.642136 267,220.5 C267,216.357864 270.357864,213 274.5,213 C278.642136,213 282,216.357864 282,220.5 C282,224.642136 278.642136,228 274.5,228 Z M289.5,400 C285.357864,400 282,396.642136 282,392.5 C282,388.357864 285.357864,385 289.5,385 C293.642136,385 297,388.357864 297,392.5 C297,396.642136 293.642136,400 289.5,400 Z M795.5,310 C792.462434,310 790,307.537566 790,304.5 C790,301.462434 792.462434,299 795.5,299 C798.537566,299 801,301.462434 801,304.5 C801,307.537566 798.537566,310 795.5,310 Z M416.6,129.29 C417.52,129.29 418.45,129.28 419.39,129.29 C419.4,129.91 419.41,131.17 419.42,131.8 C418.46,131.79 417.5,131.78 416.55,131.77 C416.57,131.15 416.59,129.91 416.6,129.29 Z M293.08,304.07 C293.63,304.06 294.74,304.02 295.29,304 C295.29,304.95 295.3,305.9 295.32,306.86 C294.74,306.82 293.58,306.74 293,306.7 C293.02,305.82 293.05,304.94 293.08,304.07 Z M103.95,84.5 C105.25,83.56 106.8,85.77 105.56,86.73 C104.24,87.71 102.67,85.46 103.95,84.5 Z M29.24,275.43 C30.66,274.27 32.51,276.64 30.96,277.68 C29.57,278.77 27.64,276.44 29.24,275.43 Z M578.12,149.09 C579.75,148.58 580.29,149.13 579.76,150.76 C578.12,151.27 577.57,150.71 578.12,149.09 Z M624.49,161.96 C625.89,161.48 626.38,161.95 625.96,163.37 C624.56,163.83 624.07,163.36 624.49,161.96 Z M217.302273,365.38662 C216.583047,363.297838 217.693292,361.021498 219.782074,360.302273 C221.870856,359.583047 224.147196,360.693292 224.866421,362.782074 C225.585647,364.870856 224.475401,367.147196 222.38662,367.866421 C220.297838,368.585647 218.021498,367.475401 217.302273,365.38662 Z M495.1,153.58 C496.21,153.45 497.33,153.33 498.45,153.22 C498.44,153.95 498.43,155.41 498.42,156.14 C496.85,155.91 495.79,154.94 495.1,153.58 Z' id='k' />\n <path d='M418.5,125 C414.357864,125 411,121.642136 411,117.5 C411,113.357864 414.357864,110 418.5,110 C422.642136,110 426,113.357864 426,117.5 C426,121.642136 422.642136,125 418.5,125 Z M5.5,282 C2.46243388,282 0,279.537566 0,276.5 C0,273.462434 2.46243388,271 5.5,271 C8.53756612,271 11,273.462434 11,276.5 C11,279.537566 8.53756612,282 5.5,282 Z M243.44,240.13 C244.6,239.21 245.26,239.46 245.44,240.87 C244.27,241.78 243.6,241.54 243.44,240.13 Z M287.87,304.43 C288.68,304.44 290.3,304.46 291.12,304.47 C290.86,305.4 290.46,306.24 289.92,307.02 C288.23,307.29 288.26,305.57 287.87,304.43 Z M597,131.15 C598.64,130.64 599.2,131.18 598.67,132.79 C597.02,133.31 596.46,132.76 597,131.15 Z M497.67,148.52 C498.61,148.49 499.56,148.47 500.51,148.44 C500.48,149.39 500.46,150.34 500.45,151.29 C499.57,151.24 498.69,151.21 497.82,151.17 C497.76,150.28 497.71,149.4 497.67,148.52 Z M258.29,210.15 C259.92,209.65 260.46,210.22 259.92,211.85 C258.28,212.33 257.74,211.76 258.29,210.15 Z' id='l' />\n <path d='M506,147 C502.134007,147 499,143.865993 499,140 C499,136.134007 502.134007,133 506,133 C509.865993,133 513,136.134007 513,140 C513,143.865993 509.865993,147 506,147 Z M615.25,113.39 C615.85,113.43 617.04,113.53 617.64,113.58 C617.49,113.95 617.19,114.69 617.04,115.06 C616.66,115.23 615.9,115.57 615.52,115.74 C615.45,115.15 615.32,113.97 615.25,113.39 Z M218.47,232.19 C219.5,230.58 221.82,232.51 220.7,233.92 C219.67,235.53 217.36,233.57 218.47,232.19 Z M283.39,304.29 C283.87,304.37 284.83,304.52 285.31,304.59 C285.42,305.16 285.64,306.29 285.76,306.85 C285.07,306.94 283.71,307.11 283.03,307.19 C283.12,306.47 283.3,305.02 283.39,304.29 Z M413.13,88.01 C414.76,87.49 415.31,88.04 414.79,89.67 C413.16,90.19 412.61,89.64 413.13,88.01 Z M667.09,133.21 C668.73,132.69 669.29,133.23 668.78,134.85 C667.13,135.37 666.56,134.82 667.09,133.21 Z M212.22,187.34 C213.83,186.79 214.39,187.33 213.89,188.97 C212.26,189.52 211.7,188.97 212.22,187.34 Z' id='m' />\n <path d='M688.79,119.1 C690.34,118.54 690.88,119.11 690.41,120.79 C688.84,121.36 688.3,120.79 688.79,119.1 Z M277.69,305.27 C278.63,305.24 279.58,305.22 280.54,305.2 C280.53,305.84 280.51,307.14 280.5,307.78 C279.56,307.76 278.63,307.73 277.7,307.71 C277.7,307.1 277.69,305.88 277.69,305.27 Z M189.22,175.99 C190.86,175.47 191.43,176.02 190.92,177.64 C189.29,178.15 188.72,177.6 189.22,175.99 Z M194.1,225.21 C195.75,224.74 196.3,225.3 195.74,226.9 C194.07,227.37 193.53,226.8 194.1,225.21 Z M635.5,103 C632.462434,103 630,100.537566 630,97.5 C630,94.4624339 632.462434,92 635.5,92 C638.537566,92 641,94.4624339 641,97.5 C641,100.537566 638.537566,103 635.5,103 Z M525.94,93.41 C527.31,92.4 528.61,94.77 527.41,95.68 C526.04,96.72 524.66,94.31 525.94,93.41 Z' id='n' />\n <path d='M548.24,47.43 C549.63,46.23 551.56,48.57 550,49.63 C548.62,50.71 546.63,48.45 548.24,47.43 Z M711.5,110 C708.462434,110 706,107.537566 706,104.5 C706,101.462434 708.462434,99 711.5,99 C714.537566,99 717,101.462434 717,104.5 C717,107.537566 714.537566,110 711.5,110 Z M163.90392,221.868111 C162.918775,219.00704 164.439512,215.889066 167.300583,214.90392 C170.161654,213.918775 173.279628,215.439512 174.264774,218.300583 C175.249919,221.161654 173.729182,224.279628 170.868111,225.264774 C168.00704,226.249919 164.889066,224.729182 163.90392,221.868111 Z M166.2,164.27 C167.66,163.13 169.43,165.62 167.81,166.57 C166.37,167.65 164.61,165.23 166.2,164.27 Z M268.27,305.44 C268.74,305.56 269.69,305.81 270.16,305.93 C270.2,306.85 270.25,307.78 270.3,308.71 C270,308.72 269.41,308.75 269.11,308.76 C266.52,309.62 267.92,306.51 268.27,305.44 Z' id='o' />\n <path d='M559.62,25.01 C560.42,23.81 562.57,25.14 561.52,26.34 C560.69,27.48 558.64,26.2 559.62,25.01 Z M257.5,316 C253.357864,316 250,312.642136 250,308.5 C250,304.357864 253.357864,301 257.5,301 C261.642136,301 265,304.357864 265,308.5 C265,312.642136 261.642136,316 257.5,316 Z M142.5,160 C139.462434,160 137,157.537566 137,154.5 C137,151.462434 139.462434,149 142.5,149 C145.537566,149 148,151.462434 148,154.5 C148,157.537566 145.537566,160 142.5,160 Z' id='p' />\n <circle id='q' cx='569.5' cy='5.5' r='5.5' />\n </g>\n </g>\n </svg>\n </Container>\n )\n }" ]
[ "0.681207", "0.6802218", "0.6594786", "0.6592946", "0.65826154", "0.65720546", "0.65580416", "0.6555005", "0.64601684", "0.6428496", "0.6428496", "0.6428496", "0.6428496", "0.6428496", "0.6428496", "0.64047587", "0.62305236", "0.622013", "0.6213995", "0.6213662", "0.6190503", "0.61781245", "0.61777484", "0.61342835", "0.6125433", "0.6123978", "0.6106772", "0.60995597", "0.6093042", "0.6088755", "0.6088755", "0.6088755", "0.6088755", "0.6088755", "0.6088755", "0.6075611", "0.60738045", "0.6068022", "0.6067093", "0.6040307", "0.60377795", "0.60210377", "0.6016307", "0.60149705", "0.5992454", "0.5990702", "0.5977372", "0.5976459", "0.59709495", "0.597077", "0.5964819", "0.59613186", "0.59562314", "0.5936848", "0.5933395", "0.59329116", "0.59252524", "0.5924019", "0.59229267", "0.590294", "0.5896629", "0.58888984", "0.588178", "0.5871489", "0.5870658", "0.5868851", "0.5866541", "0.58635134", "0.5859691", "0.5857564", "0.58563644", "0.5847837", "0.5845781", "0.5841322", "0.58396626", "0.5835648", "0.5829428", "0.58282727", "0.5826886", "0.5826886", "0.5826886", "0.5826439", "0.582519", "0.5814756", "0.58092", "0.57896197", "0.5779589", "0.5777115", "0.57673097", "0.57583964", "0.5757916", "0.5754598", "0.5738075", "0.57327586", "0.5720845", "0.5710096", "0.569745", "0.5696736", "0.56910866", "0.5690682", "0.5688812" ]
0.0
-1
The `wrapper` function encapsulates all of the throttling / debouncing functionality and when executed will limit the rate at which `callback` is executed.
function wrapper() { var that = this, elapsed = +new Date() - last_exec, args = arguments; // Execute `callback` and update the `last_exec` timestamp. function exec() { last_exec = +new Date(); callback.apply( that, args ); }; // If `debounce_mode` is true (at_begin) this is used to clear the flag // to allow future `callback` executions. function clear() { timeout_id = undefined; }; if ( debounce_mode && !timeout_id ) { // Since `wrapper` is being called for the first time and // `debounce_mode` is true (at_begin), execute `callback`. exec(); } // Clear any existing timeout. timeout_id && clearTimeout( timeout_id ); if ( debounce_mode === undefined && elapsed > delay ) { // In throttle mode, if `delay` time has been exceeded, execute // `callback`. exec(); } else if ( no_trailing !== true ) { // In trailing throttle mode, since `delay` time has not been // exceeded, schedule `callback` to execute `delay` ms after most // recent execution. // // If `debounce_mode` is true (at_begin), schedule `clear` to execute // after `delay` ms. // // If `debounce_mode` is false (at end), schedule `callback` to // execute after `delay` ms. timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrapper () {\n\t\n\t\t\tvar self = this;\n\t\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\t\tvar args = arguments;\n\t\n\t\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\t\tfunction exec () {\n\t\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}\n\t\n\t\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t\t// to allow future `callback` executions.\n\t\t\tfunction clear () {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}\n\t\n\t\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\t\texec();\n\t\t\t}\n\t\n\t\t\t// Clear any existing timeout.\n\t\t\tif ( timeoutID ) {\n\t\t\t\tclearTimeout(timeoutID);\n\t\t\t}\n\t\n\t\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t\t// `callback`.\n\t\t\t\texec();\n\t\n\t\t\t} else if ( noTrailing !== true ) {\n\t\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t\t// recent execution.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t\t// after `delay` ms.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t\t// execute after `delay` ms.\n\t\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t\t}\n\t\n\t\t}", "function wrapper () {\n\n\t\t\tvar self = this;\n\t\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\t\tvar args = arguments;\n\n\t\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\t\tfunction exec () {\n\t\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}\n\n\t\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t\t// to allow future `callback` executions.\n\t\t\tfunction clear () {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}\n\n\t\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\t\texec();\n\t\t\t}\n\n\t\t\t// Clear any existing timeout.\n\t\t\tif ( timeoutID ) {\n\t\t\t\tclearTimeout(timeoutID);\n\t\t\t}\n\n\t\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t\t// `callback`.\n\t\t\t\texec();\n\n\t\t\t} else if ( noTrailing !== true ) {\n\t\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t\t// recent execution.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t\t// after `delay` ms.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t\t// execute after `delay` ms.\n\t\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t\t}\n\n\t\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper(){var self=this;var elapsed=Number(new Date())-lastExec;var args=arguments;// Execute `callback` and update the `lastExec` timestamp.\n\tfunction exec(){lastExec=Number(new Date());callback.apply(self,args);}// If `debounceMode` is true (at begin) this is used to clear the flag\n\t// to allow future `callback` executions.\n\tfunction clear(){timeoutID=undefined;}if(debounceMode&&!timeoutID){// Since `wrapper` is being called for the first time and\n\t// `debounceMode` is true (at begin), execute `callback`.\n\texec();}// Clear any existing timeout.\n\tif(timeoutID){clearTimeout(timeoutID);}if(debounceMode===undefined&&elapsed>delay){// In throttle mode, if `delay` time has been exceeded, execute\n\t// `callback`.\n\texec();}else if(noTrailing!==true){// In trailing throttle mode, since `delay` time has not been\n\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t// recent execution.\n\t//\n\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t// after `delay` ms.\n\t//\n\t// If `debounceMode` is false (at end), schedule `callback` to\n\t// execute after `delay` ms.\n\ttimeoutID=setTimeout(debounceMode?clear:exec,debounceMode===undefined?delay-elapsed:delay);}}// Return the wrapper function.", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t/*\n\t\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t * to allow future `callback` executions.\n\t\t */\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t/*\n\t\t\t * Since `wrapper` is being called for the first time and\n\t\t\t * `debounceMode` is true (at begin), execute `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t/*\n\t\t\t * In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t * `callback`.\n\t\t\t */\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t/*\n\t\t\t * In trailing throttle mode, since `delay` time has not been\n\t\t\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t * recent execution.\n\t\t\t *\n\t\t\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t * after `delay` ms.\n\t\t\t *\n\t\t\t * If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t * execute after `delay` ms.\n\t\t\t */\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper(){var self=this;var elapsed=Number(new Date())-lastExec;var args=arguments;// Execute `callback` and update the `lastExec` timestamp.\nfunction exec(){lastExec=Number(new Date());callback.apply(self,args);}// If `debounceMode` is true (at begin) this is used to clear the flag\n// to allow future `callback` executions.\nfunction clear(){timeoutID=undefined;}if(debounceMode&&!timeoutID){// Since `wrapper` is being called for the first time and\n// `debounceMode` is true (at begin), execute `callback`.\nexec();}// Clear any existing timeout.\nif(timeoutID){clearTimeout(timeoutID);}if(debounceMode===undefined&&elapsed>delay){// In throttle mode, if `delay` time has been exceeded, execute\n// `callback`.\nexec();}else if(noTrailing!==true){// In trailing throttle mode, since `delay` time has not been\n// exceeded, schedule `callback` to execute `delay` ms after most\n// recent execution.\n//\n// If `debounceMode` is true (at begin), schedule `clear` to execute\n// after `delay` ms.\n//\n// If `debounceMode` is false (at end), schedule `callback` to\n// execute after `delay` ms.\ntimeoutID=setTimeout(debounceMode?clear:exec,debounceMode===undefined?delay-elapsed:delay);}}// Return the wrapper function.", "function wrapper() {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\t}", "function wrapper() {\n var self = this;\n var elapsed = Number(new Date()) - lastExec;\n var args = arguments; // Execute `callback` and update the `lastExec` timestamp.\n\n function exec() {\n lastExec = Number(new Date());\n callback.apply(self, args);\n } // If `debounceMode` is true (at begin) this is used to clear the flag\n // to allow future `callback` executions.\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n // Since `wrapper` is being called for the first time and\n // `debounceMode` is true (at begin), execute `callback`.\n exec();\n } // Clear any existing timeout.\n\n\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n\n if (debounceMode === undefined && elapsed > delay) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n } else if (noTrailing !== true) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n //\n // If `debounceMode` is true (at begin), schedule `clear` to execute\n // after `delay` ms.\n //\n // If `debounceMode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n } // Return the wrapper function.", "function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (!noLeading && debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`\n * and noLeading != true.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n if (noLeading) {\n /*\n * In throttle mode with noLeading, if `delay` time has\n * been exceeded, update `lastExec` and schedule `callback`\n * to execute after `delay` ms.\n */\n lastExec = Date.now();\n\n if (!noTrailing) {\n timeoutID = setTimeout(debounceMode ? clear : exec, delay);\n }\n } else {\n /*\n * In throttle mode without noLeading, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n }\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function throttle (callback, limit) {\n var wait = false; // Initially, we're not waiting\n return function () { // We return a throttled function\n if (!wait) { // If we're not waiting\n callback.call(); // Execute users function\n wait = true; // Prevent future invocations\n setTimeout(function () { // After a period of time\n wait = false; // And allow future invocations\n }, limit);\n }\n }\n }", "function throttle (callback, limit) {\n\t\tvar wait = false; // Initially, we're not waiting\n\t\treturn function () { // We return a throttled function\n\t\t\tif (!wait) { // If we're not waiting\n\t\t\t\tcallback.call(); // Execute users function\n\t\t\t\twait = true; // Prevent future invocations\n\t\t\t\tsetTimeout(function () { // After a period of time\n\t\t\t\t\twait = false; // And allow future invocations\n\t\t\t\t}, limit);\n\t\t\t}\n\t\t}\n\t}", "function wrapper() {\n\t for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n\t arguments_[_key] = arguments[_key];\n\t }\n\n\t var self = this;\n\t var elapsed = Date.now() - lastExec;\n\n\t if (cancelled) {\n\t return;\n\t } // Execute `callback` and update the `lastExec` timestamp.\n\n\n\t function exec() {\n\t lastExec = Date.now();\n\t callback.apply(self, arguments_);\n\t }\n\t /*\n\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t * to allow future `callback` executions.\n\t */\n\n\n\t function clear() {\n\t timeoutID = undefined;\n\t }\n\n\t if (debounceMode && !timeoutID) {\n\t /*\n\t * Since `wrapper` is being called for the first time and\n\t * `debounceMode` is true (at begin), execute `callback`.\n\t */\n\t exec();\n\t }\n\n\t clearExistingTimeout();\n\n\t if (debounceMode === undefined && elapsed > delay) {\n\t /*\n\t * In throttle mode, if `delay` time has been exceeded, execute\n\t * `callback`.\n\t */\n\t exec();\n\t } else if (noTrailing !== true) {\n\t /*\n\t * In trailing throttle mode, since `delay` time has not been\n\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t * recent execution.\n\t *\n\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t * after `delay` ms.\n\t *\n\t * If `debounceMode` is false (at end), schedule `callback` to\n\t * execute after `delay` ms.\n\t */\n\t timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t }\n\t }", "_throttle (callback, limit) {\n let inThrottle = false;\n return function() {\n const args = arguments;\n const context = this;\n if (!inThrottle) {\n callback.apply(context, args);\n inThrottle = true;\n setTimeout(() => inThrottle = false, limit);\n }\n }\n }", "function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n\t var self = this;\n\t var elapsed = Date.now() - lastExec;\n\t var args = arguments;\n\t\n\t if (cancelled) {\n\t return;\n\t } // Execute `callback` and update the `lastExec` timestamp.\n\t\n\t\n\t function exec() {\n\t lastExec = Date.now();\n\t callback.apply(self, args);\n\t }\n\t /*\n\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t * to allow future `callback` executions.\n\t */\n\t\n\t\n\t function clear() {\n\t timeoutID = undefined;\n\t }\n\t\n\t if (debounceMode && !timeoutID) {\n\t /*\n\t * Since `wrapper` is being called for the first time and\n\t * `debounceMode` is true (at begin), execute `callback`.\n\t */\n\t exec();\n\t }\n\t\n\t clearExistingTimeout();\n\t\n\t if (debounceMode === undefined && elapsed > delay) {\n\t /*\n\t * In throttle mode, if `delay` time has been exceeded, execute\n\t * `callback`.\n\t */\n\t exec();\n\t } else if (noTrailing !== true) {\n\t /*\n\t * In trailing throttle mode, since `delay` time has not been\n\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t * recent execution.\n\t *\n\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t * after `delay` ms.\n\t *\n\t * If `debounceMode` is false (at end), schedule `callback` to\n\t * execute after `delay` ms.\n\t */\n\t timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t }\n\t }", "function wrapper() {\n const self = this;\n const elapsed = Date.now() - lastExec;\n const args = arguments;\n\n if ( cancelled ) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n function exec() {\n lastExec = Date.now();\n callback.apply( self, args );\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n function clear() {\n timeoutID = undefined;\n }\n\n if ( debounceMode && ! timeoutID ) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if ( debounceMode === undefined && elapsed > delay ) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if ( noTrailing !== true ) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout( debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay );\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function throttle(delay, callback) {\n let timeout;\n let lastExec = 0;\n return function (...args) {\n const self = this;\n const elapsed = performance.now() - lastExec;\n function exec() {\n timeout = undefined;\n lastExec = performance.now();\n callback.apply(self, args);\n }\n if (timeout)\n clearTimeout(timeout);\n if (elapsed > delay)\n exec();\n else\n timeout = setTimeout(exec, delay - elapsed);\n };\n }", "function throttle(delay, callback) {\n let timeout;\n let lastExec = 0;\n return function (...args) {\n const self = this;\n const elapsed = performance.now() - lastExec;\n function exec() {\n timeout = undefined;\n lastExec = performance.now();\n callback.apply(self, args);\n }\n if (timeout)\n clearTimeout(timeout);\n if (elapsed > delay)\n exec();\n else\n timeout = setTimeout(exec, delay - elapsed);\n };\n }", "_throttler(callback) {\n // setTimeout doesn't complete while user scrolls on touchscreen (or trackpad) on Chrome, so we track the time of the last\n // request and allow the request to refire if it was too long ago\n if (!this.properties.throttler.timeout ||\n Date.now() - this.properties.throttler.lastCall > this._throttlerTimeout) {\n\n clearTimeout(this.properties.throttler.timeout);\n this.properties.throttler.lastCall = Date.now();\n this.properties.throttler.callWaiting = false;\n\n callback();\n\n this.properties.throttler.timeout = setTimeout(() => {\n this.properties.throttler.timeout = null;\n if (this.properties.throttler.callWaiting) {\n callback();\n this.properties.throttler.lastCall = Date.now();\n this.properties.throttler.callWaiting = false;\n }\n }, this._throttlerTimeout);\n } else {\n this.properties.throttler.callWaiting = true;\n }\n }", "function throttle (callback, delay) {\n var previousCall = new Date().getTime();\n return function () {\n var time = new Date().getTime();\n\n if (time - previousCall >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if (time - previousCall >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n let previousCall = new Date().getTime();\n return function () {\n let time = new Date().getTime();\n\n if (time - previousCall >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function throttle(callback, delay) {\n\n var previousCall = new Date().getTime();\n return function() {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n }", "function callbackWrapper() {\n var diff = startTime + timeout - Date.now();\n\n if (diff > 0) {\n var newTimeout = self.cronTime.getTimeout();\n\n if (newTimeout > diff) {\n newTimeout = diff;\n }\n\n remaining += newTimeout;\n } // If there is sleep time remaining, calculate how long and go to sleep\n // again. This processing might make us miss the deadline by a few ms\n // times the number of sleep sessions. Given a MAXDELAY of almost a\n // month, this should be no issue.\n\n\n self.lastExecution = new Date();\n\n if (remaining) {\n if (remaining > MAXDELAY) {\n remaining -= MAXDELAY;\n timeout = MAXDELAY;\n } else {\n timeout = remaining;\n remaining = 0;\n }\n\n _setTimeout(timeout);\n } else {\n // We have arrived at the correct point in time.\n self.running = false; // start before calling back so the callbacks have the ability to stop the cron job\n\n if (!self.runOnce) self.start();\n self.fireOnTick();\n }\n }", "function throttle(callback, wait, context = this) {\n let timeout = null;\n let callbackArgs = null;\n\n const later = () => {\n callback.apply(context, callbackArgs);\n timeout = null;\n };\n\n return (...args) => {\n if (!timeout) {\n callbackArgs = args;\n timeout = setTimeout(later, wait);\n }\n };\n }", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function () {\n var time = new Date().getTime();\n\n if (time - previousCall >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n}", "function throttle(callback, delay) {\n var previousCall = new Date().getTime();\n return function () {\n var time = new Date().getTime();\n\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback.apply(null, arguments);\n }\n };\n}", "function queue(wrapper, callback) {\n\tcallback();\n}", "function callbackWrapper() {\n\t\t\tconst diff = startTime + timeout - Date.now();\n\n\t\t\tif (diff > 0) {\n\t\t\t\tlet newTimeout = self.cronTime.getTimeout();\n\n\t\t\t\tif (newTimeout > diff) {\n\t\t\t\t\tnewTimeout = diff;\n\t\t\t\t}\n\n\t\t\t\tremaining += newTimeout;\n\t\t\t}\n\n\t\t\t// If there is sleep time remaining, calculate how long and go to sleep\n\t\t\t// again. This processing might make us miss the deadline by a few ms\n\t\t\t// times the number of sleep sessions. Given a MAXDELAY of almost a\n\t\t\t// month, this should be no issue.\n\t\t\tself.lastExecution = new Date();\n\t\t\tif (remaining) {\n\t\t\t\tif (remaining > MAXDELAY) {\n\t\t\t\t\tremaining -= MAXDELAY;\n\t\t\t\t\ttimeout = MAXDELAY;\n\t\t\t\t} else {\n\t\t\t\t\ttimeout = remaining;\n\t\t\t\t\tremaining = 0;\n\t\t\t\t}\n\n\t\t\t\t_setTimeout(timeout);\n\t\t\t} else {\n\t\t\t\t// We have arrived at the correct point in time.\n\n\t\t\t\tself.running = false;\n\n\t\t\t\t// start before calling back so the callbacks have the ability to stop the cron job\n\t\t\t\tif (!self.runOnce) {\n\t\t\t\t\tself.start();\n\t\t\t\t}\n\n\t\t\t\tself.fireOnTick();\n\t\t\t}\n\t\t}", "throttle (callback, wait) {\n var time,\n go = true;\n return function() {\n if(go) {\n go = false;\n time = setTimeout(function(){\n time = null;\n go = true;\n callback.call();\n }, wait);\n }\n }\n }", "function throttle(callback, delay) {\n let previousCall = new Date().getTime();\n return (...args) => {\n const time = new Date().getTime();\n if ((time - previousCall) >= delay) {\n previousCall = time;\n callback(...args);\n }\n };\n}", "function throttle(callback, delay) {\n var last;\n var timer;\n return function () {\n var context = this;\n var now = +new Date();\n var args = arguments;\n if (last && now < last + delay) {\n // le délai n'est pas écoulé on reset le timer\n clearTimeout(timer);\n timer = setTimeout(function () {\n last = now;\n callback.apply(context, args);\n }, delay);\n } else {\n last = now;\n callback.apply(context, args);\n }\n };\n }", "function Throttle(timeout, callback) {\n this.timeout = timeout;\n this.callback = callback;\n this.waiting = 0;\n this.saturated = 0;\n\n var self = this;\n this.comeback = function() {\n self.waiting = 0;\n if (self.saturated > 0) self.activate();\n self.saturated = 0;\n }\n this.activate = function() {\n if (self.waiting > 0) {\n self.saturated = 1;\n return;\n }\n self.waiting = setTimeout(self.comeback, self.timeout);\n self.callback();\n }\n }", "function _throttle(fn) {\n\t\tvar prev = Date.now();\n\t\treturn function (e) {\n\t\t\tif((Date.now() - prev) < THROTTLE_THRESHOLD) return;\n\t\t\tfn.call(this, e);\n\t\t\tprev = Date.now();\n\t\t};\n\t}", "function makeThrottledFunction(callback,interval){\n var queue = [];\n var isAsleep = true;\n\n function invokeFromQueue(){\n if(queue.length){\n isAsleep = false;\n callback.apply(null,queue.shift());\n setTimeout(invokeFromQueue,interval);\n } else {\n isAsleep = true;\n }\n }\n\n return function(){\n var args = Array.prototype.slice.call(arguments);\n queue.push(args);\n if(isAsleep){\n invokeFromQueue();\n }\n };\n}", "function callback() {\n\t\t\tvar t = that,\n\t\t\t p = params,\n\t\t\t run = false,\n\t\t\t resched = (counter !== 1); // equiv to > 1\n\t\t\tif (flags.debounce) {\n\t\t\t\t// Debounce executes at end of last interval, last interval is\n\t\t\t\t// when there were no additional calls during the interval.\n\t\t\t\t// (Except in atStart mode, since the call was already made)\n\t\t\t\trun = !resched && !flags.atStart;\n\t\t\t} else {\n\t\t\t\t// In at end mode, we run every time and reschedule if there were\n\t\t\t\t// additional calls.\n\t\t\t\t// In atStart mode, we run if there were additional calls during\n\t\t\t\t// the interval, unless noTrail is active then we just block calls for\n\t\t\t\t// one interval and terminate to allow the base function to make\n\t\t\t\t// the call the next time it's called.\n\t\t\t\trun = !flags.atStart || (resched && !flags.noTrail);\n\t\t\t\tresched = resched && !flags.noTrail;\n\t\t\t}\n\t\t\tif (resched) {\n\t\t\t\tcounter = 1;\n\t\t\t\twindow.setTimeout(callback, delay);\n\t\t\t} else {\n\t\t\t\tcounter = 0;\n\t\t\t\tthat = params = null;\n\t\t\t}\n\t\t\tif (run) {\n\t\t\t\tf.apply(t, p);\n\t\t\t}\n\t\t}", "function throttle(callback, wait) {\n var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var timeout = null;\n var initialCall = true;\n return function () {\n var _this = this,\n _arguments = arguments;\n\n var callNow = immediate && initialCall;\n\n var next = function next() {\n callback.apply(_this, _arguments);\n timeout = null;\n };\n\n if (callNow) {\n initialCall = false;\n next();\n }\n\n if (!timeout) {\n timeout = setTimeout(next, wait);\n }\n };\n}", "function makeThrottled(f, delay, flags) {\n\t\tvar params, that, counter = 0;\n\t\tflags = (flags && (flags + '').split(/\\s+/)) || [];\n\t\t// Valid combinations table\n\t\t// start | trail | debounce |\n\t\t// F | X | F = fires at the end of every interval\n\t\t// F | X | T = blocks until calls stop then fires once in last interval only\n\t\t// T | F | F = fires immediately then at every interval after additional calls\n\t\t// T | T | F = fires immediately then blocks additional calls for 1 interval\n\t\t// T | X | T = fires immediately only, then blocks until calls stop\n\t\tflags = {\n\t\t\tatStart: $.inArray('start', flags) !== -1,\n\t\t\tnoTrail: $.inArray('noTrail', flags) !== -1,\n\t\t\tdebounce: $.inArray('debounce', flags) !== -1\n\t\t};\n\t\t// Canonicalise noTrail to false in !atStart\n\t\tflags.noTrail = flags.noTrail && flags.atStart;\n\t\t// counter must remain >= 0. counter must never become < 1 whilst timeout\n\t\t// is active. Rescheduling happens if counter is >= 2 since that means an\n\t\t// additional call to the base function was made during the interval.\n\t\tfunction callback() {\n\t\t\tvar t = that,\n\t\t\t p = params,\n\t\t\t run = false,\n\t\t\t resched = (counter !== 1); // equiv to > 1\n\t\t\tif (flags.debounce) {\n\t\t\t\t// Debounce executes at end of last interval, last interval is\n\t\t\t\t// when there were no additional calls during the interval.\n\t\t\t\t// (Except in atStart mode, since the call was already made)\n\t\t\t\trun = !resched && !flags.atStart;\n\t\t\t} else {\n\t\t\t\t// In at end mode, we run every time and reschedule if there were\n\t\t\t\t// additional calls.\n\t\t\t\t// In atStart mode, we run if there were additional calls during\n\t\t\t\t// the interval, unless noTrail is active then we just block calls for\n\t\t\t\t// one interval and terminate to allow the base function to make\n\t\t\t\t// the call the next time it's called.\n\t\t\t\trun = !flags.atStart || (resched && !flags.noTrail);\n\t\t\t\tresched = resched && !flags.noTrail;\n\t\t\t}\n\t\t\tif (resched) {\n\t\t\t\tcounter = 1;\n\t\t\t\twindow.setTimeout(callback, delay);\n\t\t\t} else {\n\t\t\t\tcounter = 0;\n\t\t\t\tthat = params = null;\n\t\t\t}\n\t\t\tif (run) {\n\t\t\t\tf.apply(t, p);\n\t\t\t}\n\t\t}\n\n\t\treturn function() {\n\t\t\tthat = this;\n\t\t\tparams = arguments;\n\t\t\tif (++counter !== 1) return;\n\n\t\t\twindow.setTimeout(callback, delay);\n\t\t\tif (flags.atStart) {\n\t\t\t\tf.apply(this, arguments);\n\t\t\t}\n\t\t};\n\t}", "function throttle() {\n var fn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : noop;\n var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;\n\n var last = 0;\n\n return function () {\n var context = this;\n var now = Date.now();\n\n if (now - last > interval) {\n last = now;\n fn.apply(context, arguments);\n }\n };\n }", "function throttle(func, ms) {\n\n let isThrottled = false,\n savedArgs,\n savedThis;\n\n function wrapper() {\n\n if (isThrottled) { // (2)\n savedArgs = arguments;\n savedThis = this;\n return;\n }\n\n func.apply(this, arguments); // (1)\n\n isThrottled = true;\n\n setTimeout(function() {\n isThrottled = false; // (3)\n if (savedArgs) {\n wrapper.apply(savedThis, savedArgs);\n savedArgs = savedThis = null;\n }\n }, ms);\n }\n\n return wrapper;\n}", "function throttle(fn, time, context) {\n var lock, args, wrapperFn, later;\n\n later = function () {\n // reset lock and call if queued\n lock = false;\n\n if (args) {\n wrapperFn.apply(context, args);\n args = false;\n }\n };\n\n wrapperFn = function () {\n if (lock) {\n // called too soon, queue to call later\n args = arguments;\n } else {\n // call and lock until later\n fn.apply(context, arguments);\n setTimeout(later, time);\n lock = true;\n }\n };\n\n return wrapperFn;\n } // @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number", "function throttleReactEventCallback(callback, options) {\n\t if (options === void 0) { options = {}; }\n\t var throttledFunc = _throttleHelper(function (event2) {\n\t if (options.preventDefault) {\n\t event2.preventDefault();\n\t }\n\t }, function (event2) {\n\t // prevent React from reclaiming the event object before we\n\t // reference it\n\t event2.persist();\n\t }, function (event2) {\n\t var otherArgs2 = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t otherArgs2[_i - 1] = arguments[_i];\n\t }\n\t callback.apply(void 0, [event2].concat(otherArgs2));\n\t });\n\t return throttledFunc;\n\t}", "function throttle(func, limit) {\n if (typeof func !== 'function') {\n throw new Error('function argument is expected');\n } else if (typeof limit !== 'number') {\n throw new Error('number argument is expected');\n }\n\n var listener = new ThrottleListener(limit);\n\n return function () {\n return listener.execute(func, this, arguments);\n };\n }", "function useThrottleFn(fn, ms = 200, trailing = true) {\n return createFilterWrapper(throttleFilter(ms, trailing), fn);\n}", "function f(){// Execute `callback` and update the `last_exec` timestamp.\nfunction c(){h=+new Date,d.apply(f,j)}var f=this,i=+new Date-h,j=arguments;e&&!g&&c(),g&&clearTimeout(g),void 0===e&&i>a?c():!0!==b&&(g=setTimeout(e?// If `debounce_mode` is true (at_begin) this is used to clear the flag\n// to allow future `callback` executions.\nfunction(){g=void 0}:c,void 0===e?a-i:a))}// After wrapper has stopped being called, this timeout ensures that", "wrap() {\n const originalFunc = this.originalFunc;\n const stats = this.stats;\n\n // reset stats\n this.stats.callCount = 0;\n this.stats.callTimeMinNs = 0;\n this.stats.callTimeMaxNs = 0;\n this.stats.callTimeAvgNs = 0;\n\n this.wrapper = function() {\n const start = process.hrtime();\n const ret = originalFunc.apply(null, arguments);\n const elapsed = process.hrtime(start);\n const callTimeNs = elapsed[0] * 1e9 /* s to ns */ + elapsed[1];\n\n // update stats\n stats.callCount++;\n // compute average with equal weight for each value\n stats.callTimeAvgNs = stats.callTimeAvgNs * ((stats.callCount-1) / stats.callCount)\n + callTimeNs * (1 / stats.callCount);\n\n if (stats.callTimeMinNs > callTimeNs\n || stats.callTimeMinNs === 0) {\n stats.callTimeMinNs = callTimeNs;\n }\n\n if (stats.callTimeMaxNs < callTimeNs) {\n stats.callTimeMaxNs = callTimeNs;\n }\n\n return ret;\n };\n\n return this.wrapper;\n }", "_configureThrottling() {\n if (this.options.maxTPS && this.options.maxTPS > 0) {\n const minTime = parseInt(1000 / this.options.maxTPS);\n if (minTime > 0) {\n this.rate_limiter = new Bottleneck({ minTime });\n this._processMatchedSqsMessage = this.rate_limiter.wrap(this._processMatchedSqsMessage);\n }\n }\n }", "function throttleReactEventCallback(callback, options) {\n if (options === void 0) { options = {}; }\n var throttledFunc = throttleHelper(function (event2) {\n if (options.preventDefault) {\n event2.preventDefault();\n }\n }, function (event2) {\n // prevent React from reclaiming the event object before we reference it\n event2.persist();\n }, function (event2) {\n var otherArgs2 = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherArgs2[_i - 1] = arguments[_i];\n }\n callback.apply(void 0, [event2].concat(otherArgs2));\n });\n return throttledFunc;\n}", "function throttle(f, interval) {\n\tvar timer\n\t\n\treturn function() {\n\t\tlet context = this\n\t\tlet args = arguments\n\t\t\n\t\tif (timer) return;\n\t\t\n\t\ttimer = setTimeout( ()=>{\n\t\t\tclearTimeout(timer)\n\t\t\ttimer = null\n\t\t\tf.apply(context, args)\n\t\t}, interval )\n\n\t}\n}", "function protectedCallback (callback) {\n return function () {\n try {\n return callback.apply(oboeApi, arguments)\n } catch (e) {\n setTimeout(function () {\n throw new Error(e.message)\n })\n }\n }\n }", "function debouncer( func , timeout ) {\nvar timeoutID , timeout = timeout || 200;\nreturn function () {\nvar scope = this , args = arguments;\nclearTimeout( timeoutID );\ntimeoutID = setTimeout( function () {\n func.apply( scope , Array.prototype.slice.call( args ) );\n} , timeout );\n}\n}", "function throttle(fn, timespan) {\n\tvar timeout = 0;\n\tvar nextTrig = 0;\n\tvar _this, _args;\n\n\tfunction timeoutCallback() {\n\t\ttimeout = 0;\n\t\tcall.apply(_this, _args);\n\t}\n\n\tfunction call() {\n\t\tvar now = +new Date();\n\t\tif (now >= nextTrig) {\n\t\t\tnextTrig = now + timespan;\n\t\t\tfn.apply(this, arguments);\n\t\t} else {\n\t\t\t_this = this;\n\t\t\t_args = arguments;\n\t\t\tif (!timeout) timeout = setTimeout(timeoutCallback, nextTrig - now);\n\t\t}\n\t}\n\n\treturn call;\n}", "function throttle(func, wait) {\n var waiting = false;\n return function () {\n var _arguments2 = arguments,\n _this2 = this;\n\n if (waiting) {\n return;\n }\n\n waiting = true;\n setTimeout(function () {\n func.apply(_this2, _arguments2);\n waiting = false;\n }, wait);\n };\n} // Usage", "function debounce(callback){\n var queued = false;\n return function () {\n if(!queued){\n queued = true;\n setTimeout(function () {\n queued = false;\n callback();\n }, 0);\n }\n };\n}", "function debounce(callback, delay){\n var timer;\n return function(){\n var args = arguments;\n var context = this;\n clearTimeout(timer);\n timer = setTimeout(function(){\n callback.apply(context, args);\n }, delay);\n }\n }", "function throttle(func, wait) {\n var timer\n var lastRan\n return function(...args) {\n if (!lastRan){\n func.apply(this, args)\n lastRan = new Date()\n }\n else {\n clearTimeout(timer)\n timer=setTimeout(() => {\n var current = new Date()\n if (current - lastRan > limit){\n func.apply(this, args)\n lastRan = current\n }\n }, wait - (new Date() - lastRan))\n }\n }\n}", "function throttle(f, delay){\n var timer = null;\n return function(){\n var context = this, args = arguments;\n clearTimeout(timer);\n timer = window.setTimeout(function(){\n f.apply(context, args);\n },\n delay || 500);\n };\n}", "function throttle(fn, threshhold, scope) {\n threshhold || (threshhold = 250);\n var last,\n deferTimer;\n return function () {\n var context = scope || this;\n\n var now = +new Date,\n args = arguments;\n if (last && now < last + threshhold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshhold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n }", "throttle(fn, delay) {\n let timer;\n return function () {\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n fn.apply(this, arguments);\n }, delay);\n }\n };\n }", "function debouncer( func , timeout ) {\n\tvar timeoutID , timeout = timeout || 200;\n\treturn function () {\n\t\tvar scope = this , args = arguments;\n\t\tclearTimeout( timeoutID );\n\t\ttimeoutID = setTimeout( function () {\n\t\t\tfunc.apply( scope , Array.prototype.slice.call( args ) );\n\t\t} , timeout );\n\t}\n}", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }" ]
[ "0.765537", "0.7569833", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.75173116", "0.7513246", "0.74836594", "0.74774325", "0.74667925", "0.74478465", "0.7237804", "0.7220747", "0.7205905", "0.7198615", "0.71728563", "0.7171839", "0.71267235", "0.7118952", "0.7052312", "0.7034908", "0.7034908", "0.7034908", "0.7034908", "0.7034908", "0.6682964", "0.6682964", "0.66641915", "0.66241896", "0.6606255", "0.65870583", "0.6576487", "0.6576487", "0.6576487", "0.6576487", "0.6576487", "0.6576487", "0.6576487", "0.65764", "0.65761304", "0.65394", "0.65338516", "0.64527375", "0.6448784", "0.64070034", "0.64006364", "0.63481677", "0.63133544", "0.6289074", "0.62848735", "0.6181105", "0.61413276", "0.6129774", "0.6120419", "0.5959417", "0.59574246", "0.593972", "0.59276", "0.5894457", "0.58733356", "0.58514374", "0.58363247", "0.5802853", "0.57877743", "0.5782732", "0.5777664", "0.57500005", "0.57437694", "0.57431906", "0.57159996", "0.56931806", "0.5683641", "0.567419", "0.5667258", "0.566208", "0.56496024", "0.564931", "0.5622321", "0.5622321", "0.5622321", "0.5622321", "0.5622321", "0.5622321", "0.5622321", "0.5622321" ]
0.72283226
26
Execute `callback` and update the `last_exec` timestamp.
function exec() { last_exec = +new Date(); callback.apply( that, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }", "function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }", "function exec() {\n\t lastExec = Date.now();\n\t callback.apply(self, arguments_);\n\t }", "function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }", "function exec() {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}", "function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }", "function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }", "function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }", "function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }", "function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }", "function exec () {\n\t\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}", "function exec () {\n\t\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}", "function exec() {\n\t lastExec = Date.now();\n\t callback.apply(self, args);\n\t }", "function exec() {\n lastExec = Date.now();\n callback.apply( self, args );\n }", "function f(){// Execute `callback` and update the `last_exec` timestamp.\nfunction c(){h=+new Date,d.apply(f,j)}var f=this,i=+new Date-h,j=arguments;e&&!g&&c(),g&&clearTimeout(g),void 0===e&&i>a?c():!0!==b&&(g=setTimeout(e?// If `debounce_mode` is true (at_begin) this is used to clear the flag\n// to allow future `callback` executions.\nfunction(){g=void 0}:c,void 0===e?a-i:a))}// After wrapper has stopped being called, this timeout ensures that", "function exec() {\n lastExec = Number(new Date());\n callback.apply(self, args);\n } // If `debounceMode` is true (at begin) this is used to clear the flag", "function callbackWrapper() {\n\t\t\tconst diff = startTime + timeout - Date.now();\n\n\t\t\tif (diff > 0) {\n\t\t\t\tlet newTimeout = self.cronTime.getTimeout();\n\n\t\t\t\tif (newTimeout > diff) {\n\t\t\t\t\tnewTimeout = diff;\n\t\t\t\t}\n\n\t\t\t\tremaining += newTimeout;\n\t\t\t}\n\n\t\t\t// If there is sleep time remaining, calculate how long and go to sleep\n\t\t\t// again. This processing might make us miss the deadline by a few ms\n\t\t\t// times the number of sleep sessions. Given a MAXDELAY of almost a\n\t\t\t// month, this should be no issue.\n\t\t\tself.lastExecution = new Date();\n\t\t\tif (remaining) {\n\t\t\t\tif (remaining > MAXDELAY) {\n\t\t\t\t\tremaining -= MAXDELAY;\n\t\t\t\t\ttimeout = MAXDELAY;\n\t\t\t\t} else {\n\t\t\t\t\ttimeout = remaining;\n\t\t\t\t\tremaining = 0;\n\t\t\t\t}\n\n\t\t\t\t_setTimeout(timeout);\n\t\t\t} else {\n\t\t\t\t// We have arrived at the correct point in time.\n\n\t\t\t\tself.running = false;\n\n\t\t\t\t// start before calling back so the callbacks have the ability to stop the cron job\n\t\t\t\tif (!self.runOnce) {\n\t\t\t\t\tself.start();\n\t\t\t\t}\n\n\t\t\t\tself.fireOnTick();\n\t\t\t}\n\t\t}", "function callbackWrapper() {\n var diff = startTime + timeout - Date.now();\n\n if (diff > 0) {\n var newTimeout = self.cronTime.getTimeout();\n\n if (newTimeout > diff) {\n newTimeout = diff;\n }\n\n remaining += newTimeout;\n } // If there is sleep time remaining, calculate how long and go to sleep\n // again. This processing might make us miss the deadline by a few ms\n // times the number of sleep sessions. Given a MAXDELAY of almost a\n // month, this should be no issue.\n\n\n self.lastExecution = new Date();\n\n if (remaining) {\n if (remaining > MAXDELAY) {\n remaining -= MAXDELAY;\n timeout = MAXDELAY;\n } else {\n timeout = remaining;\n remaining = 0;\n }\n\n _setTimeout(timeout);\n } else {\n // We have arrived at the correct point in time.\n self.running = false; // start before calling back so the callbacks have the ability to stop the cron job\n\n if (!self.runOnce) self.start();\n self.fireOnTick();\n }\n }", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function exec_callback(id) { /// Execute callback\n if (!callbacks[id])\n return;\n callbacks[id].call();\n}", "function callback(){}", "function cb () {\n\t\tcallback();\n\t}", "function wrapper() {\n const self = this;\n const elapsed = Date.now() - lastExec;\n const args = arguments;\n\n if ( cancelled ) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n function exec() {\n lastExec = Date.now();\n callback.apply( self, args );\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n function clear() {\n timeoutID = undefined;\n }\n\n if ( debounceMode && ! timeoutID ) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if ( debounceMode === undefined && elapsed > delay ) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if ( noTrailing !== true ) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout( debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay );\n }\n }", "function exec_callback( args ) {\n if ( callback_func && (callback_force || !con || !con.log) ) {\n callback_func.apply( window, args );\n }\n }", "function wrapper() {\n var that = this,\n elapsed = +new Date() - last_exec,\n args = arguments;\n \n // Execute `callback` and update the `last_exec` timestamp.\n function exec() {\n last_exec = +new Date();\n callback.apply( that, args );\n };\n \n // If `debounce_mode` is true (at_begin) this is used to clear the flag\n // to allow future `callback` executions.\n function clear() {\n timeout_id = undefined;\n };\n \n if ( debounce_mode && !timeout_id ) {\n // Since `wrapper` is being called for the first time and\n // `debounce_mode` is true (at_begin), execute `callback`.\n exec();\n }\n \n // Clear any existing timeout.\n timeout_id && clearTimeout( timeout_id );\n \n if ( debounce_mode === undefined && elapsed > delay ) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n \n } else if ( no_trailing !== true ) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n // \n // If `debounce_mode` is true (at_begin), schedule `clear` to execute\n // after `delay` ms.\n // \n // If `debounce_mode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );\n }\n }", "function wrapper() {\n var that = this,\n elapsed = +new Date() - last_exec,\n args = arguments;\n \n // Execute `callback` and update the `last_exec` timestamp.\n function exec() {\n last_exec = +new Date();\n callback.apply( that, args );\n };\n \n // If `debounce_mode` is true (at_begin) this is used to clear the flag\n // to allow future `callback` executions.\n function clear() {\n timeout_id = undefined;\n };\n \n if ( debounce_mode && !timeout_id ) {\n // Since `wrapper` is being called for the first time and\n // `debounce_mode` is true (at_begin), execute `callback`.\n exec();\n }\n \n // Clear any existing timeout.\n timeout_id && clearTimeout( timeout_id );\n \n if ( debounce_mode === undefined && elapsed > delay ) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n \n } else if ( no_trailing !== true ) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n // \n // If `debounce_mode` is true (at_begin), schedule `clear` to execute\n // after `delay` ms.\n // \n // If `debounce_mode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );\n }\n }", "function wrapper() {\n var that = this,\n elapsed = +new Date() - last_exec,\n args = arguments;\n \n // Execute `callback` and update the `last_exec` timestamp.\n function exec() {\n last_exec = +new Date();\n callback.apply( that, args );\n };\n \n // If `debounce_mode` is true (at_begin) this is used to clear the flag\n // to allow future `callback` executions.\n function clear() {\n timeout_id = undefined;\n };\n \n if ( debounce_mode && !timeout_id ) {\n // Since `wrapper` is being called for the first time and\n // `debounce_mode` is true (at_begin), execute `callback`.\n exec();\n }\n \n // Clear any existing timeout.\n timeout_id && clearTimeout( timeout_id );\n \n if ( debounce_mode === undefined && elapsed > delay ) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n \n } else if ( no_trailing !== true ) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n // \n // If `debounce_mode` is true (at_begin), schedule `clear` to execute\n // after `delay` ms.\n // \n // If `debounce_mode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n var self = this;\n var elapsed = Date.now() - lastExec;\n var args = arguments;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, args);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function wrapper() {\n\t var self = this;\n\t var elapsed = Date.now() - lastExec;\n\t var args = arguments;\n\t\n\t if (cancelled) {\n\t return;\n\t } // Execute `callback` and update the `lastExec` timestamp.\n\t\n\t\n\t function exec() {\n\t lastExec = Date.now();\n\t callback.apply(self, args);\n\t }\n\t /*\n\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t * to allow future `callback` executions.\n\t */\n\t\n\t\n\t function clear() {\n\t timeoutID = undefined;\n\t }\n\t\n\t if (debounceMode && !timeoutID) {\n\t /*\n\t * Since `wrapper` is being called for the first time and\n\t * `debounceMode` is true (at begin), execute `callback`.\n\t */\n\t exec();\n\t }\n\t\n\t clearExistingTimeout();\n\t\n\t if (debounceMode === undefined && elapsed > delay) {\n\t /*\n\t * In throttle mode, if `delay` time has been exceeded, execute\n\t * `callback`.\n\t */\n\t exec();\n\t } else if (noTrailing !== true) {\n\t /*\n\t * In trailing throttle mode, since `delay` time has not been\n\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t * recent execution.\n\t *\n\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t * after `delay` ms.\n\t *\n\t * If `debounceMode` is false (at end), schedule `callback` to\n\t * execute after `delay` ms.\n\t */\n\t timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t }\n\t }", "function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function exec() {\n this._throttle[methodID] = {\n previous: (new Date()).getTime()\n };\n func.apply(this, arguments);\n }", "registerCallback (callback) {\n this._updates.push(callback);\n }", "registerCallback (callback) {\n this._updates.push(callback);\n }", "function exec(){lastExec=Number(new Date());callback.apply(self,args);}// If `debounceMode` is true (at begin) this is used to clear the flag", "function exec(){lastExec=Number(new Date());callback.apply(self,args);}// If `debounceMode` is true (at begin) this is used to clear the flag", "function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }", "function exec_callback(args) {\n if (callback_func && (callback_force || !con || !con.log)) {\n callback_func.apply(window, args);\n }\n }", "function executingFirst(callback)\r\n{\r\n console.log(\"Executing current function...\");\r\n console.log(\"Calling callback function\")\r\n executingLast();//calling callback function\r\n /**callback function executes when it is invoked, no other script is running until the execution of callback function is completed\r\n * so it is synchronous\r\n */\r\n}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t/*\n\t\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t * to allow future `callback` executions.\n\t\t */\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t/*\n\t\t\t * Since `wrapper` is being called for the first time and\n\t\t\t * `debounceMode` is true (at begin), execute `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t/*\n\t\t\t * In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t * `callback`.\n\t\t\t */\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t/*\n\t\t\t * In trailing throttle mode, since `delay` time has not been\n\t\t\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t * recent execution.\n\t\t\t *\n\t\t\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t * after `delay` ms.\n\t\t\t *\n\t\t\t * If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t * execute after `delay` ms.\n\t\t\t */\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\t\tvar self = this;\n\t\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\t\tvar args = arguments;\n\n\t\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\t\tfunction exec () {\n\t\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}\n\n\t\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t\t// to allow future `callback` executions.\n\t\t\tfunction clear () {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}\n\n\t\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\t\texec();\n\t\t\t}\n\n\t\t\t// Clear any existing timeout.\n\t\t\tif ( timeoutID ) {\n\t\t\t\tclearTimeout(timeoutID);\n\t\t\t}\n\n\t\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t\t// `callback`.\n\t\t\t\texec();\n\n\t\t\t} else if ( noTrailing !== true ) {\n\t\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t\t// recent execution.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t\t// after `delay` ms.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t\t// execute after `delay` ms.\n\t\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t\t}\n\n\t\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "runAfterInteractions(callback: Function) {\n invariant(\n typeof callback === 'function',\n 'Must specify a function to schedule.'\n );\n scheduleUpdate();\n _queue.push(callback);\n }", "function wrapper() {\n\t for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n\t arguments_[_key] = arguments[_key];\n\t }\n\n\t var self = this;\n\t var elapsed = Date.now() - lastExec;\n\n\t if (cancelled) {\n\t return;\n\t } // Execute `callback` and update the `lastExec` timestamp.\n\n\n\t function exec() {\n\t lastExec = Date.now();\n\t callback.apply(self, arguments_);\n\t }\n\t /*\n\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t * to allow future `callback` executions.\n\t */\n\n\n\t function clear() {\n\t timeoutID = undefined;\n\t }\n\n\t if (debounceMode && !timeoutID) {\n\t /*\n\t * Since `wrapper` is being called for the first time and\n\t * `debounceMode` is true (at begin), execute `callback`.\n\t */\n\t exec();\n\t }\n\n\t clearExistingTimeout();\n\n\t if (debounceMode === undefined && elapsed > delay) {\n\t /*\n\t * In throttle mode, if `delay` time has been exceeded, execute\n\t * `callback`.\n\t */\n\t exec();\n\t } else if (noTrailing !== true) {\n\t /*\n\t * In trailing throttle mode, since `delay` time has not been\n\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t * recent execution.\n\t *\n\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t * after `delay` ms.\n\t *\n\t * If `debounceMode` is false (at end), schedule `callback` to\n\t * execute after `delay` ms.\n\t */\n\t timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t }\n\t }", "function wrapper() {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\t}", "onUpdate(callback) {\n\t\tthis.onUpdateCallback = callback;\n\t}", "function iAmCallbackFunction(anyFunction) {\n console.log(\"We are executing code. Please wait couple of seconds.\");\n setTimeout(() => anyFunction(), 3000);\n}", "function wrapper () {\n\t\n\t\t\tvar self = this;\n\t\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\t\tvar args = arguments;\n\t\n\t\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\t\tfunction exec () {\n\t\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}\n\t\n\t\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t\t// to allow future `callback` executions.\n\t\t\tfunction clear () {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}\n\t\n\t\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\t\texec();\n\t\t\t}\n\t\n\t\t\t// Clear any existing timeout.\n\t\t\tif ( timeoutID ) {\n\t\t\t\tclearTimeout(timeoutID);\n\t\t\t}\n\t\n\t\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t\t// `callback`.\n\t\t\t\texec();\n\t\n\t\t\t} else if ( noTrailing !== true ) {\n\t\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t\t// recent execution.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t\t// after `delay` ms.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t\t// execute after `delay` ms.\n\t\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t\t}\n\t\n\t\t}", "function cb(){\n console.log(\"i will call u back after 2 sec\");\n}", "function callbackDriver() {\n cb();\n }", "function update_last_sync_time(func)\n{\n\tif(typeof static_local_db=='undefined')\n\t{\n\t\topen_local_db(function()\n\t\t{\n\t\t\tupdate_last_sync_time(func);\n\t\t});\n\t}\n\telse\n\t{\n\t\tvar objectStore=static_local_db.transaction(['user_preferences'],\"readwrite\").objectStore('user_preferences');\n\t\tvar time=get_my_time();\n\t\tvar row_data={id:'700',name:'last_sync_time',value:time,type:'other',display_name:'Last Sync Time',status:'active',last_updated:'1'};\n\n\t\tvar req=objectStore.put(row_data);\n\t\treq.onsuccess=function(e)\n\t\t{\n\t\t\tfunc();\n\t\t};\n\t\treq.onerror=function(e)\n\t\t{\n\t\t\tconsole.log(this.error);\n\t\t};\n\t}\n}", "function callback() {\n console.log(\"Callback\");\n }", "function execcallback(error, stdout, stderr) {\n // if (stilltesting) {\n console.log('stdout: ' + stdout);\n console.log('stderr: ' + stderr);\n if (error !== null) {\n console.log('exec error: ' + error);\n }\n // }\n}", "function callback() {\n console.log('yo soy un callback')\n}", "function _callback(err, data) { _call(callback, err, data); }", "function callback(){\n cb();\n callback = ()=>{};\n }" ]
[ "0.745563", "0.745563", "0.73525447", "0.73505646", "0.7145095", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.713012", "0.7113197", "0.7113197", "0.7113197", "0.7113197", "0.7113197", "0.7082748", "0.7082748", "0.70554376", "0.7012775", "0.63899595", "0.6314696", "0.6119151", "0.6041622", "0.60043424", "0.60043424", "0.60043424", "0.60043424", "0.60043424", "0.5976467", "0.5915929", "0.59134775", "0.58043957", "0.58035415", "0.57850826", "0.57850826", "0.57850826", "0.57632583", "0.57632583", "0.57632583", "0.57632583", "0.57632583", "0.5758931", "0.5754389", "0.57332623", "0.57281417", "0.57281417", "0.5702271", "0.5702271", "0.5696453", "0.5657023", "0.5640019", "0.56389785", "0.5634683", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5599695", "0.5568253", "0.5567754", "0.55597186", "0.55539584", "0.55431837", "0.5487112", "0.5470445", "0.54504484", "0.5438102", "0.5388097", "0.5379348", "0.5344553", "0.5341458", "0.53362983" ]
0.73532254
2
If `debounce_mode` is true (at_begin) this is used to clear the flag to allow future `callback` executions.
function clear() { timeout_id = undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exec(){lastExec=Number(new Date());callback.apply(self,args);}// If `debounceMode` is true (at begin) this is used to clear the flag", "function exec(){lastExec=Number(new Date());callback.apply(self,args);}// If `debounceMode` is true (at begin) this is used to clear the flag", "function debounce(callback){\n var queued = false;\n return function () {\n if(!queued){\n queued = true;\n setTimeout(function () {\n queued = false;\n callback();\n }, 0);\n }\n };\n}", "function wrapper(){var self=this;var elapsed=Number(new Date())-lastExec;var args=arguments;// Execute `callback` and update the `lastExec` timestamp.\nfunction exec(){lastExec=Number(new Date());callback.apply(self,args);}// If `debounceMode` is true (at begin) this is used to clear the flag\n// to allow future `callback` executions.\nfunction clear(){timeoutID=undefined;}if(debounceMode&&!timeoutID){// Since `wrapper` is being called for the first time and\n// `debounceMode` is true (at begin), execute `callback`.\nexec();}// Clear any existing timeout.\nif(timeoutID){clearTimeout(timeoutID);}if(debounceMode===undefined&&elapsed>delay){// In throttle mode, if `delay` time has been exceeded, execute\n// `callback`.\nexec();}else if(noTrailing!==true){// In trailing throttle mode, since `delay` time has not been\n// exceeded, schedule `callback` to execute `delay` ms after most\n// recent execution.\n//\n// If `debounceMode` is true (at begin), schedule `clear` to execute\n// after `delay` ms.\n//\n// If `debounceMode` is false (at end), schedule `callback` to\n// execute after `delay` ms.\ntimeoutID=setTimeout(debounceMode?clear:exec,debounceMode===undefined?delay-elapsed:delay);}}// Return the wrapper function.", "function exec() {\n lastExec = Number(new Date());\n callback.apply(self, args);\n } // If `debounceMode` is true (at begin) this is used to clear the flag", "debounce(fn, quietMillis, bindedThis) {\n let isWaiting = false;\n return function func() {\n if (isWaiting) return;\n\n if (bindedThis === undefined) {\n bindedThis = this;\n }\n\n fn.apply(bindedThis, arguments);\n isWaiting = true;\n\n setTimeout(function () {\n isWaiting = false;\n }, quietMillis);\n };\n }", "function later() {\n // Nullify the variable that stores unique ID (number) after the\n // timeout passed.\n timeout = null;\n\n // If we set `func` not to run immediately after `debounce` being\n // called, run it anyway after the timeout passed.\n if (!immediate) {\n func.apply(context, args);\n }\n }", "function debounce(fn) {\n\t if (!App.vars.debounceTimer) fn.call(this);\n\t if (App.vars.debounceTimer) global.clearTimeout(App.vars.debounceTimer);\n\t App.vars.debounceTimer = global.setTimeout(function() {\n\t App.vars.debounceTimer = null;\n\t fn.call(this);\n\t }, App.setup.debounce);\n\t}", "function wrapper(){var self=this;var elapsed=Number(new Date())-lastExec;var args=arguments;// Execute `callback` and update the `lastExec` timestamp.\n\tfunction exec(){lastExec=Number(new Date());callback.apply(self,args);}// If `debounceMode` is true (at begin) this is used to clear the flag\n\t// to allow future `callback` executions.\n\tfunction clear(){timeoutID=undefined;}if(debounceMode&&!timeoutID){// Since `wrapper` is being called for the first time and\n\t// `debounceMode` is true (at begin), execute `callback`.\n\texec();}// Clear any existing timeout.\n\tif(timeoutID){clearTimeout(timeoutID);}if(debounceMode===undefined&&elapsed>delay){// In throttle mode, if `delay` time has been exceeded, execute\n\t// `callback`.\n\texec();}else if(noTrailing!==true){// In trailing throttle mode, since `delay` time has not been\n\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t// recent execution.\n\t//\n\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t// after `delay` ms.\n\t//\n\t// If `debounceMode` is false (at end), schedule `callback` to\n\t// execute after `delay` ms.\n\ttimeoutID=setTimeout(debounceMode?clear:exec,debounceMode===undefined?delay-elapsed:delay);}}// Return the wrapper function.", "function debounce(f, t) {\n return f;\n}", "function wrapper() {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\t}", "function debounce(callback, delay){\n var timer;\n return function(){\n var args = arguments;\n var context = this;\n clearTimeout(timer);\n timer = setTimeout(function(){\n callback.apply(context, args);\n }, delay);\n }\n }", "get debounce() { return this._debounce; }", "get debounce() { return this._debounce; }", "get debounce() { return this._debounce; }", "function debounce(fun, delay, immediate) {\n // triggers on either leading edge or trailing edge\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(function() {\n // when immediate is true, we just reset the timeout to null so that\n // the debounced function can run again when delay ms has passed\n timeout = null;\n if(!immediate) fun.apply(context, args);\n }, delay);\n if(callNow) fun.apply(context, args);\n };\n }", "function debounce ( func, wait, immediate ) {\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if ( !immediate ) {\n func.apply(context, args);\n }\n }, wait);\n if ( immediate && !timeout ) {\n func.apply(context, args);\n }\n };\n }", "function debounce(fn, wait) {\n let timer = null;\n return function() {\n let context = this;\n clearTimeout(timer);\n timer = setTimeout(() => fn.apply(context, [...arguments]), wait);\n }\n}", "function wrapper () {\n\t\n\t\t\tvar self = this;\n\t\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\t\tvar args = arguments;\n\t\n\t\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\t\tfunction exec () {\n\t\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}\n\t\n\t\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t\t// to allow future `callback` executions.\n\t\t\tfunction clear () {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}\n\t\n\t\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\t\texec();\n\t\t\t}\n\t\n\t\t\t// Clear any existing timeout.\n\t\t\tif ( timeoutID ) {\n\t\t\t\tclearTimeout(timeoutID);\n\t\t\t}\n\t\n\t\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t\t// `callback`.\n\t\t\t\texec();\n\t\n\t\t\t} else if ( noTrailing !== true ) {\n\t\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t\t// recent execution.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t\t// after `delay` ms.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t\t// execute after `delay` ms.\n\t\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t\t}\n\t\n\t\t}", "function debounce(fn, ms){\n let startTime = 0;\n return function(){\n if (!startTime){ //run in the first call\n fn.apply(null, arguments);\n startTime = Date.now();\n }\n else if (Date.now() - startTime >= ms){ //check if ms amount time passed from the last call\n fn.apply(null, arguments);\n startTime = Date.now();\n }\n else {\n return;\n }\n } \n}", "function debounce(func, wait) {\n var timeout;\n return function debounce_run() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n func.apply(context, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n }", "function _debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func,wait,immediate){if(immediate===void 0){immediate=false;}var timeout;var args;var context;var timestamp;var result;var later=function later(){var last=+new Date()-timestamp;if(last<wait){timeout=setTimeout(later,wait-last);}else{timeout=null;if(!immediate){result=func.apply(context,args);context=args=null;}}};return function(){context=this;args=arguments;timestamp=+new Date();var callNow=immediate&&!timeout;if(!timeout){timeout=setTimeout(later,wait);}if(callNow){result=func.apply(context,args);context=args=null;}return result;};}", "function debounce(func, wait) {\n var timeout;\n return function() {\n var context = this;\n var args = arguments;\n var later = function later() {\n timeout = null;\n func.apply(context, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n }", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function wrapper () {\n\n\t\t\tvar self = this;\n\t\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\t\tvar args = arguments;\n\n\t\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\t\tfunction exec () {\n\t\t\t\tlastExec = Number(new Date());\n\t\t\t\tcallback.apply(self, args);\n\t\t\t}\n\n\t\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t\t// to allow future `callback` executions.\n\t\t\tfunction clear () {\n\t\t\t\ttimeoutID = undefined;\n\t\t\t}\n\n\t\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\t\texec();\n\t\t\t}\n\n\t\t\t// Clear any existing timeout.\n\t\t\tif ( timeoutID ) {\n\t\t\t\tclearTimeout(timeoutID);\n\t\t\t}\n\n\t\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t\t// `callback`.\n\t\t\t\texec();\n\n\t\t\t} else if ( noTrailing !== true ) {\n\t\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t\t// recent execution.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t\t// after `delay` ms.\n\t\t\t\t//\n\t\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t\t// execute after `delay` ms.\n\t\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t\t}\n\n\t\t}", "function f(){// Execute `callback` and update the `last_exec` timestamp.\nfunction c(){h=+new Date,d.apply(f,j)}var f=this,i=+new Date-h,j=arguments;e&&!g&&c(),g&&clearTimeout(g),void 0===e&&i>a?c():!0!==b&&(g=setTimeout(e?// If `debounce_mode` is true (at_begin) this is used to clear the flag\n// to allow future `callback` executions.\nfunction(){g=void 0}:c,void 0===e?a-i:a))}// After wrapper has stopped being called, this timeout ensures that", "value() {\n return debounce(function debouncedInitializer(options, callback) {\n callback(new ActivitySource(options));\n }, 300);\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n clearTimeout(timeout);\n //Moving this line above timeout assignment\n if (immediate && !timeout) {\n func.apply(context, args);\n }\n timeout = setTimeout(function() {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n }, wait);\n };\n}", "function wrapper() {\n var self = this;\n var elapsed = Number(new Date()) - lastExec;\n var args = arguments; // Execute `callback` and update the `lastExec` timestamp.\n\n function exec() {\n lastExec = Number(new Date());\n callback.apply(self, args);\n } // If `debounceMode` is true (at begin) this is used to clear the flag\n // to allow future `callback` executions.\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n // Since `wrapper` is being called for the first time and\n // `debounceMode` is true (at begin), execute `callback`.\n exec();\n } // Clear any existing timeout.\n\n\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n\n if (debounceMode === undefined && elapsed > delay) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n } else if (noTrailing !== true) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n //\n // If `debounceMode` is true (at begin), schedule `clear` to execute\n // after `delay` ms.\n //\n // If `debounceMode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n } // Return the wrapper function.", "function _debounce(func, wait, immediate) {\n var timeout;\n var result;\n\n return function() {\n var context = this;\n var args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n }\n return result;\n };\n }", "function debounce(func, wait) {\n var timeout;\n return function() {\n var context = this;\n var args = arguments;\n var callback = function() {\n func.apply(context, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(callback, wait);\n };\n }", "function debounce(func, wait) {\n let timeout;\n \n return function executedFunction(...args) {\n // console.log(debouncing);\n const later = () => {\n clearTimeout(timeout);\n func(...args);\n };\n \n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n }", "function debounce(fn, wait, immediate) {\n var timeout;\n\n wait || (wait = 100);\n\n return function () {\n var context = this, args = arguments;\n\n var later = function() {\n timeout = null;\n\n if ( !immediate ) {\n fn.apply(context, args);\n }\n };\n\n var callNow = immediate && !timeout;\n\n clearTimeout(timeout);\n\n timeout = setTimeout(later, wait);\n\n if ( callNow ) {\n fn.apply(context, args);\n }\n };\n }", "function debounce() {\n var fn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : noop;\n var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;\n\n var timer = null;\n\n return function () {\n var context = this;\n var args = arguments;\n\n if (timer) {\n clearTimeout(timer);\n }\n\n timer = setTimeout(function () {\n fn.apply(context, args);\n }, delay);\n };\n }", "function debounce(func, wait, immediate) {\r\n \tvar timeout;\r\n \treturn function() {\r\n \t\tvar context = this, args = arguments;\r\n \t\tvar later = function() {\r\n \t\t\ttimeout = null;\r\n \t\t\tif (!immediate) func.apply(context, args);\r\n \t\t};\r\n \t\tvar callNow = immediate && !timeout;\r\n \t\tclearTimeout(timeout);\r\n \t\ttimeout = setTimeout(later, wait);\r\n \t\tif (callNow) func.apply(context, args);\r\n \t};\r\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function() {\n\t timeout = null;\n\t if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n} // debounce", "function debounce(fn, delay) {\n var timer = null;\n\n return function () {\n var context = this,\n args = arguments;\n\n window.clearTimeout(timer);\n\n timer = window.setTimeout(function () {\n fn.apply(context, args);\n }, delay);\n };\n }", "function debounce(fn, delay) {\n var timer = null;\n return function () {\n var context = this, args = arguments;\n clearTimeout(timer);\n timer = setTimeout(function () {\n fn.apply(context, args);\n }, delay);\n };\n}", "function debounce (fn, delay) {\n var timer = null\n\n return function () {\n var context = this\n var args = arguments\n clearTimeout(timer)\n timer = setTimeout(function () {\n fn.apply(context, args)\n }, delay)\n }\n}", "function wrapper() {\n\t for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n\t arguments_[_key] = arguments[_key];\n\t }\n\n\t var self = this;\n\t var elapsed = Date.now() - lastExec;\n\n\t if (cancelled) {\n\t return;\n\t } // Execute `callback` and update the `lastExec` timestamp.\n\n\n\t function exec() {\n\t lastExec = Date.now();\n\t callback.apply(self, arguments_);\n\t }\n\t /*\n\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t * to allow future `callback` executions.\n\t */\n\n\n\t function clear() {\n\t timeoutID = undefined;\n\t }\n\n\t if (debounceMode && !timeoutID) {\n\t /*\n\t * Since `wrapper` is being called for the first time and\n\t * `debounceMode` is true (at begin), execute `callback`.\n\t */\n\t exec();\n\t }\n\n\t clearExistingTimeout();\n\n\t if (debounceMode === undefined && elapsed > delay) {\n\t /*\n\t * In throttle mode, if `delay` time has been exceeded, execute\n\t * `callback`.\n\t */\n\t exec();\n\t } else if (noTrailing !== true) {\n\t /*\n\t * In trailing throttle mode, since `delay` time has not been\n\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t * recent execution.\n\t *\n\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t * after `delay` ms.\n\t *\n\t * If `debounceMode` is false (at end), schedule `callback` to\n\t * execute after `delay` ms.\n\t */\n\t timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t }\n\t }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;\n var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n\n var later = function later() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\r\n\t var timeout;\r\n\t return function() {\r\n\t var context = this, args = arguments;\r\n\t var later = function() {\r\n\t timeout = null;\r\n\t if (!immediate) func.apply(context, args);\r\n\t };\r\n\t var callNow = immediate && !timeout;\r\n\t clearTimeout(timeout);\r\n\t timeout = setTimeout(later, wait);\r\n\t if (callNow) func.apply(context, args);\r\n\t }\r\n\t }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t/*\n\t\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t * to allow future `callback` executions.\n\t\t */\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t/*\n\t\t\t * Since `wrapper` is being called for the first time and\n\t\t\t * `debounceMode` is true (at begin), execute `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t/*\n\t\t\t * In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t * `callback`.\n\t\t\t */\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t/*\n\t\t\t * In trailing throttle mode, since `delay` time has not been\n\t\t\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t * recent execution.\n\t\t\t *\n\t\t\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t * after `delay` ms.\n\t\t\t *\n\t\t\t * If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t * execute after `delay` ms.\n\t\t\t */\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}", "function debounce(func, wait, immediate) {\n var timeout;\n return function _debounce() {\n var context = this; // eslint-disable-next-line prefer-rest-params\n\n var args = arguments;\n\n var later = function later() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n \tvar timeout;\n \treturn function() {\n \t\tvar context = this, args = arguments;\n \t\tvar later = function() {\n \t\t\ttimeout = null;\n \t\t\tif (!immediate) func.apply(context, args);\n \t\t};\n \t\tvar callNow = immediate && !timeout;\n \t\tclearTimeout(timeout);\n \t\ttimeout = setTimeout(later, wait);\n \t\tif (callNow) func.apply(context, args);\n \t};\n }", "function debounce(fn, duration) {\r\n\t\tlet timer;\r\n\t\treturn function() {\r\n\t\t\tclearTimeout(timer);\r\n\t\t\ttimer = setTimeout(fn, duration)\r\n\t\t}\r\n\t}", "function debounce(func, wait, immediate) {\n var timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tvar later = function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n }\n}", "function debounce(func, wait, immediate) {\r\n\t\tvar timeout;\r\n\t\treturn function() {\r\n\t\t\tvar context = this, args = arguments;\r\n\t\t\tvar later = function() {\r\n\t\t\t\ttimeout = null;\r\n\t\t\t\tif (!immediate) func.apply(context, args);\r\n\t\t\t};\r\n\t\t\tvar callNow = immediate && !timeout;\r\n\t\t\tclearTimeout(timeout);\r\n\t\t\ttimeout = setTimeout(later, wait);\r\n\t\t\tif (callNow) func.apply(context, args);\r\n\t};\r\n}", "function debounce(func, wait, immediate) {\n let timeout;\n return function () {\n let context = this;\n let args = arguments;\n let callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n }, wait);\n if (callNow) func.apply(context, args);\n }\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function wrapper() {\n var that = this,\n elapsed = +new Date() - last_exec,\n args = arguments;\n \n // Execute `callback` and update the `last_exec` timestamp.\n function exec() {\n last_exec = +new Date();\n callback.apply( that, args );\n };\n \n // If `debounce_mode` is true (at_begin) this is used to clear the flag\n // to allow future `callback` executions.\n function clear() {\n timeout_id = undefined;\n };\n \n if ( debounce_mode && !timeout_id ) {\n // Since `wrapper` is being called for the first time and\n // `debounce_mode` is true (at_begin), execute `callback`.\n exec();\n }\n \n // Clear any existing timeout.\n timeout_id && clearTimeout( timeout_id );\n \n if ( debounce_mode === undefined && elapsed > delay ) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n \n } else if ( no_trailing !== true ) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n // \n // If `debounce_mode` is true (at_begin), schedule `clear` to execute\n // after `delay` ms.\n // \n // If `debounce_mode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );\n }\n }", "function wrapper() {\n var that = this,\n elapsed = +new Date() - last_exec,\n args = arguments;\n \n // Execute `callback` and update the `last_exec` timestamp.\n function exec() {\n last_exec = +new Date();\n callback.apply( that, args );\n };\n \n // If `debounce_mode` is true (at_begin) this is used to clear the flag\n // to allow future `callback` executions.\n function clear() {\n timeout_id = undefined;\n };\n \n if ( debounce_mode && !timeout_id ) {\n // Since `wrapper` is being called for the first time and\n // `debounce_mode` is true (at_begin), execute `callback`.\n exec();\n }\n \n // Clear any existing timeout.\n timeout_id && clearTimeout( timeout_id );\n \n if ( debounce_mode === undefined && elapsed > delay ) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n \n } else if ( no_trailing !== true ) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n // \n // If `debounce_mode` is true (at_begin), schedule `clear` to execute\n // after `delay` ms.\n // \n // If `debounce_mode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );\n }\n }", "function wrapper() {\n var that = this,\n elapsed = +new Date() - last_exec,\n args = arguments;\n \n // Execute `callback` and update the `last_exec` timestamp.\n function exec() {\n last_exec = +new Date();\n callback.apply( that, args );\n };\n \n // If `debounce_mode` is true (at_begin) this is used to clear the flag\n // to allow future `callback` executions.\n function clear() {\n timeout_id = undefined;\n };\n \n if ( debounce_mode && !timeout_id ) {\n // Since `wrapper` is being called for the first time and\n // `debounce_mode` is true (at_begin), execute `callback`.\n exec();\n }\n \n // Clear any existing timeout.\n timeout_id && clearTimeout( timeout_id );\n \n if ( debounce_mode === undefined && elapsed > delay ) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n \n } else if ( no_trailing !== true ) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n // \n // If `debounce_mode` is true (at_begin), schedule `clear` to execute\n // after `delay` ms.\n // \n // If `debounce_mode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );\n }\n }", "function debounce(func, wait, immediate) {\n\t\tvar timeout;\n\t\treturn function() {\n\t\t\tvar context = this, args = arguments;\n\t\t\tvar later = function() {\n\t\t\t\ttimeout = null;\n\t\t\t\tif (!immediate) func.apply(context, args);\n\t\t\t};\n\t\t\tvar callNow = immediate && !timeout;\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = setTimeout(later, wait);\n\t\t\tif (callNow) func.apply(context, args);\n\t\t};\n\t}", "function debounce(func, wait, immediate) {\n\t\tvar timeout;\n\t\treturn function() {\n\t\t\tvar context = this, args = arguments;\n\t\t\tvar later = function() {\n\t\t\t\ttimeout = null;\n\t\t\t\tif (!immediate) func.apply(context, args);\n\t\t\t};\n\t\t\tvar callNow = immediate && !timeout;\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = setTimeout(later, wait);\n\t\t\tif (callNow) func.apply(context, args);\n\t\t};\n\t}", "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }, wait);\n if (immediate && !timeout) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this,\n args = arguments;\n\n function later() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n }\n\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n }", "function debounce(quietMillis, fn) {\n var timeout;\n return function() {\n window.clearTimeout(timeout);\n timeout = window.setTimeout(fn, quietMillis);\n };\n }", "function debounce(func, wait, immediate) { // Debounce function (Bing it if you don't know)\n var timeout;\n return function () {\n var context = this, args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n}", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n }", "function debounce(func, wait, immediate) {\r\n var timeout;\r\n return function () {\r\n var context = this, args = arguments;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(function () {\r\n timeout = null;\r\n if (!immediate) func.apply(context, args);\r\n }, wait);\r\n if (immediate && !timeout) func.apply(context, args);\r\n };\r\n}", "function debounce(func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t}, wait);\n\t\tif (immediate && !timeout) func.apply(context, args);\n\t};\n}", "function debounce(func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t}, wait);\n\t\tif (immediate && !timeout) func.apply(context, args);\n\t};\n}", "function debounce(func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t}, wait);\n\t\tif (immediate && !timeout) func.apply(context, args);\n\t};\n}", "function debounce(func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t}, wait);\n\t\tif (immediate && !timeout) func.apply(context, args);\n\t};\n}" ]
[ "0.75560945", "0.75560945", "0.6904754", "0.6462211", "0.6396409", "0.6329464", "0.6309382", "0.62771076", "0.62468845", "0.61616087", "0.6072329", "0.6065627", "0.59272814", "0.59272814", "0.59272814", "0.5901284", "0.5894402", "0.58854216", "0.58772767", "0.585909", "0.5831757", "0.5821945", "0.5818072", "0.5812055", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.5800081", "0.576635", "0.57560194", "0.57540953", "0.57505435", "0.57487255", "0.57404864", "0.572499", "0.57231", "0.5722881", "0.57203037", "0.57017934", "0.5701483", "0.56928307", "0.5681914", "0.56769973", "0.564114", "0.5639192", "0.5633308", "0.5629607", "0.5622412", "0.5618718", "0.5615551", "0.56087", "0.56046665", "0.5603222", "0.5602815", "0.55899674", "0.55899674", "0.55899674", "0.5586258", "0.5586016", "0.558267", "0.5577544", "0.5576135", "0.5576135", "0.55735105", "0.55735105", "0.55735105", "0.55735105", "0.557321", "0.557321", "0.557321", "0.55696636", "0.55696636", "0.5566935", "0.5566935", "0.5566935", "0.55535996", "0.5549071", "0.5549071", "0.55483836", "0.55483717", "0.5542484", "0.5541746", "0.5541746", "0.5541005", "0.5539572", "0.5539572", "0.5539572", "0.5539572" ]
0.0
-1
Update Total calculate total of items in the cart
updateTotal() { let total = 0; for (let index in this.items) { let item = this.items[index]; total += item.price * item.quantity; } this.total = total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function total() {\n let totalVal = 0;\n for (var i = 0; i < cartItems.length; i++) {\n totalVal += cartItems[i].price * cartItems[i].quantity\n }\n setCartTotal(totalVal)\n }", "function updateTotal() {\n var total = 0;\n $('.cart-item-price').each(function() {\n total += parseInt($(this).text());\n });\n $('#shoppingcart-items').append('<hr><span>Total: ' + total + '$ <a href=\"/checkout\">Go to checkout</a></span>');\n }", "function updateTotal(){\n\t\tvar sum = 0;\n\t\t$(\".cart_items>.item\").each(function(i,v){\n\t\t\tsum += $(v).data(\"price\") * $(v).find(\".cart_cloth_num\").text();\n\t\t});\n\t\t$(\".cart_total\").text(sum);\n\t}", "function updateCartTotal() {\n var cartItemContainer = document.getElementsByClassName(\"cart-body\")[0];\n var cartRows = cartItemContainer.getElementsByClassName(\"cart-item\");\n var total = 0;\n for (var i = 0; i < cartRows.length; i++) {\n var cartRow = cartRows[i];\n var priceElement = cartRow.getElementsByClassName(\"cart-item-price\")[0];\n var quantityElement = cartRow.getElementsByClassName(\n \"ItemCounterCart2\"\n )[0];\n var price = parseFloat(priceElement.innerText.replace(\"$\", \"\"));\n var quantity = parseInt(quantityElement.value);\n var total1 = price * quantity;\n total = total + total1;\n total = Math.round(total * 100) / 100;\n }\n document.getElementsByClassName(\"subtotal3\")[0].innerText = \"$\" + total;\n }", "function updateCartTotal(){\n\tvar cartItemContainer = document.getElementsByClassName(\"cart-items\")[0];\n\tvar cartRows = cartItemContainer.getElementsByClassName(\"first-cart-row\");\n\tvar total = 0;\n\tfor (var i = 0; i < cartRows.length; i++) {\n\t\tvar cartRow = cartRows[i];\n\t\tvar priceElement = cartRow.getElementsByClassName(\"cart-price\")[0];\n\t\tvar quantityElement = cartRow.getElementsByClassName(\"cart-quantity-input\")[0];\n\t\tvar price = parseFloat(priceElement.innerText.replace(\"$\",\"\"));\n\t\tvar quantity = quantityElement.value;\n\t\ttotal = total + (price * quantity);\n\t}\n\ttotal = Math.round(total * 100) / 100;\n\tdocument.getElementsByClassName(\"cart-total-price\")[0].innerText = \"$\" + total;\n}", "function updateCartTotal() {\r\n var cartItemContainer = document.getElementsByClassName(\"cart-items\")[0];\r\n var cartRows = cartItemContainer.getElementsByClassName(\"cart-row\");\r\n var total = 0;\r\n for (var i = 0; i < cartRows.length; i++) {\r\n var cartRow = cartRows[i];\r\n var priceElement = cartRow.getElementsByClassName(\"cart-price\")[0];\r\n var quantityElement = cartRow.getElementsByClassName(\"cart-quantity-input\")[0];\r\n var price = parseFloat(priceElement.innerText.replace(\"€\", \"\"));\r\n var quantity = quantityElement.value;\r\n total = total + (price * quantity);\r\n }\r\n total = Math.round(total * 100) / 100;\r\n document.getElementsByClassName(\"cart-total-price\")[0].innerText = \"€\" + total;\r\n }", "function updateSubTotal() {\r\n\r\nlet subTotal = 0;\r\ncartItems.forEach(function(item){\r\n subTotal = subTotal + item.price;\r\n console.log(subTotal);\r\n});\r\n document.getElementById(\"val\").innerHTML = \"Total = N\" + subTotal.toFixed(2);\r\n}", "function updateTotal() {\n\n}", "function updateCartTotal() {\n //Get all the items in the cart with the class name cart-item-row\n let cartItemRows = document.getElementsByClassName(\"cart-item-row\");\n\n let total = 0;\n // For each item in the cart, run a loop that gets the quantity input and price of the item. Add all of them to the total amount in the cart. \n for (let i = 0; i < cartItemRows.length;i++){\n let cartItemRow = cartItemRows[i];\n let priceItem = cartItemRow.getElementsByClassName('cart-item-price')[0];\n let quantityItem = cartItemRow.getElementsByClassName('cart-quantity-input')[0];\n let price= parseFloat(priceItem.innerText.replace('R',''));\n let quantity = quantityItem.value;\n //increment the total amount in the cart by the price and quantity of each item in the cart. \n total = total + (price * quantity)\n \n }\n document.getElementsByClassName('cart-total-amount')[0].innerText = \"Total Amount: R\"+ total;\n }", "function updateCartTotal() {\n var cartItemContainer = document.getElementsByClassName(\"cart-items\")[0];\n var cartRows = cartItemContainer.getElementsByClassName(\"cart-row\");\n var total = 0;\n for (var i = 0; i < cartRows.length; i++) {\n var cartRow = cartRows[i];\n var priceElement = cartRow.getElementsByClassName(\"cart-price\")[0];\n var quantityElement = cartRow.getElementsByClassName(\n \"cart-quantity-input\"\n )[0];\n var price = parseFloat(priceElement.innerText.replace(\"$\", \"\"));\n var quantity = quantityElement.value;\n total = total + price * quantity;\n }\n document.getElementsByClassName(\"cart-total-price\")[0].innerText = total;\n}", "function updateCartTotal(){\n let cartItemContainer = document.querySelectorAll(\"#shoppingReminder\")[0];\n let cartRows = cartItemContainer.querySelectorAll(\"#shoppingRow\");\n let subTotal = 0 ;\n for (let i = 0 ; i<cartRows.length; i++){\n let cartRow = cartRows[i];\n let productPrice = cartRow.querySelectorAll(\".productPrice\")[0];\n let price = parseFloat(productPrice.innerText.replace('€',\"\"));\n let subTotalCount = document.querySelector(\"#subtotalcount\");\n subTotal += price;\n subTotalCount.innerHTML = subTotal +\"€\";\n }\n let totalCount = document.querySelector(\"#totalcount\");\n let delivery = document.querySelector(\"#deliverycost\")\n let deliveryCost =0 ;\n if(deliveryCost == 0 || null){\n delivery.innerHTML = \"Offerte\";\n }else{\n delivery.innerHTML = deliveryCost + \"€\";\n }\n totalCount.innerHTML = (subTotal + deliveryCost) + \"€\"; \n}", "function updateCartTotal() {\n var cartItemContainer = document.getElementsByClassName('cart-items')[0]\n var cartRows = cartItemContainer.getElementsByClassName('cart-row')\n var total = 0\n var quantityN = 0\n for (var i = 0; i < cartRows.length; i++) {\n var cartRow = cartRows[i]\n var priceElement = cartRow.getElementsByClassName('cart-price')[0]\n var cartPriceItem = cartRow.getElementsByClassName('cart-price-item')[0]\n var quantityElement = cartRow.getElementsByClassName('cart-quantity-input')[0]\n\n var price = priceElement.innerText.replace(' đ', '')\n var replaceAllPrice = price.replaceAll('.','')\n\n var quantity = quantityElement.value\n total = total + (replaceAllPrice * quantity)\n quantityN = parseFloat(quantityN + Number(quantity))\n //Format price item\n cartPriceItemFormat = replaceAllPrice * Number(quantity)\n cartPriceItem.innerText = new Intl.NumberFormat('vi').format(cartPriceItemFormat)\n }\n total = Math.round(total)\n document.getElementsByClassName('cart-total-price')[0].innerText = new Intl.NumberFormat('vi').format(total)\n document.getElementsByClassName('cart-total-quantity')[0].innerText = quantityN\n}", "function updateCartTotal() {\n // let total = 0\n // let cartItemsContainerList = document.getElementsByClassName('cart-items')\n // for (let i = 0; i < cartItemsContainerList.length; i++){\n // let cartRows = cartItemsContainerList[i].getElementsByClassName('cart-row')\n // for (let j = 0; j < cartRows.length; j++) {\n // let cartRow = cartRows[j]\n // let priceElement = cartRow.getElementsByClassName('cart-price')[0]\n // let quantityElement = cartRow.getElementsByClassName('cart-quantity-input')[0]\n // let price = parseFloat(priceElement.innerText.replace('€', ''))\n // let quantity = quantityElement.value\n // total = total + (price * quantity)\n // }\n var cartItemContainer = document.getElementsByClassName('cart-items')[0]\n var cartRows = cartItemContainer.getElementsByClassName('cart-row')\n var total = 0\n for (var i = 0; i < cartRows.length; i++) {\n var cartRow = cartRows[i]\n var priceElement = cartRow.getElementsByClassName('cart-price')[0]\n var quantityElement = cartRow.getElementsByClassName('cart-quantity-input')[0]\n var price = parseFloat(priceElement.innerText.replace('€', ''))\n var quantity = quantityElement.value\n total = total + (price * quantity)\n }\n \n total = Math.round(total * 100) / 100 * nombreDeJours;\n \n /******** Affichage du Total du Panier Responsive *****/\n \n let cartTotalPriceArray = document.getElementsByClassName('cart-total-price');\n for (var i = 0; i < cartTotalPriceArray.length; i++) {\n cartTotalPriceArray[i].innerText = total + ' €';\n }\n\n return total;\n}", "function total() {\n var totalValue = 0;\n for (var i = 0; i < cart.length; i++) {\n totalValue += cart[i].itemPrice\n }\n return totalValue;\n}", "function getTotal() {\n const { cart } = state;\n\n const res = cart.reduce((prev, product) => {\n return (prev + (product.price * product.count));\n }, 0);\n\n dispatch({\n type: 'TOTAL',\n payload: res\n });\n }", "function updateTotal() {\n let price = JSON.parse(localStorage.getItem('currPrice'))\n let cartPrice = JSON.parse(localStorage.getItem('priceSum'))\n if (cartPrice){\n localStorage.setItem('priceSum', JSON.stringify(parseFloat(price) + parseFloat(cartPrice)))\n }\n else{\n localStorage.setItem('priceSum', JSON.stringify(parseFloat(price)))\n }\n displayCart()\n}", "total()\r\n\t{\r\n \t\tthis.cart = Cookie.get(this.settings.cookie_name);\r\n\r\n \t\tvar total = 0.00;\r\n \t\tlet i;\r\n\r\n \t\tfor (i = 0; i < this.cart.items.length; i++) {\r\n \t\t\ttotal += parseFloat(this.cart.items[i].price.amount) * this.cart.items[i].quantity;\r\n \t\t}\r\n\r\n \t\treturn total.toFixed(2);\r\n\t}", "function calc_cart_total() {\n shopping_cart_total = calc_total();\n set_cart_total_dom();\n update_shipping_icons();\n update_tax_dom();\n}", "function carttotal() {\n //multipily the price by the number of items in the cart\n producttotal = price * itemcount;\n var formatproducttotal = currencyFormat(producttotal);\n //note we are updating the BTC and Lightning totals here we will have to refactor this code is we ever\n // have a lightning only version of the cart (as stated elsewhere in the notes)\n changeClassText(document.getElementById('sr-lightningtotal'), 'Pay '+formatproducttotal + ' satoshi');\n changeClassText(document.getElementById('sr-bitcointotal'), 'Pay '+formatproducttotal + ' satoshi');\n changeClassText(document.getElementById('sr-checkouttotal'), formatproducttotal);\n //update counter\n changeClassText(document.querySelector('.sr-count'), itemcount);\n //store product\n if (serverless == 0) {\n var url = serverurl + \"api/storeproduct?name=\" + name + \"&quantity=\" + itemcount + \"&btcaddress=\" + btcaddress + \"&price=\" + price;\n //call the store produt endpoint\n fetchurl(url, 'storeproduct')\n }\n }", "function total() {\n var total = 0\n for(var i = 0; i < cart.length; i++){\n total += cart[i].itemPrice\n }\n return total\n}", "function updateTotal() {\n let memoryCost = parseFloat(getElement(\"memory-price\").innerText);\n let storageCost = parseFloat(getElement(\"storage-price\").innerText);\n let deliveryCost = parseFloat(getElement(\"delivery-price\").innerText);\n let total = 1299 + memoryCost + storageCost + deliveryCost; /* total price sum */\n getElement(\"total-price\").innerText = total;\n getElement(\"grand-total-price\").innerText = total;\n}", "function updateCartTotal() {\n var cartItem = document.getElementsByClassName(\"cart-item\");\n var total = 0;\n for (var i = 0; i < cartItem.length; i++) {\n var price = parseFloat(\n cartItem[i]\n .getElementsByClassName(\"item-price\")[0]\n .innerText.replace(\"$\", \"\")\n );\n var quantity = parseInt(\n cartItem[i].getElementsByClassName(\"item-quantity\")[0].innerText\n );\n total = total + price * quantity;\n }\n document.getElementsByClassName(\"subtotal\")[0].innerText = total.toFixed(2);\n document.getElementsByClassName(\"qst\")[0].innerText = (\n 0.09975 * total\n ).toFixed(2);\n document.getElementsByClassName(\"gst\")[0].innerText = (0.05 * total).toFixed(\n 2\n );\n document.getElementsByClassName(\"total\")[0].innerText = (\n parseFloat(document.getElementsByClassName(\"subtotal\")[0].innerText) +\n parseFloat(document.getElementsByClassName(\"qst\")[0].innerText) +\n parseFloat(document.getElementsByClassName(\"gst\")[0].innerText)\n ).toFixed(2);\n }", "function calcTotal() {\n // get the value and parse from session storage\n let cart = JSON.parse(sessionStorage.getItem('cart'));\n\n // define a total variable = 0\n let total = 0;\n\n // loop through all items in the cart\n for (let i in cart) {\n // add each item's price to total\n total += cart[i].price;\n }\n\n // return the total\n return total.toFixed(2);\n }", "function calc_cart_total() {\n shopping_cart_total = calc_total(shopping_cart);\n set_cart_total_dom();\n update_shipping_icons();\n update_tax_dom();\n}", "function updateCartTotal() {\r\n // Reset total to 0\r\n var total = 0;\r\n\r\n // Add each subtotal to total\r\n document.querySelectorAll('.cart-item-subtotal span').forEach(el => {\r\n total = total + parseFloat(el.textContent);\r\n })\r\n\r\n // Display total\r\n document.querySelector('#cart-checkout #total span').textContent = total.toFixed(2);\r\n}", "function updateCheckoutCartTotal() {\r\n let checkoutTotal = 0;\r\n const checkoutCartTotal = document.querySelector('.checkoutCartTotal');\r\n\r\n const checkoutProductItems = document.querySelectorAll('.checkoutProductItem');\r\n\r\n checkoutProductItems.forEach((checkoutCartItem) => {\r\n const checkoutProductPriceItem = checkoutCartItem.querySelector(\r\n '.checkoutProductPrice'\r\n );\r\n const checkoutProductPrice = Number(\r\n checkoutProductPriceItem.textContent.replace('$', '')\r\n );\r\n \r\n checkoutTotal = checkoutTotal + checkoutProductPrice;\r\n \r\n \r\n });\r\n checkoutCartTotal.innerHTML = `${checkoutTotal.toFixed(2)}$`;\r\n \r\n\r\n}", "function updateShoppingCart(addQty) {\n\tvar totalItems = getTotalItemsCart() + addQty;\n\tdocument.getElementById('shopping-cart-text').innerHTML = totalItems + ' items';\n}", "function cartIconQtyUpdate(){\n var totalQty = 0;\n if(cart.length) {\n for(var i=0; i<cart.length; i++) {\n var cartItem = cart[i];\n totalQty += cartItem.quantity;\n }\n $('.qty').html(totalQty);\n } else {\n $('.qty').html(totalQty);\n }\n}", "function updateTotalCartPricing() {\r\n\t $('.cart .pricing').text(formatAsMoney(cart.subtotal));\r\n\t }", "function updateTotal() {\n\t\tgrandTotal = 0;\n\t\tgendiscount = $(\"#gendiscount\").val();\n\t\tgendisctype = $(\"#gendiscounttype\").val();\n\t\tshippingamt = $(\"#shippingamt\").val();\n\n\t\t$.each(prItems, function(index, value) { \n\t\t var total = parseFloat(value.total);\n\t grandTotal += total;\n\t\t});\n\t\t$(\"#totalamt\").val(grandTotal);\n\n\t\tif (gendisctype == 2) {\n\t\t\tgrandDiscount = parseFloat(grandTotal) * (parseFloat(gendiscount) / 100);\n\t\t}\n\t\telse {\n\t\t\tgrandDiscount = gendiscount;\n\t\t}\n\n\t\tdiscountedGrandTotal = (parseFloat(grandTotal) - parseFloat(grandDiscount)) + parseFloat(shippingamt);\n\n\t\tif (discountedGrandTotal <= 0) {\n\t\t\tdiscountedGrandTotal = 0;\n\t\t}\n\n\t\tif (grandTotal > 0) {\n\t\t\t$(\".btnProceed\").prop('disabled',false);\n\t\t}\n\t\telse {\n\t\t\t$(\".btnProceed\").prop('disabled',true);\n\t\t}\n\n\t\t$(\".btnGrandtotal\").html(\"TOTAL: \" + formatMoney(discountedGrandTotal));\n }", "totalCart()\n {\n let total = 0;\n for (let i = 0; i < this.itemlist.length; i++)\n {\n total += this.itemList[1].price * this.itemQuantity[i];\n }\n return total;\n }", "function updateCart(){\n\t\tstorage(['items', 'subtotal'], function(err, col){\n\t\t\t//console.log(\"Cart Collection - \" + JSON.stringify(col));\n\n\t\t\t//items = col[0];\n\t\t\t//subtotal = col[1];\n\n\t\t\tif(console) console.log(\"Items in Cart: \" + items);\n\t\t\tif(console) console.log(\"Subtotal of Cart: \" + subtotal);\n\t\t\t\n\t\t\t// update DOM Here\n\t\t\tdocument.getElementById( _options.itemsEleId ).innerHTML = items;\n\t\t\tdocument.getElementById( _options.subtotalEleId ).value = \"$\" + subtotal.toFixed(2);\n\n\t\t\t// reset default quantity input fields of products\n\t\t\tPRODUCTS.updateProducts();\n\t\t});\n\t}", "function compute_subtotal(items) {\n\t$(\".wddp-shopping-cart\").text(\"Shopping cart total: $\" + Object.values(items).reduce((x, y) => (x + y), 0));\n}", "function calcTotal() {\n // get value and parse sessionStorage\n let cart = JSON.parse(sessionStorage.getItem('cart'));\n\n // loop through all items in the Cart\n // add each items price to Total\n // return total\n let total = 0;\n for (let product in cart) {\n total += cart[product].price;\n }\n return total.toFixed(2)\n}", "function calcTotal(item, status) {\n vm.total[status] += item.cart.total;\n }", "function updateCartTotal() {\n var cartItemContainer = document.getElementsByClassName('cart-items')[0];\n var cartRows = cartItemContainer.getElementsByClassName('cart-row');\n var total = 0;\n for (var i = 0; i < cartRows.length; i++) {\n var cartRow = cartRows[i];\n var priceElement = cartRow.getElementsByClassName('cart-price')[0];\n console.log(priceElement);\n var quantityElement = cartRow.getElementsByClassName('cart-quantity-input')[0];\n var price = parseFloat(priceElement.innerText.replace('$', ''));\n console.log(price);\n var quantity = quantityElement.value;\n console.log(quantity);\n total = total + (price * quantity);\n }\n total = Math.round(total * 100) / 100;\n document.getElementsByClassName('cart-total-price')[0].innerText = '$' + total;\n}", "function getTotal() {\n\t\treturn cart.reduce((current, next) => {\n\t\t\treturn current + next.price * next.count;\n\t\t}, 0);\n\t}", "calculateTotal(price, skuId, qty) {\n let cartListArr = this.props.elcStore.cartList.length ? JSON.parse(this.props.elcStore.cartList) : {};\n if (Object.keys(cartListArr).length && cartListArr[skuId] !== undefined) {\n for (let x in cartListArr) {\n if (x === skuId) {\n cartListArr[skuId] = {qty: cartListArr[skuId].qty + qty};\n }\n }\n } else {\n cartListArr[skuId] = {qty: qty};\n }\n const total = this.state.total + (price * qty);\n const cartList = cartListArr;\n this.props.elcStore.cartListUpdate(total, cartList);\n }", "function getTotal(cart) {\n return totalPrice = cart.reduce((total, currentItem) => total + (currentItem.quantity * currentItem.price), 0).toFixed(2);\n}", "function updateTotal(total) {\n var list = document.querySelector('#yourCart')\n list.lastElementChild.children[1].innerText = \"$\" + total\n}", "function updateCartTotal() {\n const cartItemContainer = document.getElementsByClassName('cart-items')[0]\n const cartRows = cartItemContainer.getElementsByClassName('cart-row')\n let total = 0\n for (let i = 0; i < cartRows.length; i++) {\n const cartRow = cartRows[i]\n const priceElement = cartRow.getElementsByClassName('cart-price')[0]\n const quantityElement = cartRow.getElementsByClassName('quantity')[0]\n const price = parseFloat(priceElement.innerText.replace(/\\u00A3/g, ''))\n const quantity = quantityElement.value\n total = total + (price * quantity)\n }\n const formatter = new Intl.NumberFormat('en-GB', {\n style: 'currency',\n currency: 'GBP',\n minimumFractionDigits: 2\n })\n const newTotal = formatter.format(total)\n document.getElementsByClassName('cart-total-price')[0].innerText = newTotal\n\n}", "function update() {\n $(\"#subtotal\").html(total);\n }", "function calculateTotal(){\n let totalPrice = 0;\n $('#myCart #item').each(function(){\n totalPrice = totalPrice + $(this).data('price');\n })\n $('#price').text(`Total Price:Rs.${totalPrice}/-`)\n }", "function updateCartTotal() {\n ///console.log(\"hereeeee\");\n let tableProducts= document.getElementsByClassName(\"tableCart\")[0];\n let cartRows = tableProducts.getElementsByClassName(\"table-default\");\n console.log(cartRows);\n let total = 0 ;\n for ( var i= 0 ; i < cartRows.length ;i++) {\n // var cartRow = cartRows[i];\n let priceElement = document.getElementsByClassName(\"price\")[0];\n let quantityElement = document.getElementsByClassName(\"form-control\")[0];\n // console.log(priceElement , quantityElement);\n let price = parseFloat(priceElement.innerText.replace(\"$\" , \"\"));\n let quantity = quantityElement.value\n total = total + (price * quantity);\n }\n total = Math.round(total * 100) / 100 ;\n document.getElementsByClassName(\"total-price\")[0].innerText = \"$\" + total; \n}", "function updatetotal(priceofproducts) {\n total = total + priceofproducts\n document.getElementsByClassName(\"total\")[0].innerHTML = total\n }", "function updateCartTotal(currentDessert){\n var cartTotal = currentDessert.getTotalPrice() / 100;\n console.log(cartTotal)\n $(\"#cartTotalPrice\").text(cartTotal.toFixed(2));\n}", "function reSubTotal(){\n var subtotal = 0;\n for(var i = 0; i<$scope.listCartItems.length;i++){\n subtotal += $scope.listCartItems[i].proPrice*$scope.listCartItems[i].quantity;\n }\n $scope.subtotal = subtotal;\n }", "function total() {\n for (var i = 0; i < cart.length; i++){\n \n getCart()[i].itemPrice\n return \n }\n}", "total() {\n var total = 0.0\n for (var sku in this.items) {\n var li = this.items[sku]\n var price = li.quantity * li.price\n total += price\n }\n return total\n }", "calculateTotal() {\n\t\t//Réinitialise le total\n\t\tthis.total = 0\n\t\tfor (let product of this.products) {\n\t\t\tthis.total += product.price * product.number\n\t\t}\n\t}", "function updateTotalPrice() {\n cartPrice = cartContainer.getElementsByClassName(\"cartPrice\");\n totalPrice = 0;\n for (let i = 0; i < cartPrice.length; i++) {\n totalPrice =\n totalPrice + parseInt(cartPrice[i].innerText.replace(\"Rs.\", \"\"));\n }\n cartTotalPrice = document.getElementsByClassName(\n \"cartTotalPrice\"\n )[0].innerText = new Number(totalPrice).toLocaleString(\"en\");\n}", "function calcTotalCart(item){\n //console.log(\"item count\" + item.count);\n total = total + item.count;\n var productName = products.find(y => y.id == item.id).name;\n //Display each individual item name and it's individual count\n console.log(productName + \" - Quantity = \" + item.count);\n }", "function updateTotal(itemID) {\n console.log('Update Total Function Called')\n const basketPriceArray = document.querySelectorAll('.basket-price')\n let total = 0\n for(i=0; i<basketPriceArray.length; i++) {\n total = parseFloat(basketPriceArray[i].textContent) + total\n }\n basketTotalAmount.textContent = (total).toFixed(2)\n}", "function updateCartTab(value) {\n if (sessionStorage.getItem(\"itemTotal\") != null) {\n sessionStorage.setItem(\n \"itemTotal\",\n parseInt(sessionStorage.getItem(\"itemTotal\")) + parseInt(value)\n );\n } else {\n sessionStorage.setItem(\"itemTotal\", value);\n }\n showShowCartTab();\n }", "function updateSubtot(product) {\n let sum = 0;\n for (let i = 0; i < rows.length; i++) {\n let currentProduct = rows[i];\n let subTotal = currentProduct.querySelector('.subtot');\n let quantity = currentProduct.querySelector('.qty input').value;\n let currPrice = currentProduct.querySelector('.pu span').innerHTML;\n subTotal.innerHTML =\n '$' + (Number(quantity) * Number(currPrice)).toFixed(2);\n sum += Number(quantity) * Number(currPrice);\n }\n total = sum.toFixed(2);\n // calcAll();\n //we could use calcAll(), so when we add qty it could calculate total at same time.\n //instead of extra click for total.\n}", "function getTotal(cart, totalAmount){\n for(var i=0; i<cart.length; i++){\n var totalAmount = parseInt(cart[i].subtotal) + totalAmount;\n }\n console.log(\"total is \" + totalAmount);\n return totalAmount;\n }", "function updateItemTotal() {\n var quantity = $(\"#ac_item_quantity\").val();\n var price = $(\"#ac_item_price\").val();\n var discount = $(\"#ac_item_discount\").val();\n \n if(isNumeric(quantity) && isNumeric(price) && isNumeric(discount)) {\n var total = quantity * price;\n total -= total * (discount / 100);\n\n $(\"#ac_item_total\").html(\"$\" + total);\n } else {\n $(\"#ac_item_total\").html(\"$0.00\");\n }\n}", "setCartValues(cart) {\n let tempTotal = 0;\n let itemTotal = 0;\n\n cart.map(item => {\n tempTotal += item.price * item.amount;\n itemTotal += item.amount;\n });\n\n cartTotal.innerText = parseFloat(tempTotal.toFixed(2));\n cartItems.innerText = itemTotal;\n }", "cartTotal() {\n return this.total;\n }", "total(){\n var total = 0;\n for(var i = 0; i<this.state.cart.length; i++){\n total += this.state.cart[i].totalPrice\n }\n return total \n }", "function addTotal(res, mysql, complete, p_id, cust_id){\n var sql = \"UPDATE Shopping_cart SET total = total + (SELECT price FROM Product WHERE p_id=?) WHERE cust_id=?;\";\n var inserts = [p_id, cust_id];\n mysql.pool.query(sql, inserts, function(error, results, fields){\n if(error){\n res.write(JSON.stringify(error));\n res.end();\n }\n complete();\n });\n }", "function totalCart() {\n\tlet total = 0;\n\tcart.forEach(function (product) {\n\t\ttotal = total + product.price * product.quantity;\n\t});\n\tdocument.getElementById(\"price_total\").textContent = total + \" €\";\n\tlocalStorage.setItem(\"totalCart\", total);\n}", "function updateBasketTotal(addToTotal) {\n currTotal = $(\"#basket-total\").text();\n currTotal = Number(currTotal.substring(1,currTotal.length));\n basketTotal = currTotal + Number(addToTotal);\n \n basketTotal = \"&pound\" + Number(basketTotal).toFixed(2);\n $(\"#basket-total\").html(basketTotal);\n}", "function getCartTotalAmount(){\n var total = 0;\n for(var i =0; i < cart_items.length; i++){\n var item = getItemById(cart_items[i][0]);\n total += item[4] * cart_items[i][1];\n }\n return total;\n}", "function handleUpdate(e) {\n\tfor (let name in updatedQuantity) { // sample updatedQuantity: {usmc fitness book: \"20\", usmc pt shirt 1: \"9\"}\n\t\tcart.updateCart(name, +updatedQuantity[name])\n\t}\n\treRenderTableBody();\n\trenderCartTotal();\n}", "function updateTotalPriceInCart(clckEle, opr) {\n\t//change the total price\n\t//get the price first\n\tvar totEle = $('#cart-tot'), tot=parseInt(totEle.attr('data-total')),\n\t\tprodPrice=parseInt(clckEle.attr('data-price')), finalPrice;\n\n\t//perform calculation\n\tif(opr === '+')\n\t\tfinalPrice = tot + prodPrice;\n\telse\n\t\tfinalPrice = tot - prodPrice;\n\n\t//add to total\n\ttotEle.text('Total: '+finalPrice).attr('data-total', finalPrice);\n\n}", "function findSum() {\n tot = 0;\n for (var i = 0; i < cart.length; i++) {\n tot = tot + cart[i].price\n\n\n //append the new total to html\n $('.total').text(tot);\n }\n\n}", "function updateTotal() {\n\t$(\"#wep\").find(\".ticks\").change(function() {\n\t\t$(\"#total\").find(\".ticks\").val($(\"#wep\").find(\".ticks\").val());\n\t}); \n\n\tfor (var i = 0; i < sumSlots.length; i++) {\n\t\tsetChangeFn(sumSlots[i]);\n\t}\n}", "function updateTotal(){\n let unitCosts = document.querySelectorAll('input.unitCost');\n let quantities = document.querySelectorAll('input.quantity');\n let grandTotalGauge = document.querySelector('#invoice-items-total span');\n let grandTotal = 0;\n for (var i = 0; i < unitCosts.length; i++) {\n itemCost = unitCosts[i].value * quantities[i].value;\n grandTotal += itemCost;\n }\n grandTotalGauge.innerHTML = grandTotal;\n}", "function updateTotal(value) {\n // Get the runningTotal from the DOM\n var totalLineItem = document.getElementById('total-line-item');\n\n // update the runningTotal value by adding our new value to it\n runningTotal += value;\n // Update the DOM with our new runningTotal to two decimal points\n totalLineItem.innerHTML = runningTotal.toFixed(2)+\"€\";\n\n // We're done now so clear the value from the input box\n clearForm();\n}", "function calculateTotal(cart_id) {\n axios\n .get(\"/api/calculate_amount/\" + cart_id)\n .then(response => {\n // console.log(\"SUM ==\", response.data);\n setTotal(response.data);\n })\n .catch(error => {\n console.log(error.response.data.errors);\n });\n }", "function updateTotal(){\n const bestDaam = parseInt(bestPrice.innerText);\n const memoryDaam = parseInt(memoryCost.innerText);\n const storageDaam = parseInt(storageCost.innerText);\n const deliveryDaam = parseInt(deliveryCost.innerText);\n \n const grandTotal = bestDaam + memoryDaam + storageDaam + deliveryDaam ;\n\n totalPrice.innerText = grandTotal;\n\n newtotal.innerText = grandTotal;\n}", "function Total(){\n TotalGrand = 0.0;\n ShoppingCartScreen.totalvalue.text = \"\";\n ShoppingCartScreen.statictotal.text = \"\";\n if (arrayShoppingCart.length > 0) {\n for (var k = 0; k < arrayShoppingCart.length; k++) {\n TotalGrand = TotalGrand + arrayShoppingCart[k].cartdetailproductprice;\n ShoppingCartScreen.Totalcontent.isVisible = true;\n ShoppingCartScreen.totalvalue.text = \"$ \" + TotalGrand.toFixed(2);\n ShoppingCartScreen.statictotal.text = \"Total: \";\n }\n }\n freeShippingQualifiesLbl();\n}", "function total() {\n let totalCost = 0\n for (var i = 0; i < cart.length; i++) {\n for (var item in cart[i]) {\n totalCost += cart[i][item]\n }\n }\n return totalCost\n}", "function showTotal() {\n var total = 0;\n const item = JSON.parse(localStorage.getItem(\"cartItem\"));\n item.forEach(item => {\n total += parseInt(item.price);\n })\n\n if (document.getElementById('cart-total') != null) {\n document.getElementById('cart-total').textContent = total;\n\n }\n\n\n}", "updateSum () {\n const totals = document.getElementsByClassName('product__price')\n let productsPrice = 0\n\n // Add all the total prices of the products\n for (const total of totals) {\n productsPrice += parseInt(total.textContent.replace('€', ''), 10)\n }\n\n // Updates the subtotal and total in the summary\n const productsTotal = app.getProductsCount()\n document.querySelector('.products__total').textContent = productsTotal + ' article' + (productsTotal > 1 ? 's' : '')\n document.querySelector('.subtotal__price').textContent = '€ ' + productsPrice\n document.querySelector('.total__price').textContent = '€ ' + productsPrice\n }", "function setTotal() {\n vm.total = 0;\n for (var i = vm.selectedExams.length - 1; i >= 0; i--) {\n vm.total = vm.total + vm.selectedExams[i].price;\n };\n\n }", "function calTotal() {\n var ttotal = 0;\n var total = \"\"\n // totalDiv.innerHTML =total\n for (var x = 0; x < cart.length; x++) {\n var skuu = cart[x].sku;\n // console.log(skuu)\n var cat = cart[x].categoryId\n // console.log(cat)\n var pret;\n\n // console.log(pret)\n for (var j = 0; j < products[cat].length; j++) {\n // console.log(products[cat][j])\n if (products[cat][j].sku == skuu) {\n pret = products[cat][j].price;\n // console.log(pret)\n // console.log(pret)\n\n ttotal += pret * cart[x].qty\n //console.log(\"ttotal= \"+ttotal)\n }\n }\n }\n totalDiv.innerHTML = \"total = \" + ttotal + \" lei\";\n }", "incTotal(delta: number = 1) {\n const { total } = this.getState();\n this.setTotal(total + delta);\n }", "function update_cart_qty_in_sideCart_and_cart_plus(id) {\n\n var secPID = id;\n var qty = $('#cartQty'+id).val();\n var qty =parseFloat(qty) + parseInt(1);\n $('#cartQty'+id).val(qty);\n \n $.ajax({\n url: '/update_to_cart',\n method:\"GET\",\n data:{ \n secPID:secPID,\n qty: qty,\n },\n success: function (response) {\n var grndTotal = response['grandtotal'].toFixed(2);\n var setgtotal = $('#indGtotal'+id).text(grndTotal);\n TotalPriceCalc();\n leftCartSidebar();\n //console.log(grndTotal);\n Toastify({\n text: response['status'],\n backgroundColor: \"linear-gradient(to right, #00b09b, #96c93d)\",\n className: \"error\",\n }).showToast();\n }\n });\n\n}", "function Total() {\n let subtotal = 0;\n for (let val of cart) {\n subtotal = total + (val.price * val.qtty);\n }\n\n /* Display subtotal*/\n document.getElementById(\"sub-total-price\").innerHTML = total.toFixed(2) + \" €\";\n\n /* Calculate price after discount*/\n let total = subtotal - Discount(subtotal);\n\n /* Display order total*/\n document.getElementById(\"total-price\").innerHTML = total.toFixed(2) + \" €\";\n}", "function getTotalPrice(cart) {\n\tvar sum = 0\n\tcart.forEach(p => {\n\t\tsum += p.price;\n\t})\n\treturn sum\n}", "function productTotal() {\n for (let i = 0; i < basket.length; i++) {\n let price = Number(basket[i].price.replace(/[^0-9.-]+/g,\"\"));\n let totalPrice = price * basket[i].quantity;\n basket[i].totalPrice = totalPrice\n } \n}", "function calcAll() {\n let subTotal = 0;\n [...cart.children].forEach(product => subTotal += updateSubtot(product));\n document.querySelector('h2 > span').innerHTML = subTotal;\n}", "function updateCounter() {\n var itemCountEl = document.getElementById('itemCount');\n var add = 0;\n\n for (var i =0; i < cart.items.length; i++) {\n add += cart.items[i].quantity;\n }\n itemCountEl.textContent = add;\n}", "function calcTotals() {\n\n var taxRate = 0.085;\n\n // Reset totals to recalculate.\n cart.totals.qty = 0;\n cart.totals.price = 0;\n cart.totals.tax = 0;\n cart.totals.subtotal = 0;\n cart.totals.total = 0;\n\n if (cart.items.length) {\n for (var x = 0; x < cart.items.length; x++) {\n\n cart.totals.qty += cart.items[x].qty;\n\n if (cart.items[x].sale) {\n cart.totals.price += cart.items[x].qty * cart.items[x].salePrice;\n } else {\n cart.totals.price += cart.items[x].qty * cart.items[x].listPrice;\n }\n\n }\n\n if (cart.shipping == 'Ground Shipping' && cart.totals.price > 500) {\n cart.totals.shipping = 0;\n } else if (cart.shipping) {\n cart.totals.shipping = cart.shippingmethods[cart.shipping].price;\n }\n\n cart.totals.subtotal = Math.round((cart.totals.price + cart.totals.shipping) * 100) / 100;\n\n cart.totals.tax = Math.round((cart.totals.price * taxRate) * 100) / 100;\n\n cart.totals.total = Math.round((cart.totals.subtotal + cart.totals.tax) * 100) / 100;\n\n } else {\n cart.totals.shipping = 0;\n cart.totals.price = 0;\n }\n\n }", "function getTotal() {\n let total = 0;\n\n shoppingCart.forEach(product => {\n total += product.price * product.stock_quantity;\n });\n console.log(\"this is the total\", total);\n return total;\n }", "function update_total() {\n var total = 0;\n var taxrate =$('#tax_rate').find(':selected').data('rate');\n //var totalamount = 0;\n $('.item_total').each(function(i) {\n item_total = $(this).html().replace(\"$\", \"\");\n if (!isNaN(item_total))\n total += Number(item_total);\n });\n\n subtotal = parseFloat(total);\n\n taxtotal = parseFloat(subtotal * taxrate / 100);\n\n total = roundNumber(subtotal + taxtotal, 2);\n\n $('span.subtotal').html(roundNumber(subtotal, 2));\n $('.subtotal').val(roundNumber(subtotal, 2));\n \n $('#taxtotal').html(roundNumber(taxtotal, 2));\n \n $('#invoice_total_tax').val(taxtotal);\n \n $('#total').html(total);\n $('.total').val(total);\n\n update_balance();\n}", "function updateTotal() {\n let previousTotalPrice = document.getElementById('total-price');\n let previousTotalAmount = document.getElementById('total-amount');\n\n const fixedPrice = Number(bestPrice.innerText);\n const extraMemoryCost = Number(extraMemoryPrice.innerText);\n const extraStorageCost = Number(extraStoragePrice.innerText);\n const deliveryCost = Number(deliveryCharges.innerText);\n\n newTotalPrice = fixedPrice + extraMemoryCost + extraStorageCost + deliveryCost;\n newTotalAmount = fixedPrice + extraMemoryCost + extraStorageCost + deliveryCost;\n\n previousTotalPrice.innerText = newTotalPrice;\n previousTotalAmount.innerText = newTotalAmount;\n\n}", "function calcTotalPrice() {\n let totalPricePrev = 0;\n cartItems.forEach((item) => {\n prices.forEach((price) => {\n if (price.beername === item.beer) {\n totalPricePrev += item.amount * price.price;\n }\n });\n });\n setTotalPrice(totalPricePrev);\n }", "function updateCartTotal(){\r\n let containerColumn = document.querySelector('.container-column');\r\n let containerRow = containerColumn.children;\r\n let total = 0;\r\n \r\n for(let i = 0; i < containerRow.length; i++){\r\n let cartPrice = containerRow[i].children[2].innerText;\r\n let cartQuantity = containerRow[i].children[3].children[0].children[1].innerText;\r\n total += cartPrice * cartQuantity;\r\n }\r\n\r\n document.querySelector('#total span').innerHTML = total;\r\n}", "calculateTotal() {\n let products = this.state.invoiceItems;\n let total = 0;\n products.forEach((el) => {\n total += el.price * el.quantity\n });\n\n if (this.state.discount) {\n total *= (100 - this.state.discount) / 100;\n }\n\n this.setState({\n total: (total).toFixed(2)\n }, this.updateInvoiceAPI);\n }", "function changeTotalPayment() {\n let totalElement = $('#amount-total')\n let subTotals = $('.subtotal')\n let totalAmount = 0\n\n for (const subtotal of subTotals) {\n let subT = parseFloat($(subtotal).text())\n\n totalAmount += subT\n }\n\n totalElement.text(totalAmount)\n if (totalAmount === 0) {\n $('.empty-cart-message').show()\n }\n}", "function calculateTotal(){\n\t\tlet basketTotalContainer = document.querySelector('#basket-total');\n\t\tlet basketCount = document.querySelector('#basket-count');\n\t\tlet minibasketTotal = document.querySelector('#mini-basket-total');\n\t\tbasketTotalContainer.innerHTML = '';\n\t\tbasketCount.innerHTML = '';\n\t\tminibasketTotal.innerHTML = '';\n\t\tlet basket = document.querySelector('.basket tbody'), basketTotalVal = 0, basketTotalItems = 0, basketTotalValCurrency;\n\t\tfor(let i = 0; i < (basket.rows.length); i++){\n\t\t\tlet rowTotal = Number(basket.rows[i].cells[2].innerHTML);\n\t\t\tlet itemsTotal = Number(basket.rows[i].cells[1].childNodes[0].innerHTML);\n\t\t\tbasketTotalVal = basketTotalVal + rowTotal;\n\t\t\tbasketTotalValCurrency = basketTotalVal.toFixed(2);\n\t\t\tbasketTotalItems = basketTotalItems + itemsTotal;\t\t\n\t\t};\n\t\tbasketTotalContainer.innerHTML = basketTotalValCurrency;\n\t\tbasketCount.innerHTML = basketTotalItems;\n\t\tminibasketTotal.innerHTML = basketTotalValCurrency;\n\t\t// avoid 'undefined' if basket is empty\n\t\tif (basketTotalValCurrency == null){\n\t\t\tbasketTotalContainer.innerHTML = '';\n\t\t\tminibasketTotal.innerHTML = '';\n\t\t}\n\t}", "function updatecart() {\r\n //initialize the total variable with 0 (if we don't initialize it our cart will show NaN since it has no value at all)\r\n var total = 0\r\n //we get the value from the quantity input box and we check if it the user gave an input <= than 0 or not given an input at all. If this happened then >>\r\n // we set the value to 1 (there is no point in having a negative or zero or undefined quantity... it will also cause trouble in calculating the total price)\r\n var input = event.target\r\n if (input.value <= 0 || input.value == NaN) {\r\n input.value = 1\r\n }\r\n //cartitem_all gets the element of our shopping cart containing all cart items\r\n var cartitem_all = document.getElementsByClassName('cart-items')[0]\r\n // rows11 gets a list of all the cart rows where each row is a package we have in our shopping cart with all its data \r\n var rows11 = cartitem_all.getElementsByClassName('cart-row')\r\n // we create a loop that goes through every package in our cart (if existing) and executes the commands in {}\r\n for (var i = 0; i < rows11.length; i++) {\r\n // in cartRow we save the package element that we are processing in each time the loop runs\r\n var cartRow = rows11[i]\r\n // we get the price of that package and save it into \"priceElement\"\r\n var priceElement = cartRow.getElementsByClassName('cart-price')[0]\r\n // we get the quantity of that package and save it into \"quantityElement\" NOTE: Here we use [1] since when creating the element we have used the class >>\r\n // \"cart-quantity-input\" 2 times one for styling. So we need to call the 2nd one which is having the actual value\r\n var quantityElement = cartRow.getElementsByClassName('cart-quantity-input')[1]\r\n // we change the type of \"price\" from string to float so we can use it in a math equation. HOWEVER >>\r\n // Before doing so we replace the euro sign with nothing (we remove it) from our variable since we want only the number that makes sense for math equations\r\n var price = parseFloat(priceElement.innerText.replace('€', ''))\r\n // we get the value part of the quantityElement since it is the one containing the number value and we save it in \"quantity\"\r\n var quantity = quantityElement.value\r\n // this is an obvious math equation to calculate the total price. Note that we +total at the beginning since this is in a loop running for each package in the cart\r\n total = total + (price * quantity)\r\n }\r\n // we use the Math.round to avoid having numbers with too many decimals coming from a multiplication. We set them to be with only 2 decimals rounded which >>\r\n // make sense when talking about money\r\n total = Math.round(total * 100) / 100\r\n // we get the \"cart-total-price\" element and we write inside it the euro sign and the number which is rounded to 2 decimals to be displayed in out total price section\r\n document.getElementsByClassName('cart-total-price')[0].innerText = '€' + total\r\n}", "function calcTotal() {\n let total = 0;\n for (let item of itemList) {\n total += Number(item.price);\n }\n console.log(\"this is the total\", total);\n return total;\n }", "function updateCartDetails() {\n var numberOfCartItems = 0;\n totalCost = 0;\n\n for (var i = 0; i < cartItems.length; i++) {\n numberOfCartItems = numberOfCartItems + cartItems[i][3];\n totalCost = totalCost + cartItems[i][2] * cartItems[i][3];\n }\n $(\"#numberOfCartItems\").text(numberOfCartItems);\n $(\"#cartItemTotal\").text(totalCost);\n if (numberOfCartItems > 3) {\n $(\".cart-item-container\").addClass(\"scrollable-menu\");\n } else {\n $(\".cart-item-container\").removeClass(\"scrollable-menu\");\n }\n\n displayCartItems();\n}", "function quantityChanged(event) {\n // var input = event.target;\n updateCartTotal();\n }", "function displayTotal() {\n //get total and store in variable\n let total = getTotal();\n // chnage total in navbar\n $(\"#nav-total\").text(`Total: $${total}`)\n // change total in cart\n $(\"#cart-total\").text(`$${total}`)\n}", "function calc_total(frm){\n\tvar total_cost = 0;\n\tcur_frm.doc.sold_waste_item.forEach(function(_){\n\t\ttotal_cost += _.amount\n\t});\n\tfrappe.model.set_value(cur_frm.doctype,cur_frm.docname, \"total\", total_cost)\n}" ]
[ "0.8479078", "0.84645617", "0.8419032", "0.8037263", "0.79097944", "0.7671906", "0.7626656", "0.7609956", "0.76039535", "0.7600465", "0.7585691", "0.7503699", "0.7468547", "0.7467062", "0.74488014", "0.7448752", "0.74331045", "0.74086994", "0.74055725", "0.7384999", "0.73626536", "0.73623246", "0.7351452", "0.7338816", "0.73191077", "0.7315995", "0.7310343", "0.730846", "0.7302237", "0.72836673", "0.7267687", "0.72609174", "0.7251502", "0.72388345", "0.72314787", "0.7229396", "0.7225835", "0.722256", "0.7184336", "0.7177491", "0.71526116", "0.71495074", "0.7144799", "0.71413237", "0.71375155", "0.7128098", "0.7126845", "0.7121495", "0.7111256", "0.71088946", "0.71032786", "0.7093863", "0.7093531", "0.7084422", "0.70732045", "0.7060304", "0.7039757", "0.7015867", "0.70155746", "0.7014018", "0.7000052", "0.6989928", "0.69719034", "0.6971488", "0.6968083", "0.6966871", "0.6959554", "0.695117", "0.6943865", "0.6933749", "0.6923345", "0.6916778", "0.69145745", "0.6911948", "0.6903732", "0.6897825", "0.6887199", "0.68784386", "0.6865859", "0.68381894", "0.68363434", "0.68167186", "0.6814009", "0.680968", "0.6789421", "0.6782649", "0.6775351", "0.67729735", "0.676033", "0.6746617", "0.6745992", "0.6734359", "0.67290074", "0.67272013", "0.6723142", "0.6709876", "0.670958", "0.67083186", "0.66993", "0.66986984" ]
0.8257361
3
Add Item add an item to the cart
addItem(newItem) { for (let index in this.items) { let item = this.items[index]; if (item.id === newItem.id) { item.quantity += newItem.quantity; this.updateTotal(); return; } } this.items.push(newItem); this.updateTotal(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addItemToCart() {}", "function addItemToCart() {}", "function addItemToCart(user, item) {}", "function addToCart(item) {\n\t// create item in cart\n\tconst row = document.createElement('tr');\n\n\trow.innerHTML = `\n\t\t<td>\n\t\t\t<img src=\"${item.image}\">\n\t\t</td>\n\t\t<td>\n\t\t\t${item.title}\n\t\t</td>\n\t\t<td class=\"data-price\" data-price=\"${item.priceData}\">\n\t\t\t${item.price}\n\t\t</td>\n\t\t<td>\n\t\t\t<ion-icon name=\"close\" class=\"remove\" data-id=\"${item.id}\"></ion-icon>\n\t\t</td>\n\t`;\n\n\tshoppingCartCont.appendChild(row);\n\n\t// calculate price\n\tcalculatePrice(item);\n\n\t// update count of items in 'itemAmount'\n\titemAmount.innerHTML = shoppingCartCont.childElementCount;\n\n\t// apply 'in basket' effect\n\tif (shoppingCartCont.childElementCount > 0) {\n\t\titemAmount.classList.add('active');\n\t}\n\n\t// save item into local storage\n\tsaveIntoStorage(item);\n}", "function plusItem() {\n const productId = this.name;\n const cartList = JSON.parse(sessionStorage.getItem(\"shoppingCartItems\"));\n const item = cartList.find(product => product.id == productId);\n cartList.push(item);\n sessionStorage.setItem(\"shoppingCartItems\", JSON.stringify(cartList));\n shoppingCartCount();\n populateShoppingCartPage();\n}", "function addItemToCart(item, itemQuantity){\n if(isNaN(itemQuantity)){\n itemQuantity = 1; \n }\n var itemIsNew = true; \n cart.forEach(function (cartItem){\n if(cartItem.name === item.name){\n cartItem.quantity += itemQuantity; \n updateQuantityDisplay(cartItem); \n return itemIsNew = false\n } \n })\n if(itemIsNew){\n cart.push(item); \n item.quantity = itemQuantity; \n displayItem(item, itemQuantity, \".cart-container\")\n }\n}", "function onClickActionAddCartItem(e){\n\t\t\n\t\tvar html = '';\n\t\tlet itemId = parseInt(e.currentTarget.dataset.itemid);\n\t\tvar it = DB.getItemInfo( itemId );\n\t\tvar content = CashShop.ui.find('.container-cart');\n\t\tconst itemCart = CashShop.cartItem.find(i => i.itemId === itemId);\n\t\tvar item = [];\n\t\tvar tab = 0;\n\t\tif(CashShop.activeCashMenu !== 'SEARCH_RESULT'){\n\t\t\titem = CashShop.cashShopListItem[CashShop.activeCashMenu].items.find(i => i.itemId === itemId);\n\t\t\ttab = CashShop.cashShopListItem[CashShop.activeCashMenu].tabNum;\n\t\t} else {\n\t\t\titem = CashShop.csListItemSearchResult.find(i => i.itemId === itemId);\n\t\t\ttab = item.tab;\n\t\t}\n\n\t\tif(content.find('#cart-list .items .no-items').length > 0){\n\t\t\tcontent.find('#cart-list .items .no-items').remove();\n\t\t}\n\n\t\tif(CashShop.cartItem.length > 4 && typeof itemCart === 'undefined'){\n\t\t\t//only 5 item can store in cart\n\t\t\tUIManager.showMessageBox( '5 Item can only stored in cart!', 'ok');\n\t\t\treturn;\n\t\t}\n\n\t\tif(item.amount >= 99){\n\t\t\tUIManager.showMessageBox( 'Max Quantity 99!', 'ok');\n\t\t\tChatBox.addText( 'Max Quantity 99!', ChatBox.TYPE.ERROR);\n\t\t\treturn;\n\t\t}\n\n\t\tif(typeof itemCart === 'undefined'){\n\t\t\titem.amount = 1;\n\t\t\titem.tab = tab;\n\t\t\tCashShop.cartItem.push(item);\n\t\t\thtml = `<li class=\"item\" data-index=\"${itemId}\">\n\t\t\t\t\t<div class=\"inner-item-dt\">\n\t\t\t\t\t\t<div class=\"delete-item\"><button>x</button></div>\n\t\t\t\t\t\t<div class=\"item-dt-img\"></div>\n\t\t\t\t\t\t<div class=\"item-dt-desc\">\n\t\t\t\t\t\t\t<div class=\"item-desc-top\">${it.identifiedDisplayName}</div>\n\t\t\t\t\t\t\t<div class=\"item-counter\">\n\t\t\t\t\t\t\t\t<div class=\"item-cnt\">${item.amount}</div>\n\t\t\t\t\t\t\t\t<button class=\"counter-btn item-cnt-up\" data-index=\"up\"></button>\n\t\t\t\t\t\t\t\t<button class=\"counter-btn item-cnt-down\" data-index=\"down\"></button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"item-desc-price\">\n\t\t\t\t\t\t\t\t<div class=\"icon-gold-coin\"></div>\n\t\t\t\t\t\t\t\t<span>${item.price}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</li>`;\n\t\t\tcontent.find('.items').append(html);\n\t\t\tClient.loadFile( DB.INTERFACE_PATH + 'collection/' + ( it.identifiedResourceName ) + '.bmp', function(data){\n\t\t\t\tcontent.find('.item[data-index=\"'+ itemId +'\"] .item-dt-img').css('backgroundImage', 'url('+ data +')');\n\t\t\t});\n\n\t\t\tClient.loadFile( DB.INTERFACE_PATH + 'cashshop/img_shop_itemBg2.bmp', function(data){\n\t\t\t\tcontent.find('.item-counter').css('backgroundImage', 'url('+ data +')');\n\t\t\t});\n\t\t} else {\n\t\t\titemCart.amount += 1;\n\t\t\tcontent.find('.items .item[data-index=\"'+itemId+'\"] .item-cnt').html(itemCart.amount);\n\t\t}\n\t\tCashShop.cartItemTotalPrice = CashShop.cartItem.map(item => item.price * item.amount).reduce((prev, next) => prev + next);\n\t\tCashShop.ui.find('.container-cart-footer .item-desc-price span').html(CashShop.cartItemTotalPrice);\n\t}", "function addItem( item ){\n cart.push(item);\n return cart;\n}", "addItemsToCart() {\n\n Model.addItemsToCart(this.currentItems);\n }", "function addToCart()\n\t{\n\t\t// avoid adding to cart before the item info is fetched\n\t\t// if( product.ASIN === undefined) return ;\n\t\tif( product === undefined) return ;\n\t\t\n\t\tvar newItem = Object.assign({}, product); \n\t\tnewItem.ID \t\t= Date.now();\n\t\t\n\t\t// console.log( \"product id: \" + newItem.ID );\n\t\tnewProduct = \"<tr>\"\n\t\t\t\t\t\t+ \"<td><img src=\\\"\"+ newItem.Image_url + \"\\\" class=\\\"thumbnail\\\" /> </td>\"\n\t\t\t\t\t\t+ \"<td>\"+ newItem.Color\t\t\t+\"</td>\"\n\t\t\t\t\t\t+ \"<td>\"+ newItem.Size\t\t\t+\"</td>\"\n\t\t\t\t\t\t+ \"<td>\"+ newItem.PriceSAR\t\t+\" ريال</td>\"\t\t\t\t\t\t\n\t\t\t\t\t\t+ \"<td>\"+ newItem.TaxSAR\t\t+\" ريال</td>\"\t\t\t\t\t\t\n\t\t\t\t\t\t+ \"<td>\"+ newItem.ShippingCost\t+\" ريال </td>\"\t\t\t\t\t\t\n\t\t\t\t\t\t+ \"<td> <i class='fi-x removeItem button alert' id='\"+ newItem.ID +\"'></i></td>\"\n\t\t\t\t\t\t+ \"</tr>\";\n\t\t\t\t\t\t\n\t\t$('#items > tbody:last-child').append(newProduct);\n\t\t$(\"#addToCartBtn\").notify(\"تم إضافته لسلة المشتريات\", {className:\"success\"});\n\t\t$(\"#itemsList\").slideDown();\n\t\t\n\t\t// save cart\n\t\tsaveCart(\"add\", newItem.ID);\n\t\t\n\t\t// start observer for remove from cart button\n\t\tobserveRemoveBtn();\n\t\t\n\t\t// add to invoice\n\t\taddToInvoice(newItem);\n\t}", "add() {\n\t\torinoco.cart.add({ imageUrl: this.imageUrl, name: this.name, price: this.price, _id: this._id });\n\t}", "add(id, product) {\n // if an item exists in the cart\n const item = this.items[id]\n ? new CartItem(this.items[id])\n : new CartItem({ id, product });\n\n // increment the items quantity\n item.qty += 1;\n // Update the items price\n item.price = item.product.price * item.qty;\n\n this.items = {\n ...this.items,\n [id]: item\n };\n }", "addItem(item)\r\n\t{\r\n\t\tif (typeof item != 'object') {\r\n\t\t\tthrow new InvalidArgumentException('addItem() expect the first parameter to be an object, but ' + typeof item + ' was passed instead');\r\n\t\t}\r\n\r\n\t\tif (! item.hasOwnProperty('id')) {\r\n\t\t\tthrow new InvalidCartItemException;\r\n\t\t}\r\n\r\n\t\tthis.cart = Cookie.get(this.settings.cookie_name);\r\n\r\n\t\tif (!item.hasOwnProperty('quantity')) {\r\n\t\t\titem.quantity = 1;\r\n\t\t}\r\n\r\n\t\tlet i;\r\n\t\tlet incremented = false;\r\n\r\n\t\tfor (i = 0; i < this.cart.items.length; i++) {\r\n\t\t\tif (this.cart.items[i].id == item.id) {\r\n\t\t\t\tthis.cart.items[i].quantity++;\r\n\t\t\t\tincremented = true;\r\n\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (! incremented) {\r\n\t\t\tthis.cart.items.push(item);\r\n\t\t}\r\n\r\n\t\tCookie.set(this.settings.cookie_name, this.cart, 2);\r\n\t}", "add_item(item){\n this.cart.push(item);\n }", "function addItemToCart(user, item) {\n\n}", "function addOneItemToCart() {\n var itemID = $(this).attr(\"id\");\n var positionInCart = itemID.slice(12, itemID.length);\n cartItems[positionInCart][3] += 1;\n updateCartDetails();\n}", "function addToCart(newItem) {\n console.log(newItem);\n const index = findCartItem(\n newItem.product.id,\n newItem.toppings,\n newItem.remark\n );\n\n if (index === -1) {\n setCart([...cart, { ...newItem, id: uuidV4() }]);\n } else {\n return -1;\n }\n }", "function addToCart(item) {\n var newItem = {}; // this object contains the item name and price.\n\n var newItem = {\n itemName: item,\n itemPrice: Math.floor(Math.random()*100)\n }\n //newItem.itemName = item;\n //newItem.itemPrice = Math.floor(Math.random()*100)\n cart.push(newItem); // it was pop(newItem)\n return `${newItem.itemName} has been added to your cart.`\n}", "addItem(item) {\n this.items.push(item);\n // tegye közzé a frissített elemek listáját, hogy frissítse a Cart topic-ot\n // amikor a cart tartalma frissült\n PubSub.publish(\"updateCart\", this.getItems());\n }", "function addItem (name, quantity) {\n if(cart[name] == undefined) {\n createItem(name);\n }\n cart[name] = cart[name] + quantity;\n}", "function addCartItem(prod) {\n const inCart = cart.find(i => i.id === prod.id);\n\n if (!inCart) {\n changeOfAmountAndAvailableInProductList(prod);\n addProductToCart(prod);\n }\n\n if (inCart) {\n changeOfAmountAndAvailableInProductList(prod);\n changeOfAmountAndAvailableInCart(prod);\n }\n }", "function addSelectedItemToCart() {\n // TODO: suss out the item picked from the select list\n var product = event.target.items.value;\n var quantity = event.target.quantity.value;\n cart.addItem(product, quantity);\n counter++;\n console.log(counter);\n // TODO: get the quantity\n // TODO: using those, add one item to the Cart\n}", "function addSelectedItemToCart() {\n // TODO: suss out the item picked from the select list\n let selectedItem = event.target.items.value;\n console.log(selectedItem);\n // TODO: get the quantity\n let quantity = event.target.quantity.value;\n // TODO: using those, add one item to the Cart\n \n \n carts.addItem(selectedItem,quantity); \n console.log(carts.items);\n \n}", "function addToInvoice( newItem ){\n\t\t\n\t\t// console.log( \"adding newItem: \" + newItem.ID);\n\t\t// add product to cart\n\t\tcart.push(newItem);\n\t\t\n\t\t// items total cost\n\t\tcart.itemsCost \t+= parseFloat(newItem.PriceSAR, 10);\n\t\tcart.itemsCost\t= parseFloat(cart.itemsCost.toFixed(4)) ;\n\t\t\n\t\tcart.itemsTax\t+= parseFloat(newItem.TaxSAR, 10) ;\n\t\tcart.itemsTax\t= parseFloat(cart.itemsTax.toFixed(4)) ;\n\t\t\n\t\t// items total shipping cost\n\t\tcart.shippingCost \t+= parseFloat(newItem.ShippingCost, 10);\n\t\tcart.shippingCost\t= parseFloat(cart.shippingCost.toFixed(4)) ;\n\t\t// console.log( cart.totalCost)\n\t\t\n\t\t// item tax\n\t\tcart.invoiceCost\t= cart.itemsCost + cart.shippingCost + cart.itemsTax;\n\t\tcart.invoiceCost\t= parseFloat(cart.invoiceCost.toFixed(4));\n\t\t\n\t\t// update invoice\n\t\tupdateInvoice();\n\t\t\n\t\tmycart = cart;\n\t}", "addToCart(itemOptions) {\n this.store.cart.products.push({\n product_id: itemOptions.item,\n price: itemOptions.price || 0,\n total: itemOptions.price || 0,\n quantity: itemOptions.quantity || 1,\n offer: itemOptions.offer || null,\n materials: itemOptions.config ? itemOptions.config.split(',') : [],\n description: \"\",\n comment: itemOptions.comment\n });\n }", "function addToCart(newItem, itemQuantity, itemPrice) {\n\n for (let i = 0; i < cartItems.length; i++) {\n if (cartItems[i].item === newItem) {\n cartItems[i].quantity += itemQuantity;\n total()\n\n return\n }\n }\n\n setCartItems([...cartItems, {\n item: newItem,\n quantity: itemQuantity,\n price: itemPrice\n }])\n\n\n total()\n }", "function addCartItem(form, material, color, text, textColor, qty, unitCost) {\n\tlet model = makeModelNumber(form, material, color);\n\n\t// look for existing items based on the model number. but we'll keep customized\n\t// items as their own cart line item, so be sure not to match if text exists.\n\tlet existingItem = _.find(cart, (c) => {\n\t\treturn (c.model === model) && !c.text;\n\t});\n\n\tif (existingItem) {\n\t\texistingItem.qty += qty;\n\t}\n\telse {\n\t\tlet newItem = {\n\t\t\tid: uuidv4(),\n\t\t\tmodel,\n\t\t\tform,\n\t\t\tmaterial,\n\t\t\tcolor,\n\t\t\ttext,\n\t\t\ttextColor,\n\t\t\tqty,\n\t\t\tunitCost\n\t\t};\n\n\t\tcart.push(newItem);\n\t}\n}", "function addSelectedItemToCart() {\n // suss out the item picked from the select list\n let product = document.getElementById('items').value;\n let quantity = document.getElementById('quantity').value;\n cart.addItem(product, quantity);\n\n // console.log(newCartItem);\n // console.log(cart);\n\n // get the quantity\n // using those, add one item to the Cart\n}", "function addProductToCart(product) {\n let cart = getCart();\n cart.items.push(product);\n\n setCart(cart);\n alert(product.name + ' added to cart, Total is R' + getTotal(cart));\n}", "function addItem() {\n\n console.log('adding', { amount }, { name });\n\n dispatch({\n type: 'ADD_ITEM', payload: {\n name: name,\n amount: amount,\n list_id: id,\n }\n })\n //reset local state of new item textfield to allow for more items to be added\n setName('');\n setAmount(1);\n }", "addItemToCart(item){\n // check for duplicates\n if(this.cart.hasOwnProperty(item.id)){\n this.cart[item.id].quantity += 1\n localStorage.setItem('cart', JSON.stringify(this.cart))\n }\n else {\n item.index = Object.keys(this.cart).length\n item.quantity = 1\n this.cart[item.id] = item\n localStorage.setItem('cart', JSON.stringify(this.cart))\n }\n return this\n }", "function addItem(sku, quantity) {\n quantity = _.isNumber(quantity) ? quantity : 1;\n\n $lastPromise = $$\n .postCartItems({\n sku: sku,\n quantity: quantity\n })\n .then(onSyncd);\n\n return _this_;\n }", "function addSelectedItemToCart() { \n var itemsEl = document.getElementById('items').value;\n var quantityEl = document.getElementById('quantity').value;\n cart.addItem(itemsEl, parseInt(quantityEl));\n // console.log(cart.items[0].product);\n // console.log(cart.items[0].quantity); \n}", "function addItem() {\n\t\t\tvar order = ordersGrid.selection.getSelected()[0];\n\n\t\t\titensStore.newItem({\n\t\t\t\tpi_codigo: \"new\" + itensCounter,\n\t\t\t\tpi_pedido: order ? order.pe_codigo : \"new\",\n\t\t\t\tpi_prod: \"\",\n\t\t\t\tpi_quant: 0,\n\t\t\t\tpi_moeda: \"R$\",\n\t\t\t\tpi_preco: 0,\n\t\t\t\tpi_valor: 0,\n\t\t\t\tpi_desc: 0,\n\t\t\t\tpi_valort: 0,\n\t\t\t\tpr_descr: \"\",\n\t\t\t\tpr_unid: \"\"\n\t\t\t});\n\t\t\t\n\t\t\titensCounter = itensCounter + 1;\n\t\t}", "function addItem(item) {\n var foundItem = false;\n\n // if there's another item exactly like this one, update its quantity\n _.each(bag.getItems(), function(curItem) {\n if (curItem.name == item.name && curItem.size == item.size &&\n curItem.price == item.price && curItem.color == item.color) {\n curItem.quantity += item.quantity;\n foundItem = true;\n }\n });\n\n // otherwise, add a new item\n if (!foundItem) {\n bag.addItem(item);\n } else {\n var items = bag.getItems();\n\n // item was updated, re-render\n renderItems(items);\n renderTotalQuantityAndPrice(items);\n }\n }", "function addItem(id) {\n // clear session storage\n // sessionStorage.clear();\n\n // check to see if a cart key exists in session storage\n if (sessionStorage.getItem('cart')) {\n // if it does, set a local cart variable to work with, using the parsed string //JSON is js library\n var cart = JSON.parse(sessionStorage.getItem('cart'));\n } else {\n // if it does not exist, set an empty array\n var cart = [];\n }\n\n // loop through global products variable and push to Cart\n for (let i in products) {\n if (products[i].id == id) {\n cart.push(products[i]);\n break;\n }\n }\n\n // // call total function to update\n // calcTotal();\n\n // store the cart into the session storage\n sessionStorage.setItem('cart', JSON.stringify(cart));\n }", "function addItemToCart(e) {\n e.preventDefault();\n const { target } = e;\n if (target.classList.value !== \"product-box__btn\") {\n return;\n }\n const priceObj = target.parentNode.firstElementChild;\n const price = parseInt(priceObj.innerText);\n const qtyObj = priceObj.nextElementSibling.firstElementChild;\n // Regular expr.\n const re = /\\d+/gm;\n //input validation\n if (!re.test(qtyObj.value) || qtyObj.value <= 0) {\n alert(\"В поле введены некорректные данные!\");\n return false;\n }\n const qty = parseInt(qtyObj.value);\n qtyObj.value = \"\";\n cart.update(qty, price);\n}", "add(event, item) {\n event.preventDefault();\n this.props.addToBasket({\n product_id: item.product_id,\n product_name: item.product_name,\n product_images: item.product_images,\n product_price: item.product_price\n })\n }", "function buyItem(e) {\n\te.preventDefault();\n\n\t// find item was added\n\tif (e.target.classList.contains('add-to-cart')) {\n\t\tconst item = e.target.parentElement.parentElement.parentElement;\n\n\t\t// get item info\n\t\tgetItemInfo(item);\n\t}\n}", "function addToCartHandler(item, quantity) {\n\t\tsetUserCart(prev => {\n\t\t\tconst prevCopy = [...prev];\n\t\t\tconst foundItemIndex = prevCopy.findIndex(\n\t\t\t\tcopyItem => copyItem.id === item.id\n\t\t\t);\n\t\t\tif (foundItemIndex >= 0) {\n\t\t\t\tconst newQuantity = prev[foundItemIndex].quantity + quantity;\n\t\t\t\tprevCopy.splice(foundItemIndex, 1, { ...item, quantity: newQuantity });\n\t\t\t\treturn prevCopy;\n\t\t\t} else {\n\t\t\t\treturn prev.concat({ ...item, quantity: quantity });\n\t\t\t}\n\t\t});\n\t}", "function addItemToShoppingCart(item) {\n\t$('#shopping-cart ul').append(`\n\t\t<li>\n\t\t\t${item}\n\t\t</li>\n\t`);\n}", "function addSelectedItemToCart() {\n // TODO: suss out the item picked from the select list\n // TODO: get the quantity\n // TODO: using those, add one item to the Cart\n const product = selectElement.options[selectElement.selectedIndex].text;\n const quantity = parseInt(document.getElementById('quantity').value);\n cart.addItem(product, quantity);\n}", "function addItem(item) {\n basket.push(item);\n return true;\n}", "function add_item_to_cart(name, price) {\n add_item(shopping_cart, name, price);\n calc_cart_total();\n}", "function addToCart(item) {\n var ss = getCart()\n // the item is then pushed into the array ss which stores it in a session storage.\n ss.push(item)\n sessionStorage.setItem(\"cart\", JSON.stringify(ss))\n}", "_addNewItem() {\n // Add new Item from Order's Items array:\n this.order.items = this.order.items.concat([this.item]);\n // Update current Order:\n this.orderService.setCurrentOrder(this.order);\n this._closeAddNewItem();\n }", "function add_item_to_cart(name, price) {\n shopping_cart = add_item(shopping_cart, name, price);\n calc_cart_total();\n}", "addItemToCart(item) {\n this.props.addItemToCart(item);\n }", "function addToCart(dishId, quantity = 1) {\n const menues = JSON.parse(data);\n\n let selectedDish = menues.find(x => x.id == dishId);\n\n console.log(\"selected Dish:\", selectedDish);\n\n //Is it already in cart\n //then increase the quantity then update the cart\n if (cart.length > 0) {\n let cartSelectedDish = cart.find(x => x.id == dishId);\n if (cartSelectedDish != undefined) {\n quantity = cartSelectedDish.quantity + quantity;\n cart = cart.filter(x => x.id != dishId);\n }\n }\n var cartItem = new CartItem(selectedDish.id, selectedDish.name,\n selectedDish.price, quantity, selectedDish.price * quantity);\n\n cart.push(cartItem);\n console.log(\"My Cart\", cart);\n\n saveCartInSession(cart);\n}", "function AddItem(item){\n console.log(\"Adding \" + item.Name + \" to the basket!\");\n basket.push(item);\n}", "function addItemToBasket(item) {\n const parent = $(\"#order\");\n\n // Add item\n basket.push(item);\n parent.append(\"<li id='ordermenuitem-\" + item.id\n + \"' class='list-group-item list-group-item-action'>\\n\"\n + \" <span class='bold'>\" + item.name + \"</span>\"\n + \" <span class='span-right'>£\" + item.price + \"</span>\\n\"\n + \" <br>\\n\"\n + \" <span id='omi-instructions-\" + item.id\n + \"'><span id='omi-instructions-\" + item.id + \"-text'>\"\n + item.instructions + \"</span></span>\\n\"\n + \" <span class='span-right'><i id='omi-edit-\" + item.id\n + \"' class='fa fa-edit fa-lg edit' onclick='showEditOrderMenuItem(\"\n + item.id + \", \\\"\" + item.instructions\n + \"\\\");'></i><i class='fa fa-times fa-lg remove' onclick='confirmRemoveOrderMenuItem(\"\n + item.id + \");'></i></span>\\n\"\n + \"</li>\");\n}", "addItemToCart ({ commit }, item) {\n commit(mutationTypes.ADD_ITEM_TO_CART);\n return cartStateApi.addItemToCart(item.cartId, item)\n .then(response => {\n commit(mutationTypes.ADD_ITEM_TO_CART_SUCCESS, response.data);\n })\n .catch(error => console.log('ERROR adding an item to the cart ', error));\n }", "add(item, Inventory) {\n\n if (!this.isValid(item)) {\n throw \"Invalid item input, expected [SKU QUANTITY]\";\n }\n\n item = this.normalize(item);\n\n if (this.items.filter(i => i[0] == item[0]).length) { // item with SKU exists already\n this.items = this.items.map(\n i => {\n // check for availability of the item in the Inventory\n if (!Inventory.available([item[0], item[1] + i[1]])) {\n throw \"Can't add item to cart\";\n }\n\n // when the SKU of the newly added item matches the item in the inventory, just add amount\n if (i[0] == item[0]) {\n i[1] += item[1];\n }\n return i;\n }\n );\n } else { // no item with matching SKU found, add the item to the cart\n // check for availability of the item in the Inventory\n if (!Inventory.available(item)) {\n throw \"Can't add item to cart\";\n }\n this.items.push(item);\n }\n }", "function addItem(name, price) {\n const item = {\n name,\n price,\n quantity: 1\n };\n\n // Checks to see if item === item to add quantity\n for (let i = 0; i < cart.length; i++) {\n if (cart[i].name === name) {\n cart[i].quantity += 1;\n showItems();\n return;\n }\n }\n cart.push(item);\n showItems();\n}", "function AddItemView(cart, item){\n var cartDiv = document.getElementById('cart');\n var cartItemsDiv = document.getElementById('CartItems');\n var footerDiv = document.getElementById('cartFooter');\n \n if (!cartDiv) {\n cartDiv = cartCreation();\n var cartItemsDiv = document.getElementById('CartItems');\n }\n var CartView = new ShoppingCartView(cartItemsDiv, item);\n CartView.drawItem();\n \n drawFooter(cartDiv, cart.totalCost, footerDiv);\n \n}", "function CartItem(id, quantity){\n this.id = id;\n this.quantity = quantity\n cart.push(this);\n}", "function addItemToCart(user, item) {\n const updateCart =\n}", "function addToCart() {\n var itemID = $(this).attr(\"id\");\n var alreadyInCart = false;\n for (var i = 0; i < cartItems.length; i++) {\n if (itemID == cartItems[i][0]) {\n alreadyInCart = true;\n cartItems[i][3] += 1;\n }\n }\n if (alreadyInCart == false) {\n for (var i = 0; i < shopItems.length; i++) {\n if (itemID == shopItems[i][0]) {\n var applianceID = shopItems[i][0];\n var applianceName = shopItems[i][1];\n var appliancePrice = shopItems[i][2];\n var applianceQuantity = 1;\n itemID = [\n applianceID,\n applianceName,\n appliancePrice,\n applianceQuantity,\n ];\n }\n }\n cartItems.push(itemID);\n }\n\n updateCartDetails();\n}", "function addSelectedItemToCart(product, quantity) {\n // TODO: suss out the item picked from the select list\n cart.addItem(product, quantity);\n\n // TODO: get the quantity\n // TODO: using those, add one item to the Cart\n}", "addItem(name, quantity, pricePerUnit) {\n this.items.push({\n name,\n quantity,\n pricePerUnit\n })\n }", "function addItem(){\n var item = document.getElementById(\"newItemName\")\n itemsInCart.push(item.value)\n\n var quantity = document.getElementById(\"quantity\")\n quantityPerItem.push(parseInt(quantity.value))\n\n var price = document.getElementById(\"pricePerUnit\")\n var totalPrice = price * quantity\n pricePerItem.push(parseInt(totalPrice.value))\n\n addItemToCart()\n\n}", "function addToCart(productId, productImg, productName) {\n let addedProductArr = productsApi.filter(\n (product) => product.id === productId\n );\n let addedProduct = { ...addedProductArr[0] };\n addedProduct.quantity = 1;\n setCartQuantity((quan) => quan + 1);\n\n addProductLocalStorage(addedProduct, productId);\n\n setProductToCart(addedProduct);\n setImgToCart(productImg);\n setNameToCart(productName);\n\n // Show add to cart toast\n let addcartAlert = new Toast(addCartToastEl.current);\n addcartAlert.show();\n }", "function addItems() {\n\t\t\t\tvar form = $(psForms.shift());\n\t\t\t\tvar itemid = form.find(\"input[name='pid']\").val();\n\n\t\t\t\t$.ajax({\n\t\t\t\t\tdataType : \"html\",\n\t\t\t\t\turl: addProductUrl,\n\t\t\t\t\tdata: form.serialize()\n\t\t\t\t})\n\t\t\t\t.done(function (response) {\n\t\t\t\t\t// success\n\t\t\t\t\tminiCartHtml = response;\n\t\t\t\t})\n\t\t\t\t.fail(function (xhr, textStatus) {\n\t\t\t\t\t// failed\n\t\t\t\t\tvar msg = app.resources.ADD_TO_CART_FAIL;\n\t\t\t\t\t$.validator.format(msg, itemid);\n\t\t\t\t\tif(textStatus === \"parsererror\") {\n\t\t\t\t\t\tmsg+=\"\\n\"+app.resources.BAD_RESPONSE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsg+=\"\\n\"+app.resources.SERVER_CONNECTION_ERROR;\n\t\t\t\t\t}\n\t\t\t\t\twindow.alert(msg);\n\t\t\t\t})\n\t\t\t\t.always(function () {\n\t\t\t\t\tif (psForms.length > 0) {\n\t\t\t\t\t\taddItems();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tquickView.close();\n\t\t\t\t\t\tminicart.show(miniCartHtml);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "function addToCart(item) {\n cart.push(item);\n localStorage.setItem(\"shop\", JSON.stringify(cart));\n console.log(cart);\n}", "function addingProductToCart(id, quantity) {\r\n if (Helpers_1.Helpers.kiemTraSoLuong(quantity)) {\r\n let product = repotest.getItemById(id);\r\n cartObj.addProduct(product, quantity);\r\n showCart(); // sau khi thay doi phai goi lai;\r\n }\r\n else {\r\n thongBao(DinhNghiaCacThongBaoHtml.PhaiChonItNhat01SanPham);\r\n }\r\n}", "function addToCart(id, name) {\n var items = getCartItems();\n\n if (!items) {\n items = [];\n }\n\n items.push({\n \"id\": id,\n \"name\": name,\n \"quantity\": 1\n });\n localStorage.setItem(\"cartItems\", JSON.stringify(items));\n}", "function addItem()\n{\n\tvar message = {action: \"addItem\"};\n\tvar wrapper = $(this).parents(\".quantifier\");\n\n\tmessage.item = {};\n\tmessage.item.url = $(this).parents(\".market_listing_row_link\").attr(\"href\");\n\tmessage.item.price = parseFloat(wrapper.find(\".minPrice\").val());\n\tmessage.item.picture = $(this).parents(\".market_listing_row_link\").find(\".market_listing_item_img\").attr(\"src\");\n\tmessage.item.name = $(this).parents(\".market_listing_row_link\").find(\".market_listing_item_name\").html();\n\tmessage.item.quantity = parseInt(wrapper.find(\".quantity\").val());\n\n\tif (!validItem(message.item))\n\t\treturn false;\n\n\tchrome.runtime.sendMessage(message, function(response) {\n\t\twrapper.addClass(\"active\");\n\t\twrapper.find(\".blue\").css(\"display\", \"none\");\n\t\twrapper.find(\".green\").css(\"display\", \"inline-block\");\n\t});\n\treturn false;\n}", "function addItemToCart(user, item) {\n amazonHistory.push(user)\n const updateCart = user.cart.concat(item)\n return Object.assign({}, user, { cart: updateCart })\n}", "handleAddItemToCart(item, quantity){\n var buyableItem = new BuyableItem(item, quantity);\n currentCart.push(buyableItem);\n this.setState({cartQuantity : this.calculateCartQuantity(currentCart)})\n localStorage.setItem(\"cart\", JSON.stringify(currentCart));\n this.readFromCart();\n }", "addToCart() {\n this\n .props\n .addToCart(this.props.item);\n }", "function addToCarts(id){\r\n if(!data[id].itemInCart){\r\n cartList = [...cartList,data[id]];\r\n addItem();\r\n\r\n alert('item add to your cart');\r\n }\r\n else{\r\n alert('Your item is already there');\r\n }\r\n data[id].itemInCart = true;\r\n}", "function addItemQty(item, quantity){\n\t\t\tif(!item.qty) item.qty = quantity;\n\t\t\telse item.qty += quantity;\n\t\t}", "addToCart(text, price)\n {\n let count = 1;\n let item = {Name:text, Count:count, Price:price};\n let fl=1;\n for (i = 0; i < cart.length; i++) {\n if(cart[i].Name === text)\n {\n cart[i].Count=cart[i].Count+1;\n cart[i].Price=Number(cart[i].Price)+Number(price);\n fl=0;\n break;\n\n }\n }\n if(fl==1){\n cart.push(item);\n }\n // for(i=0; i<cart.length; i++){\n // console.log(\"item: \"+i+\" is \"+cart[i].Name+\" count \"+cart[i].Count+\" price \"+cart[i].Price); \n // }\n window.alert('Added to cart.');\n this.render();\n }", "function addProduct() {\n el('cart').style.display = 'inline-block';\n el('order').style.display = 'none';\n const title = el('products').value;\n const quantity = parseFloat(el('quantity').value);\n cart[title] = (cart[title] || 0) + quantity;\n saveCart();\n showCart();\n}", "function addItem(){\n var itemName = $(\"#spinlabel\").html();\n var quantity = $(\"#spin\").val();\n for(var i = 0; i < CurrentShoppingListArray.length; i++){\n if(itemName == CurrentShoppingListArray[i].name){\n CurrentShoppingListArray[i].quantity = parseInt(CurrentShoppingListArray[i].quantity) + parseInt(quantity);\n return;\n }\n }\n var tempItem = new Item(itemName, quantity);\n CurrentShoppingListArray.push(tempItem);\n}", "function addItem(id) {\n // clear sessionStorage\n // sessionStorage.clear();\n\n // check to see if a cart key exisits in sessionStorage\n // if it does, set a local cart variable to work with the parsed string\n // if it does not exist, set an empty array\n if (sessionStorage.getItem('cart')) {\n var cart = JSON.parse(sessionStorage.getItem('cart'));\n }\n else {\n var cart = [];\n }\n\n // send a response to products.json and create a callback that loops through the products and checks the product id\n // if the product id in the current iteration is the same as the id being taken in as the parameter, then push it to the cart.\n for (let product in products) {\n if (id == products[product].id) {\n cart.push(products[product]);\n break;\n }\n }\n\n // store to sessionStorage\n sessionStorage.setItem('cart', JSON.stringify(cart));\n\n showCart();\n}", "function addItemToCart(product, quantity){\n let flag = false;\n shoppingCart.forEach(p => {\n if(p.id === product.id){\n p.quantity += quantity;\n flag = true;\n }\n })\n if(!flag){\n product.quantity = quantity;\n shoppingCart.push(product);\n }\n return shoppingCart;\n}", "function addItem(name, price) {\r\n event.preventDefault();\r\n shoppingCart.addItemToCart(name, price, 1);\r\n displayCart();\r\n }", "static addProduct(prodID, quantity=1) {\n let products = [];\n if (CartManager.getItem(CartManager.key)) {\n products = CartManager.getItem(CartManager.key);\n if (CartManager.isItInCart(prodID)) {\n let prevQty = null;\n products.forEach(p => {\n if (p.productID === prodID) { prevQty = p.quantity }\n });\n quantity += prevQty;\n }\n };\n CartManager.pushProductToArray({ 'productID': prodID, quantity }, products);\n CartManager.setItem(products);\n }", "function addItemToCart(itemID, elem){\n const url = `${BASE_URL}api/v1/cart/cart_items/`\n $.post(url,\n {\n item_id: itemID,\n },\n function(data){\n elem.html('Remove');\n elem.parent().next().next().text(data.id);\n });\n}", "function addSelectedItemToCart() {\n\n let quantityTextbox = document.getElementById('quantity').value;\n let ddlProducts = document.getElementById(\"items\");\n let selectedOption = ddlProducts.value; \n cart.addItem(selectedOption, quantityTextbox);\n \n}", "function addToCart(productID, qty) {\n // Cek \n if(!databaseProduct[productID]) return `Tidak ada barang dengan ID tersebut`\n if(qty <= 0) return 'Invalid quantity' \n if(qty > databaseProduct[productID].stokProduk) return alert('Stok habis!')\n\n // Kalau aman\n databaseProduct[productID].stokProduk -= qty // database di update\n\n if(!productInCart[productID]) { // productInCart di update\n productInCart[productID] = qty\n } else {\n productInCart[productID] += qty\n }\n\n renderCart() // update tampilan cart\n renderProductList() // update product list => stok berubah atau produk hilang\n updateTotal() // update tampilan total\n return productInCart\n}", "function addItem(item) {\n $state.go('main.addItem', {item: item, foodListId: $stateParams.foodListId});\n }", "function addItemToCart(name, price, count) {\n for (var i in cart) {\n if (cart[i].name === name) {\n cart[i].count += count;\n saveCart();\n displayCart();\n return;\n }\n }\n var item = new Item(name, price, count);\n cart.push(item);\n saveCart();\n displayCart();\n }", "function addToCartClicked(event) {\n document.querySelector(\".custom\").style.display = \"block\";\n var button = event.target;\n var shopItem = button.parentElement.parentElement;\n var title = shopItem.getElementsByClassName(\"shop-item-title\")[0].innerText;\n var price = shopItem.getElementsByClassName(\"shop-item-price\")[0].innerText;\n var imageSrc = shopItem.getElementsByClassName(\"shop-item-image\")[0].src;\n items = {\n title,\n price,\n imageSrc,\n };\n\n // check if the total is updating\n}", "ADD_TO_CART(state, product) {\n // Check if cart is empty\n if (Object.keys(state.cart).length != 0) {\n for (const [key, value] of Object.entries(state.cart)) {\n // Check if product already in cart, then change quantity \n if (key === product.reference) {\n product.qty = value.qty + state.qty\n state.cart[key].qty = product.qty\n } else {\n state.cart[product.reference] = product\n }\n }\n } else {\n state.cart[product.reference] = product\n }\n }", "function addItemToCart(user, item) {\n const updateCart = user.cart.concat(item)\n return Object.assign({}, )\n}", "function inventoryAdd(item) {\n item.show();\n\titem.moveTo(inventory_layer);\n item.clearCache();\n\titem.scale({x: 1, y: 1});\n\titem.size({width: 80, height: 80});\n\n\tif (inventory_list.indexOf(item) > -1)\n\t\tinventory_list.splice(inventory_list.indexOf(item), 1, item);\n\telse\n\t\tinventory_list.push(item);\n\n // The picked up item should be visible in the inventory. Scroll inventory\n // to the right if necessary.\n if (inventory_list.indexOf(item) > inventory_index + inventory_max - 1)\n inventory_index = Math.max(inventory_list.indexOf(item) + 1 - inventory_max, 0);\n\n current_layer.draw();\n\tredrawInventory();\n}", "addToCart(item) {\n dispatch(addToCart(item));\n }", "function add(req, res, next) {\n cartService.add(req.params.id, req.body.productId)\n .then(function(result) {\n res.send(200);\n }).catch(function(err) {\n res.send(500);\n });\n \n next();\n }", "function addToCartClicked(event) {\r\n var button = event.target;\r\n var shopItem = button.parentElement.parentElement.parentElement.parentElement;\r\n var title = shopItem.getElementsByClassName(\"shop-item-title\")[0].innerText;\r\n var price = shopItem.getElementsByClassName(\"shop-item-price\")[0].innerText;\r\n var imageSrc = shopItem.getElementsByClassName(\"shop-item-image\")[0].src;\r\n addItemToCart(title, price, imageSrc);\r\n updateCartTotal();\r\n }", "function addItemToCart(user, item) {\n const updateCart = user.cart.concat(item)\n return Object.assign()\n}", "function addToOrder(itemId, instructions) {\n const dataToSend = JSON.stringify({\n menuItemId: itemId,\n instructions: instructions,\n orderId: sessionStorage.getItem(\"orderId\")\n });\n\n post(\"/api/authTable/addItemToOrder\", dataToSend, function (data) {\n if (data !== \"failure\") {\n const item = JSON.parse(data);\n addItemToBasket(item);\n calculateTotal();\n }\n })\n}", "addToCart(newItem) {\n let itemExisted = false\n let updatedCart = this.state.cart.map(item => {\n if (newItem === item.sku) {\n itemExisted = true\n return { sku: item.sku, quantity: ++item.quantity }\n } else {\n return item\n }\n })\n if (!itemExisted) {\n updatedCart = [...updatedCart, { sku: newItem, quantity: 1 }]\n }\n this.setState({ cart: updatedCart })\n // Store the cart in the localStorage.\n // localStorage.setItem('stripe_checkout_items', JSON.stringify(updatedCart))\n }", "handleAddClick() {\n var isProductInCart = false;\n var newCart = this.state.cart.slice();\n var product = this.state.products[this.state.value];\n /*Searchs for the product in the cart*/\n\n var newProduct = {\n id: product.id,\n name: product.name,\n price: product.price,\n description: product.description,\n quantity: this.state.quantity\n };\n for (let i = 0; i < newCart.length; i++) {\n if (product.id == newCart[i].id) {\n newCart[i].quantity += this.state.quantity;\n isProductInCart = true;\n }\n }\n /*if is not there add it*/\n if (!isProductInCart) newCart.push(newProduct);\n this.setState({ cart: newCart });\n }", "function addItemToCart(title, price, imageSrc) {\n\tvar cartRow = document.createElement('div');\n\tcartRow.innerText = title;\n\tvar cartItems = document.getElementsByClassName(\"cart-items\")[0];\n}", "function addToCart() {\n const open = document.querySelector(\"#open\");\n\n open.addEventListener(\"click\", (e) => {\n //img\n let fullPath =\n e.target.parentElement.parentElement.children[0].children[0].children[0]\n .src;\n let position = fullPath.indexOf(\"img\");\n let partialPath = fullPath.slice(position);\n\n const item = {};\n item.img = partialPath;\n\n //name\n let name =\n e.target.parentElement.parentElement.children[1].children[0].children[0]\n .textContent;\n item.name = name;\n\n //price\n let price =\n e.target.parentElement.parentElement.children[1].children[0].children[1]\n .children[0].textContent;\n item.price = +price;\n\n const cartItem = document.createElement(\"div\");\n cartItem.className = \"cart-item d-flex pb-3\";\n\n cartItem.innerHTML = `\n <img src=\"${item.img}\" class=\"img-fluid mx-3\" alt=\"plant\" style=\"width:70px;height:70px\">\n <div class=\"item-text \">\n <p class=\"text-uppercase font-weight-bold m-0 p-0\" id=\"cart-item-title\">${item.name}</p>\n <p class=\"font-weight-bold m-0 p-0\">$<span id=\"cart-item-price\">${item.price}</span></p>\n <p class=\"m-0 p-0\">qty: <span id=\"cart-item-qty\">1</span>\n </p>\n `;\n\n const cartModal = document.querySelector(\".cart-modal\");\n const total = document.querySelector(\"#cart-subtotal-container\");\n\n cartModal.insertBefore(cartItem, total);\n showTotals();\n });\n}", "function addItem(itemName, itemPrice) {\n if (order.items[itemName]) {\n order.items[itemName].count += 1;\n } else {\n let item = {name: itemName, price: itemPrice,\n count: 1};\n order.items[itemName] = item;\n }\n order.subtotal = round(order.subtotal + itemPrice);\n order.tax = round(order.subtotal * 0.1);\n order.total = round(order.subtotal + order.tax + order.delivery);\n let restaurantDiv = document.getElementById(\"restaurant\");\n // Generate order summary div \n restaurantDiv.replaceChild(createOrderDiv(restaurantData.menu), document.getElementById(\"restaurant\").lastChild);\n}", "function addToCart(itemName) {\n var itemObj = {}\n itemObj[itemName] = Math.floor(Math.random() * 100)\n cart.push(itemObj)\n console.log(itemName + \" has been added to your cart.\")\n //console.log(itemObj)\n return cart\n}", "addToCart() {\n const addedItemsId = this.props.cart.addedItems.map(item => item.id);\n const check = addedItemsId.includes(this.props.item.id);\n if (!check) {\n const item = {\n id: this.props.item.id,\n name: this.props.item.ename,\n price: this.props.item.price,\n ingredient: this.props.item.dish_ingradint,\n photo: this.props.item.dishImage_thump,\n availability: this.props.item.active,\n restaurantName: this.props.restaurantItem.restaurantName,\n restaurantId: this.props.restaurantItem.id,\n quantity: 1,\n deliveryCost: this.props.restaurantItem.deliveryCost\n };\n this.props.addItemToCart(item);\n }\n if (check) {\n Alert.alert('', 'this item is already added to cart');\n }\n }" ]
[ "0.8870365", "0.8870365", "0.8317082", "0.80768555", "0.80542094", "0.8030135", "0.7986383", "0.7953447", "0.7953234", "0.7932324", "0.7927464", "0.78722477", "0.78524226", "0.7743222", "0.7735881", "0.77150446", "0.76887846", "0.7688012", "0.76775503", "0.76739985", "0.76161146", "0.760615", "0.7602655", "0.76001036", "0.7583825", "0.75829077", "0.75661194", "0.7493244", "0.74746877", "0.747313", "0.746446", "0.74524313", "0.74472815", "0.7440549", "0.7437704", "0.7433925", "0.74306285", "0.7430036", "0.7421628", "0.7411367", "0.73820025", "0.7371704", "0.7368081", "0.7343972", "0.7331165", "0.7327816", "0.7312884", "0.73036724", "0.7295344", "0.7287336", "0.72850114", "0.7278175", "0.72756636", "0.7265072", "0.72480613", "0.72343063", "0.7228413", "0.7209507", "0.7190411", "0.7185177", "0.71711063", "0.71681184", "0.7166831", "0.71513575", "0.71483815", "0.7144496", "0.7144229", "0.71430963", "0.7134666", "0.7104235", "0.70913094", "0.7072922", "0.7072341", "0.70684206", "0.7058523", "0.70224595", "0.70152444", "0.7005595", "0.700559", "0.69935936", "0.69756985", "0.69743204", "0.6973792", "0.69653237", "0.6961413", "0.6953141", "0.6950034", "0.6943109", "0.69407415", "0.6934993", "0.6921171", "0.6920137", "0.6912577", "0.69092995", "0.69066703", "0.69029385", "0.69027156", "0.68892175", "0.68853277", "0.68826497" ]
0.7096832
70
To JSON get a json representation of the cart data
toJson() { return { items: this.items, total: this.total } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function packIntoJson(userId, ingredientId, ingredientName, quantity){\n\tvar cartJson = new Object();\n\tcartJson.userId = userId;\n\tcartJson.ingredientId = ingredientId;\n\tcartJson.ingredientName = ingredientName;\n\tcartJson.quantity = quantity;\n\tconsole.log(\"JSON\");\n\tconsole.log(cartJson);\n\t//console.log(dummyCart.sampleCart);\n\treturn cartJson;\n}", "function productsToJSON() {\n let data = {}\n for ([key, value] of products) {\n data[key] = value\n }\n\n return data;\n}", "function getCartData() {\n return JSON.parse(localStorage.getItem('cart'));\n}", "function getCart() {\n return cart;\n}", "function getCart() {\n return cart\n}", "get cartItems() {\n //return store.cartItems; //added*\n return JSON.parse(this.storage.getItem(this.CART_KEY));\n }", "function saveCart(){\n sessionStorage.setItem('revonicCart', JSON.stringify(cart)); // saving data after converting it to JSON strings using JSON stingify. \n \n }", "toDict() {\n var lineitems = []\n for (var sku in this.items) {\n lineitems.push(this.items[sku].toDict())\n }\n var result = {\n 'order' : `Order ${this.order.id}`,\n 'user' : `${this.order.user}`,\n 'total' : this.total().toFixed(2),\n 'lineitems': lineitems\n }\n return result\n }", "function details() {\n return transformRawCartData();\n }", "function listCart() {\n var cartCopy = [];\n for (var i in cart) {\n var item = cart[i];\n var itemCopy = {};\n for (var p in item) {\n itemCopy[p] = item[p];\n }\n cartCopy.push(itemCopy);\n }\n return cartCopy;\n }", "function getCart() {\n return $cart;\n }", "function cartArrayToStorage() {\n\tlocalStorage.cart = JSON.stringify(cart);\n}", "function getCart() {\n \n return JSON.parse(localStorage.getItem(\"cart\"))\n\n}", "toDict() {\n var result = {}\n result['sku'] = this.sku;\n result['name'] = this.name\n result['quantity'] = this.quantity;\n result['price'] = this.price\n // the dict property for a line item has 'cost' \n // because Mustache template can not and does not have to calculate \n result['cost'] = Number(this.price * this.quantity).toFixed(2)\n\n return result\n }", "function getCart(item) {\n var ss = sessionStorage.getItem(\"cart\")\n if (!ss) ss = \"[]\"\n ss = JSON.parse(ss)\n return ss\n}", "function getCartItems(){\n return cart_items;\n}", "function setCartData(data) {\n localStorage.setItem('cart', JSON.stringify(data));\n}", "function saveCart() {\n localStorage.setItem('shoppingCart', JSON.stringify(cart));\n }", "get_cart(){\n for(var i in this.cart){\n console.log(`Item added - ${this.cart[i].name} | ${this.cart[i].qty} | ${this.cart[i].price}`);\n }\n console.log(\"\\n\");\n }", "function saveCart() {\n localStorage.setItem(\"shoppingCart\", JSON.stringify(cart));\n}", "function saveCart(){\n localStorage.setItem(\"shoppingCart\",JSON.stringify(cart)); \n }", "function saveCart() { \n localStorage.setItem(\"userCart\", JSON.stringify(cart));\n }", "function saveCart() {\n sessionStorage.setItem('shoppingCart', JSON.stringify(productsInCart));\n }", "function getCart(res, mysql, context, complete){\n mysql.pool.query(\"SELECT SCP.cust_id, SCP.p_id, C.cust_id, C.f_name, C.l_name, P.p_name, P.price FROM shoppingCart_product SCP INNER JOIN Shopping_cart SC on SCP.cust_id = SC.cust_id INNER JOIN Customer C ON SC.cust_id = C.cust_id INNER JOIN Product P ON SCP.p_id = P.p_id\", function(error, results, fields){\n if(error){\n res.write(JSON.stringify(error));\n res.end();\n }\n context.cart = results;\n complete();\n });\n }", "getBasket() {\n return JSON.parse(JSON.stringify(this.basket));\n }", "function getCarts( ) {\n var request = $http({\n method: \"get\",\n url: \"/service/cart\"\n });\n return( request.then( handleSuccess, handleError ) );\n }", "toJSON() {\n\t\treturn {\n\t\t\tid: this.id,\n\t\t\tamountInsured: this.amountInsured,\n\t\t\temail: this.email,\n\t\t\tinceptionDate: this.inceptionDate,\n\t\t\tinstallmentPayment: this.installmentPayment,\n\t\t\tclientId: this.clientId\n\t\t};\n\t}", "async function getCart() {\n // console.log('getCart()');\n \n // let timeDiff = timer.toc();\n // console.log(`BEGIN AJAX request @ ${timeDiff.toFixed(0)}ms.`);\n const response = await fetch('/cart.js');\n const data = await response.json();\n // console.log(data);\n // timeDiff = timer.toc();\n // console.log(`END AJAX response @ ${timeDiff.toFixed(0)}ms.`);\n return data;\n }", "function buildCartList() {\n // $.getJSON('./cart.json', function(data){\n // // console.log(typeof(data))\n // cart = data[\"items\"];\n\n // });\n cartObj = JSON.parse(localStorage.getItem(\"cart\"))\n cart = cartObj[\"items\"];\n // console.log(cart);\n buildCartListHelper();\n}", "function cartAdapter() {\n var newArray = [];\n for (let i = 0; i < cart.length; i++) {\n newArray.push(cart[i][0]);\n newArray.push(cart[i][1]);\n }\n return newArray;\n }", "get cart(){ return this._cart }", "function getCartData() {\n const pizzaFromCartLS = JSON.parse(localStorage.getItem('cart'));\n if (pizzaFromCartLS) {\n pizzaFromCartLS.forEach((pizza, i) => cart[i] = pizza);\n }\n}", "function packIntoJson(name, numUnit, date, lotNumber){\n\tvar productJson = new Object();\n\tproductJson.name = name;\n\tproductJson.numUnit = numUnit;\n\tproductJson.date = date;\n\tproductJson.lotNumber = lotNumber;\n\t// productJson.ingredients = ingredients;\n\tconsole.log(\"Ingredient JSON\");\n\tconsole.log(productJson);\n\t// console.log(dummyProduct.sampleProduct);\n\treturn productJson;\n}", "static saveCart(cart){\n localStorage.setItem('cart',JSON.stringify(cart));\n }", "function SaveCart()\n{\n\tlocalStorage.setItem(\"ItemsInShoppingCart\", JSON.stringify(Cart));\n}", "function listCart(){ \n var cartCopy=[]; \n for(var i in cart){\n var item=cart[i];\n var itemCopy={};\n for(var p in item){\n \titemCopy[p]=item[p]; \n \t \n \t}\n \tcartCopy.push(itemCopy); \n }\t\n \n return cartCopy; \n}", "function displayCart() {\n let cartItems = localStorage.getItem(\"productsInCart\");\n cartItems = JSON.parse(cartItems);\nconsole.log(cartItems);\nlet cartCost = localStorage.getItem(\"totalCost\");\nlet productContainer = document.querySelector(\".products\");\n\n\nif(cartIems && productContainer){\n productContainer.innerHTML = '';\n\n Object.values(cartItems)\n .map(item=>{productContainer.innerHTML += `<div class=\"product\"> <ion-icon name=\"close-circle\"></ion-icon>\n <img src=\"./images/${item.tag}.jpg\"> \n <span>${item.name}</span></div>`\n\n `<div class = \"price\">$${item.price}.00</div>`\n `<div class = \"quantity\"><ion-ionic class=\"decrease\" name=\"arrow-dropleft-circle\"></ion-icon>\n <span>${item.inCart}</span>\n\n <ion-ionic class=\"increase\" name=\"arrow-dropright-circle\"> </ion-icon></div>`\n `<div class=\"total\"> $${item.inCart * item.price},00 </div>` \n });\n\n productContainer.innerHTML += `<div class=\"basketTotalContanier\">\n <h4 class =\"basketTotalTitle\"> Basket Total </h4>\n <h4 class =\"basketTotal\">$${cartCost}.00 </h4>`;\nconsole.log(productContainer);\n}\n}", "function cartStorageToArray() {\n\tcart = JSON.parse(localStorage.cart);\n}", "saveToLocalStorage() {\n\t\t\tvar json = JSON.stringify(angular.copy(this.items));\n\t\t\tlocalStorage.setItem(\"cart\", json);\n\t\t}", "function cart() {\n const productsInCart = [];\n return {\n getProducts: () => {\n return productsInCart.map(item => {\n return {\n name: item.name,\n price: item.price\n };\n });\n },\n addToCart: product => {\n productsInCart.push(product);\n },\n\n totalPrice: () => {\n const totalPrice = productsInCart.reduce((total, item) => {\n total += item.price;\n return total;\n }, 0);\n return totalPrice;\n }\n };\n}", "function mapCart(session, formBody) {\n var cart = models.shoppingCart();\n cart.credentialsHash = session.credentialsHash;\n cart.email = session.email;\n cart.purchaseDate = moment().unix();\n cart.purchaseDateDisplay = moment().format('dddd, MMMM Do YYYY, h:mm:ss a');\n cart.items = JSON.parse(formBody.inputCart);\n cart.address.name.first = formBody.inputFirstName;\n cart.address.name.last = formBody.inputLastName;\n cart.address.street1 = formBody.inputAddress1;\n cart.address.street2 = formBody.inputAddress2;\n\n if (!cart.address.street2 || cart.address.street2.length == 0) {\n cart.address.street2 = null;\n }\n\n cart.address.city = formBody.inputCity;\n cart.address.state = formBody.selectState;\n cart.address.zip = formBody.inputZip;\n cart.payment.creditCard.number = 'XXXX-XXXX-XXXX-' + formBody.inputCreditCard.substring(formBody.inputCreditCard.length - 4);\n cart.payment.creditCard.expiration = formBody.inputExpiration;\n cart.payment.creditCard.ccv = formBody.inputCCV;\n\n return cart;\n }", "function updateCartHtml(data) {\n var obj = JSON.parse(data);\n $(\"#subTotalPrice\").html('$' + obj.subTotal);\n $(\"#TotalPrice\").html('$' + obj.totalPrice);\n $(\"#cartCount\").html(' (' + obj.totalItems + ')');\n $(\"#vat\").html('$' + obj.vat);\n $(\"#itemsCount\").html('Cart (' + obj.totalItems + ' items)');\n}", "function loadCart() {\n\tvar _cart = JSON.parse(getCookie(\"cart\"));\n\tfor(var i in _cart){\n\t\tconsole.log(_cart[i])\n\t\tconsole.log(i)\n\t}\n\t//\tconsole.log(_cart)\n\tvar _str = JSON.stringify(_cart)\n\t\t//\tconsole.log(typeof _str)\n\t\t//\talert(_str == \"{}\")\n\t\t//\tvar _str = \"\"\n\tif (!_cart || _str == \"{}\") {\n\t\t$(\".shopping_box\").html(\"\")\n\t\t$(\".shopping_box\").css(\"display\", \"none\")\n\t\t$(\".login_tips\").css(\"display\", \"block\")\n\t\t$(\".shopping_total\").css(\"display\", \"none\")\n\t\t$(\".pay_box\").css(\"display\", \"none\")\n\t\t$(\".exchange\").css(\"display\", \"none\")\n\t\t\t//\t\t$(\".shopping_box\").attr(\"asd\",\"asd32r\")\n\t} else {\n\t\t$(\".shopping_box\").css(\"display\", \"block\")\n\t\t$(\".login_tips\").css(\"display\", \"none\")\n\t\t$(\".shopping_total\").css(\"display\", \"block\")\n\t\t$(\".pay_box\").css(\"display\", \"block\")\n\t\t\t//\t\talert($)\n\t\t$(\".shopping_box\").html(\"\")\n\t\t\t//\t\t$(\".cart_box_has\").html(\"\");\n\t\t$.ajax({\n\t\t\turl: \"json/cart.json\",\n\t\t\tsuccess: function(date) {\n\t\t\t\tvar _len = date.length\n\t\t\t\tvar _date_index = 0;\n\t\t\t\t$(\".shopping_box\").html(\"\")\n\t\t\t\tfor (var i = 0; i < _len; i++) {\n\t\t\t\t\tif (_cart[date[i].id]) {\n\t\t\t\t\t\t_str1 = \"\"\n\t\t\t\t\t\tvar _total = parseInt(_cart[date[i].id]) * parseInt(date[i].list.newprice)\n\t\t\t\t\t\t_str1 = \"<div date_index ='\" + _date_index + \"' class='cart_good clearfix'><div class='cart_code'>\" + date[i].id + \"</div><div class='cart_name clearfix'><div class='cart_good_img'><a href='javascript:;'><img src='\" + date[i].list.src[0] + \"'/></a><div class='cart_good_sec'><img src='\" + date[i].list.src[0] + \"'/></div></div><div class='cart_good_txt'>\" + date[i].list.name + \"</div></div><div class='cart_oldp'>¥<span>\" + date[i].list.oldprice + \"</span></div><div class='cart_newp'>¥<span>\" + date[i].list.newprice + \"</span></div><div class='cart_num'><div class='cart_num_addsub'><span class='sub_btn' date_index = '\" + _date_index + \"'><img src='img/cart/btn_minus.gif'/></span><input type='text' readonly='readonly' id='cart_good_num' value='\" + _cart[date[i].id] + \"' /><span class='add_btn' date_index = '\" + _date_index + \"'><img src='img/cart/btn_plus.gif'/></span></div></div><div class='cart_total'>¥<span>\" + _total + \"</span></div><div class='cart_del'><a class='del' date_id = '\" + date[i].id + \"' href='javascript:;'>删除</a></div></div>\"\n\t\t\t\t\t\t_date_index++;\n\t\t\t\t\t\t$(\".shopping_box\").append(_str1)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboundEvent()\n\n\t\t\t}\n\t\t})\n\n\t}\n}", "function BuildCartItemToCreateOrder(props) {\n return ( {\n 'item_id': props.item.id ,\n 'price':parseInt(props.item.price) ,\n 'quantity': props.quantity }\n ) ;\n}", "getCart() {\n CART.cart_contents = this.cart.cart_contents;\n CART.coupons = this.cart.coupons;\n CART.applied_coupons = this.cart.applied_coupons;\n CART.chosen_shipping_methods = this.cart.chosen_shipping_methods;\n CART.fees = this.cart.fees;\n CART.fee_total = this.cart.fee_total;\n CART.cart_session_data = this.cart.cart_session_data;\n if (this.customer) {\n CUSTOMER = Object.assign({}, this.customer);\n APP.setCustomer(CUSTOMER.id)\n } else {\n APP.setGuest();\n CUSTOMER.id = 0; //TODO: Fix this. Should be in the customer file.\n }\n console.log(CART);\n }", "function getCart(){\n let items = localStorage.getItem(\"cartProducts\");\n items = JSON.parse(items);\n\n let container = document.querySelector(\".products\");\n\n // let baskettotal = document.querySelector(\".basket-total\");\n\n let totalCartCost = localStorage.getItem('totalCost');\n totalCartCost = JSON.parse(totalCartCost);\n displayCheckout();\n // run only if items and .cart-container is running.\n if (items && container) {\n container.innerHTML = '';\n\n // check the values of the cart items\n Object.values(items).map((item) => {\n //display each basket item.\n container.innerHTML += `\n <div class=productItem>\n <div class=\"item-title\">\n <div>${item.itemName}</div>\n <img src=\"${item.imgurl}\" style=\"width:60px; height:60px;\">\n </div>\n <div class=\"item-price\">$${item.price},00</div>\n <div class=\"item-quantity\">${item.numInCart}</div>\n <div class=\"item-total\">$${item.price * item.numInCart},00</div>\n </div>\n `\n });\n }\n}", "function displayCart(){\r\n let cartItems = localStorage.getItem(\"productsInCart\");\r\n cartItems = JSON.parse(cartItems);\r\n let productContainer = document.querySelector\r\n (\".product\");\r\n let cartCost = localStorage.getItem('totalCost');\r\n\r\n console.log(cartItems);\r\n if( cartItems && productContainer){\r\n productContainer.innerHTML = '';\r\n Object.values(cartItems).map(item =>{\r\n productContainer.innerHTML += ` \r\n <div class = \"product\">\r\n <ion-icon name=\"close-circle\"></ion-icon>\r\n <span>${item.name}M</span>\r\n </div>\r\n <div class=\"price\">P${item.price}.00</div>\r\n <div class=\"quantity\">\r\n <span>${item.inCart}</span>\r\n </div>\r\n <div class=\"total\">\r\n P${item.inCart * item.price}.00\r\n </div> \r\n `;\r\n });\r\n\r\n productContainer.innerHTML += ` \r\n <div class=\"basketTotalContainer\">\r\n <h4 class=\"basketTotalTitle\">\r\n Basket Total\r\n </h4>\r\n <h4 class=\"basketTotal\">\r\n P${cartCost}.00\r\n </h4>\r\n `;\r\n }\r\n}", "function saveData(){ \n // Transform the products array into a JSON string \n var productJSON = JSON.stringify(products); \n console.log(productJSON); \n\n\n // Save that JSON string to a local storage (aka local memory of the browser)\n localStorage.setItem(\"price-list\", productJSON); \n\n\n}", "function generateCart(){//afegit el paràmetre cartlist a la funció per poder probar-la amb un altre array sense modificar el codi\n let set= new Set(cartList.map( JSON.stringify ))//convertits els objectes a cadena de text per comprobar repetits\n cart = Array.from( set ).map( JSON.parse );//afegim a cart els resultats únics i convertim els strings d'abans a objectes\n \n for( let i=0; i<cart.length;i++){\n cart[i].quantity=0;// reset del camp a 0 per anar sumant els que venen de cartList\n for( let j=0; j<cartList.length; j++ ){\n \n if(cart[i].name==cartList[j].name){\n cart[i].quantity++;\n cart[i].subtotal=(cart[i].quantity*cart[i].price);\n }\n }\n }console.log(cart);\n}", "get items() {\n // Send the request\n return this._cartRequest('cart/items', {}, 'GET');\n }", "function storingCartItem() {\n \n /**\n * TODO: Create Product Object\n */\n let cartItem = product;\n cartItem.quantity = 1;\n cartItem.lensOption = updatePersonalizedFeatures();\n\n /**\n * TODO: Get \"cartItems\" value \n */\n let cartItems = JSON.parse(localStorage.getItem('cartItems'));\n\n\n /**\n * TODO: Update \"cartItems\" value with new Product Object (Push to the Array)\n */\n cartItems.push(cartItem);\n localStorage.setItem('cartItems', JSON.stringify(cartItems));\n\n // update cart badge\n let cartItemsQuantity = document.getElementById('cartItemQuantity');\n cartItemsQuantity.style.display = \"inline-block\";\n updateCartBadge();\n \n /**\n * TODO: Further \"Add to cart\" stuff....\n */\n //goToCartPage();\n \n console.log(cartItems);\n\n}", "function loadCart(){\n cart = JSON.parse(sessionStorage.getItem('revonicCart')); // fetching original object items using JSON parse. \n }", "function generateCart() {\n //using the cartArray, generate rows of a table using jQuery(?)\n // EXTRACT VALUE FOR HTML HEADER.\n var col = ['ITEM NAME', 'CATEGORY', 'PRICE'];\n\n // CREATE DYNAMIC TABLE.\n var table = document.createElement(\"table\");\n table.className += \"table table-hover\";\n table.id += \"cart\"\n\n //RETRIEVE THE CART OBJECT FROM localStorage\n let newCart = JSON.parse(localStorage.getItem(\"Cart\"));\n\n if (newCart === null) {\n var divContainer = document.getElementById(\"showData\");\n divContainer.innerHTML = \"Your Cart is empty! Go look at some of our cards!\";\n }\n\n // CREATE HTML TABLE HEADER ROW USING THE EXTRACTED HEADERS ABOVE.\n var tr = table.insertRow(-1); // TABLE ROW. -1 appends on to the end\n\n for (var i = 0; i < col.length; i++) {\n var th = document.createElement(\"th\"); // TABLE HEADER.\n th.innerHTML = col[i];\n tr.appendChild(th);\n }\n\n // ADD JSON DATA TO THE TABLE AS ROWS.\n try {\n for (var i = 0; i < newCart.length; i++) {\n\n tr = table.insertRow(-1);\n tr.className += \"row-hover\";\n\n for (var j = 0; j < col.length; j++) {\n var tabCell = tr.insertCell(-1);\n //inserts our info from the inventory\n tabCell.innerHTML = newCart[i][col[j]];\n tabCell.id += \"col\" + j + i;\n }\n\n }\n } catch (e) {\n console.log(e.message); // \"null has no properties\"\n console.log(e.name);\n }\n\n // FINALLY ADD THE NEWLY CREATED TABLE WITH JSON DATA TO A CONTAINER.\n var divContainer = document.getElementById(\"showData\");\n divContainer.innerHTML = \"\";\n divContainer.appendChild(table);\n}", "async getCartDetailsByUserId(req, res) {\n const cartValues = await Cart.findOne({\n where: { user_id: req.params.id }\n });\n\n if (cartValues === null) res.send([]);\n const cartDetails = cartValues.dataValues;\n const quantities = [];\n const productIDS = cartDetails.cart_items.map(item => {\n quantities.push(item.qty);\n return item.product_id;\n });\n let products = await Products.findAll({\n raw: true,\n where: { product_id: productIDS }\n });\n let arrayOfObjects = [];\n products.forEach((item, index) => {\n let obj = { ...item };\n obj[\"qty\"] = quantities[index];\n arrayOfObjects.push(obj);\n });\n res.send(arrayOfObjects);\n }", "get jsonData() {\n returnJSON.stringify(this.oppList);\n }", "function updateCart(cartJSON) {\n \n var shopCart = jsonParse(cartJSON);\n var generated = shopCart.generated;\n \n if (generated > lastCartUpdate) {\n lastCartUpdate = generated;\n var contents = document.getElementById(\"contents\");\n contents.innerHTML = \"\";\n\n var cartItems = shopCart.cart;\n for (var i in cartItems) {\n if (i%2 == 1) {\n var itemDetails = cartItems[i];\n \n var name = itemDetails.name;\n var quantity = itemDetails.quantity;\n\n var listItem = document.createElement(\"li\");\n listItem.appendChild(document.createTextNode(name+\" x \"+quantity));\n contents.appendChild(listItem);\n }\n }\n\n }\n\n document.getElementById(\"total\").innerHTML = shopCart.total;\n}", "function generateTransactionJSON(){\n var tobject = createTransactionObjectJson();\n setData('send_transaction_object_json',JSON.stringify(tobject,undefined,2),false)\n}", "get order() {\n // Send the request\n return this._cartRequest('cart', {}, 'POST', 'order');\n }", "function viewCart() {\nvar list = [];\nif (cart.length === 0) {\n return 'Your shopping cart is empty.'\n}\nfor (var i = 0; i < cart.length; i++) {\n\n if (cart.length === 1) {\n list.push(`In your cart, you have ${cart[0].itemName} at $${cart[0].itemPrice}.`) \n}\n\n else if (cart.length === 2) {\n list.push(`In your cart, you have ${getCart()[0].itemName} at $${getCart()[0].itemPrice}, and ${getCart()[1].itemName} at $${getCart()[1].itemPrice}.`)\n}\n\nelse{\n list.push(`In your cart, you have ${getCart()[0].itemName} at $${getCart()[0].itemPrice}, ${getCart()[1].itemName} at $${getCart()[1].itemPrice}, and ${getCart()[2].itemName} at $${getCart()[2].itemPrice}.`)\n}\nreturn list;\n}\n}", "getOrderItems() {\n let items = [];\n items.push({\n type: 'sku',\n parent: this.lineItems[0].sku,\n quantity: this.lineItems[0].quantity,\n })\n return items;\n }", "function updateCartDB() {\n\tconsole.log(\"Updating backend\")\n var shoppingCartJson = {};\n var Items = {};\n shoppingCartJson[\"ShopperID\"] = document.getElementById('Shop_User').innerText\n console.log(shoppingCartJson)\n\n var cartItemContainer = document.getElementsByClassName('cart-items')[0]\n var cartRows = cartItemContainer.getElementsByClassName('cart-row')\n for (var i = 0; i < cartRows.length; i++) {\n var cartRow = cartRows[i]\n var itemName = cartRow.getElementsByClassName('cart-item-title')[0].innerText\n var priceElement = cartRow.getElementsByClassName('cart-price')[0]\n var quantityElement = cartRow.getElementsByClassName('cart-quantity-input')[0]\n var price = parseFloat(priceElement.innerText.replace('$', ''))\n var quantity = quantityElement.value\n var description = cartRow.getElementsByClassName('cart-description')[0].innerText\n console.log(\"Checking updateCartTotal\")\n console.log(itemName)\n console.log(price)\n console.log(quantity)\n console.log(description)\n var item = {}\n var itemDetails = {}\n itemDetails[\"Name\"] = itemName;\n itemDetails[\"Description\"] = description;\n itemDetails[\"Quantity\"] = parseInt(quantity);\n itemDetails[\"Price\"] = parseFloat(price);\n Items[itemName] = itemDetails;\n console.log(Items)\n }\n shoppingCartJson[\"Items\"] = Items;\n versionHTML = document.getElementById(\"version\")\n if (versionHTML.innerText.length != 0) {\n VersionJSON = JSON.parse(versionHTML.innerText)\n console.log(\"Version JSON is\"+VersionJSON)\n shoppingCartJson[\"Version\"] = VersionJSON;\n } else{\n shoppingCartJson[\"Version\"] = {\"Vector\":{}};\n }\n shoppingCartJsonString = JSON.stringify(shoppingCartJson);\n var xhr = new XMLHttpRequest();\n\n\txhr.onreadystatechange = function() {\n\t if (this.readyState == 4 && this.status == 200) {\n console.log(this.responseText);\t\n var shoppingCart = JSON.parse(JSON.parse(this.responseText));\n var shoppingCartVersion = shoppingCart[\"Version\"]\n console.log(shoppingCartVersion)\n var versionHTML = document.getElementById(\"version\")\n versionHTML.innerText = JSON.stringify(shoppingCartVersion)\n\t }\n\t};\n\n xhr.open(\"POST\",\"http://localhost:9000/put\");\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n xhr.send(shoppingCartJsonString);\n\n \n console.log(shoppingCartJsonString)\n}", "function crearJsonRegistroPeso() {\r\n var objson = new Object();\r\n //\r\n objson.id_usuario = Cookies.get('id_usuario');\r\n objson.fecha = fechaTrans();\r\n objson.kg = $('#kg').val();\r\n objson.fat = $('#fat').val();\r\n objson.water = $('#water').val();\r\n objson.mm = $('#mm').val();\r\n return (JSON.stringify(objson));\r\n }", "function setCart() {\n localStorage.setItem(\"cart\", JSON.stringify(cart)); //updates the cart\n}", "parseOrderToJSON() {\n let JSON = {\n table: 2,\n orders : []\n };\n\n // Each order will be associated to a person (represented by a numerical index in the array of orders (from 0 to n))\n JSON.orders.push(this.orderArray);\n\n return JSON;\n }", "checkout(){\n if (window.result == null){\n alert(\"cart is empty! please click above link to book first.\")\n }\n else {\n var result = JSON.stringify(window.result)\n result = result.substring(1,result.length-1)\n result = JSON.parse(result)\n console.log(result.seat_id)\n console.log(result.base_price)\n alert(\"You booked seat: \"+result.seat_id+\" and your price is: \"+result.base_price)\n }\n }", "function redeemGiftCertificateJson() {\n var giftCertCode, giftCertStatus;\n giftCertCode = request.httpParameterMap.giftCertCode.stringValue;\n giftCertStatus = redeemGiftCertificate(giftCertCode);\n let responseUtils = require('~/cartridge/scripts/util/Response');\n if (request.httpParameterMap.format.stringValue !== 'ajax') {\n // @FIXME we could also build an ajax guard?\n responseUtils.renderJSON({});\n } else {\n responseUtils.renderJSON({\n status: giftCertStatus.code,\n success: !giftCertStatus.error,\n message: Resource.msgf('billing.' + giftCertStatus.code, 'checkout', null, giftCertCode),\n code: giftCertCode\n });\n }\n}", "function success(json) {\r\n \r\n let span = document.getElementById(\"shoppingCart\");\r\n span.innerHTML = \"\";\r\n let total = 0;\r\n for (let i = 0; i < json.length; i++) {\r\n \r\n span.innerHTML += listToHtml(json[i]);\r\n total+= Number(json[i].itemPrice)\r\n }\r\n document.getElementById(\"total\").innerHTML = \"$\" + total + \".00\";\r\n \r\n\r\n }", "function item_for_cart_items(product) {\n if (product===undefined){ //when cart is empty this value is undefined\n var item = { name : \"\", in_price : \"\", out_price : \"\", src : \"\", quantity : 0, total : 0 };\n }else{\n var item = { name : product.name, in_price : product.in_price, out_price : product.out_price,\n src : product.src, quantity : 1, total : product.out_price };\n } \n return item;\n }", "raw () {\n return JSON.parse(JSON.stringify(this._order.toJSON()))\n }", "function getLocatStoragedata() {\n return JSON.parse(localStorage.getItem('cartItems') || JSON.stringify(itemList.items));\n }", "function listMealCart() {\n var cartCopy = [];\n for (var i in mealCart) {\n var item = mealCart[i];\n var itemCopy = {};\n for (var p in item) {\n itemCopy[p] = item[p];\n }\n cartCopy.push(itemCopy);\n }\n return cartCopy;\n}", "function viewCart() {\n // special case if there are no items in the cart\n if(cart.length === 0){\n return \"Your shopping cart is empty.\"\n } else {\n // create empty array\n var newArray = [];\n\n for(var i = 0; i < cart.length; i++){\n // special case for first item\n if(i === 0){\n newArray.push(`In your cart, you have ${cart[i].itemName} at $${cart[i].itemPrice}`)\n }\n // special case for last item\n else if(i + 1 === cart.length){\n console.log(\"hi\")\n newArray.push(` and ${cart[i].itemName} at $${cart[i].itemPrice}`);\n }else {\n // convert the Array of Objects into an Array of String\n newArray.push(` ${cart[i].itemName} at $${cart[i].itemPrice}`)\n }\n }\n // In your cart, you have bananas at $17, pancake batter at $5, and eggs at $49.\n return `${newArray.toString()}.`\n }\n}", "function stringifyCartMetadata(cart) {\n var cartMeta = [];\n for (var i = 0; i < cart.length; i++) {\n cartMeta.push({\n id: cart[i].product.id,\n q: cart[i].quantity\n });\n }\n\n var cartMetaStr = JSON.stringify(cartMeta);\n var chargeMeta = null;\n\n switch ( Math.ceil(cartMetaStr.length / 500) ) {\n case (1):\n chargeMeta = {\n cartItems1: cartMetaStr\n };\n break;\n case (2) :\n chargeMeta = {\n cartItems1: cartMetaStr.substring(0, 500),\n cartItems2: cartMetaStr.substring(500, 1000)\n };\n break;\n case (3):\n chargeMeta = {\n cartItems1: cartMetaStr.substring(0, 500),\n cartItems2: cartMetaStr.substring(500, 1000),\n cartItems3: cartMetaStr.substring(1000, 1500)\n };\n break;\n case (4):\n chargeMeta = {\n cartItems1: cartMetaStr.substring(0, 500),\n cartItems2: cartMetaStr.substring(500, 1000),\n cartItems3: cartMetaStr.substring(1000, 1500),\n cartItems4: cartMetaStr.substring(1500, 2000)\n };\n break;\n case (5):\n chargeMeta = {\n cartItems1: cartMetaStr.substring(0, 500),\n cartItems2: cartMetaStr.substring(500, 1000),\n cartItems3: cartMetaStr.substring(1000, 1500),\n cartItems4: cartMetaStr.substring(1500, 2000),\n cartItems5: cartMetaStr.substring(2000, 2500)\n };\n break;\n case (6):\n chargeMeta = {\n cartItems1: cartMetaStr.substring(0, 500),\n cartItems2: cartMetaStr.substring(500, 1000),\n cartItems3: cartMetaStr.substring(1000, 1500),\n cartItems4: cartMetaStr.substring(1500, 2000),\n cartItems5: cartMetaStr.substring(2000, 2500),\n cartItems6: cartMetaStr.substring(2500, 3000)\n };\n break;\n case (7):\n chargeMeta = {\n cartItems1: cartMetaStr.substring(0, 500),\n cartItems2: cartMetaStr.substring(500, 1000),\n cartItems3: cartMetaStr.substring(1000, 1500),\n cartItems4: cartMetaStr.substring(1500, 2000),\n cartItems5: cartMetaStr.substring(2000, 2500),\n cartItems6: cartMetaStr.substring(2500, 3000),\n cartItems7: cartMetaStr.substring(3000, 3500)\n };\n break;\n default:\n chargeMeta = {\n cartItems1: cartMetaStr.substring(0, 500),\n cartItems2: cartMetaStr.substring(500, 1000),\n cartItems3: cartMetaStr.substring(1000, 1500),\n cartItems4: cartMetaStr.substring(1500, 2000),\n cartItems5: cartMetaStr.substring(2000, 2500),\n cartItems6: cartMetaStr.substring(2500, 3000),\n cartItems7: cartMetaStr.substring(3000, 3500),\n cartItems8: cartMetaStr.substring(3500, 4000)\n };\n break;\n }\n\n return chargeMeta;\n}", "function getCartList() {\t\n\tvar carDataGetAfterval = window.localStorage.getItem('carDatas');\n\t\n\tif(carDataGetAfterval!=null) {\n\t\tvar carDataGetAfter = JSON.parse(carDataGetAfterval);\n\t\t//alert(carDataGetAfter.items);\n\t\tvar itemDetsAf = carDataGetAfter.items;\n\t\thtmlData=\"\";\n\t\tpriceTotal=0;\n\t\tdealName=window.localStorage.getItem('deal_name');\n\t\t//alert(dealName);\n\t\tif(dealName!=null) {\n\t\t\thtmlData+='<h4>Deal :'+dealName+'</h4>';\n\t\t}\n\t\t\n\t\t$.each(itemDetsAf, function(index, itemDetaf) {\n\t\t\t//alert(index);\n\t\t\t//alert(itemDetaf.deal_id);\n\t\t\thtmlData+='<div class=\" checkout-grid clearfix\">';\n htmlData+='<ul>';\n htmlData+='<li class=\"sno\">'+(index+1)+'.</li> <li class=\"title\"><h4 >' + itemDetaf.item_name + '&nbsp;'+(itemDetaf.deal_id!=0 ? '[ deal ]' : (itemDetaf.price_type!=null ? '['+itemDetaf.price_type+']' : ''))+'</h4>';\n htmlData+='<span>'+ itemDetaf.item_desc + '</span>';\n htmlData+='</li> <li class=\"sprice\"><h4 >$ '+itemDetaf.item_price+'</h4></li><li class=\"sremove\"><img src=\"img/remove.png\" alt=\"\" onclick=\"removeItem('+index+');\"></li>'; \n htmlData+='</ul>';\n htmlData+='</div>';\n\t\t\t//alert(itemDetaf.item_price);\n\t\t\tpriceTotal=parseFloat(priceTotal)+parseFloat(itemDetaf.item_price);\n\t\t\t\n\t\t\t\n\t\t});\t\n\t\tpriceSubTotal = +(Math.round(priceTotal + \"e+2\") + \"e-2\"); \n\t\t// subtotal\n\t\thtmlData+='<hr></hr><div class=\"checkout-grid clearfix\" >';\n\t\t\thtmlData+='<ul>';\n\t\t\t\thtmlData+='<li class=\"sno\">&nbsp;</li><li class=\"title\"><h4 style=\" text-align:right;font-size:13px;\" >Subtotal</h4>';\t\t\t\t\n\t\t\t\thtmlData+='</li> <li class=\"sprice\" style=\"width:25%;\"><h4 >$ '+priceSubTotal+'<input type=\"hidden\" name=\"total_amount\" id=\"total_amount\" value=\"'+priceSubTotal+'\"></h4></li> '; \n\t\t\thtmlData+='</ul>';\n\t\thtmlData+='</div><hr></hr>';\n\t\t\n\t\tvar holidaypercntval = window.localStorage.getItem('holidaypercnt');\n\t\tif(holidaypercntval!=null && holidaypercntval!=\"\"){\n\t\t\tvar holidaypercnt = JSON.parse(holidaypercntval);\n\t\t\tpercentageval = ((priceSubTotal/100)*holidaypercnt).toFixed(1);\n\t\t\thtmlData+='<div class=\"checkout-grid clearfix\" >';\n\t\t\thtmlData+='<ul>';\n\t\t\thtmlData+='<li class=\"sno\">&nbsp;</li><li class=\"title\"><h4 style=\" text-align:right; font-size:13px;\">Holiday Cost ('+holidaypercnt+'%)</h4>';\t\t\t\t\n\t\t\thtmlData+='</li> <li class=\"sprice\"><h4 >$ '+percentageval+'</h4></li> '; \n\t\t\thtmlData+='</ul>';\n\t\t\thtmlData+='</div><hr></hr>';\t\n\t\t}else{\n\t\t\tpercentageval=0;\n\t\t}\t\t\n\t\t\n\t\t// total\n\t\toveralltotal = (+priceSubTotal + +percentageval).toFixed(1);\n\t\thtmlData+='<div class=\"checkout-grid clearfix\" >';\n\t\t\thtmlData+='<ul>';\n\t\t\t\thtmlData+='<li class=\"sno\">&nbsp;</li><li class=\"title\"><h4 style=\" text-align:right\" >Total</h4>';\t\t\t\t\n\t\t\t\thtmlData+='</li> <li class=\"sprice\" style=\"width:25%;\"><h4 >$ '+overalltotal+'<input type=\"hidden\" name=\"gross_total\" id=\"gross_total\" value=\"'+overalltotal+'\"></h4></li>'; \n\t\t\thtmlData+='</ul>';\n\t\thtmlData+='</div>';\t\n\t\t\n\t\t$('#itemDetList').html(htmlData);\n\t} else {\n\t\t\n\t\t$('#buttGroup').hide();\n\t\t$('#placeOrdButtonId').hide();\n\t\t$('#pickupnow').hide();\n\t\t$('#pickupTimeSelector').hide();\n\t\t\thtmlData='<div class=\" checkout-grid clearfix\">';\n htmlData+='<ul>';\n\t\t\t\tif(dealId!=null) {\n\t\t\t\t\thtmlData+='<li class=\"title\" style=\"width:55%;text-shadow:none;\">Cart is empty!<a href=\"showMenu.html?itemId='+dealId+'\" class=\"ui-link-inherit\" rel=\"external\" style=\"color:#000000 ;text-decoration:underline !important;text-shadow:none;\">&nbsp;Add items</a></li>';\n\t\t\t\t} else {\n\t\t\t\t\thtmlData+='<li class=\"title\" style=\"width:55%;text-shadow:none;\">Cart is empty!<a href=\"showMenu.html\" class=\"ui-link-inherit\" rel=\"external\" style=\"color:#000000;text-decoration:underline !important;text-shadow:none;\">&nbsp;Add items</a></li>';\n\t\t\t\t}\n\t\t\n\t\t$('#itemDetList').html(htmlData);\n\t}\n\t\n}", "function renderCart() {\n var prices = [];\n\n cartContent.innerHTML = \"\";\n\n cart.items.forEach(function(item) {\n var itemPrice = parseFloat(item.price.replace(\"$ \", \"\")),\n itemQuantity = parseInt(item.quantity);\n\n prices.push(itemPrice * itemQuantity);\n cartContent.innerHTML += \"<li class='cart-item' id='cart-\" + item.id + \"'><p class='cart-item-name'>\" + item.name + \"</p><img class='cart-item-img' src='http://vignette1.wikia.nocookie.net/clubpenguin/images/5/5f/Red_X.png/revision/latest?cb=20120514130731'><input type='number' class='inset quantity' min='0' max='50' value=\" + item.quantity + \"></li>\";\n })\n\n var totalPrice = prices.reduce(function(a, b) {\n return a + b;\n }, 0);\n\n cart.total = totalPrice.toFixed(2);\n cartTotal.innerHTML = \"$ \" + cart.total;\n }", "function retrieveCartDB() {\n\tconsole.log(\"Querying backend\")\n shopperID = document.getElementById('Shop_User').innerText\n var xhr = new XMLHttpRequest();\n\n\txhr.onreadystatechange = function() {\n\t if (this.readyState == 4 && this.status == 200) {\n //console.log(this.responseText);\t\n var shoppingCart = JSON.parse(JSON.parse(this.responseText));\n //console.log(shoppingCart)\n //console.log(shoppingCart)\n var items = shoppingCart[\"Items\"];\n var nameToImg = retrieveImgSrc()\n console.log(items)\n for (var item in items) {\n if (items.hasOwnProperty(item)) {\n //console.log(item)\n var itemName = items[item][\"Name\"]\n var itemDesc = items[item][\"Description\"]\n var itemPrice = items[item][\"Price\"]\n var itemQty = items[item][\"Quantity\"]\n //Need to retrieve image source\n console.log(nameToImg[itemName])\n addItemToCart(itemName,itemPrice,nameToImg[itemName],itemDesc,itemQty)\n }\n }\n updateCartTotal()\n var shoppingCartVersion = shoppingCart[\"Version\"]\n console.log(shoppingCartVersion)\n var versionHTML = document.getElementById(\"version\")\n versionHTML.innerText = JSON.stringify(shoppingCartVersion)\n \n\t }\n\t};\n\n xhr.open(\"POST\",\"http://localhost:9000/get?ID=\"+shopperID);\n xhr.send();\n}", "function clienteJuridicoToJSON() {\n var ol = JSON.stringify({\n \"customerIF\": \"999\",\n \"nombre\": \"POLICE\",\n \"direccion\": \"casa azul\",\n \"telCasa\": \"2290\",\n \"telOficina\": \"311221\",\n \"celular\": \"343324\",\n \"cedulaJuridica\": \"192211\"\n });\n alert(ol);\n return ol;\n}", "function displaycart() {\n let cartItems = localStorage.getItem(\"productsInCart\");\n cartItems = JSON.parse(cartItems);\n console.log(cartItems)\n // for basket total price\n let totalPrice = localStorage.getItem(\"totalPrice\");\n // to display shopping products \n let productsIncart = document.querySelector(\".products\");\n if (cartItems && productsIncart) {\n productsIncart.innerHTML = \"\";\n // getting only product object from cartitems\n let cartItemsArray = Object.values(cartItems);\n console.log(Object.values(cartItems))\n //mapping of each item\n cartItemsArray.map(item => {\n // for each product in cart\n productsIncart.innerHTML += `\n <div class= \"product\">\n <ion-icon class=\"remove-button\" name = \"close-circle\"></ion-icon>\n <img src=\"./img/${item.tag}.jpg\">\n <span>${item.name}</span>\n </div>\n <div class= \"price\"> ${item.price}</div>\n <div class= \"quantity\">\n <ion-icon class = \"increase\" name=\"add-circle-outline\"></ion-icon> \n <span>${item.inCart}</span>\n <ion-icon class = \"decrease\" name=\"remove-circle-outline\"></ion-icon> \n </div>\n <div class= \"total\">\n ${item.inCart * item.price}\n </div>\n `;\n });\n console.log(totalPrice)\n // for basket total in cart.html\n productsIncart.innerHTML += `\n <div class= \"basketTotalContainer\">\n <h4 class= \"basketTotalTitle\"> Basket Total </h4>\n <h4 class= \"basketTotal\"> ${totalPrice}.00</h4> \n </div>\n `;\n }\n changingQuantityOfCartItems();\n RemoveCartItem();\n\n\n}", "function formToJSON() {\n\tvar item_id = $('#item_id').val();\n\treturn JSON.stringify({\n\t\t\"item_id\": item_id == \"\" ? null : item_id, \n\t\t\"cat_menu_id\": $('#cat_menu_id').val(), \n\t\t\"item_nombre\": $('#item_nombre').val(),\n\t\t\"item_desc\": $('#item_desc').val(),\n\t\t\"item_val\": $('#item_val').val(),\n\t\t\"picture\": currentWine.picture,\n\t\t\n\t\t});\n}", "function displayCart() {\r\n\tlet cartItems = localStorage.getItem(\"productsInCart\");\r\n\tcartItems = JSON.parse(cartItems);\r\n\tlet productContainer = document.querySelector(\".products\");\r\n\tif(cartItems && productContainer) {\r\n\t\tproductContainer.innerHTML = '';\r\n\t\tObject.values(cartItems).map(item => {\r\n\t\t\tproductContainer.innerHTML += `\r\n\t\t\t<div class=\"product\">\r\n\t\t\t\t<ion-icon name=\"close-circle\"></ion-icon>\r\n\t\t\t\t<img src=\"./images/${item.tag}.jpg\">\r\n\t\t\t\t${item.name}\r\n\t\t\t</div>\r\n\t\t\t<div class=\"price\">\r\n\t\t\t\tPrice per: ${item.price}\r\n\t\t\t</div>\r\n\t\t\t<div class=\"quantity\"> \r\n\t\t\t\tAmount: ${item.inCart}\r\n\t\t\t</div>\r\n\t\t\t<div class=\"total\">\r\n\t\t\t\tTotal: ${item.inCart * item.price}\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t`\r\n\t\t\t});\r\n\t\t\t\r\n\t\t}\r\n}", "function getItemsInCart(){\n\t\t\treturn items;\n\t\t}", "toJSON() {\n return this.retriveInfo(this)\n }", "function viewCart() {\n //console.log(cart)\n var message = \"In your cart, you have\";\n if (cart.length === 0) {\n console.log(\"Your shopping cart is empty.\")\n }\n else if (cart.length === 1) {\n console.log(message + \" \" + Object.keys(cart[0]) + \" at $\" + cart[0][Object.keys(cart[0])] + \".\")\n }\n else if (cart.length >= 2) {\n var items = []\n for (var i = 0; i < cart.length; i++) {\n var itemName = Object.keys(cart[i])\n var price = cart[i][itemName]\n items.push(itemName + \" at $\" + price)\n if (i != cart.length-1) {\n cart.length === 2 ? message += \" \" + items[i] : message += (\" \" + items[i] + \",\")\n }\n else {\n message += (\" and \" + items[i] + \".\")\n }\n }\n console.log(message)\n }\n}", "function setCart(cart) {\n window.localStorage.setItem('cart', JSON.stringify(cart));\n}", "function saveData() {\n if (localStorage != null && JSON != null) {\n localStorage[\"size\"] = JSON.stringify(size);\n localStorage[\"cartData\"] = JSON.stringify(cartData);\n }\n }", "getDeckNamesAndQuants(deck) {\n return JSON.stringify(deck.map(card => ({ name: card.uniqueName, quantity: card.quantity })))\n }", "function displayCart(){\n let cartItems = localStorage.getItem(\"productsInCart\");\n cartItems = JSON.parse(cartItems);\n let productContainer = document.querySelector(\".products\");\n let cartCost = localStorage.getItem('totalCost');\n if(cartItems && productContainer ){\n productContainer.innerHTML = '';\n Object.values(cartItems).map(item => {\n productContainer.innerHTML += `\n <div class=\"product\">\n <ion-icon name=\"close-circle-outline\"></ion-icon>\n <img scr=\"products/productsAlgemeen/dist/productFotos/${imagePath+images.Afbeeldingsnaam}.jpg\">\n <span>${item.Productnaam}</span>\n </div>\n <div class=\"price\">$${item.Eenheidsprijs},00</div>\n <div class=\"quantity\">\n <ion-icon class=\"decrease\" name=\"arrow-dropleft-circle\"></ion-icon>\n <span>${item.inCart}</span>\n <ion-icon class=\"increase\" name=\"arrow-dropright-circle\"></ion-icon>\n </div>\n <div class=\"total\">\n $${item.inCart * item.Eenheidsprijs},00\n </div>\n `;\n });\n\n productContainer.innerHTML += `\n <div class=\"basketTotalContainer\">\n <h4 class=\"basketTotalTitle\">Basket Total</h4>\n <h4 class=\"basketTotal\">€${cartCost},00</h4>\n `;\n\n }\n}", "get json() {\n return JSON.stringify(this.data);\n }", "function addSelectedItemToCart() { \n var itemsEl = document.getElementById('items').value;\n var quantityEl = document.getElementById('quantity').value;\n cart.addItem(itemsEl, parseInt(quantityEl));\n // console.log(cart.items[0].product);\n // console.log(cart.items[0].quantity); \n}", "function getCartState() {\n 'use strict';\n\n return {\n product: ProductStore.getProduct(),\n selectedProduct: ProductStore.getSelected(),\n cartItems: CartStore.getCartItems(),\n cartCount: CartStore.getCartCount(),\n cartTotal: CartStore.getCartTotal(),\n cartVisible: CartStore.getCartVisible()\n };\n}", "function readStoredCart() {\n\n\tlet carrito = sessionStorage.getItem('std_carrito');\n if (carrito == null || typeof carrito == \"undefined\"\n || carrito == \"\") {\n\n carrito = new Array;\n\n } else {\n\n carrito = JSON.parse(carrito);\n\n }\n\n if (Array.isArray(carrito)) {\n \tcarrito.forEach((item)=>{\n \t\taddProductInCart(item.id,item.name,item.price); \n \t});\n }\n\n \n let carritoprice = sessionStorage.getItem('std_importecarrito');\n if (carritoprice == null || typeof carritoprice == \"undefined\"\n || carritoprice == \"\") {\n\n carritoprice = 0.00;\n\n } else {\n\n carritoprice = parseFloat(carritoprice);\n\n }\n $('#importe_total_carrito').html(carritoprice);\n\n\t\n\n let carritoenvio = sessionStorage.getItem('std_enviocarrito');\n if (carritoenvio == null || typeof carritoenvio == \"undefined\"\n || carritoenvio == \"\") {\n\n carritoenvio = 0.00;\n\n } else {\n\n carritoenvio = parseFloat(carritoenvio);\n\n } \n\t$('#gastos_envio_carrito').html(carritoenvio + '€');\n\n}", "function addToCart(id){\n var res = id.split(\"-\");\n $.ajax({\n url: \"categories.json\",\n dataType: \"json\",\n success: function(data) {\n var prodTitle = data[res[0]].products[res[1]].title\n var prodPrice = data[res[0]].products[res[1]].price\n // alert(prodTitle + \" has been added to the cart with price: \"+prodPrice)\n var cart = JSON.parse(localStorage.getItem('cart'));\n cart.push(data[res[0]].products[res[1]]);\n localStorage.setItem('cart',JSON.stringify(cart));\n updateCartIcon();\n }\n });\n}", "function propertiesToJson() {\n if (!ctrl.productProperties.length) {\n return null;\n }\n var properties = {};\n for (var i = 0, len = ctrl.productProperties.length; i < len; i++) {\n var prop = ctrl.productProperties[i];\n if (prop.key && prop.value) {\n properties[prop.key] = prop.value;\n }\n }\n return properties;\n }", "function loadCart() {\n productsInCart = JSON.parse(sessionStorage.getItem('shoppingCart'));\n }", "static exportJSON(item) {\n var json = item.exportJSON({\n asString: false\n }); // TODO replace src dataURL with asset:uuid here.\n\n return json;\n }", "function updateCart(cartJson) {\n \n console.log(\"Update cart\");\n \n // Handle the Json Object, parse its properties\n var jsonCart = JSON.parse(cartJson.data);\n var generated = jsonCart.cart.generated;\n \n if (generated > lastCartUpdate) {\n \n lastCartUpdate = generated;\n \n // Clear the HTML list used to display the cart contents\n var contents = document.getElementById(\"contents\");\n contents.innerHTML = \"\";\n \n // Loop over the items in the cart\n var items = jsonCart.cart.cartItem;\n for (var I = 0 ; I < items.length ; I++) {\n var item = items[I];\n \n // Extract the text nodes from the name and quantity elements\n var name = item.name;\n var quantity = item.quantity;\n \n // Create and add a list item HTML element for this cart item\n var listItem = document.createElement(\"li\");\n listItem.appendChild(document.createTextNode(name+\" x \"+quantity));\n contents.appendChild(listItem);\n }\n }\n \n // Update the cart's total using the value from the cart document\n document.getElementById(\"total\").innerHTML = jsonCart.cart.total;\n}", "toJSON() {\n const jsonDict = {\n parentHash: '0x' + this.parentHash.toString('hex'),\n uncleHash: '0x' + this.uncleHash.toString('hex'),\n coinbase: this.coinbase.toString(),\n stateRoot: '0x' + this.stateRoot.toString('hex'),\n transactionsTrie: '0x' + this.transactionsTrie.toString('hex'),\n receiptTrie: '0x' + this.receiptTrie.toString('hex'),\n bloom: '0x' + this.bloom.toString('hex'),\n difficulty: ethereumjs_util_1.bnToHex(this.difficulty),\n number: ethereumjs_util_1.bnToHex(this.number),\n gasLimit: ethereumjs_util_1.bnToHex(this.gasLimit),\n gasUsed: ethereumjs_util_1.bnToHex(this.gasUsed),\n timestamp: ethereumjs_util_1.bnToHex(this.timestamp),\n extraData: '0x' + this.extraData.toString('hex'),\n mixHash: '0x' + this.mixHash.toString('hex'),\n nonce: '0x' + this.nonce.toString('hex'),\n };\n if (this._common.isActivatedEIP(1559)) {\n jsonDict['baseFee'] = '0x' + this.baseFeePerGas.toString('hex');\n }\n return jsonDict;\n }", "function extractItemsData(obj) {\n obj = _.isDefined(obj) ? obj : $cart || {};\n var obj_items = Array.isArray(obj.items) ? obj.items : ( (typeof obj.items === \"object\") && (obj.items !== null) ? obj.items : {} );\n return _.map(obj_items, function (index, item) {\n var item_discounts = item.discounts ? item.discounts : {};\n var discounts = _.map(item_discounts, function (i, discount) {\n var detail = obj.discounts ? obj.discounts[discount.code] : {};\n\n return {\n code : discount.code,\n name : detail.terms.name,\n applied_value : discount.applied_value,\n display : detail.display && (detail.display == 1 && 'code') || (detail.display == 2 && 'name') || null\n };\n });\n\n return {\n sku : item['sku'],\n name : item['name'],\n asset : item['asset_location'] + 'primaryimage_new.png',\n isSubscription : item['is_subscription'],\n msrp : item.msrp,\n price : item.price || item.msrp,\n quantity : item.quantity,\n total : item.total,\n discounts : discounts\n };\n });\n }", "function setLocalStorageData(data) {\n localStorage.setItem(\"cartItems\", JSON.stringify(data));\n }", "toJSON() {\n const json = Object.assign({}, this._context);\n // If we're expired, throw...\n if (this.isExpired) {\n throw errors.expirationError;\n }\n return json;\n }" ]
[ "0.71448916", "0.65240455", "0.6489727", "0.64562005", "0.64469624", "0.64362985", "0.64188296", "0.64175403", "0.6333861", "0.6271095", "0.6180868", "0.6175653", "0.6166541", "0.61517256", "0.61146414", "0.6060924", "0.60552514", "0.60545826", "0.60484165", "0.60267586", "0.6017142", "0.60001767", "0.5993083", "0.59929615", "0.5983217", "0.5980061", "0.5935378", "0.5926271", "0.592169", "0.59118414", "0.5898642", "0.5896033", "0.5870483", "0.58558196", "0.58289593", "0.5826634", "0.5810556", "0.5799963", "0.5798342", "0.57924134", "0.57837045", "0.577688", "0.57752526", "0.57734805", "0.57694644", "0.5762665", "0.57213014", "0.57157314", "0.57119423", "0.5694616", "0.5689096", "0.56812686", "0.5675085", "0.5671162", "0.56670153", "0.5666971", "0.56667143", "0.5659064", "0.5658598", "0.56560546", "0.5648474", "0.5643603", "0.563401", "0.5633292", "0.56268615", "0.56265044", "0.5616559", "0.55963415", "0.5594267", "0.55895716", "0.55892766", "0.5581099", "0.5577719", "0.55607367", "0.555721", "0.5551435", "0.55458635", "0.55452895", "0.55347544", "0.55313826", "0.5529165", "0.5527808", "0.5526805", "0.55185455", "0.55027115", "0.5500383", "0.55002964", "0.5485259", "0.54756206", "0.5473182", "0.5461876", "0.5460549", "0.5460517", "0.54490495", "0.54408133", "0.54395294", "0.5437811", "0.5435929", "0.54297715", "0.5427813" ]
0.62578374
10
removing listener to prevent memory leaks
componentWillUnmount() { this.props.firebase .land() .orderByChild("userID") .equalTo(this.props.firebase.auth.currentUser.uid) .off(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "removeAllListeners() {\n this.listeners = {};\n }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "_unlisten() {\n const that = this;\n\n if (that._trackListener) {\n that._trackListener.unlisten();\n }\n\n if (that._fillListener) {\n that._fillListener.unlisten();\n }\n\n if (that._lineListener) {\n that._lineListener.unlisten();\n }\n }", "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "removeListener(listener) {\n const index = activeListeners.findIndex(l => l === listener);\n if (index !== -1) {\n activeListeners.splice(index, 1);\n }\n }", "destroy() {\n this.listeners = null;\n }", "removeAll() {\n this.listeners.forEach(listener => listener.destroy());\n this.listeners = [];\n }", "function removeListener(w, event, cb) {\n if (w.detachEvent) w.detachEvent('on' + event, cb);else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "removeListener(event, listener) {\n this.ee.removeListener(event, listener);\n }", "onDestroy() {\n this.unlisten()\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "remove() {\n this.target.removeListener(this.event, this.callback, {\n context: this.context,\n remaining: this.remaining\n });\n }", "addOnRemove (listener) {\n this.listeners.push(listener)\n }", "function remove(){primus.removeListener(\"error\",remove).removeListener(\"open\",remove).removeListener(\"end\",remove).timers.clear(\"connect\")}", "removeListeners()\n {\n this.cancel.removeEventListener('click', this.destroy);\n }", "_removeListeners() {\n try {\n WINDOW$1.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n WINDOW$1.removeEventListener('blur', this._handleWindowBlur);\n WINDOW$1.removeEventListener('focus', this._handleWindowFocus);\n\n restoreRecordDroppedEvent();\n\n if (this._performanceObserver) {\n this._performanceObserver.disconnect();\n this._performanceObserver = null;\n }\n } catch (err) {\n this._handleException(err);\n }\n }", "unsubscribe(listener){\n let index = this.listeners.indexOf(listener);\n if( index >= 0 )\n this.listeners.splice(index, 1);\n }", "remove() {\n this.target.removeEventListener(this.eventType, this.fn, false);\n }", "destroy () {\n this.eventListeners = null;\n }", "removeEventListeners() {\n\t\twindow.removeEventListener('resize', this.bindResize);\n\t\tthis.domElement.removeEventListener('click', this.bindClick);\n\t\tTweenMax.ticker.removeEventListener('tick', this.bindRender);\n\t\tEmitter.off('LOADING_COMPLETE', this.bindEnter);\n\t\twindow.removeEventListener('mousemove', this.boundMouseMove);\n\t}", "_clearListeners() {\n for (let listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "_clearListeners() {\n for (const listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "unlisten() {\n [\"change\"].forEach(name => {\n this.el_.removeEventListener(name, this.handler_, false)\n })\n\n /* Final reset */\n this.reset()\n }", "destroy() {\n let i;\n for (let type in this._listeners) {\n let arr = this._listeners[type];\n for (i = 0; i < arr.length; i += 1) {\n arr[i] = null;\n }\n }\n }", "_removeListeners() {\n document.removeEventListener('click', this._handleWindowClick);\n window.removeEventListener('resize', this._handleResize);\n this.el.removeEventListener('keydown', this._handleKeyDown);\n document.removeEventListener('blur', this._handleBlur, true);\n document.removeEventListener('focus', this._handleFocus, true);\n document.removeEventListener('spark.visible-children', this._handleVisibleChildren, true);\n }", "disconnectedCallback() {\n this.removeEventListener(\"mousedown\", this.tapEventOn);\n this.removeEventListener(\"mouseover\", this.tapEventOn);\n this.removeEventListener(\"mouseout\", this.tapEventOff);\n this.$.button.removeEventListener(\"focused-changed\", this.focusToggle);\n super.disconnectedCallback();\n }", "__detatchListeners() {\n if (qx.bom.History.SUPPORTS_HASH_CHANGE_EVENT) {\n qx.bom.Event.removeNativeListener(\n window,\n \"hashchange\",\n this.__checkOnHashChange\n );\n } else {\n qx.event.Idle.getInstance().removeListener(\n \"interval\",\n this.__onHashChange,\n this\n );\n }\n }", "function clearListeners(event) {\n if(event) {\n delete listeners[event];\n } else {\n listeners = {};\n }\n }", "unlisten() {\n EventManager.off('resize', this.onResize)\n }", "removeAllEventListeners () {\n this.eventListeners = [];\n }", "function removeListeners() {\r\n gameOverModal.btn.removeEventListener(\"click\", backToMenu);\r\n }", "destroy() {\n\t\tthis._listener.stopListening();\n\t}", "_removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }", "_removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }", "_removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }", "removeAllEventListeners() {\n this.eventListeners.forEach(({target, type, boundListener}) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "removeAllListeners() {\n const me = this,\n listeners = me.eventListeners || (me.eventListeners = {});\n\n for (let event in listeners) {\n listeners[event].forEach((cfg) => me.removeListener(event, cfg));\n }\n }", "removeAllEventListeners() {\n this.eventListeners.forEach(({ target, type, boundListener }) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "function y(t){if(null!=t&&null!=t._parent)for(const e in t._handlers)t._parent.removeListener(e,t._handlers[e])}", "removeEventListeners() {\r\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\r\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\r\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\r\n \r\n if (this.gyroscope) {\r\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\r\n }\r\n \r\n if (this.glare || this.fullPageListening) {\r\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\r\n }\r\n }", "removeListener(event: string, listener: Function) {\n var idx;\n\n if (typeof this.__events[event] === 'object') {\n idx = indexOf(this.__events[event], listener);\n\n if (idx > -1) {\n this.__events[event].splice(idx, 1);\n }\n }\n }", "onDestroy() {\n for(var topic in this.listeners) {\n this.removeTopic(topic);\n }\n clearInterval(this.panInterval);\n super.onDestroy();\n }", "removeAllListeners (eventName) {\n // perform default behavior, preserve fn arity\n if (eventName) {\n super.removeAllListeners(eventName)\n } else {\n super.removeAllListeners()\n }\n // re-add internal events\n this._setupInternalEvents()\n // trigger stop check just in case\n this._onRemoveListener()\n }", "removeChangeListener(callback) {\n this.removeListener('change', callback);\n }", "removeEventListeners() {\n // Empty in base class.\n }", "_removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n\n this._globalSubscription = null;\n }\n }", "_removeEventListeners() {\n\n this.el.removeEventListener('click', this._onClickBound);\n window.removeEventListener('scroll', this._onScrollBound);\n window.removeEventListener('orientationchange', this._onScrollBound);\n document.removeEventListener('spark.visible-children', this._onVisibleBound, true);\n\n if (canObserve)\n this._removeMutationObserver();\n else\n window.removeEventListener('resize', this._onResizeBound);\n }", "removeListener(event, listener, emitter = this._defaultEmitter()) {\n emitter.removeListener(event, listener);\n }", "static removeEventListener(type, handler) {\n if(Linking.unlisten) {\n Linking.unlisten();\n }\n }", "destroy() {\n this.removeDomListeners()\n // 238-4\n this.unsubscribers.forEach(unsub => unsub())\n }", "unlisten() {\n ipc.removeListener('search-count', this._searchCoundHandler);\n ipc.removeListener('focus-input', this._focusHandler);\n }", "function removeListeners() {\n debug(\"removeListeners\");\n cards().forEach(function(card) {\n card.removeEventListener('click', cardMagic)\n })\n }", "removeChangeListener(callback) {\n\t\tthis.removeListener(CHANGE_EVENT, callback)\n\t}", "function removeListeners() {\r\n modal.yes.removeEventListener(\"click\", backToMenu);\r\n modal.no.removeEventListener(\"click\", backToGame);\r\n }", "function removeListener(device) {\n //console.log('removeListener ')\n if (device.deviceType == '现场测试') {\n var id = calculateId(device)\n var item = list.children[id]\n\n if (item) {\n list.removeChild(item)\n }\n\n delete mapping[id]\n }\n }", "onRemove() {}", "removeEventListeners() {\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\n\n if (this.gyroscope) {\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\n }\n\n if (this.glare || this.fullPageListening) {\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\n }\n }", "removeListeners() {\n var descriptor = this.getDescriptor();\n if (descriptor) {\n descriptor.unlisten(DescriptorEventType.ACTIVATED, this.onActivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onDeactivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onActivationError, false, this);\n }\n }", "removeChangeListener(callback) {\n this.removeListener(CHANGE, callback);\n }", "destroy() {\n this.removeDOMListeners();\n this.unsubscribers.forEach((unsub) => unsub());\n }", "function clearlistner() {\n\tgoogle.maps.event.clearInstanceListeners(marker)\n\tmarker = null;\n}", "function killListeners (poly){\n //Elimino los listener del array de Listeners\n for (var i=poly.listeners.length-1; i>=0;i--){\n poly.listeners[i].remove();\n poly.listeners.pop\n } \n }", "__unregisterEventListener() {\n qx.event.Registration.removeListener(\n window,\n \"resize\",\n this._updateSize,\n this\n );\n\n qx.event.Registration.removeListener(\n window,\n \"scroll\",\n this._onScroll,\n this\n );\n\n this.removeListener(\"pointerdown\", qx.bom.Event.preventDefault, this);\n this.removeListener(\"pointerup\", qx.bom.Event.preventDefault, this);\n }", "dispose() {\n // Perfect place to remove eventlisteners etc\n }", "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.el.removeEventListener('keydown', this._onKeydownBound);\n }", "destroy () {\n this.canvas.removeEventListener('mousedown', this.onMouseDown.bind(this));\n document.removeEventListener('mousemove', this.onMouseMove.bind(this));\n document.removeEventListener('mouseup', this.onMouseUp.bind(this));\n }", "detach() {\n const that = this;\n that._removeEventListeners();\n }", "removeEvents() {\n }", "destroy() {\n\t\tfor(const [event, listener] of this.listeners) this.client.removeListener(event, listener);\n\t\tthis.listeners.clear();\n\t}", "_stopObserver() {\n for (var i = 0; i < this.__eventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__defaultTarget,\n this.__eventNames[i],\n this.__wrappedListener\n );\n }\n }", "destroy() {\n\t\tdocument.removeEventListener( 'click', this.onDocumentClick, true );\n\t\tthis.el.removeEventListener( 'click', this.onSubmenuToggleClick, false );\n\t\tthis.el.removeEventListener( 'mouseover', this.onMenuItemMouseEnter, false );\n\t\tthis.el.removeEventListener( 'mouseout', this.onMenuItemMouseLeave, false );\n\t\tthis.el.removeEventListener( 'focus', this.onMenuLinkFocus, true );\n\t\tthis.el.removeEventListener( 'blur', this.onMenuLinkBlur, true );\n\t}", "disconnectedCallback() {\n this.$start.removeEventListener(\"focus\", this.focusLastElement);\n this.$end.removeEventListener(\"focus\", this.focusFirstElement);\n this.removeEventListener(\"focusin\", this.onFocusIn);\n this.removeEventListener(\"focusout\", this.onFocusOut);\n }", "unsubscribe() {\n if (this.canvas) {\n this.canvas.removeEventListener(\"pointermove\", this.onPointerMove);\n this.canvas.removeEventListener(\"pointerdown\", this.onPointerDown);\n this.canvas.removeEventListener(\"pointerup\", this.onPointerUp);\n this.canvas.removeEventListener(\"pointercancel\", this.onPointerCancel);\n this.canvas.removeEventListener(\"wheel\", this.onMouseWheel);\n this.canvas.removeEventListener(\"dblclick\", this.onDoubleClick);\n this.canvas.removeEventListener(\"mouseleave\", this.onMouseLeave);\n this.canvas.removeEventListener(\"mouseenter\", this.onMouseEnter);\n this.canvas.removeEventListener(\"contextmenu\", this.onContextMenu);\n }\n this.canvas = null;\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "_removeEventListeners() {\n\n if (this._isNative) {\n this.selectEl.removeEventListener('change', this._onInputBound);\n }\n else {\n this.el.removeEventListener('change', this._onInputBound, true);\n }\n }", "detachListeners() {\n this.#outInterface.off('line', this.lineListener);\n this.#errInterface.off('line', this.errorListener);\n this.#child.off('exit', this.exitListener);\n this.#child.removeAllListeners('close');\n }", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n \n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if(LEAVE_EV) { \n $element.unbind(LEAVE_EV, touchLeave);\n }\n \n setTouchInProgress(false);\n }", "removeAllListeners() {\n const listeners = this.eventListeners;\n let i, thisObj;\n\n for (const event in listeners) {\n const bucket = listeners[event]; // We iterate backwards since we call removeListener which will splice out of\n // this array as we go...\n\n for (i = bucket.length; i-- > 0;)\n /* empty */\n {\n const cfg = bucket[i];\n this.removeListener(event, cfg);\n thisObj = cfg.thisObj;\n\n if (thisObj && thisObj.untrackDetachers) {\n thisObj.untrackDetachers(this);\n }\n }\n }\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) {\n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\n\t\t\tsetTouchInProgress(false);\n\t\t}", "detachListeners () {\n if (this.listenersAttached) {\n window.removeEventListener('resize', this.handleWindowResize)\n window.removeEventListener('mouseup', this.handleMouseUp)\n window.removeEventListener('touchend', this.handleTouchEnd)\n window.removeEventListener('touchcancel', this.handleTouchEnd)\n window.removeEventListener('pointerdown', this.handlePointerEvent)\n window.removeEventListener('pointermove', this.handlePointerEvent)\n window.removeEventListener('pointerup', this.handlePointerEvent)\n window.removeEventListener('pointercancel', this.handlePointerEvent)\n this.listenersAttached = false\n }\n }", "function $onDestroy(){\n removeEventListeners();\n }", "disconnectedCallback() {\n this.removeEventListener(\"click\", this.handleClick_);\n this.removeEventListener(\"keyup\", this.handleKeyup_);\n this.removeEventListener(\"keypress\", this.handleKeyPress_);\n document.addEventListener(customEvents.READY, this.toggleDisplay_);\n }", "componentWillUnmount() {\n this.listener && this.listener.remove();\n }", "cleanMe() {\n this.DOM.el.removeEventListener(\n \"dblclick\",\n this.dblclickHandler.bind(this),\n {\n capture: true\n }\n );\n }", "onBeforeDetach(msg) {\n document.removeEventListener('keydown', this, USE_CAPTURE);\n document.removeEventListener('mousedown', this, USE_CAPTURE);\n document.removeEventListener('scroll', this, USE_CAPTURE);\n }", "destroy() {\n //this.unobserve(this.slider.selector);\n this.unobserve(window);\n const tx = document.documentElement;\n tx.removeEventListener(\"pointermove\", this.onpointermove);\n tx.removeEventListener(\"mousemove\", this.mousemoveUpdater);\n /*this.slider.selector.removeEventListener(\"touchend\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mouseup\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mousedown\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mousemove\", this.mousemoveHandler);*/\n\n this.coordinator = null;\n }", "cancel() {\n\t\tthis.removeAllListeners()\n\t}" ]
[ "0.7938648", "0.7938648", "0.7938648", "0.7649334", "0.76439846", "0.75743467", "0.75743467", "0.75743467", "0.75743467", "0.75743467", "0.75559336", "0.75544506", "0.7526184", "0.7483317", "0.7450182", "0.74224734", "0.7407818", "0.73894876", "0.73651236", "0.73651236", "0.73651236", "0.73651236", "0.73651236", "0.73651236", "0.73517925", "0.7306955", "0.72755426", "0.725856", "0.72553134", "0.72175294", "0.7214517", "0.7194224", "0.7192172", "0.7184216", "0.7180192", "0.7159989", "0.71498644", "0.7138974", "0.7137027", "0.7136886", "0.7131664", "0.71101207", "0.7071132", "0.70671034", "0.70547855", "0.70547336", "0.70547336", "0.70547336", "0.70490146", "0.7047541", "0.70467836", "0.7040387", "0.7033305", "0.7031125", "0.7018387", "0.7016176", "0.7000343", "0.6999898", "0.6996727", "0.6991364", "0.6981918", "0.69745106", "0.6966748", "0.69615513", "0.6959097", "0.6958196", "0.6950661", "0.694773", "0.69440573", "0.6940304", "0.69381875", "0.6937825", "0.69345886", "0.69254214", "0.6922733", "0.69085586", "0.6901707", "0.6898648", "0.68961966", "0.689526", "0.68941385", "0.68863565", "0.68788636", "0.68764496", "0.68712085", "0.6870644", "0.6869119", "0.6869119", "0.686732", "0.6863807", "0.68635285", "0.68596995", "0.6855757", "0.68445754", "0.68412447", "0.6826974", "0.68227994", "0.68208444", "0.6816186", "0.6815431", "0.68153876" ]
0.0
-1
TODO: same as trip selection
function setMouseOver (polyline, streetname) { polyline.on('mouseover', function (e) { let layer = e.target; layer.setStyle({ color: '#000', opacity: 1}); layer.bindTooltip('<strong>Activate ' + streetname + '</strong>'); }); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "copyAirwaySelections() {\n const temporaryFPWaypoints = this.flightPlanManager.getWaypoints(1);\n const activeFPWaypoints = this.flightPlanManager.getWaypoints(0);\n for (let i = 0; i < activeFPWaypoints.length; i++) {\n if (activeFPWaypoints[i].infos && temporaryFPWaypoints[i] && activeFPWaypoints[i].icao === temporaryFPWaypoints[i].icao && temporaryFPWaypoints[i].infos) {\n activeFPWaypoints[i].infos.airwayIn = temporaryFPWaypoints[i].infos.airwayIn;\n activeFPWaypoints[i].infos.airwayOut = temporaryFPWaypoints[i].infos.airwayOut;\n }\n }\n }", "function getStationsAndVehiclesFromTrips(trips, timeRange){\n\tvar stations = [];\n\tvar vehicles = [];\n\tvar indexByStationName = d3.map();\n\tvar stationNameByIndex = d3.map();\n\tvar indexByVehicleID = d3.map();\n\tvar vehicleIDByIndex = d3.map();\n\tvar n = 0;\n\tvar k = 0;\n\ttrips.forEach(function(trip) {\n\t\tif (!indexByStationName.has(trip.start_station)) {\n\t\t\tstations.push({\n\t\t\t\tstation_id : trip.start_station,\n\t\t\t\tstation_name : trip.start_station_name,\n\t\t\t\tlat : trip.start_station_lat,\n\t\t\t\tlng : trip.start_station_lng,\n\t\t\t\tinitial: 0\n\t\t\t});\n\t\t\tstationNameByIndex.set(n, trip.start_station);\n\t\t\tindexByStationName.set(trip.start_station, n++);\n\t\t}\n\t\tif (!indexByStationName.has(trip.end_station)) {\n\t\t\tstations.push({\n\t\t\t\tstation_id : trip.end_station,\n\t\t\t\tstation_name : trip.end_station_name,\n\t\t\t\tlat : trip.end_station_lat,\n\t\t\t\tlng : trip.end_station_lng,\n\t\t\t\tinitial: 0\n\t\t\t});\n\t\t\tstationNameByIndex.set(n, trip.end_station);\n\t\t\tindexByStationName.set(trip.end_station, n++);\n\t\t}\n\t\tif (!indexByVehicleID.has(trip.bikeid)) {\n\t\t\tvehicles.push({\n\t\t\t\tvehicle_id : trip.bikeid\n\t\t\t});\n\t\t\tvehicleIDByIndex.set(k, trip.bikeid);\n\t\t\tindexByVehicleID.set(trip.bikeid, k++);\n\t\t\tstations[indexByStationName.get(trip.start_station)].initial++;\n\n\t\t}\n\t\tif(trip.start_date<=timeRange[0]){\n\t\t\tif(trip.type==\"full\") inTransit_initial++;\n\t\t\tif(trip.type==\"empty\") dispatched_initial++;\n\t\t}\n\t});\n\treturn {\n\t\tstations: stations,\n\t\tvehicles: vehicles,\n\t\tinTransit_initial: inTransit_initial,\n\t\tdispatched_initial: dispatched_initial\n\t}\n}", "function triplets(arr){\n\n var map = {};\n var resArr= [];\n \n for(var i = 0;i< arr.length;i++){\n \n map[arr[i]] = 1;\n \n }\n \n \n var start = 0;\n var end = arr.length - 1;\n \n \n while(end > 0){\n \n \n if(start == end){\n \n start = 0;\n end --;\n \n }\n \n \n if((arr[start] - arr[end]) in map){\n \n var object = [arr[start],arr[end],(arr[start] - arr[end])];\n //console.log(object);\n resArr.push(object);\n \n }\n \n \n if((arr[end] - arr[start]) in map){\n \n var object = [arr[start],arr[end],(arr[start] - arr[end])];\n //console.log(object);\n \n if(arr[start] != 0 && arr[end] != 0){\n resArr.push(object);\n }\n } \n \n \n start++;\n \n \n \n \n }\n\n \n \n \n return resArr;\n \n \n\n}", "function SelectionUtil() {\n}", "function selFeature(value){\r\n map.selectCountry(value.properties.name);\r\n sp1.selectDot(value.properties.name);\r\n pc1.selectLine(value.properties.cluster);\r\n donut.selectPie(value.properties.name);\r\n }", "get selectedIds() {\n return this.selected.map(target => target.dataset.id)\n }", "function pick(n, lat) { // it doesn't have to be a list of atoms!!\n\tif (isEmpty(lat)) return EMPTY\n\telse if (n === 1) return car(lat)\n\telse return pick(n-1, cdr(lat))\n}", "function training_selector(ft_array)\n{ \n var index;\n var merge_ft = ft_array[0];\n for (index = 1; index < ft_array.length; index++) \n {\n merge_ft = merge_ft.merge(ft_array[index]);\n }\n \n return merge_ft;\n}", "function highlightSelected()\n\t{\n\t\t// selected pileups (mutations) on the diagram\n\t\tvar selected = getSelectedPileups();\n\n\t\t// highlight residues\n\t\thighlight3dResidues(selected);\n\t}", "function add_empty_trips_v2(trips, threshold){\n\tconsole.log(\"making combined trips...\");\n\ttrips.forEach(function(trip,i) {\n\t\ttrip.end_date=new Date(+trip.start_date+trip.duration * 1000);\n\t\tresult.push(trip);\n\t\tfor (var j=i+1; j<trips.length-1; j++){\n\t\t\tvar ntrip = trips[j];\n\t\t\tif(ntrip.bikeid==trip.bikeid){ //find the next trip of the same taxi\n\t\t\t\tif(ntrip.start_station!=trip.end_station){ // Only consider as empty, trips that connect different locations. Otherwise the vehicle remains idle in the same location\n\t\t\t\t\tif(ntrip.start_date<trip.end_date){\n\t\t\t\t\t\tntrip.start_date=trip.end_date;\n\t\t\t\t\t}\n\t\t\t\t\tvar etrip={};\n\t\t\t\t\tetrip.id = tripsCounter++;\n\t\t\t\t\tetrip.duration = (+ntrip.start_date - trip.end_date)/1000 <= threshold? (+ntrip.start_date - trip.end_date)/1000 : threshold\n\t\t\t\t\tetrip.start_date = trip.end_date;\n\t\t\t\t\tetrip.end_date = new Date(+trip.end_date+etrip.duration * 1000);\n\t\t\t\t\tetrip.start_station = trip.end_station;\n\t\t\t\t\tetrip.start_station_name = trip.end_station_name;\n\t\t\t\t\tetrip.start_station_lat = trip.end_station_lat;\n\t\t\t\t\tetrip.start_station_lng = trip.end_station_lng;\n\t\t\t\t\tetrip.end_station = ntrip.start_station;\n\t\t\t\t\tetrip.end_station_name = ntrip.start_station_name;\n\t\t\t\t\tetrip.end_station_lat = ntrip.start_station_lat;\n\t\t\t\t\tetrip.end_station_lng = ntrip.start_station_lng;\n\t\t\t\t\tetrip.bikeid = trip.bikeid;\n\t\t\t\t\tetrip.trip_id = trip.trip_id + \"_\" + ntrip.trip_id;\n\t\t\t\t\tetrip.type = \"empty\";\n\t\t\t\t\ttrips.push(etrip);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tbreak; // if the next trip of the same taxi has origin same as current trip's destination, do not consider any other trips from the same taxi\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\ttrips.sort(function(a,b){return a.start_date-b.start_date});\n\treturn trips;\n}", "function trip(src, dst, network) {\n let ls = []\n ls.push(src.geometry.coordinates)\n const ps = geojson.findClosest(src, network)\n const pe = geojson.findClosest(dst, network)\n let trip = geojson.route(ps, pe, airport.serviceroads)\n trip.coordinates.forEach(function(p, idx) {\n ls.push(p)\n })\n ls.push(dst.geometry.coordinates)\n return geojson.Feature(geojson.LineString(ls))\n}", "function makeSelectionMapping () {\n \n var s = makeEmptySet();\n \n var func = function (i) { return s.has(i); };\n \n func.set = function (i, v) {\n if (v === true) s.add(i); else s.delete(i); \n }\n \n func.selected = function() { return s.keys(); } \n \n func.bake = function (op) {\n var s2 = op(func);\n op.domain.forEach(function(_, i) { func.set(i, s2(i)); });\n }\n \n return func;\n }", "sumOfThree(arr1, size) {\n if (size != 0) {\n for (i = 0; i < size - 2; i++) {\n for (j = i + 1; j < size - 1; j++) {\n for (k = j + 1; k < size; k++) {\n // printing distinct triples (i, j, k) where arr[i] + arr[j] + arr[k] = 0\n\n if (parseInt(arr1[i]) + parseInt(arr1[j]) + parseInt(arr1[k]) == 0) {\n console.log(\"Distinct triplets\")\n console.log(arr1[i] + \" \" + arr1[j] + \" \" + arr1[k]);\n\n }\n }\n }\n }\n }\n else {\n console.log(\"value is not present which will calculate triplet\")\n }\n }", "selectPoints(points, indices) {\n return points.slice(indices[0], indices[1]);\n }", "function locateSingleChoice () {\n\td3.selectAll (\"g#vertices circle\").each(function (h,i){\n\t\tvar vtx = d3.select(this);\n\t\tvtx.classed(\"singlechoice\", false);\n\t\tvar isBorder = false;\n\t\tfor (let g of h.ds.vertexCirculator(h)) {\n\t\t\tif (g.isBorder) {\n\t\t\t\tisBorder = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!isBorder) return;\n\t\tvar vtype = vertexNodeType(h);\n\t\tvar matches = archMatch(vtype);\n\t\tif (matches.length == 1) {\n\t\t\td3.select(this).classed(\"singlechoice\", true);\n\t\t}\t\n\t});\n}", "function gen_op_sel_T0_T1()\n{\n gen_opc_ptr.push({func:op_sel_T0_T1});\n}", "function select(p, x, t){\r\n var ts = t[0], fs = t[1];\r\n return p(x) ? [cons(x, ts), fs] : [ts, cons(x, fs)];\r\n}", "function getVehicleIDs(trips){\n\tvar vehicles = [];\n\ttrips.forEach(function(trip) {\n\t\tif (!vehicles.includes(trip.bikeid)) {\n\t\t\tvehicles.push(trip.bikeid);\n\t\t}\n\t});\n\treturn vehicles;\n}", "function tilePointsTri(V1s,V2s,tiles,c){\n\tvar l3 = [];\n\tfor (var i=0; i<=tiles; i+=1){\n\t\tl3.push([]);\n\t\tfor (var j=0; j<=tiles-i; j+=1){\n\t\t\tl3[i].push(new P(multScalarVector(0.5,addVector3(V1s[j],V2s[i]))));\n\t\t}\n\t}\n\treturn l3;\n}", "function getTribeChoice() {\r\n return tribe;\r\n}", "threesum1(arr) {\n\n var l = arr.length;\n for (var i = 0; i < l - 2; i++) {\n for (var j = i + 1; j < l - 1; j++) {\n for (var k = j + 1; k < l; k++) {\n if (arr[i] + arr[j] + arr[k] == 0) {\n console.log(arr[i] + \",\" + arr[j] + \",\" + arr[k] + \" is a triplet\")\n }\n\n\n }\n }\n }\n }", "function paintSelected() {\n const selectTask = taskList;\n selectTask.addEventListener('click', (selectEvent) => {\n const listItem = document.querySelectorAll('.list-item');\n for (let index = 0; index < listItem.length; index += 1) {\n if (listItem[index] === selectEvent.target) {\n selectEvent.target.classList.add('selected');\n } else {\n listItem[index].classList.remove('selected');\n }\n }\n });\n}", "function triplets(l) {\n\tif ((l.length == 1 && l[0].length == 0)) { return []; }\n\tif (l.length > 0 && l.length % 3 !== 0) {\n\t\tthrow \"Number of elements is not a multiple of 3: \" + l.length + \" \" + l.join(\", \");\n\t}\n\tvar l2 = [];\n\tfor (var i = 0; i < l.length; i += 3) {\n\t\tl2.push({\"q\": l[i], \"op\": l[i + 1], \"v\": parseInt(l[i + 2])});\n\t}\n\treturn l2;\n}", "function get_stop_shape_data_query_params(service_ids){\n var query_data = {};\n query_data['jointo:gtfs_trips.trip_id'] = 'trip_id';\n query_data['gtfs_trips.route_id'] = $('#routepicker').val();\n if (service_ids != undefined) {\n query_data['gtfs_trips.service_id'] = service_ids.join();\n }\n query_data['sort'] = 'gtfs_trips.shape_id,ASC:gtfs_stop_times.stop_sequence',\n query_data['distinct'] = ['gtfs_trips.shape_id','gtfs_stop_times.stop_sequence','gtfs_stop_times.stop_id'].join();\n query_data['select'] = ['trip_id','stop_id','stop_sequence','shape_dist_traveled','gtfs_trips.shape_id','gtfs_trips.direction_id'].join();\n return query_data \n}", "getTripData (arr, type) {\n const returnArr = []\n for (const trip of arr) {\n returnArr.push(this.tripFetch[type](trip))\n }\n return returnArr\n }", "function selectEles(a) {\n for (var i = 0; i < a.length; i++) {\n tds[a[i]].className = 'selected';\n }\n }", "function add_empty_trips_v3(trips, threshold){\n\tconsole.log(\"making combined trips...\");\n\ttrips.forEach(function(trip,i) {\n\t\ttrip.start_date = new Date((+trip.start_date+ +trip.end_date-trip.duration*1000)/2);\n\t\ttrip.end_date = new Date(+trip.start_date+trip.duration*1000);\n\t\tif (i>1){\n\t\t\tfor (var j=i-1; j>=0; j--){\n\t\t\t\tvar ptrip = trips[j];\n\t\t\t\tif(ptrip.bikeid==trip.bikeid){\n\t\t\t\t\tif(ptrip.end_station!=trip.start_station){ // Only consider as empty, trips that connect different locations. Otherwise the vehicle remains idle in the same location\n\t\t\t\t\t\tif(ptrip.end_date>trip.start_date){\n\t\t\t\t\t\t\ttrip.start_date=ptrip.end_date;\n\t\t\t\t\t\t\ttrip.end_date= new Date(+trip.start_date+trip.duration * 1000);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar etrip={};\n\t\t\t\t\t\tetrip.id = tripsCounter++;\n\t\t\t\t\t\tetrip.duration = (+trip.start_date - ptrip.end_date)/1000 <= threshold? (+trip.start_date - ptrip.end_date)/1000 : threshold;\n\t\t\t\t\t\tetrip.start_date = ptrip.end_date;\n\t\t\t\t\t\tetrip.end_date = new Date(+ptrip.end_date+etrip.duration * 1000);\n\t\t\t\t\t\tetrip.start_station = ptrip.end_station;\n\t\t\t\t\t\tetrip.start_station_name = ptrip.end_station_name;\n\t\t\t\t\t\tetrip.start_station_lat = ptrip.end_station_lat;\n\t\t\t\t\t\tetrip.start_station_lng = ptrip.end_station_lng;\n\t\t\t\t\t\tetrip.end_station = trip.start_station;\n\t\t\t\t\t\tetrip.end_station_name = trip.start_station_name;\n\t\t\t\t\t\tetrip.end_station_lat = trip.start_station_lat;\n\t\t\t\t\t\tetrip.end_station_lng = trip.start_station_lng;\n\t\t\t\t\t\tetrip.bikeid = trip.bikeid;\n\t\t\t\t\t\tetrip.trip_id = ptrip.trip_id + \"_\" + trip.trip_id;\n\t\t\t\t\t\tetrip.type = \"empty\";\n\t\t\t\t\t\ttrips.push(etrip);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak; // if the next trip of the same taxi has origin same as current trip's destination, do not consider any other trips from the same taxi\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\ttrips.sort(function(a,b){return a.start_date-b.start_date});\n\treturn trips;\n}", "function trip_to_data(id, trip) {\n\t\ttrip.SetTable = SetTable;\n\t\treturn trip;\n\t}", "function getFilteredTripsByDistrict(){\n let num_studios = app.num_studios;\n let num_1bed = app.num_1bed;\n let num_2bed = app.num_2bed;\n let num_3bed = app.num_3bed;\n let tot_num_bedrooms = num_studios + num_1bed + (2*app.num_2bed) + (3*app.num_3bed);\n let attr;\n let rate;\n let rate_key;\n let unit;\n let scalar;\n let proxyLandUse;\n \n for (let district of geoDistricts) {\n let personTrips = {};\n let vehicleTrips = {};\n let totalPersonTrips = {};\n let totalVehicleTripsByMode = {};\n let geoId;\n \n switch(selectedDistribution) {\n case 'district':\n geoId = addressDistrictNum;\n break;\n case 'place-type':\n geoId = addressPlaceType;\n break;\n case 'city':\n geoId = 1;\n break;\n default:\n geoId = addressDistrictNum;\n break;\n }\n \n for (let landUse of landUses) {\n attr = landUseToAttr[landUse];\n rate_key = attr['rate_key'];\n scalar = attr['scalar'];\n unit = attr['unit'];\n proxyLandUse = attr['proxyLandUse'];\n \n switch (selectedTimePeriod) {\n case 'pm':\n rate = tripGenRates[rate_key].pkhr_rate;\n break;\n case 'daily':\n rate = tripGenRates[rate_key].daily_rate;\n break;\n }\n \n let mode2=selectedMode;\n if (selectedMode == 'tnc/taxi'){\n mode2='tnc_taxi';\n }\n \n personTrips[landUse] = (rate*scalar)*filterModeSplitData(proxyLandUse, app.placetype)[0][mode2]* \n getDistProps(selectedDistribution, geoId, district,\n selectedMode, selectedDirection, proxyLandUse,\n selectedTimePeriod, selectedPurpose)\n vehicleTrips[landUse] = personTrips[landUse]/(filterAvoData(proxyLandUse.toLowerCase(), selectedTimePeriod, selectedDistribution, geoId));\n }\n //if any of the land uses are undefined b/c no input, set them equal to 0. landUses is a global array of all 5 land uses\n personTrips[\"total\"] = 0\n vehicleTrips[\"total\"] = 0\n for (let landUse of landUses) {\n if (!(personTrips[landUse])){\n personTrips[landUse] == 0;\n }\n if (!(vehicleTrips[landUse])){\n vehicleTrips[landUse] == 0;\n }\n personTrips[\"total\"] += personTrips[landUse]\n vehicleTrips[\"total\"] += vehicleTrips[landUse]\n }\n districtPersonTrips[district.dist] = personTrips; //this creates a dictionary of dictionaries, with one dictionary for every district where the keys are the land uses/total\n //and the dictionary is populated by the time period\n districtVehicleTrips[district.dist] = vehicleTrips;\n }\n}", "createShotsVertex(graph) {\n var vertexes = []\n var parent = graph.getDefaultParent();\n var shots = this.props.project.shots\n var shotsSelected = this.props.shots\n //console.log(shots)\n //console.log(shotsSelected)\n shots.forEach((shot, index) => {\n vertexes[shot.id] = graph.insertVertex(parent, shot.id, shot.name, 950, 50 + index * 150, 100, 50, 'fillColor=#757575;strokeColor=#616161;fontColor=#FAFAFA');\n\n if (shotsSelected.includes(shot)) {\n vertexes[shot.id].visible = true\n }\n else {\n vertexes[shot.id].visible = false\n }\n })\n }", "function l$1(e,t,r,s){s[r]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry);}));}", "function selFeature(value){\n //...\n }", "function selFeature(value){\n //...\n }", "function doSelectTerm() {\n var e = document.getElementById(\"inp1\");\n var selIndex = e.options[e.selectedIndex].value;\n Selected(selIndex, 'inp1');\n e = document.getElementById(\"inp6\");\n selIndex = e.options[e.selectedIndex].value;\n Selected(selIndex, 'inp6');\n}", "function SelectionRegion() {}", "function SelectionRegion() {}", "function triplet(input){\n\tvar z = 0;\n\tfor (var x = input/2; x >= 0; x--) {\n\t\tfor (var y = input/2; y >= 0; y--) {\n\t\t\tz = input - x - y;\n\t\t\tif(x!=y && y!=z && x!=z && (x+y+z == input)){\n\t\t\t\tif((Math.pow(x,2) + Math.pow(y,2)) == Math.pow(z,2)){\n\t\t\t\t\tconsole.log(\"Found triplet: \" + x + ', ' + y + ', ' + z);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t};\n}", "getSelectedIds() {\n return Object.keys(this._features).filter(id => this._features[id].selected === true);\n }", "triplet(res) {\n count = 0;\n for (let index = 0; index < res.length; index++) {\n for (let index1 = index + 1; index1 < res.length; index1++) {\n for (let index2 = index1 + 1; index2 < res.length; index2++) {\n // check sum of three elements are equals to zero\n if (Number(res[index]) + Number(res[index1]) + Number(res[index2]) == 0) {\n count++;\n console.log(\"[\" + res[index] + \",\" + res[index1] + \",\" + res[index2] + \"]\");\n }\n\n }\n }\n\n }\n console.log(\"Number of triplets found is \", count);\n}", "function Cr(e,t,a,n){for(var r,f=0;f<t.ranges.length;f++){var o=t.ranges[f],i=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[f],s=Tr(e,o.anchor,i&&i.anchor,a,n),c=Tr(e,o.head,i&&i.head,a,n);(r||s!=o.anchor||c!=o.head)&&(r||(r=t.ranges.slice(0,f)),r[f]=new Di(s,c))}return r?Gn(r,t.primIndex):t}", "lookupTriplet (triplet) {\n for (let i = 0; i < triplets.length; i++) {\n let current = triplets[i];\n if (current[0] === triplet[0] &&\n current[1] === triplet[1] &&\n current[2] === triplet[2]) {\n return i;\n }\n }\n return undefined;\n }", "getPickedServices(){\n let whatIsPicked = [];\n //#1 - iterate categories\n this.myServices.forEach((category)=>{ \n //#2 - iterate subcategories\n category.subCategories.forEach((subCategory)=>{ \n //#3 - iterate services to check witch ones are picked\n subCategory.options.forEach((service)=>{\n //#4 - push it if picked\n if(service.optionSelected){\n whatIsPicked.push(service.optionId);\n }\n })\n });\n\n });\n\n //#10 - Finaly, return what is picked\n return whatIsPicked;\n\n }", "ChainSelector() {\n\n }", "updateSelected(ids){\r\n d3.select(\"#breweryLayer\") // de-select everything, ignore filters\r\n .selectAll(\"circle\")\r\n .classed(\"selected\", false);\r\n\r\n if(ids == null){return; } // don't select anything new, on clear\r\n\r\n for(let i = 0; i < ids.length; i++){\r\n d3.select(`#br_${ids[i]}`)\r\n .classed(\"selected\", true);\r\n }\r\n }", "buildPickTriangles(positions, indices, compressGeometry) {\n\n const numIndices = indices.length;\n const pickPositions = compressGeometry ? new Uint16Array(numIndices * 9) : new Float32Array(numIndices * 9);\n const pickColors = new Uint8Array(numIndices * 12);\n let primIndex = 0;\n let vi;// Positions array index\n let pvi = 0;// Picking positions array index\n let pci = 0; // Picking color array index\n\n // Triangle indices\n let i;\n let r;\n let g;\n let b;\n let a;\n\n for (let location = 0; location < numIndices; location += 3) {\n\n // Primitive-indexed triangle pick color\n\n a = (primIndex >> 24 & 0xFF);\n b = (primIndex >> 16 & 0xFF);\n g = (primIndex >> 8 & 0xFF);\n r = (primIndex & 0xFF);\n\n // A\n\n i = indices[location];\n vi = i * 3;\n\n pickPositions[pvi++] = positions[vi];\n pickPositions[pvi++] = positions[vi + 1];\n pickPositions[pvi++] = positions[vi + 2];\n\n pickColors[pci++] = r;\n pickColors[pci++] = g;\n pickColors[pci++] = b;\n pickColors[pci++] = a;\n\n // B\n\n i = indices[location + 1];\n vi = i * 3;\n\n pickPositions[pvi++] = positions[vi];\n pickPositions[pvi++] = positions[vi + 1];\n pickPositions[pvi++] = positions[vi + 2];\n\n pickColors[pci++] = r;\n pickColors[pci++] = g;\n pickColors[pci++] = b;\n pickColors[pci++] = a;\n\n // C\n\n i = indices[location + 2];\n vi = i * 3;\n\n pickPositions[pvi++] = positions[vi];\n pickPositions[pvi++] = positions[vi + 1];\n pickPositions[pvi++] = positions[vi + 2];\n\n pickColors[pci++] = r;\n pickColors[pci++] = g;\n pickColors[pci++] = b;\n pickColors[pci++] = a;\n\n primIndex++;\n }\n\n return {\n positions: pickPositions,\n colors: pickColors\n };\n }", "function selectInterface(c) {\r\n // Because NGL is incredibly clutsy, we have to do this..\r\n\r\n let radius = 5.0;\r\n let selection = '';\r\n let neighborsE;\r\n let neighborsB;\r\n\r\n // neighbors of B belonging to A\r\n nglsele = new NGL.Selection(\":B\");\r\n neighborsB = c.structure.getAtomSetWithinSelection(nglsele, radius);\r\n neighborsB = c.structure.getAtomSetWithinGroup(neighborsB);\r\n selection += \"((\" + neighborsB.toSeleString() + \") and :A)\"\r\n\r\n nglsele = new NGL.Selection(\":A\");\r\n neighborsA = c.structure.getAtomSetWithinSelection(nglsele, radius);\r\n neighborsA = c.structure.getAtomSetWithinGroup(neighborsA);\r\n selection += \"or ((\" + neighborsA.toSeleString() + \") and :B)\"\r\n\r\n return selection\r\n\r\n}", "breakApartSelection() {\n var leftovers = [];\n var clips = this.selection.getSelectedObjects('Clip');\n this.selection.clear();\n clips.forEach(clip => {\n leftovers = leftovers.concat(clip.breakApart());\n });\n leftovers.forEach(object => {\n this.selection.select(object);\n });\n }", "function get_itinery(flight_list,start){\n let start_source = [];\n let result = [];\n \n for(let i=0;i<flight_list.length;i++){\n if(flight_list[i][0] == start){\n start_source.push(flight_list[i])\n }\n }\n \n if(start_source.length>1){\n start_source.sort((a, b) => a[1].localeCompare(b[1]))\n }\n // console.log(start_source)\n result.push(start_source[0][0])\n result.push(start_source[0][1])\n let temp = start_source[0][1];\n let side = []\n side.push(start_source[0])\n // console.log(side,\"side\")\n let total = 0 \n for(let i=0;i<flight_list.length;i++){\n for(let j=0;j<flight_list.length;j++){\n let count = 0\n if(flight_list[j][0] == temp){\n for(let flight of side){\n if(flight[0] == flight_list[j][0] && flight[1] == flight_list[j][1] ){\n count++\n // console.log(flight_list[j],\"if.....\")\n }\n }\n if(count == 0){\n side.push(flight_list[j])\n result.push(flight_list[j][1])\n temp = flight_list[j][1]\n total++\n // console.log(flight_list[j],\"2nd if.....\")\n }\n }\n \n }\n }\n \n if(total > 0){//} && side.length == flight_list.length){\n return result\n }else{\n return null\n }\n \n}", "function selFeature(value){\r\n //...\r\n }", "function selectQuadrant(callback) {\n if (hoverback) {\n throw new Error('already in hover select mode');\n }\n // Set the global hover selection callback.\n hoverback = callback;\n // Trigger a syntehetic move to start the highlight right away.\n onMouseMove();\n }", "function getDistance(){\n if (departure.value == \"dep-auck\" && destination.value == \"dest-taup\" || departure.value == \"dep-taup\" && destination.value == \"dest-auck\"){\n tripDistance = distance.taupAuck;\n }\n else if (departure.value == \"dep-well\" && destination.value == \"dest-taup\" || departure.value == \"dep-taup\" && destination.value == \"dest-well\"){\n tripDistance = distance.wellTaup;\n }\n else if (departure.value == \"dep-well\" && destination.value == \"dest-auck\" || departure.value == \"dep-auck\" && destination.value == \"dest-well\"){\n tripDistance = distance.auckWell;\n }\n }", "function on_select_ponto(feature){\r\n\t\t\tselect_control.unselectAll({except:feature});\r\n\t\t}", "chooseDestinationPoint(finalPath) {\r\n let numNeighbors = {};\r\n \r\n for(let tile of finalPath) {\r\n let neighbors = this.getNeighbors(...tile.gridPos).length;\r\n if(neighbors in numNeighbors) {\r\n numNeighbors[neighbors].push(tile);\r\n } else {\r\n numNeighbors[neighbors] = [tile];\r\n }\r\n }\r\n this.setDestinationPoint(...numNeighbors[Math.min(...Object.keys(numNeighbors))].reduce((prev, curr) => { return ((prev.getDistanceFromCorner() > curr.getDistanceFromCorner()) ? prev : curr) }).gridPos);\r\n }", "get selection() {\n if (this.curSelectionFor < this.steps.length) {\n this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n this.curSelectionFor = this.steps.length;\n }\n return this.curSelection;\n }", "_populateSelectArray(selections) {\n let selector = {};\n this.modifiers = [];\n selections.forEach((selection) => {\n selector = JSON.parse(JSON.stringify(selection.selector));\n const mod = selection.staff.getModifiersAt(selector);\n if (mod.length) {\n mod.forEach((modifier) => {\n const cp = StaffModifierBase.deserialize(modifier.serialize());\n cp.attrs.id = VF.Element.newID();\n this.modifiers.push(cp);\n });\n }\n if (selection.note.isTuplet) {\n const tuplet = selection.measure.getTupletForNote(selection.note);\n const index = tuplet.getIndexOfNote(selection.note);\n if (index === 0) {\n const ntuplet = SmoTuplet.cloneTuplet(tuplet);\n this.tupletNoteMap[ntuplet.attrs.id] = ntuplet;\n ntuplet.notes.forEach((nnote) => {\n this.notes.push({ selector, note: nnote });\n selector = JSON.parse(JSON.stringify(selector));\n selector.tick += 1;\n });\n }\n } else {\n const note = SmoNote.clone(selection.note);\n this.notes.push({ selector, note });\n }\n });\n this.notes.sort((a, b) =>\n SmoSelector.gt(a.selector, b.selector) ? 1 : -1\n );\n }", "function find() {\n //should give you every trip\n\n //db('trips').join('guides', 'guides.id', 'trips.guide_id')\n return db('trips')\n .join('guides', 'guides.id', 'trips.guide_id')\n .join('types', 'types.id', 'trips.type_id')\n .select('trips.id as TripID',\n 'guides.username as GuideName', \n 'trips.title',\n 'trips.description',\n 'trips.professional',\n 'types.type',\n 'trips.duration',\n 'trips.date');\n}", "async function cloneTrip({ tripKey }) {\n try {\n const newTrip = await tripClone(`trips/${tripKey}`);\n\n // clone all the proposal --bookIn--> trip relationships\n const proposalBookInTripsEdges = await bookInEdgeCollection.inEdges(`trips/${tripKey}`);\n const newEdges = proposalBookInTripsEdges.map(edge => ({ _from: edge._from, _to: newTrip._id }));\n await bookInEdgeCollection.import(newEdges);\n\n return newTrip;\n } catch (e) {\n // Add Transaction\n console.log('[Trip Controllers] clone trip error,', e);\n return {};\n }\n}", "function selectNewPlanes() {\n\tif (SelectedAllPlanes) {\n\t\tfor (var key in Planes) {\n\t\t\tif (!Planes[key].visible || Planes[key].isFiltered()) {\n\t\t\t\tPlanes[key].selected = false;\n\t\t\t\tPlanes[key].clearLines();\n\t\t\t\tPlanes[key].updateMarker();\n\t\t\t} else {\n\t\t\t\tif (Planes[key].selected !== true) {\n\t\t\t\t\tPlanes[key].selected = true;\n\t\t\t\t\tPlanes[key].updateLines();\n\t\t\t\t\tPlanes[key].updateMarker();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function select(p, q, r, s, b) {\n\t\"use strict\";\n\tb &= 0xffffffff;\n\tvar t = 0\n\t, bminus1 = b - 1;\n\tbminus1 &= 0xffffffff;\n\tfor (var j=0; j<64; j+=1) {\n\t\tt = bminus1 & (r[j] ^ s[j]);\n\t\tp[j] = s[j] ^ t;\n\t\tq[j] = r[j] ^ t;\n\t}\n}", "function select(p, q, r, s, b) {\n\t\"use strict\";\n\tb &= 0xffffffff;\n\tvar t = 0\n\t, bminus1 = b - 1;\n\tbminus1 &= 0xffffffff;\n\tfor (var j=0; j<64; j+=1) {\n\t\tt = bminus1 & (r[j] ^ s[j]);\n\t\tp[j] = s[j] ^ t;\n\t\tq[j] = r[j] ^ t;\n\t}\n}", "removeTrip (trip) {\n const i = this.allMyTrips.indexOf(trip)\n this.allMyTrips.splice(i, 1)\n }", "function LoadSelections(selection) {\n if (selection.waypoints && selection.waypoints.length > 0) {\n _.each(selection.waypoints, function (array) {\n PathSelection(array, function () {\n var bboxes = GetDrawLayerBBoxes();\n GetDataByBBox(bboxes);\n });\n });\n }\n if (selection.data) {\n if (selection.data.searchLayer) {\n $rootScope.toggleLayer(selection.data.searchLayer, true);\n }\n L.geoJson(selection.data, {\n onEachFeature: function (feature) {\n if (selection.data.search && selection.data.search.searchType === 'radius')\n {\n var startPoint = L.GeoJSON.coordsToLatLng(feature.geometry.coordinates);\n var radius = feature.properties.radius;\n var circle = L.circle(startPoint, radius, {\n opacity: 0.0,\n fill: false,\n });\n\n circle.addTo(drawLayer);\n\n var bboxes = GetDrawLayerBBoxes();\n\n var rds = (bboxes[0].getNorthWest().lat - bboxes[0].getSouthWest().lat) / 2;\n var polyCrcl = plygonFromCircle(startPoint.lat, startPoint.lng, rds)\n\n L.polygon([polyCrcl, [[90, -180], [90, 180], [-90, 180], [-90, -180]]], {\n weight: 3,\n color: '#00CFFF',\n opacity: 0.9,\n fillColor: '#0C2638',\n fillOpacity: 0.4\n }).addTo(bgLayer);\n circle.addTo(drawLayer);\n } else if (selection.data.search && selection.data.search.searchType === 'path')\n {\n\n var lineLatlngs = _.map(selection.data.search.vertices, function (item) {\n var LatLng = item.split(\",\");\n return {\n lat: LatLng[0],\n lng: LatLng[1]\n }; //item.latLng;\n });\n\n L.polyline(lineLatlngs, {color: 'red', smoothFactor: 1}).addTo(bgLayer);\n\n _.each(feature.geometry.coordinates, function (coords) {\n var points = L.GeoJSON.coordsToLatLngs(coords);\n L.polygon([points, [[90, -180], [90, 180], [-90, 180], [-90, -180]]], {\n weight: 3,\n color: '#00CFFF',\n opacity: 0.9,\n fillColor: '#0C2638',\n fillOpacity: 0.4\n }).addTo(bgLayer);\n\n L.polygon(points, {\n opacity: 0.0,\n fill: false\n }).addTo(drawLayer);\n });\n $rootScope.routeInterpolated = [];\n\n $rootScope.mapSelectionProps = {vertices: []};\n $rootScope.mapSearchType = 'path';\n _.each(lineLatlngs, function (value, index) {\n ($rootScope.mapSelectionProps.vertices).push([value.lat, value.lng].join(','));\n $rootScope.routeInterpolated.push({latLng: {lat: value.lat, lng: value.lng}});\n });\n } else\n {\n _.each(feature.geometry.coordinates, function (coords) {\n var points = L.GeoJSON.coordsToLatLngs(coords);\n //[[[90, 180],[90, -180],[-90, -180],[-90, 180]], polyLatlngs]\n L.polygon([points, [[90, -180], [90, 180], [-90, 180], [-90, -180]]], {\n weight: 3,\n color: '#00CFFF',\n opacity: 0.9,\n fillColor: '#0C2638',\n fillOpacity: 0.4\n }).addTo(bgLayer);\n\n L.polygon(points, {\n opacity: 0.0,\n fill: false\n }).addTo(drawLayer);\n });\n }\n }\n });\n }\n if (selection.data.search)\n {\n setFiltersData(selection.data.search);\n }\n var bboxes = GetDrawLayerBBoxes();\n $timeout(function () {\n GetDataByBBox(bboxes, true);\n }, 100);\n }", "function setMapSelection() {\n\t\tthis.selectedNetworkElements = new List();\n\t\tvar oX = this.selection.getOriginX();\n\t\tvar oY = this.selection.getOriginY();\n\t\tvar fX = oX + this.selection.getFinalX();\n\t\tvar fY = oY + this.selection.getFinalY();\n\t\tfor (var i = 0; i < this.networkElements.getLength(); i++) {\n\t\t\tvar ne = this.networkElements.get(i);\n\t\t\tif (ne.x >= oX && ne.y >= oY && ne.x + ne.width <= fX && ne.y + ne.height <= fY) {\n\t\t\t\tthis.selectedNetworkElements.add(ne);\n\t\t\t\tne.select();\n\t\t\t}\n\t\t}\n\t}", "function triplet(input){\n\tvar x = 0; var y = 0; var z = 0; \n\twhile(x <= input){\n\t\twhile(x+y <= input){\n\t\t\twhile(x+y+z <= input){\n\t\t\t\tif(x!=y && y!=z && x!=z && (x+y+z == input)){\n\t\t\t\t\tif((Math.pow(x,2) + Math.pow(y,2)) == Math.pow(z,2)){\n\t\t\t\t\t\tconsole.log(\"Found triplet: \" + x + ', ' + y + ', ' + z);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tz++;\n\t\t\t}\n\t\t\tz=0;\n\t\t\ty++;\n\t\t}\n\t\ty=0;\n\t\tx++;\n\t}\n}", "function getSelectionsFromPlan(mealPlan) {\n //gets from each class of meal, the data they selected from the select2\n var planSelections = $(`.${mealPlan}`).select2(\"data\");\n //i need an array of foods to get the info for the query search\n var selections = planSelections.map((selection) => {\n return selection.id;\n });\n saveToSessionStorage(mealPlan, selections);\n return selections;\n}", "function xy2(a) {\n console.log(\"xy\");\n console.log(a.id);\n var u = Math.floor((a.id - 1) /2 / b_map[0].length );\n var d = ((a.id - 1) / 2 ) % b_map[0].length ;\n console.log(\"u\", u, \"d\", d);\n return [u, d];\n}", "function triplet(input){\n\tvar x = 0; var y = 0; var z = 0; \n\twhile(x <= input){\n\t\twhile(x+y <= input){\n\t\t\tz = input - x - y;\n\t\t\tif(x!=y && y!=z && x!=z && (x+y+z == input)){\n\t\t\t\tif((Math.pow(x,2) + Math.pow(y,2)) == Math.pow(z,2)){\n\t\t\t\t\tconsole.log(\"Found triplet: \" + x + ', ' + y + ', ' + z);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\ty++;\n\t\t}\n\t\ty=0;\n\t\tx++;\n\t}\n}", "onFindIntersectPolygons(tabModel) {\n let selectedRows = Ember.get(tabModel, '_selectedRows');\n let selectedFeaturesKeys = Object.keys(selectedRows).filter((item) => Ember.get(selectedRows, item));\n let intersectPolygonFeatures = Ember.A();\n let intersectPolygonFeaturesKeys = Ember.A();\n selectedFeaturesKeys.forEach((item, index) => {\n let currentFeature = tabModel.featureLink[item].feature;\n let currentFeatureGeoJson = currentFeature.leafletLayer.toGeoJSON();\n let currentFeatureGeometry = currentFeatureGeoJson.geometry;\n let isIntersect = !Ember.isNone(currentFeatureGeometry) ? checkIntersect(currentFeatureGeometry) : false;\n\n if (isIntersect) {\n intersectPolygonFeaturesKeys.push(item);\n intersectPolygonFeatures.push(currentFeature);\n }\n });\n\n if (intersectPolygonFeatures.length !== 0) {\n Ember.set(tabModel, '_selectedRows', {});\n Ember.set(tabModel, 'selectAll', false);\n let selectedInterctItemsRows = Ember.get(tabModel, '_selectedRows');\n intersectPolygonFeaturesKeys.forEach((item, index) => {\n Ember.set(selectedInterctItemsRows, item, true);\n });\n Ember.set(tabModel, '_selectedRows', selectedInterctItemsRows);\n this.send('zoomTo', intersectPolygonFeatures);\n }\n }", "if(lineFirst[2]){ d = d2; p0 = tri.p0; p1 = tri.p2; }", "getWeights() {\r\n let w1 = this.w1.flatten().selection.data;\r\n\r\n let w2 = this.w2.flatten().selection.data;\r\n\r\n return [...w1, ...w2];\r\n }", "function randomPick(array) {//array is the address in VillageState.random, which is the keys of the roadGraph \n let choice = Math.floor(Math.random() * array.length);//use Math.random function to generate a random number between 0-4, which is the length of array\n return array[choice];\n }", "function G_sample_selector(v, converter)\n{\n var start_index;\n var end_index;\n var win_left;\n var win_right;\n\n this.select_samples = function(v_plane)\n {\n var w = v_plane.get_physical_window();\n if (win_left == undefined)\n {\n start_index = 0;\n while ((start_index < v.length - 1) && (converter(v[start_index]) < w.left))\n {\n start_index++\n }\n\n end_index = v.length - 1;\n while ((end_index > 0) && (converter(v[end_index]) > w.right))\n {\n end_index--\n }\n\n }\n else\n {\n if (win_left < w.left)\n {\n while ((start_index < v.length - 1) && (converter(v[start_index]) < w.left))\n {\n start_index++\n }\n }\n else\n {\n while ((start_index > 0) && (converter(v[start_index]) > w.left))\n {\n start_index--\n }\n }\n\n if (win_right > w.right)\n {\n while ((end_index > 0) && (converter(v[end_index]) > w.right))\n {\n end_index--\n }\n }\n else\n {\n while ((end_index < v.length - 1) && (converter(v[end_index]) < w.right))\n {\n end_index++\n }\n }\n }\n win_left = w.left;\n win_right = w.right;\n return v.slice(start_index, end_index + 1);\n }\n}", "function pickHotel() {\n\n console.log('hello from hotel');\n for ( let i = 0 ; i < Hotel.all.length ; i++ ){\n if ( plan.budget === Hotel.all[i].hotelBudget && plan.planDays[0].dayLocation === Hotel.all[i].location ) {\n plan.planDays[0].planHotel = Hotel.all[i];\n\n }\n \n\n }\n\n}", "function Selections (type, size, toppings) {\n this.type = type;\n this.size = size;\n this.toppings = [];\n}", "pickVectorFeatures(screenPosition) {\n var _a, _b;\n // Pick vector features\n const vectorFeatures = [];\n const pickedList = this.scene.drillPick(screenPosition);\n for (let i = 0; i < pickedList.length; ++i) {\n const picked = pickedList[i];\n let id = picked.id;\n if (id &&\n id.entityCollection &&\n id.entityCollection.owner &&\n id.entityCollection.owner.name === GlobeOrMap._featureHighlightName) {\n continue;\n }\n if (!defined(id) && defined(picked.primitive)) {\n id = picked.primitive.id;\n }\n // Try to find catalogItem for picked feature, and use catalogItem.getFeaturesFromPickResult() if it exists - this is used by FeatureInfoMixin\n const catalogItem = (_b = (_a = picked === null || picked === void 0 ? void 0 : picked.primitive) === null || _a === void 0 ? void 0 : _a._catalogItem) !== null && _b !== void 0 ? _b : id === null || id === void 0 ? void 0 : id._catalogItem;\n if (typeof (catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.getFeaturesFromPickResult) === \"function\") {\n const result = catalogItem.getFeaturesFromPickResult.bind(catalogItem)(screenPosition, picked);\n if (result) {\n if (Array.isArray(result)) {\n vectorFeatures.push(...result);\n }\n else {\n vectorFeatures.push(result);\n }\n }\n }\n else if (id instanceof Entity && vectorFeatures.indexOf(id) === -1) {\n const feature = Feature.fromEntityCollectionOrEntity(id);\n if (picked.primitive) {\n feature.cesiumPrimitive = picked.primitive;\n }\n vectorFeatures.push(feature);\n }\n }\n return vectorFeatures;\n }", "function addToSelect(values) {\r\nvar option = domConstruct.create(\"option\");\r\noption.text = \"Zoom to a Township\";\r\ntownshipSelect.add(option);\r\n\r\nvalues.features.forEach(function(value) {\r\n var option = domConstruct.create(\"option\");\r\n var name = value.attributes.twn_ch + value.attributes.tdir;\r\n option.text = name;\r\n townshipSelect.add(option);\r\n \r\n});\r\n}", "function get_combined_durations(trips){\n\tvar result=[];\n\ttrips.forEach(function(trip,i) {\n\t\ttrip.start_date = new Date((+trip.start_date+ +trip.end_date-trip.duration*1000)/2);\n\t\ttrip.end_date = new Date(+trip.start_date+trip.duration*1000);\n\t\tif (i>1){\n\t\t\tfor (var j=i-1; j>=0; j--){\n\t\t\t\tvar ptrip = trips[j];\n\t\t\t\tif(ptrip.bikeid==trip.bikeid){\n\t\t\t\t\tif(ptrip.end_date>trip.start_date){\n\t\t\t\t\t\ttrip.start_date=ptrip.end_date;\n\t\t\t\t\t\ttrip.end_date= new Date(+trip.start_date+trip.duration * 1000);\n\t\t\t\t\t}\n\t\t\t\t\tvar etrip={};\n\t\t\t\t\tetrip.id = tripsCounter++;\n\t\t\t\t\tetrip.duration = (+trip.start_date - ptrip.end_date)/1000;\n\t\t\t\t\tetrip.start_date = ptrip.end_date;\n\t\t\t\t\tetrip.end_date = new Date(+ptrip.end_date+etrip.duration * 1000);\n\t\t\t\t\tetrip.start_station = ptrip.end_station;\n\t\t\t\t\tetrip.start_station_name = ptrip.end_station_name;\n\t\t\t\t\tetrip.start_station_lat = ptrip.end_station_lat;\n\t\t\t\t\tetrip.start_station_lng = ptrip.end_station_lng;\n\t\t\t\t\tetrip.end_station = trip.start_station;\n\t\t\t\t\tetrip.end_station_name = trip.start_station_name;\n\t\t\t\t\tetrip.end_station_lat = trip.start_station_lat;\n\t\t\t\t\tetrip.end_station_lng = trip.start_station_lng;\n\t\t\t\t\tetrip.bikeid = trip.bikeid;\n\t\t\t\t\tetrip.trip_id = ptrip.trip_id + \"_\" + trip.trip_id;\n\t\t\t\t\tetrip.type = \"combined\";\n\t\t\t\t\tresult.push(etrip);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\treturn result;\n}", "get selectionSet() {\n return this.transactions.some(tr => tr.selection);\n }", "function selectPath(path) {\n var selectors = [];\n for (var i = 0; i < path.length; i++) {\n var point = path[i];\n if (point.length != 2) {\n console.info(\"Skipping over malformed point\", point, \"in selectPath()\");\n continue;\n }\n var column = point[0];\n var row = point[1];\n \n selectors.push(\"[data-row=\" + row + \"][data-column=\" + column + \"]\");\n }\n \n var finalSelector = selectors.join(\", \");\n //console.debug(\"final:\", finalSelector);\n return $(\"#hexmap\").find(finalSelector);\n}", "function selectStories(collection) {\n storyArray = collection;\n for (let i = 0; i < 10; i++) {\n random = Math.floor(Math.random() * (storyArray.length - 1));\n selectedStories.push(storyArray[random]);\n storyArray.splice(random, 1)\n }\n startRound();\n}", "function adjacentById()\n{\nvar adj_traverse =this.adjacent.traverse();\nvar adj_traversal_array = [];\nfor(var i=0;i<adj_traverse.length;i++){\n adj_traversal_array[i]=adj_traverse[i].target_v;\n}\nreturn adj_traversal_array ;\n}", "function search_triplets(arr) {\n\t// TODO: Write your code here\n\t// given unsorted array, find all triplets that add up to zero, return array with all triplets that sum up to zero\n\t// sort the array first\n\t// start from both ends of the array\n\t//\n\ttriplets = [];\n\n\tlet sumTarget = 0;\n\n\tif (arr.length < 3) {\n\t\treturn triplets;\n\t}\n\n\tarr.sort((a, b) => a - b);\n\tfor (let i = 0; i < arr.length - 2; i++) {\n\t\tif (arr[i] === arr[i - 1]) continue;\n\t\tif (arr[i] > sumTarget) {\n\t\t\t//if the first target is already greater than zero and since it's increasing, there's no way to add up to zero\n\t\t\treturn triplets;\n\t\t}\n\t\tlet leftPointer = i + 1;\n\t\tlet rightPointer = arr.length - 1;\n\n\t\twhile (leftPointer < rightPointer) {\n\t\t\tif (arr[leftPointer] + arr[rightPointer] + arr[i] === sumTarget) {\n\t\t\t\ttriplets.push([ arr[leftPointer], arr[rightPointer], arr[i] ]);\n\t\t\t\twhile (arr[leftPointer] === arr[leftPointer + 1]) leftPointer++;\n\t\t\t\twhile (arr[rightPointer] === arr[rightPointer - 1]) rightPointer--;\n\t\t\t\tleftPointer++;\n\t\t\t\trightPointer--;\n\t\t\t} else if (arr[leftPointer] + arr[rightPointer] + arr[i] < sumTarget) {\n\t\t\t\tleftPointer++;\n\t\t\t} else {\n\t\t\t\trightPointer--;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn triplets;\n}", "function MarkedSelected( pt, tiled ) {\n\t\t\tvar index = tiled.name - Math.floor( ( tiled.name / 100 ) ) * 100 ;\n\t\t\t// Single select.\n\t\t\tif ( pt.box.list.texture.multiSelect == 0 ) {\n\t\t\t\tpt.box.list.marked.name = tiled.name ;\n\t\t\t\tpt.box.list.marked.visible = true ;\n\t\t\t\tpt.box.list.marked.pane.graphics.c() ;\n\t\t\t\tpt.box.list.marked.pane.graphics.s( \"#FF0000\" ).r( 0, 0, G.size + 1, G.size + 1 ) ;\n\t\t\t\tpt.box.list.marked.x = 14 + ( index % G.range ) * ( G.size + 1 ) ;\n\t\t\t\tpt.box.list.marked.y = 14 + ( Math.floor( index / G.range ) ) * ( G.size + 1 ) ;\n\t\t\t} // if\n\t\t\t// Prepare to multi-select.\n\t\t\telse if ( pt.box.list.texture.multiSelect == 1 ) {\n\t\t\t\tpt.box.list.marked.pane.graphics.c() ;\n\t\t\t\tpt.box.list.marked.pane.graphics.s( \"#0000FF\" ).r( 0, 0, G.size + 1, G.size + 1 ) ;\n\t\t\t} // else if\n\t\t\t// Select multi-tiled.\n\t\t\telse if ( pt.box.list.texture.multiSelect == 2 ) {\n\t\t\t\t// Get distance of 'final - start grid'.\n\t\t\t\tvar degreeX = ( index % G.range ) - ( pt.box.list.marked.x - 14 ) / ( G.size + 1 ) ;\n\t\t\t\tvar degreeY = ( Math.floor( index / G.range ) ) - ( pt.box.list.marked.y - 14 ) / ( G.size + 1 ) ;\n\t\t\t\t// Save those distance to name element.\n\t\t\t\tvar storeRangeX = ( 10 * ( ( degreeX >= 0 ) ? 1 : 0 ) ) + Math.abs( degreeX ) ;\n\t\t\t\tvar storeRangeY = ( 10 * ( ( degreeY >= 0 ) ? 1 : 0 ) ) + Math.abs( degreeY ) ;\n\t\t\t\tpt.box.list.marked.name = ( pt.box.list.marked.name + storeRangeX * 0.01 + storeRangeY * 0.0001 ).toFixed( 4 ) ;\n\t\t\t\t// Draw a new range multi-selected.\n\t\t\t\tpt.box.list.marked.pane.graphics.s( \"#00FF00\" ).r( \n\t\t\t\t\t( degreeX >= 0 ) ? 0 : ( G.size + 1 ),\n\t\t\t\t\t( degreeY >= 0 ) ? 0 : ( G.size + 1 ),\n\t\t\t\t\t( degreeX + ( ( degreeX >= 0 ) ? 1 : -1 ) ) * ( G.size + 1 ),\n\t\t\t\t\t( degreeY + ( ( degreeY >= 0 ) ? 1 : -1 ) ) * ( G.size + 1 ) ) ;\n\t\t\t} // else if\n\t\t}", "function proofCopy( )\n{\n\tdoc.selection.selectAll( );\n\tdoc.selection.copy( true );\n}", "function selectRandomProducts() {\n\n var leftIndex = Math.floor(Math.random() * Product.all.length);\n var centerIndex = Math.floor(Math.random() * Product.all.length);\n var rightIndex = Math.floor(Math.random() * Product.all.length);\n \n while (leftIndex === rightIndex) {\n rightIndex = Math.floor(Math.random() * Product.all.length);\n }\n while (leftIndex === centerIndex) {\n centerIndex = Math.floor(Math.random() * Product.all.length);\n }\n while (rightIndex === centerIndex) {\n centerIndex = Math.floor(Math.random() * Product.all.length);\n }\n\n leftProduct = Product.all[leftIndex];\n\n centerProduct = Product.all[centerIndex];\n\n rightProduct = Product.all[rightIndex];\n\n \n\n}", "function select_layer(obj) {\r\n var selectedIndex = canvas.getObjects().reverse().indexOf(obj);\r\n var layerElements = document.getElementById('left').childNodes;\r\n var filteredLayerElements = [];\r\n for (var i = 0 ; i < layerElements.length ; i++){\r\n if (layerElements[i].nodeType == Node.ELEMENT_NODE){\r\n filteredLayerElements.push(layerElements[i]);\r\n }\r\n }\r\n for (var i = 0 ; i < filteredLayerElements.length ; i++){\r\n filteredLayerElements[i].className = \"layer\";\r\n }\r\n filteredLayerElements[selectedIndex].classList.add(\"selected\");\r\n}", "selectCycling() {\n this.checkOnSelection();\n cy.get(\n \"[data-travel_mode='1']>button>.directions-travel-mode-icon\"\n ).click();\n cy.wait(3500)\n return this.assertOnSelectionList();\n }", "get _selected_splines() {\r\n return new AllSplineIter(this, true);\r\n }", "function getPathItemsInSelection(n, paths){\n if(documents.length < 1) return;\n \n var s = activeDocument.selection;\n \n if (!(s instanceof Array) || s.length < 1) return;\n\n extractPaths(s, n, paths);\n}", "function tacotruck(coords){\n var minX = coords[0][0];\n var maxX = coords[0][0];\n var minY = coords[0][1];\n var maxY = coords[0][1];\n for(var i = 0; i < coords.length; i++){\n if(minX > coords[i][0]){\n minX = coords[i][0];\n }\n if(minY > coords[i][1]){\n minY = coords[i][1];\n }\n if(maxX < coords[i][0]){\n maxX = coords[i][0];\n }\n if(maxY < coords[i][1]){\n maxY = coords[i][1];\n }\n }\n\n var opt = [minX, minY];\n var optDistance = 0;\n for(var i = 0; i < coords.length; i++){\n optDistance += Math.abs(minX - coords[i][0]) + Math.abs(minY - coords[i][1]);\n }\n\n var x = minX;\n var y = minY;\n while( x <= maxX && y <= maxY){\n if(x !== minX && y !== minY){\n var distance = 0;\n for(var i = 0; i < coords.length; i++){\n distance += Math.abs(x - coords[i][0]) + Math.abs(y - coords[i][1]);\n }\n if(optDistance > distance){\n opt[0] = x;\n opt[1] = y;\n optDistance = distance;\n }\n }\n if(x === maxX){\n x = minX;\n y++;\n } else {\n x++;\n }\n }\n return opt;\n}", "function getAllMatchingUsers(theTrip, arrTrips, timeRange, distanceRange){\n var toReturn = [];\n // var startTime = theTrip['StartTimestamp'];\n // var endTime = theTrip['EndTimestamp'];\n // var startLocation = [theTrip['StartLocation']['Lat'], theTrip['StartLocation']['Lng']];\n // var endLocation = [theTrip['EndLocation']['Lat'], theTrip['EndLocation']['Lng']];\n var startTime = theTrip[0];\n var endTime = theTrip[1];\n var startLocation = theTrip[2];\n var endLocation = theTrip[3];\n for(var i = 0; i < arrTrips.length; i++){\n // var otherStartTime = arrTrips[i]['StartTimestamp'];\n // var otherEndTime = arrTrips[i]['EndTimestamp'];\n // var otherStartLocation = [arrTrips[i]['StartLocation']['Lat'], arrTrips[i]['StartLocation']['Lng']];\n // var otherEndLocation = [arrTrips[i]['EndLocation']['Lat'], arrTrips[i]['EndLocation']['Lng']];\n var otherStartTime = arrTrips[i][0];\n var otherEndTime = arrTrips[i][1];\n var otherStartLocation = arrTrips[i][2];\n var otherEndLocation = arrTrips[i][3];\n if(withInTime(timeRange, parseTime(startTime), parseTime(otherStartTime)) &&\n withInTime(timeRange, parseTime(endTime), parseTime(otherEndTime)) && \n withInMeters(distanceRange, startLocation, otherStartLocation) &&\n withInMeters(distanceRange, endLocation, otherEndLocation)){\n toReturn.push(arrTrips[i]);\n }\n }\n return toReturn;\n}", "function selectDestination()\n{\n\tdestinationArrayLat.push(destinationMarker.getPosition().lat())\n\tdestinationArrayLng.push(destinationMarker.getPosition().lng())\n\tdestinationCoordinates = new google.maps.LatLng({lat:destinationMarker.getPosition().lat(), lng:destinationMarker.getPosition().lng()});\n\trandomTreasure()\n\t\n}", "function getTrips(ttrips, summarize) {\n\t\tvar tdriver = null;\n\t\t_.each(textbox_items.slice(0, hoh ? 3 : 2), function(v) {\n\t\t\tsummarize[v] = 0;\n\t\t});\n\n\t\tfor (var i = 0, len = ctrips.length; i < len; i++) {\n\t\t\tvar trip = {};\n\t\t\t$.extend(trip, ctrips[i]);\n\t\t\tif (!trip) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar data = trip_to_data(i, trip);\n\n\t\t\tif (data) {\n\t\t\t\tvar mtext = data.trip.p ? data.trip.p.ui_text : '';\n\t\t\t\tvar note = data.trip.p ? data.trip.p.nt : '';\n\n\t\t\t\tdata['message'] = mtext ? mtext : \"\"; //\"Business\";\n\t\t\t\tdata['note'] = note ? note : \"\";\n\t\t\t\tttrips.push(data);\n\n\t\t\t\tif ('driver' in data) {\n\t\t\t\t\ttdriver = (tdriver && tdriver !== data.driver) ? '---' : data.driver;\n\t\t\t\t}\n\n\t\t\t\tif ((data['message'] === textbox_items[2] && !hoh) || !_.contains(textbox_items.slice(0, 3), data['message'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tsummarize[data['message']] += parseFloat(data.trip_length);\n\t\t\t}\n\t\t}\n\n\t\treturn tdriver;\n\t}", "loadPreviusSelection() {\n if (this.props.previusSelection && this.props.previusSelection.length > 0) {\n let trabajosSeleccion = [];\n Object.assign(trabajosSeleccion, this.state.selectTrabajos);\n\n for (let i = 0; i < this.props.previusSelection.length; i++) {\n let work = this.props.previusSelection[i];\n let groupIndex = trabajosSeleccion.findIndex(x => x.fase === work.Id_Tipo_Fase);\n if (groupIndex !== -1)\n trabajosSeleccion[groupIndex].trabajos.push(work);\n else {\n trabajosSeleccion.push({ fase: work.Id_Tipo_Fase, trabajos: [work] })\n }\n }\n this.setState({ selectTrabajos: trabajosSeleccion });\n }\n }", "get selectedRowIds() {\n const rowIds = this.selectedCheckboxes.map((checkbox) => {\n const checkboxId = checkbox.id.toString();\n const idArr = checkboxId.split('-');\n const rowIdIndex = 1;\n return idArr[rowIdIndex];\n });\n return rowIds;\n }", "static tripStops(train, direction, schedule) {\n const stops =\n direction === \"North\"\n ? caltrainServiceData.northStops\n : caltrainServiceData.southStops;\n const times = this.select(direction, schedule)[train] || [];\n const out = [];\n for (let i = 0; i < times.length; i++) {\n if (times[i]) out.push([stops[i], times[i]]);\n }\n return out;\n }", "joinAdjacent(shapes, fractionalDigits) {\n let joined = 0;\n if (shapes.length < 2) {\n return joined;\n }\n let idx = 0;\n let last = shapes[idx++];\n while (idx < shapes.length) {\n const next = shapes[idx];\n if (next.geometry) {\n idx++;\n continue;\n }\n const lastEnd = this.end(last);\n const nextStart = this.start(next);\n //console.info(lastEnd, nextStart);\n //TODO check reverse path as well and reverse that\n if (last.geometry.type === 'LINE' && next.geometry.type === 'LINE') {\n if (this.pointEquals(lastEnd, nextStart, fractionalDigits)) {\n Array.prototype.push.apply(last.geometry.vectors, next.geometry.vectors);\n //\n this.updateLimit(last.geometry);\n this.updateBounds([last]);\n shapes.splice(idx, 1);\n joined++;\n }\n else {\n last = next;\n idx++;\n }\n }\n }\n return joined;\n }", "function seedTripData() {\n\tconsole.info('seeding trip data');\n\treturn Trip.insertMany(seedTrips);\n}", "function findTrips(departureId, arrivalId) {\n\n return Promise.all([Trips.getTripStopTimes(departureId), Trips.getTripStopTimes(arrivalId)]).then(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2);\n\n var departureTimes = _ref4[0];\n var arrivalTimes = _ref4[1];\n\n\n var stop_times = findMatchingTrips(departureTimes, arrivalTimes);\n return { trips: Trips.appendTripInfo(stop_times), routes: Trips.getRoutesForTrips(stop_times) };\n });\n}", "selectAirplane() {\n this.checkOnSelection();\n cy.get(\n \"[data-travel_mode='4']>button>.directions-travel-mode-icon\"\n ).click();\n cy.wait(3500)\n return this.assertOnSelectionList();\n }", "canPickTriangle() {\n }" ]
[ "0.5501157", "0.5169022", "0.5119497", "0.51169765", "0.5084151", "0.50048494", "0.49870422", "0.4983171", "0.4978363", "0.49504626", "0.4941138", "0.49386263", "0.49356747", "0.49257678", "0.49112976", "0.49091542", "0.4908651", "0.48787922", "0.4844551", "0.48374882", "0.4834127", "0.48339525", "0.48328227", "0.48262691", "0.4823752", "0.48148495", "0.4811324", "0.47958958", "0.47945768", "0.47938746", "0.47817", "0.4778163", "0.4778163", "0.4777202", "0.47764754", "0.47764754", "0.47760552", "0.47738615", "0.477079", "0.47676083", "0.4765127", "0.4764125", "0.47604454", "0.47603443", "0.4759992", "0.47580102", "0.47575012", "0.47553968", "0.47438097", "0.4741088", "0.47367972", "0.4735476", "0.4731318", "0.4728083", "0.47238904", "0.47228053", "0.47198793", "0.47177622", "0.47141913", "0.47141913", "0.47005215", "0.46987215", "0.46963224", "0.46947548", "0.4691429", "0.46895543", "0.46869224", "0.46867085", "0.46851346", "0.4675977", "0.46736735", "0.4665634", "0.46645194", "0.46637022", "0.46575442", "0.465485", "0.46532014", "0.46516493", "0.4648098", "0.4642731", "0.46389887", "0.46378344", "0.46377322", "0.46368405", "0.4632092", "0.46231997", "0.46223667", "0.4620772", "0.46200046", "0.46189082", "0.46181396", "0.4617847", "0.4616181", "0.46037164", "0.46017691", "0.45989022", "0.45959803", "0.45912766", "0.45912454", "0.458933", "0.4587812" ]
0.0
-1
uploaded images on mobile are typically oriented incorrectly. loadImage corrects the image orientation.
orientImage(file, callback) { window.loadImage( file, img => callback(img.toDataURL("image/png")), { canvas: true, orientation: true } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadImage(image) {\n if (artwork.orientation == 'landscape') {\n context.drawImage(\n image,\n Math.abs(canvas.width / 2 - artwork.longDimension/2),\n Math.abs(canvas.height / 2 - artwork.shortDimension / 2),\n artwork.longDimension,\n artwork.shortDimension\n );\n } else { \n context.drawImage(\n image,\n Math.abs(canvas.width / 2 - artwork.shortDimension / 2),\n Math.abs(canvas.height / 2 - artwork.longDimension/2),\n artwork.shortDimension,\n artwork.longDimension,\n );\n }\n}", "function imageOrientation() {\n\tlet images = document.getElementsByTagName('img')\n\n\tfunction setOrientationState(image) {\n\t\tlet orientation = 'square'\n\n\t\tif (image.width > image.height) {\n\t\t\torientation = 'landscape'\n\t\t} else if (image.height > image.width) {\n\t\t\torientation = 'portrait'\n\t\t}\n\n\t\tstate.set('orientation', orientation, image)\n\t}\n\n\tfor (let i = 0; i < images.length; i++) {\n\t\tif (!images[i].naturalWidth || !images[i].naturalHeight) {\n\t\t\timages[i].addEventListener('load', function () {\n\t\t\t\tsetOrientationState(this)\n\t\t\t})\n\t\t} else {\n\t\t\tsetOrientationState(images[i])\n\t\t}\n\t}\n}", "loadImage() {\n if (this.imageType === \"inline\") {\n if (this.imageLoaded === false || this.imageReloader === true) {\n this.getImageFile(this.smartImageElem);\n }\n } else if (this.imageType === \"background\") {\n this.smartImageElem.classList.add(imageFlexClass);\n if (this.imageLoaded === false || this.imageReloader === true) {\n this.getImageFile(this.smartImageElem);\n }\n }\n }", "_handleImageLoad() {\n if (!this.attachmentViewer || !this.attachmentViewer.attachment) {\n return;\n }\n const refs = this._getRefs();\n const image = refs[`image_${this.attachmentViewer.attachment.id}`];\n if (\n this.attachmentViewer.attachment.fileType === 'image' &&\n (!image || !image.complete)\n ) {\n this.attachmentViewer.update({ isImageLoading: true });\n }\n }", "function processImageOptions(imageData, onSuccess, onFail, options) {\n\tvar image = new Image();\n\timage.onload = function() {\n\t\t// detect orientation of captured photo on mobile device using EXIF data\n\t\tvar o = 1;\n\t\tEXIF.getData(image, function() {\n\t\t\tconsole.log(\"EXIF:\", EXIF.pretty(this) );\n\t\t\to = EXIF.getTag(this,'Orientation');\n\n\t\t\t// set real image width and height\n\t\t\tvar imageWidth = image.width;\n\t\t\tvar imageHeight = image.height;\n\t\t\tvar isSideways = false;\n\t\t\tif (o===5 || o===6 || o===7 || o===8) {\n\t\t\t\tisSideways = true;\n\t\t\t\timageWidth = image.height;\n\t\t\t\timageHeight = image.width;\n\t\t\t}\n\n\t\t\tconsole.log(\"process Image @\", imageWidth, imageHeight, \" orientation:\", o, \" sideways:\", isSideways);\n\n\t\t\tvar r = imageWidth / imageHeight;\n\t\t\tvar width = imageWidth;\n\t \tvar height = imageHeight;\n\t\t\tvar quality = (options.quality/100 || 0.8);\n\t\t\tvar scale = 1;\n\n\t\t\t// scale down if source is larger than target dimensions\n\t\t\tif (r > 1 && imageWidth>options.targetWidth) {\n\t\t\t\t// landscape format - adjust target height\n\t\t\t\twidth = options.targetWidth;\n\t\t\t\tscale = width/imageWidth;\n\t\t\t\theight = Math.floor( imageHeight * scale );\n\t\t\t\tconsole.log(\"Landscape *h\", height, \"scale:\", scale);\n\t\t\t} else if (r < 1 && imageHeight>options.targetHeight) {\n\t\t\t\t// portrait format - adjust target width\n\t\t\t\theight = options.targetHeight;\n\t\t\t\tscale = height/imageHeight;\n\t\t\t\twidth = Math.floor( imageWidth * scale );\n\t\t\t\tconsole.log(\"Portrait *w\", width, \"scale:\", scale);\n\t\t\t}\n\t\t\tconsole.log(\"resize ->\", width, height, \" quality:\", quality);\n\n\t\t\t// create canvas without appending to DOM\n\t\t\tif (typeof imageCanvas === \"undefined\") {\n\t\t\t\tconsole.log(\"image canvas created\");\n\t\t\t\timageCanvas = document.createElement('canvas');\n\t\t\t\timageCanvas.setAttribute(\"hidden\", true);\n\t\t\t}\n\n\t\t\tvar x = width,\n\t\t\t\t\ty = height,\n\t\t\t\t\tw = width,\n\t\t\t\t\th = height;\n\n\t\t\t// swap x/y dimensions for sideways orientated photos\n\t\t\tif (isSideways) {\n\t\t\t\tx = height;\n\t\t\t\ty = width;\n\t\t\t}\n\n\t\t\timageCanvas.width = w;\n\t\t\timageCanvas.height = h;\n\t\t\tconsole.log(\"x\",x, \"y\",y, \" w\",w, \"h\",h);\n\n\t\t\tvar ctx = imageCanvas.getContext(\"2d\");\n\n\t\t\tswitch (o) {\n\t\t\t\tcase 1:\n\t\t\t\t\tconsole.log(\"Orientation correct\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: // mirror\n\t\t\t\t\tctx.translate(x,0);\n\t\t\t\t\tctx.scale(-1,1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tctx.translate(x,y);\n \tctx.rotate(Math.PI);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tctx.translate(0,y);\n\t\t\t\t\tctx.scale(1,-1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tctx.rotate(0.5*Math.PI);\n\t\t\t\t\tctx.scale(1, -1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tctx.rotate(0.5*Math.PI);\n\t\t\t \t\tctx.translate(0,-y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tctx.rotate(0.5*Math.PI);\n \tctx.translate(x,-y);\n \tctx.scale(-1,1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tctx.rotate(-0.5*Math.PI);\n \tctx.translate(-x,0);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.log(\"Orientation not defined\", o);\n\t\t\t}\n\n\t\t\t// apply scale\n\t\t\tif (scale < 1) {\n\t\t\t\tconsole.log(\"Apply scale-down\", scale);\n\t\t\t\tctx.scale(scale, scale);\n\t\t\t}\n\t\t\t// finally, draw image\n\t\t\tctx.drawImage(image, 0, 0);\n\n\t\t\tvar processedImageData = imageCanvas.toDataURL(\"image/jpeg\", quality);\n\t\t\tconsole.log(\"Canvas data\", processedImageData.length, processedImageData.substr(0,32)+\"...\");\n\n\t\t\t// clear resources\n\t\t\tctx.restore();\n\t\t\tctx.clearRect(0, 0, w, h);\n\t\t\timage = null;\n\n\t\t return onSuccess( processedImageData );\n });\n };\n\timage.onerror = function() {\n\t\treturn onFail(\"Error processing image options.\");\n\t};\n\timage.src = imageData;\n}", "function readPic(file) {\n console.log(file);\n var fileType = file[\"type\"].split(\"/\")[0];\n if (fileType !== \"image\") {\n displayError(\"Not an image, please use a valid image format: \\\n JPEG, PNG8, PNG24, GIF, Animated GIF (first frame only), BMP, WEBP, RAW, or ICO\");\n\n } else {\n loadImage.parseMetaData(file, function(data) {\n //default image orientation\n var orientation = 0;\n //if exif data available, update orientation\n if (data.exif) {\n orientation = data.exif.get('Orientation');\n }\n var loadingImage = loadImage(\n file,\n function(canvas) {\n //here's the base64 data result\n var base64data = canvas.toDataURL('image/jpeg');\n displayPic(base64data);\n if (file.size < 4000000) {\n sendImageDirect(base64data);\n } else {\n sendImageImgur(base64data);\n }\n }, {\n //should be set to canvas : true to activate auto fix orientation\n canvas: true,\n orientation: orientation\n }\n );\n });\n // getOrientation(file, function checkRotate(orientation) {\n // console.log(orientation);\n // var reader = new FileReader();\n // getImageBase64(file, function(image) {\n // if (file.size < 4000000) {\n // orientDisplayPic(image, orientation);\n // sendImageDirect(image, orientation);\n // } else { \n // orientDisplayPic(image, orientation);\n // sendImageImgur(image, orientation);\n // }\n // });\n // });\n }\n}", "handleImageLoad_() {\n const image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n } else {\n this.state = TileState.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n }", "handleImageLoad_() {\n const image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n } else {\n this.state = TileState.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n }", "function load_image(file){\r\nconsole.log(\"image loading\");\r\n$(\"#message\").text(\"image loading\");\r\n\tvar image = document.createElement(\"img\");\r\n\tdocument.getElementById(\"hidden_area\").appendChild(image);\r\n\timage.onerror = onImageError;\r\n\timage.onload = onImageLoad;\r\n\tvar createObjectURL = (window.webkitURL && window.webkitURL.createObjectURL) || (window.URL && window.URL.createObjectURL);\r\n\timage.src = createObjectURL(file);\r\n}", "function loadImage(firstLoad){\n img = new Image()\n zoomed = false\n if (!firstLoad){\n basename = images[curIndex]\n }\n src = path.join(dirname, basename)\n img.src = src\n img.onload = () => {\n setOriDim()\n setSvgDim()\n setDefaultScale()\n setImgDim()\n setImgPos()\n updateImg()\n setTitle()\n }\n}", "function fixImageOrientation(img64){\n return new Promise((resolve, reject) => {\n sharp(Buffer.from(img64, 'base64'))\n .rotate() //rotate based on exif value\n .toBuffer()\n .then(data => resolve(data.toString('base64')))\n .catch(err => reject(err));\n });\n}", "function orientation(img_element) {\n var canvas = document.createElement('canvas');\n // Set variables\n var ctx = canvas.getContext(\"2d\");\n var exifOrientation = '';\n var width = img_element.width,\n height = img_element.height;\n\n // Check orientation in EXIF metadatas\n EXIF.getData(img_element, function () {\n var allMetaData = EXIF.getAllTags(this);\n exifOrientation = allMetaData.Orientation;\n });\n\n // set proper canvas dimensions before transform & export\n if (jQuery.inArray(exifOrientation, [5, 6, 7, 8]) > -1) {\n canvas.width = height;\n canvas.height = width;\n } else {\n canvas.width = width;\n canvas.height = height;\n }\n\n // transform context before drawing image\n switch (exifOrientation) {\n case 2:\n ctx.transform(-1, 0, 0, 1, width, 0);\n break;\n case 3:\n ctx.transform(-1, 0, 0, -1, width, height);\n break;\n case 4:\n ctx.transform(1, 0, 0, -1, 0, height);\n break;\n case 5:\n ctx.transform(0, 1, 1, 0, 0, 0);\n break;\n case 6:\n ctx.transform(0, 1, -1, 0, height, 0);\n break;\n case 7:\n ctx.transform(0, -1, -1, 0, height, width);\n break;\n case 8:\n ctx.transform(0, -1, 1, 0, 0, width);\n break;\n default:\n ctx.transform(1, 0, 0, 1, 0, 0);\n }\n\n // Draw img_element into canvas\n ctx.drawImage(img_element, 0, 0, width, height);\n var __return = canvas.toDataURL();\n $(canvas).remove();\n return __return;\n}", "function loadImage(fileList, fileIndex) {\n\t//if (fileList.indexOf(fileIndex) < 0) {\n cc = document.getElementById('user_image').getContext('2d');\n\n\t\tvar reader = new FileReader();\n\t\treader.onload = (function(theFile) {\n\t\t return function(e) {\n\t\t\t\t// check if positions already exist in storage\n\t\t\t\t// Render thumbnail.\n\t\t\t\tvar canvas = document.getElementById('user_image')\n\t\t\t\tvar cc = canvas.getContext('2d');\n\t\t\t\tvar img = new Image();\n\t\t\t\timg.onload = function() {\n\t\t\t\t\tif (img.height > 500 || img.width > 700) {\n\t\t\t\t\t\tvar rel = img.height/img.width;\n\t\t\t\t\t\tvar neww = 700;\n\t\t\t\t\t\tvar newh = neww*rel;\n\t\t\t\t\t\tif (newh > 500) {\n\t\t\t\t\t\t\tnewh = 500;\n\t\t\t\t\t\t\tneww = newh/rel;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanvas.setAttribute('width', neww);\n\t\t\t\t\t\tcanvas.setAttribute('height', newh);\n // overlay.setAttribute('width', neww);\n // overlay.setAttribute('height', newh);\n\t\t\t\t\t\tcc.drawImage(img,0,0,neww, newh);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcanvas.setAttribute('width', img.width);\n\t\t\t\t\t\tcanvas.setAttribute('height', img.height);\n // overlay.setAttribute('width', img.width);\n // overlay.setAttribute('height', img.height);\n\t\t\t\t\t\tcc.drawImage(img,0,0,img.width, img.height);\n\t\t\t\t\t}\n startCrop(overlay);\n // jQuery('#overlay').css({left:jQuery('#user_image').offset().left})\n // jQuery('#overlay').css({top:jQuery('#user_image').offset().top})\n\t\t\t\t}\n\t\t\t\timg.src = e.target.result;\n\n\t\t\t};\n\t\t})(fileList[fileIndex]);\n\t\treader.readAsDataURL(fileList[fileIndex]);\n\t\toverlayCC.clearRect(0, 0, 720, 576);\n\t\tdocument.getElementById('convergence').innerHTML = \"\";\n\t\tctrack.reset();\n\n animateClean();\n//\t}\n}", "function loadImg(e){var files=e.target.files;if(files.length){[].forEach.call(files,function(file){var reader=new FileReader();//проветка на тип зашруженного файла и размер\nexchangeByteForMb(file.size)>5&&console.log('55');if(testTypeImage(file,['gif','jpeg','pjpeg','png'])&&exchangeByteForMb(file.size)<5){reader.onload=function(e){var fileData=e.target.result;//base64\nvar error=e.target.error;error&&log('Файл не загрузился!');var block='<div class=\"blockFlexImgInfo\">\\n <img src=\"'+fileData+'\" alt=\"\">\\n <a href=\"#\" class=\"deleteImg \"></a>\\n <div class=\"blockFlexImgInfo__name\">'+file.name.split('.')[0]+'</div>\\n <div class=\"blockFlexImgInfo__size\">'+exchangeByteForMb(file.size)+' Mb</div>\\n </div>';document.querySelector('.blockFlexImg__square').insertAdjacentHTML('afterEnd',block);};reader.readAsDataURL(file);}else if(testTypeImage(file,['gif','jpeg','pjpeg','png'])){var errorSize=document.createElement('div');errorSize.classList.add('errorSizeImg');errorSize.innerHTML='Error: '+file.name.split('.')[0]+' \\u043F\\u0440\\u0435\\u0432\\u044B\\u0448\\u0430\\u0435\\u0442 \\u043C\\u0430\\u043A\\u0441\\u0438\\u043C\\u0430\\u043B\\u044C\\u043D\\u044B\\u0439 \\u0440\\u0430\\u0437\\u043C\\u0435\\u0440 5 Mb!';document.querySelector('.errorSizeImgConteiner').appendChild(errorSize);setTimeout(function(){return document.querySelector('.errorSizeImg').remove();},7000);log(66666);}else{var blockNoImage='<article class=\"infoNoImage\">\\n <div class=\"flex\">\\n <pre class=\"infoNoImage__info-maxSize\">1. '+file.name.split('.')[0]+'</pre>\\n <pre class=\"infoNoImage__info\">'+file.type.split('/')[1]+'</pre>\\n <pre class=\"infoNoImage__info\">'+exchangeByteForMb(file.size)+' Mb</pre>\\n </div>\\n <pre class=\"infoNoImage__info__delete \">Delete </pre>\\n </article>';document.querySelector('.startFlex__column').insertAdjacentHTML('beforeEnd',blockNoImage);}});e.target.value='';}}", "onImageLoaded() {\n this.imgLoaded = true;\n }", "function loadImage(src){\n //\tPrevent any non-image file type from being read.\n if(!src.type.match(/image.*/)){\n console.log(\"The dropped file is not an image: \", src.type);\n return;\n }\n\n //\tCreate our FileReader and run the results through the render function.\n var reader = new FileReader();\n reader.onload = function(e){\n var data = e.target.result\n $.ajax({\n type: \"POST\",\n url: \"uploadCanvas\",\n //contentType: \"application/x-www-form-urlencoded\",\n data: {\n img64: data\n },\n success: function (response) {\n console.log(response);\n },\n error: function (errorThrown) {\n console.log(errorThrown)\n }\n\n }).done(function(o) {\n tempImg = globalsrc + o\n tmpO = o\n var tmp = new Image();\n tmp.src = tempImg\n tmp.onload = function(){\n $(\"#image\").css('width',tmp.width)\n $(\"#image\").css('height',tmp.height)\n\n $(\"#image\").css({'background': 'url('+tempImg+') no-repeat',\n 'background-size': '100% auto'})\n\n\n\n $(\"#image\").freetrans({\n 'rot-origin': '50% 50%'\n }).css({\n border: \"1px solid pink\"\n });\n var o = $('#image').freetrans('getBounds');\n tmpW = o.width\n tmp=null\n }\n\n\n\n });\n\n };\n reader.readAsDataURL(src);\n}", "function onPhotoDataSuccess(imageData) {\n\t\t\n\t\tvar image = new Image();\n\t image.onload = function() {\n\t \t\n\t \t//Get aspect ratio, aiming for 300px width\n\t \tconsole.log(image.width + \"x\" + image.height);\n\t \tvar maxDimension = 250;\n\t \tif(image.width > image.height)\n\t \t{\n\t\t \tvar resizeFactor = (maxDimension/image.width);\n\t\t \tconsole.log('resize Factor: ' + resizeFactor);\t\t \t\n\t\t\t} else {\n\t\t\t\tvar resizeFactor = (maxDimension/image.height);\n\t\t\t}\n\t\t\tvar newWidth = image.width * resizeFactor;\n\t\t\tvar newHeight = image.height * resizeFactor;\n\t\t\tconsole.log('new dimensions: ' + newWidth + 'x' + newHeight);\n\n\t \t//Set up canvas\n\t\t\tvar canvas = document.createElement(\"canvas\");\n\t\t\tvar ctx = canvas.getContext(\"2d\");\n\t\t\t\n\t\t\t//Draw rotated image\n\t\t\tcanvas.width = newHeight;\n\t\t\tcanvas.height = newWidth;\n\t ctx.translate(canvas.width/2, canvas.height/2); \n\t ctx.rotate(90*(Math.PI/180));\t \n\t ctx.drawImage(image, -(newWidth/2), -(newHeight/2), newWidth, newHeight);\n\t \n\t //Save image data and display on screen\n\t var imageDataRotated = canvas.toDataURL('image/jpeg'); \n\t\t\tvar playerImage = document.getElementById('playerImage');\n\t\t\tplayerImage.src = imageDataRotated;\n\t\t\tplayerImage.style.display = 'block';\n\t\t\taddPlayer();\n\t\t};\n\t\timage.src = \"data:image/jpeg;base64,\" + imageData;\n }", "function load360Image() {\n var img = new Image();\n img.src = imgList[loaded];\n img.onload = img360Loaded;\n images[loaded] = img;\n }", "loadImage(file) {\n let reader = new FileReader();\n\n reader.onload = (e) => {\n file.src = e.target.result;\n\n if (this.afterFileSelect){\n this.afterFileSelect(file);\n }\n };\n\n reader.readAsDataURL(file);\n }", "imageOnLoad() {\n loadJS(resizeScript, this.initResizeHandler.bind(this), document.body);\n\n this.toggleStatus(STATUS.FILLED);\n // eslint-disable-next-line no-undef\n\n /**\n * Preloader does not exists on first rendering with presaved data\n */\n if (this.nodes.imagePreloader) {\n this.nodes.imagePreloader.style.backgroundImage = \"\";\n }\n }", "function orientation(img, canvas) {\n var ctx = canvas.getContext(\"2d\");\n var exifOrientation = '';\n var width = img.width,\n height = img.height;\n // Check orientation in EXIF metadatas\n EXIF.getData(img, function() {\n var allMetaData = EXIF.getAllTags(this);\n exifOrientation = allMetaData.Orientation;\n console.log('Exif orientation: ' + exifOrientation);\n console.log(allMetaData);\n });\n // set proper canvas dimensions before transform & export\n if (jQuery.inArray(exifOrientation, [5, 6, 7, 8]) > -1) {\n canvas.width = height;\n canvas.height = width;\n } else {\n canvas.width = width;\n canvas.height = height;\n }\n switch (exifOrientation) {\n case 2:\n ctx.transform(-1, 0, 0, 1, width, 0);\n break;\n case 3:\n ctx.transform(-1, 0, 0, -1, width, height);\n break;\n case 4:\n ctx.transform(1, 0, 0, -1, 0, height);\n break;\n case 5:\n ctx.transform(0, 1, 1, 0, 0, 0);\n break;\n case 6:\n ctx.transform(0, 1, -1, 0, height, 0);\n break;\n case 7:\n ctx.transform(0, -1, -1, 0, height, width);\n break;\n case 8:\n ctx.transform(0, -1, 1, 0, 0, width);\n break;\n default:\n ctx.transform(1, 0, 0, 1, 0, 0);\n }\n ctx.drawImage(img, 0, 0, width, height);\n}", "function resetImage() {\n //load the image in canvas if the image is loaded successfully\n ctx = canvas.getContext(\"2d\");\n angleInDegrees = 0;\n currentScale = 1;\n currentAngle = 0;\n\n //for initial loading\n if (scope.flag) {\n scope.flag = 0;\n ctx.translate(canvas.width / 2, canvas.height / 2);\n drawImage();\n } else {\n ctx.translate(0, 0);\n drawImage();\n }\n }", "patched() {\n this._handleImageLoad();\n }", "_updateImage() {\n let boundsSize = [getWidth(this.bounds), getHeight(this.bounds)]\n let regionSize = [getWidth(this.region), getHeight(this.region)]\n if (this._orientation === 90 || this._orientation === 270) {\n boundsSize = [boundsSize[1], boundsSize[0]]\n regionSize = [regionSize[1], regionSize[0]]\n }\n\n // Set the size of the image\n this._dom.image.style.backgroundSize\n = `${boundsSize[0]}px ${boundsSize[1]}px`\n this._dom.image.style.width = `${regionSize[0]}px`\n this._dom.image.style.height = `${regionSize[1]}px`\n\n // Position the image centerally so the rotatation is aligned\n this._dom.image.style.marginLeft = `-${regionSize[0] / 2}px`\n this._dom.image.style.marginTop = `-${regionSize[1] / 2}px`\n this._dom.image.style.left = `${getWidth(this.region) / 2}px`\n this._dom.image.style.top = `${getHeight(this.region) / 2}px`\n\n // Set the orientation of the image\n this._dom.image.style.transform = `rotate(${this._orientation}deg)`\n\n // Set the background's position inline with the crop region's\n let bkgX = this._region[0][0] // eslint-disable-line\n let bkgY = this._region[0][1] // eslint-disable-line\n\n switch (this._orientation) {\n\n case 90:\n bkgX = this._region[0][1] // eslint-disable-line\n bkgY = (boundsSize[1] - regionSize[1]) - this._region[0][0]\n break\n\n case 180:\n bkgX = (boundsSize[0] - regionSize[0]) - this._region[0][0]\n bkgY = (boundsSize[1] - regionSize[1]) - this._region[0][1]\n break\n\n case 270:\n bkgX = (boundsSize[0] - regionSize[0]) - this._region[0][1]\n bkgY = this._region[0][0] // eslint-disable-line\n break\n\n // No default\n\n }\n\n // Ceil the values to prevent fractions causing jerking when dragging\n // or resizing.\n bkgX = Math.ceil(bkgX)\n bkgY = Math.ceil(bkgY)\n\n this._dom.image.style.backgroundPosition = `-${bkgX}px -${bkgY}px`\n }", "async load()\n {\n if (this.path)\n {\n // Try loading\n this.image = await Picture2D.loadImage(this.path);\n this.empty = this.image.empty;\n\n // If not empty, configure bitmap size\n if (!this.empty)\n {\n this.oW = this.image.width;\n this.oH = this.image.height;\n if (this.cover)\n {\n this.w = RPM.CANVAS_WIDTH;\n this.h = RPM.CANVAS_HEIGHT;\n } else if (this.stretch)\n {\n this.w = RPM.getScreenX(this.image.width);\n this.h = RPM.getScreenY(this.image.height);\n } else\n {\n this.w = RPM.getScreenMinXY(this.image.width);\n this.h = RPM.getScreenMinXY(this.image.height);\n }\n RPM.requestPaintHUD = true;\n this.loaded = true;\n }\n }\n }", "function onLowResImageSuccess(e){\n\t// Swap the thumbnail image with the low one\n\t$.media.image = e.data;\n}", "function loadImgs(cropImgWidth, rotateImgWidth, index) { \n var imgAttrs = imgData[index];\n \n $('#crop-img')\n .css({ \n height: getHeight(cropImgWidth, imgAttrs.origWidth, imgAttrs.origHeight) + 'px', \n width: cropImgWidth + 'px' \n })\n .attr('src', imgAttrs.fileSrc);\n\n // remove existing image element \n $('#rotate-img').remove();\n\n // create new image element for rotate action and attach it \n $('<img>', {\n id: 'rotate-img',\n src: imgAttrs.fileSrc, \n css: { \n height: getHeight(rotateImgWidth, imgAttrs.origWidth, imgAttrs.origHeight) + 'px', \n width: rotateImgWidth + 'px' \n }\n }).appendTo('#rotate-container'); \n \n // disable this slide's checkbox\n $('.chk-box').removeAttr('disabled');\n $('#chkbox_' + index).attr('disabled', true);\n \n // initialize crop and rotation actions\n apiJcrop.destroy();\n setJcrop(index); \n $('#rotate-img').rotate(0);\n currentCropRatio = imgAttrs.cropRatio;\n }", "function loadedImage()\r\n {\r\n //console.log(\"Load image \" + this.width + \" \" + this.height);\r\n\r\n this.loadMode = 2;\r\n\r\n if (this.repaint)\r\n {\r\n for (var i = 0; i < this.repaint.length; ++i)\r\n {\r\n var r = this.repaint[i];\r\n\r\n that.printPage(r.canvas, r.page, r.canvas.cpcOptions);\r\n }\r\n\r\n this.repaint = null;\r\n }\r\n\r\n this.removeEventListener('load', loadedImage);\r\n }", "function loadImage() {\n\tif (fileList.indexOf(fileIndex) < 0) {\n\t\tvar reader = new FileReader();\n\t\treader.onload = (function(theFile) {\n\t\t\treturn function(e) {\n\t\t\t\t// check if positions already exist in storage\n\n\t\t\t\t// Render thumbnail.\n\t\t\t\tvar span = document.getElementById('imageholder');\n\t\t\t\tspan.innerHTML = '<canvas id=\"imgcanvas\"></canvas>';\n\t\t\t\tvar canvas = document.getElementById('imgcanvas')\n\t\t\t\tvar cc = canvas.getContext('2d');\n\t\t\t\tvar img = new Image();\n\t\t\t\timg.onload = function() {\n\t\t\t\t\tcanvas.setAttribute('width', img.width);\n\t\t\t\t\tcanvas.setAttribute('height', img.height);\n\t\t\t\t\tcc.drawImage(img,0,0,img.width, img.height);\n\n scale = 1.0;\n\t\t\t\t\t// check if parameters already exist\n\t\t\t\t\tvar positions = localStorage.getItem(fileList[fileIndex].name)\n\t\t\t\t\tif (positions) {\n\t\t\t\t\t\tpositions = JSON.parse(positions);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// estimating parameters\n\t\t\t\t\t\tpositions = estimatePositions();\n\t\t\t\t\t\tif (!positions) {\n\t\t\t\t\t\t\tclear()\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// put boundary on estimated points\n\t\t\t\t\t\tfor (var i = 0;i < positions.length;i++) {\n\t\t\t\t\t\t\tif (positions[i][0][0] > img.width) {\n\t\t\t\t\t\t\t\tpositions[i][0][0] = img.width;\n\t\t\t\t\t\t\t} else if (positions[i][0][0] < 0) {\n\t\t\t\t\t\t\t\tpositions[i][0][0] = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (positions[i][0][1] > img.height) {\n\t\t\t\t\t\t\t\tpositions[i][0][1] = img.height;\n\t\t\t\t\t\t\t} else if (positions[i][0][1] < 0) {\n\t\t\t\t\t\t\t\tpositions[i][0][1] = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (positions) {\n\t\t\t\t\t\t// render points\n\t\t\t\t\t\trenderPoints(positions, img.width, img.height);\n\t\t\t\t\t\tstoreCurrent();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclear();\n\t\t\t\t\t\tconsole.log(\"Did not manage to detect position of face in this image. Please select position of face by clicking 'manually select face' and dragging a box around the face.\")\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\timg.src = e.target.result;\n\t\t\t};\n\t\t})(fileList[fileIndex]);\n\t\treader.readAsDataURL(fileList[fileIndex]);\n\t}\n\tdocument.getElementById('imagenumber').innerHTML = (fileIndex+1)+\" / \"+fileList.length;\n}", "function imageLoaded() {\n self.framed = self.createFramedImage(self.image, width, height);\n //self.framed = self.image;\n self.object = self.createRendererObject();\n if(self.prepareCallback) {\n self.prepareCallback(true);\n }\n }", "loadImage(srcType, imageSrc, done) {\n // Return the image info if it is already cached\n if (this.isImageLoaded(imageSrc)) {\n this.setTimeout(() => {\n done();\n }, 1);\n return;\n }\n\n const inMemoryImage = new global.Image();\n\n if (this.props.imageCrossOrigin) {\n inMemoryImage.crossOrigin = this.props.imageCrossOrigin;\n }\n\n inMemoryImage.onerror = errorEvent => {\n this.props.onImageLoadError(imageSrc, srcType, errorEvent);\n\n // failed to load so set the state loadErrorStatus\n this.setState(prevState => ({\n loadErrorStatus: { ...prevState.loadErrorStatus, [srcType]: true },\n }));\n\n done(errorEvent);\n };\n\n inMemoryImage.onload = () => {\n this.props.onImageLoad(imageSrc, srcType, inMemoryImage);\n\n this.imageCache[imageSrc] = {\n loaded: true,\n width: inMemoryImage.width,\n height: inMemoryImage.height,\n };\n\n done();\n };\n\n inMemoryImage.src = imageSrc;\n }", "function handleImage(e){\n var reader = new FileReader();\n reader.onload = function(event){\n var img = new Image();\n img.onload = function(){\n if (imageLoaderCallback) {\n \timageLoaderCallback (img);\n }\n // clear the input element so that a new load on the same file will work\n e.target.value = \"\";\n }\n img.src = event.target.result;\n }\n reader.readAsDataURL(e.target.files[0]); \n}", "renderImageOld() { // renderImage\r\n var i = this.image.transferToImageBitmap();\r\n this.resizeOffscreenCanvas();\r\n this.ctx.drawImage(i,0,0,this.image.width, this.image.height);\r\n }", "function displayImage() {\n console.log(Constants.APP_INFO, 'Load image: ', url);\n\n PictureManager.stopLoading();\n\n var bPicture = PictureManager.getBottomPictureObj();\n if (!bPicture) {\n onLoadImageError();\n return;\n }\n\n bPicture.load(url, onLoadImageSuccess, onLoadImageError);\n\n function onLoadImageSuccess() {\n console.log(Constants.APP_INFO, 'onLoadImageSuccess');\n if (!prepareStage.prepared) prepareStage();\n\n /*Here image is fully loaded and displayed*/\n if (hasOrientation) bPicture.rotate(orientation);\n\n Page.thumbnail.display({flag: false});\n Page.loading.display(false);\n\n var tPicture = PictureManager.getTopPictureObj();\n\n Animation.reset(bPicture.getContainer(), tPicture.getContainer());\n\n if (tvApp.slideshow.started) {\n /*\n * AUTO SLIDE\n * It's the only case when we need animation\n */\n if (!tvApp.slideshow.isLoadingPageRequired() &&\n !tvApp.slideshow.custom &&\n Utils.ui.viewManager.getRecentViewInfo().mode == 'photo') {\n PictureManager.animate(bPicture, tPicture);\n /*\n * FIRST SLIDE || NEXT_SLIDE || PREVIOUS_SLIDE\n */\n } else tPicture.hide();\n\n tvApp.slideshow.onSlideLoadComplete();\n } else {\n tPicture.hide();\n }\n\n Utils.ui.viewManager.setView('photo');\n\n var message = {\n \"event\": \"MEDIA_PLAYBACK\",\n \"message\": url,\n \"media_event\": {\"event\": Constants.MediaEvent.MEDIA_LOAD_COMPLETE}\n };\n Utils.sendMessageToSender(message);\n }\n\n /**\n * Function callback at failure.\n *\n * @param {object} e Object details.\n * @param {undefined} Result: displaying an error.\n */\n function onLoadImageError(e) {\n var error = new MediaError();\n console.log(Constants.APP_INFO, 'Load image error callback: ', url);\n console.log(Constants.APP_INFO, 'Load image error: ', e);\n console.log(Constants.APP_INFO, 'Load image: MediaError: ', error);\n\n if (!tvApp.slideshow.started) {\n // Hide whatever page is currently shown.\n $('.page').removeClass('displayed');\n Page.header.display(true);\n Page.message.set(error.description).display()\n }\n\n /* Send messages to Sender app*/\n var message_1 = {\n \"event\": \"ERROR\",\n \"media\": { \"url\": url },\n \"error\": error\n };\n var message_2 = {\n \"event\": \"MEDIA_PLAYBACK\",\n \"message\": url,\n \"media_event\": {\n \"event\": Constants.MediaEvent.MEDIA_ERROR,\n \"code\": error.code,\n \"description\": error.description\n }\n };\n Utils.sendMessageToSender(message_1);\n Utils.sendMessageToSender(message_2);\n }\n }", "function loadImage() {\n\n // image file not loaded yet? => load image file\n if ( !resource ) jQuery( '<img src=\"' + url + '\">' );\n\n // immediate perform success callback\n success();\n\n }", "function ProcessImage(file) {\n $(\"#loading\").css(\"display\", \"block\");\n // Load base64 encoded image\n var reader = new FileReader();\n reader.onload = (function (theFile) {\n return function (e) {\n //loaderOn();\n var img = document.createElement('img');\n var image = null;\n img.src = e.target.result;\n var jpg = true;\n try {\n image = atob(e.target.result.split(\"data:image/jpeg;base64,\")[1]);\n } catch (e) {\n jpg = false;\n }\n if (jpg == false) {\n try {\n image = atob(e.target.result.split(\"data:image/png;base64,\")[1]);\n } catch (e) {\n alert(\"Not an image file Rekognition can process\");\n return;\n }\n }\n //unencode image bytes for Rekognition DetectFaces API\n var length = image.length;\n imageBytes = new ArrayBuffer(length);\n var ua = new Uint8Array(imageBytes);\n for (var i = 0; i < length; i++) {\n ua[i] = image.charCodeAt(i);\n }\n DetectFaces(imageBytes);\n };\n })(file);\n reader.readAsDataURL(file);\n}", "function imageOnLoad() {\n if ($(this).attr('src') == '') return;\n var img = $(this)[0];\n $('#image-preview')[0].appendChild(img);\n $('#image-preview > img').attr('width', '100%');\n var $container = $('#image-exif');\n $container.html('');\n EXIF.getData(img, function() {\n renderExifItem(img, 'DateTimeOriginal', 'Дата создания');\n renderExifItem(img, 'Orientation', 'Ориентация');\n var lat = renderExifItem(img, 'GPSLatitude', 'Широта');\n var long = renderExifItem(img, 'GPSLongitude', 'Долгота');\n lat = formatGPSCoord(lat);\n long = formatGPSCoord(long);\n $.get(`https://geocode-maps.yandex.ru/1.x/?geocode=${lat},${long}&sco=latlong&format=json`, function (data) {\n if (data != undefined && data != null) {\n var found = data.response.GeoObjectCollection.metaDataProperty.GeocoderResponseMetaData.found;\n if (found > 0) {\n var url = `https://yandex.ru/maps/?ll=${long}%2C${lat}&z=12`;\n var text = data.response.GeoObjectCollection.featureMember[0].GeoObject.metaDataProperty.GeocoderMetaData.text;\n $container.append(`<dl><dt>Адрес</dt><dd><a href=\"${url}\" target=\"_blank\">${text}</a></dd></dl>`);\n }\n }\n });\n });\n }", "function loadImage() {\n\t\t\tthis.loading = 'eager';\n\t\t\tif( this.src )\n\t\t\t\tthis.src = this.src;\n\t\t\tif( this.srcset )\n\t\t\t\tthis.srcset = this.srcset;\n\t\t}", "function getDefaultLoaderImage()\n {\n\nvar loader = 'R0lGODlhGAAYAPYAAAAAAP///wwMDFZWVq6urtTU1Ozs7FpaWgICAnR0dOrq6v///xgYGMbGxsjIyBQUFN7e3uDg4BoaGgYGBnh4eA4ODmZmZmhoaLCwsMzMzPj4+PLy8tLS0iYmJkJCQuTk5JaWlhISErS0tNra2qqqqlRUVPb29mJiYh4eHiwsLPDw8IyMjHp6ekpKSn5+fm5ubpycnAgICM7OzjIyMlBQUFxcXJCQkLq6ury8vNjY2MDAwDg4OLa2toCAgKSkpJiYmE5OTubm5iAgIIqKikhISAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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( img )\n {\n if( null == m_activityIndicator ) return; // already loading an image\n if( true == m_disableGallery ) return; // gallery has been disabled\n Logger.log(\"ImageGalleryAdView::rightImageLoaded() - image to the right loaded, beginning scroll\");\n\n disableActivityIndicator();\n m_isLoadingImage = false;\n m_currentTimeOut = 0;\n\n var slate = AssetLoaderInstance.createSlate( img );\n\n m_scrollingImage = slate;\n\n // Innovid requested this value to be ignored\n if( true )//m_galleryUrls[m_currentGalleryIndex].fit == true )\n {\n m_scrollingImage.width = 1920;\n m_scrollingImage.height = 1080;\n }\n\n m_scrollingImage.x = 1920;\n m_scrollingImage.y = (1080 * 0.5) - (m_scrollingImage.height * 0.5);\n m_acceleration = -m_constants.initialVelocity;\n\n m_imageContainer&&m_imageContainer.addChild( m_scrollingImage );\n\n updateText();\n }", "function exifRotate(img) {\n var exif = img._exif;\n\n if (exif && exif.tags && exif.tags.Orientation) {\n switch (img._exif.tags.Orientation) {\n case 1:\n // Horizontal (normal)\n // do nothing\n break;\n\n case 2:\n // Mirror horizontal\n img.mirror(true, false);\n break;\n\n case 3:\n // Rotate 180\n img.rotate(180, false);\n break;\n\n case 4:\n // Mirror vertical\n img.mirror(false, true);\n break;\n\n case 5:\n // Mirror horizontal and rotate 270 CW\n img.rotate(-90, false).mirror(true, false);\n break;\n\n case 6:\n // Rotate 90 CW\n img.rotate(-90, false);\n break;\n\n case 7:\n // Mirror horizontal and rotate 90 CW\n img.rotate(90, false).mirror(true, false);\n break;\n\n case 8:\n // Rotate 270 CW\n img.rotate(-270, false);\n break;\n\n default:\n break;\n }\n }\n\n return img;\n} // parses a bitmap from the constructor to the JIMP bitmap property", "loadImage() {\r\n this.isImageLoaded = false;\r\n this.image = new Image();\r\n this.image.onload = () => {\r\n this.isImageLoaded = true;\r\n this.width = this.image.width;\r\n this.height = this.image.height;\r\n };\r\n this.image.src = \"Graphics/EnemyProjectile.png\";\r\n }", "function startLoadImage() {\n\n if ($(\"#image-zoom\").css(\"display\") == \"none\") {\n $(\"#image-zoom\").show();\n canvas.width = angular.element('#image-zoom').width();\n }\n //check the image load\n angular.element('#image').on('load', resetImage())\n\n //if the image is not loaded \n .on('error', function() {\n //hide the canvas\n angular.element('#canvas').hide();\n\n //disable the buttons\n scope.noImage = true;\n\n //display the image not loaded text\n angular.element('#error-message').show();\n console.log(\"error loading image\");\n });\n }", "_setOriginal(l){l||(this.originalImg=document.createElement('img'),this.originalImg.className='original',this.originalImg.style.opacity=0,this.originalImg.style.maxWidth=`calc(${parseInt(100*Math.abs(this.options.imgPosition.x))}vw - ${this.options.pagemargin}px)`,this.originalImg.style.maxHeight=`calc(${parseInt(100*Math.abs(this.options.imgPosition.y))}vh - ${this.options.pagemargin}px)`,this.originalImg.style.WebkitTransform='translate3d(0,0,0) scale3d(1,1,1)',this.originalImg.style.transform='translate3d(0,0,0) scale3d(1,1,1)',l='',this.previewEl.appendChild(this.originalImg)),this.originalImg.setAttribute('src',l)}", "function _imgLoaded(img) {\n return (\n img.complete &&\n typeof img.naturalWidth !== 'undefined' &&\n img.naturalWidth !== 0\n )\n }", "function uploadImage() {\n const file = buttonLoad.files[0];\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => {\n const img = new Image();\n img.src = reader.result\n image.src = img.src;\n }\n}", "function _loadImages() {\n if (!vm.user) {\n vm.imagePreview = defaultImageUrl\n } else {\n vm.imagePreview = vm.user.imageUrl\n }\n }", "function _onImageLoaded() {\n _imagesToLoad = _imagesToLoad - 1;\n if (!_imagesToLoad) {\n $$log(\"All images loaded, rendering again.\");\n PP64.renderer.render();\n }\n }", "function readURL(input,imageFieldId,displayFieldClassName,isImageTag,isImageSizeCheck,imageWidthValid,imageHeightValid) {\r\n\r\n if (input.files && input.files[0]) {\r\n var reader = new FileReader();\r\n\r\n var flag\t=\t0;\r\n reader.onload = function (e) {\r\n \t\t//Initiate the JavaScript Image object.\r\n \t\tvar image = new Image();\r\n \t\t//Set the Base64 string return from FileReader as source.\r\n \t\timage.src = e.target.result;\r\n \t\t//Validate the File Height and Width.\r\n \t\timage.onload = function () {\r\n \t\t\tvar height = this.height;\r\n \t\t\tvar width = this.width;\r\n \t\t\tif(isImageSizeCheck){\r\n \t\t\tif (height != imageHeightValid) {\r\n \t\t\t\tflag\t=\t1;\r\n \t\t\t\t$(\"#\"+imageFieldId).val('');\r\n \t\t\t\t$(\"#\"+imageFieldId).closest( \".fileupload\" ).fileupload('clear');\r\n \t\t\t\tdisplayMessageBox(\"Error\", getImageFileErrorMessageDimension(\"FILE_SIZE_HEIGHT\",imageWidthValid,imageHeightValid));\r\n \t\t\t\treturn false;\r\n \t\t\t}else if(width != imageWidthValid){\r\n \t\t\t\tflag\t=\t1;\r\n \t\t\t\t$(\"#\"+imageFieldId).val('');\r\n \t\t\t\t$(\"#\"+imageFieldId).closest( \".fileupload\" ).fileupload('clear');\r\n \t\t\t\tdisplayMessageBox(\"Error\", getImageFileErrorMessageDimension(\"FILE_SIZE_WIDTH\",imageWidthValid,imageHeightValid));\r\n \t\t\t\treturn false;\r\n \t\t\t}\r\n \t\t\t}\r\n\t\t\t\tif(height >= width){\r\n \t\t\tif(isImageTag){\r\n \t\t$('.'+displayFieldClassName).css({'max-height':'100%'});\r\n \t\t$('.'+displayFieldClassName).css({'width':'auto'});\r\n \t}else {\r\n \t\t$('.'+displayFieldClassName+' img').css({'max-height':'100%'});\r\n \t\t$('.'+displayFieldClassName+' img').css({'width':'auto'});\r\n \t}\r\n \t\t}else {\r\n \t\t\tif(isImageTag){\r\n \t\t$('.'+displayFieldClassName).css({'max-width':'100%'});\r\n \t\t$('.'+displayFieldClassName).css({'height':'auto'});\r\n \t}else {\r\n \t\t$('.'+displayFieldClassName+' img').css({'max-width':'100%'});\r\n \t\t$('.'+displayFieldClassName+' img').css({'height':'auto'});\r\n \t}\r\n \t\t}\r\n \t\t\t\t\r\n\t \tif(isImageTag){\r\n\t \t\t$('.'+displayFieldClassName).attr('src', e.target.result);\r\n\t \t}else {\r\n\t \t\t$('.'+displayFieldClassName+' img').attr('src', e.target.result);\r\n\t \t}\r\n \t\t};\r\n };\r\n reader.readAsDataURL(input.files[0]);\r\n }\r\n}", "function loadImage(){\n console.log(\"Image clicked one\")\n // self.img.path = self.image.src;\n // console.log(\"Image clicked two\");\n }", "function viewImage(input,viewId,image_width,image_height) \r\n\t{\r\n\r\n\t\tif (input.files && input.files[0]) {\r\n\t\t var reader = new FileReader();\r\n\t\r\n\t\t reader.onload = function (e) {\r\n\t\t $('#'+viewId)\r\n\t\t .attr('src', e.target.result)\r\n\t\t .width(image_width)\r\n\t\t .height(image_height);\r\n\t\t };\r\n\t\t reader.readAsDataURL(input.files[0]);\r\n\t\t}\r\n\t}", "function imageLoad(self, e) {\n\tif (e.id > self.lastLoaded && self.config.showLoadedImages) { // to not have a back and forward hickup… but some images will be skipped\n\t\tself.drawImage(e.id);\n\t\tself.lastLoaded = e.id;\n\t}\n\n\tif (typeof self.config.imageLoad === 'function' ) {\n\t\te.sequencer = self;\n\t\tself.config.imageLoad(e);\n\t}\n\n\tif (typeof self.imageLoad === 'function' ) {\n\t\te.sequencer = self;\n\t\tself.imageLoad(e);\n\t}\n\n\t// The canvas size is determined and set from the first image loaded:\n\tif (e.id === 0) {\n\t\tif(self.config.fitFirstImage) {\n\t\t\tself.size(e.img.width, e.img.height);\n\t\t\tself.config.fitFirstImage = false;\n\t\t}\n\t\tself.drawImage(0);\n\t\tself.current = 0; // TODO: could be better\n\t}\n}", "function loadImage(imageName, imageLocation)\n{\nif (document.images) document.images[imageName].src = imageLocation;\nreturn true;\n}", "load(onFinish = noop) {\n if (this.attempt > this.options.attempt - 1 && this.state.error) {\n if (process.env.NODE_ENV !== 'production' && !this.options.silent) {\n console.log(\"[@vant/lazyload] \" + this.src + \" tried too more than \" + this.options.attempt + \" times\");\n }\n\n onFinish();\n return;\n }\n\n if (this.state.rendered && this.state.loaded) return;\n\n if (this._imageCache.has(this.src)) {\n this.state.loaded = true;\n this.render('loaded', true);\n this.state.rendered = true;\n return onFinish();\n }\n\n this.renderLoading(() => {\n var _this$options$adapter, _this$options$adapter2;\n\n this.attempt++;\n (_this$options$adapter = (_this$options$adapter2 = this.options.adapter).beforeLoad) == null ? void 0 : _this$options$adapter.call(_this$options$adapter2, this, this.options);\n this.record('loadStart');\n loadImageAsync({\n src: this.src,\n cors: this.cors\n }, data => {\n this.naturalHeight = data.naturalHeight;\n this.naturalWidth = data.naturalWidth;\n this.state.loaded = true;\n this.state.error = false;\n this.record('loadEnd');\n this.render('loaded', false);\n this.state.rendered = true;\n\n this._imageCache.add(this.src);\n\n onFinish();\n }, err => {\n !this.options.silent && console.error(err);\n this.state.error = true;\n this.state.loaded = false;\n this.render('error', false);\n });\n });\n }", "function migrateOnLoad () {\r\n\t let nh = MigrImage.naturalHeight;\r\n\t let nw = MigrImage.naturalWidth;\r\n\t try {\r\n\t\tif ((nh > 16) && (nw > 16)) { // Only downscaling .. avoid FF canvas native algo,\r\n\t\t \t\t\t\t\t\t\t // not really good\r\n\t\t try {\r\n\t\t\t// Get ImageData.data of the image\r\n\t\t\tMigrCanvas2.height = nh;\r\n\t\t\tMigrCanvas2.width = nw;\r\n\t\t\tMigrCtx2.drawImage(MigrImage, 0, 0);\r\n\t\t\tlet srcIDData = MigrCtx2.getImageData(0, 0, nw, nh).data;\r\n\r\n\t\t\t// Downscale into MigrImageData\r\n\t\t\tdownscaleImg(srcIDData, MigrIDData, nh, nw);\r\n\r\n\t\t\t// Put MigrImageData into MigrCtx and get base64 uri\r\n\t\t\tMigrCtx.putImageData(MigrImageData, 0, 0);\r\n\t\t\tmigratedUri = MigrCanvas.toDataURL();\r\n\t\t }\r\n\t\t catch (error) {\r\n\t\t\tconsole.log(\"migrateOnLoad error: \"+error.type+\" for \"+migrUri+\" - \"+destBnId+\" - \"+destBn.title);\r\n\t\t\tloop();\r\n\t\t }\r\n\t\t}\r\n\t\telse {\r\n\t\t MigrCtx.clearRect(0, 0, 16, 16);\r\n\t\t MigrCtx.drawImage(MigrImage, 0, 0, 16, 16);\r\n\t\t migratedUri = MigrCanvas.toDataURL();\r\n\t\t}\r\n\r\n\t\t// Save new favicon\r\n\t\tlet BN = curBNList[destBnId];\r\n\t\tBN.faviconUri = migratedUri;\r\n\t\tBN.fetchedUri = true;\r\n\t\tsaveBNList();\r\n\r\n\t\t// Signal to sidebars\r\n\t\tsendAddonMsgFavicon(destBnId, migratedUri);\r\n\t }\r\n\t catch (error) { // Error on rescale, keep original in place, no change\r\n\t\tconsole.log(\"migrateOnLoad error: \"+error);\r\n\t }\r\n\r\n\t // Next iteration\r\n\t loop();\r\n\t}", "function firstImageLoaded( img )\n {\n This.widget.getAnalytics().fireOpenSlate();\n\n if( true == m_disableGallery ) return;\n Logger.log(\"ImageGalleryAdView::firstImageLoaded() - first image of the gallery loaded, gallery will now open\");\n\n m_isLoadingImage = false;\n m_currentTimeOut = 0;\n disableActivityIndicator();\n\n var slate = AssetLoaderInstance.createSlate( img );\n m_currentImage = slate;\n\n // Innovid requested this value to be ignored\n if( true )//m_galleryUrls[m_currentGalleryIndex].fit == true )\n {\n m_currentImage.width = 1920;\n m_currentImage.height = 1080;\n }\n m_currentImage.y = (1080 * 0.5) - (m_currentImage.height * 0.5);\n m_currentImage.x = (1920 * 0.5) - (m_currentImage.width * 0.5);\n\n m_imageContainer&&m_imageContainer.addChild( m_currentImage );\n\n disablePlaceHolder();\n showControls();\n updateText();\n }", "uploadImage(e) {\n const { onUpload } = this.props;\n let file = e.target.files[0]\n this.orientImage(file, (src) => {\n onUpload({\n file,\n name: file.name,\n src\n })\n });\n }", "function imageIsLoaded(e) {\n $('#img-profile').attr('src', e.target.result);\n }", "load() {\n if (this.state == TileState.ERROR) {\n this.state = TileState.IDLE;\n this.image_ = new Image();\n if (this.crossOrigin_ !== null) {\n this.image_.crossOrigin = this.crossOrigin_;\n }\n }\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n this.tileLoadFunction_(this, this.src_);\n this.unlisten_ = listenImage(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this)\n );\n }\n }", "function imageLoaded() {\n\timageYetToLoad--;\n}", "function resetOrientation(srcBase64, srcOrientation, callback) {\n console.log(\"Transforming image, please wait\");\n var img = new Image();\n\n img.onload = function() {\n var width = img.width,\n height = img.height,\n canvas = document.createElement('canvas'),\n ctx = canvas.getContext(\"2d\");\n\n // set proper canvas dimensions before transform & export\n if (4 < srcOrientation && srcOrientation < 9) {\n canvas.width = height;\n canvas.height = width;\n } else {\n canvas.width = width;\n canvas.height = height;\n }\n\n // transform context before drawing image\n switch (srcOrientation) {\n case 2:\n ctx.transform(-1, 0, 0, 1, width, 0);\n break;\n case 3:\n ctx.transform(-1, 0, 0, -1, width, height);\n break;\n case 4:\n ctx.transform(1, 0, 0, -1, 0, height);\n break;\n case 5:\n ctx.transform(0, 1, 1, 0, 0, 0);\n break;\n case 6:\n ctx.transform(0, 1, -1, 0, height, 0);\n break;\n case 7:\n ctx.transform(0, -1, -1, 0, height, width);\n break;\n case 8:\n ctx.transform(0, -1, 1, 0, 0, width);\n break;\n default:\n break;\n }\n\n // draw image\n ctx.drawImage(img, 0, 0);\n\n // export base64\n callback(canvas.toDataURL());\n };\n\n img.src = srcBase64;\n}", "function onPhotoDataSuccess(imageData) {\n var smallImage = document.getElementById('foto1');\n smallImage.style.display = 'table-cell';\n smallImage.src = imageData;\n\t//file1= imageData;\n\tfoto1 = true;\n\tmovePic(imageData);\n}", "function loadImg() {\n\t\tif (!showedImage.loaded) {\n\t\t\tloading.show();\n\t\t}\n\t\tconst successFunction = function() {\n\t\t\tshowedImage.loaded = true;\n\t\t\tif (!isClosed) {\n\t\t\t\tshow(this);\n\t\t\t\tfor (let j = 1; multi && j <= preloadedImages; j++) preloadImg(j);\n\t\t\t}\n\t\t};\n\t\tlet img;\n\t\tif (showedImage.type === Types.IMAGE) {\n\t\t\timg = new Image();\n\t\t\timg.onload = successFunction;\n\t\t\timg.onerror = function() {\n\t\t\t\tshowedImage.loaded = true;\n\t\t\t\tif (!isClosed) {\n\t\t\t\t\tshow(false);\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\timg = document.createElement(\"video\");\n\t\t\timg.oncanplay = successFunction;\n\t\t}\n\t\tisLoading = true;\n\t\timg.src = showedImage.href;\n\t}", "onFilenameChanged() {\nthis.loadImage();\n}", "function ImageHelper() { }", "function validateImg(ctrl) {\n var fileUpload = ctrl;\n var regex = new RegExp(\"([a-zA-Z0-9\\s_\\\\.\\-:])+(.jpeg|.jpg|.png|.gif)$\");\n if (regex.test(fileUpload.value.toLowerCase())) {\n if (typeof (fileUpload.files) != \"undefined\") {\n var reader = new FileReader();\n reader.readAsDataURL(fileUpload.files[0]);\n reader.onload = function (e) {\n var image = new Image();\n image.src = e.target.result;\n image.onload = function () {\n var height = this.height;\n var width = this.width;\n if (height == 680 && width == 1020) {\n // alert(\"Ảnh hợp lệ.\");\n return true;\n } else {\n fileUpload.value = null;\n alert(\"Ảnh không đúng kích thước 1020 x 680 !\");\n return false;\n }\n };\n }\n } else {\n alert(\"Trình duyệt của bạn không hỗ trợ HTML5.\");\n return false;\n }\n } else {\n alert(\"Hãy chọn đúng định dạng file ảnh.\");\n return false;\n }\n}", "function onPhotoURISuccess(imageURI) {\r\n $.mobile.changePage(\"#page-upload\", \"fade\");\r\n\t// Get image handle\r\n\t$(\"#rotateButtonU\").show();\r\n\tvar largeImage = document.getElementById('largeImage');\r\n \r\n\t// Unhide image elements\r\n\tlargeImage.style.display = 'block';\r\n \r\n\t// Show the captured photo\r\n\t// The inline CSS rules are used to resize the image\r\n\tlargeImage.src = imageURI;\r\n\tvar editImage = document.getElementById('editImage');\r\n \r\n\t// Unhide image elements\r\n\teditImage.style.display = 'block';\r\n \r\n\t// Show the captured photo\r\n\t// The inline CSS rules are used to resize the image\r\n\teditImage.src = imageURI;\r\n \r\n $(\"#twitteridhidden\").val(imageURI);\r\n$('#capturebuttons').hide();\r\n\t\r\n \r\n }", "function loadImage(filename, index) {\r\n var imageObj = new Image();\r\n imageObj.onload = function () {\r\n var img = document.getElementById(\"imagesgohere\");\r\n img.setAttribute('src', this.src);\r\n };\r\n imageObj.src = \"data/\" + filename;\r\n }", "function preImage(input) {\n if (input.files && input.files[0]) {\n var reader = new FileReader();\n\n reader.onload = function (e) {\n\n $('#blah').attr('src', e.target.result);\n };\n\n reader.readAsDataURL(input.files[0]);\n }\n}", "function displayCoverImage(id) {\n var imageSection;\n var myImage = document.getElementById(id);\n var myWidth = myImage.width;\n\n if (myWidth == 0) {\n imageSection = {\n text: \"\",\n width: 0,\n height: 0\n }\n } \n else \n {\n\n if (checkImage(id) >= 0)\n {\n //console.log('reload');\n var canvas = document.createElement(\"canvas\");\n canvas.width = myImage.naturalWidth;\n canvas.height = myImage.naturalHeight;\n var ctx = canvas.getContext(\"2d\");\n ctx.drawImage(myImage,0,0);\n var src = canvas.toDataURL(\"image/png\");\n \n imageSection = {\n image:src,\n height: 225,\n width: 225\n }\n }\n else{\n //console.log('just upload');\n imageSection = {\n image: myImage.src,\n width: 225,\n height: 225\n }\n }\n\n }\n return imageSection;\n}", "function imageLoader(event) {\n displayImage(event)\n previewFile()\n}", "function onPhotoDataSuccess2(imageData) {\n var smallImage = document.getElementById('foto2');\n smallImage.style.display = 'table-cell';\n smallImage.src = imageData;\n\t//file1= imageData;\n\tfoto2 = true;\n\tmovePic(imageData);\n}", "function readImage(file) {\n elPreview.innerHTML = \"\";\n var reader = new FileReader();\n reader.addEventListener(\"load\", function () {\n var image = new Image();\n image.addEventListener(\"load\", function () {\n if (file.size > 2048576) {\n elPreview.innerHTML += \"Foto mag niet groter zijn dan 2MB </br>\";\n enabledisable.disabled = true;\n }\n if (image.width !== 100 || image.height !== 100) {\n elPreview.innerHTML += \"De foto moet 100 x 100 pixels groot zijn </br>\";\n enabledisable.disabled = true;\n }\n if (elPreview.innerHTML == \"\") {\n enabledisable.disabled = false;\n }\n });\n image.src = useBlob ? window.URL.createObjectURL(file) : reader.result;\n if (useBlob) {\n window.URL.revokeObjectURL(file);\n }\n });\n reader.readAsDataURL(file);\n}", "function handleLoading(img, src, layout, placeholder, onLoadingComplete) {\n if (!img) {\n return;\n }\n\n var handleLoad = function handleLoad() {\n if (!img.src.startsWith('data:')) {\n var p = 'decode' in img ? img.decode() : Promise.resolve();\n p[\"catch\"](function () {}).then(function () {\n if (placeholder === 'blur') {\n img.style.filter = 'none';\n img.style.backgroundSize = 'none';\n img.style.backgroundImage = 'none';\n }\n\n loadedImageURLs.add(src);\n\n if (onLoadingComplete) {\n var naturalWidth = img.naturalWidth,\n naturalHeight = img.naturalHeight; // Pass back read-only primitive values but not the\n // underlying DOM element because it could be misused.\n\n onLoadingComplete({\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight\n });\n }\n\n if (true) {\n var ref;\n\n if ((ref = img.parentElement) === null || ref === void 0 ? void 0 : ref.parentElement) {\n var parent = getComputedStyle(img.parentElement.parentElement);\n\n if (layout === 'responsive' && parent.display === 'flex') {\n console.warn(\"Image with src \\\"\".concat(src, \"\\\" may not render properly as a child of a flex container. Consider wrapping the image with a div to configure the width.\"));\n } else if (layout === 'fill' && parent.position !== 'relative') {\n console.warn(\"Image with src \\\"\".concat(src, \"\\\" may not render properly with a parent using position:\\\"\").concat(parent.position, \"\\\". Consider changing the parent style to position:\\\"relative\\\" with a width and height.\"));\n }\n }\n }\n });\n }\n };\n\n if (img.complete) {\n // If the real image fails to load, this will still remove the placeholder.\n // This is the desired behavior for now, and will be revisited when error\n // handling is worked on for the image component itself.\n handleLoad();\n } else {\n img.onload = handleLoad;\n }\n}", "function avatar_preview(e){\n var maxWidth = 0;\n var maxHeight = 0;\n var size_gap = 0;\n var img = $(\"#avatar_file\").val().toString().split(\"\\\\\");\n img = img[img.length - 1].split(\".\");\n\n var ext = img[img.length - 1].toUpperCase();\n var imgFile = this.files;\n\n if(imgFile == undefined || imgFile.length == 0)\n return false;\n\n imgFile = this.files[0];\n var imgFileType = imgFile.type;\n var match = [\"image/jpeg\", \"image/png\", \"image/jpg\", \"image/gif\"];\n\n if(!((imgFileType == match[0]) || (imgFileType == match[1]) || (imgFileType == match[2]))){\n alert(\"Type file \" + ext + \" not supported\");\n return false;\n }else{\n if(imgFile.size > 5168000){\n alert(\"File dimension exceeded\");\n return false;\n }\n var reader = new FileReader();\n reader.onload = function(event) {\n var src = event.target.result;\n var newImg = $('<img id=avatar_fake src=\"' + src + '\" style=\"display:none;\">');\n\n $(\"#avatar_fake\").replaceWith(newImg);\n newImg.on('load', function() {\n maxWidth = 1280;\n maxHeight = 1280;\n size_gap = newImg.outerWidth() - newImg.outerHeight();\n if(newImg.outerWidth() > maxWidth || newImg.outerHeight() > maxHeight || size_gap < 0 || size_gap > 100){\n alert(\"Image dimension not allowed. The image must be as square as possible.\");\n return false;\n }else{\n avatar_upload(imgFile);\n $(\"#avatar_img\").attr(\"src\", src);\n }\n });\n };\n reader.onerror = function(event) {\n alert(\"ERROR TYPE: \" + event.target.error.code);\n };\n reader.readAsDataURL(imgFile);\n }\n}", "function rightImageLoadError( msg )\n {\n Logger.log(\"ImageGalleryAdView::rightImageLoadError() - \" + msg);\n disableGallery(\"image load failure\");\n m_isLoadingImage = false;\n m_currentTimeOut = 0;\n }", "function encodeIMG() {\n if ($('#fileIMG').prop('files')[0]) {\n var imgFile = $('#fileIMG').prop('files')[0];\n if (imgFile.size >= 2000000) {\n $('.error').text(\n 'Your image is larger than 2mb! Please upload a smaller image.'\n );\n }\n var reader = new FileReader();\n reader.onloadend = function () {\n $('.file1').remove();\n $('<img>')\n .attr('src', reader.result)\n .attr('alt', 'User Image')\n .attr('id', 'preview1')\n .attr('class', 'file1')\n .appendTo($('.imgdisplay')); // displays image on site\n imgResult = reader.result; // base64 conversion result\n return imgResult;\n };\n reader.readAsDataURL(imgFile); // Takes the file and converts the data to base64\n }\n}", "uploadCustomImg(canvas) {\n document.getElementById('imgLoader').onchange = function handleImage(e) {\n var reader = new FileReader();\n reader.onload = function (event) {\n\n var imgObj = new Image();\n imgObj.src = event.target.result;\n imgObj.onload = function () {\n // start fabricJS stuff\n\n var image = new fabric.Image(imgObj);\n image.set({\n left: 0,\n top: 0,\n angle: 20,\n padding: 10,\n cornersize: 10\n });\n //image.scale(getRandomNum(0.1, 0.25)).setCoords();\n canvas.add(image);\n\n // end fabricJS stuff\n }\n\n }\n reader.readAsDataURL(e.target.files[0]);\n };\n }", "function _loadImage(anchor) {\n\t\t// set metadata\n\t\tvar meta = settings.metadata(anchor);\n\t\tif (meta) {\n\t\t\tviewercontent.append($.inArray($.type(meta), ['boolean','number','string']) >= 0 ? meta : meta.clone());\n\t\t}\n\n\t\t// display image when image has been loaded, src must be initialized last for some browsers\n\t\tviewerimage.removeClass(CLASS_UNAVAILABLE);\n\t\t$(preloader = new Image()).load(refreshItem).error(_prepareText).attr('src', anchor.attr('href'));\n\t}", "function loadImage(data){\n // encode into base64\n var uint8Arr = new Uint8Array(data.buffer);\n var binary = '';\n for (var i = 0; i < uint8Arr.length; i++) {\n binary += String.fromCharCode(uint8Arr[i]);\n }\n var base64String = window.btoa(binary);\n var img = new Image();\n // load image\n img.onload = function () {\n context.drawImage(img, 0, 0);\n };\n \n img.src = 'data:image/jpeg;base64,' + base64String;\n\n console.log('Image loaded');\n }", "_getOriginalImage(file) {\n const urlBlob = URL.createObjectURL(file);\n const image = new Image();\n const deferred = new Defer();\n\n image.onload = () => {\n deferred.resolve(image);\n };\n\n image.onerror = () => {\n deferred.reject('image load error');\n };\n\n image.src = urlBlob;\n\n return deferred.promise;\n }", "function show_image(input) {\n if (input.files && input.files[0]) {\n var reader = new FileReader();\n\n reader.onload = function (e) {\n $('#profile_img_edit_profile_page').attr('src', e.target.result);\n\n // $('.profile_image').Jcrop({\n // // onselect: updateCoords,\n // bgOpacity: .4,\n // setSelect: [100, 100, 50, 50],\n // aspectRatio: 1/1\n // });\n };\n\n reader.readAsDataURL(input.files[0]);\n $('#save_changes').css({ \"visibility\": \"visible\" });\n }\n}", "function onPhotoDataSuccess(imageURI) {\r\n\t\t$.mobile.changePage(\"#page-upload\", \"fade\");\r\n\t//alert(\"Your photo was taken successfully.\");\r\n\t// Get image handle\r\n\t$(\"#rotateButtonU\").show();\r\n\tvar largeImage = document.getElementById('largeImage');\r\n \r\n\t// Unhide image elements\r\n\tlargeImage.style.display = 'block';\r\n \r\n\t// Show the captured photo\r\n\t// The inline CSS rules are used to resize the image\r\n\tlargeImage.src = imageURI;\r\n\t\tvar editImage = document.getElementById('editImage');\r\n \r\n\t// Unhide image elements\r\n\teditImage.style.display = 'block';\r\n \r\n\t// Show the captured photo\r\n\t// The inline CSS rules are used to resize the image\r\n\teditImage.src = imageURI;\r\n \r\n $(\"#twitteridhidden\").val(imageURI);\r\n\t $('#capturebuttons').hide();\t\t\t\r\n }", "loadImg() {\n let loadedCount = 0\n function onLoad() {\n loadedCount++\n if (loadedCount >= this.imgPaths.length) {\n this.flowStart()\n }\n }\n this.baseImages = this.imgPaths.map(path => {\n const image = new Image()\n image.onload = onLoad.bind(this)\n image.src = path\n return image\n })\n }", "function imageOk(img) {\n // During the onload event, IE correctly identifies any images that\n // weren't downloaded as not complete. Others should too. Gecko-based\n // browsers act like NS4 in that they report this incorrectly.\n if (!img.complete) {\n return false;\n }\n // However, they do have two very useful properties: naturalWidth and\n // naturalHeight. These give the true size of the image. If it failed\n // to load, either of these should be zero.\n if (typeof img.naturalWidth !== \"undefined\" && img.naturalWidth === 0) {\n return false;\n }\n // No other way of checking: assume it's ok.\n return true;\n }", "function imgLoader(el) {\n\t\t\t\t\tif ($(el).hasClass(classes[2])) {\n\t\t\t\t\t\tdoUpd();return;\n\t\t\t\t\t}\n\t\t\t\t\tvar img = new Image();\n\t\t\t\t\tfunction createDelegate(contextObject, delegateMethod) {\n\t\t\t\t\t\treturn function () {\n\t\t\t\t\t\t\treturn delegateMethod.apply(contextObject, arguments);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tfunction imgOnLoad() {\n\t\t\t\t\t\tthis.onload = null;\n\t\t\t\t\t\t$(el).addClass(classes[2]);\n\t\t\t\t\t\tdoUpd(2);\n\t\t\t\t\t}\n\t\t\t\t\timg.onload = createDelegate(img, imgOnLoad);\n\t\t\t\t\timg.src = el.src;\n\t\t\t\t}", "function loadImage(event) {\n user_photo.attr('src', event.target.result);\n}", "function onPhotoDataSuccess(imageURI){\n var smallImage = document.getElementById('smallImage');\n smallImage.style.display = 'block';\n smallImage.src = imageURI;\n movePic(imageURI);\n}", "function readImage(input)\n { \n if (input.files && input.files[0])\n { \n var reader = new FileReader(); \n\t reader.onload = function (e) { \n $('#imageUpload').attr('src',e.target.result); // setting ur image here\t\t\n\t }; \t\t\t\t\t\t\t \n reader.readAsDataURL(input.files[0]); // Read in the image file as a data URL. \t\t\t} \t\t\n }\n }", "onImageLoaded(image) {\n\n this.imageRef = image;\n\n }", "function image_loader_three() {\n let mid_left_img_three = new Image();\n mid_left_img_three.onload = function(){\n ml_three.style.backgroundImage = this.src;\n b_three = true;\n console.log(\"Image three loaded!\");\n image_loader_all_checker();\n };\n mid_left_img_three.src = dir + '003_m.jpg';\n}", "loadImage(img) {\n // abort operations if componente was unmounted\n if (this._.componentUnmounted) return;\n // set as background image\n this._.backgroundImg = img;\n this._.imageLoaded = true;\n // clear all previous labels\n this.removeAllLabels();\n // refresh GUI\n this.refreshCanvases();\n }", "function preloadImage(img){ /* everytime this is called by the observer/else statement \n it will get the img and look for the data-src, or full pic reference to load*/\n const src = img.getAttribute('data-src');\n if(!src) {\n return;\n }\n img.src = src;/* set the src to the data-src, so that the img.src will be replaced with the data-src.*/\n img.removeAttribute('data-src');\n}", "function loadImage() {\n if (options.ShowImage == true) {\n $('#divFullImage').html('<img id=\"loadImage\" src=\"' + $img + '\" alt=\"Image\"/>')\n $('#divPreviewImage').html('<img src=\"' + $img + '\"></img>');\n }\n }", "function imageIsLoaded(image) {\n if (image != null && image.complete()) {\n return true;\n }\n else {\n alert(\"Image not ready.\");\n return false;\n }\n}", "setupOriginalImage() {\n if (isBlank(get(this, 'imageUrl'))) {\n const originalImage = get(this, 'image.originalImageFile');\n if (originalImage) {\n this.setupImage(originalImage);\n }\n }\n }", "function loadImg(event) {\n var img = document.getElementById('avt-img');\n img.src = URL.createObjectURL(event.target.files[0]);\n file = event.target.files[0];\n}", "function preload() {\n img = loadImage(\"download.jpg\");\n}", "function loadImage(idOfDiv,Image){\n $(idOfDiv).attr('src', Image)\n .on('load', function() {\n if (!this.complete || typeof this.naturalWidth == \"undefined\" || this.naturalWidth == 0) {\n $(\"#commonError\").slideDown(\"slow\");\n setTimeout('$(\"#commonError\").slideUp(\"slow\")',1500);\n } else {\n }\n });\n}", "loadImage (srcType, imageSrc, done) {\n // Return the image info if it is already cached\n if (this.isImageLoaded(imageSrc)) {\n this.setTimeout(() => {\n done()\n }, 1)\n return\n }\n\n const that = this\n const inMemoryImage = new Image()\n\n inMemoryImage.onerror = (errorEvent) => {\n this.props.onImageLoadError(imageSrc, srcType, errorEvent)\n done(errorEvent)\n }\n\n inMemoryImage.onload = function onLoad () {\n that.imageCache[imageSrc] = {\n loaded: true\n , width: this.width\n , height: this.height\n }\n\n done()\n }\n\n inMemoryImage.src = imageSrc\n }" ]
[ "0.7144427", "0.6631277", "0.645808", "0.6393823", "0.6194077", "0.60488397", "0.59705955", "0.59705955", "0.59020543", "0.5868273", "0.5816981", "0.58118296", "0.58105105", "0.5767477", "0.57385", "0.57257855", "0.5700381", "0.5699242", "0.5688993", "0.5681487", "0.5679571", "0.5674024", "0.56686443", "0.56059873", "0.559824", "0.55882937", "0.5583826", "0.5576911", "0.5568084", "0.5545107", "0.54932487", "0.54893225", "0.5473501", "0.54677486", "0.54601914", "0.54458094", "0.542319", "0.54118055", "0.5410016", "0.5408964", "0.54069084", "0.5397695", "0.539592", "0.5391639", "0.5374515", "0.53653586", "0.5364046", "0.5359613", "0.5359591", "0.53550977", "0.5352522", "0.53460586", "0.53431946", "0.5339588", "0.533946", "0.533843", "0.53337395", "0.533064", "0.5329575", "0.5327111", "0.5320291", "0.5317899", "0.53023106", "0.5299001", "0.5295119", "0.5288147", "0.5287527", "0.5269997", "0.5269184", "0.5269178", "0.52684265", "0.5266227", "0.5259445", "0.52530974", "0.5252785", "0.5251467", "0.5243898", "0.5242427", "0.5240345", "0.52399015", "0.5236561", "0.5235385", "0.52330714", "0.5228764", "0.522607", "0.5225291", "0.5224193", "0.52236277", "0.52235574", "0.5222109", "0.5219546", "0.5218863", "0.52168864", "0.52168334", "0.5215418", "0.5214156", "0.52110004", "0.5208712", "0.52070624", "0.52067107" ]
0.687945
1
Passes the uploaded file object as well as a base 64 of the image to the onUpload callback
uploadImage(e) { const { onUpload } = this.props; let file = e.target.files[0] this.orientImage(file, (src) => { onUpload({ file, name: file.name, src }) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleFile(e) {\n const reader = new FileReader();\n const file = e.target.files[0];\n\n if (!file) return;\n\n //useful for debugging base64 to images http://codebeautify.org/base64-to-image-converter\n reader.onload = function () {\n this.setState({\n cropperOpen: true,\n uploadedImage: reader.result\n });\n }.bind(this);\n reader.readAsDataURL(file);\n }", "handleImageChange(e) {\n alert(e.target.files[0]);\n this.getBase64(e.target.files[0], (base64) => {\n this.setState({ Base64Image: base64 });\n this.image = base64;\n })\n }", "function upload_image()\n{\n\n const file = document.querySelector('input[type=file]').files[0];\n //const reader = new FileReader();\n send_request_and_receive_payload(file)\n\n\n/*\n reader.addEventListener(\"load\", () => {\n\tsend_request_and_receive_payload(reader.result);\n });\n\n if (file) {\n\treader.readAsDataURL(file);\n }\n*/\n\n}", "imageUpload (e) {\n let imgData = e.target.files[0];\n let imageExt = imgData ? imgData.type : '';\n let imageSize = imgData ? imgData.size : '';\n\n const reader = new FileReader();\n\n if(imgData){\n reader.onload = (() => {\n return e => {\n const previewSrc = e.target.result;\n console.log(previewSrc);\n this.props.dispatch(setUserDataImage({imageVal: previewSrc}));\n }\n })(imgData);\n reader.readAsDataURL(imgData);\n this.props.dispatch(setUserDataImageAsObject(imgData));\n }\n\n let dispatchObj = {\n imgData,\n status: null,\n imageValid: true,\n show: false\n }\n\n if(!imgData){\n dispatchObj.imgData = '';\n dispatchObj.imageValid = false;\n } else if(!(this.allowedExts.includes(imageExt)) || !(imageSize>MIN_SIZE || imageSize<MAX_SIZE)){\n dispatchObj.status = \"error\";\n dispatchObj.imageValid = false;\n dispatchObj.show = true\n }\n\n \n\n return this.props.dispatch(validateImage(dispatchObj));\n }", "function uploadFiles (event) {\n event.preventDefault(); // Prevent the default form post\n\n // Grab the file and asynchronously convert to base64.\n var file = $('#fileform [name=fileField]')[0].files[0];\n console.log(file);\n var reader = new FileReader();\n reader.onloadend = processFile;\n reader.readAsDataURL(file);\n}", "fileChangeHandler(event){\n const file = event.target.files[0]\n this.getBase64(file).then( (fileString) => {\n const formState = Object.assign({}, this.state.form)\n formState.avatar_base = fileString\n this.setState({form: formState})\n })\n }", "fileChangeHandler(event){\n const file = event.target.files[0]\n this.getBase64(file).then( (fileString) => {\n const formState = Object.assign({}, this.state.form)\n formState.avatar_base = fileString\n this.setState({form: formState})\n })\n }", "function base64(file, callback){\n var coolFile = {};\n function readerOnload(e){\n var base64 = btoa(e.target.result);\n coolFile.base64 = base64;\n callback(coolFile)\n };\n\n var reader = new FileReader();\n reader.onload = readerOnload;\n\n var file = file[0].files[0];\n coolFile.filetype = file.type;\n coolFile.size = file.size;\n coolFile.filename = file.name;\n reader.readAsBinaryString(file);\n}", "fileChangeHandler(event){\n const file = event.target.files[0]\n this.getBase64(file).then( (fileString) => {\n const formState = Object.assign({}, this.state.form)\n formState.photo_base = fileString\n this.setState({form: formState})\n })\n }", "function UploadImage({ setBaseImage }) {\n // const { userPersistido } = useAuth();\n\n const uploadImage = async (e) => {\n const file = e.target.files[0];\n const base64 = await convertBase64(file); \n setBaseImage(base64);\n };\n\n const convertBase64 = (file) => {\n return new Promise((resolve, reject) => {\n const fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n\n fileReader.onload = () => {\n resolve(fileReader.result);\n };\n\n fileReader.onerror = (error) => {\n reject(error);\n };\n });\n };\n\n return (\n <div>\n <label className=\"label-arquivo\" htmlFor=\"arquivo\">Selecione a imagem do produto</label>\n <input\n type=\"file\"\n name=\"arquivo\"\n id=\"arquivo\"\n accept=\"image/*\"\n onChange={(e) => {\n uploadImage(e);\n }}\n />\n </div>\n );\n}", "async handleImageUpload(file) {\n const fd = new FormData();\n fd.append('upload_preset', CLOUDINARY_UPLOAD_PRESET);\n fd.append('tags', 'browser_upload'); // Optional - add tag for image admin in Cloudinary\n fd.append('file', file);\n\n try {\n const response = await axios.post(\n CLOUDINARY_UPLOAD_URL,\n fd,\n {\n onUploadProgress: (progressEvent) => {\n const progress = Math.round((progressEvent.loaded * 100.0) / progressEvent.total);\n\n this.setState({\n uploadProgressShow: true,\n uploadProgress: progress,\n });\n },\n }\n );\n\n this.setState({\n uploadedFileCloudinaryID: response.data.public_id,\n uploadedFileCloudinaryUrl: response.data.secure_url,\n uploadProgress: 0,\n uploadProgressShow: false,\n deletedCurrentImage: false,\n });\n } catch (error) {\n this.handleUpdateError(error);\n }\n }", "function imageUpload(e) {\n var reader = new FileReader();\n reader.onload = async function (event) {\n var imgObj = await new Image();\n imgObj.src = await event.target.result;\n setImage([...getImage, imgObj.src]);\n };\n let p = e.target.files[0];\n\n reader.readAsDataURL(p);\n }", "function uploadImage(base64) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => {\n cloudinary.v2.uploader.upload(base64, function (err, result) {\n if (err)\n console.log(err);\n resolve(result);\n });\n });\n });\n}", "static base64(file, callback){\n const reader = new FileReader();\n reader.onload = function(event){\n callback(event.target.result, file);\n }\n reader.readAsDataURL(file);\n }", "handleUpload(evt) {\n if(evt.target.files && evt.target.files[0]) {\n this.readFile(evt.target.files[0])\n .then(this.renderDummyImage)\n .then(this.updateImageState);\n }\n }", "handleImageChange(file) {\n const {setMedia} = this.props;\n const reader = new FileReader();\n reader.onloadend = () => {\n setMedia({\n source: reader.result,\n fileName: file.name\n });\n }\n reader.readAsDataURL(file);\n // Begin upload process\n this.props.uploadMedia(file);\n }", "function handleUpload(event) {\n setFile(event.target.files[0]);\n \n // Add code here to upload file to server\n // ...\n }", "function handleUpload(event) {\n setFile(event.target.files[0]);\n \n // Add code here to upload file to server\n // ...\n }", "async function handleImageUpload(event) {\n\t\tconst imageFile = event.target.files[0];\n\n\t\tconsole.log('originalFile instanceof Blob', imageFile instanceof Blob); // true\n\t\tconsole.log(`originalFile size ${imageFile.size / 1024 / 1024} `);\n\n\t\tconst options = {\n\t\t\tmaxSizeMB: 0.1,\n\t\t\tmaxWidthOrHeight: 1920,\n\t\t\tuseWebWorker: true\n\t\t};\n\t\ttry {\n\t\t\tconst compressedFile = await imageCompression(imageFile, options);\n\t\t\tlet imgBlobToFile = new File([ compressedFile ], imageFile.name, {\n\t\t\t\tlastModified: Date.now(),\n\t\t\t\ttype: 'image/jpeg'\n\t\t\t});\n\t\t\tsetUploadPhoto(imgBlobToFile);\n\n\t\t\tconsole.log('compressedFile instanceof Blob', uploadPhoto instanceof Blob); // true\n\t\t\tconsole.log(`compressedFile size ${uploadPhoto.size / 1024 / 1024} MB`); // smaller than maxSizeMB\n\n\t\t\t// await uploadToServer(compressedFile); // write your own logic\n\t\t\tconsole.log(uploadPhoto);\n\t\t\tconsole.log('uploaded successfully');\n\t\t} catch (error) {\n\t\t\tconsole.log(error);\n\t\t}\n\t}", "function uploadFiles (event) {\n event.preventDefault(); // Prevent the default form post\n\n // Grab the file and asynchronously convert to base64.\n var file = $('#fileform [name=fileField]')[0].files[0];\n var reader = new FileReader();\n reader.onloadend = processFile;\n reader.readAsDataURL(file);\n}", "handleImgUpload(e){\n // get the file off of the submit event\n var files = e.target.files,\n file;\n\n if (!this.validFile(files[0].name)) {\n this.setState({\n error: 'Supported File Types: JPEG, TIFF, BMP'\n })\n return;\n }\n\n if (files && files.length > 0) {\n\n file = files[0];\n\n this.setState({\n file: file,\n loading: true,\n tags: [],\n error: '',\n })\n\n try {\n // Get window.URL object\n var URL = window.URL || window.webkitURL;\n const imgURL = URL.createObjectURL(file);\n\n this.setState({\n imgURL: imgURL\n })\n // send the image as a message\n this.props.addMessage(['you', imgURL, true]);\n\n const fileReader = new FileReader()\n fileReader.readAsDataURL(file)\n // you only have access to the read file inside of this callback(?)function\n fileReader.onload = () => {\n\n const imgBytes = fileReader.result.split(',')[1]\n this.useClarifaiAPI(imgBytes)\n }\n }\n catch (err) {\n try {\n // Fallback if createObjectURL is not supported\n var fileReader = new FileReader();\n fileReader.onload = function (event) {\n this.setState({\n imgURL: event.target.result,\n })\n };\n fileReader.readAsDataURL(file);\n }\n catch (err) {\n // Display error message\n\n }\n }\n }\n }", "uploadFile(e) {\n // get the file and send\n const selectedFile = this.postcardEle.getElementsByTagName(\"input\")[0].files[0];\n const formData = new FormData();\n formData.append('newImage', selectedFile, selectedFile.name);\n // build a browser-style HTTP request data structure\n const xhr = new XMLHttpRequest();\n xhr.open(\"POST\", \"/upload\", true);\n xhr.addEventListener('loadend', (e) => {\n this.onImageLoad(e, xhr);\n });\n xhr.send(formData);\n }", "function encodeIMG() {\n if ($('#fileIMG').prop('files')[0]) {\n var imgFile = $('#fileIMG').prop('files')[0];\n if (imgFile.size >= 2000000) {\n $('.error').text(\n 'Your image is larger than 2mb! Please upload a smaller image.'\n );\n }\n var reader = new FileReader();\n reader.onloadend = function () {\n $('.file1').remove();\n $('<img>')\n .attr('src', reader.result)\n .attr('alt', 'User Image')\n .attr('id', 'preview1')\n .attr('class', 'file1')\n .appendTo($('.imgdisplay')); // displays image on site\n imgResult = reader.result; // base64 conversion result\n return imgResult;\n };\n reader.readAsDataURL(imgFile); // Takes the file and converts the data to base64\n }\n}", "function processFile (event) {\n var content = event.target.result;\n sendFileToCloudVision(content.replace('data:image/jpeg;base64,', ''));\n}", "function processFile (event) {\n var content = event.target.result;\n sendFileToCloudVision(content.replace('data:image/jpeg;base64,', ''));\n}", "function uploadImage(file){\n setShowAlert(false);\n setImgFile(URL.createObjectURL(file));\n setFormImg(file);\n }", "getBase64(img, callback) {\n const reader = new FileReader();\n reader.addEventListener('load', () => callback(reader.result));\n reader.readAsDataURL(img);\n }", "function initUpload() {\n\t\t\t\tvar fileInput = document.getElementById('fileInput');\n\n\t\t\t\tfileInput.addEventListener('change', function(e) {\n\t\t\t\t imageChanged(fileInput);\n\t\t\t\t});\n\t\t\t }", "function _upload(fileObj){\r\n\t\tif(fileObj){\r\n\t\t\tUpload.upload({\r\n\t\t\t\turl: '/api/user/editPhoto',\r\n\t\t\t\tmethod: 'POST',\r\n\t\t\t\tdata: {userId: $rootScope.userProfileObj._id},\r\n\t\t\t\tfile: fileObj\r\n\t\t\t}).progress(function(evt){\r\n\t\t\t}).success(function(data){\r\n\t\t\t\tif(data.status == 1)\r\n\t\t\t\t\ttoaster.pop('success', \"Success\", appConstants.profileImageUpdated);\r\n\t\t\t\telse \r\n\t\t\t\t\ttoaster.pop('error', \"Error\", appConstants.profileImageUpdateFailed);\r\n\t\t\t}).error(function(error){});\r\n\t\t}\r\n\t}", "uploadFile(file) {\n this.validatePhoto(file);\n\n const fd = new FormData();\n fd.append('upload_preset', this.state.unsignedUploadPreset);\n fd.append('tags', `${(this.props.album.name, this.props.album.location)}`); // Optional - add tag for image admin in Cloudinary\n fd.append('file', file);\n\n const config = {\n method: 'post',\n url: `https://api.cloudinary.com/v1_1/${\n this.state.cloudName\n }/image/upload`,\n headers: {\n 'X-Requested-With': 'XMLHttpRequest'\n },\n data: fd,\n onUploadProgress: e => {\n let percentCompleted = Math.round((e.loaded * 100) / e.total);\n this.setState({\n uploadComplete: percentCompleted === 100 ? true : false\n });\n this.setState({\n percentCompleted: percentCompleted >= 100 ? 0 : percentCompleted\n });\n }\n };\n\n axios(config)\n .then(resp => {\n const { secure_url, public_id, delete_token } = resp.data;\n this.setState({\n secure_url,\n public_id,\n delete_token,\n deletedUpload: false\n });\n this.validateForm();\n })\n .catch(err => console.log(err));\n }", "function _doImageUpload(){\n var dataUrl = _getDataUrl($img),\n metaTransferId = (function(){\n if(metaTransfer && metaTransfer.getServerSideId())\n return metaTransfer.getServerSideId();\n else if(_locInfo.argumenta.metadata)\n return _locInfo.argumenta.metadata;\n else\n return 'null';\n })()\n transfer = basiin.tell(dataUrl);\n\n transfer.event.add({\n 'onAfterFinalize':function(event){\n frameProgressBar.setProgress(0);\n window.location = srv.location\n +'/'+ srv.basiin\n +'/image/uploaded/'+ basiin.transaction().id\n +'/'+ transfer.getServerSideId()\n +'/'+ metaTransferId\n },\n 'onAfterPacketLoad':function(event){\n frameProgressBar.setProgress(\n event.object.getProgress());\n }\n });\n }", "function imageChanged(fileInput) {\n\n\t\t\t\t\t\t\t//read file content\n\t\t\t\t\t\t\tvar file = fileInput.files[0];\n\t\t\t\t\t\t\tconsole.log(file);\n\t\t\t\t\t\t\tvar reader = new FileReader();\n\n\t\t\t\t\t\t\treader.onload = function(e) {\n\t\t\t\t\t\t\tconsole.log();\n\t\t\t\t\t\t\t upload(file.name, e.currentTarget.result).then(function(res) {\n\t\t\t\t\t\t\t console.log(res.data);\n\t\t\t\t\t\t\t$scope.data.fileUrl = res.data.url;\n\t\t\t\t\t\t\t$scope.filename = file.name;\n\t\t\t\t\t\t\t }, function(err){\n\t\t\t\t\t\t\t console.log(err);\n\t\t\t\t\t\t\t\talert(err.data);\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t \n\t\t\t\t\t\t\treader.readAsDataURL(file);\n\t\t\t }", "async function handleImageFile(e) {\n\t\tconst file = e.target.files[0];\n\t\tsetFileName(file.name);\n\t\tif (file) {\n\t\t\tlet imageData;\n\t\t\tconst data = new FormData();\n\t\t\tdata.append('file', file);\n\t\t\tdata.append('upload_preset', 'ljxjnqss');\n\t\t\timageData = await uploadPostImage(data);\n\t\t\tsetImgFromCloud(imageData);\n\t\t}\n\t}", "function ProcessImage(imgGotten) {\r\n //AnonLog();\r\n var control = document.getElementById(\"fileToUpload\");\r\n // var file = control.files[0];\r\n var file = img; \r\n\r\n // Load base64 encoded image \r\n // var reader = new FileReader();\r\n // reader.onload = (function (theFile) {\r\n // return function (e) {\r\n var img = document.createElement('img');\r\n var image = null;\r\n img.src = imgGotten;\r\n var jpg = true;\r\n try {\r\n image = atob(imgGotten.split(\"data:image/jpeg;base64,\")[1]);\r\n\r\n } catch (e) {\r\n jpg = false;\r\n }\r\n if (jpg == false) {\r\n try {\r\n image = atob(imgGotten.split(\"data:image/png;base64,\")[1]);\r\n } catch (e) {\r\n alert(\"Not an image file Rekognition can process\");\r\n return;\r\n }\r\n }\r\n //unencode image bytes for Rekognition DetectFaces API \r\n var length = image.length;\r\n imageBytes = new ArrayBuffer(length);\r\n var ua = new Uint8Array(imageBytes);\r\n for (var i = 0; i < length; i++) {\r\n ua[i] = image.charCodeAt(i);\r\n }\r\n\r\n addImageToS3(imageBytes)\r\n\r\n }", "function handleFile(event) {\n\n var image = event.target.result;\n\n image = image.replace(\"data:image/jpeg;base64,\", \"\"); // remove jpeg header (if it exists)\n image = image.replace(\"data:image/png;base64,\", \"\"); // remove png header (if it exists)\n queryCloudVisionApi(image);\n}", "uploadFile(event) {\n let file = event.target.files[0];\n this.setState({imageValue: file});\n\n if (file) {\n let data = new FormData();\n data.append('file', file);\n }\n }", "async function handleUploadImage(e){\n if(e.target.files[0]){\n setImage(e.target.files[0])\n }\n }", "handleFileUploadChange(e) {\n selectedImage = e.target.files[0];\n }", "function saveImage(input){\n console.log(input);\n if (input.files && input.files[0]) {\n // Create a new filereader, get the selected image\n var reader = new FileReader();\n reader.readAsDataURL(input.files[0]);\n \n reader.onload = function (e) {\n // Make the ajax request to update the user's avatar\n var data = {};\n data.database = \"chattest\";\n data.action = \"change_avatar\";\n data.image = e.target.result;\n data.username = USER;\n \n // Send request\n $.post(\"Control/messages.php\", data, processChooseAvatar);\n }\n }\n}", "async function addImage() {\n const file = document.querySelector(\"#fileInput\").files[0]\n const title = $('#albumTitel').val()\n const desc = $('#albumDisc').val()\n const image = await toBase64(file)\n const hash = urlParams.get('hash');\n const id = urlParams.get('id');\n uploadImage(image, hash, id, title, desc)\n}", "setImage(e) {\n this.rawfile = e.target.files[0];\n this.file = e.target.files[0];\n\n // set data type and size\n CroppedImage.$data.beforeSize = filesize(this.file.size);\n CroppedImage.$data.beforeType = this.file.type;\n\n if (!this.file.type.includes('image/')) {\n alert('Please select an image file');\n return;\n }\n\n if (typeof FileReader === 'function') {\n // get raw data\n const rawreader = new FileReader();\n rawreader.onload = (event) => {\n // set raw file (base64)\n CroppedImage.$data.rawImg = event.target.result;\n \n };\n rawreader.readAsDataURL(this.rawfile);\n\n new ImageCompressor(this.file, {\n quality: toolBox.$data.quality,\n convertSize: convertSize,\n success(result) {\n SelectImage.$data.file = result;\n const reader = new FileReader();\n\n reader.onload = (event) => {\n CroppImage.$children[0].$data.imgSrc = event.target.result;\n CroppImage.$children[0].$refs.cropper.replace(event.target.result);\n };\n reader.readAsDataURL(SelectImage.$data.file);\n SelectImage.showObj();\n },\n error(e) {\n console.log(\"error:\",e.message);\n },\n });\n } else {\n alert('Sorry, FileReader API not supported');\n }\n }", "function uploadImage() {\n if (state.photoSnapped) {\n var canvas = document.getElementById('canvas');\n var image = getImageAsBlobFromCanvas(canvas);\n\n // TODO!!! Well this is for you ... YES you!!!\n // Good luck!\n\n // Create Form Data. Here you should put all data\n // requested by the face plus plus services and\n // pass it to ajaxRequest\n var data = new FormData();\n data.append('api_key', faceAPI.apiKey);\n data.append('api_secret', faceAPI.apiSecret);\n data.append('image_file', image);\n // add also other query parameters based on the request\n // you have to send\n\n // You have to implement the ajaxRequest. Here you can\n // see an example of how you should call this\n // First argument: the HTTP method\n // Second argument: the URI where we are sending our request\n // Third argument: the data (the parameters of the request)\n // ajaxRequest function should be general and support all your ajax requests...\n // Think also about the handler\n ajaxRequest('POST', faceAPI.detect, data,setUserID);\n\n } else {\n alert('No image has been taken!');\n }\n }", "function handleFile(e) {\n var files = e.target.files;\n var f = files[0];\n {\n var reader = new FileReader();\n var name = f.name;\n reader.onload = function (e) {\n var data = e.target.result;\n var wb;\n var arr = fixdata(data);\n wb = X.read(btoa(arr), { type: 'base64' });\n process_wb(wb);\n };\n reader.readAsArrayBuffer(f);\n }\n }", "function uploadImg(e) {\n var reader = new FileReader();\n reader.onload = function (event) {\n var img = new Image();\n img.onload = function () {\n const resultImage = document.querySelector('#result-image');\n resultImage.setAttribute('src', event.target.result);\n };\n img.src = event.target.result;\n };\n reader.readAsDataURL(e.target.files[0]);\n}", "onFileChanged(event) {\n if (event.target.files != null)\n this.selectedFile = event.target.files[0];\n const uploadData = new FormData();\n uploadData.append('file', this.selectedFile);\n uploadData.append('type', 'profile-picture');\n uploadData.append('prefix', 'profile-picture');\n uploadData.append('conversion_needed', 'profile-picture');\n uploadData.append('servername', 'artistxp');\n uploadData.append('bucketname', 'file.audiodeadline.com');\n uploadData.append('conversion_needed', '0');\n console.log(uploadData);\n // this._http.post(this.uploadurl, uploadData)\n this.apiService.postUploadFunction(uploadData, 'artistxp')\n .subscribe(event => {\n let res;\n res = event;\n if (res.status == 'success') {\n this.image = res.basepath + '/artistxp/' + res.data.fileservername;\n this.serverimagename = res.data.fileservername;\n console.log(this.image);\n }\n });\n }", "function getImageBase64(file, callback) {\n var reader = new FileReader();\n reader.onload = function gotImage(event) {\n var image = event.target.result;\n callback(image)\n };\n reader.readAsDataURL(file);\n}", "function onUploadStart(event) {\n\n}", "function onPhotoDataSuccess(imageData) {\n // Uncomment to view the base64-encoded image data\n console.log(\"imageData:%s\",imageData);\n // Get image handle\n var smallImage = document.getElementById('smallImage');\n // Unhide image elements\n smallImage.style.display = 'block';\n if ( $('#woNumber')[0].selectedIndex != 0 ) {\n $('.btnupload').prop('disabled',false);\n }\n // Show the captured photo\n // The in-line CSS rules are used to resize the image\n smallImage.src = \"data:image/jpeg;base64,\" + imageData;\n /****************************************************/\n // create blob object from the base64-encoded image data\n blob = dataURItoBlob(smallImage.src);\n //var fd = new FormData(document.forms[0]);\n console.log('blob in capture.js:',blob);\n\n \n //formData.append('file', blob);\n /* This code is for testing\n var attachUrl = 'http://10.0.2.2:9090/rest/api/2/issue/' + $('#woNumber option:selected').val() + '/attachments'\n $.ajax({\n\n beforeSend: function(xhr){xhr.setRequestHeader(\"X-Atlassian-Token\", \"no-check\");},\n url: attachUrl , // Url to which the request is send\n type: \"POST\", // Type of request to be send, called as method\n data: formData, // Data sent to server, a set of key/value pairs (i.e. form fields and values)\n contentType: false, // The content type used when sending data to the server.\n cache: false, // To unable request pages to be cached\n processData:false, // To send DOMDocument or non processed data file it is set to false\n success: function(data) // A function to be called if request succeeds\n {\n console.log('uploaded to jira'); \n alert('Success - Uploaded'); \n $('#loading').hide();\n $(\"#message\").html(data);\n },\n error: function(data){\n console.log('fail to upload');\n }\n }); \n */ \n/****************************************************/\n\n }", "function onFileUpload() {\n\n // Create an object of formData\n const formData = new FormData();\n\n // Update the formData object\n formData.append(\n \"myFile\",\n state.selectedFile,\n state.selectedFile.name\n );\n\n // Details of the uploaded file\n console.log(state.selectedFile);\n\n // Request made to the backend api\n // Send formData object\n axios.post(\"api/uploadfile\", formData);\n}", "function handleImageFromInput(ev, onImageReady) {\n document.querySelector('.share-container').innerHTML = ''\n var reader = new FileReader();\n console.log(ev)\n reader.onload = function (event) {\n var img = new Image();\n img.onload = onImageReady.bind(null, img);\n img.src = event.target.result;\n }\n reader.readAsDataURL(ev.target.files[0]);\n }", "function handleImage(e){\n var reader = new FileReader();\n reader.onload = function(event){\n var img = new Image();\n img.onload = function(){\n if (imageLoaderCallback) {\n \timageLoaderCallback (img);\n }\n // clear the input element so that a new load on the same file will work\n e.target.value = \"\";\n }\n img.src = event.target.result;\n }\n reader.readAsDataURL(e.target.files[0]); \n}", "ImageUpload(e) {\n let file = e.target.files[0];\n let fileSize = file.size / 1024 / 1024;\n let fileType = file.type;\n this.setState({ fileType: file.type, fileName: file.name, fileSize: fileSize });\n this.getCentralLibrary();\n if (this.state.totalLibrarySize < 50) {\n let fileExists = this.checkIfFileAlreadyExists(file.name, \"image\");\n let typeShouldBe = _.compact(fileType.split('/'));\n if (file && typeShouldBe && typeShouldBe[0] == \"image\") {\n if (!fileExists) {\n let data = { moduleName: \"PROFILE\", actionName: \"UPDATE\" }\n let response = multipartASyncFormHandler(data, file, 'registration', this.onFileUploadCallBack.bind(this, \"image\"));\n } else {\n toastr.error(\"Image with the same file name already exists in your library\");\n this.setState({\n uploadingAvatar: false,\n uploadingAvatar1: false,\n uploadingImage2: false,\n });\n }\n } else {\n toastr.error(\"Please select a Image Format\");\n }\n } else {\n toastr.error(\"Allotted library limit exceeded\");\n }\n }", "function uploadFile() {\n ImagePicker.openPicker({\n width: 300,\n height: 400,\n cropping: true,\n }).then(image => {\n let formData = new FormData();\n let file = {\n uri: image.path,\n type: \"multipart/form-data\",\n name: \"image.png\",\n };\n formData.append(\"files\", file);\n if (profileInfo?.id) {\n formData.append(\"id\", profileInfo.id);\n }\n formData.append(\"userId\", global.userInfo.uId);\n updateProfile(formData)\n .then(res => {\n dispatch({\n type: PROFILE_INFO,\n profileInfo: res.profileInfo,\n });\n })\n .catch(res => {\n Toast.showToast(\"update theme failed!\" + res.msg);\n });\n });\n }", "_initSingleImageUpload() {\n if (typeof SingleImageUpload !== 'undefined' && document.getElementById('singleImageUploadExample')) {\n const singleImageUpload = new SingleImageUpload(document.getElementById('singleImageUploadExample'), {\n fileSelectCallback: (image) => {\n console.log(image);\n // Upload the file with fetch method\n // let formData = new FormData();\n // formData.append(\"file\", image.file);\n // fetch('/upload/image', { method: \"POST\", body: formData });\n },\n });\n }\n }", "uploadImage(e) {\n let imageFormObj = new FormData();\n\n imageFormObj.append(\"imageName\", \"multer-image-\" + Date.now());\n imageFormObj.append(\"imageData\", e.target.files[0]);\n\n // stores a readable instance of the image being uploaded using multer\n this.setState({\n multerImage: URL.createObjectURL(e.target.files[0])\n });\n\n axios.post(`${API_URL}/image/uploadmulter`, imageFormObj).then(data => {\n if (data.data.success) {\n alert(\"Image has been successfully uploaded using multer\");\n this.setDefaultImage();\n }\n });\n }", "function onPhotoDataSuccess(imageData) {\n curFile = imageData;\n setStuffForm();\n}", "function evento_obtener_base64_imagen() {\n $(\"#inp\").on(\"change\", function () {\n if (this.files && this.files[0]) {\n var archivo = new FileReader();\n archivo.onload = function (e) {\n $(\"#img\").attr(\"src\", e.target.result);\n };\n archivo.readAsDataURL(this.files[0]);\n }\n //checar_imagen_cambio();\n })\n}", "getBase64(file, cb) {\n let reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = function () {\n cb(reader.result)\n };\n reader.onerror = function (error) {\n console.log('Error: ', error);\n };\n }", "function uploadImage(input) {\n const label = $('[data-js-label]');\n if (input.files && input.files[0]) {\n console.log(input.files[0]);\n if (input.files[0].size < MAX_FILE_UPLOAD_SIZE) {\n if (input.files[0].type === 'image/jpeg' || input.files[0].type === 'image/png') {\n label.text(input.files[0].name)\n var reader = new FileReader();\n reader.onload = function (e) {\n // Show logo if all conditions are true\n LOGO.show();\n $('.logo').attr('src', e.target.result);\n }\n reader.readAsDataURL(input.files[0]); // convert to base64 string\n } else {\n alert('We only support JPF/PNG images');\n }\n } else {\n alert('File size should be less than 5 MB')\n }\n }\n}", "readPicture(event){this.clear();var file=event.target.files[0];// FileList object\nthis.currentFile=file;// Clear the selection in the file picker input.\nthis.imageInput.wrap('<form>').closest('form').get(0).reset();this.imageInput.unwrap();// Only process image files.\nif(file.type.match('image.*')){var reader=new FileReader;reader.onload=e=>this.displayPicture(e.target.result);// Read in the image file as a data URL.\nreader.readAsDataURL(file);this.disableUploadUi(false)}}", "function fileUploadedCallback(success, data) {\n\t\t\t\t\t\tvar imageResource = scope.editorImageResource,\n\t\t\t\t\t\t\tactiveImage = null;\n\n\t\t\t\t\t\tif(success) {\n\t\t\t\t\t\t\t\t\t//TODO what is the purpose here?\n\t\t\t\t\t\t\t\t\t// Maybe not necessary to create new resource object?\n\t\t\t \t\tactiveImage = new imageResource({\n\t\t\t \t\t\t\tid: scope.editorImageId,\n\t\t\t \t\t\t\tblobKey: imageResource.blobKey,\n\t\t\t \t\t\t\turl: imageResource.url\n\t \t\t\t\t\t});\n\n\t \t\t\t\t\tscope.activeImage = activeImage;\n\t \t\t\t\t\tscope.imageUrl = activeImage.url;\n\t \t\t\t\t\tscope.error = false;\n\n\t\t\t\t\t\t\tif(scope.userCancelled) {\n\t\t \t\t\t\t\tdeleteActiveUpload();\n\t\t \t\t\t\t\treturn;\n\t \t\t\t\t\t}\n\n\t \t\t\t\t\tif(editorCropText) {\n\t \t\t\t\t\t\tsetupCropping();\n\t \t\t\t\t\t\tscope.selectionActive = true;\n\t \t\t\t\t\t}\n\t \t\t\t\t\telse {\n\t \t\t\t\t\t\tsaveImageAndClose();\n\t \t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(data.errorThrown === 'abort') {\n\t\t\t\t\t\t\t\t// User cancelled the upload close the dialog\n\t\t\t\t\t\t\t\tdialog.modal('hide');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// We have an error from the server.\n\t\t\t\t\t\t\t\tscope.errorMessage = langService.translate(\"fileupload.submit.error\");\n\t\t\t\t\t\t\t\tscope.error = true;\n\t\t\t\t\t\t\t\tscope.barStyle.width = '0%';\n\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tscope.fileUploading = false;\n\t\t\t\t\t\tscope.$digest();\n\t\t\t\t\t}", "function sendImage() {\n console.log(\"attempting upload\");\n console.log($('#imgInp'));\n\n if ($('#imgInp')[0].files[0]) {\n var file = $('#imgInp')[0].files[0];\n targetFileRef.put(file).then(function (snapshot) {\n console.log('Uploaded.');\n });\n } else {\n console.log(\"No new image to upload.\");\n }\n\n}", "handleFileChange(e) {\n this.setState({\n image:\n e.target\n .value /**URL.createObjectURL(e.target.files[0]) to display image before submit (for file uploads, not URLs) */,\n });\n }", "onDrop(acceptedFiles, rejectedFiles) {\n if (acceptedFiles && acceptedFiles.length) {\n // Read only the first file passed in\n const profilePicture = acceptedFiles[0];\n const reader = new FileReader();\n\n // Convert from blob to a proper file object that can be passed to server\n reader.onload = (upload) => {\n this.setState({\n profilePicture: upload.target.result,\n error: '',\n profilePictureName: profilePicture.name,\n profilePictureChanged: true,\n hasChanged: true,\n });\n };\n\n // File reader set up\n reader.onabort = () => this.setState({error: \"File read aborted.\"});\n reader.onerror = () => this.setState({error: \"File read error.\"});\n reader.readAsDataURL(profilePicture);\n } else {\n this.setState({\n error: rejectedFiles[0].name + ' is not an image.',\n });\n }\n }", "handleFileUpload(e){\n e.preventDefault()\n debugger\n this.setState({\n avatar: e.target.files[0]\n })\n }", "function getUpload() {\t\n\t// Define local variables.\n\tvar file = document.getElementById(\"fileInput\").files[0];\n\tvar hexAllowers = [\"FF D8 FF\", \"89 50 4E\", \"47 49 46\"];\n\tvar fileValidation = false;\n\t\n\tvar read = new FileReader();\n\tread.addEventListener('load', function () {\n\t\t// Check file for proper HEX signature.\n\t\tvar hex = new Uint8Array(this.result);\n\t\tvar hexSignature = (hex[0].toString(16) + \" \" + hex[1].toString(16) + \" \" + hex[2].toString(16)).toUpperCase();\n\n\t\tfor(var i = 0; i < 3; i++) {\n\t\t\tif(hexAllowers[i] == hexSignature) {\n\t\t\t\tfileValidation = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Being working with upload image.\n\t\tif(file.type.match(\"image.*\") && fileValidation == true) {\n\t\t\t// Create new image.\n\t\t\tvar img = new Image();\n\t\t\timg.onload = function() {\n\t\t\t\t// Set the minimum and maximum image dimensions.\n\t\t\t\tvar width_min = 200;\n\t\t\t\tvar height_min = 200;\n\t\t\t\t\n\t\t\t\tvar width_max = 400;\n\t\t\t\tvar height_max = 400;\n\t\t\t\t\n\t\t\t\t// Resize image to proper constraints.\n\t\t\t\tif(img.width >= width_min || img.height >= height_min) {\n\t\t\t\t\tif(img.width > width_max || img.height > height_max) {\n\t\t\t\t\t\tswitch(true) {\n\t\t\t\t\t\t\tcase (img.width > img.height):\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\timg.width = width_max;\n\t\t\t\t\t\t\t\timg.height = height_max * (img.height / img.width;);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase (img.height > img.width):\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\timg.height = height_max;\n\t\t\t\t\t\t\t\timg.width = width_max * (img.width / img.height);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase (img.width == img.height):\n\t\t\t\t\t\t\t\timg.width = width_max;\n\t\t\t\t\t\t\t\timg.height = height_max;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\timg.width = img.width;\n\t\t\t\t\t\timg.height = img.height;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Create new canvas and draw image.\n\t\t\t\t\tvar canvas = document.createElement(\"canvas\");\n\t\t\t\t\tvar ctx = canvas.getContext(\"2d\");\n\t\t\t\t\t\n\t\t\t\t\tcanvas.width = img.width;\n\t\t\t\t\tcanvas.height = img.height;\n\t\t\t\t\tctx.drawImage(img, 0, 0, img.width, img.height);\n\t\t\t\t\t\n\t\t\t\t\t// Convert the image to black and white.\n+\t\t\t\t\t/*var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n+\t\t\t\t\tvar data = imageData.data;\n+\t\t\t\t\tfor(var i = 0; i < data.length; i += 4) {\n+\t\t\t\t\t\tdata[i + 0] = data[i + 1] = data[i + 2] = (data[i] + data[i + 1] + data[i + 2]) / 3;\n+\t\t\t\t\t}\n+\t\t\t\t\tctx.putImageData(imageData, 0, 0);\n+\n+\t\t\t\t\tvar grayImg = new Image();\n+\t\t\t\t\tgrayImg.onload = function() {\n+\t\t\t\t\t\tdocument.body.appendChild(aImg);\n+\t\t\t\t\t\tdocument.body.appendChild(grayImg);\n+\t\t\t\t\t}*/\n\t\t\t\t\t\n\t\t\t\t\t// Convert the canvas to Base64 and create unique file ID.\n\t\t\t\t\tvar dataURL = canvas.toDataURL(\"image/png\");\n\t\t\t\t\tvar fileName = file.name.replace(/\\.[^.]+$|\\W/g, \"\");\n\t\t\t\t\t\n\t\t\t\t\tdocument.getElementById(\"filePreview\").src = dataURL;\n\t\t\t\t\tdocument.getElementById(\"fileData\").value = dataURL;\n\t\t\t\t\tdocument.getElementById(\"fileName\").value = fileName;\n\t\t\t\t} else {\n\t\t\t\t\talert (\"Upload failed. File dimensions too small.\\nThe minimum image dimensions are 200 x 200 pixels.\")\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvar url = window.URL || window.webkitURL;\n\t\t\timg.src = url.createObjectURL(file);\n\t\t} else {\n\t\t\talert(\"Upload failed. Cannot read the file.\\nThe uploaded file must be an image.\")\n\t\t}\n\t});\n\n\tread.readAsArrayBuffer(file);\n}", "function uploadImage(uri, progress, response, error) {\n const timestamp = (Date.now() / 1000 | 0).toString();\n const api_key = ''\n const api_secret = ''\n const cloud = ''\n const hash_string = 'timestamp=' + timestamp + api_secret\n const signature = CryptoJS.SHA1(hash_string).toString();\n const upload_url = 'https://api.cloudinary.com/v1_1/' + cloud + '/image/upload'\n\n let xhr = new XMLHttpRequest();\n xhr.open('POST', upload_url);\n xhr.onload = () => {\n console.log(xhr);\n };\n\n xhr.upload.addEventListener('progress', function(e) {\n //console.log('progress: ' + (e.loaded * 100/ e.total).toFixed(2) + '%');\n progress(parseFloat(e.loaded * 100/ e.total).toFixed(2))\n }, false);\n\n xhr.onreadystatechange = (e) => {\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (xhr.status === 200) {\n response(xhr.responseText)\n // console.log('success', xhr.responseText);\n } else {\n console.log('errors');\n console.log(xhr);\n error('errors')\n }\n };\n\n let formdata = new FormData();\n formdata.append('file', { uri: uri, type: 'image/png', name: 'upload.png' });\n formdata.append('timestamp', timestamp);\n formdata.append('api_key', api_key);\n formdata.append('signature', signature);\n xhr.send(formdata);\n}", "function handleFileSelect(evt) {\n clear_alerts(); \n var files = evt.target.files; // FileList object\n\n // files is a FileList of File objects. List some properties.\n var output = [];\n f = files[0]; \n var name = escape(f.name); \n var type = f.type || 'n/a'; \n var output = ['<li><strong>', name, '</strong> (', type, ') - ', f.size, ' bytes</li>'];\n var reader = new FileReader();\n reader.onload = function ( loadEvent ) { \n originalData = loadEvent.target.result;\n originalImage = new Image(); \n originalImage.onload= function () { \n $('#original_image').html(originalImage); \n }\n originalImage.src = originalData; \n // get rid of data type information (for now assuming always jpeg \n var withoutMimeHeader = originalData.split('base64,')[1];\n encryptedData = encrypt(withoutMimeHeader, \"cryptogram\");\n width_to_height_ratio = 1.0; // todo: actually use the image \n encodedImage = encode(encryptedData, width_to_height_ratio ); \n encodedImage.onload = function () { \n $('#encoded_image').html(encodedImage); //image_to_canvas(encodedImage); \n }\n };\n reader.onerror = show_error; \n reader.readAsDataURL(f); \n var info = document.getElementById('file_info');\n info.innerHTML = '<ul>' + output.join('') + '</ul>';\n}", "function onAvatarURISuccess(imageURI) {\n var loginid = localStorage.getItem('id');\n //alert(loginid);\n var imageData = imageURI;\n var photo_ur = imageData;\n var options = new FileUploadOptions();\n var imageURI = photo_ur;\n options.fileKey = \"image\";\n if (imageURI.substr(imageURI.lastIndexOf('/') + 1).indexOf(\".\") >= 0) {\n var newfname = imageURI.substr(imageURI.lastIndexOf('/') + 1);\n } else {\n var newfname = jQuery.trim(imageURI.substr(imageURI.lastIndexOf('/') + 1)) + '.jpg';\n }\n options.fileName = newfname;\n //alert(newfname);\n options.mimeType = \"image/jpeg\";\n var params = new Object();\n params.loginid =loginid;\n\n options.params = params;\n //options.headers = \"Content-Type: multipart/form-data; boundary=38516d25820c4a9aad05f1e42cb442f4\";\n options.chunkedMode = false;\n var ft = new FileTransfer();\n // alert(imageURI);\n ft.upload(imageURI, encodeURI(\"http://qeneqt.us/index2.php?option=com_content&view=appcode&task=avatarupload\"), win, fail, options);\n\n function win(r) {\n var resp = JSON.parse(r.response);\n window.location.assign(\"edit-profile.html\"); \n }\n\n function fail(error) {\n alert(\"An error has occurred: Code = \" + error.code + \"upload error source \" + error.source + \"upload error target \" + error.target);\n }\n}", "function UploadImage(props) {\n const handleFileUpload = function(e) {\n e.stopPropagation()\n e.preventDefault()\n\n const file = e.target.files\n ? e.target.files[0]\n : e.dataTransfer.files[0]\n\n const reader = new FileReader()\n reader.onload = e => {\n props.handleImageUpload(e.target.result)\n }\n\n reader.onerror = e => {\n console.log('error')\n }\n\n reader.readAsDataURL(file)\n }\n\n const handleDragOver = function(e) {\n e.stopPropagation()\n e.preventDefault()\n }\n\n return (\n <div\n className=\"uploadimage-container\"\n onDragOver={handleDragOver}\n onDrop={handleFileUpload}\n >\n <span className=\"uploadimage-info\">\n <form>\n <label tabIndex=\"1\" htmlFor=\"upload-button\">\n <div\n style={{\n backgroundColor: props.secondaryColor,\n color: props.primaryColor,\n }}\n className=\"choose-file-button\"\n >\n choose file\n </div>\n </label>\n <input\n id=\"upload-button\"\n style={{ width: '1px', visibility: 'hidden' }}\n type=\"file\"\n onChange={e => handleFileUpload(e)}\n ></input>\n </form>\n </span>\n </div>\n )\n}", "_handleImageChange(e) {\n e.preventDefault();\n\n let reader = new FileReader();\n let file = e.target.files[0];\n\n reader.onloadend = () => {\n this.setState({file: file, imagePreviewUrl: reader.result});\n }\n\n reader.readAsDataURL(file)\n }", "success(result) {\n var formData = new FormData();\n\n // The third parameter is required for server\n formData.append('file', result, result.name);\n\n // Send the compressed image file to server with XMLHttpRequest.\n // axios.post('/path/to/upload', formData).then(() => {\n // console.log('Upload success');\n // });\n\n\n // setImageFromFile(result, \"#previewOutputImg\");\n\n $(\"#previewOutputImg\").attr('src', URL.createObjectURL(result));\n }", "function processUpload(metaObject){\n // Grab the icon file, and when you've got it, continue the upload\n request(metaObject.icon).pipe(fs.createWriteStream(__dirname + '/public/icon.jpg')\n .on('finish', function(){\n startUpload(metaObject)\n }));\n}", "function handleFile(file)\n\t{\n\t\tvar fileReader \t\t\t= new FileReader();\n\t\tfileReader.onloadend\t= fileUploaded;\n\t\tfileReader.readAsDataURL(file);\n\t}", "function encodeImageFileAsURL(element, onLoaded) {\n\tvar file = element.files[0];\n\tvar reader = new FileReader();\n\treader.onloadend = function () {\n\t\tconst base64Img = reader.result.replace(/^data:image\\/(png|jpg);base64,/, \"\");\n\t\tonLoaded(base64Img);\n\t}\n\treader.readAsDataURL(file);\n}", "slimTransform(data, slim){\n if(slim._hasInitialImage && !slim._imageEditor)\n return true;\n \n var base64 = 0;\n var large_base64 = 0;\n if(slim._data.output.image){\n var dataurl = slim._data.output.image.toDataURL(\"image/*\") ;\n var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],\n bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);\n while(n--){\n u8arr[n] = bstr.charCodeAt(n);\n }\n var file = new File([u8arr], slim._data.input.name, {type:mime});\n base64 = file;\n }\n // if(slim._data.input.image){\n // var inputFile = new File([slim._data.input.file], slim._data.input.name);\n // large_base64 = inputFile;\n // }\n this.onChangeAddNewUserDetails(slim._output.name, base64);\n //this.props.onChangeAddNewUserDetails(slim._output.name+'_large', large_base64);\n console.log('Transform',base64);\n \n }", "function uploadEventImage() {\n // Clear messages\n vm.success = vm.error = null;\n\n // Start upload\n vm.uploader.uploadAll();\n }", "upload(file) {\n const cls = this.constructor\n const behaviourMap = this._gallery.constructor.behaviours\n const behaviours = this.parentBehaviours\n\n // Clear the current state component\n this._destroyStateComponent()\n\n // Build the form data\n const formData = behaviourMap.formData[behaviours.formData](\n this,\n file\n )\n\n // Set up the uploader\n this._uploader = behaviourMap.uploader[behaviours.uploader](\n this,\n this.parentOptions.uploadUrl,\n formData\n )\n this._uploader.init()\n\n // Set up event handlers for the uploader\n $.dispatch(this._gallery.input, 'uploading')\n\n $.listen(\n this._uploader.uploader,\n {\n 'cancelled aborted error': () => {\n $.dispatch(this._gallery.input, 'uploadfailed')\n\n // Remove the item\n this.destroy()\n\n // Dispatch the removed event\n $.dispatch(this.item, 'removed', {'item': this})\n },\n\n 'uploaded': (event) => {\n $.dispatch(this._gallery.input, 'uploaded')\n\n try {\n // Extract the asset from the response\n const asset = behaviourMap.asset[behaviours.asset](\n this,\n event.response\n )\n\n // Populate the field\n this.populate(asset)\n\n } catch (error) {\n if (error instanceof ResponseError) {\n\n // Display the upload error\n this.postError(error.message)\n\n } else {\n\n // Re-through any JS error\n throw error\n }\n }\n }\n }\n )\n\n // Set the new state\n this._state = 'uploading'\n }", "function uploadImage() {\n const file = buttonLoad.files[0];\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => {\n const img = new Image();\n img.src = reader.result\n image.src = img.src;\n }\n}", "function saveImage() {\n\n var blobToBase64 = function (blob, callback) {\n var reader = new FileReader();\n reader.onload = function () {\n var dataUrl = reader.result;\n var base64 = dataUrl.split(',')[1];\n callback(base64);\n };\n reader.readAsDataURL(blob);\n };\n\n const img = new Image();\n img.src = imgblob;\n img.onload = function (ev) {\n\n URL.revokeObjectURL(imgblob); //release memory\n //Do whatever I need here:\n const newWidth = 200, newHeight = 200;\n const canvas = document.createElement('canvas');\n canvas.width = newWidth;\n canvas.height = newHeight;\n const ctx = canvas.getContext('2d');\n ctx.drawImage(img, 0, 0, newWidth, newHeight);\n\n canvas.toBlob(function (blob) {\n blobToBase64(blob, function (base64) {\n //console.log(base64);\n saveUserPhoto(base64);\n });\n }, 'image/'+imgext, 1);\n } \n}", "function uploadImage (file, range, e) {\n var uploadAPIEndpoint = '/orchestra/api/interface/upload_image/'\n var supportedTypes = ['image/jpeg', 'image/png', 'image/gif']\n\n if (supportedTypes.indexOf(file.type) === -1) {\n window.alert('Files type ' + file.type + ' not supported.')\n return\n } else if (e) {\n // Cancel default browser action only if file is actually an image\n e.preventDefault()\n }\n\n // If nothing is selected in the editor, append the image to its end\n if (range === null) {\n var endIndex = scope.editor.getLength()\n range = {\n 'start': endIndex,\n 'end': endIndex\n }\n }\n\n var reader = new window.FileReader()\n reader.onload = function (e) {\n var rawData = e.target.result\n // Remove prepended image type from data string\n var imageData = rawData.substring(rawData.indexOf(',') + 1, rawData.length)\n\n // Calculate data size of b64-encoded string\n var imageSize = imageData.length * 3 / 4\n\n if (imageSize > scope.uploadLimitMb * Math.pow(10, 6)) {\n window.alert('Files larger than ' + scope.uploadLimitMb + 'MB cannot be uploaded')\n return\n }\n // Post image data to API; response should contain the uploaded image url\n $http.post(uploadAPIEndpoint, {\n 'image_data': imageData,\n 'image_type': file.type,\n 'prefix': scope.imagePrefix\n })\n .then(function (response, status, headers, config) {\n // Replace selected range with new image\n scope.editor.deleteText(range)\n scope.editor.insertEmbed(range.start, 'image', response.data.url, 'user')\n })\n }\n reader.readAsDataURL(file)\n }", "onFileUpload() {\n // Create an object of formData\n console.log('this.state before file this.onFileUpload', this.state);\n const formData = new FormData();\n // Update the formData object\n formData.append(\n 'myFile',\n this.state.selectedFile,\n this.state.selectedFile.name\n );\n // Details of the uploaded file\n console.log('formData', formData);\n // Request made to the backend api\n // Send formData object\n Axios.post('/data', formData)\n .then((data) => {\n console.log(data);\n })\n .catch((err) => {\n console.log(err);\n });\n }", "_handleImageChange(e) {\n e.preventDefault();\n\n let reader = new FileReader();\n let file = e.target.files[0];\n\n reader.onloadend = () => {\n this.setState({\n file: file,\n imagePreviewUrl: reader.result\n });\n }\n\n reader.readAsDataURL(file)\n }", "function uploadImagePreview() {\n var $form = $(this).form();\n var $preview = $form.find('[data-attr=\"previewImage\"]');\n var file = this.files;\n var reader = new FileReader();\n var spinnerTemplate = `\n <span class=\"spinner\">\n <i class=\"fa fa-spinner fa-spin\" style=\"font-size:1.2em\"></i> Uploading...\n </span>\n `;\n\n if (file[0] !== undefined) {\n reader.readAsDataURL(file[0]);\n\n $preview.parent().append(spinnerTemplate);\n\n reader.onload = function (e) {\n var src = e.target.result;\n\n $preview.parent().find('.spinner').remove();\n\n if (file[0].type === 'image/jpeg' || file[0].type === 'image/png') {\n $preview.attr('src', src).parent().addClass('has-img-fit');\n } else {\n $(this).val('');\n alert('Invalid format!');\n }\n };\n }\n}", "uploadFile(file, cb) {\n\n function transferComplete(e) {\n if(e.currentTarget.status === 200) {\n var data = JSON.parse(e.currentTarget.response)\n var path = '/media/' + data.name\n cb(null, path)\n } else {\n cb(new Error(e.currentTarget.response))\n }\n }\n\n function updateProgress(e) {\n if (e.lengthComputable) {\n //var percentage = (e.loaded / e.total) * 100;\n //self.documentSession.hubClient.emit('upload', percentage);\n }\n }\n\n var formData = new window.FormData()\n formData.append(\"files\", file)\n var xhr = new window.XMLHttpRequest()\n xhr.addEventListener(\"load\", transferComplete)\n xhr.upload.addEventListener(\"progress\", updateProgress)\n xhr.open('post', this.config.httpUrl, true)\n xhr.send(formData)\n }", "function postImage() {\t\n\t// encodes image to base64\n\tvar filesSelected = document.getElementById(\"userphoto\").files;\n\tif (filesSelected.length > 0) {\n\t\tvar fileToLoad = filesSelected[0];\n\t\tvar fileReader = new FileReader();\n \n\t\tfileReader.onload = function(fileLoadedEvent) {\n\t\t \tvar srcData = fileLoadedEvent.target.result;\n \n\t\t \tvar newImage = document.createElement('img');\n\t\t \tnewImage.src = srcData;\n \n\t\t \tdocument.getElementById(\"imgTest\").innerHTML = newImage.outerHTML; // adds image to website\n \n\t\t\tlet encodedImage = document.getElementById(\"imgTest\").innerHTML; // gets base64 string from image\n\t\t \n\t\t \tremoveElement('imgTest'); // removes image from website\n\n\t\t\t// let betterEncodedImage = encodedImage.slice(encodedImage.indexOf(\"base64\")+7, -2); // just the base64 code\n\t\t\tlet betterEncodedImage = encodedImage.slice(10, -2); // doesn't remove image type\n\n\t\t\t// preparing JSON to be sent to server\n\t\t\tlet presjsonFormImage = '{'.concat(\n\t\t\t\t'\"encodedImage\": \"').concat(betterEncodedImage).concat('\",').concat(\n\t\t\t\t'\"longitude\": \"').concat(longitudeString).concat('\",').concat(\n\t\t\t\t'\"latitude\": \"').concat(latitudeString).concat('\"').concat(\n\t\t\t\t'}');\n\t\t\t\n\t\t\t// converting variable type to JSON\n\t\t\tlet jsonFormImage = JSON.parse(JSON.stringify(presjsonFormImage));\n\n\t\t\t$.ajaxSetup({\n\t\t\t\theaders: {'content-type':'application/json'}\n\t\t\t});\n\n\t\t\t// posts base64 encoded image to server\n\t\t\t$.post('/handle-image', jsonFormImage, function(data) {\n\t\t\t\tvar jsondata = JSON.stringify(data);\n\t\t\t\tconsole.log(jsondata);\n\n\t\t\t\t// parsing JSON data\n\t\t\t\tvar mood = jsondata.slice(jsondata.indexOf('\"mood') + 11, -4);\n\t\t\t\tvar restaurantname = jsondata.slice(jsondata.indexOf('\"name') + 10, jsondata.indexOf('\"image_url') - 4);\n\t\t\t\tvar restaurantaddress = jsondata.slice(jsondata.indexOf('\"address1') + 14, jsondata.indexOf('\"address2') - 4).concat(\n\t\t\t\t\t', ').concat(jsondata.slice(jsondata.indexOf('\"city') + 10, jsondata.indexOf('\"zip_code') - 4)).concat(\n\t\t\t\t\t\t' ').concat(jsondata.slice(jsondata.indexOf('\"zip_code') + 14, jsondata.indexOf('\"country') - 4)\n\t\t\t\t);\n\n\t\t\t\tdocument.getElementById(\"finalmood\").innerHTML = \"You Appear to be \" + mood;\n\t\t\t\tdocument.getElementById(\"results\").style.backgroundColor = \"#FFC400\";\n\t\t\t\tdocument.getElementById(\"results\").style.boxShadow = \"4px 4px\";\n\t\t\t\tdocument.getElementById(\"restaurantsuggestion\").innerHTML = \"A restaurant that fits your mood is \" + restaurantname + \".\";\n\t\t\t\tdocument.getElementById(\"restaurantaddress\").innerHTML = restaurantaddress;\n\n\t\t\t}, \"json\");\n\t\t}\n\t\tfileReader.readAsDataURL(fileToLoad);\n\t }\n}", "function uploadFile(file) {\n var url = 'https://api.cloudinary.com/v1_1/'+cloudName+'/upload';\n var xhr = new XMLHttpRequest();\n var fd = new FormData();\n xhr.open('POST', url, true);\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n \n // Update progress (can be used to show progress indicator)\n xhr.upload.addEventListener(\"progress\", function(e) {\n $('.changePicture').attr('src', \"img/loader02.gif\");\n var progress = Math.round((e.loaded * 100.0) / e.total);\n\n console.log(`fileuploadprogress data.loaded: ${e.loaded}, data.total: ${e.total}`);\n });\n\n xhr.onreadystatechange = function(e) {\n if (xhr.readyState == 4 && xhr.status == 200) {\n // File uploaded successfully\n var response = JSON.parse(xhr.responseText);\n // https://res.cloudinary.com/cloudName/image/upload/v1483481128/public_id.jpg\n var url = response.secure_url;\n // Create a thumbnail of the uploaded image, with 150px width\n var tokens = url.split('/');\n tokens.splice(-2, 0, 'w_450,h_450,c_crop');\n var img = {};\n img.src = tokens.join('/');\n img.alt = response.public_id;\n // console.log('IMG UPLOADED ------- >', img);\n dataSend = { userid: dizUser.id, imgsrc: img.src };\n // console.log(dataSend);\n $.post( \"updateimg.php\", dataSend , function( data ) {\n // console.log(\"-- updateimg : \", data);\n getUser();\n });\n }\n };\n\n fd.append('upload_preset', unsignedUploadPreset);\n fd.append('tags', 'browser_upload'); // Optional - add tag for image admin in Cloudinary\n fd.append('file', file);\n xhr.send(fd);\n\n}", "onFormSubmit(e) {\n console.log(\"Input, form\")\n e.preventDefault()\n \n var formData = new FormData()\n formData.append(\"image\", this.state.file)\n \n this.uploadImage(formData).then((data) => data.data).then((result) => {\n this.setState({inferenceResult : result}, () => console.log(this.state))\n }).catch((err) => alert(err))\n }", "function uploadImage(imageToSend) {\n if (imageToSend == \"\") {\n alert(\"please choose image\");\n return;\n }\n imageToSend = setToBase64(imageToSend);\n document.getElementById('loading').hidden = false;\n document.getElementById('formDrop').hidden = true;\n window.parent.postMessage({\n 'image': imageToSend\n }, \"*\");\n }", "uploadImage(file, _id, form) {\n if (file.type.indexOf('image/') !== -1) {\n this.upload.upload({\n url: '/api/upload-images',\n data: {\n file: file,\n email: this.user.email,\n _id: _id\n }\n }).then((resp) => {\n // Include new avatar filename to avoid override\n this.updateUser(form, resp.data.avatar);\n }).catch(() => {\n this.$translate('app.account.settings.uploadError').then(value => {\n this.errors.other = value;\n });\n });\n } else {\n this.$translate('app.account.settings.incorrectImageFormat').then(value => {\n this.errors.other = value;\n });\n }\n }", "_uploadImage(file) {\n if (!this._isImage(file)) {\n return;\n }\n\n const userFileAttachment = new RB.UserFileAttachment({\n caption: file.name,\n });\n\n userFileAttachment.save()\n .then(() => {\n this.insertLine(\n `![Image](${userFileAttachment.get('downloadURL')})`);\n\n userFileAttachment.set('file', file);\n userFileAttachment.save()\n .catch(err => alert(err.message));\n })\n .catch(err => alert(err.message));\n }", "function readImageUpload(input) {\n if (input.files && input.files[0]) {\n if (formData.get(\"picture\") != null) {\n formData.delete(\"picture\");\n }\n formData.append(\"picture\", input.files[0]);\n //var reader = new FileReader();\n //reader.onload = function (e) {\n\n // $(\"#image-line-product\").css(\"background-image\", \"url(\" + e.target.result + \")\");\n //};\n //reader.readAsDataURL(input.files[0]);\n }\n //$(\"#txtpicture\").val(\"\");\n}", "function base64_encode(file,Callback) {\n\n\t // read binary data\n\t fs.readFile(file, function read(err, data) {\n\t\t \n\t\t if (err) {\n\n\t\t \tconsole.log(err)\n\n\t\t Callback({'error':'404'})\n\t\t }else{\n\t\t \t// convert binary data to base64 encoded string\n\t \t\t\tCallback( {'Buffer64':new Buffer(bitmap).toString('base64'),'error':false})\n\n\t \t\t\tfs.unlinkSync(file);//We delete the file\n\t\t }\n \n\t\t});\n\t}", "updateImage(e) {\n e.preventDefault();\n\n let reader = new FileReader();\n let file = e.target.files[0];\n reader.readAsDataURL(file);\n\n\n reader.onloadend = () => {\n const user = this.state.user;\n user.profilePic= reader.result;\n\n this.setState({\n user: user\n });\n\n }\n }", "function onPhotoDataSuccessCustom(imageData) {\n // Uncomment to view the base64-encoded image data\n console.log(\"imageData in custom:%s\",imageData);\n\n // Get image handle\n //\n var largeImage = document.getElementById('largeImage');\n\n // Unhide image elements\n //\n largeImage.style.display = 'block';\n if ( $('#woNumber')[0].selectedIndex != 0 ) {\n $('.btnupload').prop('disabled',false);\n }\n // Show the captured photo\n // The in-line CSS rules are used to resize the image\n largeImage.src = \"data:image/jpeg;base64,\" + imageData;\n /****************************************************/\n // create blob object from the base64-encoded image data\n blob = dataURItoBlob(largeImage.src);\n //var fd = new FormData(document.forms[0]);\n console.log('blob in capture.js:',blob);\n\n\n //var zFile = new Blob([imageData], {type: 'image/jpeg'});\n //console.log(\"zFile:\",zFile);\n\n }", "function onPhotoDataSuccess(imageData) {\r\n var smallImage = document.getElementById('smallImage');\r\n smallImage.style.display = 'block';\r\n smallImage.src = \"data:image/jpeg;base64,\" + imageData;\r\n $.post(\"http://ctinfotech.com.md-in-37.webhostbox.net/car_admin/upload.php\", {imageData: imageData}, function (data) {\r\n navigator.notification.alert('Image uploaded!',null,'Alert','Ok');\r\n\r\n });\r\n}", "function handleUploads() {\n \n}", "onBeforeUpload(file) {\n // Ensure image size is smaller, in bytes, than 25 MB\n if (file.size > 26214400) {\n return 'Image is too large. Please upload a smaller image file.';\n }\n // Check that uploaded file is an image in a proper format\n else if (!/png|jpg|jpeg/i.test(file.extension)) {\n return 'Please upload a valid image file.';\n }\n return true;\n }", "saveImageBase64(data, uploadPath = this.uploadPath) {\n let cuttedPath = uploadPath;\n uploadPath = path_1.default.join(process.cwd(), uploadPath);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n if (data) {\n let matches = data.match(/data:([A-Za-z-+\\/]+);base64,(.+)$/);\n let image = {};\n if (typeof matches !== null && matches.length !== 3) {\n return reject({ message: \"failed to read the image\" });\n }\n image.type = matches[1];\n let mimeTypes = {\n \"image/png\": \".png\",\n \"image/jpeg\": \".jpeg\",\n \"image/jpg\": \".jpg\",\n \"image/webp\": \".webp\",\n \"image/tiff\": \".tif\",\n \"image/bmp\": \".bnp\",\n \"image/gif\": \".gif\"\n };\n let matchedType = mimeTypes[image.type];\n if (matchedType) {\n image.extName = matchedType;\n }\n else {\n image.extName = \".jpg\";\n }\n image.name = Math.random().toString(36).substr(2, 9) + image.extName;\n image.data = Buffer.from(matches[2], 'base64');\n image.url = path_1.default.join(uploadPath, image.name);\n image.path = path_1.default.resolve(\"/\", path_1.default.join(cuttedPath, image.name));\n // write the image\n yield this.makeDirectory(uploadPath);\n fs_1.default.writeFile(image.url, image.data, (err) => {\n if (err) {\n return reject({ message: \"error happened while saving image\" });\n }\n else {\n return resolve({ name: image.name, path: image.path });\n }\n });\n }\n else {\n return reject({ message: \"no image sent to upload\" });\n }\n }));\n }", "function upload(blob, bucket, callback) {\n \"use strict\";\n //generate form data\n var data = new FormData();\n data.append(\"image\", blob, \"blob.\" + (blob.type === \"image/jpeg\" ? \"jpg\" : \"png\"));\n data.append(\"bucket\", bucket);\n //send\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", \"https://kland.smilebasicsource.com/uploadimage\");\n xhr.onload = callback;\n xhr.send(data);\n}" ]
[ "0.69902676", "0.6935119", "0.6765236", "0.6727766", "0.6721871", "0.6705777", "0.6676353", "0.6668043", "0.66410273", "0.6615347", "0.6575097", "0.65480185", "0.6494769", "0.64868236", "0.6479687", "0.64705485", "0.6443938", "0.6443938", "0.6442665", "0.64375377", "0.64330477", "0.6403431", "0.6390866", "0.6385269", "0.6385269", "0.63508695", "0.63346106", "0.63317925", "0.6304828", "0.6259715", "0.62574726", "0.6228749", "0.62224764", "0.6219038", "0.6197332", "0.6191366", "0.61861473", "0.6180198", "0.6163638", "0.6155328", "0.6146823", "0.6141664", "0.6129453", "0.6122653", "0.61171967", "0.6098416", "0.6090092", "0.6073331", "0.6058756", "0.6051278", "0.6050874", "0.6048086", "0.6028821", "0.60259265", "0.6024591", "0.60235375", "0.6017583", "0.6006259", "0.59985137", "0.598685", "0.598345", "0.59821624", "0.59817386", "0.5970915", "0.5968256", "0.5957726", "0.59527814", "0.5951737", "0.5941778", "0.5936359", "0.5935409", "0.59280545", "0.59255683", "0.5914527", "0.5911332", "0.5911197", "0.5903107", "0.5902253", "0.59011096", "0.58954763", "0.5891481", "0.5889334", "0.58816755", "0.5879762", "0.5873145", "0.5872865", "0.58718", "0.5860487", "0.5860404", "0.5858855", "0.5858142", "0.58580387", "0.5852078", "0.58484256", "0.5847797", "0.5845981", "0.5836469", "0.5835606", "0.5834506", "0.5833278" ]
0.69668007
1
sets the functions parameter
function calcCir(r){ //var to store the math to find the circumference of a circle var circumference = 2 * Math.PI * r; //spits out the information to the outside of the function and stores it in var result return circumference; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function settingFunc() {\n\n}", "setearParams(kv, ma, md, fltr, anod) {\n\n //console.log(\"seteo nuevos parametros\");\n this.kilovolt = kv;\n this.miliamperios = ma;\n this.modo = md;\n this.filtro = fltr;\n this.anodo = anod;\n }", "function funcionParametro(fn) {\n\tfn();\n}", "addFunctionArgs(value) {\n this._functionArgs = value;\n }", "function doIt (param) {\n param = 2\n}", "setVariableFactory(fn) {\n\t\tthis.#fv = fn;\n\t}", "function setZ(){\r\n\r\n}", "function changeValue(a) {\n a = 20;\n}", "function a(test){\n test = \"p\";\n \n}", "function setDatParameter(params){\n\n // console.log( Date(Date.now()) + \" [via OSC] \" + params[1] + \"->\" + params[2] + \": \" + params[3] + \" (for \" + params[4] +\")\");\n var data = { behaviour: params[1], name: params[2], value: params[3], target: params[4] };\n sendDatOSC(data);\n \n}", "function doIt(param) {\n param = 2;\n}", "setX(x){ this.x = x; }", "set_parameter(id, value) {\n if (id > 39 || id < 0) {\n throw \"Out of bounds!\";\n } else {\n _parameters[id] = value;\n }\n }", "setGetApiPath(myFunc) {\n this.getApiPath = myFunc\n }", "function setparameter (param, value)\n{\n if (typeof (param) === 'undefined' || param === null || typeof (value) === 'undefined') { return false; }\n \n if (typeof (webphone_api.plhandler) === 'undefined' || webphone_api.plhandler === null)\n {\n webphone_api.Log('WARNING, webphone not initialized yet. webphone_api.setparameter AddToQueue: ' + param + ': ' + value);\n webphone_api.addtoqueue('SetParameter', [param, value]);\n }\n else{\n var valtoprint = value;\n if (param === 'password') { valtoprint = '*****'; } //|| param === 'sipusername' || param === 'username'\n webphone_api.Log('EVENT, webphone_api.setparameter: ' + param + ': ' + valtoprint);\n webphone_api.plhandler.SetParameter(param, value);\n }\n}", "function change(b) {\n b = 2;\n}", "function setParams() {\r\n \r\n for(Entry<String,Double> e : body.metabolicParameters.get(body.bodyState.state).get(BodyOrgan.BRAIN.value).entrySet()) {\r\n switch (e.getKey()) {\r\n case \"glucoseOxidized_\" : { glucoseOxidized_ = e.getValue(); break; }\r\n case \"glucoseToAlanine_\" : { glucoseToAlanine_ = e.getValue(); break; }\r\n case \"bAAToGlutamine_\" : { bAAToGlutamine_ = e.getValue(); break; }\r\n }\r\n }\r\n //System.out.println(\"glucoseOxidized: \" + glucoseOxidized_);\r\n }", "function changeVariable(seqNum, varNum, funcNum, funcID){\n var variableName = $(funcID).find(\"input[name=varName\"+varNum+\"]\").val();\n var variableValue = $(funcID).find(\"input[name=varValue\"+varNum+\"]\").val();\n \n $(xmlDoc).find(\"vmr[sequenceNumber='\"+seqNum+\"'] > function[num=\"+funcNum+\"] > variables > var[num='\"+varNum+\"']\").text(variableName + \" \" + variableValue);\n}", "function MV_SetCallBack($function) {\n MV_CallBackFunc = $function;\n}", "function fun1( /*parametros opcionais*/ ){ /*retorno opcional*/ }", "function myFunction(parameterA) {\n parameterA =20;\n return parameterA;\n}", "setParamValue(text, val) {\n console.log(\"IMPLEMENT ME\");\n }", "init(param) {\n if (typeof param === 'function') {\n param(this);\n } else {\n\n }\n }", "function a(test){\n\ttest = 'p';\n}", "function a(test){\n\ttest = 'p';\n}", "set() {}", "set this[int](value) {}", "set this[int](value) {}", "function fSetFormulario(iCampTipo,iFactor,iVariable,iValor){\n iCampo=iCampTipo;\n iFac=iFactor;\n iVar=iVariable;\n iVal=iValor;\n}", "setSettings(parameter,type) {\n\n if(parameter.settings === undefined || parameter.settings == null){\n parameter.settings = {};\n }\n\n //necessary for all parameters added before changes\n for(var key in PARAMETERS.settings){\n if(parameter.settings[PARAMETERS.settings[key]] === undefined || parameter.settings[PARAMETERS.settings[key]] == null){\n if(PARAMETERS.settings[key] == \"required\"){\n //by default required must be set to true\n parameter.settings[PARAMETERS.settings[key]] = true;\n }\n else {\n parameter.settings[PARAMETERS.settings[key]] = null;\n }\n }\n }\n\n return parameter;\n\n }", "function set_fun(value) {\n arr.setVerifyHelpProp = value;\n}", "setX(x)\n {\n this.x=x;\n }", "function setParameter(name/*:String*/, value/*:**/)/*:**/{\n var old/*:**/ = this._parameters$aqE4[name];\n this._parameters$aqE4[name] = value;\n return old;\n }", "function a(test){\n test = \"p\";\n console.log(test)\n}", "function parameterFunc(num){\n console.log(num);\n}", "function setColoring(func) {\n getColor = func;\n}", "function setLogFunction(logFunction)\n {\n my.logFunction = logFunction\n }", "function fSetParameters(w,h,ctx){\r\n\tvar tctx = CargaContextoCanvas(ctx);\r\n\tif(tctx){\r\n\t\tthis.ctx = tctx;\r\n\t}\r\n\telse{\r\n\t\talert(\"contexto no cargado\");\r\n\t}\r\n\tthis.mainWidth = w;\r\n\tthis.mainHeight = h;\r\n}", "function fieMetFunctionAlsParameter(eenFunctie){\n console.log(\"zo meteen wordt de doorgegeven function uitgevoerd\");\n eenFunctie();\n}", "function setThisWithCall(fn,thisValue,arg){\n // console.log(fn) //ƒ (){ return {thisValue: this, arguments: Array.from(arguments)} }\n // console.log(thisValue) //{name:bob}\n // console.log(arg) //18\n setResults= fn.call(thisValue,arg)\n // console.log(setResults)\n return setResults\n}//setThisWithCall", "setX(val) {\r\n this.x=val;\r\n }", "SetBackoffParameter(int, int) {\n\n }", "changeContextParameter(param) {}", "function Parameter() {}", "function setParameters(gl, parameters) {\n (0, _setParameters.setParameters)(gl, parameters);\n\n for (var key in parameters) {\n var setter = LUMA_SETTERS[key];\n\n if (setter) {\n setter(gl, parameters[key], key);\n }\n }\n} // VERY LIMITED / BASIC GL STATE MANAGEMENT", "setGetFetchURL(myFunc) {\n this.getFetchURL = myFunc\n }", "function baz(foo){\n foo = \"bam\";\n bam = \"yay\";\n}", "function parameterFunc (num) {\n console.log(num);\n}", "function parameterFunc(num) {\n console.log(num);\n}", "function parameterFunc(num) {\n console.log(num);\n}", "function fn(param) {\n // param();\n // console.log(\"current param is \", param());\n fn.invokCount++;\n}", "function functionName(param = value) {\n //codes\n}", "function setParameters() {\n params.viscosity = 0.02;\n params.u0 = -amplitude;\n params.one36th = 1 / 36;\n params.one9th = 1 / 9;\n params.four9ths = 4 / 9;\n params.gridSize = 5;\n params.m = int(height / params.gridSize);\n params.n = int(width / params.gridSize);\n}", "function setGlobal(parameters) {\n\twindow[parameters.name] = parameters.value;\n}", "function gen_op_vfp_setreg_F0d(param1)\n{\n //gen_opparam_ptr.push(param1);\n gen_opc_ptr.push({func:op_vfp_setreg_F0d, param: param1});\n}", "function miFuncion (){}", "setFunction(name, params) {\n this._builder.setFunctionparameters((params !== null && params !== void 0 ? params : new ContractFunctionParams_1.ContractFunctionParams())._build(name));\n return this;\n }", "function initValues(){\n}", "setValue() {\n }", "set this[string](value) {}", "function refreshParams() {\n params = { X_max: X_max, X_min: X_min, max_: max_, min_: min_ };\n }", "function gen_op_vfp_setreg_F0s(param1)\n{\n //gen_opparam_ptr.push(param1);\n gen_opc_ptr.push({func:op_vfp_setreg_F0s, param: param1});\n}", "function setScopeFunctions() {\n\t\t\tscope.updateLabel = function(index, value) {\n\t\t\t\tCubeService.updateMeta('labels', index, value, cubeId);\n\t\t\t};\n\t\t\n\t\t\t// true if items the same\n\t\t\tscope.show = function(type, otherType) {\n\t\t\t\treturn type != otherType;\n\t\t\t};\n\t\t\t\n\t\t\tscope.cubeSeeMore = cubeSeeMore;\n\t\t\t\n\t\t\tscope.cubeRemove = cubeRemove;\n\t\t}", "function changeparams()\n{\n if ( potts_timer !== null ) {\n startsimul();\n }\n}", "setx(a)\n\t{\n\t\tthis.x = a;\n\t}", "function setParameters(gl, parameters) {\n Object(__WEBPACK_IMPORTED_MODULE_5__webgl_utils_set_parameters__[\"d\" /* setParameters */])(gl, parameters);\n for (var key in parameters) {\n var setter = LUMA_SETTERS[key];\n if (setter) {\n setter(gl, parameters[key], key);\n }\n }\n}", "function setTensorTracker(fn) {\n trackerFn = fn;\n}", "function setTensorTracker(fn) {\n trackerFn = fn;\n}", "setUpdates (fns) {\n this._updates = fns;\n }", "function setClassProperty(classParam) {\n console.log(classParam.myProperty);\n classParam.myProperty = \"set inside function\";\n console.log(classParam.myProperty);\n}", "function set_val( gname,gvalue )\r\n{\r\n\t//Before calling any LMS function, we will always check for the API.\r\n\tAPI = GetAPI();\r\n\tif( API != null )\r\n\t{\r\n\t\t//LMSSetValue function is called to update data to the LMS.\r\n\t\t//\"gname\" is LMS variable name, in which we are updating the data, and \"gvalue\" is the actual value which we are storing in it.\r\n\t\tAPI.LMSSetValue(gname, gvalue);\t\t\r\n\r\n\t\t//Check for LMS communication Errors.\r\n\t\tfnCheckErrors();\t\r\n\t\t\r\n\t\t//\"commit\" function will be called to forcefully update the data to the LMS.\r\n\t\tcommit();\t\t\r\n\t}\t\r\n}", "function set_upload_param(up) {\n var ret = get_signature();\n if (ret == true) {\n var filename = '${filename}';\n if (uploader.seq < up.files.length) {\n filename = up.files[uploader.seq].name;\n filename = generateFilename(filename);\n // change the filename in the files, used in diplaying photo display.\n up.files[uploader.seq].name = filename;\n }\n new_multipart_params = {\n 'key' : key + filename,\n 'policy': policyBase64,\n 'OSSAccessKeyId': accessid,\n 'success_action_status' : '200', //让服务端返回200,不然,默认会返回204\n 'signature': signature,\n };\n\n up.setOption({\n 'url': host,\n 'multipart_params': new_multipart_params\n });\n\n console.log('reset uploader');\n }\n }", "changeParameter(index, event) {\n // console.log('onChange', index, event);\n const originalParameters = this.state.parameters;\n originalParameters[index].defaultParameterValue.value = event;\n this.setState({ parameters: originalParameters });\n }", "function setReflectanceParameter(){\n\tvar rp = document.getElementById(\"reflectance-slider\").value;\n}", "setParameters () {\n if (arguments.length > 1 || isString (arguments[0])) {\n // This branch is for backwards compatibility. In older versions, the\n // parameters were the supported scopes.\n\n this.options = {\n scope: flattenDeep (...arguments)\n }\n }\n else {\n this.options = arguments[0];\n }\n }", "function setVal(obj,val)\n{\n obj.val(val);\n}", "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function secondFunction() {\r\n var z = 3;\r\n console.log(\"second x = \", x); //1\r\n console.log(\"second y = \", y); //2\r\n console.log(\"second z = \", z); //3\r\n\r\n function thirdFunction(z) {\r\n z = 5; // aici \"z\" e parametru, nu variabila globala!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n console.log(\"third x = \", x); //1\r\n console.log(\"third y = \", y); //2\r\n console.log(\"third z = \", z); //5\r\n }\r\n thirdFunction(z);\r\n}", "function funcionPorDefinicion(){\n //Body\n }", "setDSPValueCallback(address, value) {\n this.moduleFaust.fDSP.setParamValue(address, value);\n }", "set validator(newfunc) {\n\t\t// only allow functions to be set for validator\n\t\tif (typeof newfunc === 'function') {\n\t\t\tthis._validator = newfunc;\n\t\t} else {\n\t\t\tthrow new Error(\"Validator for a command must be a function.\");\n\t\t}\n\t}", "set(param, value) {\n return this.clone({\n param,\n value,\n op: 's'\n });\n }", "setGetCollectionApiPath(myFunc) {\n this.getCollectionApiPath = myFunc\n }", "setTerminalFunction(func){\n if( Util.isFunction(func) )\n this.terminalFunc = func;\n }", "function changePointer(seqNum, ptNum, funcNum, funcID){\n var ptName = $(funcID).find(\"input[name=ptName\"+ptNum+\"]\").val();\n var ptLoc = $(funcID).find(\"input[name=ptValue\"+ptNum+\"]\").val();\n \n $(xmlDoc).find(\"vmr[sequenceNumber='\"+seqNum+\"'] > function[num=\"+funcNum+\"] > pointers > pt[num='\"+ptNum+\"']\").text(ptName + \" \" + ptLoc);\n}", "function fill(){\n f=1;\n}", "function fuctionPanier(){\n\n}", "set x(value) {}", "defineFn(name, words) {this.fnDefs[name] = words;}", "function temperature_change(){\n a_FAO_i='temperature_change';\n initializing_change();\n change();\n}", "function setRunTimeparam(params) {\n return new Promise((resolve, reject) => {\n var response;\n var parameter = params.param;\n var values = params.value;\n\n multichain.setRunTimeparam({\n \"param\": parameter,\n \"value\": values\n },\n (err, res) => {\n if (err == null) {\n return resolve({\n response: \"runtimeParameters has been changed\",\n });\n } else {\n console.log(err)\n return reject({\n status: 500,\n message: 'Internal Server Error !'\n });\n }\n }\n )\n })\n}", "registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }", "registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }", "registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }", "registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }", "registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }", "registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }", "registerOnChange(fn) {\n this.onChange = (valueString) => {\n this.value = this._getOptionValue(valueString);\n fn(this.value);\n };\n }", "function functionName(parameter1, parameter2, parameter3) {\n this.parameter1 = parameter1;\n this.parameter2 = parameter2;\n this.parameter3 = parameter3;\n}" ]
[ "0.7052007", "0.623415", "0.61816263", "0.6029982", "0.59901214", "0.59831303", "0.5971659", "0.59289944", "0.5911817", "0.5870064", "0.58582574", "0.5833273", "0.58080906", "0.5798954", "0.57646316", "0.5731322", "0.5723741", "0.57216406", "0.57110864", "0.56904", "0.56738245", "0.5644179", "0.56403995", "0.5636449", "0.5636449", "0.56158096", "0.561041", "0.561041", "0.5609274", "0.56073105", "0.5603649", "0.55793214", "0.5558087", "0.55550694", "0.55548424", "0.55398846", "0.5539567", "0.5537532", "0.5528347", "0.55259407", "0.551931", "0.55185056", "0.5517709", "0.5461174", "0.5452067", "0.54456145", "0.5441212", "0.542282", "0.54227614", "0.54227614", "0.54185754", "0.5402564", "0.5400438", "0.53908396", "0.53859794", "0.5383256", "0.5369835", "0.53663963", "0.5366081", "0.5361369", "0.53595597", "0.5357301", "0.5338952", "0.5336724", "0.53279924", "0.53198016", "0.5315729", "0.5315729", "0.5309536", "0.5301831", "0.53004426", "0.5296468", "0.5295025", "0.5294872", "0.5293552", "0.5293521", "0.5274382", "0.5274382", "0.5274382", "0.5272181", "0.5271733", "0.52640384", "0.5254344", "0.5251145", "0.52359664", "0.5229074", "0.52265793", "0.5225175", "0.52245903", "0.5209001", "0.52012396", "0.5198048", "0.5197529", "0.51954544", "0.51954544", "0.51954544", "0.51954544", "0.51954544", "0.51954544", "0.51954544", "0.51909345" ]
0.0
-1
heapify the data structure around max values
maxHeapify(arr, n, i) { let largest = i; let leftIndex = 2 * i + 1; let rightIndex = 2 * i + 2; if (leftIndex < n && arr[leftIndex] > arr[largest]) { largest = leftIndex; } if (rightIndex < n && arr[rightIndex] > arr[largest]) { largest = rightIndex; } if (largest != i) { let temp = arr[i]; arr[i] = arr[largest]; arr[largest] = temp; this.maxHeapify(arr, n, largest); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function maxHeapify(arr){\n\n}", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "heapify(/*index*/ i) {\n let l = this.left(i);\n let r = this.right(i);\n let biggest = i;\n if (l < this.heap_size && this.harr[i].element.compareByMulKeys(this.harr[l].element, this.compareValues) == -1)\n biggest = l;\n if (r < this.heap_size && this.harr[biggest].element.compareByMulKeys(this.harr[r].element, this.compareValues) == -1)\n biggest = r;\n if (biggest != i) {\n this.swap(this.harr, i, biggest);\n this.heapify(biggest);\n }\n }", "static buildMaxHeap(a) {\n a.heap_size = a.length;\n\n // Max-heapify the first n/2 elements as\n // they are tree nodes, and the remaining are\n // usually tree leaves\n let mid = parseInt(a.length / 2);\n for (let i = mid; i >= 0; i -= 1) {\n Heap.maxHeapify(a, i);\n }\n }", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "function maxHeapify(idx, hSize) {\n let largest;\n const left = (2 * idx) + 1;\n const right = (2 * idx) + 2;\n if (left < hSize && array[left] > array[idx]) {\n largest = left;\n } else {\n largest = idx;\n }\n if (right < hSize && array[right] > array[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n const temp = array[idx];\n array[idx] = array[largest];\n array[largest] = temp;\n maxHeapify(largest, hSize);\n }\n}", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "function heapify(arr,comp){\r\n // arr[n/2-1:n-1] already satisfies the heap property because they are the leaves.\r\n for(let i = Math.floor((arr.length-2)/2); i >= 0; i--){\r\n // Restore the heap property for i\r\n siftDown(arr, comp, i);\r\n }\r\n // Now that the heap property is satisfied for all i from 0 to n-1, the array is a heap\r\n}", "function buildMaxHeap() {\n for (let i = Math.floor(array.length / 2) - 1; i >= 0; i--) {\n maxHeapify(i, array.length);\n }\n}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "function heapify(A, idx, max) {\n var largest = idx,\n left = 2 * idx + 1,\n right = 2 * idx + 2;\n\n if (left < max && A[left] > A[idx]) {\n largest = left;\n }\n if (right < max && A[right] > A[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n swap(A, idx, largest);\n heapify(A, largest, max);\n }\n}", "buildMaxHeap() {}", "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\n }\n\n for (let endOfHeap = array.length - 1; endOfHeap >= 0; endOfHeap--) { // 2) loop from end of maxHeap to begin/left, and \"delete\" max val until heap region is \"empty\"\n [array[endOfHeap], array[0]] = [array[0], array[endOfHeap]]; // 3) swap the root of the heap with the last element of the heap, this shrinks the heap by 1 and grows the sorted array by 1\n\n console.log(array);\n\n heapify(array, endOfHeap, 0); // 4) sift down the new root, but not past the end of the heap\n }\n\n return array;\n}", "function heapify(arr) {\n if (arr.length < 1) return arr\n for (let i = arr.length - 1; i >= 0; i--) {\n minHeapify(arr, i)\n }\n return arr\n}", "static maxHeapify(a, i) {\n let left = Heap.left(i);\n let right = Heap.right(i);\n\n // Find largest node between current, left and right\n let largest;\n if (left < a.heap_size && a[left] > a[i])\n largest = left;\n else\n largest = i;\n\n if (right < a.heap_size && a[right] > a[largest])\n largest = right;\n\n // Move current element to 'largest' position, and\n // continue until the element is positioned correctly\n if (largest != i) {\n let temp = a[i];\n a[i] = a[largest];\n a[largest] = temp;\n\n Heap.maxHeapify(a, largest);\n }\n }", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "function MaxPriorityQueue(array){\r\n MaxHeap.call(this, array)\r\n}", "function heapify(array, size, i) {\n let max = i // initialize max as root\n let left = 2 * i + 1\n let right = 2 * i + 2\n \n // if left child is larger than root\n if (left < size && array[left] > array[max])\n max = left\n \n // if right child is larger than max\n if (right < size && array[right] > array[max])\n max = right\n \n // if max is not root\n if (max != i) {\n // swap\n let temp = array[i]\n array[i] = array[max]\n array[max] = temp\n \n // recursively heapify the affected sub-tree\n heapify(array, size, max)\n }\n }", "function maxHeapify(arr, length, parent) {\n var largest = parent;\n var leftChild = 2 * parent + 1;\n var rightChild = 2 * parent + 2;\n\n if (leftChild < length && arr[leftChild] > arr[largest]) {\n largest = leftChild;\n }\n\n if (rightChild < length && arr[rightChild] > arr[largest]) {\n largest = rightChild;\n }\n\n if (largest != parent) {\n var temp = arr[largest];\n arr[largest] = arr[parent];\n arr[parent] = temp;\n\n maxHeapify(arr, length, largest);\n }\n}", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "function heapify(currentIndex, arr){\n\n if (isHavingChildrenLeft(currentIndex, arr)) {\n let parent = arr[currentIndex]\n\n if (isHavingChildrenRight(currentIndex, arr)){\n let maxChildren = Math.max(arr[currentIndex * 2 + 1], arr[currentIndex * 2 + 2])\n if (parent < maxChildren){\n let maxChilrenIndex = maxChildren == arr[currentIndex * 2 + 1] ? currentIndex * 2 + 1 : currentIndex * 2 + 2 \n swapArrayElement(currentIndex, maxChilrenIndex, arr)\n heapify(maxChilrenIndex, arr)\n }\n }else {\n if (parent < arr[currentIndex * 2 + 1]){\n swapArrayElement(currentIndex, currentIndex * 2 + 1, arr)\n heapify(currentIndex * 2 + 1, arr)\n }\n }\n }else {\n console.log(\"skipping index %d\", currentIndex)\n }\n}", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "function heapSort(array){\n // 1: Construction\n let heap = new MaxHeap()\n array.forEach(ele => {\n heap.insert(ele)\n });\n\n// 2: sortdown \n let sorted = []\n while (heap.array.length > 1){\n sorted.push(heap.deleteMax())\n }\n return sorted\n}", "function heapifyStandart(currentIndex, heapSize ,arr){\n\n var largestElement = currentIndex\n var leftIndex = 2 * currentIndex + 1\n var rightIndex = 2 * currentIndex + 2\n\n if (leftIndex < heapSize && arr[currentIndex] < arr[leftIndex]){\n largestElement = leftIndex\n }\n \n if (rightIndex < heapSize && arr[largestElement] < arr[rightIndex]){\n largestElement = rightIndex\n }\n\n if (largestElement != currentIndex){\n swapArrayElement(currentIndex, largestElement, arr)\n heapifyStandart(largestElement, heapSize, arr)\n }\n}", "function buildHeap(arr, type) {\n // gets the last index\n var lastIndex = arr.length - 1;\n // While the last index is greater than 0\n while (lastIndex > 0) {\n // get the parent index\n var parentIndex = Math.floor((lastIndex - 1) / 2);\n // get the items inside the parent\n // and the last index \n var lastItem = arr[lastIndex];\n var parentItem = arr[parentIndex];\n\n if (type === 'maxHeap') {\n // checks to see if the lastItem is greater\n // than the parentItem if so then do a swap\n if (lastItem > parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n else if (type === 'minHeap') {\n // checks to see if the lastItem is less\n // than the parentItem if so then do a swap\n if (lastItem < parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n\n }\n }", "function heapify(array, n, i) {\n let leftIdx = 2 * i + 1; // 1) grab left/right indices/values of current val/node\n let rightIdx = 2 * i + 2; // root index is now 0 instead of 1 (no null placeholder)\n let leftVal = array[leftIdx];\n let rightVal = array[rightIdx];\n\n if (leftIdx >= n) leftVal = -Infinity; // 2) set left/right val to -infinity if we're out of array bounds (determined by n)\n if (rightIdx >= n) rightVal = -Infinity;\n\n if (array[i] > leftVal && array[i] > rightVal) return; // 3) exit if current val > both children\n\n let swapIdx;\n if (leftVal < rightVal) { // 4) determine index to swap current value with\n swapIdx = rightIdx;\n } else {\n swapIdx = leftIdx;\n }\n\n [array[i], array[swapIdx]] = [array[swapIdx], array[i]]; // 5) swap current val w/ larger of two children\n\n heapify(array, n, swapIdx); // 6) recursively siftDown/heapify until maxHeap property met\n}", "function buildHeap(A) {\n var n = A.length;\n for (var i = n/2 - 1; i >= 0; i--) {\n heapify(A, i, n);\n }\n}", "grow() {\n this.capacity *= 2;\n this.capacity = this.closestLargestPrime(this.capacity);\n for (let i = 0; i < this.table.length; i++) {\n let currentBucket = this.table[i];\n this.table[i] = [];\n if (currentBucket) {\n if (currentBucket.length > 0) {\n this.elements--;\n currentBucket.forEach(item => {\n this.add(item.key, item.value);\n });\n }\n }\n }\n }", "function maxHeapify(arr , n , i)\n\t{\n\t\n\t\t// Find largest of node and its children\n\t\tif (i >= n) {\n\t\t\treturn;\n\t\t}\n\t\tvar l = i * 2 + 1;\n\t\tvar r = i * 2 + 2;\n\t\tvar max;\n\t\tif (l < n && arr[l] > arr[i]) {\n\t\t\tmax = l;\n\t\t} else\n\t\t\tmax = i;\n\t\tif (r < n && arr[r] > arr[max]) {\n\t\t\tmax = r;\n\t\t}\n\n\t\t// Put maximum value at root and\n\t\t// recur for the child with the\n\t\t// maximum value\n\t\tif (max != i) {\n\t\t\tvar temp = arr[max];\n\t\t\tarr[max] = arr[i];\n\t\t\tarr[i] = temp;\n\t\t\tmaxHeapify(arr, n, max);\n\t\t}\n\t}", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "maxHeap(index) {\n var left = this.left(index);\n var right = this.right(index);\n var largest = index;\n if (left < this.heapSize && this.array[left] > this.array[index]) {\n largest = left;\n }\n if (right < this.heapSize && this.array[right] > this.array[largest]) {\n largest = right;\n }\n if (largest != index) {\n this.swap(this.array, index, largest);\n this.maxHeap(largest);\n }\n }", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "extractMax(){\r\n if(this.values.length === 1) return this.values.pop();\r\n const oldRoot = this.values[0];\r\n this.values[0] = this.values[this.values.length-1];\r\n this.values.pop();\r\n let idx = 0;\r\n let child1 = (2*idx) + 1;\r\n let child2 = (2*idx) + 2;\r\n\r\n while(this.values[idx] < this.values[child1] || \r\n this.values[idx] < this.values[child2]){\r\n child1 = (2*idx) + 1;\r\n child2 = (2*idx) + 2;\r\n if(this.values[child1] >= this.values[child2]){\r\n let temp = this.values[child1];\r\n this.values[child1] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child1;\r\n } else {\r\n let temp = this.values[child2];\r\n this.values[child2] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child2;\r\n }\r\n }\r\n return oldRoot;\r\n }", "function _adjustHeap (arr) {\n var i = parseInt(arr.length / 2) - 1;\n\n while (i >= 0) {\n if (arr[i] < arr[2 * i + 1] || arr[i] < arr[2 * i + 2]) {\n if (arr[2 * i + 1] < arr[2 * i + 2]) {\n arr[2 * i + 2] = [arr[i], arr[i] = arr[2 * i + 2]][0];\n } else {\n arr[2 * i + 1] = [arr[i], arr[i] = arr[2 * i + 1]][0];\n }\n _adjustHeap(arr);\n }\n i--;\n };\n }", "async function MaxHeapify( i, heapSize)\n{\n\n let hasLeft = (2 * i + 1 < heapSize) ? true : false;\n let hasRight = (2 * i + 2 < heapSize) ? true : false;\n let l, r;\n let largest = i;\n if (hasLeft)\n l = arr[2 * i + 1].offsetHeight;\n if (hasRight)\n r = arr[2 * i + 2].offsetHeight;\n if (hasLeft && arr[i].offsetHeight < l)\n {\n largest = 2 * i + 1;\n }\n if (hasRight && arr[largest].offsetHeight < r)\n {\n largest = 2 * i + 2;\n }\n if (largest != i)\n {\n arr[i].style.backgroundColor='white';\n arr[largest].style.backgroundColor='green';\n await timer(delay);\n await swap(i, largest);\n arr[i].style.backgroundColor='red';\n arr[largest].style.backgroundColor='red';\n await MaxHeapify(largest, heapSize);\n }\n}", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "insert_num(num) {\n // Insert a number if the num is less than the top ele in maxHeap, or maxHeap top is null\n if (!this.maxHeap.values.length || this.maxHeap.peek() >= num) {\n this.maxHeap.insert(num);\n } else {\n this.minHeap.insert(num);\n }\n\n // Rebalance the heaps. Max heap should have 1 extra element if total num of elements is odd\n if (this.maxHeap.values.length > this.minHeap.heap.length + 1) {\n this.minHeap.insert(this.maxHeap.extractMax());\n } else if (this.maxHeap.values.length < this.minHeap.heap.length) {\n this.maxHeap.insert(this.minHeap.remove());\n }\n }", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "function heapSort(arr){\n var sorted = [];\n var heap1 = new MaxHeap();\n \n for(let i=0; i<arr.length; i++){\n heap1.insert(arr[i]);\n }\n \n for(let i=0; i<arr.length; i++){\n sorted.push(heap1.delete());\n }\n return sorted;\n}", "function heapSort(input) {\n // inplace sorting algorithm\n // iterate from the middle and go to the first element and heapify at each position\n let middleElement = Math.ceil(input.length / 2);\n\n for (let i = middleElement; i >= 0; i--) {\n heapify(i, input.length - 1, input);\n }\n\n let lastElement = input.length - 1;\n for (let i = 0; i <= lastElement; i++) {\n let temp = input[lastElement - i];\n input[lastElement - i] = input[0];\n input[0] = temp;\n heapify(0, lastElement - i - 1, input);\n }\n // console.log(\"sorted\");\n // console.log(input);\n}", "function heapSort(arr,comp){\r\n // Turn arr into a heap\r\n heapify(arr,comp);\r\n for(let i = arr.length-1; i > 0; i--){\r\n // The 0th element of a heap is the largest so move it to the top.\r\n [arr[0],arr[i]] = [arr[i],arr[0]];\r\n // The 0th element is no longer the largest; restore the heap property\r\n siftDown(arr,comp,0);\r\n }\r\n}", "heapSort(start, length) {\n this.heapify(start, length);\n\n for (let i = length - start; i > 1; i--) {\n this.Writes.swap(start, start + i - 1);\n this.siftDown(1, i - 1, start);\n }\n\n // if(!isMax) {\n // this.Writes.reversal(arr, start, start + length - 1, 1, true, false);\n // }\n}", "async function heapify(arr,length,i){\n chosen.style.color=\"black\";\n chosen.innerHTML=`Turning the remaining array into max heap...`;\n let largest=i;\n let left=i*2+1;\n let right=left+1;\n let rightBar=document.querySelector(`.bar${right}`);\n let leftBar=document.querySelector(`.bar${left}`);\n let iBar=document.querySelector(`.bar${i}`);\n await sleep(speed);\n iBar.style.backgroundColor=\"#3500d3\";//selected\n if (left<length)\n leftBar.style.backgroundColor=\"#f64c72\";//checking\n if (right<length)\n rightBar.style.backgroundColor=\"#f64c72\";//checking\n if (left<length && arr[left]>arr[largest])\n largest=left;\n if (right<length && arr[right]>arr[largest])\n largest=right;\n if(largest!=i){\n let largestBar=document.querySelector(`.bar${largest}`);\n iBar=document.querySelector(`.bar${i}`);\n [arr[largest],arr[i]]=[arr[i],arr[largest]];\n [largestBar.style.height,iBar.style.height]=[iBar.style.height,largestBar.style.height];\n [largestBar.innerHTML,iBar.innerHTML]=[iBar.innerHTML,largestBar.innerHTML];\n await sleep(speed);\n iBar.style.backgroundColor=\"#17a2b8\";//original\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n\n await heapify(arr,length,largest);\n }\n iBar.style.backgroundColor=\"#17a2b8\";//original\n if (left<length)\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n if (right<length)\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n}", "function heapify(array, size, i, animations)\n{\n let root = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if(left < size && array[left] > array[root])\n {\n animations.push([root, left, false]);\n animations.push([root, left, false]);\n root = left;\n }\n if(right < size && array[right] > array[root])\n {\n animations.push([root, right, false]);\n animations.push([root, right, false]);\n root = right;\n }\n //Root has changed because i was not the root\n if(root != i)\n {\n animations.push([root, array[i], true]);\n animations.push([i, array[root], true]);\n //If root is not i, then swap the values, call heapify recursively\n swap(array, root, i);\n heapify(array, size, root, animations);\n }\n}", "async function heapSortAux(array) { \n const len = array.length;\n // Build heap (rearrange array) \n for (let i = Math.floor(len / 2) - 1; i >= 0; i--) { \n await heapify(array, len, i); \n }\n \n // One by one extract an element from heap \n for (let i = len-1; i > 0; i--) { \n array[0].style.backgroundColor = bar_colours.selectedColour2;\n array[i].style.backgroundColor = bar_colours.selectedColour;\n await new Promise(resolve =>\n setTimeout(() => {\n resolve();\n }, delay)\n );\n // Move current root to end \n await swap(array, 0, i); \n array[i].style.backgroundColor = bar_colours.doneColour;\n array[0].style.backgroundColor = bar_colours.initColour;\n\n \n \n // call max heapify on the reduced heap \n await heapify(array, i, 0); \n } \n }", "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "function heapSortInPlace(array){\n for(let i = 1; i < array.length; i++){\n MaxHeap.heapifyUp(array, i);\n }\n\n let temp;\n for(let j = array.length - 1; 0 < j; j--){\n temp = array[0];\n array[0] = array[j];\n array[j] = temp;\n\n // j is the length of array\n MaxHeap.heapifyDown(array, 0, j);\n }\n\n return array;\n}", "function heapify(arr,n,i){\n var largest,l,r;\n largest = i;\n l = 2*i+1;\n r = 2*i+2;\n\n if(l<n && arr[l]>arr[largest]){\n largest = l;\n }\n if(r<n && arr[r]>arr[largest]){\n largest = r;\n }\n if(largest!=i){\n swap(arr,i,largest);\n heapify(arr,n,largest);\n }\n\n}", "function Heap()\n{\n\t// h[0] not used, heap initially empty\n\n\tthis.h = [null]; // heap of integer keys\n\tthis.h_item = [null]; // corresponding heap of data-items (any object)\n\tthis.size = 0; // 1 smaller than array (also index of last child)\n\n\n\t// --------------------\n\t// PQ-required only; more could be added later when needed\n\t// the 2 basic shape maintaining operations heapify and reheapify simplify\n\t// processing functions\n\n\tthis.isEmpty = heapisEmpty; // return true if heap empty\n\tthis.deleteRoot = heapDeleteRoot; // return data-item in root\n\tthis.insert = heapInsert; // insert data-item with key\n\n\tthis.heapify = heapheapify; // make subtree heap; top-down heapify (\"sink\") used by .deleteRoot()\n\tthis.reheapify = heapreheapify; // bottom-up reheapify (\"swim\") used by .insert()\n\tthis.show = heapShow; \t // utility: return pretty formatted heap as string\n\t \t // ... etc\n\n\t// --------------------\n}", "heapifyToBottom(index) {\n let smallest = index;\n const child1 = index * 2 + 1;\n const child2 = index * 2 + 2;\n if (this.compare(child1, smallest) < 0) {\n smallest = child1;\n }\n if (this.compare(child2, smallest) < 0) {\n smallest = child2;\n }\n //swap with smaller child if either child is smaller than parent\n if (index !== smallest) {\n utility_1.default.swap(this._nodes, index, smallest);\n this.heapifyToBottom(smallest);\n }\n }", "function heapify(arr, length, i) {\n let largest = i;\n let left = i * 2 + 1;\n let right = left + 1;\n\n if (left < length && arr[left] > arr[largest]) {\n largest = left;\n }\n if (right < length && arr[right] > arr[largest]) {\n largest = right;\n }\n if (largest != i) {\n [arr[i], arr[largest]] = [arr[largest], arr[i]];\n heapify(arr, length, largest);\n }\n\n return arr;\n}", "extractMax() {\n let values = this.values;\n if (values.length === 0) return;\n let max = values[0];\n // For time complexity reasons, I swap first then remove the old root node\n values[0] = values[values.length - 1];\n values.pop();\n console.log(values);\n // instatiate child nodes\n let child1, child2, indexToSwap;\n let currentIndex = 0;\n while (true) {\n child1 = currentIndex * 2 + 1;\n child2 = currentIndex * 2 + 2;\n if (values[currentIndex] >= Math.max(values[child1], values[child2])) {\n break;\n }\n indexToSwap = values[child1] > values[child2] ? child1 : child2;\n if (!values[indexToSwap]) break;\n let oldNode = values[currentIndex];\n values[currentIndex] = values[indexToSwap];\n values[indexToSwap] = oldNode;\n currentIndex = indexToSwap;\n }\n this.values = values;\n return max;\n }", "heapDown(index) {\n const [leftIndex, rightIndex] = this.children(index);\n \n if (!leftIndex && !rightIndex) return;\n\n let min;\n rightIndex ? min = rightIndex : min = leftIndex;\n if ((leftIndex && rightIndex) &&\n this.store[leftIndex].key < this.store[rightIndex].key) {\n min = leftIndex;\n }\n\n if (this.store[index].key > this.store[min].key) {\n this.swap(index, min);\n this.heapDown(min);\n }\n }", "extractMax() {\r\n\t\tconst max = this.heap[0];\r\n\t\tthis.remove(max);\r\n\t\treturn max;\r\n\t}", "function heap_root(input, i) { \n var left = 2 * i + 1; \n var right = 2 * i + 2; \n var max = i; \n \n if (left < array_length && input[left] > input[max]) { \n max = left; \n } \n \n if (right < array_length && input[right] > input[max]) { \n max = right; \n } \n \n if (max != i) { \n swap(input, i, max); \n heap_root(input, max); \n } \n}", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let index = 0\n let element = this.values[index]\n // repeat until neither child is greater than the element\n while(true) {\n let swapped = null\n let leftIndex = 2 * index + 1\n let rightIndex = 2 * index + 2\n if (leftIndex < this.values.length) {\n if(this.values[leftIndex] > element) {\n swapped = leftIndex\n }\n }\n if (rightIndex < this.values.length) {\n if( (!swapped && this.values[rightIndex] > element || !!swapped && this.values[rightIndex] > this.values[leftIndex])) {\n swapped = rightIndex\n }\n }\n if (swapped===null) break\n this.values[index] = this.values[swapped]\n this.values[swapped] = element\n index = swapped\n }\n return max\n }", "buildHeap(left, right) {\r\n var x = this.values[left];\r\n var i = left;\r\n\r\n while(true) {\r\n let j = 2 * i;\r\n if (j > right) break;\r\n if ((j < right) && (Item.compare(this.values[j + 1], this.values[j]) >= 0)) {\r\n j++;\r\n }\r\n\r\n if (Item.compare(x, this.values[j]) >= 0) break;\r\n let temp = this.values[i];\r\n this.values[i] = this.values[j];\r\n this.values[j] = temp;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n i = j;\r\n }\r\n\r\n this.values[i] = x;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n }", "function Heap(){\n this.heap = [];\n}", "grow() {\n this.capacity *= 2;\n this.capacity = this.closestLargestPrime(this.capacity);\n for (let i = 0; i < this.table.length; i++) {\n let currentBucket = this.table[i];\n this.table[i] = [];\n if (currentBucket) {\n if (currentBucket.length > 0) {\n this.elements--;\n currentBucket.forEach(item => {\n this.add(item);\n });\n }\n }\n }\n }", "async function heapify(array, n, i) {\n let largest = i; // Initialize largest as root \n const l = 2 * i + 1; // left = 2*i + 1 \n const r = 2 * i + 2; // right = 2*i + 2 \n \n // See if left child of root exists and is \n // greater than root \n if (l < n && getValue(array[l]) > getValue(array[largest])) { \n largest = l;\n }\n \n // See if right child of root exists and is \n // greater than root \n if (r < n && getValue(array[r]) > getValue(array[largest])) { \n largest = r;\n }\n \n // Change root, if needed \n if (largest != i) {\n array[i].style.backgroundColor = bar_colours.selectedColour2;\n array[largest].style.backgroundColor = bar_colours.selectedColour;\n await new Promise(resolve =>\n setTimeout(() => {\n resolve();\n }, delay)\n );\n await swap(array, i, largest); // swap\n array[i].style.backgroundColor = bar_colours.initColour;\n array[largest].style.backgroundColor = bar_colours.initColour;\n \n // Heapify the root. \n await heapify(array, n, largest);\n }\n }", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function heap(a, lo, hi) {\n var n = hi - lo,\n i = (n >>> 1) + 1;\n while (--i > 0) sift(a, i, n, lo);\n return a;\n }", "function pq_insert(heap, new_element) {\n var eIntIdx = heap.length;\n var prntIdx = Math.floor((eIntIdx - 1 ) / 2);\n heap.push(new_element);\n var heaped = (eIntIdx <= 0) || (heap[prntIdx].priority <= heap[eIntIdx]).priority;\n\n while(!heaped){\n var tmp = heap[prntIdx];\n heap[prntIdx] = heap[eIntIdx];\n heap[eIntIdx] = tmp;\n\n eIntIdx = prntIdx;\n prntIdx = Math.floor((eIntIdx - 1)/2);\n heaped = (eIntIdx <= 0) ||(heap[prntIdx].priority <= heap[eIntIdx].priority);\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function heapSort(inputArr){\n var heap = new Heap;\n for(i=0; i<inputArr.length; i++){\n heap.add(inputArr[i])\n }\n var outputArr = []\n for(i=0; i<inputArr.length; i++){\n outputArr.push(heap.remove())\n }\n console.log(outputArr)\n return outputArr\n}", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "MinHeapify(index) {\n let left = this.left(index);\n let right = this.right(index);\n let smallest = index;\n if (left < this.size && this.data[left] < this.data[index]) smallest = left;\n if (right < this.size && this.data[right] < this.data[smallest])\n smallest = right;\n if (smallest != index) {\n let temp = this.data[index];\n this.data[index] = this.data[smallest];\n this.data[smallest] = temp;\n this.MinHeapify(smallest);\n }\n }", "function heapSort(array){\n let heapify = new MinHeap;\n let sortedArray = [];\n let length = array.length;\n\n for(let i = 0; i < length; i++){\n heapify.add(array.pop());\n }\n\n for(let j = 0; j < length; j++){\n sortedArray.push(heapify.extract());\n }\n\n return sortedArray;\n}", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function maxHeap(array, n, i) {\n let largest = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if (left < n && array[left] > array[largest]) {\n largest = left;\n }\n\n // If right child is larger than largest so far\n if (right < n && array[right] > array[largest]) {\n largest = right;\n }\n\n // If largest is not root\n if (largest != i) {\n let swap = array[i];\n array[i] = array[largest];\n array[largest] = swap;\n\n // Recursively heapify the affected sub-tree\n maxHeap(array, n, largest);\n }\n}", "function Heap(key) {\n this._array = [];\n this._key = key || function (x) { return x; };\n}", "buildHeap(array) {\n const firstParentIdx = Math.floor((array.length - 2) / 2);\n for (let currentIdx = firstParentIdx; currentIdx >= 0; currentIdx--) {\n this.siftDown(currentIdx, array.length - 1, array);\n }\n return array;\n }", "constructor(/*MinHeapNode[]*/ a, /*int*/ size, compareValues) {\n super(a, size, compareValues);\n let i = (this.heap_size - 1)/2;\n while (i >= 0) {\n this.heapify(i);\n i--;\n }\n }", "heapify(/*index*/ i) {\n // this is a stub\n }", "function PriorityQueue() {\n this.heap = [];\n this.size = 0;\n}", "function minheap_insert(heap, new_element) \n{\n \n var adj,temp;\n heap.push(new_element);\n for (adj=heap.length-1;adj>0;adj=Math.floor((adj-1)/2))\n {\n if (new_element < heap[Math.floor((adj-1)/2)]) // use to swap those two numbers\n {\n temp = new_element;\n heap[adj] = heap[Math.floor((adj-1)/2)];\n heap[Math.floor((adj-1)/2)] = temp; \n }\n }\n return;\n}", "heapify(currentParent) {\n let left = this.left(currentParent);\n let right = this.right(currentParent);\n let bestParent = currentParent;\n\n // looking for the best parent that fulfills the heap property for this node and it's children\n if (left < this.size && !this.validParent(left, bestParent)) {\n bestParent = left;\n }\n if (right < this.size && !this.validParent(right, bestParent)) {\n bestParent = right;\n }\n\n // if the current parent is not the best parent, we have some work to do\n if (currentParent != bestParent) {\n // swapping new parent with old parent\n let currentParentValue = this.heap[currentParent];\n this.heap[currentParent] = this.heap[bestParent];\n this.heap[bestParent] = currentParentValue;\n\n // set locations on the swap\n this.locations.set(this.hash(this.heap[bestParent]), bestParent);\n this.locations.set(this.hash(this.heap[currentParent]), currentParent);\n\n // recurse from the best parent's old position\n this.heapify(bestParent);\n }\n }", "function BinaryHeap() {\n this.array = [];\n }", "function heapSort(array) {\n \n let heap = new MaxHeap();\n array.forEach(num => heap.insert(num)); // 1) build heap O(N) Amortized Time\n\n let sorted = [];\n while (heap.array.length > 1) { // 2) continously delete max and push deleted to sorted arr until heap empty\n sorted.push(heap.deleteMax()); // deletion takes log(N)\n }\n \n return sorted;\n}", "function heapify(n, i) {\n let largest = i; // Initialize largest as root\n // Index of left and right child of root\n const left = 2*i + 1;\n const right = 2*i + 2;\n \n // See if left child of root exists and is greater than root\n if (left < n && arr[left] > arr[largest]) {\n largest = left;\n }\n \n // See if right child of root exists and is greater than current largest\n if (right < n && arr[right] > arr[largest]) {\n largest = right;\n }\n \n // Change root if needed\n if (largest !== i) {\n swap(i, largest);\n // Heapify down this subtree\n heapify(n, largest);\n }\n }", "function MinHeap() {\n\n /**\n * Insert an item into the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} x\n */\n this.insert = function(x) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:)\n *\n * @return{number}\n */\n this.peek = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Remove and return the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.pop = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the size of the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.size = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Convert the heap data into a string\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{string}\n */\n MinHeap.prototype.toString = function() {\n // INSERT YOUR CODE HERE\n }\n\n /*\n * The following are some optional helper methods. These are not required\n * but may make your life easier\n */\n\n /**\n * Get the index of the parent node of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var parent = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the index of the left child of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var leftChild = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Swap the values at 2 indices in our heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @param{number} j\n */\n var swap = function(i, j) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble up the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleUp = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble down the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleDown = function(i) {\n // INSERT YOUR CODE HERE\n }\n}", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "heapifyUp(customStartIndex) {\n // Take the last element (last in array or the bottom left in a tree)\n // in the heap container and lift it up until it is in the correct\n // order with respect to its parent element.\n let currentIndex = customStartIndex || this.heapContainer.length - 1;\n\n while (\n this.hasParent(currentIndex) &&\n !(this.parent(currentIndex) <= this.heapContainer[currentIndex])\n ) {\n this.swap(currentIndex, this.getParentIndex(currentIndex));\n currentIndex = this.getParentIndex(currentIndex);\n }\n }", "function popLargest(){\n console.log('done heaping now need to start sorting, should show swapping first and last elements of the array')\n \n //console.log('need to update nodes = ', nodes)\n // swap first with last node\n var topper = d3.select('#nodey' + nodes[0].id)\n \n var highval = nodes[0].data.name\n \n var lower = d3.select('#nodey' + nodes[nodes.length-1].id)\n var lowval = nodes[nodes.length-1].data.name\n \n // console.log('lowval is', lowval)\n var toptransX = nodes[0].x - nodes[nodes.length-1].x\n var toptransY = nodes[nodes.length-1].y -nodes[0].y\n \n // console.log(toptransX, 'and y= ', toptransY)\n topper.select('.valtext')\n .transition()\n .attr('transform', \"translate(\" + toptransX + \", \" + toptransY +')')\n .on('end', function(){\n //nodes[0].data.name = lowval;\n //nodes[nodes.length-1].data.name = highval;\n // console.log('and this is', this)\n d3.select(this).attr('transform', 'translate(0,0)')\n \n // upDateNodeVals()\n })\n \n nodes[0].data.name = lowval;\n nodes[nodes.length-1].data.name = highval;\n \n swapArrayGs(0, nodes.length-1)\n \n MakeRectDone(nodes.length-1, 'blue')\n \n lower.select('circle')\n .transition()\n .delay(1000)\n .duration(colorduration)\n .style('fill', 'blue')\n .on('end', function(d){\n var lastpar = nodes[nodes.length-1].parent;\n lastpar._children = nodes[nodes.length-1];\n // console.log(lastpar, \"last parent is\")\n var removableindex = lastpar.children.indexOf(nodes[nodes.length-1]);\n lastpar.children = lastpar.children.filter(function(d){\n return d !== nodes[nodes.length-1]\n })\n if(lastpar.children.length === 0){\n lastpar.children = null;\n }\n update(lastpar)\n // console.log('nodes after all that,', nodes)\n setTimeout(function(){\n if(nodes.length === 1){\n console.log('All done just need to make this rectangle blue and maybe make the root go to the array.')\n MakeRectDone(0, 'blue')\n }\n else{\n max_heapify(0, {})\n }\n \n }, 2000)\n \n })\n \n // console.log('want to make this blue')\n \n lower.select('.valtext')\n .transition()\n .attr('transform', \"translate(\" + -toptransX + \", \" + -toptransY +')')\n .on('end', function(){\n //nodes[0].data.name = lowval;\n // console.log('and this is', this)\n d3.select(this).attr('transform', 'translate(0,0)')\n \n upDateNodeVals()\n })\n \n }", "function BinaryHeap(options) {\n options = options || {};\n\n this._elements = options.elements || [];\n this._score = options.score || this._score;\n}" ]
[ "0.76425755", "0.7590268", "0.7411874", "0.71795857", "0.7164551", "0.7093145", "0.70451295", "0.7003762", "0.6964044", "0.6957051", "0.69474083", "0.69140154", "0.6902639", "0.6899539", "0.689424", "0.68331915", "0.6778727", "0.6763307", "0.67618555", "0.67281747", "0.67278504", "0.6709218", "0.6695062", "0.6671794", "0.66450155", "0.66450155", "0.6635325", "0.6595353", "0.6595353", "0.65942097", "0.65750444", "0.6553992", "0.6518686", "0.64975566", "0.649422", "0.6493683", "0.64797336", "0.64759594", "0.647179", "0.6456088", "0.64260495", "0.6405127", "0.63999206", "0.63590616", "0.6314596", "0.6312331", "0.63112074", "0.63101745", "0.63019747", "0.62998205", "0.6296527", "0.6282713", "0.62718004", "0.6263799", "0.6257506", "0.6255676", "0.6234814", "0.6233722", "0.62276804", "0.6212624", "0.61975944", "0.61956865", "0.6194854", "0.6180484", "0.6180018", "0.6169097", "0.6155485", "0.61518115", "0.6149813", "0.6148245", "0.6138977", "0.6138977", "0.61180615", "0.611176", "0.610659", "0.6095637", "0.6095637", "0.6081213", "0.60690576", "0.6048037", "0.6041973", "0.6041973", "0.6041973", "0.6041973", "0.6038194", "0.602639", "0.6021215", "0.6017882", "0.59709704", "0.5970435", "0.595127", "0.59419703", "0.59336615", "0.592663", "0.59125483", "0.5909505", "0.5889641", "0.5877696", "0.5876084", "0.58727354" ]
0.6298618
50
insert a value into the heap
insert(data) { const size = this.heap.length; if (size === 0) { this.heap.push(data); } else { this.heap.push(data); for (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) { this.maxHeapify(this.heap, this.heap.length, i); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insert(value) {\n // Insert value to the end of array\n // Perform siftUp to correct position of value in the heap tree\n this.heap.push(value);\n this.siftUp(this.heap.length - 1, this.heap);\n }", "insert(value) {\n\t\tthis.heap.push(value);\n\t\t// calling heapify function to reconstruct array to heap property\n\t\tthis.heapify();\n\t}", "insert(val) {\n this.array.push(val);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// push value to end of array (add node to farthest bottom left of tree)\n\n this.siftUp(this.array.length - 1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuously swap value toward front of array to maintain maxHeap property\n }", "insert(value, priority) {\n var node = new Node(value, priority);\n\n this.heap.push(node);\n\n let currentNodeIdx = this.heap.length - 1;\n let currentNodeParentIdx = Math.floor((currentNodeIdx - 1) / 2);\n\n while (\n this.heap[currentNodeParentIdx] &&\n priority > this.heap[currentNodeParentIdx].priority\n ) {\n const parent = this.heap[currentNodeParentIdx]; // swap\n this.heap[currentNodeParentIdx] = node;\n this.heap[currentNodeIdx] = parent;\n\n currentNodeIdx = currentNodeParentIdx; // update pointers\n currentNodeParentIdx = Math.floor((currentNodeIdx - 1) / 2);\n }\n }", "function pq_insert(heap, new_element) {\n var eIntIdx = heap.length;\n var prntIdx = Math.floor((eIntIdx - 1 ) / 2);\n heap.push(new_element);\n var heaped = (eIntIdx <= 0) || (heap[prntIdx].priority <= heap[eIntIdx]).priority;\n\n while(!heaped){\n var tmp = heap[prntIdx];\n heap[prntIdx] = heap[eIntIdx];\n heap[eIntIdx] = tmp;\n\n eIntIdx = prntIdx;\n prntIdx = Math.floor((eIntIdx - 1)/2);\n heaped = (eIntIdx <= 0) ||(heap[prntIdx].priority <= heap[eIntIdx].priority);\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.minHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }", "function minheap_insert(heap, new_element) {\n var length = heap.push(new_element);\n var child = length - 1;\n var parent = (child + child%2)/2 - 1;\n while(parent >= 0 && heap[child] < heap[parent]){\n swap(heap,parent,child);\n child = parent;\n parent = (child + child%2)/2 - 1;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "insert(key) {\n /*\n * Add the key to the end of the heap and increment n, then swim up the\n * heap to fix any violations that have arisen.\n */\n this.heap[++this.n] = key;\n this.swim(this.n);\n }", "function minheap_insert(heap, new_element) {\n heap.push(new_element);\n var index = heap.length - 1;\n while(index > 0){\n var parent = Math.floor((index+1)/2)-1;\n if(heap[parent] > new_element){\n var temp = heap[parent];\n heap[parent] = new_element;\n heap[index] = temp;\n }\n index = parent;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function minheap_insert(heap, new_element) \n{\n \n var adj,temp;\n heap.push(new_element);\n for (adj=heap.length-1;adj>0;adj=Math.floor((adj-1)/2))\n {\n if (new_element < heap[Math.floor((adj-1)/2)]) // use to swap those two numbers\n {\n temp = new_element;\n heap[adj] = heap[Math.floor((adj-1)/2)];\n heap[Math.floor((adj-1)/2)] = temp; \n }\n }\n return;\n}", "add(key, value = key) {\n const node = new HeapNode(key, value);\n const i = this.store.push(node) - 1;\n this.heapUp(i);\n // console.log(this.store);\n }", "insert(item) {\n this.heap.push(item);\n this.size++;\n\n // put it at the end\n let i = this.size - 1;\n this.locations.set(this.hash(item), i);\n\n while (i > 0) {\n let parent = this.parentIndex(i);\n\n if (this.validParent(i, parent))\n break;\n\n // swap item places\n this.heap[i] = this.heap[parent];\n this.heap[parent] = item;\n\n // set locations on the swap\n this.locations.set(this.hash(item), parent);\n this.locations.set(this.hash(this.heap[i]), i);\n\n i = parent;\n }\n }", "insert(val) {\n if (typeof val === 'undefined') return;\n this.storage.push(val);\n this.bubbleUp(this.storage.length - 1);\n this.size++;\n // console.log('val: ',val, ' storage: ', this.storage.toString());\n }", "insert(val) {\n if (this.storage[0] === null) {\n this.storage[0] = val;\n this.size++;\n return;\n }\n this.storage.push(val);\n this.size++;\n this.bubbleUp(this.size - 1);\n }", "add(value) {\r\n this.heapContainer.push(value);\r\n this.heapifyUp();\r\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "insert(key, value) {\n let index = this._hash(key, this._tableSize);\n\n if (!this._storage[index]) this._storage[index] = new LinkedList();\n\n let pair = new LinkedList(key);\n pair.add(value);\n this._storage[index].add(pair);\n this._currentSize++;\n\n if (this._isHalfSizeReached()) {\n this._resizing();\n }\n }", "function insert(arr, num) {\n console.log('Heap')\n console.log(arr)\n console.log('inserting: '+num)\n arr.push(num)\n console.log(arr)\n\n var childPos = arr.length-1\n var parentPos = Math.floor((arr.length-1)/2)\n var child = arr[childPos]\n var parent = arr[parentPos]\n\n console.log('child: '+child)\n console.log('child position: '+childPos)\n console.log('parent: '+parent)\n console.log('parent position: '+parentPos)\n\n recurse()\n\n function recurse() {\n if (parent === undefined){return}\n if(child >= parent){\n return arr\n }\n console.log('Child is less than parent, swapping...')\n arr[childPos] = parent\n arr[parentPos] = child\n console.log('new array')\n console.log(arr)\n\n childPos = parentPos\n console.log('new child: '+child)\n console.log('new child position: '+childPos)\n\n parentPos = Math.floor((parentPos-1)/2)\n parent = arr[parentPos]\n console.log('new parent: '+parent)\n console.log('new parent position: '+parentPos)\n\n\n return recurse(child, parent)\n }\n}", "push(value){\r\n this.top += 1;\r\n this.storage[this.top] = value;\r\n }", "insert_num(num) {\n // Insert a number if the num is less than the top ele in maxHeap, or maxHeap top is null\n if (!this.maxHeap.values.length || this.maxHeap.peek() >= num) {\n this.maxHeap.insert(num);\n } else {\n this.minHeap.insert(num);\n }\n\n // Rebalance the heaps. Max heap should have 1 extra element if total num of elements is odd\n if (this.maxHeap.values.length > this.minHeap.heap.length + 1) {\n this.minHeap.insert(this.maxHeap.extractMax());\n } else if (this.maxHeap.values.length < this.minHeap.heap.length) {\n this.maxHeap.insert(this.minHeap.remove());\n }\n }", "insert(key, value) {\n const index = getIndexBelowMax(key.toString(), this.limit);\n const bucket = this.storage.get(index);\n this.doubleStorage();\n if (bucket === undefined) {\n this.storage.set(index, [[key, value]]);\n return;\n }\n for (let i = 0; i < bucket.length; i++) {\n if (bucket[i][0] === key) {\n bucket[i][1] = value;\n this.storage.set(index, bucket);\n return;\n }\n }\n bucket.push([key, value]);\n this.storage.set(index, bucket);\n }", "_insert(node, value) {\n if (node === null) {\n return new Node(value, null, null);\n }\n\n // Passing to childnodes and update\n var side = ~~(value > node.value);\n node.children[side] = this._insert(node.children[side], value);\n\n // Keep it balance\n if (node.children[side].key < node.key) {\n return node.rotate(side);\n }\n return node.resize();\n }", "insert(value) {\n if (value === this.key) {\n return;\n }\n\n if (value < this.key) {\n if (this.left) {\n return this.left.insert(value);\n }\n\n this.left = new Node(value);\n\n return value;\n }\n\n if (this.right) {\n return this.right.insert(value);\n }\n\n this.right = new Node(value);\n\n return value;\n }", "insert(value) {\n this.storage.push(value);\n this.bubbleUp();\n }", "insert(value) {\n this.head = new Node(value, this.head);\n }", "push(value) {\n if (!this.top) {\n this.top = new NodeWithMin(value, value);\n this.min = this.top.min;\n } else { // this.top is present on the stack\n let newMin = Math.min(value, this.min);\n let newTop = new NodeWithMin(value, newMin);\n newTop.next = this.top;\n this.top = newTop;\n this.min = newMin;\n }\n }", "insert (key, value) {\n value = value || key;\n\n //leafs need to insert the value at themself and make new leaf children\n if(this.height == 0) {\n this.key = key;\n this.value = value || key;\n this.left = new BinarySearchTree(this);\n this.right = new BinarySearchTree(this);\n this.height = 1;\n this.numLeftChildren = 1;\n this.numRightChildren = 1;\n return;\n }\n\n if(key == this.key) return;\n\n if(key < this.key) {\n this.numLeftChildren++;\n this.left.insert(key);\n this.height = Math.max(this.height, 1 + this.left.height);\n }\n if(key >= this.key) {\n this.numRightChildren++;\n this.right.insert(key);\n this.height = Math.max(this.height, 1 + this.right.height);\n }\n\n this.rebalance();\n }", "insert(i, key) {\n\t\tea && assert(i > 0 && this.valid(i),\n\t\t\t\t\t `ArrayHeap.insert: invalid item ${i}`);\n\t\tif (this.contains(i)) { this.changekey(i,key); return; }\n\t\tif (i > this.n) this.expand(i);\n\t\tthis.#key[i] = key - this.#offset; this.#m++; this.siftup(i, this.m);\n\t}", "insert(val){\r\n this.values.push(val);\r\n this.bubbleUp();\r\n }", "enqueue(value, priority) {\n const newEntry = new Entry(value, priority);\n this.values.push(newEntry);\n let curr = this.values.length - 1;\n let parent = Math.floor((curr - 1) / 2);\n while (\n curr > 0 &&\n this.values[parent].priority > this.values[curr].priority\n ) {\n const temp = this.values[parent];\n this.values[parent] = this.values[curr];\n this.values[curr] = temp;\n curr = parent;\n parent = Math.floor((curr - 1) / 2);\n }\n }", "insert(value) {\n if (value < this.value) {\n if (this.left === null) {\n this.left = new BinarySearchTree(value);\n } else {\n this.left.insert(value);\n }\n } else if (value > this.value) {\n if (this.right === null) {\n this.right = new BinarySearchTree(value);\n } else {\n this.right.insert(value);\n }\n }\n }", "insert(value) {\n if (!this.head) {\n return this.push(value);\n } else {\n let temp = this.head;\n while (temp.forward.value > temp.value && value > temp.forward.value) {\n temp = temp.forward;\n }\n temp.forward = new Node(value);\n temp.forward.back = temp;\n temp.forward.forward = this.head;\n }\n this.size++;\n return true;\n }", "function heapAddNode(){\n setClass(nodes[heapSize], 2, \"Current\"); //set the first Node to the heap\n currentHeapPosition = heapSize;\n addStep(\"Add Node \" + (heapSize + 1) + \" to the heap and set it to \\\"current\\\".\");\n makeHeapStep = 2;\n}", "insertKeyValuePair(key, value) {\r\n if (!(key in this.cache)) {\r\n if (this.currentSize === this.maxSize) {\r\n this.evictLeastRecent();\r\n } else {\r\n this.currentSize++;\r\n }\r\n this.cache[key] = new DoublyLinkedListNode(key, value);\r\n } else {\r\n this.replaceKey(key, value);\r\n }\r\n this.updateMostRecent(this.cache[key]);\r\n }", "insert(value) {\n this.values.push(value)\n let index = this.values.length - 1\n let parentIndex \n while (!!index) {\n parentIndex = Math.floor((index-1)/2)\n if (this.values[parentIndex]>this.values[index]) break\n this.values[index] = this.values[parentIndex]\n this.values[parentIndex] = value\n index = parentIndex\n }\n return this\n }", "function insert() {\n var value = Math.floor(Math.random() * 9999);\n console.log(\"INS \" + value);\n values.push(value);\n tree.insert(value);\n}", "insert(item, priority) {\n if (item == null) return;\n if (item in this._indexLookup) {\n return this.changePriority(item, priority);\n }\n\n this._indexLookup[item] = this._size;\n this._priorityHeap.push(priority);\n this._elementHeap.push(item);\n\n this._fixTopHeap(this._size);\n this._size++;\n }", "insertKeyValuePair(key, value) {\n if (!(key in this.cache)) {\n if (this.currentSize === this.maxSize) {\n this.evictLeastRecent();\n } else {\n this.currentSize++;\n }\n this.cache[key] = new DoublyLinkedListNode(key, value);\n } else {\n this.replaceKey(key, value);\n }\n this.updateMostRecent(this.cache[key]);\n }", "enqueue(val, priority) {\r\n let newNode = new Node(val, priority);\r\n this.values.push(element);\r\n this.bubbleUp();\r\n }", "push(value) {\n const newNode = new _Node(value);\n\n // 先判斷top目前是否為null (表示目前this.top沒有任何節點)\n if (this.top === null) {\n this.top = newNode;\n return;\n }\n\n // 如果已經有節點存在,把目前this.top的節點地址傳給 寫入新節點的.next property\n // 這時候目前this.top所代表的節點已經儲存在newNode.next\n newNode.next = this.top;\n this.top = newNode; // 用新節點取代、並作為新的this.top\n }", "enqueue(value, priority){\n let newNode = new Node(value, priority);\n this.values.push(newNode);\n this.bubbleUp();\n }", "push(value) {\n\t\tconst newNode = new Node(value);\n\t\tif (this.length == 0) {\n\t\t\tthis.top = newNode;\n\t\t\tthis.bottom = newNode;\n\t\t} else {\n\t\t\tconst holdingPointer = this.top;\n\t\t\tthis.top = newNode;\n\t\t\tthis.top.next = holdingPointer;\n\t\t}\n\t\tthis.length++;\n\t}", "insert(key, value) {\n const index = getIndexBelowMax(key, this.limit);\n // let bucket = this.storage[index];\n if (!this.storage.hasOwnProperty(index)) {\n this.storage.storage[index] = [];\n }\n if(!this.storage.storage[index].hasOwnProperty(key)){\n this.limit++;\n this.storage.limit++;\n }\n this.storage.storage[index] = [key, value];\n //this.storage.set(key, index);\n // return this.storage[index][key];\n // return this.storage[index];\n }", "insert(k, v) {\n var index = getIndexBelowMaxForKey(k, this._limit);\n var indexBucket = this._storage.get(index);\n \n if (indexBucket === undefined) {\n this._storage.set(index, [[k, v]]); \n } else { \n for (var i = 0; i < indexBucket.length; i++) {\n if (indexBucket[i][0] === k) {\n indexBucket[i][1] = v;\n } else {\n indexBucket.push([k, v]); \n }\n }\n this._storage.set(index, indexBucket);\n }\n }", "push(value) {\n if (!this.head) {\n this.head = new Node(value);\n this.head.forward = this.head;\n this.head.back = this.head;\n } else if (this.head.back.value < value) {\n let temp = this.head.back;\n\n temp.forward = new Node(value);\n temp.forward.back = temp;\n temp.forward.forward = this.head;\n\n this.head.back = temp.forward;\n } else {\n return false;\n }\n\n this.size++;\n return true;\n }", "insert(key, value) {\n if (!isNaN(key) && key < this.limit) {\n this.storage.set(key, value);\n this.storage.incrementLength();\n } else if (this.storage.get(getIndexBelowMax(key)) !== undefined || null) {\n const current = this.storage.get(getIndexBelowMax(key));\n const newArray = [[0, current], [key, value]];\n this.storage.set(getIndexBelowMax(key), newArray);\n this.storage.incrementLength();\n } else {\n this.storage.set(getIndexBelowMax(key), value);\n this.storage.incrementLength();\n }\n if (this.storage.length >= (0.75 * this.limit)) {\n this.limit *= 2;\n }\n }", "insertKey(k) {\n\n this.harr.push(k)\n let i = this.harr.length - 1\n\n let parentInd = this.parent(i)\n\n while (i != 0 && parentInd > harr[i]) {\n\n this.swap(i, parentInd)\n\n i = parentInd\n parentInd = this.parent(i)\n\n }\n\n }", "insert(value){\n if (this.head === null){\n this.head = new Node(value);\n }\n }", "insert(key, value) {\n this.root = this._insert(key, value, this.root);\n }", "push(value) {\n const node = new Node(value);\n if (!this.top) this.top = node;\n else {\n node.next = this.top;\n this.top = node;\n }\n }", "insert(value) {\n let newNode = new Node(value);\n if (!this.root) {\n return this.root = newNode;\n } else {\n let current = this.root;\n while (current) {\n if (value < current.value) {\n if (!current.left) {\n return current.left = newNode;\n }\n current = current.left;\n } else {\n if (!current.right) {\n return current.right = newNode;\n }\n current = current.right;\n }\n }\n }\n }", "insert(index_num, value){\n if(index_num<0 || index_num>this.length){\n console.log(\"INSERT - false\");\n return false;\n }\n if(index_num===0){\n this.unshift(value);\n console.log(\"INSERT using UNSHIFT - true\");\n return true;\n } \n if(index_num===this.length){\n this.push(value);\n console.log(\"INSERT using PUSH - true\");\n return true;\n } \n let newNode = new Node(value);\n let before_position = this.get(index_num-1); // 1. we neet to find item at the position one before!!\n let needed_position = before_position.next;\n before_position.next = newNode;\n newNode.next = needed_position;\n this.length +=1;\n console.log(\"INSERT - true\");\n return true;\n }", "insert (key, value) {\n const newTree = this.tree.insert(key, value)\n\n // If newTree is undefined, that means its structure was not modified\n if (newTree) { this.tree = newTree }\n }", "insert (key, value) {\n // Empty tree, insert as root\n if (!Object.prototype.hasOwnProperty.call(this, 'key')) {\n this.key = key\n this.data.push(value)\n return\n }\n\n // Same key as root\n if (this.compareKeys(this.key, key) === 0) {\n if (this.unique) {\n const err = new Error(`Can't insert key ${key}, it violates the unique constraint`)\n err.key = key\n err.errorType = 'uniqueViolated'\n throw err\n } else this.data.push(value)\n return\n }\n\n if (this.compareKeys(key, this.key) < 0) {\n // Insert in left subtree\n if (this.left) this.left.insert(key, value)\n else this.createLeftChild({ key: key, value: value })\n } else {\n // Insert in right subtree\n if (this.right) this.right.insert(key, value)\n else this.createRightChild({ key: key, value: value })\n }\n }", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "insert ( value ) {\n const node = new Node( value )\n\n if ( this.head === null ) {\n this.head = node\n this.tail = node\n } else {\n this.tail.next = node\n node.prev = this.tail\n this.tail = node\n }\n\n this.count++\n }", "insert(value) {\n this.count++;\n let newNode = new Node(value)\n const searchTree = (node) => {\n // if value < node.value, go left\n if (value < node.value) {\n // if no left child, append new node\n if (!node.left) {\n node.left = newNode; \n // if left child, look left again\n } else {\n searchTree(node.left);\n }\n }\n // if value > node.value, go right\n if (value > node.value ) {\n // if no right child, append new node\n if (!node.right) {\n node.right = newNode;\n // if right child, look right again\n } else {\n searchTree(node.right);\n }\n }\n }\n searchTree(this.root);\n }", "function push(val) {\n stack[++topp] = val;\n \n}", "push(value) {\n this.stackData.push(value);\n this.length++;\n if (this.length === 1) {\n this.bottom = this.stackData[0];\n }\n this.top = this.stackData[this.length - 1];\n }", "push(value) {\n //1. Push value in mainStack and check that value with the top value of minStack\n //2. If the pushed value is greater than the value of top, then push top in minStack\n //else push the value in minStack\n this.mainStack.push(value)\n\n if (value > this.minStack.getTop() && !this.minStack.isEmpty())\n this.minStack.push(this.minStack.getTop())\n else\n this.minStack.push(value)\n \n }", "enqueue(val, priority) {\n if (!val || priority < 0) return false;\n\n const newNode = new Node(val, priority),\n VALS = this.values;\n\n // new node gets inserted at the end of the queue\n VALS.push(newNode);\n\n // if there's only one item, nothing else needs to be done\n if (VALS.length === 1) return this;\n\n // grab the index of the newly inserted node\n let nIdx = VALS.length - 1;\n\n while (true) {\n // calculate the new node's parent's index\n let pIdx = Math.floor((nIdx - 1) / 2);\n\n // as long as nIdx is greater than zero\n // (to prevent out-of-bound indices)\n // and the priority of the value at nIdx\n // is higher (i.e. the number is smaller)\n if (nIdx && VALS[nIdx].priority < VALS[pIdx].priority) {\n // keep swapping and recalculating indices\n this.swapNodes(pIdx, nIdx);\n nIdx = pIdx;\n } else return this;\n }\n }", "insert(key, value) {\n let index = this.makeHash(key);\n let bucket = this.storage[index];\n let item = new Node(key, value);\n \n // Create a new bucket if none exist\n if (!bucket) {\n bucket = new List(item);\n this.storage[index] = bucket; \n bucket.count++;\n this.count++;\n \n return 'New bucket created';\n } \n else {\n let current = bucket.head;\n \n // If the head has null next it is there is only one node in the list\n if (!current.next) {\n current.next = item;\n }\n else {\n // move to the end of the list\n while(current.next) {\n current = current.next;\n }\n \n current.next = item;\n }\n bucket.count++;\n this.count++;\n \n return 'New item placed in bucket at position ' + bucket.count;\n }\n }", "insert(index, value) {\n const newNode = new Node(value);\n const leader = this.traverseToIndex(index);\n const holdingPointer = leader.next;\n leader.next = newNode;\n newNode.next = holdingPointer;\n this.length++;\n \n }", "push (value) {\n const newNode = new Node(value)\n\n if (this.length === 0) {\n this.top = newNode\n this.bottom = newNode\n } else {\n newNode.next = this.top\n this.top = newNode\n }\n\n this.length++\n // this.printStack()\n }", "modify(item, priority) {\n let location = this.locations.get(this.hash(item));\n\n if (location === null || location === undefined)\n throw Error(\"This object doesn't exist in the heap\");\n\n // remove and re-add\n let heapItem = this.heap.splice(location, 1);\n this.locations.delete(this.hash(heapItem));\n\n // modify\n if (this.priorityName) {\n heapItem = item;\n heapItem[this.priorityName] = priority;\n }\n else\n heapItem = priority;\n\n // add to beginning and sink\n this.heap.unshift(item);\n this.locations.set(this.hash(item), 0);\n this.heapify(0);\n }", "insert(value) {\n let swapCompleted = false;\n const newNode = new BinarySearchTree(value);\n let root = this;\n \n while (!swapCompleted) {\n if (root.value >= value) {\n if (!root.left) {\n root.left = newNode;\n swapCompleted = true;\n }\n root = root.left;\n } else {\n if (!root.right) {\n root.right = newNode;\n swapCompleted = true;\n }\n root = root.right;\n } \n }\n return newNode; \n }", "push(val) {\n if (this.top == this.length - 1)\n return -999;\n this.stack[++this.top] = val;\n return 1;\n }", "function setToHeap(){\n addStep(\"Current Node \" + (currentHeapPosition + 1) + \" is less than or equal to it's parent node \" + (heapParentIndex + 1) + \" the node is now in the heap proper.\");\n setClass(nodes[heapParentIndex], 2, \"Relevant\");\n setClass(nodes[currentHeapPosition], 2, \"Relevant\");\n heapSize++;\n makeHeapStep = 1;\n}", "function insert(store, value, maxQueueSize) {\n return store(store => {\n return keys(store).then(keys => {\n if (keys.length >= maxQueueSize) {\n return;\n }\n\n // We insert with an incremented key so that the entries are popped in order\n store.put(value, Math.max(...keys, 0) + 1);\n return promisifyRequest(store.transaction);\n });\n });\n}", "insert(value) {\n if (!value) { return 'Please pass a value to be added'; }\n const newNode = new Node(value, this.head);\n this.head = newNode;\n return this;\n }", "insert(index,value) {\n if (index < 0 || index>this.length){\n throw new Error('Index error')\n }\n if (this.length >= this._capacity){\n \n this._resize((this.length + 1)*Array.SIZE_RATIO)\n \n }\n Memory.copy(this.ptr+index+1,this.ptr+index,this.length-index)\n this.length ++\n this.set(index,value)\n \n }", "insert(ind, val) {\n let nodeAtIndex = this.get(ind);\n let nodeAtPriorIndex = this.get(ind - 1);\n let newNode = new Node(val);\n\n if (ind > length || ind < 0 || this.length === 0) return;\n if (nodeAtIndex && nodeAtPriorIndex) {\n nodeAtPriorIndex.next = newNode;\n newNode.next = nodeAtIndex;\n this.length += 1;\n return true;\n } else if (!nodeAtIndex && nodeAtPriorIndex) {\n !!this.push(val);\n } else if (nodeAtIndex && !nodeAtPriorIndex) {\n !!this.unshift(val);\n }\n }", "push(val) {\n this._storage[this._length] = val; \\\n this._length++;\n }", "heapUp(index) {\n if (index <= 0) return;\n \n const parentIndex = this.parentIndex(index);\n if (this.store[index].key < this.store[parentIndex].key) {\n this.swap(index, parentIndex);\n this.heapUp(parentIndex);\n }\n }", "insert(index, value) {\n if (index < 0 || index >= this.length) {\n throw new Error(\"Index error\");\n }\n if (this.length >= this._capacity) {\n this._resize((this.length + 1) * Array.SIZE_RATIO);\n }\n memory.copy(this.ptr + index + 1, this.ptr + index, this.length - index);\n memory.set(this.ptr + index, value);\n this.length++;\n }", "insert(index, value) {\n if(index < 0 || index >= this.length) {\n throw new Error('Index error')\n }\n if(this.length >= this._capacity) {\n this._resize((this.length + 1) * this.ARRAY_SIZE_RATIO)\n }\n memory.copy(this.ptr + index + 1, this.ptr + index, this.length - index)\n //[1,2,3] ==> [1,2,2,3]\n memory.set(this.ptr + index, value)\n //[1, value, 2, 3]\n this.length++\n }", "replace(/*MinHeapNode*/ root) {\n this.harr[0] = root;\n this.heapify(0);\n }", "insert(element) {\n this.values.push(element)\n this._bubbleUp()\n }", "enqueue(value, priority) {\n let newElement = new Node(value, priority);\n if (!this.root) {\n this.root = newElement;\n return this;\n }\n\n const queue = new Queue(this.root);\n while (queue.peek()) {\n // loop while there are not empty spaces | ensures that the queue is as compact as possible\n const node = queue.dequeue();\n if (node.left) queue.enqueue(node.left);\n else {\n // I can insert on the left\n newElement.parent = node;\n node.left = newElement;\n this._updateLowestPriority(newElement);\n this._bubbleUp(newElement);\n return this;\n }\n if (node.right) queue.enqueue(node.right);\n else {\n //I can insert on the right\n newElement.parent = node;\n node.right = newElement;\n this._updateLowestPriority(newElement);\n this._bubbleUp(newElement);\n return this;\n }\n }\n }", "enqueue(element, priority){\n var newElement = new QueueEntry(element, priority);\n var valueExists = false; \n\n for(var i = 0; i < this.items.length; i++){\n if(this.items[i].priority > newElement.priority) {\n this.items.splice(i, 0, newElement);\n valueExists = true; \n break; \n }\n }\n if(!valueExists){\n this.items.push(newElement);\n }\n }", "insert(value){\n let node = new Node(value);\n node.next = this.head;\n this.head = node;\n }", "push(val){\n var newNode = new Node(val);\n if(this.isEmpty()){\n this.top = newNode;\n this.bottom = newNode;\n }\n else{\n newNode.next = this.top;\n this.top = newNode;\n }\n this.length++;\n return this;\n }", "insert(data) {\n const node = new Node(data, this.head);\n this.head = node;\n }", "insert(priority, data) {\n this.fpq.add({priority, data});\n }", "push(val) {\n\n\n }", "function insertSorted(arr, val) {\n arr.push(val);\n var i = arr.length - 1;\n while (i > 0 && arr[i - 1] > val) {\n arr[i] = arr[i - 1];\n i--;\n }\n arr[i] = val;\n}", "insert(index, val){\n if(index < 0 || index > this.length) return undefined;\n if(index === 0) return !!this.unshifting(val);\n if(index === this.length) return !!this.push(val);\n \n let newNode = new Node(val);\n let beforeNode = this.get(index-1);\n let afterNode = beforeNode.next;\n\n beforeNode.next = newNode;\n newNode.prev = beforeNode;\n afterNode.prev = newNode;\n newNode.next = afterNode;\n\n this.length++;\n console.log(true);\n }", "insert(key, obj)\r\n {\r\n this.#table[int(this.#hash(key) & this.#divisor)].push(new HashEntry(key, obj));\r\n this.#count++;\r\n }", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "push(value) {\n const newNode = new Node(value);\n //validamos si el stack está vacio\n if (this.length === 0) {\n this.top = newNode;\n this.bottom = newNode;\n } else {\n /**\n * al agregar un nuevo elemento, el node que en este momento esta en el top debe dejar de ser el top y el nuevo elemento\n * se convertirá en el top\n */\n const holdingPointer = this.top;\n //el newNode se convierte en el top del stack\n this.top = newNode;\n //top.next representa al nodo que está debajo del top\n this.top.next = holdingPointer;\n }\n\n this.length++;\n\n return this;\n }", "insert(index, value) {\n if (index >= this.length) {\n return this.append(value);\n }\n\n const node = new Node(value);\n const leader = this.traverseToIndex(index - 1);\n const holdingPointer = leader.next;\n leader.next = node;\n node.next = holdingPointer;\n this.length++;\n return this.printList();\n }", "insert(index, value) {\n if (index < 0 || index > this.length) {\n return false;\n } else if (index === 0) {\n return this.unshift(value);\n } else if (index === this.length) {\n return this.push(value);\n } else {\n const newNode = new Node(value);\n let prev = this.get(index - 1);\n let curr = prev.next;\n prev.next = newNode;\n newNode.next = curr;\n this.length++;\n return this;\n }\n }", "buildHeap(left, right) {\r\n var x = this.values[left];\r\n var i = left;\r\n\r\n while(true) {\r\n let j = 2 * i;\r\n if (j > right) break;\r\n if ((j < right) && (Item.compare(this.values[j + 1], this.values[j]) >= 0)) {\r\n j++;\r\n }\r\n\r\n if (Item.compare(x, this.values[j]) >= 0) break;\r\n let temp = this.values[i];\r\n this.values[i] = this.values[j];\r\n this.values[j] = temp;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n i = j;\r\n }\r\n\r\n this.values[i] = x;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n }", "push(value) {\n ListNode.link(this.tail.prev, new ListNode(value));\n this.length ++;\n }", "push(value) {\n if (this.size == 0) {\n this.front = new LinkedListNode(value);\n this.back = this.front;\n } else {\n this.back.next = new LinkedListNode(value);\n this.back = this.back.next;\n }\n this.size++;\n }", "insert(k, v) {\n var index = getIndexBelowMaxForKey(k, this._limit);\n if (Array.isArray(this._storage[index])) {\n var oldIndex = this._storage[index].findIndex(function(pair) {\n return pair[0] === k; \n });\n if (oldIndex >= 0) {\n this._storage[index][oldIndex].splice(1, 1, v);\n } else if (oldIndex === -1) {\n this._storage[index].push([k, v]);\n }\n\n } else {\n this._storage[index] = [[k, v]]; \n }\n //constant if no collision else linear\n }", "push(val){\n let newNode = new Node(val);\n if(!this.first) {\n this.first = newNode;\n this.last = newNode;\n } else {\n let oldFirst = this.first;\n this.first = newNode;\n this.first.next = oldFirst;\n }\n return ++this.size; \n }", "insert(key, value) {\n let hash = hashFunction(key);\n if(this.table[hash] === null) {\n this.table[hash] = new LinkedData(key, value);\n return true;\n }\n else {\n let head = this.table[hash];\n while(head.next !== null) head = head.next;\n head.next = new LinkedData(key, value);\n return true;\n }\n }" ]
[ "0.863833", "0.8331561", "0.8072703", "0.8005249", "0.7808851", "0.7681502", "0.765279", "0.75567305", "0.75504696", "0.7541238", "0.751654", "0.74698555", "0.7361416", "0.734068", "0.71542877", "0.7149954", "0.71396136", "0.7095043", "0.70502484", "0.70256126", "0.6946853", "0.6905115", "0.6869419", "0.68442136", "0.6833562", "0.6806596", "0.6759595", "0.67296135", "0.67260015", "0.672379", "0.6701905", "0.66944844", "0.6634053", "0.6627262", "0.65436083", "0.6518966", "0.65167624", "0.65120023", "0.6511806", "0.6501889", "0.6496654", "0.64791894", "0.64579725", "0.6454874", "0.6441015", "0.64368397", "0.6416161", "0.64151984", "0.64044183", "0.636769", "0.6365101", "0.6362858", "0.6360245", "0.63431966", "0.6339929", "0.6310419", "0.6301537", "0.6274993", "0.62709904", "0.6270006", "0.62691367", "0.62672734", "0.6252719", "0.6249277", "0.62226737", "0.6209372", "0.6204512", "0.6164609", "0.61596674", "0.6158491", "0.615456", "0.61528337", "0.61496437", "0.61493427", "0.6148515", "0.6139815", "0.6139669", "0.61382455", "0.613205", "0.6104002", "0.6099081", "0.6098917", "0.6087798", "0.6074264", "0.6071602", "0.6064767", "0.6057246", "0.60561955", "0.6055963", "0.6055622", "0.6047691", "0.60388327", "0.60331166", "0.6027156", "0.6023851", "0.6023145", "0.6022469", "0.601703", "0.6014558", "0.6013258" ]
0.7637742
7
remove a specific value from the heap
remove(data) { const size = this.heap.length; let i; for (i = 0; i < size; i++) { if (data === this.heap[i]) { break; } } [this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]]; this.heap.splice(size - 1); for (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) { this.maxHeapify(this.heap, this.heap.length, i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n // Swap root value with last element in the heap\n // Pop the last element from heap array\n // Perform siftDown to correct position of swapped value\n // Return popped value\n this.swap(0, this.heap.length - 1, this.heap);\n const valueToRemove = this.heap.pop();\n this.siftDown(0, this.heap.length - 1, this.heap);\n \n return valueToRemove;\n }", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.minHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "removeMin() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "remove() {\n if (this.isEmpty()) return;\n this.swap(0, this.store.length - 1);\n const { value } = this.store.pop();\n if (!this.isEmpty()) this.heapDown(0);\n return value;\n }", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "remove(element,comparator=this.compare){\r\n let totalOccurenceOfElement=this.find(element,comparator).length;\r\n for(let i=0;i<totalOccurenceOfElement;i++){\r\n let removeIndex=this.heapContainer.findIndex((x)=> comparator.equal(x,element)); // findIndex is used for finding first found element's index\r\n let heapSize=this.heapContainer.length;\r\n // if the element is at last index simply remove it as we\r\n // don't need to haepify\r\n if(removeIndex===heapSize-1){\r\n this.heapContainer.pop();\r\n }\r\n else{\r\n this.heapContainer[removeIndex]=this.heapContainer[heapSize-1]; \r\n this.heapContainer.pop();\r\n let parentElement=this.getParent(removeIndex);\r\n let elementAtRemovedIndex=this.heapContainer[removeIndex];\r\n // if at index where the element is removed does not have a parent element that means it was on root and we cannot go up to heapify and alternately if the parent element\r\n // is in right order as compare to the new element that is moved to removed index that means we dont' have to take care of upper part of heap as if it is i right position to parent than it will also be in correct position to it's\r\n // parent's parent and we have used hasLeftChild because we only need to heapify down if there exists element in \r\n // down side\r\n if(!parentElement || this.isPairInRightOrder(parentElement,elementAtRemovedIndex) && this.hasLeftChild(removeIndex)){\r\n this.heapifyDown(removeIndex);\r\n }\r\n else{\r\n this.heapifyUp(removeIndex);\r\n }\r\n }\r\n \r\n }\r\n return this;\r\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "delMin() {\n /*\n * Save reference to the min key.\n * Swap the min key with the last key in the heap.\n * Decrement n so that the key does not swim back up the heap.\n * Sink down the heap to fix any violations that have arisen.\n * Delete the min key to prevent loitering, and return its reference.\n */\n let min = this.heap[1];\n\n [this.heap[1], this.heap[this.n]] = [this.heap[this.n], this.heap[1]];\n this.n--;\n this.sink(1);\n this.heap[this.n+1] = null;\n\n return min;\n }", "remove(item) {\n // Find number of items to remove.\n const numberOfItemsToRemove = this.find(item).length;\n\n for (let iteration = 0; iteration < numberOfItemsToRemove; iteration += 1) {\n // We need to find item index to remove each time after removal since\n // indices are being changed after each heapify process.\n const indexToRemove = this.find(item).pop();\n\n // If we need to remove last child in the heap then just remove it.\n // There is no need to heapify the heap afterwards.\n if (indexToRemove === this.heapContainer.length - 1) {\n this.heapContainer.pop();\n } else {\n // Move last element in heap to the vacant (removed) position.\n this.heapContainer[indexToRemove] = this.heapContainer.pop();\n\n // Get parent.\n const parentItem = this.parent(indexToRemove);\n\n // If there is no parent or parent is in correct order with the node\n // we're going to delete then heapify down. Otherwise heapify up.\n if (\n this.hasLeftChild(indexToRemove) &&\n (!parentItem || parentItem <= this.heapContainer[indexToRemove])\n ) {\n this.heapifyDown(indexToRemove);\n } else {\n this.heapifyUp(indexToRemove);\n }\n }\n }\n\n return this;\n }", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "pop(){\r\n if (this.top === -1){\r\n return undefined;\r\n }else{\r\n delete this.storage[this.top];\r\n this.top -= 1;\r\n }\r\n }", "pop(value) {\n if (!this.length) {\n return null;\n }\n const deletedValue = this.stackData.pop();\n this.length--;\n if (!this.length) {\n this.bottom = null;\n this.top = null;\n }\n return deletedValue;\n }", "heapDown(index) {\n const [leftIndex, rightIndex] = this.children(index);\n \n if (!leftIndex && !rightIndex) return;\n\n let min;\n rightIndex ? min = rightIndex : min = leftIndex;\n if ((leftIndex && rightIndex) &&\n this.store[leftIndex].key < this.store[rightIndex].key) {\n min = leftIndex;\n }\n\n if (this.store[index].key > this.store[min].key) {\n this.swap(index, min);\n this.heapDown(min);\n }\n }", "removeNode (value) {\n this.nodes.delete(value)\n this.nodes.forEach(node => {\n if (node.includes(value)) {\n let newNodes = node.filter(item => item !== value)\n while (node.length > 0) {\n node.pop()\n }\n newNodes.forEach(item => node.push(item))\n }\n })\n }", "remove(key) {\n this.storage.set(getIndexBelowMax(key), undefined);\n }", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "removeByValue (value) {\n\t\tthis.remove(this.findFirst(value));\n\t}", "function remove() {\n var index = Math.floor(Math.random() * values.length);\n console.log(\"DEL \" + values[index]);\n tree.remove(values[index]);\n values.splice(index, 1);\n}", "delete(value) {\n if (this.head.back === this.head && this.head.value === value) {\n this.head = null;\n } else {\n let temp = this.head;\n\n while (temp.value !== value) {\n if (temp.forward.value <= temp.value) {\n return false;\n }\n temp = temp.forward;\n }\n\n temp.back.forward = temp.forward;\n temp.forward.back = temp.back;\n\n if (temp === this.head) {\n this.head = temp.forward;\n }\n\n delete this.temp;\n }\n this.size--;\n return true;\n }", "pop() {\n //delete the current top values within the stack\n delete this.items[this.top];\n //deduct 1 from the top to show the new top index\n this.top = this.top -1;\n }", "extract() {\n\t\tif (this.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (this.size() === 1) {\n\t\t\treturn this.heap.shift();\n\t\t}\n\t\tconst removedValue = this.heap[0];\n\t\tthis.heap[0] = this.heap.pop();\n\t\tthis.siftDown(0);\n\t\treturn removedValue;\n\t}", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "remove(key) {\n\n // getIndexBelowMax(this.storage[key]);\n }", "remove(value) {\n if (this.head === null) return;\n\n if (this.head.data === value) this.removeFirst();\n\n let prev = this.head;\n let cur = this.head;\n while (cur !== null && cur.data !== value) {\n prev = cur;\n cur = cur.next;\n }\n if (cur !== null) prev.next = cur.next;\n }", "function pqdownheap(tree, k) {\n\t\tvar v = heap[k],\n\t\t\tj = k << 1; // left son of k\n\n\t\twhile (j <= heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < heap_len && SMALLER(tree, heap[j + 1], heap[j])) {\n\t\t\t\tj++;\n\t\t\t}\n\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (SMALLER(tree, v, heap[j])) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t}", "remove(value) {\n let currentNode = this.head;\n\n if (currentNode !== null) {\n if (currentNode.data == value) {\n this.head = currentNode.next;\n this.size--;\n } else {\n let previousNode;\n\n while (currentNode && currentNode.data !== value) {\n previousNode = currentNode;\n currentNode = currentNode.next;\n }\n\n if (currentNode && previousNode) {\n previousNode.next = currentNode.next;\n this.size--;\n } else {\n return `Given ${value} value not found !!!`;\n }\n }\n }\n }", "delete(val) {\n let ind = this.values.indexOf(val)\n if(this.has(val)) {\n this.values.splice(ind, 1);\n }\n }", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "removekey(value) {\n\n this.root = this.remove(this.root, value)\n\n }", "remove() {\n if (this.isEmpty()) throw new Error('Queue is empty!');\n const value = this.first.value;\n this.first = this.first.next;\n this.size--;\n return value;\n }", "function pop(arr, value) {\n var index = arr.indexOf(value);\n if (index > -1) {\n arr.splice(index, 1);\n }\n return arr;\n}", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "removeValue(value) {\n\t\tlet currentNode = this.head\n\t\tlet index = 0\n\n\t\twhile (value != currentNode.value) {\n\t\t\tcurrentNode = currentNode.next\n\t\t\tindex++\n\t\t}\n\t\treturn this.remove(index)\n\t}", "removeNode() {\n let root;\n if (!this.data.length) {\n return;\n }\n if (this.data.length === 1) {\n root = this.data.pop();\n } else {\n root = this.data[0];\n this.data[0] = this.data[this.data.length - 1];\n this.data = this.data.slice(0, this.data.length - 1);\n }\n\n this.usage.delete(root);\n this.heapifyDown(0);\n this.store.setItem(this.key + \"_searchData\", this.data);\n this.store.setItem(this.key + \"_searchUsageMap\", this.usage);\n return root;\n }", "function remove(root, value) {\n //Exits and link updating/traversal is similar to \"put\"\n if (root == null) return null;\n\n if (value < root.value) root.left = remove(root.left, value);\n else if (value > root.value) root.right = remove(root.right, value);\n else {\n\n //Cases: 0, 1 or multiple children\n //0: Drop parent link\n //1: Linked list style, replace parent\n //2: Find successor of t, delete minimum in t's right subtree, x in t's original spot\n\n if (root.right == null) return root.left;\n if (root.left == null) return root.right;\n var t = _.cloneDeep(root);\n root = min(t.right);\n root.right = deleteMin(t.right);\n root.left = t.left;\n }\n root.size = size(root.left) + size(root.right) + 1;\n return root;\n}", "remove(value) {\n this.root = this.removeVisitor(this.root, value)\n }", "siftDown(index) {\n\t\tlet element = index;\n\t\tconst left = this.getLeftIndex(index);\n\t\tconst right = this.getRightIndex(index);\n\t\tconst size = this.size();\n\t\tif (\n\t\t\tleft < size &&\n\t\t\tthis.compareFn(this.heap[element], this.heap[left]) ===\n\t\t\t\tCompare.BIGGER_THAN\n\t\t) {\n\t\t\telement = left;\n\t\t}\n\t\tif (\n\t\t\tright < size &&\n\t\t\tthis.compareFn(this.heap[element], this.heap[right]) ===\n\t\t\t\tCompare.BIGGER_THAN\n\t\t) {\n\t\t\telement = right;\n\t\t}\n\t\tif (index !== element) {\n\t\t\tswap(this.heap, index, element);\n\t\t\tthis.siftDown(element);\n\t\t}\n\t}", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "remove(value) {\n this.root = this.removeNode(thisroot, value);\n }", "remove(value) {\n let currentNode = this.head;\n\n while (currentNode.next.value !== value) {\n currentNode = currentNode.next;\n }\n const removed = currentNode.next.value;\n currentNode.next = currentNode.next.next;\n return removed;\n }", "pop(value){\n if(!this.first) return null;\n var removed;\n if(this.length===1){\n removed = this.first;\n this.first= null;\n this.last = null\n }\n else {\n removed = this.first;\n this.first= this.first.next;\n \n }\n this.length--;\n return removed;\n\n }", "pop(){\n if (!this.head) {\n return null;\n }\n var removed = this.head.value;\n this.head = this.head.next;\n this.length--;\n return removed;\n }", "modify(item, priority) {\n let location = this.locations.get(this.hash(item));\n\n if (location === null || location === undefined)\n throw Error(\"This object doesn't exist in the heap\");\n\n // remove and re-add\n let heapItem = this.heap.splice(location, 1);\n this.locations.delete(this.hash(heapItem));\n\n // modify\n if (this.priorityName) {\n heapItem = item;\n heapItem[this.priorityName] = priority;\n }\n else\n heapItem = priority;\n\n // add to beginning and sink\n this.heap.unshift(item);\n this.locations.set(this.hash(item), 0);\n this.heapify(0);\n }", "function minheap_extract(heap) {\n swap(heap,0,heap.length - 1);\n var to_pop = heap.pop();\n var parent = 0;\n var child = parent * 2 + 1;\n while(child < heap.length){\n if(child + 1 < heap.length && heap[child] > heap[child + 1]){\n child = child + 1;\n }\n if(heap[child] < heap[parent]){\n swap(heap,child,parent);\n parent = child;\n child = parent * 2 + 1; \n }\n else{\n break;\n }\n }\n return to_pop;\n // STENCIL: implement your min binary heap extract operation\n}", "remove(key) {\r\n const hash = this.calculateHash(key);\r\n if(this.values.hasOwnProperty(hash) && this.values[hash].hasOwnProperty(key)) {\r\n delete this.values[hash][key];\r\n this.numberOfValues--;\r\n }\r\n }", "remove(k) {\n var index = getIndexBelowMaxForKey(k, this._limit);\n var indexBucket = this._storage.get(index);\n for (var i = 0; i < indexBucket.length; i ++) {\n if (indexBucket[i][0] === k) {\n return indexBucket.splice(i, 1);\n }\n }\n }", "remove(val) {\n let index = this.head;\n\n while (index != null) {\n if (index.val == val) {\n index.prev.next = index.next;\n index.next.prev = index.prev;\n this.size -= 1;\n return this;\n }\n\n index = index.next;\n }\n }", "insert(value) {\n // Insert value to the end of array\n // Perform siftUp to correct position of value in the heap tree\n this.heap.push(value);\n this.siftUp(this.heap.length - 1, this.heap);\n }", "extractMin() {\r\n\t\tconst min = this.heap[0];\r\n\t\tthis.remove(min);\r\n\t\treturn min;\r\n\t}", "dequeue() {\n const [next] = this.values;\n this.values[0] = this.values.pop();\n let childLeft, childRight;\n let curr = 0;\n while (true) {\n let childLeftIdx = 2 * curr + 1;\n let childRightIdx = childLeft + 1;\n let swap = null;\n if (childLeftIdx < this.values.length) {\n childLeft = this.values[childLeftIdx];\n if (childLeft.priority > this.values[curr].priority) {\n swap = childLeft;\n }\n\n if (childRightIdx < this.values.length) {\n childRight = this.values[childRight];\n if (\n (swap === null &&\n childRight.priority < this.values[curr].priority) ||\n (swap !== null && childRight < childLeft.priority)\n ) {\n swap = childRightIdx;\n }\n }\n\n if (swap === null) break;\n const temp = this.values[curr];\n this.values[curr] = this.values[swap];\n this.values[swap] = temp;\n curr = swap;\n }\n }\n }", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "remove(tree){\n let replaceWith;\n if(this.left && this.right){\n const next = this.right.getLeftmostChild();\n this.low = next.low;\n this.high = next.high;\n this.intervals = next.intervals;\n this.removeUpdateLimits();\n next.handleRemoval(tree); \n }else{\n this.handleRemoval(tree);\n }\n }", "pop(val) {\n const lastValIndex = this._length - 1;\n if (lastValIndex >= 0) {\n const lastVal = this._storage[lastValIndex];\n delete this._storage[lastValIndex];\n this._length--;\n return lastVal;\n }\n return false;\n }", "function heap(a, lo, hi) {\n var n = hi - lo,\n i = (n >>> 1) + 1;\n while (--i > 0) sift(a, i, n, lo);\n return a;\n }", "remove(value) {\n if (this.size == 0) throw new Error('Linked list is empty');\n if (this.front.value == value) {\n this.front = this.front.next;\n if (this.size == 1) {\n this.back = this.front;\n }\n this.size--;\n return value;\n }\n let curr = this.front;\n while (curr.next) {\n if (curr.next.value == value) {\n curr.next = curr.next.next;\n if (this.back.value == value) {\n this.back = curr;\n }\n this.size--;\n return value;\n } else {\n curr = curr.next; \n }\n }\n return null; \n }", "static removeValue(array, value) {\n for (var tI = array.length - 1; tI >= 0; tI--) {\n if (array[tI] === value) {\n array.splice(tI, 1);\n return tI;\n }\n }\n }", "function heapDown(i) {\n\t var w = heapWeight(i)\n\t while(true) {\n\t var tw = w\n\t var left = 2*i + 1\n\t var right = 2*(i + 1)\n\t var next = i\n\t if(left < heapCount) {\n\t var lw = heapWeight(left)\n\t if(lw < tw) {\n\t next = left\n\t tw = lw\n\t }\n\t }\n\t if(right < heapCount) {\n\t var rw = heapWeight(right)\n\t if(rw < tw) {\n\t next = right\n\t }\n\t }\n\t if(next === i) {\n\t return i\n\t }\n\t heapSwap(i, next)\n\t i = next \n\t }\n\t }", "function heapDown(i) {\n\t var w = heapWeight(i)\n\t while(true) {\n\t var tw = w\n\t var left = 2*i + 1\n\t var right = 2*(i + 1)\n\t var next = i\n\t if(left < heapCount) {\n\t var lw = heapWeight(left)\n\t if(lw < tw) {\n\t next = left\n\t tw = lw\n\t }\n\t }\n\t if(right < heapCount) {\n\t var rw = heapWeight(right)\n\t if(rw < tw) {\n\t next = right\n\t }\n\t }\n\t if(next === i) {\n\t return i\n\t }\n\t heapSwap(i, next)\n\t i = next \n\t }\n\t }", "removeByValue(value) {\n return this.delete(this.getIndexOf(value));\n }", "function pqdownheap(s, tree, k) // deflate_state *s;\n // ct_data *tree; /* the tree to restore */\n // int k; /* node to move down */\n {\n var v = s.heap[k];\n var j = k << 1;\n /* left son of k */\n\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n\n\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n /* Exchange v with the smallest son */\n\n\n s.heap[k] = s.heap[j];\n k = j;\n /* And continue down the tree, setting j to the left son of k */\n\n j <<= 1;\n }\n\n s.heap[k] = v;\n }", "function pqdownheap(s, tree, k) // deflate_state *s;\n // ct_data *tree; /* the tree to restore */\n // int k; /* node to move down */\n {\n var v = s.heap[k];\n var j = k << 1;\n /* left son of k */\n\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n\n\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n /* Exchange v with the smallest son */\n\n\n s.heap[k] = s.heap[j];\n k = j;\n /* And continue down the tree, setting j to the left son of k */\n\n j <<= 1;\n }\n\n s.heap[k] = v;\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "Remove(int, int) {\n\n }", "swim(k) {\n while (k > 1 && this.heap[Math.floor(k/2)].priority > this.heap[k].priority) {\n /*\n * While not at root node, swap k (parent) with k/2 (child) if\n * parent > child. Continue swimming upwards until the invariant holds.\n */\n [this.heap[k], this.heap[Math.floor(k/2)]]\n = [this.heap[Math.floor(k/2)], this.heap[k]];\n k = Math.floor(k / 2);\n }\n }", "remove(index_num){\n if(index_num<0 || index_num>=this.length) return undefined;\n if(index_num===0) return this.shift();\n if(index_num===this.length-1) return this.pop();\n\n let before_position = this.get(index_num-1); // 1. we neet to find item at the position one before!!\n let removed = before_position.next;\n before_position.next = removed.next;\n this.length -=1;\n console.log(\"REMOVE - true\");\n return removed;\n }", "remove(val) {\n\n }", "remove(index) {\n // accept an index.\n // check if the index is less than zero greate than the length and return undefined. \n if(index < 0 || index > this.length) { \n return undefined;\n }\n // if this index is the same as the length - -1 pop\n if(index === this.length - 1 ) { \n return this.pop();\n }\n // if the index is 0 shift. \n if(index === 0) {\n return this.shift();\n }\n // get the node before the target index. \n let beforeTargetNode = this.get(index - 1);\n // set the nedxt prop to the beforeNode to the next of the removednNode. \n let targetNode = this.get(index);\n beforeTargetNode.next = targetNode.next;\n // Decrement the length\n this.length--;\n // return the value of the removedNode\n return targetNode;\n }", "remove(key) {\n let hash = this.hash(key);\n let slot = this.internalArray[hash];\n\n while (slot && slot.key !== key) {\n slot = this.internalArray[++hash % this.INTERNAL_ARRAY_SIZE];\n }\n\n if (slot) {\n const temp = slot.value;\n this.internalArray[hash % this.INTERNAL_ARRAY_SIZE] = null;\n this.counter--;\n this.reHash();\n return temp;\n } else {\n return undefined;\n }\n }", "function heapDown(i) {\n var w = heapWeight(i)\n while(true) {\n var tw = w\n var left = 2*i + 1\n var right = 2*(i + 1)\n var next = i\n if(left < heapCount) {\n var lw = heapWeight(left)\n if(lw < tw) {\n next = left\n tw = lw\n }\n }\n if(right < heapCount) {\n var rw = heapWeight(right)\n if(rw < tw) {\n next = right\n }\n }\n if(next === i) {\n return i\n }\n heapSwap(i, next)\n i = next \n }\n }", "extractMax() {\r\n\t\tconst max = this.heap[0];\r\n\t\tthis.remove(max);\r\n\t\treturn max;\r\n\t}", "pop() {\n if (!this.first)\n return null;\n const nodeToRemove = this.first;\n this.first = this.first.next;\n this.size--;\n return nodeToRemove.value;\n }", "function pqdownheap(s, tree, k) // deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1;\n /* left son of k */\n\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n\n\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n /* Exchange v with the smallest son */\n\n\n s.heap[k] = s.heap[j];\n k = j;\n /* And continue down the tree, setting j to the left son of k */\n\n j <<= 1;\n }\n\n s.heap[k] = v;\n}", "delete(i) {\n\t\tea && assert(i > 0);\n\t\tif (!this.contains(i)) return;\n\t\tlet j = this.itemAt(this.#m--);\n\t\tif (i != j) {\n\t\t\tif (this.#key[j] <= this.#key[i])\n\t\t\t\tthis.siftup(j, this.#pos[i]);\n\t\t\telse\n\t\t\t\tthis.siftdown(j, this.#pos[i]);\n\t\t}\n\t\tthis.#pos[i] = 0;\n\t}", "remove() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : this.step || 1;\n this.value -= step;\n if (this.value < this.min) {\n this.value = this.min || 0;\n }\n this.setValue(this.value);\n }", "remove(index) {\n //if index > length or smaller then zero then return false\n if (index >= this.length || index < 0) {\n return undefined;\n }\n //if index is equal to 0 then add a new element in front {use unshifting method}\n if (index === 0) {\n return this.shifting();\n\n } else\n //if index is equal to length then add a new element in last {use push method }\n if (this.length === index - 1) {\n return this.pop();\n\n }\n //store the index-1 node as pervious and index-node[to be removed node] as a deletenode\n let previousnode = this.get(index - 1);\n let deletenode = previousnode.next;\n //point the previous node ------> deletenodes.next \n /* [ 12 ----> 34 -----> 45] set the pointer of 12 ---> to point the 45 // instead of 34 \n [ 12 -----> 45] \n */\n previousnode.next = deletenode.next;\n //decreament the list return the value\n this.length--;\n return deletenode.val;\n\n }", "remove() {\n\t\tif(!this.head) return null;\n\t\tlet currentNode = this.head;\n\t\tlet data= this.head.value;\n\t\tlet holdingPointer;\n\t\tif (!this.head.next){\n\t\t\tthis.head = null;\n\t\t\tthis.length--;\n\t\t\treturn data;\n\t\t}\n\t\tif (currentNode){\n\t\t\twhile(currentNode.next){\n\t\t\t\tholdingPointer = currentNode;\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\t\t\tdata = currentNode.value\n\t\t\tholdingPointer.next = null;\n\t\t}\n\t\tthis.length--;\n\t\treturn data;\n\t}", "heapUp(index) {\n if (index <= 0) return;\n \n const parentIndex = this.parentIndex(index);\n if (this.store[index].key < this.store[parentIndex].key) {\n this.swap(index, parentIndex);\n this.heapUp(parentIndex);\n }\n }", "removeNodesWithValue(value) {\n if(!this.head || value === undefined) return\n\n let curr = this.head, next\n while(curr) {\n next = curr.next\n if(curr.value === value) {\n this.remove(curr)\n }\n curr = next\n }\n }", "dequeue() {\n if (this.count === 0) {\n return 0;\n }\n var firstIdx = Object.keys(this.storage)[0];\n var itemToRemove = this.storage[firstIdx];\n delete this.storage[firstIdx];\n this.count -= 1;\n return itemToRemove;\n }", "remove(key) {\n const index = getIndexBelowMax(key.toString(), this.limit);\n const bucket = this.storage.get(index);\n if (Array.isArray(bucket)) {\n for (let i = 0; i < bucket.length; i++) {\n const objKey = bucket[i][0];\n if (objKey === key) {\n bucket.splice(i, 1);\n }\n }\n }\n }", "function pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n {\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n }", "siftUp(currentIdx, heap) {\n // Get parentNode index of node at currentIdx\n let parentIdx = Math.floor((currentIdx - 1) / 2);\n\n // While not at root index\n // Compare value at parentIdx and currentIdx\n // If currentNode < parentNode\n // Peform swap\n // re-calculate currentIdx and parentIdx \n while (currentIdx > 0 && heap[currentIdx] < heap[parentIdx]) {\n this.swap(currentIdx, parentIdx, heap);\n currentIdx = parentIdx;\n parentIdx = Math.floor((currentIdx - 1) / 2);\n }\n }", "function removeAt(arr, value) {\n return arr[value]\n}", "remove (index) {\n if (index < 0 || index > this.length) {\n return undefined\n } \n if (index === this.length - 1) {\n return this.pop()\n }\n if (index === 0) {\n return this.shift()\n }\n\n let preceedingNode = this.get(index-1);\n let nodeToRemove = preceedingNode.next; \n let suceedingNode = nodeToRemove.next; \n\n preceedingNode.next = suceedingNode; \n\n this.length --; \n return nodeToRemove; \n }", "remove(index) {\n if (index < 0 || index >= this.length) {\n return undefined;\n }\n if (index === this.length - 1) {\n return this.pop();\n } else if (index === 0) {\n return this.shift();\n }\n\n let temp = this.get(index - 1);\n let value = temp.next.val;\n temp.next = temp.next.next;\n this.length--;\n return value;\n }", "function pqdownheap(s, tree, k)\n // deflate_state *s;\n // ct_data *tree; /* the tree to restore */\n // int k; /* node to move down */\n {\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n \n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n \n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n }", "dequeue() {\n if (this.tail > this.head) {\n const value = this.storage[this.head];\n delete this.storage[this.head];\n this.head++;\n return value;\n } else {\n return null;\n }\n }", "remove(value) {\n let currentNode = this.head;\n if (this.head.value === value) {\n const temp = this.head.value;\n this.head = this.head.next;\n return temp;\n }\n\n while (currentNode.next.value !== value) {\n currentNode = currentNode.next;\n }\n currentNode.next = currentNode.next.next;\n return this;\n }", "function pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}", "function pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}", "function pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}" ]
[ "0.80592644", "0.771712", "0.75571394", "0.75185335", "0.748075", "0.7324977", "0.7206284", "0.7075653", "0.7057192", "0.7057192", "0.6849966", "0.67913896", "0.66329116", "0.65866756", "0.6565453", "0.64938587", "0.64443773", "0.6443872", "0.6382864", "0.6373806", "0.6357709", "0.6350169", "0.6332954", "0.6317014", "0.62710875", "0.62187046", "0.6216089", "0.6203261", "0.6201298", "0.61842114", "0.61689556", "0.61539835", "0.61407435", "0.6133388", "0.6132453", "0.6129202", "0.6108502", "0.6099573", "0.60843486", "0.60737276", "0.60718113", "0.60718113", "0.60718113", "0.60718113", "0.60718113", "0.60666966", "0.60665596", "0.6058164", "0.6049195", "0.60429686", "0.60404", "0.6023055", "0.60160947", "0.6009156", "0.6007376", "0.6004896", "0.5996282", "0.5996102", "0.59758496", "0.5973461", "0.59704137", "0.59700686", "0.5965413", "0.59643286", "0.5958306", "0.5946714", "0.5946714", "0.59446526", "0.5936152", "0.5929253", "0.59167844", "0.59134245", "0.5908944", "0.59053135", "0.5899812", "0.5892232", "0.5884444", "0.58840156", "0.58808446", "0.5876673", "0.58673143", "0.586059", "0.586007", "0.5859727", "0.5854545", "0.5854215", "0.58511186", "0.5847839", "0.5843176", "0.58408517", "0.5836378", "0.5836216", "0.58347714", "0.58316725", "0.5830266", "0.5823108", "0.58197206", "0.5816738", "0.5810445", "0.5810445" ]
0.77889985
1
returns the max value from the heap
findMax() { return this.heap[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "extractMax() {\r\n\t\tconst max = this.heap[0];\r\n\t\tthis.remove(max);\r\n\t\treturn max;\r\n\t}", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "maxValue() {\n let currNode = this.top;\n let maxValue = this.top.value;\n \n while (currNode.next) {\n if (currNode.next.value > maxValue) maxValue = currNode.next.value;\n currNode = currNode.next;\n }\n \n return maxValue;\n }", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "function maxHeapify(arr){\n\n}", "extractMax() {\n const max = this.values[0];\n const end = this.values.pop();\n this.values[0] = end;\n this.sinkDown();\n return max;\n }", "function max() {\n // set node to the root value\n var node = this.root;\n // loop until there is no more values to the right\n while( node.right != null ) {\n node = node.right; // move to the right value\n } // end while\n return node.data;\n} // end max", "extractMax() {\n // swap the first value in the values property with the last value\n // pop from the values property, so you can return the value at the end.\n // 'sink down' to the correct spot\n const max = this.values[0];\n const end = this.values.pop();\n if (this.values.length > 0) {\n this.values[0] = end;\n // move it to the correct position\n this.bubbleDown();\n }\n return max;\n }", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let index = 0\n let element = this.values[index]\n // repeat until neither child is greater than the element\n while(true) {\n let swapped = null\n let leftIndex = 2 * index + 1\n let rightIndex = 2 * index + 2\n if (leftIndex < this.values.length) {\n if(this.values[leftIndex] > element) {\n swapped = leftIndex\n }\n }\n if (rightIndex < this.values.length) {\n if( (!swapped && this.values[rightIndex] > element || !!swapped && this.values[rightIndex] > this.values[leftIndex])) {\n swapped = rightIndex\n }\n }\n if (swapped===null) break\n this.values[index] = this.values[swapped]\n this.values[swapped] = element\n index = swapped\n }\n return max\n }", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "maxHeap(index) {\n var left = this.left(index);\n var right = this.right(index);\n var largest = index;\n if (left < this.heapSize && this.array[left] > this.array[index]) {\n largest = left;\n }\n if (right < this.heapSize && this.array[right] > this.array[largest]) {\n largest = right;\n }\n if (largest != index) {\n this.swap(this.array, index, largest);\n this.maxHeap(largest);\n }\n }", "max() {\n let currentNode = this.root;\n // continue traversing right until no more children\n while(currentNode.right) {\n currentNode = currentNode.right;\n }\n return currentNode.value;\n }", "function BSTMax(){\n var walker = this.root;\n while (walker.right != null){\n walker = walker.right;\n }\n return walker.val;\n }", "extractMax() {\n let values = this.values;\n if (values.length === 0) return;\n let max = values[0];\n // For time complexity reasons, I swap first then remove the old root node\n values[0] = values[values.length - 1];\n values.pop();\n console.log(values);\n // instatiate child nodes\n let child1, child2, indexToSwap;\n let currentIndex = 0;\n while (true) {\n child1 = currentIndex * 2 + 1;\n child2 = currentIndex * 2 + 2;\n if (values[currentIndex] >= Math.max(values[child1], values[child2])) {\n break;\n }\n indexToSwap = values[child1] > values[child2] ? child1 : child2;\n if (!values[indexToSwap]) break;\n let oldNode = values[currentIndex];\n values[currentIndex] = values[indexToSwap];\n values[indexToSwap] = oldNode;\n currentIndex = indexToSwap;\n }\n this.values = values;\n return max;\n }", "extractMax(){\n const max = this.values.shift();\n let current = this.values.pop();\n if(this.values.length > 0){\n this.values.unshift(current);\n this.sinkDown();\n }\n return max;\n }", "findMaxValue() {\n\n let current = this.root;\n\n const findMax = (node) => {\n if (node === null) {\n return;\n }\n\n let actualMax = node.value;\n let leftSideMax = findMax(node.left);\n let rightSideMax = findMax(node.right);\n\n if (leftSideMax > actualMax) {\n actualMax = leftSideMax;\n }\n\n if (rightSideMax > actualMax) {\n actualMax = rightSideMax;\n }\n\n return actualMax;\n };\n\n return findMax(current);\n }", "extractMax() {\n const max = this.values[0]\n const end = this.values.pop()\n\n if (this.values.length > 0) {\n this.values[0] = end\n this._sinkDown()\n }\n\n return max\n }", "max() {\n let currentNode = this.root;\n // Case for no root\n if(!currentNode) {\n throw new Error('This tree does not yet contain any values');\n return;\n }\n while(currentNode.right) {\n currentNode = currentNode.right;\n }\n return currentNode.value;\n }", "max() {\r\n return this.maxHelper(this.root);\r\n }", "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "function findMax(stack) {\n var maxSize = 0;\n var max = null;\n for (var i = 0; i < stack.length; i++) {\n var peasant = stack[i];\n if (peasant.size > maxSize) {\n maxSize = peasant.size;\n max = peasant;\n }\n }\n\n return max;\n}", "getMax() {\n let values = [];\n let current = this.head;\n\n // collect all values in the list\n while (current) {\n values.push(current.value);\n\n current = current.next;\n }\n\n return values.length === 0 ? null : Math.max(...values);\n }", "maximum() {\n if (this.isEmpty()) {\n return null;\n }\n\n return this.doMaximum(this.root).key;\n }", "max(){\r\n if(this.isEmpty()){\r\n console.log(\"Tree is empty!\");\r\n return null;\r\n }\r\n let runner = this.root;\r\n while(runner.right != null){\r\n runner = runner.right;\r\n }\r\n return runner.value;\r\n }", "extractMax(){\r\n if(this.values.length === 1) return this.values.pop();\r\n const oldRoot = this.values[0];\r\n this.values[0] = this.values[this.values.length-1];\r\n this.values.pop();\r\n let idx = 0;\r\n let child1 = (2*idx) + 1;\r\n let child2 = (2*idx) + 2;\r\n\r\n while(this.values[idx] < this.values[child1] || \r\n this.values[idx] < this.values[child2]){\r\n child1 = (2*idx) + 1;\r\n child2 = (2*idx) + 2;\r\n if(this.values[child1] >= this.values[child2]){\r\n let temp = this.values[child1];\r\n this.values[child1] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child1;\r\n } else {\r\n let temp = this.values[child2];\r\n this.values[child2] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child2;\r\n }\r\n }\r\n return oldRoot;\r\n }", "get maximumValue() {\r\n return this.i.bk;\r\n }", "function MaxPriorityQueue(array){\r\n MaxHeap.call(this, array)\r\n}", "function max(arr){\n return sortNumbers(arr)[arr.length - 1];\n }", "findMaxNode() {\n if (this.head == null && this.tail == null) {\n return undefined;\n }\n\n var runner = this.head\n var temp = runner\n while (runner != null) {\n if ( temp.value < runner.value ){\n temp = runner\n }\n runner = runner.next;\n \n }\n return temp;\n }", "maximum() {\n // Write your code here\n\tvar max = this.arr[0];\n\tfor(var i=0;i<this.arr.length;i++){\n\t\tif(max>this.arr[i]){\n\t\t max = max;\n\t\t}else{\n\t\t\tmax = this.arr[i];\n\t\t}\n\t}\n\treturn max;\n }", "get maximumValue() {\n return this.i.bk;\n }", "function maxValue (arr) {\r\n// liefert die indexnummer des elmentes im array 'arr' mit dem groessten wert\r\n var maxV;\r\n if (arr.length > 0) { // wenn das array ueberhaupt elemente enthaelt\r\n maxV = 0;\r\n for (i = 1; i < arr.length; i++) {\r\n if (arr[i]>arr[maxV]) { maxV = i; }\r\n }\r\n } else {\r\n maxV = null\r\n }\r\n return maxV; \r\n}", "function buildMaxHeap() {\n for (let i = Math.floor(array.length / 2) - 1; i >= 0; i--) {\n maxHeapify(i, array.length);\n }\n}", "findMax() {\n let current = this.root;\n // Loop until the rightmost node (no right subtree).\n while (current.right !== null) {\n current = current.right;\n }\n return current.data;\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "function largest(){\r\n // parse arguments into an array\r\n var args = [].slice.call(arguments);\r\n var maxNum = 0;\r\n\r\n // .. do something with each element of args\r\n args.forEach(function(value,idx,list) {\r\n if (value > maxNum) {\r\n maxNum = value;\r\n }\r\n });\r\n\r\n return maxNum;\r\n\r\n}", "function findMax(array){\n if(array.length === 1) {\n return array[0];\n }\n var lastValue = array.pop();\n var currentMax = findMax(array);\n if(currentMax < lastValue){\n return lastValue;\n } else {\n return currentMax;\n }\n // if(findMax(array) < lastValue){\n // return lastValue;\n // } else {\n // return findMax(array);\n // }\n}", "function largest(array){\r\n\treturn Math.max.apply(Math,array);\r\n}", "static maxHeapify(a, i) {\n let left = Heap.left(i);\n let right = Heap.right(i);\n\n // Find largest node between current, left and right\n let largest;\n if (left < a.heap_size && a[left] > a[i])\n largest = left;\n else\n largest = i;\n\n if (right < a.heap_size && a[right] > a[largest])\n largest = right;\n\n // Move current element to 'largest' position, and\n // continue until the element is positioned correctly\n if (largest != i) {\n let temp = a[i];\n a[i] = a[largest];\n a[largest] = temp;\n\n Heap.maxHeapify(a, largest);\n }\n }", "findMaximumValue(root = this.root) {\n // what does it mean to find the max?\n // traverse, and check against \"last max\"\n\n // base case: root is null\n if (!root) return;\n\n // base case: root has no children\n let rootMax = root.val;\n let leftMax, rightMax;\n\n if (root.left) leftMax = this.findMaximumValue(root.left);\n\n if (root.right) rightMax = this.findMaximumValue(root.right);\n\n // rootMax, leftMax and rightMax\n // compare them all and just return the\n // \"true max\"\n let max = rootMax;\n\n if (leftMax > max) max = leftMax;\n if (rightMax > max) max = rightMax;\n\n return max;\n }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "function secondLargestElement(tree) {\n var current = tree;\n var previous = tree.value;\n\n while (current) {\n if (current.left && !current.right) {\n previous = Math.max(current.value, previous);\n current = current.left;\n } else if (current.right) {\n previous = Math.max(current.value, previous);\n current = current.right;\n } else if (!current.right && !current.left) {\n return Math.min(previous, current.value);\n }\n\n }\n}", "function getHighest($array){\n var biggest = Math.max.apply( null, $array );\n return biggest;\n}", "get max() {\n\t\treturn this.__max;\n\t}", "function max(data) {\n var n = data[0];\n\n for (var i = 1; i < data.length; i++) {\n n = data[i] > n ? data[i] : n;\n }\n\n return n;\n}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "function maxHeapify(arr, length, parent) {\n var largest = parent;\n var leftChild = 2 * parent + 1;\n var rightChild = 2 * parent + 2;\n\n if (leftChild < length && arr[leftChild] > arr[largest]) {\n largest = leftChild;\n }\n\n if (rightChild < length && arr[rightChild] > arr[largest]) {\n largest = rightChild;\n }\n\n if (largest != parent) {\n var temp = arr[largest];\n arr[largest] = arr[parent];\n arr[parent] = temp;\n\n maxHeapify(arr, length, largest);\n }\n}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function MAX(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'MAX[]', e2, e1);\n }\n\n stack.push(Math.max(e1, e2));\n }", "getMax() {\n return this.storage[0];\n }", "getMax() {\n return this.storage[0];\n }", "function HighestNmb(arr) {\n return Math.max.apply(null, arr);\n}", "function max(arr){\n\tvar max = arr[0];\n\tfor (var i =0 ; i < arr.length-1 ; i++){\n\t\tif (maxNum < arr[i]){\n\t\t\treturn arr[i];\n\t\t}\n\t}\n\treturn maxNum;\n}", "max() {}", "function max(x,y){\nif (x>y){\n\treturn x\n}else{\n\treturn y\n}}", "function MAX(state) {\n const stack = state.stack;\n const e2 = stack.pop();\n const e1 = stack.pop();\n\n if (exports.DEBUG) console.log(state.step, 'MAX[]', e2, e1);\n\n stack.push(Math.max(e1, e2));\n}", "function max(array) {\n\tvar currentmax = array[0];\n\tarray.forEach(function(element) {\n\t\tif(element > currentmax) {\n\t\t\tcurrentmax = element;\n\t\t}\n\t});\n\treturn currentmax;\n}", "function MAX(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (DEBUG) console.log(state.step, 'MAX[]', e2, e1);\n\n stack.push(Math.max(e1, e2));\n}", "function findMax(node) {\n if (node == null) return 0;\n\n let res = node.value;\n let lres = findMax(node.left);\n let rres = findMax(node.right);\n\n if (lres > res) res = lres;\n if (rres > res) res = rres;\n return res;\n}", "static getMax2(array) {\n let max = -Infinity;\n for (let i = 0; i < array.length; i++) {\n if (array[i] > max) {\n max = array[i]\n }\n }\n return max\n }", "buildMaxHeap() {}", "function max(x) {\n var value = x[0];\n for (var i = 1; i < x.length; i++) {\n if (x[i] > value) {\n value = x[i];\n }\n }\n return value;\n}", "get max() {\n return this.args.max || null;\n }", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "extractMax() {\n let extracted = this.values[0]\n let end = this.values.pop()\n if (this.values.length > 0) {\n this.values[0] = end\n this.sinkDown()\n }\n return extracted\n }", "findMax() {\n\n // It will keep the last data until current right is null\n let current = this.root;\n while (current.right !== null) {\n current = current.right;\n }\n\n return current.data;\n }", "function max(arr) {\n var m = -Infinity;\n\n for(var i=0; i< arr.length; i++)\n if(arr[i] > m) m = arr[i];\n return m;\n}", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "function maxHeapify(arr , n , i)\n\t{\n\t\n\t\t// Find largest of node and its children\n\t\tif (i >= n) {\n\t\t\treturn;\n\t\t}\n\t\tvar l = i * 2 + 1;\n\t\tvar r = i * 2 + 2;\n\t\tvar max;\n\t\tif (l < n && arr[l] > arr[i]) {\n\t\t\tmax = l;\n\t\t} else\n\t\t\tmax = i;\n\t\tif (r < n && arr[r] > arr[max]) {\n\t\t\tmax = r;\n\t\t}\n\n\t\t// Put maximum value at root and\n\t\t// recur for the child with the\n\t\t// maximum value\n\t\tif (max != i) {\n\t\t\tvar temp = arr[max];\n\t\t\tarr[max] = arr[i];\n\t\t\tarr[i] = temp;\n\t\t\tmaxHeapify(arr, n, max);\n\t\t}\n\t}", "function getMaxVal(valArr) {\n if(!valArr){\n\treturn null;\n }\n\n var max = valArr[0];\n for(var i = 1; i < valArr.length; i++){\n\tif(valArr[i] > max){\n\t max = valArr[i];\n\t}\n }\n\n return max;\n}", "function nMax(){\n var arr=[-3,3,5,7];\n var max= arr[0];\n for(var i = 0; i< arr.length; i++){\n if(arr[i]>max){\n max=arr[i];\n arr.splice(max);\n }\n }\n for(var i=0; i<arr.length;i++){\n if(arr[i]>max){\n max=arr[i];\n \n }\n }\n console.log(max);\n return max;\n }", "function max_element(n, metric){\n var m = metric(n[0]), b = n[0];\n for(var i = 1; i < n.length; i++){\n var v = metric(n[i]);\n if(v > m){\n m = v;\n b = n[i];\n }\n }\n return b;\n}", "getHead() {\n return this.maxheap[1]\n }", "function maxtable(){\n var maximum = Math.max.apply(null, tabValue);\n console.log(tabValue);\n tabValue = [];\n console.log(\"sending value to node.js : \" + maximum);\n return maximum;\n}", "function max() {\n var maxValue = arguments[0];\n for (var i = 0; i < arguments.length; i++) {\n if (arguments[i] > maxValue) {\n maxValue = arguments[i];\n }\n }\n return maxValue;\n}", "maxToBack(){\n var runner = this.head;\n var max = this.head\n var prevnode = this.head\n var maxprev = null\n while (runner != null) {\n if (runner.val > max.val) {\n max = runner;\n maxprev = prevnode\n }\n prevnode = runner\n runner = runner.next\n }\n prevnode.next = max\n maxprev.next = max.next\n max.next = null;\n }", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "function maxHeap(array, n, i) {\n let largest = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if (left < n && array[left] > array[largest]) {\n largest = left;\n }\n\n // If right child is larger than largest so far\n if (right < n && array[right] > array[largest]) {\n largest = right;\n }\n\n // If largest is not root\n if (largest != i) {\n let swap = array[i];\n array[i] = array[largest];\n array[largest] = swap;\n\n // Recursively heapify the affected sub-tree\n maxHeap(array, n, largest);\n }\n}", "function getMax() {\n var max = Math.max.apply(null, config.values);\n max += 10 - max % 10;\n return max;\n console.log(max);\n }", "function maxOf(array){\n if(array.length === 1){\n return array[0]\n } else{\n return Math.max(array.pop(), maxOf(array))\n }\n}", "function max(x) { \n // assert x != null;\n if (x.right == null || x.right == undefined) \n \treturn x; \n else\n \treturn max(x.right); \n }", "function maximum(array, max = Number.MIN_SAFE_INTEGER){\n if(array.length === 0)\n return max;\n else{\n let x = array.pop();\n if(x > max) max = x;\n return maximum(array, max);\n }\n}", "get max() {\r\n return this._max\r\n }", "function heap_root(input, i) { \n var left = 2 * i + 1; \n var right = 2 * i + 2; \n var max = i; \n \n if (left < array_length && input[left] > input[max]) { \n max = left; \n } \n \n if (right < array_length && input[right] > input[max]) { \n max = right; \n } \n \n if (max != i) { \n swap(input, i, max); \n heap_root(input, max); \n } \n}", "function YLightSensor_get_highestValue()\n { var json_val = this._getAttr('highestValue');\n return (json_val == null ? Y_HIGHESTVALUE_INVALID : Math.round(json_val/6553.6) / 10);\n }", "function max(x, y) {\n return lte(x, y) ? y : x;\n }", "function max(x,y){\n if(x>y){\n return x\n } else {\n return y\n }\n}", "max() {\n let current = this.root\n if (current == null)\n return null\n while (current.right != null)\n current = current.right\n return current.content\n }", "function maxHeapify(idx, hSize) {\n let largest;\n const left = (2 * idx) + 1;\n const right = (2 * idx) + 2;\n if (left < hSize && array[left] > array[idx]) {\n largest = left;\n } else {\n largest = idx;\n }\n if (right < hSize && array[right] > array[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n const temp = array[idx];\n array[idx] = array[largest];\n array[largest] = temp;\n maxHeapify(largest, hSize);\n }\n}", "function max(){\n return Math.max.apply(null, arguments)\n }", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function findNextHighest() {\n var temp = highest;\n while (numStore[highest] === undefined) {\n highest = highest - 1;\n }\n return highest;\n }" ]
[ "0.82991564", "0.7957347", "0.78086686", "0.7646159", "0.7423833", "0.73725516", "0.7348753", "0.72745484", "0.72237366", "0.72114444", "0.7197894", "0.7177174", "0.7163383", "0.7146565", "0.70919085", "0.70852536", "0.70802695", "0.7070464", "0.7062798", "0.7037336", "0.7013775", "0.6969921", "0.6968393", "0.6965604", "0.69146156", "0.6899203", "0.686", "0.6844688", "0.6844106", "0.6824768", "0.6817568", "0.6816355", "0.68104315", "0.67739224", "0.67003083", "0.6676564", "0.66745853", "0.6662407", "0.6651277", "0.6637021", "0.66293", "0.66171575", "0.6610276", "0.6610276", "0.6610276", "0.6610276", "0.6610276", "0.6610276", "0.6599275", "0.65978974", "0.6584784", "0.6583263", "0.6577867", "0.65719116", "0.6570493", "0.65587115", "0.65565866", "0.65565866", "0.65549755", "0.652271", "0.6509924", "0.6507809", "0.6497283", "0.6490893", "0.64908534", "0.6488649", "0.6472934", "0.6471766", "0.6469162", "0.6465769", "0.64610565", "0.6457766", "0.64513665", "0.6445873", "0.6439046", "0.64361554", "0.64356595", "0.6434895", "0.6434795", "0.6427546", "0.6426731", "0.64243734", "0.6418554", "0.64181", "0.64164275", "0.6413261", "0.6412956", "0.64123935", "0.6404784", "0.6402987", "0.640093", "0.63978416", "0.6397023", "0.63945687", "0.6381715", "0.63789654", "0.63782084", "0.63776886", "0.63776886", "0.63760304" ]
0.84279215
0
removes the max value from the heap
removeMax() { this.remove(this.heap[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "removeMin() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "extractMax() {\r\n\t\tconst max = this.heap[0];\r\n\t\tthis.remove(max);\r\n\t\treturn max;\r\n\t}", "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "remove() {\n // Swap root value with last element in the heap\n // Pop the last element from heap array\n // Perform siftDown to correct position of swapped value\n // Return popped value\n this.swap(0, this.heap.length - 1, this.heap);\n const valueToRemove = this.heap.pop();\n this.siftDown(0, this.heap.length - 1, this.heap);\n \n return valueToRemove;\n }", "function maxHeapify(arr){\n\n}", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "function nMax(){\n var arr=[-3,3,5,7];\n var max= arr[0];\n for(var i = 0; i< arr.length; i++){\n if(arr[i]>max){\n max=arr[i];\n arr.splice(max);\n }\n }\n for(var i=0; i<arr.length;i++){\n if(arr[i]>max){\n max=arr[i];\n \n }\n }\n console.log(max);\n return max;\n }", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "delMin() {\n /*\n * Save reference to the min key.\n * Swap the min key with the last key in the heap.\n * Decrement n so that the key does not swim back up the heap.\n * Sink down the heap to fix any violations that have arisen.\n * Delete the min key to prevent loitering, and return its reference.\n */\n let min = this.heap[1];\n\n [this.heap[1], this.heap[this.n]] = [this.heap[this.n], this.heap[1]];\n this.n--;\n this.sink(1);\n this.heap[this.n+1] = null;\n\n return min;\n }", "function deleteMax(h) { \n if (isRed(h.left))\n h = rotateRight(h);\n\n if (h.right == null || h.right == undefined)\n return null;\n\n if (!isRed(h.right) && !isRed(h.right.left))\n h = moveRedRight(h);\n\n h.right = deleteMax(h.right);\n\n return balance(h);\n }", "heapDown(index) {\n const [leftIndex, rightIndex] = this.children(index);\n \n if (!leftIndex && !rightIndex) return;\n\n let min;\n rightIndex ? min = rightIndex : min = leftIndex;\n if ((leftIndex && rightIndex) &&\n this.store[leftIndex].key < this.store[rightIndex].key) {\n min = leftIndex;\n }\n\n if (this.store[index].key > this.store[min].key) {\n this.swap(index, min);\n this.heapDown(min);\n }\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "extractMax(){\n const max = this.values.shift();\n let current = this.values.pop();\n if(this.values.length > 0){\n this.values.unshift(current);\n this.sinkDown();\n }\n return max;\n }", "findMax() {\r\n\t\treturn this.heap[0];\r\n\t}", "extractMax(){\r\n if(this.values.length === 1) return this.values.pop();\r\n const oldRoot = this.values[0];\r\n this.values[0] = this.values[this.values.length-1];\r\n this.values.pop();\r\n let idx = 0;\r\n let child1 = (2*idx) + 1;\r\n let child2 = (2*idx) + 2;\r\n\r\n while(this.values[idx] < this.values[child1] || \r\n this.values[idx] < this.values[child2]){\r\n child1 = (2*idx) + 1;\r\n child2 = (2*idx) + 2;\r\n if(this.values[child1] >= this.values[child2]){\r\n let temp = this.values[child1];\r\n this.values[child1] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child1;\r\n } else {\r\n let temp = this.values[child2];\r\n this.values[child2] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child2;\r\n }\r\n }\r\n return oldRoot;\r\n }", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.minHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let index = 0\n let element = this.values[index]\n // repeat until neither child is greater than the element\n while(true) {\n let swapped = null\n let leftIndex = 2 * index + 1\n let rightIndex = 2 * index + 2\n if (leftIndex < this.values.length) {\n if(this.values[leftIndex] > element) {\n swapped = leftIndex\n }\n }\n if (rightIndex < this.values.length) {\n if( (!swapped && this.values[rightIndex] > element || !!swapped && this.values[rightIndex] > this.values[leftIndex])) {\n swapped = rightIndex\n }\n }\n if (swapped===null) break\n this.values[index] = this.values[swapped]\n this.values[swapped] = element\n index = swapped\n }\n return max\n }", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "extractMax() {\n let values = this.values;\n if (values.length === 0) return;\n let max = values[0];\n // For time complexity reasons, I swap first then remove the old root node\n values[0] = values[values.length - 1];\n values.pop();\n console.log(values);\n // instatiate child nodes\n let child1, child2, indexToSwap;\n let currentIndex = 0;\n while (true) {\n child1 = currentIndex * 2 + 1;\n child2 = currentIndex * 2 + 2;\n if (values[currentIndex] >= Math.max(values[child1], values[child2])) {\n break;\n }\n indexToSwap = values[child1] > values[child2] ? child1 : child2;\n if (!values[indexToSwap]) break;\n let oldNode = values[currentIndex];\n values[currentIndex] = values[indexToSwap];\n values[indexToSwap] = oldNode;\n currentIndex = indexToSwap;\n }\n this.values = values;\n return max;\n }", "buildMaxHeap() {}", "maxToBack(){\n var runner = this.head;\n var max = this.head\n var prevnode = this.head\n var maxprev = null\n while (runner != null) {\n if (runner.val > max.val) {\n max = runner;\n maxprev = prevnode\n }\n prevnode = runner\n runner = runner.next\n }\n prevnode.next = max\n maxprev.next = max.next\n max.next = null;\n }", "function MaxPriorityQueue(array){\r\n MaxHeap.call(this, array)\r\n}", "maxHeap(index) {\n var left = this.left(index);\n var right = this.right(index);\n var largest = index;\n if (left < this.heapSize && this.array[left] > this.array[index]) {\n largest = left;\n }\n if (right < this.heapSize && this.array[right] > this.array[largest]) {\n largest = right;\n }\n if (largest != index) {\n this.swap(this.array, index, largest);\n this.maxHeap(largest);\n }\n }", "function buildMaxHeap() {\n for (let i = Math.floor(array.length / 2) - 1; i >= 0; i--) {\n maxHeapify(i, array.length);\n }\n}", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "extractMax() {\n const max = this.values[0];\n const end = this.values.pop();\n this.values[0] = end;\n this.sinkDown();\n return max;\n }", "remove() {\n if (this.isEmpty()) return;\n this.swap(0, this.store.length - 1);\n const { value } = this.store.pop();\n if (!this.isEmpty()) this.heapDown(0);\n return value;\n }", "static maxHeapify(a, i) {\n let left = Heap.left(i);\n let right = Heap.right(i);\n\n // Find largest node between current, left and right\n let largest;\n if (left < a.heap_size && a[left] > a[i])\n largest = left;\n else\n largest = i;\n\n if (right < a.heap_size && a[right] > a[largest])\n largest = right;\n\n // Move current element to 'largest' position, and\n // continue until the element is positioned correctly\n if (largest != i) {\n let temp = a[i];\n a[i] = a[largest];\n a[largest] = temp;\n\n Heap.maxHeapify(a, largest);\n }\n }", "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\n }\n\n for (let endOfHeap = array.length - 1; endOfHeap >= 0; endOfHeap--) { // 2) loop from end of maxHeap to begin/left, and \"delete\" max val until heap region is \"empty\"\n [array[endOfHeap], array[0]] = [array[0], array[endOfHeap]]; // 3) swap the root of the heap with the last element of the heap, this shrinks the heap by 1 and grows the sorted array by 1\n\n console.log(array);\n\n heapify(array, endOfHeap, 0); // 4) sift down the new root, but not past the end of the heap\n }\n\n return array;\n}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function heapSort(array){\n // 1: Construction\n let heap = new MaxHeap()\n array.forEach(ele => {\n heap.insert(ele)\n });\n\n// 2: sortdown \n let sorted = []\n while (heap.array.length > 1){\n sorted.push(heap.deleteMax())\n }\n return sorted\n}", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "dequeue (){\n // let removedRoot = this.values[0];\n //replace with last added value\n //TEACHERS SOLUTION\n const min = this.values[0];\n const end = this.values.pop();\n //EDGE CASE IF NOTHING LEFT IN\n if(this.values.length > 0){\n //LINE 97 CAUSES A FOREVER LOOP WITH THE LAST ELEMENT IF WE DON'T ADD THE CONDITIONAL, BECAUSE WE REASSIGN THE ROOT TO BE END (WHICH WAS THE ORIGINAL ROOT IF THERE'S ONLY ONE ELEMENT)\n this.values[0] = end;\n //START TRICKLE DOWN\n this.sinkDown();\n }\n \n \n return min;\n }", "remove(key) {\n this.storage.set(getIndexBelowMax(key), undefined);\n }", "extractMax() {\n // swap the first value in the values property with the last value\n // pop from the values property, so you can return the value at the end.\n // 'sink down' to the correct spot\n const max = this.values[0];\n const end = this.values.pop();\n if (this.values.length > 0) {\n this.values[0] = end;\n // move it to the correct position\n this.bubbleDown();\n }\n return max;\n }", "function maxHeapify(arr, length, parent) {\n var largest = parent;\n var leftChild = 2 * parent + 1;\n var rightChild = 2 * parent + 2;\n\n if (leftChild < length && arr[leftChild] > arr[largest]) {\n largest = leftChild;\n }\n\n if (rightChild < length && arr[rightChild] > arr[largest]) {\n largest = rightChild;\n }\n\n if (largest != parent) {\n var temp = arr[largest];\n arr[largest] = arr[parent];\n arr[parent] = temp;\n\n maxHeapify(arr, length, largest);\n }\n}", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "maxToBack(){\n // your code here\n var runner = this.head\n var max = runner\n while (runner.next != null){\n if (runner.next.value > max.value){\n max = runner.next\n }\n runner = runner.next\n }\n var temp = runner.value\n runner.value = max.value\n max.value = temp\n return this\n }", "function heapifyStandart(currentIndex, heapSize ,arr){\n\n var largestElement = currentIndex\n var leftIndex = 2 * currentIndex + 1\n var rightIndex = 2 * currentIndex + 2\n\n if (leftIndex < heapSize && arr[currentIndex] < arr[leftIndex]){\n largestElement = leftIndex\n }\n \n if (rightIndex < heapSize && arr[largestElement] < arr[rightIndex]){\n largestElement = rightIndex\n }\n\n if (largestElement != currentIndex){\n swapArrayElement(currentIndex, largestElement, arr)\n heapifyStandart(largestElement, heapSize, arr)\n }\n}", "static buildMaxHeap(a) {\n a.heap_size = a.length;\n\n // Max-heapify the first n/2 elements as\n // they are tree nodes, and the remaining are\n // usually tree leaves\n let mid = parseInt(a.length / 2);\n for (let i = mid; i >= 0; i -= 1) {\n Heap.maxHeapify(a, i);\n }\n }", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "function heap_root(input, i) { \n var left = 2 * i + 1; \n var right = 2 * i + 2; \n var max = i; \n \n if (left < array_length && input[left] > input[max]) { \n max = left; \n } \n \n if (right < array_length && input[right] > input[max]) { \n max = right; \n } \n \n if (max != i) { \n swap(input, i, max); \n heap_root(input, max); \n } \n}", "function heapDown(i) {\n\t var w = heapWeight(i)\n\t while(true) {\n\t var tw = w\n\t var left = 2*i + 1\n\t var right = 2*(i + 1)\n\t var next = i\n\t if(left < heapCount) {\n\t var lw = heapWeight(left)\n\t if(lw < tw) {\n\t next = left\n\t tw = lw\n\t }\n\t }\n\t if(right < heapCount) {\n\t var rw = heapWeight(right)\n\t if(rw < tw) {\n\t next = right\n\t }\n\t }\n\t if(next === i) {\n\t return i\n\t }\n\t heapSwap(i, next)\n\t i = next \n\t }\n\t }", "function heapDown(i) {\n\t var w = heapWeight(i)\n\t while(true) {\n\t var tw = w\n\t var left = 2*i + 1\n\t var right = 2*(i + 1)\n\t var next = i\n\t if(left < heapCount) {\n\t var lw = heapWeight(left)\n\t if(lw < tw) {\n\t next = left\n\t tw = lw\n\t }\n\t }\n\t if(right < heapCount) {\n\t var rw = heapWeight(right)\n\t if(rw < tw) {\n\t next = right\n\t }\n\t }\n\t if(next === i) {\n\t return i\n\t }\n\t heapSwap(i, next)\n\t i = next \n\t }\n\t }", "function heapDown(i) {\n var w = heapWeight(i)\n while(true) {\n var tw = w\n var left = 2*i + 1\n var right = 2*(i + 1)\n var next = i\n if(left < heapCount) {\n var lw = heapWeight(left)\n if(lw < tw) {\n next = left\n tw = lw\n }\n }\n if(right < heapCount) {\n var rw = heapWeight(right)\n if(rw < tw) {\n next = right\n }\n }\n if(next === i) {\n return i\n }\n heapSwap(i, next)\n i = next \n }\n }", "function heapSort(inputArr){\n var heap = new Heap;\n for(i=0; i<inputArr.length; i++){\n heap.add(inputArr[i])\n }\n var outputArr = []\n for(i=0; i<inputArr.length; i++){\n outputArr.push(heap.remove())\n }\n console.log(outputArr)\n return outputArr\n}", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "function heapify(arr) {\n if (arr.length < 1) return arr\n for (let i = arr.length - 1; i >= 0; i--) {\n minHeapify(arr, i)\n }\n return arr\n}", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "function maxHeapify(idx, hSize) {\n let largest;\n const left = (2 * idx) + 1;\n const right = (2 * idx) + 2;\n if (left < hSize && array[left] > array[idx]) {\n largest = left;\n } else {\n largest = idx;\n }\n if (right < hSize && array[right] > array[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n const temp = array[idx];\n array[idx] = array[largest];\n array[largest] = temp;\n maxHeapify(largest, hSize);\n }\n}", "extractMax() {\n const max = this.values[0]\n const end = this.values.pop()\n\n if (this.values.length > 0) {\n this.values[0] = end\n this._sinkDown()\n }\n\n return max\n }", "async function MaxHeapify( i, heapSize)\n{\n\n let hasLeft = (2 * i + 1 < heapSize) ? true : false;\n let hasRight = (2 * i + 2 < heapSize) ? true : false;\n let l, r;\n let largest = i;\n if (hasLeft)\n l = arr[2 * i + 1].offsetHeight;\n if (hasRight)\n r = arr[2 * i + 2].offsetHeight;\n if (hasLeft && arr[i].offsetHeight < l)\n {\n largest = 2 * i + 1;\n }\n if (hasRight && arr[largest].offsetHeight < r)\n {\n largest = 2 * i + 2;\n }\n if (largest != i)\n {\n arr[i].style.backgroundColor='white';\n arr[largest].style.backgroundColor='green';\n await timer(delay);\n await swap(i, largest);\n arr[i].style.backgroundColor='red';\n arr[largest].style.backgroundColor='red';\n await MaxHeapify(largest, heapSize);\n }\n}", "remove(element,comparator=this.compare){\r\n let totalOccurenceOfElement=this.find(element,comparator).length;\r\n for(let i=0;i<totalOccurenceOfElement;i++){\r\n let removeIndex=this.heapContainer.findIndex((x)=> comparator.equal(x,element)); // findIndex is used for finding first found element's index\r\n let heapSize=this.heapContainer.length;\r\n // if the element is at last index simply remove it as we\r\n // don't need to haepify\r\n if(removeIndex===heapSize-1){\r\n this.heapContainer.pop();\r\n }\r\n else{\r\n this.heapContainer[removeIndex]=this.heapContainer[heapSize-1]; \r\n this.heapContainer.pop();\r\n let parentElement=this.getParent(removeIndex);\r\n let elementAtRemovedIndex=this.heapContainer[removeIndex];\r\n // if at index where the element is removed does not have a parent element that means it was on root and we cannot go up to heapify and alternately if the parent element\r\n // is in right order as compare to the new element that is moved to removed index that means we dont' have to take care of upper part of heap as if it is i right position to parent than it will also be in correct position to it's\r\n // parent's parent and we have used hasLeftChild because we only need to heapify down if there exists element in \r\n // down side\r\n if(!parentElement || this.isPairInRightOrder(parentElement,elementAtRemovedIndex) && this.hasLeftChild(removeIndex)){\r\n this.heapifyDown(removeIndex);\r\n }\r\n else{\r\n this.heapifyUp(removeIndex);\r\n }\r\n }\r\n \r\n }\r\n return this;\r\n }", "pop(){\r\n if (this.top === -1){\r\n return undefined;\r\n }else{\r\n delete this.storage[this.top];\r\n this.top -= 1;\r\n }\r\n }", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "heapify(/*index*/ i) {\n let l = this.left(i);\n let r = this.right(i);\n let biggest = i;\n if (l < this.heap_size && this.harr[i].element.compareByMulKeys(this.harr[l].element, this.compareValues) == -1)\n biggest = l;\n if (r < this.heap_size && this.harr[biggest].element.compareByMulKeys(this.harr[r].element, this.compareValues) == -1)\n biggest = r;\n if (biggest != i) {\n this.swap(this.harr, i, biggest);\n this.heapify(biggest);\n }\n }", "function maxHeapify(arr , n , i)\n\t{\n\t\n\t\t// Find largest of node and its children\n\t\tif (i >= n) {\n\t\t\treturn;\n\t\t}\n\t\tvar l = i * 2 + 1;\n\t\tvar r = i * 2 + 2;\n\t\tvar max;\n\t\tif (l < n && arr[l] > arr[i]) {\n\t\t\tmax = l;\n\t\t} else\n\t\t\tmax = i;\n\t\tif (r < n && arr[r] > arr[max]) {\n\t\t\tmax = r;\n\t\t}\n\n\t\t// Put maximum value at root and\n\t\t// recur for the child with the\n\t\t// maximum value\n\t\tif (max != i) {\n\t\t\tvar temp = arr[max];\n\t\t\tarr[max] = arr[i];\n\t\t\tarr[i] = temp;\n\t\t\tmaxHeapify(arr, n, max);\n\t\t}\n\t}", "dequeue() {\n const [next] = this.values;\n this.values[0] = this.values.pop();\n let childLeft, childRight;\n let curr = 0;\n while (true) {\n let childLeftIdx = 2 * curr + 1;\n let childRightIdx = childLeft + 1;\n let swap = null;\n if (childLeftIdx < this.values.length) {\n childLeft = this.values[childLeftIdx];\n if (childLeft.priority > this.values[curr].priority) {\n swap = childLeft;\n }\n\n if (childRightIdx < this.values.length) {\n childRight = this.values[childRight];\n if (\n (swap === null &&\n childRight.priority < this.values[curr].priority) ||\n (swap !== null && childRight < childLeft.priority)\n ) {\n swap = childRightIdx;\n }\n }\n\n if (swap === null) break;\n const temp = this.values[curr];\n this.values[curr] = this.values[swap];\n this.values[swap] = temp;\n curr = swap;\n }\n }\n }", "function minheap_extract(heap) {\n swap(heap,0,heap.length - 1);\n var to_pop = heap.pop();\n var parent = 0;\n var child = parent * 2 + 1;\n while(child < heap.length){\n if(child + 1 < heap.length && heap[child] > heap[child + 1]){\n child = child + 1;\n }\n if(heap[child] < heap[parent]){\n swap(heap,child,parent);\n parent = child;\n child = parent * 2 + 1; \n }\n else{\n break;\n }\n }\n return to_pop;\n // STENCIL: implement your min binary heap extract operation\n}", "function heapify(currentIndex, arr){\n\n if (isHavingChildrenLeft(currentIndex, arr)) {\n let parent = arr[currentIndex]\n\n if (isHavingChildrenRight(currentIndex, arr)){\n let maxChildren = Math.max(arr[currentIndex * 2 + 1], arr[currentIndex * 2 + 2])\n if (parent < maxChildren){\n let maxChilrenIndex = maxChildren == arr[currentIndex * 2 + 1] ? currentIndex * 2 + 1 : currentIndex * 2 + 2 \n swapArrayElement(currentIndex, maxChilrenIndex, arr)\n heapify(maxChilrenIndex, arr)\n }\n }else {\n if (parent < arr[currentIndex * 2 + 1]){\n swapArrayElement(currentIndex, currentIndex * 2 + 1, arr)\n heapify(currentIndex * 2 + 1, arr)\n }\n }\n }else {\n console.log(\"skipping index %d\", currentIndex)\n }\n}", "function extractMin(heap) {\n if (heap.length < 1) return null\n // swap first and last element\n let temp = heap[0]\n heap[0] = heap[heap.length-1]\n heap[heap.length-1] = temp\n\n const result = heap.pop()\n minHeapify(heap, 0)\n return result\n}", "function heapSort(arr){\n var sorted = [];\n var heap1 = new MaxHeap();\n \n for(let i=0; i<arr.length; i++){\n heap1.insert(arr[i]);\n }\n \n for(let i=0; i<arr.length; i++){\n sorted.push(heap1.delete());\n }\n return sorted;\n}", "maxHeapify(arr, n, i) {\r\n\t\tlet largest = i;\r\n\t\tlet leftIndex = 2 * i + 1;\r\n\t\tlet rightIndex = 2 * i + 2;\r\n\r\n\t\tif (leftIndex < n && arr[leftIndex] > arr[largest]) {\r\n\t\t\tlargest = leftIndex;\r\n\t\t}\r\n\t\tif (rightIndex < n && arr[rightIndex] > arr[largest]) {\r\n\t\t\tlargest = rightIndex;\r\n\t\t}\r\n\t\tif (largest != i) {\r\n\t\t\tlet temp = arr[i];\r\n\t\t\tarr[i] = arr[largest];\r\n\t\t\tarr[largest] = temp;\r\n\t\t\tthis.maxHeapify(arr, n, largest);\r\n\t\t}\r\n\t}", "function thirdLargestNode(tree) {\n tree.remove(tree._findMax().key);\n tree.remove(tree._findMax().key);\n return tree._findMax().key;\n}", "function maxHeap(array, n, i) {\n let largest = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if (left < n && array[left] > array[largest]) {\n largest = left;\n }\n\n // If right child is larger than largest so far\n if (right < n && array[right] > array[largest]) {\n largest = right;\n }\n\n // If largest is not root\n if (largest != i) {\n let swap = array[i];\n array[i] = array[largest];\n array[largest] = swap;\n\n // Recursively heapify the affected sub-tree\n maxHeap(array, n, largest);\n }\n}", "function buildHeap(arr, type) {\n // gets the last index\n var lastIndex = arr.length - 1;\n // While the last index is greater than 0\n while (lastIndex > 0) {\n // get the parent index\n var parentIndex = Math.floor((lastIndex - 1) / 2);\n // get the items inside the parent\n // and the last index \n var lastItem = arr[lastIndex];\n var parentItem = arr[parentIndex];\n\n if (type === 'maxHeap') {\n // checks to see if the lastItem is greater\n // than the parentItem if so then do a swap\n if (lastItem > parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n else if (type === 'minHeap') {\n // checks to see if the lastItem is less\n // than the parentItem if so then do a swap\n if (lastItem < parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n\n }\n }", "insert_num(num) {\n // Insert a number if the num is less than the top ele in maxHeap, or maxHeap top is null\n if (!this.maxHeap.values.length || this.maxHeap.peek() >= num) {\n this.maxHeap.insert(num);\n } else {\n this.minHeap.insert(num);\n }\n\n // Rebalance the heaps. Max heap should have 1 extra element if total num of elements is odd\n if (this.maxHeap.values.length > this.minHeap.heap.length + 1) {\n this.minHeap.insert(this.maxHeap.extractMax());\n } else if (this.maxHeap.values.length < this.minHeap.heap.length) {\n this.maxHeap.insert(this.minHeap.remove());\n }\n }", "maxValue() {\n let currNode = this.top;\n let maxValue = this.top.value;\n \n while (currNode.next) {\n if (currNode.next.value > maxValue) maxValue = currNode.next.value;\n currNode = currNode.next;\n }\n \n return maxValue;\n }", "extractMax() {\n let extracted = this.values[0]\n let end = this.values.pop()\n if (this.values.length > 0) {\n this.values[0] = end\n this.sinkDown()\n }\n return extracted\n }", "extractMin() {\n if (this.size <= 0) return;\n if (this.size === 1) {\n this.size--;\n return this.data[0];\n }\n let root = this.data[0];\n this.data[0] = this.data[this.size - 1];\n this.size--;\n this.MinHeapify(0);\n return root;\n }", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "function largestNum(arr, k) {\n\tif (!arr && !arr.length && !k) return false;\n\n\tlet shunk = arr.slice(0, k); //first shunk\n\tlet heap = [];\n\tshunk.forEach(n => insertHeap(heap, n));\n\n\tfor (let i = k; i < arr.length; i++) {\n\t\tif (arr[i] >= heap[0]) {\n\t\t\tupdateHeap(heap, arr[i]);\n\t\t}\n\t}\n\n\treturn heap;\n}", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "function heapify(arr,comp){\r\n // arr[n/2-1:n-1] already satisfies the heap property because they are the leaves.\r\n for(let i = Math.floor((arr.length-2)/2); i >= 0; i--){\r\n // Restore the heap property for i\r\n siftDown(arr, comp, i);\r\n }\r\n // Now that the heap property is satisfied for all i from 0 to n-1, the array is a heap\r\n}", "function max(arr){\n \n if(arr.length==2) //BASE CASE\n return arr[0]>arr[1]?arr[0]:arr[1]\n else //\n {\n arr[1]=arr[0]>arr[1]?arr[0]:arr[1]\n return max(arr.splice(1,arr.length-1))\n }\n \n}", "pop() {\n //delete the current top values within the stack\n delete this.items[this.top];\n //deduct 1 from the top to show the new top index\n this.top = this.top -1;\n }", "function heapify(A, idx, max) {\n var largest = idx,\n left = 2 * idx + 1,\n right = 2 * idx + 2;\n\n if (left < max && A[left] > A[idx]) {\n largest = left;\n }\n if (right < max && A[right] > A[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n swap(A, idx, largest);\n heapify(A, largest, max);\n }\n}", "remove(item) {\n // Find number of items to remove.\n const numberOfItemsToRemove = this.find(item).length;\n\n for (let iteration = 0; iteration < numberOfItemsToRemove; iteration += 1) {\n // We need to find item index to remove each time after removal since\n // indices are being changed after each heapify process.\n const indexToRemove = this.find(item).pop();\n\n // If we need to remove last child in the heap then just remove it.\n // There is no need to heapify the heap afterwards.\n if (indexToRemove === this.heapContainer.length - 1) {\n this.heapContainer.pop();\n } else {\n // Move last element in heap to the vacant (removed) position.\n this.heapContainer[indexToRemove] = this.heapContainer.pop();\n\n // Get parent.\n const parentItem = this.parent(indexToRemove);\n\n // If there is no parent or parent is in correct order with the node\n // we're going to delete then heapify down. Otherwise heapify up.\n if (\n this.hasLeftChild(indexToRemove) &&\n (!parentItem || parentItem <= this.heapContainer[indexToRemove])\n ) {\n this.heapifyDown(indexToRemove);\n } else {\n this.heapifyUp(indexToRemove);\n }\n }\n }\n\n return this;\n }", "function heapify(array, size, i) {\n let max = i // initialize max as root\n let left = 2 * i + 1\n let right = 2 * i + 2\n \n // if left child is larger than root\n if (left < size && array[left] > array[max])\n max = left\n \n // if right child is larger than max\n if (right < size && array[right] > array[max])\n max = right\n \n // if max is not root\n if (max != i) {\n // swap\n let temp = array[i]\n array[i] = array[max]\n array[max] = temp\n \n // recursively heapify the affected sub-tree\n heapify(array, size, max)\n }\n }", "function heapSort(arr,comp){\r\n // Turn arr into a heap\r\n heapify(arr,comp);\r\n for(let i = arr.length-1; i > 0; i--){\r\n // The 0th element of a heap is the largest so move it to the top.\r\n [arr[0],arr[i]] = [arr[i],arr[0]];\r\n // The 0th element is no longer the largest; restore the heap property\r\n siftDown(arr,comp,0);\r\n }\r\n}", "async function heapify(arr,length,i){\n chosen.style.color=\"black\";\n chosen.innerHTML=`Turning the remaining array into max heap...`;\n let largest=i;\n let left=i*2+1;\n let right=left+1;\n let rightBar=document.querySelector(`.bar${right}`);\n let leftBar=document.querySelector(`.bar${left}`);\n let iBar=document.querySelector(`.bar${i}`);\n await sleep(speed);\n iBar.style.backgroundColor=\"#3500d3\";//selected\n if (left<length)\n leftBar.style.backgroundColor=\"#f64c72\";//checking\n if (right<length)\n rightBar.style.backgroundColor=\"#f64c72\";//checking\n if (left<length && arr[left]>arr[largest])\n largest=left;\n if (right<length && arr[right]>arr[largest])\n largest=right;\n if(largest!=i){\n let largestBar=document.querySelector(`.bar${largest}`);\n iBar=document.querySelector(`.bar${i}`);\n [arr[largest],arr[i]]=[arr[i],arr[largest]];\n [largestBar.style.height,iBar.style.height]=[iBar.style.height,largestBar.style.height];\n [largestBar.innerHTML,iBar.innerHTML]=[iBar.innerHTML,largestBar.innerHTML];\n await sleep(speed);\n iBar.style.backgroundColor=\"#17a2b8\";//original\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n\n await heapify(arr,length,largest);\n }\n iBar.style.backgroundColor=\"#17a2b8\";//original\n if (left<length)\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n if (right<length)\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n}", "function pqdownheap(tree, k) {\n\t\tvar v = heap[k],\n\t\t\tj = k << 1; // left son of k\n\n\t\twhile (j <= heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < heap_len && SMALLER(tree, heap[j + 1], heap[j])) {\n\t\t\t\tj++;\n\t\t\t}\n\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (SMALLER(tree, v, heap[j])) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t}", "dequeue() {\n // set a variable equal to the object keys array\n var keys = Object.keys(this.storage);\n // set a variable equal to the lowest key value\n var lowest = this.storage[keys[0]];\n // delete the lowest key value\n delete this.storage[keys[0]];\n // return the lowest key value variable\n return lowest;\n }", "function fix_extrema(slot) {\n if (slot.maximum !== undefined) {\n slot.max = slot.maximum;\n delete slot.maximum;\n }\n if (slot.minimum !== undefined) {\n slot.min = slot.minimum;\n delete slot.minimum;\n }\n }", "delete(value) {\n if (this.head.back === this.head && this.head.value === value) {\n this.head = null;\n } else {\n let temp = this.head;\n\n while (temp.value !== value) {\n if (temp.forward.value <= temp.value) {\n return false;\n }\n temp = temp.forward;\n }\n\n temp.back.forward = temp.forward;\n temp.forward.back = temp.back;\n\n if (temp === this.head) {\n this.head = temp.forward;\n }\n\n delete this.temp;\n }\n this.size--;\n return true;\n }", "function heapSort(array) {\n \n let heap = new MaxHeap();\n array.forEach(num => heap.insert(num)); // 1) build heap O(N) Amortized Time\n\n let sorted = [];\n while (heap.array.length > 1) { // 2) continously delete max and push deleted to sorted arr until heap empty\n sorted.push(heap.deleteMax()); // deletion takes log(N)\n }\n \n return sorted;\n}" ]
[ "0.8018191", "0.76265055", "0.7623531", "0.7504439", "0.74354666", "0.72889215", "0.7252715", "0.71510285", "0.71128887", "0.7089084", "0.69999665", "0.6982427", "0.6941861", "0.68232596", "0.6717149", "0.67013896", "0.6697178", "0.66557425", "0.6639741", "0.6616899", "0.661175", "0.6586071", "0.6577476", "0.6492891", "0.64878803", "0.64686894", "0.646686", "0.6457381", "0.6451232", "0.6433157", "0.6375306", "0.63699615", "0.63528305", "0.63376117", "0.6305921", "0.6298585", "0.62723464", "0.62680835", "0.6253694", "0.62215304", "0.6220224", "0.61919993", "0.61917007", "0.61917007", "0.61871445", "0.61800975", "0.6152281", "0.6149615", "0.6130561", "0.6130561", "0.6130561", "0.6130561", "0.6130561", "0.61152905", "0.6109665", "0.6109665", "0.6097604", "0.60918033", "0.6090393", "0.60841537", "0.6064383", "0.6062775", "0.6045966", "0.60422564", "0.60352784", "0.6028912", "0.60182506", "0.60182506", "0.5999158", "0.5994425", "0.59915185", "0.5990655", "0.5978548", "0.59773666", "0.59666604", "0.59636337", "0.59586674", "0.59402734", "0.59397125", "0.5930308", "0.5927479", "0.5910384", "0.59097075", "0.5909302", "0.5908946", "0.5901126", "0.58958316", "0.58862203", "0.5878188", "0.5875819", "0.5869142", "0.5856786", "0.5849426", "0.5832323", "0.5810083", "0.57974553", "0.5795215", "0.5793628", "0.5789887", "0.57879096" ]
0.88509464
0
stores the max value and then removes it from the heap
extractMax() { const max = this.heap[0]; this.remove(max); return max; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "function maxHeapify(arr){\n\n}", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "remove() {\n // Swap root value with last element in the heap\n // Pop the last element from heap array\n // Perform siftDown to correct position of swapped value\n // Return popped value\n this.swap(0, this.heap.length - 1, this.heap);\n const valueToRemove = this.heap.pop();\n this.siftDown(0, this.heap.length - 1, this.heap);\n \n return valueToRemove;\n }", "removeMin() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "function nMax(){\n var arr=[-3,3,5,7];\n var max= arr[0];\n for(var i = 0; i< arr.length; i++){\n if(arr[i]>max){\n max=arr[i];\n arr.splice(max);\n }\n }\n for(var i=0; i<arr.length;i++){\n if(arr[i]>max){\n max=arr[i];\n \n }\n }\n console.log(max);\n return max;\n }", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "findMax() {\r\n\t\treturn this.heap[0];\r\n\t}", "buildMaxHeap() {}", "maxToBack(){\n var runner = this.head;\n var max = this.head\n var prevnode = this.head\n var maxprev = null\n while (runner != null) {\n if (runner.val > max.val) {\n max = runner;\n maxprev = prevnode\n }\n prevnode = runner\n runner = runner.next\n }\n prevnode.next = max\n maxprev.next = max.next\n max.next = null;\n }", "extractMax(){\r\n if(this.values.length === 1) return this.values.pop();\r\n const oldRoot = this.values[0];\r\n this.values[0] = this.values[this.values.length-1];\r\n this.values.pop();\r\n let idx = 0;\r\n let child1 = (2*idx) + 1;\r\n let child2 = (2*idx) + 2;\r\n\r\n while(this.values[idx] < this.values[child1] || \r\n this.values[idx] < this.values[child2]){\r\n child1 = (2*idx) + 1;\r\n child2 = (2*idx) + 2;\r\n if(this.values[child1] >= this.values[child2]){\r\n let temp = this.values[child1];\r\n this.values[child1] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child1;\r\n } else {\r\n let temp = this.values[child2];\r\n this.values[child2] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child2;\r\n }\r\n }\r\n return oldRoot;\r\n }", "extractMax() {\n let values = this.values;\n if (values.length === 0) return;\n let max = values[0];\n // For time complexity reasons, I swap first then remove the old root node\n values[0] = values[values.length - 1];\n values.pop();\n console.log(values);\n // instatiate child nodes\n let child1, child2, indexToSwap;\n let currentIndex = 0;\n while (true) {\n child1 = currentIndex * 2 + 1;\n child2 = currentIndex * 2 + 2;\n if (values[currentIndex] >= Math.max(values[child1], values[child2])) {\n break;\n }\n indexToSwap = values[child1] > values[child2] ? child1 : child2;\n if (!values[indexToSwap]) break;\n let oldNode = values[currentIndex];\n values[currentIndex] = values[indexToSwap];\n values[indexToSwap] = oldNode;\n currentIndex = indexToSwap;\n }\n this.values = values;\n return max;\n }", "extractMax(){\n const max = this.values.shift();\n let current = this.values.pop();\n if(this.values.length > 0){\n this.values.unshift(current);\n this.sinkDown();\n }\n return max;\n }", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let index = 0\n let element = this.values[index]\n // repeat until neither child is greater than the element\n while(true) {\n let swapped = null\n let leftIndex = 2 * index + 1\n let rightIndex = 2 * index + 2\n if (leftIndex < this.values.length) {\n if(this.values[leftIndex] > element) {\n swapped = leftIndex\n }\n }\n if (rightIndex < this.values.length) {\n if( (!swapped && this.values[rightIndex] > element || !!swapped && this.values[rightIndex] > this.values[leftIndex])) {\n swapped = rightIndex\n }\n }\n if (swapped===null) break\n this.values[index] = this.values[swapped]\n this.values[swapped] = element\n index = swapped\n }\n return max\n }", "delMin() {\n /*\n * Save reference to the min key.\n * Swap the min key with the last key in the heap.\n * Decrement n so that the key does not swim back up the heap.\n * Sink down the heap to fix any violations that have arisen.\n * Delete the min key to prevent loitering, and return its reference.\n */\n let min = this.heap[1];\n\n [this.heap[1], this.heap[this.n]] = [this.heap[this.n], this.heap[1]];\n this.n--;\n this.sink(1);\n this.heap[this.n+1] = null;\n\n return min;\n }", "maxHeap(index) {\n var left = this.left(index);\n var right = this.right(index);\n var largest = index;\n if (left < this.heapSize && this.array[left] > this.array[index]) {\n largest = left;\n }\n if (right < this.heapSize && this.array[right] > this.array[largest]) {\n largest = right;\n }\n if (largest != index) {\n this.swap(this.array, index, largest);\n this.maxHeap(largest);\n }\n }", "function deleteMax(h) { \n if (isRed(h.left))\n h = rotateRight(h);\n\n if (h.right == null || h.right == undefined)\n return null;\n\n if (!isRed(h.right) && !isRed(h.right.left))\n h = moveRedRight(h);\n\n h.right = deleteMax(h.right);\n\n return balance(h);\n }", "function MaxPriorityQueue(array){\r\n MaxHeap.call(this, array)\r\n}", "static maxHeapify(a, i) {\n let left = Heap.left(i);\n let right = Heap.right(i);\n\n // Find largest node between current, left and right\n let largest;\n if (left < a.heap_size && a[left] > a[i])\n largest = left;\n else\n largest = i;\n\n if (right < a.heap_size && a[right] > a[largest])\n largest = right;\n\n // Move current element to 'largest' position, and\n // continue until the element is positioned correctly\n if (largest != i) {\n let temp = a[i];\n a[i] = a[largest];\n a[largest] = temp;\n\n Heap.maxHeapify(a, largest);\n }\n }", "function maxHeapify(arr, length, parent) {\n var largest = parent;\n var leftChild = 2 * parent + 1;\n var rightChild = 2 * parent + 2;\n\n if (leftChild < length && arr[leftChild] > arr[largest]) {\n largest = leftChild;\n }\n\n if (rightChild < length && arr[rightChild] > arr[largest]) {\n largest = rightChild;\n }\n\n if (largest != parent) {\n var temp = arr[largest];\n arr[largest] = arr[parent];\n arr[parent] = temp;\n\n maxHeapify(arr, length, largest);\n }\n}", "heapDown(index) {\n const [leftIndex, rightIndex] = this.children(index);\n \n if (!leftIndex && !rightIndex) return;\n\n let min;\n rightIndex ? min = rightIndex : min = leftIndex;\n if ((leftIndex && rightIndex) &&\n this.store[leftIndex].key < this.store[rightIndex].key) {\n min = leftIndex;\n }\n\n if (this.store[index].key > this.store[min].key) {\n this.swap(index, min);\n this.heapDown(min);\n }\n }", "remove(key) {\n this.storage.set(getIndexBelowMax(key), undefined);\n }", "insert_num(num) {\n // Insert a number if the num is less than the top ele in maxHeap, or maxHeap top is null\n if (!this.maxHeap.values.length || this.maxHeap.peek() >= num) {\n this.maxHeap.insert(num);\n } else {\n this.minHeap.insert(num);\n }\n\n // Rebalance the heaps. Max heap should have 1 extra element if total num of elements is odd\n if (this.maxHeap.values.length > this.minHeap.heap.length + 1) {\n this.minHeap.insert(this.maxHeap.extractMax());\n } else if (this.maxHeap.values.length < this.minHeap.heap.length) {\n this.maxHeap.insert(this.minHeap.remove());\n }\n }", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.minHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "remove() {\n if (this.isEmpty()) return;\n this.swap(0, this.store.length - 1);\n const { value } = this.store.pop();\n if (!this.isEmpty()) this.heapDown(0);\n return value;\n }", "function buildMaxHeap() {\n for (let i = Math.floor(array.length / 2) - 1; i >= 0; i--) {\n maxHeapify(i, array.length);\n }\n}", "maxToBack(){\n // your code here\n var runner = this.head\n var max = runner\n while (runner.next != null){\n if (runner.next.value > max.value){\n max = runner.next\n }\n runner = runner.next\n }\n var temp = runner.value\n runner.value = max.value\n max.value = temp\n return this\n }", "extractMax() {\n const max = this.values[0];\n const end = this.values.pop();\n this.values[0] = end;\n this.sinkDown();\n return max;\n }", "function maxHeapify(idx, hSize) {\n let largest;\n const left = (2 * idx) + 1;\n const right = (2 * idx) + 2;\n if (left < hSize && array[left] > array[idx]) {\n largest = left;\n } else {\n largest = idx;\n }\n if (right < hSize && array[right] > array[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n const temp = array[idx];\n array[idx] = array[largest];\n array[largest] = temp;\n maxHeapify(largest, hSize);\n }\n}", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "dequeue (){\n // let removedRoot = this.values[0];\n //replace with last added value\n //TEACHERS SOLUTION\n const min = this.values[0];\n const end = this.values.pop();\n //EDGE CASE IF NOTHING LEFT IN\n if(this.values.length > 0){\n //LINE 97 CAUSES A FOREVER LOOP WITH THE LAST ELEMENT IF WE DON'T ADD THE CONDITIONAL, BECAUSE WE REASSIGN THE ROOT TO BE END (WHICH WAS THE ORIGINAL ROOT IF THERE'S ONLY ONE ELEMENT)\n this.values[0] = end;\n //START TRICKLE DOWN\n this.sinkDown();\n }\n \n \n return min;\n }", "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\n }\n\n for (let endOfHeap = array.length - 1; endOfHeap >= 0; endOfHeap--) { // 2) loop from end of maxHeap to begin/left, and \"delete\" max val until heap region is \"empty\"\n [array[endOfHeap], array[0]] = [array[0], array[endOfHeap]]; // 3) swap the root of the heap with the last element of the heap, this shrinks the heap by 1 and grows the sorted array by 1\n\n console.log(array);\n\n heapify(array, endOfHeap, 0); // 4) sift down the new root, but not past the end of the heap\n }\n\n return array;\n}", "extractMax() {\n // swap the first value in the values property with the last value\n // pop from the values property, so you can return the value at the end.\n // 'sink down' to the correct spot\n const max = this.values[0];\n const end = this.values.pop();\n if (this.values.length > 0) {\n this.values[0] = end;\n // move it to the correct position\n this.bubbleDown();\n }\n return max;\n }", "function heap_root(input, i) { \n var left = 2 * i + 1; \n var right = 2 * i + 2; \n var max = i; \n \n if (left < array_length && input[left] > input[max]) { \n max = left; \n } \n \n if (right < array_length && input[right] > input[max]) { \n max = right; \n } \n \n if (max != i) { \n swap(input, i, max); \n heap_root(input, max); \n } \n}", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "static buildMaxHeap(a) {\n a.heap_size = a.length;\n\n // Max-heapify the first n/2 elements as\n // they are tree nodes, and the remaining are\n // usually tree leaves\n let mid = parseInt(a.length / 2);\n for (let i = mid; i >= 0; i -= 1) {\n Heap.maxHeapify(a, i);\n }\n }", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "insert(val) {\n this.array.push(val);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// push value to end of array (add node to farthest bottom left of tree)\n\n this.siftUp(this.array.length - 1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuously swap value toward front of array to maintain maxHeap property\n }", "async function MaxHeapify( i, heapSize)\n{\n\n let hasLeft = (2 * i + 1 < heapSize) ? true : false;\n let hasRight = (2 * i + 2 < heapSize) ? true : false;\n let l, r;\n let largest = i;\n if (hasLeft)\n l = arr[2 * i + 1].offsetHeight;\n if (hasRight)\n r = arr[2 * i + 2].offsetHeight;\n if (hasLeft && arr[i].offsetHeight < l)\n {\n largest = 2 * i + 1;\n }\n if (hasRight && arr[largest].offsetHeight < r)\n {\n largest = 2 * i + 2;\n }\n if (largest != i)\n {\n arr[i].style.backgroundColor='white';\n arr[largest].style.backgroundColor='green';\n await timer(delay);\n await swap(i, largest);\n arr[i].style.backgroundColor='red';\n arr[largest].style.backgroundColor='red';\n await MaxHeapify(largest, heapSize);\n }\n}", "function maxHeapify(arr , n , i)\n\t{\n\t\n\t\t// Find largest of node and its children\n\t\tif (i >= n) {\n\t\t\treturn;\n\t\t}\n\t\tvar l = i * 2 + 1;\n\t\tvar r = i * 2 + 2;\n\t\tvar max;\n\t\tif (l < n && arr[l] > arr[i]) {\n\t\t\tmax = l;\n\t\t} else\n\t\t\tmax = i;\n\t\tif (r < n && arr[r] > arr[max]) {\n\t\t\tmax = r;\n\t\t}\n\n\t\t// Put maximum value at root and\n\t\t// recur for the child with the\n\t\t// maximum value\n\t\tif (max != i) {\n\t\t\tvar temp = arr[max];\n\t\t\tarr[max] = arr[i];\n\t\t\tarr[i] = temp;\n\t\t\tmaxHeapify(arr, n, max);\n\t\t}\n\t}", "extractMax() {\n const max = this.values[0]\n const end = this.values.pop()\n\n if (this.values.length > 0) {\n this.values[0] = end\n this._sinkDown()\n }\n\n return max\n }", "heapify(/*index*/ i) {\n let l = this.left(i);\n let r = this.right(i);\n let biggest = i;\n if (l < this.heap_size && this.harr[i].element.compareByMulKeys(this.harr[l].element, this.compareValues) == -1)\n biggest = l;\n if (r < this.heap_size && this.harr[biggest].element.compareByMulKeys(this.harr[r].element, this.compareValues) == -1)\n biggest = r;\n if (biggest != i) {\n this.swap(this.harr, i, biggest);\n this.heapify(biggest);\n }\n }", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "function buildHeap(arr, type) {\n // gets the last index\n var lastIndex = arr.length - 1;\n // While the last index is greater than 0\n while (lastIndex > 0) {\n // get the parent index\n var parentIndex = Math.floor((lastIndex - 1) / 2);\n // get the items inside the parent\n // and the last index \n var lastItem = arr[lastIndex];\n var parentItem = arr[parentIndex];\n\n if (type === 'maxHeap') {\n // checks to see if the lastItem is greater\n // than the parentItem if so then do a swap\n if (lastItem > parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n else if (type === 'minHeap') {\n // checks to see if the lastItem is less\n // than the parentItem if so then do a swap\n if (lastItem < parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n\n }\n }", "maxValue() {\n let currNode = this.top;\n let maxValue = this.top.value;\n \n while (currNode.next) {\n if (currNode.next.value > maxValue) maxValue = currNode.next.value;\n currNode = currNode.next;\n }\n \n return maxValue;\n }", "function heapifyStandart(currentIndex, heapSize ,arr){\n\n var largestElement = currentIndex\n var leftIndex = 2 * currentIndex + 1\n var rightIndex = 2 * currentIndex + 2\n\n if (leftIndex < heapSize && arr[currentIndex] < arr[leftIndex]){\n largestElement = leftIndex\n }\n \n if (rightIndex < heapSize && arr[largestElement] < arr[rightIndex]){\n largestElement = rightIndex\n }\n\n if (largestElement != currentIndex){\n swapArrayElement(currentIndex, largestElement, arr)\n heapifyStandart(largestElement, heapSize, arr)\n }\n}", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "function heapify(A, idx, max) {\n var largest = idx,\n left = 2 * idx + 1,\n right = 2 * idx + 2;\n\n if (left < max && A[left] > A[idx]) {\n largest = left;\n }\n if (right < max && A[right] > A[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n swap(A, idx, largest);\n heapify(A, largest, max);\n }\n}", "function heapify(array, size, i) {\n let max = i // initialize max as root\n let left = 2 * i + 1\n let right = 2 * i + 2\n \n // if left child is larger than root\n if (left < size && array[left] > array[max])\n max = left\n \n // if right child is larger than max\n if (right < size && array[right] > array[max])\n max = right\n \n // if max is not root\n if (max != i) {\n // swap\n let temp = array[i]\n array[i] = array[max]\n array[max] = temp\n \n // recursively heapify the affected sub-tree\n heapify(array, size, max)\n }\n }", "pop(){\r\n if (this.top === -1){\r\n return undefined;\r\n }else{\r\n delete this.storage[this.top];\r\n this.top -= 1;\r\n }\r\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "function heapSort(array){\n // 1: Construction\n let heap = new MaxHeap()\n array.forEach(ele => {\n heap.insert(ele)\n });\n\n// 2: sortdown \n let sorted = []\n while (heap.array.length > 1){\n sorted.push(heap.deleteMax())\n }\n return sorted\n}", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "dequeue() {\n const [next] = this.values;\n this.values[0] = this.values.pop();\n let childLeft, childRight;\n let curr = 0;\n while (true) {\n let childLeftIdx = 2 * curr + 1;\n let childRightIdx = childLeft + 1;\n let swap = null;\n if (childLeftIdx < this.values.length) {\n childLeft = this.values[childLeftIdx];\n if (childLeft.priority > this.values[curr].priority) {\n swap = childLeft;\n }\n\n if (childRightIdx < this.values.length) {\n childRight = this.values[childRight];\n if (\n (swap === null &&\n childRight.priority < this.values[curr].priority) ||\n (swap !== null && childRight < childLeft.priority)\n ) {\n swap = childRightIdx;\n }\n }\n\n if (swap === null) break;\n const temp = this.values[curr];\n this.values[curr] = this.values[swap];\n this.values[swap] = temp;\n curr = swap;\n }\n }\n }", "dequeue(){\n const oldRoot = this.values[0];\n const lastNode = this.values.pop();\n \n if(this.values.length > 0){\n this.values[0] = lastNode;\n this.bubbleDown();\n }\n \n return oldRoot;\n }", "function maxHeap(array, n, i) {\n let largest = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if (left < n && array[left] > array[largest]) {\n largest = left;\n }\n\n // If right child is larger than largest so far\n if (right < n && array[right] > array[largest]) {\n largest = right;\n }\n\n // If largest is not root\n if (largest != i) {\n let swap = array[i];\n array[i] = array[largest];\n array[largest] = swap;\n\n // Recursively heapify the affected sub-tree\n maxHeap(array, n, largest);\n }\n}", "function heapify(currentIndex, arr){\n\n if (isHavingChildrenLeft(currentIndex, arr)) {\n let parent = arr[currentIndex]\n\n if (isHavingChildrenRight(currentIndex, arr)){\n let maxChildren = Math.max(arr[currentIndex * 2 + 1], arr[currentIndex * 2 + 2])\n if (parent < maxChildren){\n let maxChilrenIndex = maxChildren == arr[currentIndex * 2 + 1] ? currentIndex * 2 + 1 : currentIndex * 2 + 2 \n swapArrayElement(currentIndex, maxChilrenIndex, arr)\n heapify(maxChilrenIndex, arr)\n }\n }else {\n if (parent < arr[currentIndex * 2 + 1]){\n swapArrayElement(currentIndex, currentIndex * 2 + 1, arr)\n heapify(currentIndex * 2 + 1, arr)\n }\n }\n }else {\n console.log(\"skipping index %d\", currentIndex)\n }\n}", "insert(value) {\n // Insert value to the end of array\n // Perform siftUp to correct position of value in the heap tree\n this.heap.push(value);\n this.siftUp(this.heap.length - 1, this.heap);\n }", "bubble_down (p) {\n // var max_index = max_by(\n // [p, this.right_child(p), this.left_child(p)], // indices\n // index => this.queue[index] || -1 // scoring function\n // )\n\n // var max_index = p\n // var left_child_index = this.left_child(p)\n // var right_child_index = this.right_child(p)\n // if (this.queue[left_child_index] > this.queue[max_index]) {\n // max_index = left_child_index\n // }\n // if (this.queue[right_child_index] > this.queue[max_index]) {\n // max_index = right_child_index\n // }\n //\n // if (max_index !== p) {\n // this.swap(p, max_index)\n // this.bubble_down(max_index)\n // }\n\n\n // // latest and greatest\n var length = this.queue.length;\n var element = this.queue[p]\n\n while(true) {\n var child1N = this.left_child(p)\n var child2N = this.right_child(p)\n\n var swap = null\n if(child1N < length) {\n var child1 = this.queue[child1N]\n\n if (child1 > element)\n swap = child1N\n }\n\n if (child2N < length) {\n var child2 = this.queue[child2N]\n if(child2 > (swap === null ? element : this.queue[child1N]))\n swap = child2N\n }\n\n if (swap == null) {\n break;\n }\n\n this.queue[p] = this.queue[swap]\n this.queue[swap] = element\n p = swap\n }\n }", "function thirdLargestNode(tree) {\n tree.remove(tree._findMax().key);\n tree.remove(tree._findMax().key);\n return tree._findMax().key;\n}", "pop() {\n //delete the current top values within the stack\n delete this.items[this.top];\n //deduct 1 from the top to show the new top index\n this.top = this.top -1;\n }", "function setHighest() {\n highest = i;\n if (typeof (Storage) !== \"undefined\") {\n window.localStorage.setItem(\"maxScore\", highest);\n }\n maxElement.innerHTML = highest;\n}", "dequeue() {\n // set a variable equal to the object keys array\n var keys = Object.keys(this.storage);\n // set a variable equal to the lowest key value\n var lowest = this.storage[keys[0]];\n // delete the lowest key value\n delete this.storage[keys[0]];\n // return the lowest key value variable\n return lowest;\n }", "function MaxStack () {\n this.max;\n this.array = [];\n}", "delete(value) {\n if (this.head.back === this.head && this.head.value === value) {\n this.head = null;\n } else {\n let temp = this.head;\n\n while (temp.value !== value) {\n if (temp.forward.value <= temp.value) {\n return false;\n }\n temp = temp.forward;\n }\n\n temp.back.forward = temp.forward;\n temp.forward.back = temp.back;\n\n if (temp === this.head) {\n this.head = temp.forward;\n }\n\n delete this.temp;\n }\n this.size--;\n return true;\n }", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "poll() {\n const { queue } = this;\n // remove the top priority value at index 0\n const topPriority = queue[0];\n // new queue has bottom value at top & we shrink the size\n // of the queue as there is one less value\n queue[0] = queue.pop();\n let replacedValIndex = 0;\n let replacedVal = queue[replacedValIndex];\n let leftChildNodeIndex = this.getLeftChildNodeIndex(replacedValIndex);\n let leftChildNodeVal = queue[leftChildNodeIndex];\n let rightChildNodeIndex = this.getRightChildNodeIndex(replacedValIndex);\n let rightChildNodeVal = queue[rightChildNodeIndex];\n while (\n (replacedVal > leftChildNodeVal) |\n (replacedVal > rightChildNodeVal)\n ) {\n if (rightChildNodeVal < leftChildNodeVal) {\n queue[replacedValIndex] = rightChildNodeVal;\n queue[rightChildNodeIndex] = replacedVal;\n replacedValIndex = rightChildNodeIndex;\n leftChildNodeIndex = this.getLeftChildNodeIndex(replacedValIndex);\n leftChildNodeVal = queue[leftChildNodeIndex];\n rightChildNodeIndex = this.getRightChildNodeIndex(replacedValIndex);\n rightChildNodeVal = queue[rightChildNodeIndex];\n } else {\n queue[replacedValIndex] = leftChildNodeVal;\n queue[leftChildNodeIndex] = replacedVal;\n replacedValIndex = leftChildNodeIndex;\n leftChildNodeIndex = this.getLeftChildNodeIndex(replacedValIndex);\n leftChildNodeVal = queue[leftChildNodeIndex];\n rightChildNodeIndex = this.getRightChildNodeIndex(replacedValIndex);\n rightChildNodeVal = queue[rightChildNodeIndex];\n }\n }\n console.log(\"Polled val:\", topPriority);\n }", "maxHeapify(arr, n, i) {\r\n\t\tlet largest = i;\r\n\t\tlet leftIndex = 2 * i + 1;\r\n\t\tlet rightIndex = 2 * i + 2;\r\n\r\n\t\tif (leftIndex < n && arr[leftIndex] > arr[largest]) {\r\n\t\t\tlargest = leftIndex;\r\n\t\t}\r\n\t\tif (rightIndex < n && arr[rightIndex] > arr[largest]) {\r\n\t\t\tlargest = rightIndex;\r\n\t\t}\r\n\t\tif (largest != i) {\r\n\t\t\tlet temp = arr[i];\r\n\t\t\tarr[i] = arr[largest];\r\n\t\t\tarr[largest] = temp;\r\n\t\t\tthis.maxHeapify(arr, n, largest);\r\n\t\t}\r\n\t}", "function MinHeap() {\n\n /**\n * Insert an item into the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} x\n */\n this.insert = function(x) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:)\n *\n * @return{number}\n */\n this.peek = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Remove and return the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.pop = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the size of the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.size = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Convert the heap data into a string\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{string}\n */\n MinHeap.prototype.toString = function() {\n // INSERT YOUR CODE HERE\n }\n\n /*\n * The following are some optional helper methods. These are not required\n * but may make your life easier\n */\n\n /**\n * Get the index of the parent node of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var parent = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the index of the left child of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var leftChild = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Swap the values at 2 indices in our heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @param{number} j\n */\n var swap = function(i, j) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble up the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleUp = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble down the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleDown = function(i) {\n // INSERT YOUR CODE HERE\n }\n}", "function heapify(arr,comp){\r\n // arr[n/2-1:n-1] already satisfies the heap property because they are the leaves.\r\n for(let i = Math.floor((arr.length-2)/2); i >= 0; i--){\r\n // Restore the heap property for i\r\n siftDown(arr, comp, i);\r\n }\r\n // Now that the heap property is satisfied for all i from 0 to n-1, the array is a heap\r\n}", "function max() {\n // set node to the root value\n var node = this.root;\n // loop until there is no more values to the right\n while( node.right != null ) {\n node = node.right; // move to the right value\n } // end while\n return node.data;\n} // end max", "remove(element,comparator=this.compare){\r\n let totalOccurenceOfElement=this.find(element,comparator).length;\r\n for(let i=0;i<totalOccurenceOfElement;i++){\r\n let removeIndex=this.heapContainer.findIndex((x)=> comparator.equal(x,element)); // findIndex is used for finding first found element's index\r\n let heapSize=this.heapContainer.length;\r\n // if the element is at last index simply remove it as we\r\n // don't need to haepify\r\n if(removeIndex===heapSize-1){\r\n this.heapContainer.pop();\r\n }\r\n else{\r\n this.heapContainer[removeIndex]=this.heapContainer[heapSize-1]; \r\n this.heapContainer.pop();\r\n let parentElement=this.getParent(removeIndex);\r\n let elementAtRemovedIndex=this.heapContainer[removeIndex];\r\n // if at index where the element is removed does not have a parent element that means it was on root and we cannot go up to heapify and alternately if the parent element\r\n // is in right order as compare to the new element that is moved to removed index that means we dont' have to take care of upper part of heap as if it is i right position to parent than it will also be in correct position to it's\r\n // parent's parent and we have used hasLeftChild because we only need to heapify down if there exists element in \r\n // down side\r\n if(!parentElement || this.isPairInRightOrder(parentElement,elementAtRemovedIndex) && this.hasLeftChild(removeIndex)){\r\n this.heapifyDown(removeIndex);\r\n }\r\n else{\r\n this.heapifyUp(removeIndex);\r\n }\r\n }\r\n \r\n }\r\n return this;\r\n }", "function checkHighest(value) {\n if (isHighest < value) {\n isHighest = value;\n }\n}", "function heapSort(arr,comp){\r\n // Turn arr into a heap\r\n heapify(arr,comp);\r\n for(let i = arr.length-1; i > 0; i--){\r\n // The 0th element of a heap is the largest so move it to the top.\r\n [arr[0],arr[i]] = [arr[i],arr[0]];\r\n // The 0th element is no longer the largest; restore the heap property\r\n siftDown(arr,comp,0);\r\n }\r\n}", "grow() {\n this.capacity *= 2;\n this.capacity = this.closestLargestPrime(this.capacity);\n for (let i = 0; i < this.table.length; i++) {\n let currentBucket = this.table[i];\n this.table[i] = [];\n if (currentBucket) {\n if (currentBucket.length > 0) {\n this.elements--;\n currentBucket.forEach(item => {\n this.add(item.key, item.value);\n });\n }\n }\n }\n }", "function Heap(){\n this.heap = [];\n}", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "async function heapify(arr,length,i){\n chosen.style.color=\"black\";\n chosen.innerHTML=`Turning the remaining array into max heap...`;\n let largest=i;\n let left=i*2+1;\n let right=left+1;\n let rightBar=document.querySelector(`.bar${right}`);\n let leftBar=document.querySelector(`.bar${left}`);\n let iBar=document.querySelector(`.bar${i}`);\n await sleep(speed);\n iBar.style.backgroundColor=\"#3500d3\";//selected\n if (left<length)\n leftBar.style.backgroundColor=\"#f64c72\";//checking\n if (right<length)\n rightBar.style.backgroundColor=\"#f64c72\";//checking\n if (left<length && arr[left]>arr[largest])\n largest=left;\n if (right<length && arr[right]>arr[largest])\n largest=right;\n if(largest!=i){\n let largestBar=document.querySelector(`.bar${largest}`);\n iBar=document.querySelector(`.bar${i}`);\n [arr[largest],arr[i]]=[arr[i],arr[largest]];\n [largestBar.style.height,iBar.style.height]=[iBar.style.height,largestBar.style.height];\n [largestBar.innerHTML,iBar.innerHTML]=[iBar.innerHTML,largestBar.innerHTML];\n await sleep(speed);\n iBar.style.backgroundColor=\"#17a2b8\";//original\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n\n await heapify(arr,length,largest);\n }\n iBar.style.backgroundColor=\"#17a2b8\";//original\n if (left<length)\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n if (right<length)\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n}", "remove(key) {\n\n // getIndexBelowMax(this.storage[key]);\n }", "function heapDown(i) {\n var w = heapWeight(i)\n while(true) {\n var tw = w\n var left = 2*i + 1\n var right = 2*(i + 1)\n var next = i\n if(left < heapCount) {\n var lw = heapWeight(left)\n if(lw < tw) {\n next = left\n tw = lw\n }\n }\n if(right < heapCount) {\n var rw = heapWeight(right)\n if(rw < tw) {\n next = right\n }\n }\n if(next === i) {\n return i\n }\n heapSwap(i, next)\n i = next \n }\n }", "get maximumValue() {\r\n return this.i.bk;\r\n }" ]
[ "0.8409695", "0.7879714", "0.7587512", "0.73521113", "0.7306259", "0.7145239", "0.70757776", "0.704312", "0.7007635", "0.6922104", "0.69028175", "0.6883229", "0.6675872", "0.66631365", "0.6653203", "0.6634924", "0.6612459", "0.6608291", "0.6604799", "0.6594207", "0.65926903", "0.65630907", "0.6522862", "0.6492589", "0.64765686", "0.64485496", "0.64473987", "0.6428361", "0.64063966", "0.637303", "0.6356647", "0.6354935", "0.63470674", "0.6343337", "0.6314007", "0.6290521", "0.628272", "0.627295", "0.62637", "0.6250769", "0.62430024", "0.6194882", "0.6193073", "0.618998", "0.61825514", "0.61568564", "0.61397296", "0.6121446", "0.6119427", "0.6119427", "0.60943687", "0.60943687", "0.60943687", "0.60943687", "0.60943687", "0.6092093", "0.60565263", "0.60512114", "0.60456145", "0.6041379", "0.6041103", "0.60286254", "0.6025426", "0.6020237", "0.60086685", "0.60055417", "0.59939545", "0.5983992", "0.5961944", "0.5961944", "0.5956256", "0.5953928", "0.59450287", "0.59280264", "0.5911503", "0.589061", "0.5873521", "0.5871659", "0.5859939", "0.5858916", "0.584816", "0.5844701", "0.58362556", "0.5815201", "0.5810098", "0.5809295", "0.5803843", "0.58015954", "0.57942224", "0.5792501", "0.57889634", "0.5775397", "0.5761579", "0.5755631", "0.5750898", "0.5749015", "0.5741211", "0.57360107", "0.57195616", "0.571735" ]
0.7318626
4
return the size of the heap
size() { return this.heap.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "size() {\n\t\treturn this.heap.length;\n\t}", "getHeap() {\r\n\t\treturn this.heap;\r\n\t}", "getHeap() {\r\n\t\treturn this.heap;\r\n\t}", "get size() {\n let size = 0;\n for (let i = 0; i < this.children.length; i++)\n size += this.children[i].size;\n return size;\n }", "function size() {\r\n var counter = 0;\r\n for (var i = 0; i < this.PriorityQueueContents.length; i++) {\r\n counter += this.PriorityQueueContents[i].ids.length;\r\n }\r\n return counter;\r\n }", "function size() {\n\t return n;\n\t }", "function size() {\n return n;\n }", "size() {\n return Math.abs(this.tail - this.head);\n }", "function size() {\n return stack_size;\n }", "function heapisEmpty() {\n return this.size == 0 ? true : false;\n}", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "size() {\n return this.rootNode.size(this.storage);\n }", "buildMaxHeap() {}", "function getSize(){\n return queue.length;\n }", "function size(node) {\n return node.size ? node.size : 1;\n }", "size() {\n return this.tail - this.head;\n }", "function size(self) {\n return self.size();\n}", "get size() {}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "size() {\n return this.stack.length;\n }", "childCount() {\n\t\tif (!this.state()) { return 0 }\n\n\t\tif (this[_size] === undefined) {\n\t\t\tthis[_size] = Object.keys(this.state()).length;\n\t\t}\n\n\t\treturn this[_size];\n\t}", "function GetSize() : int\n\t{\n\t\tvar n = 0;\n\t\tfor( var i = 0; i < key2down.length; i++ )\n\t\t{\n\t\t\tif( key2down[i] )\n\t\t\t\tn++;\n\t\t}\n\t\treturn n;\n\t}", "function maxHeapify(arr){\n\n}", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "function Heap()\n{\n\t// h[0] not used, heap initially empty\n\n\tthis.h = [null]; // heap of integer keys\n\tthis.h_item = [null]; // corresponding heap of data-items (any object)\n\tthis.size = 0; // 1 smaller than array (also index of last child)\n\n\n\t// --------------------\n\t// PQ-required only; more could be added later when needed\n\t// the 2 basic shape maintaining operations heapify and reheapify simplify\n\t// processing functions\n\n\tthis.isEmpty = heapisEmpty; // return true if heap empty\n\tthis.deleteRoot = heapDeleteRoot; // return data-item in root\n\tthis.insert = heapInsert; // insert data-item with key\n\n\tthis.heapify = heapheapify; // make subtree heap; top-down heapify (\"sink\") used by .deleteRoot()\n\tthis.reheapify = heapreheapify; // bottom-up reheapify (\"swim\") used by .insert()\n\tthis.show = heapShow; \t // utility: return pretty formatted heap as string\n\t \t // ... etc\n\n\t// --------------------\n}", "function size(x) {\n if (x === null || x == undefined) return 0;\n return x.size;\n }", "size() {\n let count = 0;\n let node = this.head; // Declare a node variable initialize to this.head\n // While the node exist\n while (node) {\n count++; // Increment count variable\n node = node.next; // reinitialize node to next node (if node.next is null the loop will break)\n }\n return count; // return count (which is the size)\n }", "get size() {\n return this._queue.size;\n }", "get size() {\n return this._queue.size;\n }", "size(){\n return this.rear-this.front + 1;\n }", "function heapShow()\n{\n\tvar n = this.size;\n\tvar m = Math.floor(n/2); // last parent node\n\n\tvar k = this.h.slice(1,n+1), a = this.h_item.slice(1,n+1);\n\n\tvar out=\"<h2>Heap (size=\"+ n+ \"):</h2><p>Keys: \" + k + \"<br>Data: \"+ a + \"</p>\";\n\tfor (var i=1; i<=m; i++)\n\t{\n\t\tout += \"<p>\"+ i+ \": <b>\"+ this.h[i]+ \"(\"+ this.h_item[i]+ \")</b><ul>\";\n\t\tif ( 2*i <= n )\n\t\t\tout += \"<li>\"+ this.h[2*i]+ \"</li>\";\n\t\tif ( 2*i+1 <= n )\n\t\t\tout+= \"<li>\"+ this.h[2*i+1]+ \"</li>\";\n\t\tout+= \"</ul></p>\";\n\t}\n\n\treturn out;\n}", "size() {\n return this.queue.size();\n }", "function heapUp(i) {\n\t var w = heapWeight(i)\n\t while(i > 0) {\n\t var parent = heapParent(i)\n\t if(parent >= 0) {\n\t var pw = heapWeight(parent)\n\t if(w < pw) {\n\t heapSwap(i, parent)\n\t i = parent\n\t continue\n\t }\n\t }\n\t return i\n\t }\n\t }", "function heapUp(i) {\n\t var w = heapWeight(i)\n\t while(i > 0) {\n\t var parent = heapParent(i)\n\t if(parent >= 0) {\n\t var pw = heapWeight(parent)\n\t if(w < pw) {\n\t heapSwap(i, parent)\n\t i = parent\n\t continue\n\t }\n\t }\n\t return i\n\t }\n\t }", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "function MinHeap() {\n\n /**\n * Insert an item into the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} x\n */\n this.insert = function(x) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:)\n *\n * @return{number}\n */\n this.peek = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Remove and return the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.pop = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the size of the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.size = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Convert the heap data into a string\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{string}\n */\n MinHeap.prototype.toString = function() {\n // INSERT YOUR CODE HERE\n }\n\n /*\n * The following are some optional helper methods. These are not required\n * but may make your life easier\n */\n\n /**\n * Get the index of the parent node of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var parent = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the index of the left child of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var leftChild = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Swap the values at 2 indices in our heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @param{number} j\n */\n var swap = function(i, j) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble up the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleUp = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble down the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleDown = function(i) {\n // INSERT YOUR CODE HERE\n }\n}", "get nodeSize() {\n return this.isLeaf ? 1 : 2 + this.content.size;\n }", "queueSize() {\n return this.queue.length\n }", "size() {\n let _size = node => node === null ? 0 : 1 + _size(node.left) + _size(node.right)\n return _size(this.root)\n }", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "size() {\n return this.root ? this.root.size() : 0;\n }", "get size() {\n if (this._available && this._available.length > 0) {\n return this._available.length;\n }\n if (this._pending && this._pending.length > 0) {\n return -this._pending.length;\n }\n return 0;\n }", "get size() {\n return this._queue.size;\n }", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "size() {\n if (this.isEmpty()){\n return 0;\n }\n\n var size = 1;\n var runner = this.head;\n while (runner.next != null) {\n runner = runner.next;\n size ++;\n }\n return size;\n }", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "get size() {\n return this.#queue.length;\n }", "function heapWeight(i) {\n\t return weights[heap[i]]\n\t }", "function heapWeight(i) {\n\t return weights[heap[i]]\n\t }", "size(arr){\n var count = 0;\n while(this.data !== []){\n count++;\n this.pop;\n }\n return count;\n }", "function size() {\n\t return k;\n\t }", "get freeSize() {\n\t\treturn this._free.length;\n\t}", "function size() {\n return k;\n }", "capacity() {\n return (this.arr.length);\n }", "function Heap(){\n this.heap = [];\n}", "function heapUp(i) {\n var w = heapWeight(i)\n while(i > 0) {\n var parent = heapParent(i)\n if(parent >= 0) {\n var pw = heapWeight(parent)\n if(w < pw) {\n heapSwap(i, parent)\n i = parent\n continue\n }\n }\n return i\n }\n }", "size(){\n return this.queue.length;\n }", "sizeOf() {\n return this.size;\n }", "get size() {\n // Return the quad count if if was cached\n let size = this._size;\n if (size !== null) return size;\n\n // Calculate the number of quads by counting to the deepest level\n size = 0;\n const graphs = this._graphs;\n let subjects, subject;\n for (const graphKey in graphs) for (const subjectKey in subjects = graphs[graphKey].subjects) for (const predicateKey in subject = subjects[subjectKey]) size += Object.keys(subject[predicateKey]).length;\n return this._size = size;\n }", "getSize() {\n return this._node.__execute(() => this.element.getElementSize());\n }", "get size() {\n\t\treturn this._size;\n\t}", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "get size() {\n // Return the quad count if if was cached\n var size = this._size;\n if (size !== null) return size; // Calculate the number of quads by counting to the deepest level\n\n size = 0;\n var graphs = this._graphs,\n subjects,\n subject;\n\n for (var graphKey in graphs) for (var subjectKey in subjects = graphs[graphKey].subjects) for (var predicateKey in subject = subjects[subjectKey]) size += Object.keys(subject[predicateKey]).length;\n\n return this._size = size;\n }", "length() {\n const queueLen = this.queue.length;\n debug(`\\nLOG: There are total ${queueLen} data in the queue`);\n return queueLen;\n }", "get size() {\n\t\treturn wm.get(this).size;\n\t}", "get fullQueueLength()\n {\n return this.insert - this.end;\n }", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "size() {\n return this.sizeNum;\n }", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "nodeSize(node) {\n let size = 1;\n if (!node.children) {\n return size;\n }\n let children = this.getChild(node.children);\n do {\n size++;\n children = children.children\n ? this.getChild(children.children)\n : undefined;\n } while (children);\n return size;\n }", "get length(): number {\n // Provide a mechanism for a class to set length on push for O(1) lookup\n if (this.__length) {\n return this.__length;\n }\n\n return this._length(this.root);\n }", "size() {\n return this.nodes.length;\n }", "function heapWeight(i) {\n return weights[heap[i]]\n }", "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "get length() {\n if (this.isDynamic) {\n return this.placeholderContext.resolve(this.allocation.size);\n }\n else {\n return this.allocation.size;\n }\n }", "min() {\n if (this.heap.length == 0)\n throw Error(\"Heap is empty\");\n\n return this.heap[0];\n }", "function size() {\n out = 1;\n for (var dim in dimensions) {\n out *= dimensions[dim].members.length;\n }\n return out;\n }", "function BinaryHeap() {\n this.array = [];\n }", "get size() {\n\t\treturn this._l;\n\t}", "get size() {\n\t\treturn this._l;\n\t}", "get size() {\n\t\treturn this._l;\n\t}", "size() {\n return this._size;\n }", "size() {\n let len = 0;\n let runner = this.head;\n\n while (runner) {\n len += 1;\n runner = runner.next;\n }\n return len;\n }", "get totalSize() {\n return this.length + (this.current ? 1 : 0);\n }", "size() {\n return this._size;\n }", "size() {\n return this._size;\n }", "size() {\n return this._size;\n }", "size() {\n let current = this.head;\n let counter = 0;\n while (current) {\n counter++;\n current = current.next;\n }\n return counter;\n }", "get length() {\n return stack.length;\n }", "size() {\n let count = 0;\n let node = this.head;\n while (node) {\n count++;\n node = node.both.next;\n }\n return count;\n }", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "size() {\n let output = 0;\n this.traverse((currentNode) => {\n output++;\n });\n return output;\n }", "function PriorityQueue() {\n this.heap = [];\n this.size = 0;\n}" ]
[ "0.823258", "0.6719874", "0.6719874", "0.6594933", "0.65847397", "0.6490526", "0.6471409", "0.64260876", "0.641185", "0.63683355", "0.6361953", "0.6324604", "0.6305498", "0.6303767", "0.62501025", "0.6240314", "0.62244964", "0.61938465", "0.61566305", "0.6134111", "0.6093153", "0.60734415", "0.6067266", "0.6066432", "0.6050705", "0.6050705", "0.604303", "0.60254204", "0.60232586", "0.59972703", "0.59972703", "0.5981121", "0.5959604", "0.595235", "0.5948404", "0.5948404", "0.59296006", "0.5926554", "0.59027326", "0.5898624", "0.58927923", "0.58889014", "0.588418", "0.588418", "0.588418", "0.58779377", "0.5866566", "0.5858512", "0.5857538", "0.585365", "0.58501387", "0.5840497", "0.58372015", "0.58372015", "0.5833896", "0.5829794", "0.5825109", "0.5820175", "0.5804886", "0.58028895", "0.58006316", "0.58004695", "0.57935065", "0.579071", "0.57867754", "0.57855195", "0.5781648", "0.5778344", "0.57688856", "0.5763584", "0.57603854", "0.57528675", "0.575024", "0.5746196", "0.5743425", "0.5731539", "0.5725991", "0.5718873", "0.5714751", "0.5713493", "0.5707441", "0.57069886", "0.5706925", "0.57066727", "0.57066727", "0.57066727", "0.5698679", "0.5666101", "0.56563133", "0.5653778", "0.5653778", "0.5653778", "0.56482494", "0.56464577", "0.56451946", "0.5641045", "0.56361425", "0.56248343", "0.56153476" ]
0.8242203
1
check if the heap is empty
isEmpty() { return this.heap.length === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function heapisEmpty() {\n return this.size == 0 ? true : false;\n}", "isEmpty() {\n return !this.heapContainer.length;\n }", "function isEmpty() {\n return this.top === 0;\n}", "heapHasIndex(index){\r\n if(index>=0 && index<this.heapContainer.length)\r\n return true;\r\n \r\n return false;\r\n }", "checkEmpty () {\n if (this.front === 0 && this.rear === 0) {\n return true\n }\n }", "function isEmpty(){\n return (queue.length === 0);\n }", "isEmpty() {\n return this.top === null;\n }", "isEmpty() {\n if (this.top === null){\n return true;\n } else {\n return false;\n }\n }", "get empty() {\n if(this.children.length === 0) {\n return true\n } else {\n return false\n }\n }", "queueIsFull() {\n return this.queue.length >= this.maxSize\n }", "isEmpty() {\n if (this._storage.head === null) {\n return true;\n }\n return false;\n }", "isEmpty() {\n return this.front == -1;\n }", "isEmpty() {\n if (this.queue.length) {\n return false;\n }\n return true;\n }", "function isEmptyQ(queue){\n queue.first === null;\n\n const currNode = queue.first;\n\n if(!currNode){\n // is empty!\n return true;\n } else {\n // not empty!\n return false;\n }\n}", "empty(){\r\n return this.size == 0;\r\n }", "isEmpty()\n {\n if(this.front===null)\n return true;\n else\n return false;\n }", "isEmpty(){\n return (this.rear +1 === this.front);\n }", "empty(){ return this.stack.length === 0; }", "isEmpty() {\n return this.queue.size() === 0;\n }", "isEmpty() {\n\t\treturn this.size === 0;\n\t}", "isEmpty() {\n return _size == 0;\n }", "isEmpty() {\n return this.items.length === 0; // return true if the queue is empty.\n }", "isEmpty() {\n return this._size === 0;\n }", "isEmpty () {\n return Boolean(this.queue.length === 0)\n }", "isEmpty() {\n return this.head === -1;\n }", "isFull() {\n return ((this.tail + 1) % this.size) === this.head;\n }", "function boardHasEmptySpaces() {\n let $emptySpaces = emptyBoardSpaceElements();\n return $emptySpaces.length > 0;\n}", "function isEmpty() {\n if (stack_top === -1) {\n return true;\n }\n return false;\n }", "isEmpty() {\n console.log(this.size === 0);\n }", "isEmpty() {\n return (this._size === 0);\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "size() {\r\n\t\treturn this.heap.length;\r\n\t}", "size() {\r\n\t\treturn this.heap.length;\r\n\t}", "size() {\n\t\treturn this.heap.length;\n\t}", "isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}", "isEmpty() {\n if (this.Size > 0) {\n return true;\n }\n return false;\n }", "isFull() {\n if (this.front == 0 && this.rear == this.size - 1 || (this.rear + 1 == this.front)) {\n return true;\n }\n return false;\n }", "isEmpty() { \n return this.size == 0; \n }", "isEmpty(){ return this.size == 0; }", "isEmpty(){\n if(!this.head){\n console.log('Stack is empty');\n }\n }", "isEmpty() \n { \n return this.size == 0; \n }", "isEmpty() {\n return this.head === null;\n }", "isEmpty() {\n return this.head === null;\n }", "checkEmptyStack(numstack)\n {\n return (this.posting[numstack-1].length===0 || this.posting[numstack-1].length===null)\n }", "function isEmpty(stack) {\n return !stack.top;\n}", "function isEmpty(stack) {\n return !stack.top;\n}", "function isEmpty(stack) {\n return stack.length == 0\n}", "isEmpty() {\n return this.size == 0;\n }", "function isStackEmpty(stack){\n return !(stack.length>0);\n }", "function isStackEmpty()\r\n{\r\n\tif (this.intIndex == 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "isEmpty() {\n try {\n const diff = this._head - this._length\n if(diff >= 0) {\n this._revertToOriginal()\n }\n return diff >= 0 ? true : false\n } catch(err) {\n throw new Error(err)\n }\n }", "isEmpty() {\n return this.head == null;\n }", "isEmpty() {\n\t\tif (this.head == null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "isEmpty() {\n\t\tif (this.head == null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function _isStackEmpty()\n {\n if (this.intIndex == 0)\n return true;\n else\n return false;\n }", "isEmpty(){\n return this.size==0;\n }", "isEmpty(){\n let top = this.peek();\n return top == null || top == \"\";\n }", "empty () { return this.length === 0 }", "isEmpty() {\n if (this.head == null && this.tail == null){\n return true;\n }\n else {\n return false;\n }\n }", "function isStackEmpty()\n{\n\tif (this.intIndex == 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "get empty() {return !this._p.size;}", "isEmpty(){\r\n return this.head === null;\r\n }", "isFull() {\n return this.length() === this.capacity;\n }", "isEmpty() {\n return this.storage.length === 0;\n }", "isEmpty() {\n return !this.front;\n }", "function isEmpty(stack) {\n return stack.length === 0;\n}", "function isEmpty() {\n return N === 0;\n }", "isEmpty() {\n return this.vertexCount === 0;\n }", "isEmpty(){\n return (this.size === 0); \n }", "get isEmpty() {\n return this.#queue.length === 0;\n }", "isEmpty() {\n if (this.head) {\n return true;\n } else {\n return false;\n }\n }", "isEmpty() {\n if (this.head) {\n return true;\n } else {\n return false;\n }\n }", "get empty() {\n return this._head.next === this._tail;\n }", "isEmpty() {\n return this.catQueue.isEmpty() && this.dogQueue.isEmpty();\n }", "isEmpty() {\n return (this.elements > 0) ? false : true;\n }", "isEmpty() {\n return (this.elements > 0) ? false : true;\n }", "isEmpty() {\n if (this.#size == 0) {\n return true;\n } else {\n return false;\n }\n }", "isEmpty(){\n if(this.head == null){\n return true;\n }\n else{\n return false;\n }\n }", "isEmpty() {\n if (this.size == 0) {\n return true;\n }\n return false;\n }", "isFull() {\n return (this.lastIndex === (this.capacity() - 1));\n }", "isEmpty() {\n \n if (this.head == null){\n return true\n }\n else {\n return false\n }\n\n }", "isEmpty() {\n return this.head ? false : true\n }", "isEmpty() {\n if (this.head == this.tail) return true;\n return false;\n }", "empty() {\n\t\tif (this.size() === 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "isEmpty() {\n if (this.stack1.length == 0 && this.stack2.length == 0 ) {\n console.log(\"The two stack queue is empty.\");\n return true, this;\n }\n else {\n console.log(\"The two stack queue is not empty.\");\n return false, this;\n }\n }", "function isBoardFull(){\n let board = $box.map((index, currBox) => {\n let $currBox = $(currBox);\n return isEmpty($currBox);\n });\n return !board.get().includes(true);\n }", "isFull() {\n return (this.tail + 1) % this.capacty == this.head\n }", "isEmpty()\r\n {\r\n if(this.getSize() === 0){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "isFull(){\n if(this.maxSize){\n return this.size() === this.maxSize;\n }\n else{\n return false;\n }\n }", "isEmpty () {\n return this.queued.length === 0 && this.active.length === 0\n }", "isEmpty() {\n return 0 == this.q.length;\n }", "empty() { return this.m == 0; }", "isEmpty(){\n return this.count - this.lowestCount === 0;\n }" ]
[ "0.8801127", "0.7740314", "0.69832236", "0.6907285", "0.6777653", "0.6752135", "0.6746486", "0.67290246", "0.65971357", "0.6547033", "0.65308535", "0.6521938", "0.6514921", "0.65049946", "0.6492355", "0.64725035", "0.64722633", "0.6470793", "0.64603376", "0.64533764", "0.64189154", "0.64147365", "0.64121425", "0.64099336", "0.6407907", "0.6386726", "0.63847196", "0.63835406", "0.63575613", "0.6351252", "0.63450295", "0.63450295", "0.63450295", "0.63450295", "0.63450295", "0.633856", "0.6327916", "0.6327916", "0.6325016", "0.63243693", "0.6315395", "0.6313607", "0.6307072", "0.630354", "0.62965316", "0.6295238", "0.6276328", "0.6276328", "0.62669015", "0.62611616", "0.6251105", "0.6244401", "0.62405014", "0.62399167", "0.6235413", "0.62349766", "0.62334234", "0.6229515", "0.6229515", "0.6220916", "0.621215", "0.62019014", "0.61948025", "0.6193371", "0.6190803", "0.6188068", "0.61837274", "0.61815184", "0.61794376", "0.6178325", "0.61730874", "0.61690986", "0.6166842", "0.6165227", "0.615763", "0.6155618", "0.6155618", "0.6153883", "0.61406285", "0.61314684", "0.61314684", "0.612108", "0.6113774", "0.6112227", "0.6110725", "0.6094651", "0.60880136", "0.60770077", "0.6069082", "0.60665673", "0.60651433", "0.60649663", "0.60495555", "0.604129", "0.6039117", "0.60211825", "0.60201937", "0.5993393", "0.5983102" ]
0.82852596
1
returns the heap structure
getHeap() { return this.heap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Heap()\n{\n\t// h[0] not used, heap initially empty\n\n\tthis.h = [null]; // heap of integer keys\n\tthis.h_item = [null]; // corresponding heap of data-items (any object)\n\tthis.size = 0; // 1 smaller than array (also index of last child)\n\n\n\t// --------------------\n\t// PQ-required only; more could be added later when needed\n\t// the 2 basic shape maintaining operations heapify and reheapify simplify\n\t// processing functions\n\n\tthis.isEmpty = heapisEmpty; // return true if heap empty\n\tthis.deleteRoot = heapDeleteRoot; // return data-item in root\n\tthis.insert = heapInsert; // insert data-item with key\n\n\tthis.heapify = heapheapify; // make subtree heap; top-down heapify (\"sink\") used by .deleteRoot()\n\tthis.reheapify = heapreheapify; // bottom-up reheapify (\"swim\") used by .insert()\n\tthis.show = heapShow; \t // utility: return pretty formatted heap as string\n\t \t // ... etc\n\n\t// --------------------\n}", "function heapShow()\n{\n\tvar n = this.size;\n\tvar m = Math.floor(n/2); // last parent node\n\n\tvar k = this.h.slice(1,n+1), a = this.h_item.slice(1,n+1);\n\n\tvar out=\"<h2>Heap (size=\"+ n+ \"):</h2><p>Keys: \" + k + \"<br>Data: \"+ a + \"</p>\";\n\tfor (var i=1; i<=m; i++)\n\t{\n\t\tout += \"<p>\"+ i+ \": <b>\"+ this.h[i]+ \"(\"+ this.h_item[i]+ \")</b><ul>\";\n\t\tif ( 2*i <= n )\n\t\t\tout += \"<li>\"+ this.h[2*i]+ \"</li>\";\n\t\tif ( 2*i+1 <= n )\n\t\t\tout+= \"<li>\"+ this.h[2*i+1]+ \"</li>\";\n\t\tout+= \"</ul></p>\";\n\t}\n\n\treturn out;\n}", "function Heap(){\n this.heap = [];\n}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "function BinaryHeap() {\n this.array = [];\n }", "getRoot() {\n if(this.heap_size <= 0) {\n console.log(\"Heap underflow\");\n return null;\n }\n return this.harr[0];\n }", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "function BinaryHeap() {\n this.nodes = [];\n}", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "function minheap_extract(heap) {\n swap(heap,0,heap.length - 1);\n var to_pop = heap.pop();\n var parent = 0;\n var child = parent * 2 + 1;\n while(child < heap.length){\n if(child + 1 < heap.length && heap[child] > heap[child + 1]){\n child = child + 1;\n }\n if(heap[child] < heap[parent]){\n swap(heap,child,parent);\n parent = child;\n child = parent * 2 + 1; \n }\n else{\n break;\n }\n }\n return to_pop;\n // STENCIL: implement your min binary heap extract operation\n}", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "constructor() {\n\t\tthis.heap = [];\n\t}", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function setupHeap(lists) {\n var heap = new MinHeap();\n for (var i = 0; i < lists.length; i++) {\n var node = new ListNode(lists[i][0], lists[i][1]);\n heap.insert(node);\n }\n return heap;\n}", "static heapInMemory() {\n return this.inMemory(function () {\n return new Heap();\n }, (heap) => {\n return heap.array;\n }, (array) => {\n return new Heap(array);\n });\n }", "buildMaxHeap() {}", "toString() {\n return this.heapContainer.toString();\n }", "getHead() {\n return this.maxheap[1]\n }", "function make_heap_obj(node1_id, node2_id, weight) {\n return [node1_id, node2_id, weight];\n }", "function Heap(key) {\n this._array = [];\n this._key = key || function (x) { return x; };\n}", "function MinHeap() {\n\n /**\n * Insert an item into the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} x\n */\n this.insert = function(x) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:)\n *\n * @return{number}\n */\n this.peek = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Remove and return the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.pop = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the size of the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.size = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Convert the heap data into a string\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{string}\n */\n MinHeap.prototype.toString = function() {\n // INSERT YOUR CODE HERE\n }\n\n /*\n * The following are some optional helper methods. These are not required\n * but may make your life easier\n */\n\n /**\n * Get the index of the parent node of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var parent = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the index of the left child of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var leftChild = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Swap the values at 2 indices in our heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @param{number} j\n */\n var swap = function(i, j) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble up the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleUp = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble down the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleDown = function(i) {\n // INSERT YOUR CODE HERE\n }\n}", "allocateHeap(hexData) {\n let addr = \"H\" + this.heapLength++; //Create placeholder address\n this.heap[addr] = { data: hexData, loc: \"\" };\n return addr;\n }", "function displayHeap() {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i].father == arr[i]) {\n arr[i].x = width / 2;\n arr[i].y = 100;\n }\n else {\n if (arr[i] == arr[i].father.leftson)\n arr[i].x = arr[i].father.x - arr[i].father.gap;\n else if (arr[i] == arr[i].father.rightson)\n arr[i].x = arr[i].father.x + arr[i].father.gap;\n\n arr[i].y = arr[i].father.y + 50;\n }\n }\n\n for (var ii = 0; ii < arr.length; ii++)\n arr[ii].edge = new edge(arr[ii]);\n}", "function makeHeap(){\n\n //add a node to a heap and set it to current\n if(makeHeapStep == 1){\n heapAddNode();\n return;\n }else if(makeHeapStep == 2){ //Swim the node up if needed\n\n //We are at the start of the heap. No more swimming possible\n if(currentHeapPosition == 0){\n setNodeOneHeap();\n heapSwimStep = 1;\n \n \n return;\n }\n\n if(heapSwimStep == 1){ //set the parent Node\n heapSetParent();\n }else if(heapSwimStep == 2){ //compare to the parent Node\n if(orderArray[currentHeapPosition] > orderArray[heapParentIndex]){ //we must swap\n heapSwapWithParent();\n }else{ //do not swap. Node is now in the heap proper\n setToHeap();\n }\n \n heapSwimStep = 1;\n }\n }\n\n //sorting is now done\n if(heapSize == numNodes){\n doneMakingHeap = true;\n heapOldPosition = -1;\n addStep(\"The heap is now complete.\");\n }\n}", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "function BinaryHeap(scoreFunction){\n this.content = [];\n this.scoreFunction = scoreFunction;\n}", "function BinaryHeap(scoreFunction){\n this.content = [];\n this.scoreFunction = scoreFunction;\n}", "function buildHeap(arr, type) {\n // gets the last index\n var lastIndex = arr.length - 1;\n // While the last index is greater than 0\n while (lastIndex > 0) {\n // get the parent index\n var parentIndex = Math.floor((lastIndex - 1) / 2);\n // get the items inside the parent\n // and the last index \n var lastItem = arr[lastIndex];\n var parentItem = arr[parentIndex];\n\n if (type === 'maxHeap') {\n // checks to see if the lastItem is greater\n // than the parentItem if so then do a swap\n if (lastItem > parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n else if (type === 'minHeap') {\n // checks to see if the lastItem is less\n // than the parentItem if so then do a swap\n if (lastItem < parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n\n }\n }", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "function BinaryHeap(scoreFunction) {\r\n this.content = [];\r\n this.scoreFunction = scoreFunction;\r\n}", "function minheap_extract(heap) {\n var min = heap[0];\n heap[0] = heap.pop();\n var index = 0;\n while(true){\n var child1 = (index+1)*2;\n var child2 = child1 -1;\n var toSwap = null;\n if(heap[index] > heap[child1]){\n toSwap = child1;\n }\n if(heap[index] > heap[child2] &&\n (heap[child1] == null || (heap[child1] !== null && heap[child2] < heap[child1]))){\n toSwap = child2;\n }\n if(toSwap == null){\n break;\n }\n var temp = heap[toSwap];\n heap[toSwap] = heap[index];\n heap[index] = temp;\n index = toSwap;\n }\n return min;\n // STENCIL: implement your min binary heap extract operation\n}", "buildHeap(left, right) {\r\n var x = this.values[left];\r\n var i = left;\r\n\r\n while(true) {\r\n let j = 2 * i;\r\n if (j > right) break;\r\n if ((j < right) && (Item.compare(this.values[j + 1], this.values[j]) >= 0)) {\r\n j++;\r\n }\r\n\r\n if (Item.compare(x, this.values[j]) >= 0) break;\r\n let temp = this.values[i];\r\n this.values[i] = this.values[j];\r\n this.values[j] = temp;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n i = j;\r\n }\r\n\r\n this.values[i] = x;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n }", "function BinaryHeap(scoreFunction){\n this.content = [];\n this.scoreFunction = scoreFunction;\n}", "function BinaryHeap(options) {\n options = options || {};\n\n this._elements = options.elements || [];\n this._score = options.score || this._score;\n}", "buildHeap(array) {\n const firstParentIdx = Math.floor((array.length - 2) / 2);\n for (let currentIdx = firstParentIdx; currentIdx >= 0; currentIdx--) {\n this.siftDown(currentIdx, array.length - 1, array);\n }\n return array;\n }", "size() {\r\n\t\treturn this.heap.length;\r\n\t}", "size() {\r\n\t\treturn this.heap.length;\r\n\t}", "function SimpleHeap(f) {\n var data = [];\n\n // By default just use standard comparison\n var compareFunc = f;\n if (!compareFunc) {\n compareFunc = function(a,b) {\n if (a < b) return -1;\n return 1;\n }\n }\n\n this.insert = function(x) {\n data.push(x);\n data.sort(compareFunc);\n }\n\n this.pop = function() {\n return data.pop();\n }\n\n this.peek = function() {\n return data[data.length - 1];\n }\n\n this.size = function() {\n return data.length;\n }\n\n SimpleHeap.prototype.toString = function() {\n return data.toString();\n }\n}", "function PriorityQueue() {\n this.heap = [];\n this.size = 0;\n}", "size() {\n\t\treturn this.heap.length;\n\t}", "function buildHeap(A) {\n var n = A.length;\n for (var i = n/2 - 1; i >= 0; i--) {\n heapify(A, i, n);\n }\n}", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "function heapSort(inputArr){\n var heap = new Heap;\n for(i=0; i<inputArr.length; i++){\n heap.add(inputArr[i])\n }\n var outputArr = []\n for(i=0; i<inputArr.length; i++){\n outputArr.push(heap.remove())\n }\n console.log(outputArr)\n return outputArr\n}", "function heapSort(arr){\n var sorted = [];\n var heap1 = new MaxHeap();\n \n for(let i=0; i<arr.length; i++){\n heap1.insert(arr[i]);\n }\n \n for(let i=0; i<arr.length; i++){\n sorted.push(heap1.delete());\n }\n return sorted;\n}", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "function heap(a, lo, hi) {\n var n = hi - lo,\n i = (n >>> 1) + 1;\n while (--i > 0) sift(a, i, n, lo);\n return a;\n }", "function maxHeapify(arr){\n\n}", "get HEAP8() {\n return libzip_1.default.HEAP8;\n }", "peek() {\n return this.heap[0];\n }", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "min() {\n return this.heap[1];\n }", "function heapSort(array){\n // 1: Construction\n let heap = new MaxHeap()\n array.forEach(ele => {\n heap.insert(ele)\n });\n\n// 2: sortdown \n let sorted = []\n while (heap.array.length > 1){\n sorted.push(heap.deleteMax())\n }\n return sorted\n}", "function startHeap(){\n makeHeapStep = 1;\n numHeapNodes = 1;\n orderArray = getOrder();\n console.log(orderArray);\n heapSize = 0; \n heapStarted = true;\n heapSwimStep = 1;\n heapOldPosition = -1;\n doneMakingHeap = false;\n sortHeapStep = 1;\n heapSinkStep = 1\n}", "function Heap(size) {\n this.size = size;\n // A map of size classes per chunk (see above).\n this._sizeMap = {};\n this._buffer = new Buffer(size);\n this._remaining = size; // the whole thing is available.\n this._offset = 0; // start of the buffer.\n // Initialize the freelists.\n this._freeLists = new Array(Heap._numSizeClasses);\n for (var i = 0; i < Heap._numSizeClasses; i++) {\n this._freeLists[i] = [];\n }\n }", "function heapAddNode(){\n setClass(nodes[heapSize], 2, \"Current\"); //set the first Node to the heap\n currentHeapPosition = heapSize;\n addStep(\"Add Node \" + (heapSize + 1) + \" to the heap and set it to \\\"current\\\".\");\n makeHeapStep = 2;\n}", "min() {\n if (this.heap.length == 0)\n throw Error(\"Heap is empty\");\n\n return this.heap[0];\n }", "function generateHeapCellHtml(row){\n var cellDisplayState = 'display:none;';\n if (isMemberRowExpanded[row.diskStoreUUID]) {\n cellDisplayState = 'display:block;';\n }\n\n var heapHtml = \"NA\";\n var heapStorageHtml = \"NA\";\n var heapExecutionHtml = \"NA\";\n\n if(row.memberType.toUpperCase() !== \"LOCATOR\"){\n var heapUsed = convertSizeToHumanReadable(row.heapMemoryUsed);\n var heapSize = convertSizeToHumanReadable(row.heapMemorySize);\n heapHtml = heapUsed[0] + \" \" + heapUsed[1]\n + \" / \" + heapSize[0] + \" \" + heapSize[1];\n var heapStorageUsed = convertSizeToHumanReadable(row.heapStoragePoolUsed);\n var heapStorageSize = convertSizeToHumanReadable(row.heapStoragePoolSize);\n heapStorageHtml = heapStorageUsed[0] + \" \" + heapStorageUsed[1]\n + \" / \" + heapStorageSize[0] + \" \" + heapStorageSize[1];\n var heapExecutionUsed = convertSizeToHumanReadable(row.heapExecutionPoolUsed);\n var heapExecutionSize = convertSizeToHumanReadable(row.heapExecutionPoolSize);\n heapExecutionHtml = heapExecutionUsed[0] + \" \" + heapExecutionUsed[1]\n + \" / \" + heapExecutionSize[0] + \" \" + heapExecutionSize[1];\n }\n var jvmHeapUsed = convertSizeToHumanReadable(row.usedMemory);\n var jvmHeapSize = convertSizeToHumanReadable(row.totalMemory);\n var jvmHeapHtml = jvmHeapUsed[0] + \" \" + jvmHeapUsed[1]\n + \" / \" + jvmHeapSize[0] + \" \" + jvmHeapSize[1];\n\n var heapCellHtml =\n '<div style=\"width: 95%; float: left; padding-right:10px;'\n + 'text-align:right;\">' + heapHtml\n + '</div>'\n + '<div class=\"cellDetailsBox\" id=\"'+ row.diskStoreUUID + '-heap\" '\n + 'style=\"width: 90%; ' + cellDisplayState + '\">'\n + '<span><strong>JVM Heap:</strong>'\n + '<br>' + jvmHeapHtml\n + '<br><strong>Storage Memory:</strong>'\n + '<br>' + heapStorageHtml\n + '<br><strong>Execution Memory:</strong>'\n + '<br>' + heapExecutionHtml\n + '</span>'\n + '</div>';\n return heapCellHtml;\n}", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "poll() {\r\n let rootElement = null;\r\n if (this.isEmpty()) {\r\n rootElement = null;\r\n } else if (this.hasSingleElement()) {\r\n rootElement = this.heapContainer.pop();\r\n } else { \r\n rootElement = this.heapContainer[0];\r\n this.heapContainer[0] = this.heapContainer.pop();\r\n this.heapifyDown();\r\n }\r\n \r\n return rootElement;\r\n }", "function heapify(arr) {\n if (arr.length < 1) return arr\n for (let i = arr.length - 1; i >= 0; i--) {\n minHeapify(arr, i)\n }\n return arr\n}", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "function heap(compareFunction, array = []) {\n const data = array;\n const heapSort = ()=>{data.sort(compareFunction)};\n const add = function (node) {\n data.push(node);\n heapSort();\n };\n\n const remove = function () {\n const node = data.shift();\n return node;\n };\n\n const empty = function () {\n return data.length === 0;\n };\n const updateItems = function () {\n heapSort();\n };\n return {\n data: data,\n add: add,\n remove: remove,\n empty: empty,\n update: updateItems,\n };\n}", "peek() {\n return (this.heap.length) ? this.heap[0] : null;\n }", "function heapifyStandart(currentIndex, heapSize ,arr){\n\n var largestElement = currentIndex\n var leftIndex = 2 * currentIndex + 1\n var rightIndex = 2 * currentIndex + 2\n\n if (leftIndex < heapSize && arr[currentIndex] < arr[leftIndex]){\n largestElement = leftIndex\n }\n \n if (rightIndex < heapSize && arr[largestElement] < arr[rightIndex]){\n largestElement = rightIndex\n }\n\n if (largestElement != currentIndex){\n swapArrayElement(currentIndex, largestElement, arr)\n heapifyStandart(largestElement, heapSize, arr)\n }\n}", "function _main()\n{\n\nvar heap = new Heap();\n //operation sequence from the Figure :\n var ListOfSequence = [\n\t\t{KEY: 2, Vlaue: \"a\"},\n\t\t{KEY: 9, Vlaue: \"b\"},\n\t\t{KEY: 7, Vlaue: \"c\"},\n\t\t{KEY: 6, Vlaue: \"d\"},\n\t\t{KEY: 5, Vlaue: \"e\"},\n\t\t{KEY: 8, Vlaue: \"f\"}];\n\n\tfor (var i = 0; i < ListOfSequence.length; i++) {\n\t\theap.insert(ListOfSequence[i].KEY , ListOfSequence[i].Vlaue);\n\t}\n document.write(heap.show());\n heap.insert(10, \"g\");\n document.write(heap.show());\n heap.insert(15, \"h\");\n document.write(heap.show());\n\n\n // set input graph properties then implement the graph\n var g = new Graph();\n g.label = \"Exercise 9.2: 1b (Levitin, 3rd edition)\";\n g.readGraph(_v, _e);\n g.printGraph();\n\n\n\n\n/** print output of first prim------------------------------------------------*/\n\n document.write('<br>MST by first Prim<br>');\n\n g.primImpl1();\n for (var i = 0; i < g.Prim_Edge.length; i++) {\n document.write(\"(\", g.Prim_Edge[i].v, \",\", g.Prim_Edge[i].u, \")\");\n \tg.Prim_Edge.length-1 == i ? document.write(\".<p>\") : document.write(\", \");\n\t}\n\n/**print output of second prim---------------------------------------*/\n\ndocument.write(\"<br>MST by Prim2 (PQ-Heap): <br>\");\n g.primImpl2();\n\n for (var n = 0; n < g.verticesTree.length; n++) {\n if (g.verticesTree[n].parent != null) {\n document.write(\"(\", g.verticesTree[n].parent, \",\", g.verticesTree[n].V, \")\");\n g.Prim_Edge.length-1 == i ? document.write(\".<p>\") : document.write(\", \");\n } else if (g.verticesTree[n].parent == null) {\n document.write(\"(-, \", g.verticesTree[n].tree, \"), \");\n }\n }\n\n}", "function heapSort(array){\n let heapify = new MinHeap;\n let sortedArray = [];\n let length = array.length;\n\n for(let i = 0; i < length; i++){\n heapify.add(array.pop());\n }\n\n for(let j = 0; j < length; j++){\n sortedArray.push(heapify.extract());\n }\n\n return sortedArray;\n}", "function build_initial_heap(ast) {\n var state = {heap: {}, stack: [{}], next: 0, dump: [], heapinfo: {}, user_types: {}};\n var decls = ast[\"decls\"];\n\n _(decls).map(function(n) {\n return compileDecl[n[\"node\"]](n, state);\n });\n\n return state;\n }", "function minheap_insert(heap, new_element) {\n var length = heap.push(new_element);\n var child = length - 1;\n var parent = (child + child%2)/2 - 1;\n while(parent >= 0 && heap[child] < heap[parent]){\n swap(heap,parent,child);\n child = parent;\n parent = (child + child%2)/2 - 1;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "static buildMaxHeap(a) {\n a.heap_size = a.length;\n\n // Max-heapify the first n/2 elements as\n // they are tree nodes, and the remaining are\n // usually tree leaves\n let mid = parseInt(a.length / 2);\n for (let i = mid; i >= 0; i -= 1) {\n Heap.maxHeapify(a, i);\n }\n }", "function extractMin(heap) {\n if (heap.length < 1) return null\n // swap first and last element\n let temp = heap[0]\n heap[0] = heap[heap.length-1]\n heap[heap.length-1] = temp\n\n const result = heap.pop()\n minHeapify(heap, 0)\n return result\n}", "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\n }\n\n for (let endOfHeap = array.length - 1; endOfHeap >= 0; endOfHeap--) { // 2) loop from end of maxHeap to begin/left, and \"delete\" max val until heap region is \"empty\"\n [array[endOfHeap], array[0]] = [array[0], array[endOfHeap]]; // 3) swap the root of the heap with the last element of the heap, this shrinks the heap by 1 and grows the sorted array by 1\n\n console.log(array);\n\n heapify(array, endOfHeap, 0); // 4) sift down the new root, but not past the end of the heap\n }\n\n return array;\n}", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "function minheap_insert(heap, new_element) {\n heap.push(new_element);\n var index = heap.length - 1;\n while(index > 0){\n var parent = Math.floor((index+1)/2)-1;\n if(heap[parent] > new_element){\n var temp = heap[parent];\n heap[parent] = new_element;\n heap[index] = temp;\n }\n index = parent;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function FibonacciHeap() {\n if (!(this instanceof FibonacciHeap)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // initialize fields\n\n\n this._minimum = null;\n this._size = 0;\n }", "function FibonacciHeap() {\n if (!(this instanceof FibonacciHeap)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // initialize fields\n\n\n this._minimum = null;\n this._size = 0;\n }", "function heapify(arr,comp){\r\n // arr[n/2-1:n-1] already satisfies the heap property because they are the leaves.\r\n for(let i = Math.floor((arr.length-2)/2); i >= 0; i--){\r\n // Restore the heap property for i\r\n siftDown(arr, comp, i);\r\n }\r\n // Now that the heap property is satisfied for all i from 0 to n-1, the array is a heap\r\n}", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "function heapWeight(i) {\n\t return weights[heap[i]]\n\t }", "function heapWeight(i) {\n\t return weights[heap[i]]\n\t }", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "heapify(currentParent) {\n let left = this.left(currentParent);\n let right = this.right(currentParent);\n let bestParent = currentParent;\n\n // looking for the best parent that fulfills the heap property for this node and it's children\n if (left < this.size && !this.validParent(left, bestParent)) {\n bestParent = left;\n }\n if (right < this.size && !this.validParent(right, bestParent)) {\n bestParent = right;\n }\n\n // if the current parent is not the best parent, we have some work to do\n if (currentParent != bestParent) {\n // swapping new parent with old parent\n let currentParentValue = this.heap[currentParent];\n this.heap[currentParent] = this.heap[bestParent];\n this.heap[bestParent] = currentParentValue;\n\n // set locations on the swap\n this.locations.set(this.hash(this.heap[bestParent]), bestParent);\n this.locations.set(this.hash(this.heap[currentParent]), currentParent);\n\n // recurse from the best parent's old position\n this.heapify(bestParent);\n }\n }", "function pq_insert(heap, new_element) {\n var eIntIdx = heap.length;\n var prntIdx = Math.floor((eIntIdx - 1 ) / 2);\n heap.push(new_element);\n var heaped = (eIntIdx <= 0) || (heap[prntIdx].priority <= heap[eIntIdx]).priority;\n\n while(!heaped){\n var tmp = heap[prntIdx];\n heap[prntIdx] = heap[eIntIdx];\n heap[eIntIdx] = tmp;\n\n eIntIdx = prntIdx;\n prntIdx = Math.floor((eIntIdx - 1)/2);\n heaped = (eIntIdx <= 0) ||(heap[prntIdx].priority <= heap[eIntIdx].priority);\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}" ]
[ "0.7372717", "0.7307348", "0.7011272", "0.6944502", "0.69332767", "0.6875817", "0.6830716", "0.6772608", "0.6742784", "0.6742784", "0.6671171", "0.66410375", "0.6612922", "0.6560505", "0.6552577", "0.65003353", "0.6475312", "0.6475312", "0.6475312", "0.6475312", "0.6440758", "0.64238054", "0.6406391", "0.6403313", "0.6397833", "0.6360772", "0.6356306", "0.6356154", "0.6333905", "0.63059485", "0.62865573", "0.626258", "0.62353927", "0.62353927", "0.6234043", "0.62239444", "0.62157536", "0.61793935", "0.6164515", "0.6156568", "0.61380476", "0.6132039", "0.60622555", "0.60622555", "0.60527307", "0.6024933", "0.6020929", "0.600897", "0.59998244", "0.59827125", "0.5959588", "0.59465295", "0.59389997", "0.5932473", "0.59115505", "0.5824829", "0.58123994", "0.5794111", "0.57884043", "0.57761925", "0.577206", "0.5752562", "0.57471824", "0.57463634", "0.5732342", "0.57160807", "0.5697671", "0.56517076", "0.56517076", "0.56483126", "0.5643262", "0.56414926", "0.5576851", "0.55709165", "0.55655974", "0.55498785", "0.5547026", "0.5542077", "0.5539308", "0.55371356", "0.55371356", "0.55200267", "0.55154496", "0.55154496", "0.5507538", "0.5507194", "0.5506195", "0.5506195", "0.55061704", "0.55061704", "0.55061704", "0.55061704", "0.55061704", "0.5499725", "0.5499725", "0.54900473", "0.5479493", "0.547868", "0.5478141" ]
0.74754506
0
heapify the data structure around min values
minHeapify(arr, n, i) { let smallest = i; let leftIndex = 2 * i + 1; let rightIndex = 2 * i + 2; if (leftIndex < n && arr[leftIndex] < arr[smallest]) { smallest = leftIndex; } if (rightIndex < n && arr[rightIndex] < arr[smallest]) { smallest = rightIndex; } if (smallest != i) { let temp = arr[i]; arr[i] = arr[smallest]; arr[smallest] = temp; this.minHeapify(arr, n, smallest); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MinHeapify(index) {\n let left = this.left(index);\n let right = this.right(index);\n let smallest = index;\n if (left < this.size && this.data[left] < this.data[index]) smallest = left;\n if (right < this.size && this.data[right] < this.data[smallest])\n smallest = right;\n if (smallest != index) {\n let temp = this.data[index];\n this.data[index] = this.data[smallest];\n this.data[smallest] = temp;\n this.MinHeapify(smallest);\n }\n }", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "function heapify(arr) {\n if (arr.length < 1) return arr\n for (let i = arr.length - 1; i >= 0; i--) {\n minHeapify(arr, i)\n }\n return arr\n}", "function minheap_insert(heap, new_element) \n{\n \n var adj,temp;\n heap.push(new_element);\n for (adj=heap.length-1;adj>0;adj=Math.floor((adj-1)/2))\n {\n if (new_element < heap[Math.floor((adj-1)/2)]) // use to swap those two numbers\n {\n temp = new_element;\n heap[adj] = heap[Math.floor((adj-1)/2)];\n heap[Math.floor((adj-1)/2)] = temp; \n }\n }\n return;\n}", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "function MinHeap(array, comparator) {\n\n /**\n * Storage for heap. \n * @private\n */\n this.heap = array || new Array();\n\n /**\n * Default comparator used if an override is not provided.\n * @private\n */\n this.compare = comparator || function(item1, item2) {\n return item1 == item2 ? 0 : item1 < item2 ? -1 : 1;\n };\n\n /**\n * Retrieve the index of the left child of the node at index i.\n * @private\n */\n this.left = function(i) {\n return 2 * i + 1;\n };\n /**\n * Retrieve the index of the right child of the node at index i.\n * @private\n */\n this.right = function(i) {\n return 2 * i + 2;\n };\n /**\n * Retrieve the index of the parent of the node at index i.\n * @private\n */\n this.parent = function(i) {\n return Math.ceil(i / 2) - 1;\n };\n\n /**\n * Ensure that the contents of the heap don't violate the \n * constraint. \n * @private\n */\n this.heapify = function(i) {\n var lIdx = this.left(i);\n var rIdx = this.right(i);\n var smallest;\n if (lIdx < this.heap.length\n && this.compare(this.heap[lIdx], this.heap[i]) < 0) {\n smallest = lIdx;\n } else {\n smallest = i;\n }\n if (rIdx < this.heap.length\n && this.compare(this.heap[rIdx], this.heap[smallest]) < 0) {\n smallest = rIdx;\n }\n if (i != smallest) {\n var temp = this.heap[smallest];\n this.heap[smallest] = this.heap[i];\n this.heap[i] = temp;\n this.heapify(smallest);\n }\n };\n\n /**\n * Starting with the node at index i, move up the heap until parent value\n * is less than the node.\n * @private\n */\n this.siftUp = function(i) {\n var p = this.parent(i);\n if (p >= 0 && this.compare(this.heap[p], this.heap[i]) > 0) {\n var temp = this.heap[p];\n this.heap[p] = this.heap[i];\n this.heap[i] = temp;\n this.siftUp(p);\n }\n };\n\n /**\n * Heapify the contents of an array.\n * This function is called when an array is provided.\n * @private\n */\n this.heapifyArray = function() {\n // for loop starting from floor size/2 going up and heapify each.\n var i = Math.floor(this.heap.length / 2) - 1;\n for (; i >= 0; i--) {\n // jstestdriver.console.log(\"i: \", i);\n this.heapify(i);\n }\n };\n\n // If an initial array was provided, then heapify the array.\n if (array != null) {\n this.heapifyArray();\n }\n ;\n}", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "heapify(/*index*/ i) {\n let l = this.left(i);\n let r = this.right(i);\n let biggest = i;\n if (l < this.heap_size && this.harr[i].element.compareByMulKeys(this.harr[l].element, this.compareValues) == -1)\n biggest = l;\n if (r < this.heap_size && this.harr[biggest].element.compareByMulKeys(this.harr[r].element, this.compareValues) == -1)\n biggest = r;\n if (biggest != i) {\n this.swap(this.harr, i, biggest);\n this.heapify(biggest);\n }\n }", "min() {\n return this.heap[1];\n }", "function pq_insert(heap, new_element) {\n var eIntIdx = heap.length;\n var prntIdx = Math.floor((eIntIdx - 1 ) / 2);\n heap.push(new_element);\n var heaped = (eIntIdx <= 0) || (heap[prntIdx].priority <= heap[eIntIdx]).priority;\n\n while(!heaped){\n var tmp = heap[prntIdx];\n heap[prntIdx] = heap[eIntIdx];\n heap[eIntIdx] = tmp;\n\n eIntIdx = prntIdx;\n prntIdx = Math.floor((eIntIdx - 1)/2);\n heaped = (eIntIdx <= 0) ||(heap[prntIdx].priority <= heap[eIntIdx].priority);\n }\n // STENCIL: implement your min binary heap insert operation\n}", "removeMin() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "function heapify(arr,comp){\r\n // arr[n/2-1:n-1] already satisfies the heap property because they are the leaves.\r\n for(let i = Math.floor((arr.length-2)/2); i >= 0; i--){\r\n // Restore the heap property for i\r\n siftDown(arr, comp, i);\r\n }\r\n // Now that the heap property is satisfied for all i from 0 to n-1, the array is a heap\r\n}", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "extractMin() {\n if (this.size <= 0) return;\n if (this.size === 1) {\n this.size--;\n return this.data[0];\n }\n let root = this.data[0];\n this.data[0] = this.data[this.size - 1];\n this.size--;\n this.MinHeapify(0);\n return root;\n }", "function minHeapify(heap, i) {\n if (heap.length < 1) return\n let left = 2 * i + 1\n let right = 2 * i + 2\n let smallest = i\n if (left < heap.length && heap[left] < heap[smallest]) {\n smallest = left\n }\n if (right < heap.length && heap[right] < heap[smallest]) {\n smallest = right\n }\n if (smallest !== i) {\n [heap[smallest], heap[i]] = swap(heap[smallest], heap[i])\n minHeapify(heap, smallest)\n }\n}", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "function minheap_insert(heap, new_element) {\n heap.push(new_element);\n var index = heap.length - 1;\n while(index > 0){\n var parent = Math.floor((index+1)/2)-1;\n if(heap[parent] > new_element){\n var temp = heap[parent];\n heap[parent] = new_element;\n heap[index] = temp;\n }\n index = parent;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "delMin() {\n /*\n * Save reference to the min key.\n * Swap the min key with the last key in the heap.\n * Decrement n so that the key does not swim back up the heap.\n * Sink down the heap to fix any violations that have arisen.\n * Delete the min key to prevent loitering, and return its reference.\n */\n let min = this.heap[1];\n\n [this.heap[1], this.heap[this.n]] = [this.heap[this.n], this.heap[1]];\n this.n--;\n this.sink(1);\n this.heap[this.n+1] = null;\n\n return min;\n }", "function minheap_extract(heap) {\n swap(heap,0,heap.length - 1);\n var to_pop = heap.pop();\n var parent = 0;\n var child = parent * 2 + 1;\n while(child < heap.length){\n if(child + 1 < heap.length && heap[child] > heap[child + 1]){\n child = child + 1;\n }\n if(heap[child] < heap[parent]){\n swap(heap,child,parent);\n parent = child;\n child = parent * 2 + 1; \n }\n else{\n break;\n }\n }\n return to_pop;\n // STENCIL: implement your min binary heap extract operation\n}", "function minheap_insert(heap, new_element) {\n var length = heap.push(new_element);\n var child = length - 1;\n var parent = (child + child%2)/2 - 1;\n while(parent >= 0 && heap[child] < heap[parent]){\n swap(heap,parent,child);\n child = parent;\n parent = (child + child%2)/2 - 1;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function maxHeapify(arr){\n\n}", "function MinHeap() {\n\n /**\n * Insert an item into the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} x\n */\n this.insert = function(x) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:)\n *\n * @return{number}\n */\n this.peek = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Remove and return the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.pop = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the size of the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.size = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Convert the heap data into a string\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{string}\n */\n MinHeap.prototype.toString = function() {\n // INSERT YOUR CODE HERE\n }\n\n /*\n * The following are some optional helper methods. These are not required\n * but may make your life easier\n */\n\n /**\n * Get the index of the parent node of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var parent = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the index of the left child of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var leftChild = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Swap the values at 2 indices in our heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @param{number} j\n */\n var swap = function(i, j) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble up the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleUp = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble down the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleDown = function(i) {\n // INSERT YOUR CODE HERE\n }\n}", "function minheap_extract(heap) {\n var min = heap[0];\n heap[0] = heap.pop();\n var index = 0;\n while(true){\n var child1 = (index+1)*2;\n var child2 = child1 -1;\n var toSwap = null;\n if(heap[index] > heap[child1]){\n toSwap = child1;\n }\n if(heap[index] > heap[child2] &&\n (heap[child1] == null || (heap[child1] !== null && heap[child2] < heap[child1]))){\n toSwap = child2;\n }\n if(toSwap == null){\n break;\n }\n var temp = heap[toSwap];\n heap[toSwap] = heap[index];\n heap[index] = temp;\n index = toSwap;\n }\n return min;\n // STENCIL: implement your min binary heap extract operation\n}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "function heapSort(array){\n let heapify = new MinHeap;\n let sortedArray = [];\n let length = array.length;\n\n for(let i = 0; i < length; i++){\n heapify.add(array.pop());\n }\n\n for(let j = 0; j < length; j++){\n sortedArray.push(heapify.extract());\n }\n\n return sortedArray;\n}", "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\n }\n\n for (let endOfHeap = array.length - 1; endOfHeap >= 0; endOfHeap--) { // 2) loop from end of maxHeap to begin/left, and \"delete\" max val until heap region is \"empty\"\n [array[endOfHeap], array[0]] = [array[0], array[endOfHeap]]; // 3) swap the root of the heap with the last element of the heap, this shrinks the heap by 1 and grows the sorted array by 1\n\n console.log(array);\n\n heapify(array, endOfHeap, 0); // 4) sift down the new root, but not past the end of the heap\n }\n\n return array;\n}", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.minHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function minHeap(arr){\r\n\tfor(var i=Math.floor(arr.length/2); i >= 0; i--){\r\n\t\tminHeapafiy(arr, i)\r\n\t}\r\n\treturn arr\r\n}", "function _adjustHeap (arr) {\n var i = parseInt(arr.length / 2) - 1;\n\n while (i >= 0) {\n if (arr[i] < arr[2 * i + 1] || arr[i] < arr[2 * i + 2]) {\n if (arr[2 * i + 1] < arr[2 * i + 2]) {\n arr[2 * i + 2] = [arr[i], arr[i] = arr[2 * i + 2]][0];\n } else {\n arr[2 * i + 1] = [arr[i], arr[i] = arr[2 * i + 1]][0];\n }\n _adjustHeap(arr);\n }\n i--;\n };\n }", "function heapifyStandart(currentIndex, heapSize ,arr){\n\n var largestElement = currentIndex\n var leftIndex = 2 * currentIndex + 1\n var rightIndex = 2 * currentIndex + 2\n\n if (leftIndex < heapSize && arr[currentIndex] < arr[leftIndex]){\n largestElement = leftIndex\n }\n \n if (rightIndex < heapSize && arr[largestElement] < arr[rightIndex]){\n largestElement = rightIndex\n }\n\n if (largestElement != currentIndex){\n swapArrayElement(currentIndex, largestElement, arr)\n heapifyStandart(largestElement, heapSize, arr)\n }\n}", "function minHeapCompFunction(value1, value2)\r\n{\r\n /*\r\n this function checks if the value1 is in the right position\r\n and the developer have to use to make sure that the min heap invarient is holding or not \r\n */\r\n\r\n if(value1 < value2)\r\n return true;\r\n\r\n return false; // for = and >\r\n}", "function heapSort(input) {\n // inplace sorting algorithm\n // iterate from the middle and go to the first element and heapify at each position\n let middleElement = Math.ceil(input.length / 2);\n\n for (let i = middleElement; i >= 0; i--) {\n heapify(i, input.length - 1, input);\n }\n\n let lastElement = input.length - 1;\n for (let i = 0; i <= lastElement; i++) {\n let temp = input[lastElement - i];\n input[lastElement - i] = input[0];\n input[0] = temp;\n heapify(0, lastElement - i - 1, input);\n }\n // console.log(\"sorted\");\n // console.log(input);\n}", "function extractMin(heap) {\n if (heap.length < 1) return null\n // swap first and last element\n let temp = heap[0]\n heap[0] = heap[heap.length-1]\n heap[heap.length-1] = temp\n\n const result = heap.pop()\n minHeapify(heap, 0)\n return result\n}", "grow() {\n this.capacity *= 2;\n this.capacity = this.closestLargestPrime(this.capacity);\n for (let i = 0; i < this.table.length; i++) {\n let currentBucket = this.table[i];\n this.table[i] = [];\n if (currentBucket) {\n if (currentBucket.length > 0) {\n this.elements--;\n currentBucket.forEach(item => {\n this.add(item.key, item.value);\n });\n }\n }\n }\n }", "constructor(/*MinHeapNode[]*/ a, /*int*/ size, compareValues) {\n super(a, size, compareValues);\n let i = (this.heap_size - 1)/2;\n while (i >= 0) {\n this.heapify(i);\n i--;\n }\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "async function heapSortAux(array) { \n const len = array.length;\n // Build heap (rearrange array) \n for (let i = Math.floor(len / 2) - 1; i >= 0; i--) { \n await heapify(array, len, i); \n }\n \n // One by one extract an element from heap \n for (let i = len-1; i > 0; i--) { \n array[0].style.backgroundColor = bar_colours.selectedColour2;\n array[i].style.backgroundColor = bar_colours.selectedColour;\n await new Promise(resolve =>\n setTimeout(() => {\n resolve();\n }, delay)\n );\n // Move current root to end \n await swap(array, 0, i); \n array[i].style.backgroundColor = bar_colours.doneColour;\n array[0].style.backgroundColor = bar_colours.initColour;\n\n \n \n // call max heapify on the reduced heap \n await heapify(array, i, 0); \n } \n }", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "min() {\n if (this.heap.length == 0)\n throw Error(\"Heap is empty\");\n\n return this.heap[0];\n }", "heapifyToBottom(index) {\n let smallest = index;\n const child1 = index * 2 + 1;\n const child2 = index * 2 + 2;\n if (this.compare(child1, smallest) < 0) {\n smallest = child1;\n }\n if (this.compare(child2, smallest) < 0) {\n smallest = child2;\n }\n //swap with smaller child if either child is smaller than parent\n if (index !== smallest) {\n utility_1.default.swap(this._nodes, index, smallest);\n this.heapifyToBottom(smallest);\n }\n }", "heapDown(index) {\n const [leftIndex, rightIndex] = this.children(index);\n \n if (!leftIndex && !rightIndex) return;\n\n let min;\n rightIndex ? min = rightIndex : min = leftIndex;\n if ((leftIndex && rightIndex) &&\n this.store[leftIndex].key < this.store[rightIndex].key) {\n min = leftIndex;\n }\n\n if (this.store[index].key > this.store[min].key) {\n this.swap(index, min);\n this.heapDown(min);\n }\n }", "function setupHeap(lists) {\n var heap = new MinHeap();\n for (var i = 0; i < lists.length; i++) {\n var node = new ListNode(lists[i][0], lists[i][1]);\n heap.insert(node);\n }\n return heap;\n}", "heapifyUp(customStartIndex) {\n // Take the last element (last in array or the bottom left in a tree)\n // in the heap container and lift it up until it is in the correct\n // order with respect to its parent element.\n let currentIndex = customStartIndex || this.heapContainer.length - 1;\n\n while (\n this.hasParent(currentIndex) &&\n !(this.parent(currentIndex) <= this.heapContainer[currentIndex])\n ) {\n this.swap(currentIndex, this.getParentIndex(currentIndex));\n currentIndex = this.getParentIndex(currentIndex);\n }\n }", "function heapSort(inputArr){\n var heap = new Heap;\n for(i=0; i<inputArr.length; i++){\n heap.add(inputArr[i])\n }\n var outputArr = []\n for(i=0; i<inputArr.length; i++){\n outputArr.push(heap.remove())\n }\n console.log(outputArr)\n return outputArr\n}", "function heapSortInPlace(array){\n for(let i = 1; i < array.length; i++){\n MaxHeap.heapifyUp(array, i);\n }\n\n let temp;\n for(let j = array.length - 1; 0 < j; j--){\n temp = array[0];\n array[0] = array[j];\n array[j] = temp;\n\n // j is the length of array\n MaxHeap.heapifyDown(array, 0, j);\n }\n\n return array;\n}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "function heapify(currentIndex, arr){\n\n if (isHavingChildrenLeft(currentIndex, arr)) {\n let parent = arr[currentIndex]\n\n if (isHavingChildrenRight(currentIndex, arr)){\n let maxChildren = Math.max(arr[currentIndex * 2 + 1], arr[currentIndex * 2 + 2])\n if (parent < maxChildren){\n let maxChilrenIndex = maxChildren == arr[currentIndex * 2 + 1] ? currentIndex * 2 + 1 : currentIndex * 2 + 2 \n swapArrayElement(currentIndex, maxChilrenIndex, arr)\n heapify(maxChilrenIndex, arr)\n }\n }else {\n if (parent < arr[currentIndex * 2 + 1]){\n swapArrayElement(currentIndex, currentIndex * 2 + 1, arr)\n heapify(currentIndex * 2 + 1, arr)\n }\n }\n }else {\n console.log(\"skipping index %d\", currentIndex)\n }\n}", "function heapSort(arr){\n var sorted = [];\n var heap1 = new MaxHeap();\n \n for(let i=0; i<arr.length; i++){\n heap1.insert(arr[i]);\n }\n \n for(let i=0; i<arr.length; i++){\n sorted.push(heap1.delete());\n }\n return sorted;\n}", "function heapify(array, size, i) {\n let max = i // initialize max as root\n let left = 2 * i + 1\n let right = 2 * i + 2\n \n // if left child is larger than root\n if (left < size && array[left] > array[max])\n max = left\n \n // if right child is larger than max\n if (right < size && array[right] > array[max])\n max = right\n \n // if max is not root\n if (max != i) {\n // swap\n let temp = array[i]\n array[i] = array[max]\n array[max] = temp\n \n // recursively heapify the affected sub-tree\n heapify(array, size, max)\n }\n }", "heapSort(start, length) {\n this.heapify(start, length);\n\n for (let i = length - start; i > 1; i--) {\n this.Writes.swap(start, start + i - 1);\n this.siftDown(1, i - 1, start);\n }\n\n // if(!isMax) {\n // this.Writes.reversal(arr, start, start + length - 1, 1, true, false);\n // }\n}", "function heapSort(arr,comp){\r\n // Turn arr into a heap\r\n heapify(arr,comp);\r\n for(let i = arr.length-1; i > 0; i--){\r\n // The 0th element of a heap is the largest so move it to the top.\r\n [arr[0],arr[i]] = [arr[i],arr[0]];\r\n // The 0th element is no longer the largest; restore the heap property\r\n siftDown(arr,comp,0);\r\n }\r\n}", "heapifyToTop(index) {\n while (index > 0) {\n const parent = Math.floor((index - 1) / 2);\n if (this.compare(index, parent) >= 0) {\n break;\n }\n //swap with parent node while current node is smaller\n utility_1.default.swap(this._nodes, index, parent);\n index = parent;\n }\n }", "enqueue(value, priority) {\n const newEntry = new Entry(value, priority);\n this.values.push(newEntry);\n let curr = this.values.length - 1;\n let parent = Math.floor((curr - 1) / 2);\n while (\n curr > 0 &&\n this.values[parent].priority > this.values[curr].priority\n ) {\n const temp = this.values[parent];\n this.values[parent] = this.values[curr];\n this.values[curr] = temp;\n curr = parent;\n parent = Math.floor((curr - 1) / 2);\n }\n }", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "extractMin() {\r\n\t\tconst min = this.heap[0];\r\n\t\tthis.remove(min);\r\n\t\treturn min;\r\n\t}", "heapify(currentParent) {\n let left = this.left(currentParent);\n let right = this.right(currentParent);\n let bestParent = currentParent;\n\n // looking for the best parent that fulfills the heap property for this node and it's children\n if (left < this.size && !this.validParent(left, bestParent)) {\n bestParent = left;\n }\n if (right < this.size && !this.validParent(right, bestParent)) {\n bestParent = right;\n }\n\n // if the current parent is not the best parent, we have some work to do\n if (currentParent != bestParent) {\n // swapping new parent with old parent\n let currentParentValue = this.heap[currentParent];\n this.heap[currentParent] = this.heap[bestParent];\n this.heap[bestParent] = currentParentValue;\n\n // set locations on the swap\n this.locations.set(this.hash(this.heap[bestParent]), bestParent);\n this.locations.set(this.hash(this.heap[currentParent]), currentParent);\n\n // recurse from the best parent's old position\n this.heapify(bestParent);\n }\n }", "function heapify(array, size, i, animations)\n{\n let root = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if(left < size && array[left] > array[root])\n {\n animations.push([root, left, false]);\n animations.push([root, left, false]);\n root = left;\n }\n if(right < size && array[right] > array[root])\n {\n animations.push([root, right, false]);\n animations.push([root, right, false]);\n root = right;\n }\n //Root has changed because i was not the root\n if(root != i)\n {\n animations.push([root, array[i], true]);\n animations.push([i, array[root], true]);\n //If root is not i, then swap the values, call heapify recursively\n swap(array, root, i);\n heapify(array, size, root, animations);\n }\n}", "heapify(/*index*/ i) {\n // this is a stub\n }", "function heapSort(array){\n // 1: Construction\n let heap = new MaxHeap()\n array.forEach(ele => {\n heap.insert(ele)\n });\n\n// 2: sortdown \n let sorted = []\n while (heap.array.length > 1){\n sorted.push(heap.deleteMax())\n }\n return sorted\n}", "insert_num(num) {\n // Insert a number if the num is less than the top ele in maxHeap, or maxHeap top is null\n if (!this.maxHeap.values.length || this.maxHeap.peek() >= num) {\n this.maxHeap.insert(num);\n } else {\n this.minHeap.insert(num);\n }\n\n // Rebalance the heaps. Max heap should have 1 extra element if total num of elements is odd\n if (this.maxHeap.values.length > this.minHeap.heap.length + 1) {\n this.minHeap.insert(this.maxHeap.extractMax());\n } else if (this.maxHeap.values.length < this.minHeap.heap.length) {\n this.maxHeap.insert(this.minHeap.remove());\n }\n }", "_heapifyUp(startIndex) {\n let childIndex = startIndex;\n let parentIndex = Math.floor((childIndex - 1) / 2);\n\n while (this._shouldSwap(parentIndex, childIndex)) {\n this._swap(parentIndex, childIndex);\n childIndex = parentIndex;\n parentIndex = Math.floor((childIndex - 1) / 2);\n }\n }", "function PriorityQueue (priorityAttribute) {\n\n this.nodeList = []\n this.priorityAttribute = priorityAttribute; //for graph it is destanceFromBegining\n\n this.insert = function (node){\n this.nodeList.push(node);\n }\n\n // return 1 if first > second\n // return 0 if first = second\n // return -1 if first < second\n var sign = function(x){\n if(x > 0) return 1;\n if(x < 0) return -1;\n return 0;\n }\n\n var compare = function(first, second){\n\n if(first === undefined || second === undefined)\n throw new UnexpectedInternalError(\"Illegal argument exception: arguments of compare cannot be undefined\")\n\n if (first === \"infinity\") {\n if (second === \"infinity\") {\n return 0;\n } else {\n return 1;\n }\n } else {\n if (second === \"infinity\") {\n return -1;\n } else {\n sign(first - second) ;\n }\n }\n\n }\n\n this.extractMin = function () {\n if(this.nodeList.length === 0) return \"empty\";\n\n var indexOfMin = 0;\n for(var i = 0; i < this.nodeList.length; i++){\n if( compare(this.nodeList[i][this.priorityAttribute], this.nodeList[indexOfMin][this.priorityAttribute]) === -1 )\n indexOfMin = i;\n }\n\n var min = this.nodeList[indexOfMin];\n this.nodeList.splice(indexOfMin, 1);\n return min;\n }\n\n this.decreaseKey = function (node, key) {\n if(node[this.priorityAttribute] < key)\n throw new UnexpectedInternalError(\"Given key: \" + key + \" is greater than current key of given node:\" + node[this.priorityAttribute])\n\n node[this.priorityAttribute] = key;\n }\n\n this.isEmpty = function (){\n return this.nodeList.length === 0;\n }\n\n this.isNotEmpty = function () {\n return this.nodeList.length !== 0;\n }\n}", "insert(value, priority) {\n var node = new Node(value, priority);\n\n this.heap.push(node);\n\n let currentNodeIdx = this.heap.length - 1;\n let currentNodeParentIdx = Math.floor((currentNodeIdx - 1) / 2);\n\n while (\n this.heap[currentNodeParentIdx] &&\n priority > this.heap[currentNodeParentIdx].priority\n ) {\n const parent = this.heap[currentNodeParentIdx]; // swap\n this.heap[currentNodeParentIdx] = node;\n this.heap[currentNodeIdx] = parent;\n\n currentNodeIdx = currentNodeParentIdx; // update pointers\n currentNodeParentIdx = Math.floor((currentNodeIdx - 1) / 2);\n }\n }", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function Heap()\n{\n\t// h[0] not used, heap initially empty\n\n\tthis.h = [null]; // heap of integer keys\n\tthis.h_item = [null]; // corresponding heap of data-items (any object)\n\tthis.size = 0; // 1 smaller than array (also index of last child)\n\n\n\t// --------------------\n\t// PQ-required only; more could be added later when needed\n\t// the 2 basic shape maintaining operations heapify and reheapify simplify\n\t// processing functions\n\n\tthis.isEmpty = heapisEmpty; // return true if heap empty\n\tthis.deleteRoot = heapDeleteRoot; // return data-item in root\n\tthis.insert = heapInsert; // insert data-item with key\n\n\tthis.heapify = heapheapify; // make subtree heap; top-down heapify (\"sink\") used by .deleteRoot()\n\tthis.reheapify = heapreheapify; // bottom-up reheapify (\"swim\") used by .insert()\n\tthis.show = heapShow; \t // utility: return pretty formatted heap as string\n\t \t // ... etc\n\n\t// --------------------\n}", "function PriorityQueue() {\n this.heap = [];\n this.size = 0;\n}", "function make_heap_obj(node1_id, node2_id, weight) {\n return [node1_id, node2_id, weight];\n }", "buildHeap(left, right) {\r\n var x = this.values[left];\r\n var i = left;\r\n\r\n while(true) {\r\n let j = 2 * i;\r\n if (j > right) break;\r\n if ((j < right) && (Item.compare(this.values[j + 1], this.values[j]) >= 0)) {\r\n j++;\r\n }\r\n\r\n if (Item.compare(x, this.values[j]) >= 0) break;\r\n let temp = this.values[i];\r\n this.values[i] = this.values[j];\r\n this.values[j] = temp;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n i = j;\r\n }\r\n\r\n this.values[i] = x;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n }", "extract(withPriority) {\n if (this.isEmpty()) return;\n let _minPriorityItem = this._elementHeap[0];\n let _minPriority = this._priorityHeap[0];\n this._swap(0, this._size - 1);\n this._elementHeap.splice(-1, 1);\n this._priorityHeap.splice(-1, 1);\n delete this._indexLookup[_minPriorityItem];\n this._size--;\n\n this._fixBottomHeap(0);\n return withPriority\n ? _minPriorityItem && { item: _minPriorityItem, priority: _minPriority }\n : _minPriorityItem;\n }", "function buildHeap(A) {\n var n = A.length;\n for (var i = n/2 - 1; i >= 0; i--) {\n heapify(A, i, n);\n }\n}", "heapifyDown(customStartIndex = 0) {\n // Compare the parent element to its children and swap parent with the appropriate\n // child (smallest child for MinHeap, largest child for MaxHeap).\n // Do the same for next children after swap.\n let currentIndex = customStartIndex;\n let nextIndex = null;\n\n while (this.hasLeftChild(currentIndex)) {\n if (\n this.hasRightChild(currentIndex) &&\n this.rightChild(currentIndex) <= this.leftChild(currentIndex)\n ) {\n nextIndex = this.getRightChildIndex(currentIndex);\n } else {\n nextIndex = this.getLeftChildIndex(currentIndex);\n }\n\n if (this.heapContainer[currentIndex] <= this.heapContainer[nextIndex]) {\n break;\n }\n\n this.swap(currentIndex, nextIndex);\n currentIndex = nextIndex;\n }\n }", "function SimpleHeap(f) {\n var data = [];\n\n // By default just use standard comparison\n var compareFunc = f;\n if (!compareFunc) {\n compareFunc = function(a,b) {\n if (a < b) return -1;\n return 1;\n }\n }\n\n this.insert = function(x) {\n data.push(x);\n data.sort(compareFunc);\n }\n\n this.pop = function() {\n return data.pop();\n }\n\n this.peek = function() {\n return data[data.length - 1];\n }\n\n this.size = function() {\n return data.length;\n }\n\n SimpleHeap.prototype.toString = function() {\n return data.toString();\n }\n}", "function heapify(array, n, i) {\n let leftIdx = 2 * i + 1; // 1) grab left/right indices/values of current val/node\n let rightIdx = 2 * i + 2; // root index is now 0 instead of 1 (no null placeholder)\n let leftVal = array[leftIdx];\n let rightVal = array[rightIdx];\n\n if (leftIdx >= n) leftVal = -Infinity; // 2) set left/right val to -infinity if we're out of array bounds (determined by n)\n if (rightIdx >= n) rightVal = -Infinity;\n\n if (array[i] > leftVal && array[i] > rightVal) return; // 3) exit if current val > both children\n\n let swapIdx;\n if (leftVal < rightVal) { // 4) determine index to swap current value with\n swapIdx = rightIdx;\n } else {\n swapIdx = leftIdx;\n }\n\n [array[i], array[swapIdx]] = [array[swapIdx], array[i]]; // 5) swap current val w/ larger of two children\n\n heapify(array, n, swapIdx); // 6) recursively siftDown/heapify until maxHeap property met\n}", "function buildHeap(arr, type) {\n // gets the last index\n var lastIndex = arr.length - 1;\n // While the last index is greater than 0\n while (lastIndex > 0) {\n // get the parent index\n var parentIndex = Math.floor((lastIndex - 1) / 2);\n // get the items inside the parent\n // and the last index \n var lastItem = arr[lastIndex];\n var parentItem = arr[parentIndex];\n\n if (type === 'maxHeap') {\n // checks to see if the lastItem is greater\n // than the parentItem if so then do a swap\n if (lastItem > parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n else if (type === 'minHeap') {\n // checks to see if the lastItem is less\n // than the parentItem if so then do a swap\n if (lastItem < parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n\n }\n }", "grow() {\n this.capacity *= 2;\n this.capacity = this.closestLargestPrime(this.capacity);\n for (let i = 0; i < this.table.length; i++) {\n let currentBucket = this.table[i];\n this.table[i] = [];\n if (currentBucket) {\n if (currentBucket.length > 0) {\n this.elements--;\n currentBucket.forEach(item => {\n this.add(item);\n });\n }\n }\n }\n }", "function heapify(A, idx, max) {\n var largest = idx,\n left = 2 * idx + 1,\n right = 2 * idx + 2;\n\n if (left < max && A[left] > A[idx]) {\n largest = left;\n }\n if (right < max && A[right] > A[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n swap(A, idx, largest);\n heapify(A, largest, max);\n }\n}", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.minHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "function heap(compareFunction, array = []) {\n const data = array;\n const heapSort = ()=>{data.sort(compareFunction)};\n const add = function (node) {\n data.push(node);\n heapSort();\n };\n\n const remove = function () {\n const node = data.shift();\n return node;\n };\n\n const empty = function () {\n return data.length === 0;\n };\n const updateItems = function () {\n heapSort();\n };\n return {\n data: data,\n add: add,\n remove: remove,\n empty: empty,\n update: updateItems,\n };\n}", "function MinPriorityQueue1(callbackObject) {\n //const queue = new MinMinPriorityQueue({ priority: x => x.val })\n this.custom = callbackObject;\n this.heap = [];\n}", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "function heapselect(a, lo, hi, k) {\n\t var queue = new Array(k = Math.min(hi - lo, k)),\n\t min,\n\t i,\n\t x,\n\t d;\n\n\t for (i = 0; i < k; ++i) queue[i] = a[lo++];\n\t heap(queue, 0, k);\n\n\t if (lo < hi) {\n\t min = f(queue[0]);\n\t do {\n\t if (x = f(d = a[lo]) > min) {\n\t queue[0] = d;\n\t min = f(heap(queue, 0, k)[0]);\n\t }\n\t } while (++lo < hi);\n\t }\n\n\t return queue;\n\t }", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "function heap(a, lo, hi) {\n var n = hi - lo,\n i = (n >>> 1) + 1;\n while (--i > 0) sift(a, i, n, lo);\n return a;\n }", "enqueue(val, priority) {\n let node = new Node(val, priority);\n this.values.push(node);\n let idx = this.values.length - 1;\n while (idx > 0) {\n let parentIdx = Math.floor((idx - 1) / 2);\n if (this.values[parentIdx].priority > this.values[idx].priority) {\n let temp = this.values[parentIdx];\n this.values[parentIdx] = this.values[idx];\n this.values[idx] = temp;\n idx = parentIdx;\n parentIdx = Math.floor((idx - 1) / 2);\n } else break;\n }\n return this.values;\n }", "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "function Heap(key) {\n this._array = [];\n this._key = key || function (x) { return x; };\n}", "async function heapify(arr,length,i){\n chosen.style.color=\"black\";\n chosen.innerHTML=`Turning the remaining array into max heap...`;\n let largest=i;\n let left=i*2+1;\n let right=left+1;\n let rightBar=document.querySelector(`.bar${right}`);\n let leftBar=document.querySelector(`.bar${left}`);\n let iBar=document.querySelector(`.bar${i}`);\n await sleep(speed);\n iBar.style.backgroundColor=\"#3500d3\";//selected\n if (left<length)\n leftBar.style.backgroundColor=\"#f64c72\";//checking\n if (right<length)\n rightBar.style.backgroundColor=\"#f64c72\";//checking\n if (left<length && arr[left]>arr[largest])\n largest=left;\n if (right<length && arr[right]>arr[largest])\n largest=right;\n if(largest!=i){\n let largestBar=document.querySelector(`.bar${largest}`);\n iBar=document.querySelector(`.bar${i}`);\n [arr[largest],arr[i]]=[arr[i],arr[largest]];\n [largestBar.style.height,iBar.style.height]=[iBar.style.height,largestBar.style.height];\n [largestBar.innerHTML,iBar.innerHTML]=[iBar.innerHTML,largestBar.innerHTML];\n await sleep(speed);\n iBar.style.backgroundColor=\"#17a2b8\";//original\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n\n await heapify(arr,length,largest);\n }\n iBar.style.backgroundColor=\"#17a2b8\";//original\n if (left<length)\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n if (right<length)\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n}", "dequeue() {\n const [next] = this.values;\n this.values[0] = this.values.pop();\n let childLeft, childRight;\n let curr = 0;\n while (true) {\n let childLeftIdx = 2 * curr + 1;\n let childRightIdx = childLeft + 1;\n let swap = null;\n if (childLeftIdx < this.values.length) {\n childLeft = this.values[childLeftIdx];\n if (childLeft.priority > this.values[curr].priority) {\n swap = childLeft;\n }\n\n if (childRightIdx < this.values.length) {\n childRight = this.values[childRight];\n if (\n (swap === null &&\n childRight.priority < this.values[curr].priority) ||\n (swap !== null && childRight < childLeft.priority)\n ) {\n swap = childRightIdx;\n }\n }\n\n if (swap === null) break;\n const temp = this.values[curr];\n this.values[curr] = this.values[swap];\n this.values[swap] = temp;\n curr = swap;\n }\n }\n }" ]
[ "0.720125", "0.7082232", "0.7045268", "0.69386554", "0.68683213", "0.6864061", "0.68334186", "0.68217164", "0.6809871", "0.67274594", "0.67023855", "0.6699346", "0.6672485", "0.66363895", "0.6628925", "0.6590176", "0.6588476", "0.6567027", "0.6564876", "0.653676", "0.65211815", "0.649338", "0.64909035", "0.6463096", "0.6407627", "0.6386017", "0.6386017", "0.6385183", "0.63187104", "0.631835", "0.631835", "0.63048416", "0.62806743", "0.6261122", "0.6251233", "0.62456954", "0.6230704", "0.6219071", "0.6208013", "0.6192798", "0.61862266", "0.61652976", "0.61474544", "0.6141955", "0.61409783", "0.61389416", "0.6131193", "0.61283755", "0.61264163", "0.6125361", "0.61123514", "0.6095849", "0.6083901", "0.6071642", "0.6066561", "0.6057717", "0.60541564", "0.60473233", "0.60388035", "0.60330087", "0.6021238", "0.60139585", "0.60101914", "0.60043067", "0.60002095", "0.598465", "0.5981522", "0.59768766", "0.5972501", "0.5972501", "0.5972501", "0.5972501", "0.5966148", "0.5963891", "0.5962933", "0.59586734", "0.59554327", "0.59478796", "0.5943007", "0.5923135", "0.59227353", "0.5917463", "0.59136903", "0.59008574", "0.5895987", "0.58927876", "0.5888963", "0.5865332", "0.58562005", "0.58514136", "0.58514136", "0.58477986", "0.58385015", "0.5836426", "0.5833425", "0.5831046", "0.5823886", "0.5787796", "0.5786389", "0.5770568" ]
0.6279518
33
insert a value into the heap
insert(data) { const size = this.heap.length; if (size === 0) { this.heap.push(data); } else { this.heap.push(data); for (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) { this.minHeapify(this.heap, this.heap.length, i); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insert(value) {\n // Insert value to the end of array\n // Perform siftUp to correct position of value in the heap tree\n this.heap.push(value);\n this.siftUp(this.heap.length - 1, this.heap);\n }", "insert(value) {\n\t\tthis.heap.push(value);\n\t\t// calling heapify function to reconstruct array to heap property\n\t\tthis.heapify();\n\t}", "insert(val) {\n this.array.push(val);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// push value to end of array (add node to farthest bottom left of tree)\n\n this.siftUp(this.array.length - 1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuously swap value toward front of array to maintain maxHeap property\n }", "insert(value, priority) {\n var node = new Node(value, priority);\n\n this.heap.push(node);\n\n let currentNodeIdx = this.heap.length - 1;\n let currentNodeParentIdx = Math.floor((currentNodeIdx - 1) / 2);\n\n while (\n this.heap[currentNodeParentIdx] &&\n priority > this.heap[currentNodeParentIdx].priority\n ) {\n const parent = this.heap[currentNodeParentIdx]; // swap\n this.heap[currentNodeParentIdx] = node;\n this.heap[currentNodeIdx] = parent;\n\n currentNodeIdx = currentNodeParentIdx; // update pointers\n currentNodeParentIdx = Math.floor((currentNodeIdx - 1) / 2);\n }\n }", "function pq_insert(heap, new_element) {\n var eIntIdx = heap.length;\n var prntIdx = Math.floor((eIntIdx - 1 ) / 2);\n heap.push(new_element);\n var heaped = (eIntIdx <= 0) || (heap[prntIdx].priority <= heap[eIntIdx]).priority;\n\n while(!heaped){\n var tmp = heap[prntIdx];\n heap[prntIdx] = heap[eIntIdx];\n heap[eIntIdx] = tmp;\n\n eIntIdx = prntIdx;\n prntIdx = Math.floor((eIntIdx - 1)/2);\n heaped = (eIntIdx <= 0) ||(heap[prntIdx].priority <= heap[eIntIdx].priority);\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }", "function minheap_insert(heap, new_element) {\n var length = heap.push(new_element);\n var child = length - 1;\n var parent = (child + child%2)/2 - 1;\n while(parent >= 0 && heap[child] < heap[parent]){\n swap(heap,parent,child);\n child = parent;\n parent = (child + child%2)/2 - 1;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "insert(key) {\n /*\n * Add the key to the end of the heap and increment n, then swim up the\n * heap to fix any violations that have arisen.\n */\n this.heap[++this.n] = key;\n this.swim(this.n);\n }", "function minheap_insert(heap, new_element) {\n heap.push(new_element);\n var index = heap.length - 1;\n while(index > 0){\n var parent = Math.floor((index+1)/2)-1;\n if(heap[parent] > new_element){\n var temp = heap[parent];\n heap[parent] = new_element;\n heap[index] = temp;\n }\n index = parent;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function minheap_insert(heap, new_element) \n{\n \n var adj,temp;\n heap.push(new_element);\n for (adj=heap.length-1;adj>0;adj=Math.floor((adj-1)/2))\n {\n if (new_element < heap[Math.floor((adj-1)/2)]) // use to swap those two numbers\n {\n temp = new_element;\n heap[adj] = heap[Math.floor((adj-1)/2)];\n heap[Math.floor((adj-1)/2)] = temp; \n }\n }\n return;\n}", "add(key, value = key) {\n const node = new HeapNode(key, value);\n const i = this.store.push(node) - 1;\n this.heapUp(i);\n // console.log(this.store);\n }", "insert(item) {\n this.heap.push(item);\n this.size++;\n\n // put it at the end\n let i = this.size - 1;\n this.locations.set(this.hash(item), i);\n\n while (i > 0) {\n let parent = this.parentIndex(i);\n\n if (this.validParent(i, parent))\n break;\n\n // swap item places\n this.heap[i] = this.heap[parent];\n this.heap[parent] = item;\n\n // set locations on the swap\n this.locations.set(this.hash(item), parent);\n this.locations.set(this.hash(this.heap[i]), i);\n\n i = parent;\n }\n }", "insert(val) {\n if (typeof val === 'undefined') return;\n this.storage.push(val);\n this.bubbleUp(this.storage.length - 1);\n this.size++;\n // console.log('val: ',val, ' storage: ', this.storage.toString());\n }", "insert(val) {\n if (this.storage[0] === null) {\n this.storage[0] = val;\n this.size++;\n return;\n }\n this.storage.push(val);\n this.size++;\n this.bubbleUp(this.size - 1);\n }", "add(value) {\r\n this.heapContainer.push(value);\r\n this.heapifyUp();\r\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "insert(key, value) {\n let index = this._hash(key, this._tableSize);\n\n if (!this._storage[index]) this._storage[index] = new LinkedList();\n\n let pair = new LinkedList(key);\n pair.add(value);\n this._storage[index].add(pair);\n this._currentSize++;\n\n if (this._isHalfSizeReached()) {\n this._resizing();\n }\n }", "function insert(arr, num) {\n console.log('Heap')\n console.log(arr)\n console.log('inserting: '+num)\n arr.push(num)\n console.log(arr)\n\n var childPos = arr.length-1\n var parentPos = Math.floor((arr.length-1)/2)\n var child = arr[childPos]\n var parent = arr[parentPos]\n\n console.log('child: '+child)\n console.log('child position: '+childPos)\n console.log('parent: '+parent)\n console.log('parent position: '+parentPos)\n\n recurse()\n\n function recurse() {\n if (parent === undefined){return}\n if(child >= parent){\n return arr\n }\n console.log('Child is less than parent, swapping...')\n arr[childPos] = parent\n arr[parentPos] = child\n console.log('new array')\n console.log(arr)\n\n childPos = parentPos\n console.log('new child: '+child)\n console.log('new child position: '+childPos)\n\n parentPos = Math.floor((parentPos-1)/2)\n parent = arr[parentPos]\n console.log('new parent: '+parent)\n console.log('new parent position: '+parentPos)\n\n\n return recurse(child, parent)\n }\n}", "push(value){\r\n this.top += 1;\r\n this.storage[this.top] = value;\r\n }", "insert_num(num) {\n // Insert a number if the num is less than the top ele in maxHeap, or maxHeap top is null\n if (!this.maxHeap.values.length || this.maxHeap.peek() >= num) {\n this.maxHeap.insert(num);\n } else {\n this.minHeap.insert(num);\n }\n\n // Rebalance the heaps. Max heap should have 1 extra element if total num of elements is odd\n if (this.maxHeap.values.length > this.minHeap.heap.length + 1) {\n this.minHeap.insert(this.maxHeap.extractMax());\n } else if (this.maxHeap.values.length < this.minHeap.heap.length) {\n this.maxHeap.insert(this.minHeap.remove());\n }\n }", "insert(key, value) {\n const index = getIndexBelowMax(key.toString(), this.limit);\n const bucket = this.storage.get(index);\n this.doubleStorage();\n if (bucket === undefined) {\n this.storage.set(index, [[key, value]]);\n return;\n }\n for (let i = 0; i < bucket.length; i++) {\n if (bucket[i][0] === key) {\n bucket[i][1] = value;\n this.storage.set(index, bucket);\n return;\n }\n }\n bucket.push([key, value]);\n this.storage.set(index, bucket);\n }", "_insert(node, value) {\n if (node === null) {\n return new Node(value, null, null);\n }\n\n // Passing to childnodes and update\n var side = ~~(value > node.value);\n node.children[side] = this._insert(node.children[side], value);\n\n // Keep it balance\n if (node.children[side].key < node.key) {\n return node.rotate(side);\n }\n return node.resize();\n }", "insert(value) {\n if (value === this.key) {\n return;\n }\n\n if (value < this.key) {\n if (this.left) {\n return this.left.insert(value);\n }\n\n this.left = new Node(value);\n\n return value;\n }\n\n if (this.right) {\n return this.right.insert(value);\n }\n\n this.right = new Node(value);\n\n return value;\n }", "insert(value) {\n this.storage.push(value);\n this.bubbleUp();\n }", "insert(value) {\n this.head = new Node(value, this.head);\n }", "push(value) {\n if (!this.top) {\n this.top = new NodeWithMin(value, value);\n this.min = this.top.min;\n } else { // this.top is present on the stack\n let newMin = Math.min(value, this.min);\n let newTop = new NodeWithMin(value, newMin);\n newTop.next = this.top;\n this.top = newTop;\n this.min = newMin;\n }\n }", "insert (key, value) {\n value = value || key;\n\n //leafs need to insert the value at themself and make new leaf children\n if(this.height == 0) {\n this.key = key;\n this.value = value || key;\n this.left = new BinarySearchTree(this);\n this.right = new BinarySearchTree(this);\n this.height = 1;\n this.numLeftChildren = 1;\n this.numRightChildren = 1;\n return;\n }\n\n if(key == this.key) return;\n\n if(key < this.key) {\n this.numLeftChildren++;\n this.left.insert(key);\n this.height = Math.max(this.height, 1 + this.left.height);\n }\n if(key >= this.key) {\n this.numRightChildren++;\n this.right.insert(key);\n this.height = Math.max(this.height, 1 + this.right.height);\n }\n\n this.rebalance();\n }", "insert(i, key) {\n\t\tea && assert(i > 0 && this.valid(i),\n\t\t\t\t\t `ArrayHeap.insert: invalid item ${i}`);\n\t\tif (this.contains(i)) { this.changekey(i,key); return; }\n\t\tif (i > this.n) this.expand(i);\n\t\tthis.#key[i] = key - this.#offset; this.#m++; this.siftup(i, this.m);\n\t}", "insert(val){\r\n this.values.push(val);\r\n this.bubbleUp();\r\n }", "enqueue(value, priority) {\n const newEntry = new Entry(value, priority);\n this.values.push(newEntry);\n let curr = this.values.length - 1;\n let parent = Math.floor((curr - 1) / 2);\n while (\n curr > 0 &&\n this.values[parent].priority > this.values[curr].priority\n ) {\n const temp = this.values[parent];\n this.values[parent] = this.values[curr];\n this.values[curr] = temp;\n curr = parent;\n parent = Math.floor((curr - 1) / 2);\n }\n }", "insert(value) {\n if (value < this.value) {\n if (this.left === null) {\n this.left = new BinarySearchTree(value);\n } else {\n this.left.insert(value);\n }\n } else if (value > this.value) {\n if (this.right === null) {\n this.right = new BinarySearchTree(value);\n } else {\n this.right.insert(value);\n }\n }\n }", "insert(value) {\n if (!this.head) {\n return this.push(value);\n } else {\n let temp = this.head;\n while (temp.forward.value > temp.value && value > temp.forward.value) {\n temp = temp.forward;\n }\n temp.forward = new Node(value);\n temp.forward.back = temp;\n temp.forward.forward = this.head;\n }\n this.size++;\n return true;\n }", "function heapAddNode(){\n setClass(nodes[heapSize], 2, \"Current\"); //set the first Node to the heap\n currentHeapPosition = heapSize;\n addStep(\"Add Node \" + (heapSize + 1) + \" to the heap and set it to \\\"current\\\".\");\n makeHeapStep = 2;\n}", "insertKeyValuePair(key, value) {\r\n if (!(key in this.cache)) {\r\n if (this.currentSize === this.maxSize) {\r\n this.evictLeastRecent();\r\n } else {\r\n this.currentSize++;\r\n }\r\n this.cache[key] = new DoublyLinkedListNode(key, value);\r\n } else {\r\n this.replaceKey(key, value);\r\n }\r\n this.updateMostRecent(this.cache[key]);\r\n }", "insert(value) {\n this.values.push(value)\n let index = this.values.length - 1\n let parentIndex \n while (!!index) {\n parentIndex = Math.floor((index-1)/2)\n if (this.values[parentIndex]>this.values[index]) break\n this.values[index] = this.values[parentIndex]\n this.values[parentIndex] = value\n index = parentIndex\n }\n return this\n }", "function insert() {\n var value = Math.floor(Math.random() * 9999);\n console.log(\"INS \" + value);\n values.push(value);\n tree.insert(value);\n}", "insert(item, priority) {\n if (item == null) return;\n if (item in this._indexLookup) {\n return this.changePriority(item, priority);\n }\n\n this._indexLookup[item] = this._size;\n this._priorityHeap.push(priority);\n this._elementHeap.push(item);\n\n this._fixTopHeap(this._size);\n this._size++;\n }", "insertKeyValuePair(key, value) {\n if (!(key in this.cache)) {\n if (this.currentSize === this.maxSize) {\n this.evictLeastRecent();\n } else {\n this.currentSize++;\n }\n this.cache[key] = new DoublyLinkedListNode(key, value);\n } else {\n this.replaceKey(key, value);\n }\n this.updateMostRecent(this.cache[key]);\n }", "enqueue(val, priority) {\r\n let newNode = new Node(val, priority);\r\n this.values.push(element);\r\n this.bubbleUp();\r\n }", "push(value) {\n const newNode = new _Node(value);\n\n // 先判斷top目前是否為null (表示目前this.top沒有任何節點)\n if (this.top === null) {\n this.top = newNode;\n return;\n }\n\n // 如果已經有節點存在,把目前this.top的節點地址傳給 寫入新節點的.next property\n // 這時候目前this.top所代表的節點已經儲存在newNode.next\n newNode.next = this.top;\n this.top = newNode; // 用新節點取代、並作為新的this.top\n }", "enqueue(value, priority){\n let newNode = new Node(value, priority);\n this.values.push(newNode);\n this.bubbleUp();\n }", "push(value) {\n\t\tconst newNode = new Node(value);\n\t\tif (this.length == 0) {\n\t\t\tthis.top = newNode;\n\t\t\tthis.bottom = newNode;\n\t\t} else {\n\t\t\tconst holdingPointer = this.top;\n\t\t\tthis.top = newNode;\n\t\t\tthis.top.next = holdingPointer;\n\t\t}\n\t\tthis.length++;\n\t}", "insert(key, value) {\n const index = getIndexBelowMax(key, this.limit);\n // let bucket = this.storage[index];\n if (!this.storage.hasOwnProperty(index)) {\n this.storage.storage[index] = [];\n }\n if(!this.storage.storage[index].hasOwnProperty(key)){\n this.limit++;\n this.storage.limit++;\n }\n this.storage.storage[index] = [key, value];\n //this.storage.set(key, index);\n // return this.storage[index][key];\n // return this.storage[index];\n }", "insert(k, v) {\n var index = getIndexBelowMaxForKey(k, this._limit);\n var indexBucket = this._storage.get(index);\n \n if (indexBucket === undefined) {\n this._storage.set(index, [[k, v]]); \n } else { \n for (var i = 0; i < indexBucket.length; i++) {\n if (indexBucket[i][0] === k) {\n indexBucket[i][1] = v;\n } else {\n indexBucket.push([k, v]); \n }\n }\n this._storage.set(index, indexBucket);\n }\n }", "push(value) {\n if (!this.head) {\n this.head = new Node(value);\n this.head.forward = this.head;\n this.head.back = this.head;\n } else if (this.head.back.value < value) {\n let temp = this.head.back;\n\n temp.forward = new Node(value);\n temp.forward.back = temp;\n temp.forward.forward = this.head;\n\n this.head.back = temp.forward;\n } else {\n return false;\n }\n\n this.size++;\n return true;\n }", "insert(key, value) {\n if (!isNaN(key) && key < this.limit) {\n this.storage.set(key, value);\n this.storage.incrementLength();\n } else if (this.storage.get(getIndexBelowMax(key)) !== undefined || null) {\n const current = this.storage.get(getIndexBelowMax(key));\n const newArray = [[0, current], [key, value]];\n this.storage.set(getIndexBelowMax(key), newArray);\n this.storage.incrementLength();\n } else {\n this.storage.set(getIndexBelowMax(key), value);\n this.storage.incrementLength();\n }\n if (this.storage.length >= (0.75 * this.limit)) {\n this.limit *= 2;\n }\n }", "insertKey(k) {\n\n this.harr.push(k)\n let i = this.harr.length - 1\n\n let parentInd = this.parent(i)\n\n while (i != 0 && parentInd > harr[i]) {\n\n this.swap(i, parentInd)\n\n i = parentInd\n parentInd = this.parent(i)\n\n }\n\n }", "insert(value){\n if (this.head === null){\n this.head = new Node(value);\n }\n }", "insert(key, value) {\n this.root = this._insert(key, value, this.root);\n }", "push(value) {\n const node = new Node(value);\n if (!this.top) this.top = node;\n else {\n node.next = this.top;\n this.top = node;\n }\n }", "insert(value) {\n let newNode = new Node(value);\n if (!this.root) {\n return this.root = newNode;\n } else {\n let current = this.root;\n while (current) {\n if (value < current.value) {\n if (!current.left) {\n return current.left = newNode;\n }\n current = current.left;\n } else {\n if (!current.right) {\n return current.right = newNode;\n }\n current = current.right;\n }\n }\n }\n }", "insert(index_num, value){\n if(index_num<0 || index_num>this.length){\n console.log(\"INSERT - false\");\n return false;\n }\n if(index_num===0){\n this.unshift(value);\n console.log(\"INSERT using UNSHIFT - true\");\n return true;\n } \n if(index_num===this.length){\n this.push(value);\n console.log(\"INSERT using PUSH - true\");\n return true;\n } \n let newNode = new Node(value);\n let before_position = this.get(index_num-1); // 1. we neet to find item at the position one before!!\n let needed_position = before_position.next;\n before_position.next = newNode;\n newNode.next = needed_position;\n this.length +=1;\n console.log(\"INSERT - true\");\n return true;\n }", "insert (key, value) {\n const newTree = this.tree.insert(key, value)\n\n // If newTree is undefined, that means its structure was not modified\n if (newTree) { this.tree = newTree }\n }", "insert (key, value) {\n // Empty tree, insert as root\n if (!Object.prototype.hasOwnProperty.call(this, 'key')) {\n this.key = key\n this.data.push(value)\n return\n }\n\n // Same key as root\n if (this.compareKeys(this.key, key) === 0) {\n if (this.unique) {\n const err = new Error(`Can't insert key ${key}, it violates the unique constraint`)\n err.key = key\n err.errorType = 'uniqueViolated'\n throw err\n } else this.data.push(value)\n return\n }\n\n if (this.compareKeys(key, this.key) < 0) {\n // Insert in left subtree\n if (this.left) this.left.insert(key, value)\n else this.createLeftChild({ key: key, value: value })\n } else {\n // Insert in right subtree\n if (this.right) this.right.insert(key, value)\n else this.createRightChild({ key: key, value: value })\n }\n }", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "insert ( value ) {\n const node = new Node( value )\n\n if ( this.head === null ) {\n this.head = node\n this.tail = node\n } else {\n this.tail.next = node\n node.prev = this.tail\n this.tail = node\n }\n\n this.count++\n }", "insert(value) {\n this.count++;\n let newNode = new Node(value)\n const searchTree = (node) => {\n // if value < node.value, go left\n if (value < node.value) {\n // if no left child, append new node\n if (!node.left) {\n node.left = newNode; \n // if left child, look left again\n } else {\n searchTree(node.left);\n }\n }\n // if value > node.value, go right\n if (value > node.value ) {\n // if no right child, append new node\n if (!node.right) {\n node.right = newNode;\n // if right child, look right again\n } else {\n searchTree(node.right);\n }\n }\n }\n searchTree(this.root);\n }", "function push(val) {\n stack[++topp] = val;\n \n}", "push(value) {\n this.stackData.push(value);\n this.length++;\n if (this.length === 1) {\n this.bottom = this.stackData[0];\n }\n this.top = this.stackData[this.length - 1];\n }", "push(value) {\n //1. Push value in mainStack and check that value with the top value of minStack\n //2. If the pushed value is greater than the value of top, then push top in minStack\n //else push the value in minStack\n this.mainStack.push(value)\n\n if (value > this.minStack.getTop() && !this.minStack.isEmpty())\n this.minStack.push(this.minStack.getTop())\n else\n this.minStack.push(value)\n \n }", "enqueue(val, priority) {\n if (!val || priority < 0) return false;\n\n const newNode = new Node(val, priority),\n VALS = this.values;\n\n // new node gets inserted at the end of the queue\n VALS.push(newNode);\n\n // if there's only one item, nothing else needs to be done\n if (VALS.length === 1) return this;\n\n // grab the index of the newly inserted node\n let nIdx = VALS.length - 1;\n\n while (true) {\n // calculate the new node's parent's index\n let pIdx = Math.floor((nIdx - 1) / 2);\n\n // as long as nIdx is greater than zero\n // (to prevent out-of-bound indices)\n // and the priority of the value at nIdx\n // is higher (i.e. the number is smaller)\n if (nIdx && VALS[nIdx].priority < VALS[pIdx].priority) {\n // keep swapping and recalculating indices\n this.swapNodes(pIdx, nIdx);\n nIdx = pIdx;\n } else return this;\n }\n }", "insert(key, value) {\n let index = this.makeHash(key);\n let bucket = this.storage[index];\n let item = new Node(key, value);\n \n // Create a new bucket if none exist\n if (!bucket) {\n bucket = new List(item);\n this.storage[index] = bucket; \n bucket.count++;\n this.count++;\n \n return 'New bucket created';\n } \n else {\n let current = bucket.head;\n \n // If the head has null next it is there is only one node in the list\n if (!current.next) {\n current.next = item;\n }\n else {\n // move to the end of the list\n while(current.next) {\n current = current.next;\n }\n \n current.next = item;\n }\n bucket.count++;\n this.count++;\n \n return 'New item placed in bucket at position ' + bucket.count;\n }\n }", "insert(index, value) {\n const newNode = new Node(value);\n const leader = this.traverseToIndex(index);\n const holdingPointer = leader.next;\n leader.next = newNode;\n newNode.next = holdingPointer;\n this.length++;\n \n }", "push (value) {\n const newNode = new Node(value)\n\n if (this.length === 0) {\n this.top = newNode\n this.bottom = newNode\n } else {\n newNode.next = this.top\n this.top = newNode\n }\n\n this.length++\n // this.printStack()\n }", "modify(item, priority) {\n let location = this.locations.get(this.hash(item));\n\n if (location === null || location === undefined)\n throw Error(\"This object doesn't exist in the heap\");\n\n // remove and re-add\n let heapItem = this.heap.splice(location, 1);\n this.locations.delete(this.hash(heapItem));\n\n // modify\n if (this.priorityName) {\n heapItem = item;\n heapItem[this.priorityName] = priority;\n }\n else\n heapItem = priority;\n\n // add to beginning and sink\n this.heap.unshift(item);\n this.locations.set(this.hash(item), 0);\n this.heapify(0);\n }", "insert(value) {\n let swapCompleted = false;\n const newNode = new BinarySearchTree(value);\n let root = this;\n \n while (!swapCompleted) {\n if (root.value >= value) {\n if (!root.left) {\n root.left = newNode;\n swapCompleted = true;\n }\n root = root.left;\n } else {\n if (!root.right) {\n root.right = newNode;\n swapCompleted = true;\n }\n root = root.right;\n } \n }\n return newNode; \n }", "push(val) {\n if (this.top == this.length - 1)\n return -999;\n this.stack[++this.top] = val;\n return 1;\n }", "function setToHeap(){\n addStep(\"Current Node \" + (currentHeapPosition + 1) + \" is less than or equal to it's parent node \" + (heapParentIndex + 1) + \" the node is now in the heap proper.\");\n setClass(nodes[heapParentIndex], 2, \"Relevant\");\n setClass(nodes[currentHeapPosition], 2, \"Relevant\");\n heapSize++;\n makeHeapStep = 1;\n}", "function insert(store, value, maxQueueSize) {\n return store(store => {\n return keys(store).then(keys => {\n if (keys.length >= maxQueueSize) {\n return;\n }\n\n // We insert with an incremented key so that the entries are popped in order\n store.put(value, Math.max(...keys, 0) + 1);\n return promisifyRequest(store.transaction);\n });\n });\n}", "insert(value) {\n if (!value) { return 'Please pass a value to be added'; }\n const newNode = new Node(value, this.head);\n this.head = newNode;\n return this;\n }", "insert(index,value) {\n if (index < 0 || index>this.length){\n throw new Error('Index error')\n }\n if (this.length >= this._capacity){\n \n this._resize((this.length + 1)*Array.SIZE_RATIO)\n \n }\n Memory.copy(this.ptr+index+1,this.ptr+index,this.length-index)\n this.length ++\n this.set(index,value)\n \n }", "insert(ind, val) {\n let nodeAtIndex = this.get(ind);\n let nodeAtPriorIndex = this.get(ind - 1);\n let newNode = new Node(val);\n\n if (ind > length || ind < 0 || this.length === 0) return;\n if (nodeAtIndex && nodeAtPriorIndex) {\n nodeAtPriorIndex.next = newNode;\n newNode.next = nodeAtIndex;\n this.length += 1;\n return true;\n } else if (!nodeAtIndex && nodeAtPriorIndex) {\n !!this.push(val);\n } else if (nodeAtIndex && !nodeAtPriorIndex) {\n !!this.unshift(val);\n }\n }", "push(val) {\n this._storage[this._length] = val; \\\n this._length++;\n }", "heapUp(index) {\n if (index <= 0) return;\n \n const parentIndex = this.parentIndex(index);\n if (this.store[index].key < this.store[parentIndex].key) {\n this.swap(index, parentIndex);\n this.heapUp(parentIndex);\n }\n }", "insert(index, value) {\n if (index < 0 || index >= this.length) {\n throw new Error(\"Index error\");\n }\n if (this.length >= this._capacity) {\n this._resize((this.length + 1) * Array.SIZE_RATIO);\n }\n memory.copy(this.ptr + index + 1, this.ptr + index, this.length - index);\n memory.set(this.ptr + index, value);\n this.length++;\n }", "insert(index, value) {\n if(index < 0 || index >= this.length) {\n throw new Error('Index error')\n }\n if(this.length >= this._capacity) {\n this._resize((this.length + 1) * this.ARRAY_SIZE_RATIO)\n }\n memory.copy(this.ptr + index + 1, this.ptr + index, this.length - index)\n //[1,2,3] ==> [1,2,2,3]\n memory.set(this.ptr + index, value)\n //[1, value, 2, 3]\n this.length++\n }", "replace(/*MinHeapNode*/ root) {\n this.harr[0] = root;\n this.heapify(0);\n }", "insert(element) {\n this.values.push(element)\n this._bubbleUp()\n }", "enqueue(value, priority) {\n let newElement = new Node(value, priority);\n if (!this.root) {\n this.root = newElement;\n return this;\n }\n\n const queue = new Queue(this.root);\n while (queue.peek()) {\n // loop while there are not empty spaces | ensures that the queue is as compact as possible\n const node = queue.dequeue();\n if (node.left) queue.enqueue(node.left);\n else {\n // I can insert on the left\n newElement.parent = node;\n node.left = newElement;\n this._updateLowestPriority(newElement);\n this._bubbleUp(newElement);\n return this;\n }\n if (node.right) queue.enqueue(node.right);\n else {\n //I can insert on the right\n newElement.parent = node;\n node.right = newElement;\n this._updateLowestPriority(newElement);\n this._bubbleUp(newElement);\n return this;\n }\n }\n }", "enqueue(element, priority){\n var newElement = new QueueEntry(element, priority);\n var valueExists = false; \n\n for(var i = 0; i < this.items.length; i++){\n if(this.items[i].priority > newElement.priority) {\n this.items.splice(i, 0, newElement);\n valueExists = true; \n break; \n }\n }\n if(!valueExists){\n this.items.push(newElement);\n }\n }", "insert(value){\n let node = new Node(value);\n node.next = this.head;\n this.head = node;\n }", "push(val){\n var newNode = new Node(val);\n if(this.isEmpty()){\n this.top = newNode;\n this.bottom = newNode;\n }\n else{\n newNode.next = this.top;\n this.top = newNode;\n }\n this.length++;\n return this;\n }", "insert(data) {\n const node = new Node(data, this.head);\n this.head = node;\n }", "insert(priority, data) {\n this.fpq.add({priority, data});\n }", "push(val) {\n\n\n }", "function insertSorted(arr, val) {\n arr.push(val);\n var i = arr.length - 1;\n while (i > 0 && arr[i - 1] > val) {\n arr[i] = arr[i - 1];\n i--;\n }\n arr[i] = val;\n}", "insert(index, val){\n if(index < 0 || index > this.length) return undefined;\n if(index === 0) return !!this.unshifting(val);\n if(index === this.length) return !!this.push(val);\n \n let newNode = new Node(val);\n let beforeNode = this.get(index-1);\n let afterNode = beforeNode.next;\n\n beforeNode.next = newNode;\n newNode.prev = beforeNode;\n afterNode.prev = newNode;\n newNode.next = afterNode;\n\n this.length++;\n console.log(true);\n }", "insert(key, obj)\r\n {\r\n this.#table[int(this.#hash(key) & this.#divisor)].push(new HashEntry(key, obj));\r\n this.#count++;\r\n }", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "push(value) {\n const newNode = new Node(value);\n //validamos si el stack está vacio\n if (this.length === 0) {\n this.top = newNode;\n this.bottom = newNode;\n } else {\n /**\n * al agregar un nuevo elemento, el node que en este momento esta en el top debe dejar de ser el top y el nuevo elemento\n * se convertirá en el top\n */\n const holdingPointer = this.top;\n //el newNode se convierte en el top del stack\n this.top = newNode;\n //top.next representa al nodo que está debajo del top\n this.top.next = holdingPointer;\n }\n\n this.length++;\n\n return this;\n }", "insert(index, value) {\n if (index >= this.length) {\n return this.append(value);\n }\n\n const node = new Node(value);\n const leader = this.traverseToIndex(index - 1);\n const holdingPointer = leader.next;\n leader.next = node;\n node.next = holdingPointer;\n this.length++;\n return this.printList();\n }", "insert(index, value) {\n if (index < 0 || index > this.length) {\n return false;\n } else if (index === 0) {\n return this.unshift(value);\n } else if (index === this.length) {\n return this.push(value);\n } else {\n const newNode = new Node(value);\n let prev = this.get(index - 1);\n let curr = prev.next;\n prev.next = newNode;\n newNode.next = curr;\n this.length++;\n return this;\n }\n }", "buildHeap(left, right) {\r\n var x = this.values[left];\r\n var i = left;\r\n\r\n while(true) {\r\n let j = 2 * i;\r\n if (j > right) break;\r\n if ((j < right) && (Item.compare(this.values[j + 1], this.values[j]) >= 0)) {\r\n j++;\r\n }\r\n\r\n if (Item.compare(x, this.values[j]) >= 0) break;\r\n let temp = this.values[i];\r\n this.values[i] = this.values[j];\r\n this.values[j] = temp;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n i = j;\r\n }\r\n\r\n this.values[i] = x;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n }", "push(value) {\n ListNode.link(this.tail.prev, new ListNode(value));\n this.length ++;\n }", "push(value) {\n if (this.size == 0) {\n this.front = new LinkedListNode(value);\n this.back = this.front;\n } else {\n this.back.next = new LinkedListNode(value);\n this.back = this.back.next;\n }\n this.size++;\n }", "insert(k, v) {\n var index = getIndexBelowMaxForKey(k, this._limit);\n if (Array.isArray(this._storage[index])) {\n var oldIndex = this._storage[index].findIndex(function(pair) {\n return pair[0] === k; \n });\n if (oldIndex >= 0) {\n this._storage[index][oldIndex].splice(1, 1, v);\n } else if (oldIndex === -1) {\n this._storage[index].push([k, v]);\n }\n\n } else {\n this._storage[index] = [[k, v]]; \n }\n //constant if no collision else linear\n }", "push(val){\n let newNode = new Node(val);\n if(!this.first) {\n this.first = newNode;\n this.last = newNode;\n } else {\n let oldFirst = this.first;\n this.first = newNode;\n this.first.next = oldFirst;\n }\n return ++this.size; \n }", "insert(key, value) {\n let hash = hashFunction(key);\n if(this.table[hash] === null) {\n this.table[hash] = new LinkedData(key, value);\n return true;\n }\n else {\n let head = this.table[hash];\n while(head.next !== null) head = head.next;\n head.next = new LinkedData(key, value);\n return true;\n }\n }" ]
[ "0.863833", "0.8331561", "0.8072703", "0.8005249", "0.7808851", "0.7681502", "0.7637742", "0.75567305", "0.75504696", "0.7541238", "0.751654", "0.74698555", "0.7361416", "0.734068", "0.71542877", "0.7149954", "0.71396136", "0.7095043", "0.70502484", "0.70256126", "0.6946853", "0.6905115", "0.6869419", "0.68442136", "0.6833562", "0.6806596", "0.6759595", "0.67296135", "0.67260015", "0.672379", "0.6701905", "0.66944844", "0.6634053", "0.6627262", "0.65436083", "0.6518966", "0.65167624", "0.65120023", "0.6511806", "0.6501889", "0.6496654", "0.64791894", "0.64579725", "0.6454874", "0.6441015", "0.64368397", "0.6416161", "0.64151984", "0.64044183", "0.636769", "0.6365101", "0.6362858", "0.6360245", "0.63431966", "0.6339929", "0.6310419", "0.6301537", "0.6274993", "0.62709904", "0.6270006", "0.62691367", "0.62672734", "0.6252719", "0.6249277", "0.62226737", "0.6209372", "0.6204512", "0.6164609", "0.61596674", "0.6158491", "0.615456", "0.61528337", "0.61496437", "0.61493427", "0.6148515", "0.6139815", "0.6139669", "0.61382455", "0.613205", "0.6104002", "0.6099081", "0.6098917", "0.6087798", "0.6074264", "0.6071602", "0.6064767", "0.6057246", "0.60561955", "0.6055963", "0.6055622", "0.6047691", "0.60388327", "0.60331166", "0.6027156", "0.6023851", "0.6023145", "0.6022469", "0.601703", "0.6014558", "0.6013258" ]
0.765279
6
remove a specific value from the heap
remove(data) { const size = this.heap.length; let i; for (i = 0; i < size; i++) { if (data === this.heap[i]) { break; } } [this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]]; this.heap.splice(size - 1); for (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) { this.minHeapify(this.heap, this.heap.length, i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n // Swap root value with last element in the heap\n // Pop the last element from heap array\n // Perform siftDown to correct position of swapped value\n // Return popped value\n this.swap(0, this.heap.length - 1, this.heap);\n const valueToRemove = this.heap.pop();\n this.siftDown(0, this.heap.length - 1, this.heap);\n \n return valueToRemove;\n }", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "removeMin() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "remove() {\n if (this.isEmpty()) return;\n this.swap(0, this.store.length - 1);\n const { value } = this.store.pop();\n if (!this.isEmpty()) this.heapDown(0);\n return value;\n }", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "remove(element,comparator=this.compare){\r\n let totalOccurenceOfElement=this.find(element,comparator).length;\r\n for(let i=0;i<totalOccurenceOfElement;i++){\r\n let removeIndex=this.heapContainer.findIndex((x)=> comparator.equal(x,element)); // findIndex is used for finding first found element's index\r\n let heapSize=this.heapContainer.length;\r\n // if the element is at last index simply remove it as we\r\n // don't need to haepify\r\n if(removeIndex===heapSize-1){\r\n this.heapContainer.pop();\r\n }\r\n else{\r\n this.heapContainer[removeIndex]=this.heapContainer[heapSize-1]; \r\n this.heapContainer.pop();\r\n let parentElement=this.getParent(removeIndex);\r\n let elementAtRemovedIndex=this.heapContainer[removeIndex];\r\n // if at index where the element is removed does not have a parent element that means it was on root and we cannot go up to heapify and alternately if the parent element\r\n // is in right order as compare to the new element that is moved to removed index that means we dont' have to take care of upper part of heap as if it is i right position to parent than it will also be in correct position to it's\r\n // parent's parent and we have used hasLeftChild because we only need to heapify down if there exists element in \r\n // down side\r\n if(!parentElement || this.isPairInRightOrder(parentElement,elementAtRemovedIndex) && this.hasLeftChild(removeIndex)){\r\n this.heapifyDown(removeIndex);\r\n }\r\n else{\r\n this.heapifyUp(removeIndex);\r\n }\r\n }\r\n \r\n }\r\n return this;\r\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "delMin() {\n /*\n * Save reference to the min key.\n * Swap the min key with the last key in the heap.\n * Decrement n so that the key does not swim back up the heap.\n * Sink down the heap to fix any violations that have arisen.\n * Delete the min key to prevent loitering, and return its reference.\n */\n let min = this.heap[1];\n\n [this.heap[1], this.heap[this.n]] = [this.heap[this.n], this.heap[1]];\n this.n--;\n this.sink(1);\n this.heap[this.n+1] = null;\n\n return min;\n }", "remove(item) {\n // Find number of items to remove.\n const numberOfItemsToRemove = this.find(item).length;\n\n for (let iteration = 0; iteration < numberOfItemsToRemove; iteration += 1) {\n // We need to find item index to remove each time after removal since\n // indices are being changed after each heapify process.\n const indexToRemove = this.find(item).pop();\n\n // If we need to remove last child in the heap then just remove it.\n // There is no need to heapify the heap afterwards.\n if (indexToRemove === this.heapContainer.length - 1) {\n this.heapContainer.pop();\n } else {\n // Move last element in heap to the vacant (removed) position.\n this.heapContainer[indexToRemove] = this.heapContainer.pop();\n\n // Get parent.\n const parentItem = this.parent(indexToRemove);\n\n // If there is no parent or parent is in correct order with the node\n // we're going to delete then heapify down. Otherwise heapify up.\n if (\n this.hasLeftChild(indexToRemove) &&\n (!parentItem || parentItem <= this.heapContainer[indexToRemove])\n ) {\n this.heapifyDown(indexToRemove);\n } else {\n this.heapifyUp(indexToRemove);\n }\n }\n }\n\n return this;\n }", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "pop(){\r\n if (this.top === -1){\r\n return undefined;\r\n }else{\r\n delete this.storage[this.top];\r\n this.top -= 1;\r\n }\r\n }", "pop(value) {\n if (!this.length) {\n return null;\n }\n const deletedValue = this.stackData.pop();\n this.length--;\n if (!this.length) {\n this.bottom = null;\n this.top = null;\n }\n return deletedValue;\n }", "heapDown(index) {\n const [leftIndex, rightIndex] = this.children(index);\n \n if (!leftIndex && !rightIndex) return;\n\n let min;\n rightIndex ? min = rightIndex : min = leftIndex;\n if ((leftIndex && rightIndex) &&\n this.store[leftIndex].key < this.store[rightIndex].key) {\n min = leftIndex;\n }\n\n if (this.store[index].key > this.store[min].key) {\n this.swap(index, min);\n this.heapDown(min);\n }\n }", "removeNode (value) {\n this.nodes.delete(value)\n this.nodes.forEach(node => {\n if (node.includes(value)) {\n let newNodes = node.filter(item => item !== value)\n while (node.length > 0) {\n node.pop()\n }\n newNodes.forEach(item => node.push(item))\n }\n })\n }", "remove(key) {\n this.storage.set(getIndexBelowMax(key), undefined);\n }", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "removeByValue (value) {\n\t\tthis.remove(this.findFirst(value));\n\t}", "function remove() {\n var index = Math.floor(Math.random() * values.length);\n console.log(\"DEL \" + values[index]);\n tree.remove(values[index]);\n values.splice(index, 1);\n}", "delete(value) {\n if (this.head.back === this.head && this.head.value === value) {\n this.head = null;\n } else {\n let temp = this.head;\n\n while (temp.value !== value) {\n if (temp.forward.value <= temp.value) {\n return false;\n }\n temp = temp.forward;\n }\n\n temp.back.forward = temp.forward;\n temp.forward.back = temp.back;\n\n if (temp === this.head) {\n this.head = temp.forward;\n }\n\n delete this.temp;\n }\n this.size--;\n return true;\n }", "pop() {\n //delete the current top values within the stack\n delete this.items[this.top];\n //deduct 1 from the top to show the new top index\n this.top = this.top -1;\n }", "extract() {\n\t\tif (this.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (this.size() === 1) {\n\t\t\treturn this.heap.shift();\n\t\t}\n\t\tconst removedValue = this.heap[0];\n\t\tthis.heap[0] = this.heap.pop();\n\t\tthis.siftDown(0);\n\t\treturn removedValue;\n\t}", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "remove(key) {\n\n // getIndexBelowMax(this.storage[key]);\n }", "remove(value) {\n if (this.head === null) return;\n\n if (this.head.data === value) this.removeFirst();\n\n let prev = this.head;\n let cur = this.head;\n while (cur !== null && cur.data !== value) {\n prev = cur;\n cur = cur.next;\n }\n if (cur !== null) prev.next = cur.next;\n }", "function pqdownheap(tree, k) {\n\t\tvar v = heap[k],\n\t\t\tj = k << 1; // left son of k\n\n\t\twhile (j <= heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < heap_len && SMALLER(tree, heap[j + 1], heap[j])) {\n\t\t\t\tj++;\n\t\t\t}\n\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (SMALLER(tree, v, heap[j])) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t}", "remove(value) {\n let currentNode = this.head;\n\n if (currentNode !== null) {\n if (currentNode.data == value) {\n this.head = currentNode.next;\n this.size--;\n } else {\n let previousNode;\n\n while (currentNode && currentNode.data !== value) {\n previousNode = currentNode;\n currentNode = currentNode.next;\n }\n\n if (currentNode && previousNode) {\n previousNode.next = currentNode.next;\n this.size--;\n } else {\n return `Given ${value} value not found !!!`;\n }\n }\n }\n }", "delete(val) {\n let ind = this.values.indexOf(val)\n if(this.has(val)) {\n this.values.splice(ind, 1);\n }\n }", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "removekey(value) {\n\n this.root = this.remove(this.root, value)\n\n }", "remove() {\n if (this.isEmpty()) throw new Error('Queue is empty!');\n const value = this.first.value;\n this.first = this.first.next;\n this.size--;\n return value;\n }", "function pop(arr, value) {\n var index = arr.indexOf(value);\n if (index > -1) {\n arr.splice(index, 1);\n }\n return arr;\n}", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "removeValue(value) {\n\t\tlet currentNode = this.head\n\t\tlet index = 0\n\n\t\twhile (value != currentNode.value) {\n\t\t\tcurrentNode = currentNode.next\n\t\t\tindex++\n\t\t}\n\t\treturn this.remove(index)\n\t}", "removeNode() {\n let root;\n if (!this.data.length) {\n return;\n }\n if (this.data.length === 1) {\n root = this.data.pop();\n } else {\n root = this.data[0];\n this.data[0] = this.data[this.data.length - 1];\n this.data = this.data.slice(0, this.data.length - 1);\n }\n\n this.usage.delete(root);\n this.heapifyDown(0);\n this.store.setItem(this.key + \"_searchData\", this.data);\n this.store.setItem(this.key + \"_searchUsageMap\", this.usage);\n return root;\n }", "function remove(root, value) {\n //Exits and link updating/traversal is similar to \"put\"\n if (root == null) return null;\n\n if (value < root.value) root.left = remove(root.left, value);\n else if (value > root.value) root.right = remove(root.right, value);\n else {\n\n //Cases: 0, 1 or multiple children\n //0: Drop parent link\n //1: Linked list style, replace parent\n //2: Find successor of t, delete minimum in t's right subtree, x in t's original spot\n\n if (root.right == null) return root.left;\n if (root.left == null) return root.right;\n var t = _.cloneDeep(root);\n root = min(t.right);\n root.right = deleteMin(t.right);\n root.left = t.left;\n }\n root.size = size(root.left) + size(root.right) + 1;\n return root;\n}", "remove(value) {\n this.root = this.removeVisitor(this.root, value)\n }", "siftDown(index) {\n\t\tlet element = index;\n\t\tconst left = this.getLeftIndex(index);\n\t\tconst right = this.getRightIndex(index);\n\t\tconst size = this.size();\n\t\tif (\n\t\t\tleft < size &&\n\t\t\tthis.compareFn(this.heap[element], this.heap[left]) ===\n\t\t\t\tCompare.BIGGER_THAN\n\t\t) {\n\t\t\telement = left;\n\t\t}\n\t\tif (\n\t\t\tright < size &&\n\t\t\tthis.compareFn(this.heap[element], this.heap[right]) ===\n\t\t\t\tCompare.BIGGER_THAN\n\t\t) {\n\t\t\telement = right;\n\t\t}\n\t\tif (index !== element) {\n\t\t\tswap(this.heap, index, element);\n\t\t\tthis.siftDown(element);\n\t\t}\n\t}", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "remove(value) {\n this.root = this.removeNode(thisroot, value);\n }", "remove(value) {\n let currentNode = this.head;\n\n while (currentNode.next.value !== value) {\n currentNode = currentNode.next;\n }\n const removed = currentNode.next.value;\n currentNode.next = currentNode.next.next;\n return removed;\n }", "pop(value){\n if(!this.first) return null;\n var removed;\n if(this.length===1){\n removed = this.first;\n this.first= null;\n this.last = null\n }\n else {\n removed = this.first;\n this.first= this.first.next;\n \n }\n this.length--;\n return removed;\n\n }", "pop(){\n if (!this.head) {\n return null;\n }\n var removed = this.head.value;\n this.head = this.head.next;\n this.length--;\n return removed;\n }", "modify(item, priority) {\n let location = this.locations.get(this.hash(item));\n\n if (location === null || location === undefined)\n throw Error(\"This object doesn't exist in the heap\");\n\n // remove and re-add\n let heapItem = this.heap.splice(location, 1);\n this.locations.delete(this.hash(heapItem));\n\n // modify\n if (this.priorityName) {\n heapItem = item;\n heapItem[this.priorityName] = priority;\n }\n else\n heapItem = priority;\n\n // add to beginning and sink\n this.heap.unshift(item);\n this.locations.set(this.hash(item), 0);\n this.heapify(0);\n }", "function minheap_extract(heap) {\n swap(heap,0,heap.length - 1);\n var to_pop = heap.pop();\n var parent = 0;\n var child = parent * 2 + 1;\n while(child < heap.length){\n if(child + 1 < heap.length && heap[child] > heap[child + 1]){\n child = child + 1;\n }\n if(heap[child] < heap[parent]){\n swap(heap,child,parent);\n parent = child;\n child = parent * 2 + 1; \n }\n else{\n break;\n }\n }\n return to_pop;\n // STENCIL: implement your min binary heap extract operation\n}", "remove(key) {\r\n const hash = this.calculateHash(key);\r\n if(this.values.hasOwnProperty(hash) && this.values[hash].hasOwnProperty(key)) {\r\n delete this.values[hash][key];\r\n this.numberOfValues--;\r\n }\r\n }", "remove(k) {\n var index = getIndexBelowMaxForKey(k, this._limit);\n var indexBucket = this._storage.get(index);\n for (var i = 0; i < indexBucket.length; i ++) {\n if (indexBucket[i][0] === k) {\n return indexBucket.splice(i, 1);\n }\n }\n }", "remove(val) {\n let index = this.head;\n\n while (index != null) {\n if (index.val == val) {\n index.prev.next = index.next;\n index.next.prev = index.prev;\n this.size -= 1;\n return this;\n }\n\n index = index.next;\n }\n }", "insert(value) {\n // Insert value to the end of array\n // Perform siftUp to correct position of value in the heap tree\n this.heap.push(value);\n this.siftUp(this.heap.length - 1, this.heap);\n }", "extractMin() {\r\n\t\tconst min = this.heap[0];\r\n\t\tthis.remove(min);\r\n\t\treturn min;\r\n\t}", "dequeue() {\n const [next] = this.values;\n this.values[0] = this.values.pop();\n let childLeft, childRight;\n let curr = 0;\n while (true) {\n let childLeftIdx = 2 * curr + 1;\n let childRightIdx = childLeft + 1;\n let swap = null;\n if (childLeftIdx < this.values.length) {\n childLeft = this.values[childLeftIdx];\n if (childLeft.priority > this.values[curr].priority) {\n swap = childLeft;\n }\n\n if (childRightIdx < this.values.length) {\n childRight = this.values[childRight];\n if (\n (swap === null &&\n childRight.priority < this.values[curr].priority) ||\n (swap !== null && childRight < childLeft.priority)\n ) {\n swap = childRightIdx;\n }\n }\n\n if (swap === null) break;\n const temp = this.values[curr];\n this.values[curr] = this.values[swap];\n this.values[swap] = temp;\n curr = swap;\n }\n }\n }", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "remove(tree){\n let replaceWith;\n if(this.left && this.right){\n const next = this.right.getLeftmostChild();\n this.low = next.low;\n this.high = next.high;\n this.intervals = next.intervals;\n this.removeUpdateLimits();\n next.handleRemoval(tree); \n }else{\n this.handleRemoval(tree);\n }\n }", "pop(val) {\n const lastValIndex = this._length - 1;\n if (lastValIndex >= 0) {\n const lastVal = this._storage[lastValIndex];\n delete this._storage[lastValIndex];\n this._length--;\n return lastVal;\n }\n return false;\n }", "function heap(a, lo, hi) {\n var n = hi - lo,\n i = (n >>> 1) + 1;\n while (--i > 0) sift(a, i, n, lo);\n return a;\n }", "remove(value) {\n if (this.size == 0) throw new Error('Linked list is empty');\n if (this.front.value == value) {\n this.front = this.front.next;\n if (this.size == 1) {\n this.back = this.front;\n }\n this.size--;\n return value;\n }\n let curr = this.front;\n while (curr.next) {\n if (curr.next.value == value) {\n curr.next = curr.next.next;\n if (this.back.value == value) {\n this.back = curr;\n }\n this.size--;\n return value;\n } else {\n curr = curr.next; \n }\n }\n return null; \n }", "static removeValue(array, value) {\n for (var tI = array.length - 1; tI >= 0; tI--) {\n if (array[tI] === value) {\n array.splice(tI, 1);\n return tI;\n }\n }\n }", "function heapDown(i) {\n\t var w = heapWeight(i)\n\t while(true) {\n\t var tw = w\n\t var left = 2*i + 1\n\t var right = 2*(i + 1)\n\t var next = i\n\t if(left < heapCount) {\n\t var lw = heapWeight(left)\n\t if(lw < tw) {\n\t next = left\n\t tw = lw\n\t }\n\t }\n\t if(right < heapCount) {\n\t var rw = heapWeight(right)\n\t if(rw < tw) {\n\t next = right\n\t }\n\t }\n\t if(next === i) {\n\t return i\n\t }\n\t heapSwap(i, next)\n\t i = next \n\t }\n\t }", "function heapDown(i) {\n\t var w = heapWeight(i)\n\t while(true) {\n\t var tw = w\n\t var left = 2*i + 1\n\t var right = 2*(i + 1)\n\t var next = i\n\t if(left < heapCount) {\n\t var lw = heapWeight(left)\n\t if(lw < tw) {\n\t next = left\n\t tw = lw\n\t }\n\t }\n\t if(right < heapCount) {\n\t var rw = heapWeight(right)\n\t if(rw < tw) {\n\t next = right\n\t }\n\t }\n\t if(next === i) {\n\t return i\n\t }\n\t heapSwap(i, next)\n\t i = next \n\t }\n\t }", "removeByValue(value) {\n return this.delete(this.getIndexOf(value));\n }", "function pqdownheap(s, tree, k) // deflate_state *s;\n // ct_data *tree; /* the tree to restore */\n // int k; /* node to move down */\n {\n var v = s.heap[k];\n var j = k << 1;\n /* left son of k */\n\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n\n\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n /* Exchange v with the smallest son */\n\n\n s.heap[k] = s.heap[j];\n k = j;\n /* And continue down the tree, setting j to the left son of k */\n\n j <<= 1;\n }\n\n s.heap[k] = v;\n }", "function pqdownheap(s, tree, k) // deflate_state *s;\n // ct_data *tree; /* the tree to restore */\n // int k; /* node to move down */\n {\n var v = s.heap[k];\n var j = k << 1;\n /* left son of k */\n\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n\n\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n /* Exchange v with the smallest son */\n\n\n s.heap[k] = s.heap[j];\n k = j;\n /* And continue down the tree, setting j to the left son of k */\n\n j <<= 1;\n }\n\n s.heap[k] = v;\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "Remove(int, int) {\n\n }", "swim(k) {\n while (k > 1 && this.heap[Math.floor(k/2)].priority > this.heap[k].priority) {\n /*\n * While not at root node, swap k (parent) with k/2 (child) if\n * parent > child. Continue swimming upwards until the invariant holds.\n */\n [this.heap[k], this.heap[Math.floor(k/2)]]\n = [this.heap[Math.floor(k/2)], this.heap[k]];\n k = Math.floor(k / 2);\n }\n }", "remove(index_num){\n if(index_num<0 || index_num>=this.length) return undefined;\n if(index_num===0) return this.shift();\n if(index_num===this.length-1) return this.pop();\n\n let before_position = this.get(index_num-1); // 1. we neet to find item at the position one before!!\n let removed = before_position.next;\n before_position.next = removed.next;\n this.length -=1;\n console.log(\"REMOVE - true\");\n return removed;\n }", "remove(val) {\n\n }", "remove(index) {\n // accept an index.\n // check if the index is less than zero greate than the length and return undefined. \n if(index < 0 || index > this.length) { \n return undefined;\n }\n // if this index is the same as the length - -1 pop\n if(index === this.length - 1 ) { \n return this.pop();\n }\n // if the index is 0 shift. \n if(index === 0) {\n return this.shift();\n }\n // get the node before the target index. \n let beforeTargetNode = this.get(index - 1);\n // set the nedxt prop to the beforeNode to the next of the removednNode. \n let targetNode = this.get(index);\n beforeTargetNode.next = targetNode.next;\n // Decrement the length\n this.length--;\n // return the value of the removedNode\n return targetNode;\n }", "remove(key) {\n let hash = this.hash(key);\n let slot = this.internalArray[hash];\n\n while (slot && slot.key !== key) {\n slot = this.internalArray[++hash % this.INTERNAL_ARRAY_SIZE];\n }\n\n if (slot) {\n const temp = slot.value;\n this.internalArray[hash % this.INTERNAL_ARRAY_SIZE] = null;\n this.counter--;\n this.reHash();\n return temp;\n } else {\n return undefined;\n }\n }", "function heapDown(i) {\n var w = heapWeight(i)\n while(true) {\n var tw = w\n var left = 2*i + 1\n var right = 2*(i + 1)\n var next = i\n if(left < heapCount) {\n var lw = heapWeight(left)\n if(lw < tw) {\n next = left\n tw = lw\n }\n }\n if(right < heapCount) {\n var rw = heapWeight(right)\n if(rw < tw) {\n next = right\n }\n }\n if(next === i) {\n return i\n }\n heapSwap(i, next)\n i = next \n }\n }", "extractMax() {\r\n\t\tconst max = this.heap[0];\r\n\t\tthis.remove(max);\r\n\t\treturn max;\r\n\t}", "pop() {\n if (!this.first)\n return null;\n const nodeToRemove = this.first;\n this.first = this.first.next;\n this.size--;\n return nodeToRemove.value;\n }", "function pqdownheap(s, tree, k) // deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1;\n /* left son of k */\n\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n\n\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n /* Exchange v with the smallest son */\n\n\n s.heap[k] = s.heap[j];\n k = j;\n /* And continue down the tree, setting j to the left son of k */\n\n j <<= 1;\n }\n\n s.heap[k] = v;\n}", "delete(i) {\n\t\tea && assert(i > 0);\n\t\tif (!this.contains(i)) return;\n\t\tlet j = this.itemAt(this.#m--);\n\t\tif (i != j) {\n\t\t\tif (this.#key[j] <= this.#key[i])\n\t\t\t\tthis.siftup(j, this.#pos[i]);\n\t\t\telse\n\t\t\t\tthis.siftdown(j, this.#pos[i]);\n\t\t}\n\t\tthis.#pos[i] = 0;\n\t}", "remove() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : this.step || 1;\n this.value -= step;\n if (this.value < this.min) {\n this.value = this.min || 0;\n }\n this.setValue(this.value);\n }", "remove(index) {\n //if index > length or smaller then zero then return false\n if (index >= this.length || index < 0) {\n return undefined;\n }\n //if index is equal to 0 then add a new element in front {use unshifting method}\n if (index === 0) {\n return this.shifting();\n\n } else\n //if index is equal to length then add a new element in last {use push method }\n if (this.length === index - 1) {\n return this.pop();\n\n }\n //store the index-1 node as pervious and index-node[to be removed node] as a deletenode\n let previousnode = this.get(index - 1);\n let deletenode = previousnode.next;\n //point the previous node ------> deletenodes.next \n /* [ 12 ----> 34 -----> 45] set the pointer of 12 ---> to point the 45 // instead of 34 \n [ 12 -----> 45] \n */\n previousnode.next = deletenode.next;\n //decreament the list return the value\n this.length--;\n return deletenode.val;\n\n }", "remove() {\n\t\tif(!this.head) return null;\n\t\tlet currentNode = this.head;\n\t\tlet data= this.head.value;\n\t\tlet holdingPointer;\n\t\tif (!this.head.next){\n\t\t\tthis.head = null;\n\t\t\tthis.length--;\n\t\t\treturn data;\n\t\t}\n\t\tif (currentNode){\n\t\t\twhile(currentNode.next){\n\t\t\t\tholdingPointer = currentNode;\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\t\t\tdata = currentNode.value\n\t\t\tholdingPointer.next = null;\n\t\t}\n\t\tthis.length--;\n\t\treturn data;\n\t}", "heapUp(index) {\n if (index <= 0) return;\n \n const parentIndex = this.parentIndex(index);\n if (this.store[index].key < this.store[parentIndex].key) {\n this.swap(index, parentIndex);\n this.heapUp(parentIndex);\n }\n }", "removeNodesWithValue(value) {\n if(!this.head || value === undefined) return\n\n let curr = this.head, next\n while(curr) {\n next = curr.next\n if(curr.value === value) {\n this.remove(curr)\n }\n curr = next\n }\n }", "dequeue() {\n if (this.count === 0) {\n return 0;\n }\n var firstIdx = Object.keys(this.storage)[0];\n var itemToRemove = this.storage[firstIdx];\n delete this.storage[firstIdx];\n this.count -= 1;\n return itemToRemove;\n }", "remove(key) {\n const index = getIndexBelowMax(key.toString(), this.limit);\n const bucket = this.storage.get(index);\n if (Array.isArray(bucket)) {\n for (let i = 0; i < bucket.length; i++) {\n const objKey = bucket[i][0];\n if (objKey === key) {\n bucket.splice(i, 1);\n }\n }\n }\n }", "function pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n {\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n }", "siftUp(currentIdx, heap) {\n // Get parentNode index of node at currentIdx\n let parentIdx = Math.floor((currentIdx - 1) / 2);\n\n // While not at root index\n // Compare value at parentIdx and currentIdx\n // If currentNode < parentNode\n // Peform swap\n // re-calculate currentIdx and parentIdx \n while (currentIdx > 0 && heap[currentIdx] < heap[parentIdx]) {\n this.swap(currentIdx, parentIdx, heap);\n currentIdx = parentIdx;\n parentIdx = Math.floor((currentIdx - 1) / 2);\n }\n }", "function removeAt(arr, value) {\n return arr[value]\n}", "remove (index) {\n if (index < 0 || index > this.length) {\n return undefined\n } \n if (index === this.length - 1) {\n return this.pop()\n }\n if (index === 0) {\n return this.shift()\n }\n\n let preceedingNode = this.get(index-1);\n let nodeToRemove = preceedingNode.next; \n let suceedingNode = nodeToRemove.next; \n\n preceedingNode.next = suceedingNode; \n\n this.length --; \n return nodeToRemove; \n }", "remove(index) {\n if (index < 0 || index >= this.length) {\n return undefined;\n }\n if (index === this.length - 1) {\n return this.pop();\n } else if (index === 0) {\n return this.shift();\n }\n\n let temp = this.get(index - 1);\n let value = temp.next.val;\n temp.next = temp.next.next;\n this.length--;\n return value;\n }", "function pqdownheap(s, tree, k)\n // deflate_state *s;\n // ct_data *tree; /* the tree to restore */\n // int k; /* node to move down */\n {\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n \n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n \n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n }", "dequeue() {\n if (this.tail > this.head) {\n const value = this.storage[this.head];\n delete this.storage[this.head];\n this.head++;\n return value;\n } else {\n return null;\n }\n }", "remove(value) {\n let currentNode = this.head;\n if (this.head.value === value) {\n const temp = this.head.value;\n this.head = this.head.next;\n return temp;\n }\n\n while (currentNode.next.value !== value) {\n currentNode = currentNode.next;\n }\n currentNode.next = currentNode.next.next;\n return this;\n }", "function pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) {\n break;\n }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}", "function pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}", "function pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}" ]
[ "0.80592644", "0.77889985", "0.75571394", "0.75185335", "0.748075", "0.7324977", "0.7206284", "0.7075653", "0.7057192", "0.7057192", "0.6849966", "0.67913896", "0.66329116", "0.65866756", "0.6565453", "0.64938587", "0.64443773", "0.6443872", "0.6382864", "0.6373806", "0.6357709", "0.6350169", "0.6332954", "0.6317014", "0.62710875", "0.62187046", "0.6216089", "0.6203261", "0.6201298", "0.61842114", "0.61689556", "0.61539835", "0.61407435", "0.6133388", "0.6132453", "0.6129202", "0.6108502", "0.6099573", "0.60843486", "0.60737276", "0.60718113", "0.60718113", "0.60718113", "0.60718113", "0.60718113", "0.60666966", "0.60665596", "0.6058164", "0.6049195", "0.60429686", "0.60404", "0.6023055", "0.60160947", "0.6009156", "0.6007376", "0.6004896", "0.5996282", "0.5996102", "0.59758496", "0.5973461", "0.59704137", "0.59700686", "0.5965413", "0.59643286", "0.5958306", "0.5946714", "0.5946714", "0.59446526", "0.5936152", "0.5929253", "0.59167844", "0.59134245", "0.5908944", "0.59053135", "0.5899812", "0.5892232", "0.5884444", "0.58840156", "0.58808446", "0.5876673", "0.58673143", "0.586059", "0.586007", "0.5859727", "0.5854545", "0.5854215", "0.58511186", "0.5847839", "0.5843176", "0.58408517", "0.5836378", "0.5836216", "0.58347714", "0.58316725", "0.5830266", "0.5823108", "0.58197206", "0.5816738", "0.5810445", "0.5810445" ]
0.771712
2
returns the max value from the heap
findMin() { return this.heap[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findMax() {\r\n\t\treturn this.heap[0];\r\n\t}", "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "extractMax() {\r\n\t\tconst max = this.heap[0];\r\n\t\tthis.remove(max);\r\n\t\treturn max;\r\n\t}", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "maxValue() {\n let currNode = this.top;\n let maxValue = this.top.value;\n \n while (currNode.next) {\n if (currNode.next.value > maxValue) maxValue = currNode.next.value;\n currNode = currNode.next;\n }\n \n return maxValue;\n }", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "function maxHeapify(arr){\n\n}", "extractMax() {\n const max = this.values[0];\n const end = this.values.pop();\n this.values[0] = end;\n this.sinkDown();\n return max;\n }", "function max() {\n // set node to the root value\n var node = this.root;\n // loop until there is no more values to the right\n while( node.right != null ) {\n node = node.right; // move to the right value\n } // end while\n return node.data;\n} // end max", "extractMax() {\n // swap the first value in the values property with the last value\n // pop from the values property, so you can return the value at the end.\n // 'sink down' to the correct spot\n const max = this.values[0];\n const end = this.values.pop();\n if (this.values.length > 0) {\n this.values[0] = end;\n // move it to the correct position\n this.bubbleDown();\n }\n return max;\n }", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let index = 0\n let element = this.values[index]\n // repeat until neither child is greater than the element\n while(true) {\n let swapped = null\n let leftIndex = 2 * index + 1\n let rightIndex = 2 * index + 2\n if (leftIndex < this.values.length) {\n if(this.values[leftIndex] > element) {\n swapped = leftIndex\n }\n }\n if (rightIndex < this.values.length) {\n if( (!swapped && this.values[rightIndex] > element || !!swapped && this.values[rightIndex] > this.values[leftIndex])) {\n swapped = rightIndex\n }\n }\n if (swapped===null) break\n this.values[index] = this.values[swapped]\n this.values[swapped] = element\n index = swapped\n }\n return max\n }", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "maxHeap(index) {\n var left = this.left(index);\n var right = this.right(index);\n var largest = index;\n if (left < this.heapSize && this.array[left] > this.array[index]) {\n largest = left;\n }\n if (right < this.heapSize && this.array[right] > this.array[largest]) {\n largest = right;\n }\n if (largest != index) {\n this.swap(this.array, index, largest);\n this.maxHeap(largest);\n }\n }", "max() {\n let currentNode = this.root;\n // continue traversing right until no more children\n while(currentNode.right) {\n currentNode = currentNode.right;\n }\n return currentNode.value;\n }", "function BSTMax(){\n var walker = this.root;\n while (walker.right != null){\n walker = walker.right;\n }\n return walker.val;\n }", "extractMax() {\n let values = this.values;\n if (values.length === 0) return;\n let max = values[0];\n // For time complexity reasons, I swap first then remove the old root node\n values[0] = values[values.length - 1];\n values.pop();\n console.log(values);\n // instatiate child nodes\n let child1, child2, indexToSwap;\n let currentIndex = 0;\n while (true) {\n child1 = currentIndex * 2 + 1;\n child2 = currentIndex * 2 + 2;\n if (values[currentIndex] >= Math.max(values[child1], values[child2])) {\n break;\n }\n indexToSwap = values[child1] > values[child2] ? child1 : child2;\n if (!values[indexToSwap]) break;\n let oldNode = values[currentIndex];\n values[currentIndex] = values[indexToSwap];\n values[indexToSwap] = oldNode;\n currentIndex = indexToSwap;\n }\n this.values = values;\n return max;\n }", "extractMax(){\n const max = this.values.shift();\n let current = this.values.pop();\n if(this.values.length > 0){\n this.values.unshift(current);\n this.sinkDown();\n }\n return max;\n }", "findMaxValue() {\n\n let current = this.root;\n\n const findMax = (node) => {\n if (node === null) {\n return;\n }\n\n let actualMax = node.value;\n let leftSideMax = findMax(node.left);\n let rightSideMax = findMax(node.right);\n\n if (leftSideMax > actualMax) {\n actualMax = leftSideMax;\n }\n\n if (rightSideMax > actualMax) {\n actualMax = rightSideMax;\n }\n\n return actualMax;\n };\n\n return findMax(current);\n }", "extractMax() {\n const max = this.values[0]\n const end = this.values.pop()\n\n if (this.values.length > 0) {\n this.values[0] = end\n this._sinkDown()\n }\n\n return max\n }", "max() {\n let currentNode = this.root;\n // Case for no root\n if(!currentNode) {\n throw new Error('This tree does not yet contain any values');\n return;\n }\n while(currentNode.right) {\n currentNode = currentNode.right;\n }\n return currentNode.value;\n }", "max() {\r\n return this.maxHelper(this.root);\r\n }", "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "function findMax(stack) {\n var maxSize = 0;\n var max = null;\n for (var i = 0; i < stack.length; i++) {\n var peasant = stack[i];\n if (peasant.size > maxSize) {\n maxSize = peasant.size;\n max = peasant;\n }\n }\n\n return max;\n}", "getMax() {\n let values = [];\n let current = this.head;\n\n // collect all values in the list\n while (current) {\n values.push(current.value);\n\n current = current.next;\n }\n\n return values.length === 0 ? null : Math.max(...values);\n }", "maximum() {\n if (this.isEmpty()) {\n return null;\n }\n\n return this.doMaximum(this.root).key;\n }", "max(){\r\n if(this.isEmpty()){\r\n console.log(\"Tree is empty!\");\r\n return null;\r\n }\r\n let runner = this.root;\r\n while(runner.right != null){\r\n runner = runner.right;\r\n }\r\n return runner.value;\r\n }", "extractMax(){\r\n if(this.values.length === 1) return this.values.pop();\r\n const oldRoot = this.values[0];\r\n this.values[0] = this.values[this.values.length-1];\r\n this.values.pop();\r\n let idx = 0;\r\n let child1 = (2*idx) + 1;\r\n let child2 = (2*idx) + 2;\r\n\r\n while(this.values[idx] < this.values[child1] || \r\n this.values[idx] < this.values[child2]){\r\n child1 = (2*idx) + 1;\r\n child2 = (2*idx) + 2;\r\n if(this.values[child1] >= this.values[child2]){\r\n let temp = this.values[child1];\r\n this.values[child1] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child1;\r\n } else {\r\n let temp = this.values[child2];\r\n this.values[child2] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child2;\r\n }\r\n }\r\n return oldRoot;\r\n }", "get maximumValue() {\r\n return this.i.bk;\r\n }", "function MaxPriorityQueue(array){\r\n MaxHeap.call(this, array)\r\n}", "function max(arr){\n return sortNumbers(arr)[arr.length - 1];\n }", "findMaxNode() {\n if (this.head == null && this.tail == null) {\n return undefined;\n }\n\n var runner = this.head\n var temp = runner\n while (runner != null) {\n if ( temp.value < runner.value ){\n temp = runner\n }\n runner = runner.next;\n \n }\n return temp;\n }", "maximum() {\n // Write your code here\n\tvar max = this.arr[0];\n\tfor(var i=0;i<this.arr.length;i++){\n\t\tif(max>this.arr[i]){\n\t\t max = max;\n\t\t}else{\n\t\t\tmax = this.arr[i];\n\t\t}\n\t}\n\treturn max;\n }", "get maximumValue() {\n return this.i.bk;\n }", "function maxValue (arr) {\r\n// liefert die indexnummer des elmentes im array 'arr' mit dem groessten wert\r\n var maxV;\r\n if (arr.length > 0) { // wenn das array ueberhaupt elemente enthaelt\r\n maxV = 0;\r\n for (i = 1; i < arr.length; i++) {\r\n if (arr[i]>arr[maxV]) { maxV = i; }\r\n }\r\n } else {\r\n maxV = null\r\n }\r\n return maxV; \r\n}", "function buildMaxHeap() {\n for (let i = Math.floor(array.length / 2) - 1; i >= 0; i--) {\n maxHeapify(i, array.length);\n }\n}", "findMax() {\n let current = this.root;\n // Loop until the rightmost node (no right subtree).\n while (current.right !== null) {\n current = current.right;\n }\n return current.data;\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "function largest(){\r\n // parse arguments into an array\r\n var args = [].slice.call(arguments);\r\n var maxNum = 0;\r\n\r\n // .. do something with each element of args\r\n args.forEach(function(value,idx,list) {\r\n if (value > maxNum) {\r\n maxNum = value;\r\n }\r\n });\r\n\r\n return maxNum;\r\n\r\n}", "function findMax(array){\n if(array.length === 1) {\n return array[0];\n }\n var lastValue = array.pop();\n var currentMax = findMax(array);\n if(currentMax < lastValue){\n return lastValue;\n } else {\n return currentMax;\n }\n // if(findMax(array) < lastValue){\n // return lastValue;\n // } else {\n // return findMax(array);\n // }\n}", "function largest(array){\r\n\treturn Math.max.apply(Math,array);\r\n}", "static maxHeapify(a, i) {\n let left = Heap.left(i);\n let right = Heap.right(i);\n\n // Find largest node between current, left and right\n let largest;\n if (left < a.heap_size && a[left] > a[i])\n largest = left;\n else\n largest = i;\n\n if (right < a.heap_size && a[right] > a[largest])\n largest = right;\n\n // Move current element to 'largest' position, and\n // continue until the element is positioned correctly\n if (largest != i) {\n let temp = a[i];\n a[i] = a[largest];\n a[largest] = temp;\n\n Heap.maxHeapify(a, largest);\n }\n }", "findMaximumValue(root = this.root) {\n // what does it mean to find the max?\n // traverse, and check against \"last max\"\n\n // base case: root is null\n if (!root) return;\n\n // base case: root has no children\n let rootMax = root.val;\n let leftMax, rightMax;\n\n if (root.left) leftMax = this.findMaximumValue(root.left);\n\n if (root.right) rightMax = this.findMaximumValue(root.right);\n\n // rootMax, leftMax and rightMax\n // compare them all and just return the\n // \"true max\"\n let max = rootMax;\n\n if (leftMax > max) max = leftMax;\n if (rightMax > max) max = rightMax;\n\n return max;\n }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "get max() { return this._max; }", "function secondLargestElement(tree) {\n var current = tree;\n var previous = tree.value;\n\n while (current) {\n if (current.left && !current.right) {\n previous = Math.max(current.value, previous);\n current = current.left;\n } else if (current.right) {\n previous = Math.max(current.value, previous);\n current = current.right;\n } else if (!current.right && !current.left) {\n return Math.min(previous, current.value);\n }\n\n }\n}", "function getHighest($array){\n var biggest = Math.max.apply( null, $array );\n return biggest;\n}", "get max() {\n\t\treturn this.__max;\n\t}", "function max(data) {\n var n = data[0];\n\n for (var i = 1; i < data.length; i++) {\n n = data[i] > n ? data[i] : n;\n }\n\n return n;\n}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "function maxHeapify(arr, length, parent) {\n var largest = parent;\n var leftChild = 2 * parent + 1;\n var rightChild = 2 * parent + 2;\n\n if (leftChild < length && arr[leftChild] > arr[largest]) {\n largest = leftChild;\n }\n\n if (rightChild < length && arr[rightChild] > arr[largest]) {\n largest = rightChild;\n }\n\n if (largest != parent) {\n var temp = arr[largest];\n arr[largest] = arr[parent];\n arr[parent] = temp;\n\n maxHeapify(arr, length, largest);\n }\n}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function MAX(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'MAX[]', e2, e1);\n }\n\n stack.push(Math.max(e1, e2));\n }", "getMax() {\n return this.storage[0];\n }", "getMax() {\n return this.storage[0];\n }", "function HighestNmb(arr) {\n return Math.max.apply(null, arr);\n}", "function max(arr){\n\tvar max = arr[0];\n\tfor (var i =0 ; i < arr.length-1 ; i++){\n\t\tif (maxNum < arr[i]){\n\t\t\treturn arr[i];\n\t\t}\n\t}\n\treturn maxNum;\n}", "max() {}", "function max(x,y){\nif (x>y){\n\treturn x\n}else{\n\treturn y\n}}", "function MAX(state) {\n const stack = state.stack;\n const e2 = stack.pop();\n const e1 = stack.pop();\n\n if (exports.DEBUG) console.log(state.step, 'MAX[]', e2, e1);\n\n stack.push(Math.max(e1, e2));\n}", "function max(array) {\n\tvar currentmax = array[0];\n\tarray.forEach(function(element) {\n\t\tif(element > currentmax) {\n\t\t\tcurrentmax = element;\n\t\t}\n\t});\n\treturn currentmax;\n}", "function MAX(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (DEBUG) console.log(state.step, 'MAX[]', e2, e1);\n\n stack.push(Math.max(e1, e2));\n}", "function findMax(node) {\n if (node == null) return 0;\n\n let res = node.value;\n let lres = findMax(node.left);\n let rres = findMax(node.right);\n\n if (lres > res) res = lres;\n if (rres > res) res = rres;\n return res;\n}", "static getMax2(array) {\n let max = -Infinity;\n for (let i = 0; i < array.length; i++) {\n if (array[i] > max) {\n max = array[i]\n }\n }\n return max\n }", "buildMaxHeap() {}", "function max(x) {\n var value = x[0];\n for (var i = 1; i < x.length; i++) {\n if (x[i] > value) {\n value = x[i];\n }\n }\n return value;\n}", "get max() {\n return this.args.max || null;\n }", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "extractMax() {\n let extracted = this.values[0]\n let end = this.values.pop()\n if (this.values.length > 0) {\n this.values[0] = end\n this.sinkDown()\n }\n return extracted\n }", "findMax() {\n\n // It will keep the last data until current right is null\n let current = this.root;\n while (current.right !== null) {\n current = current.right;\n }\n\n return current.data;\n }", "function max(arr) {\n var m = -Infinity;\n\n for(var i=0; i< arr.length; i++)\n if(arr[i] > m) m = arr[i];\n return m;\n}", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "function maxHeapify(arr , n , i)\n\t{\n\t\n\t\t// Find largest of node and its children\n\t\tif (i >= n) {\n\t\t\treturn;\n\t\t}\n\t\tvar l = i * 2 + 1;\n\t\tvar r = i * 2 + 2;\n\t\tvar max;\n\t\tif (l < n && arr[l] > arr[i]) {\n\t\t\tmax = l;\n\t\t} else\n\t\t\tmax = i;\n\t\tif (r < n && arr[r] > arr[max]) {\n\t\t\tmax = r;\n\t\t}\n\n\t\t// Put maximum value at root and\n\t\t// recur for the child with the\n\t\t// maximum value\n\t\tif (max != i) {\n\t\t\tvar temp = arr[max];\n\t\t\tarr[max] = arr[i];\n\t\t\tarr[i] = temp;\n\t\t\tmaxHeapify(arr, n, max);\n\t\t}\n\t}", "function getMaxVal(valArr) {\n if(!valArr){\n\treturn null;\n }\n\n var max = valArr[0];\n for(var i = 1; i < valArr.length; i++){\n\tif(valArr[i] > max){\n\t max = valArr[i];\n\t}\n }\n\n return max;\n}", "function nMax(){\n var arr=[-3,3,5,7];\n var max= arr[0];\n for(var i = 0; i< arr.length; i++){\n if(arr[i]>max){\n max=arr[i];\n arr.splice(max);\n }\n }\n for(var i=0; i<arr.length;i++){\n if(arr[i]>max){\n max=arr[i];\n \n }\n }\n console.log(max);\n return max;\n }", "function max_element(n, metric){\n var m = metric(n[0]), b = n[0];\n for(var i = 1; i < n.length; i++){\n var v = metric(n[i]);\n if(v > m){\n m = v;\n b = n[i];\n }\n }\n return b;\n}", "getHead() {\n return this.maxheap[1]\n }", "function maxtable(){\n var maximum = Math.max.apply(null, tabValue);\n console.log(tabValue);\n tabValue = [];\n console.log(\"sending value to node.js : \" + maximum);\n return maximum;\n}", "function max() {\n var maxValue = arguments[0];\n for (var i = 0; i < arguments.length; i++) {\n if (arguments[i] > maxValue) {\n maxValue = arguments[i];\n }\n }\n return maxValue;\n}", "maxToBack(){\n var runner = this.head;\n var max = this.head\n var prevnode = this.head\n var maxprev = null\n while (runner != null) {\n if (runner.val > max.val) {\n max = runner;\n maxprev = prevnode\n }\n prevnode = runner\n runner = runner.next\n }\n prevnode.next = max\n maxprev.next = max.next\n max.next = null;\n }", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "function maxHeap(array, n, i) {\n let largest = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if (left < n && array[left] > array[largest]) {\n largest = left;\n }\n\n // If right child is larger than largest so far\n if (right < n && array[right] > array[largest]) {\n largest = right;\n }\n\n // If largest is not root\n if (largest != i) {\n let swap = array[i];\n array[i] = array[largest];\n array[largest] = swap;\n\n // Recursively heapify the affected sub-tree\n maxHeap(array, n, largest);\n }\n}", "function getMax() {\n var max = Math.max.apply(null, config.values);\n max += 10 - max % 10;\n return max;\n console.log(max);\n }", "function maxOf(array){\n if(array.length === 1){\n return array[0]\n } else{\n return Math.max(array.pop(), maxOf(array))\n }\n}", "function max(x) { \n // assert x != null;\n if (x.right == null || x.right == undefined) \n \treturn x; \n else\n \treturn max(x.right); \n }", "function maximum(array, max = Number.MIN_SAFE_INTEGER){\n if(array.length === 0)\n return max;\n else{\n let x = array.pop();\n if(x > max) max = x;\n return maximum(array, max);\n }\n}", "get max() {\r\n return this._max\r\n }", "function heap_root(input, i) { \n var left = 2 * i + 1; \n var right = 2 * i + 2; \n var max = i; \n \n if (left < array_length && input[left] > input[max]) { \n max = left; \n } \n \n if (right < array_length && input[right] > input[max]) { \n max = right; \n } \n \n if (max != i) { \n swap(input, i, max); \n heap_root(input, max); \n } \n}", "function YLightSensor_get_highestValue()\n { var json_val = this._getAttr('highestValue');\n return (json_val == null ? Y_HIGHESTVALUE_INVALID : Math.round(json_val/6553.6) / 10);\n }", "function max(x, y) {\n return lte(x, y) ? y : x;\n }", "function max(x,y){\n if(x>y){\n return x\n } else {\n return y\n }\n}", "max() {\n let current = this.root\n if (current == null)\n return null\n while (current.right != null)\n current = current.right\n return current.content\n }", "function maxHeapify(idx, hSize) {\n let largest;\n const left = (2 * idx) + 1;\n const right = (2 * idx) + 2;\n if (left < hSize && array[left] > array[idx]) {\n largest = left;\n } else {\n largest = idx;\n }\n if (right < hSize && array[right] > array[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n const temp = array[idx];\n array[idx] = array[largest];\n array[largest] = temp;\n maxHeapify(largest, hSize);\n }\n}", "function max(){\n return Math.max.apply(null, arguments)\n }", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function findNextHighest() {\n var temp = highest;\n while (numStore[highest] === undefined) {\n highest = highest - 1;\n }\n return highest;\n }" ]
[ "0.84279215", "0.82991564", "0.7957347", "0.78086686", "0.7646159", "0.7423833", "0.73725516", "0.7348753", "0.72745484", "0.72237366", "0.72114444", "0.7197894", "0.7177174", "0.7163383", "0.7146565", "0.70919085", "0.70852536", "0.70802695", "0.7070464", "0.7062798", "0.7037336", "0.7013775", "0.6969921", "0.6968393", "0.6965604", "0.69146156", "0.6899203", "0.686", "0.6844688", "0.6844106", "0.6824768", "0.6817568", "0.6816355", "0.68104315", "0.67739224", "0.67003083", "0.6676564", "0.66745853", "0.6662407", "0.6651277", "0.6637021", "0.66293", "0.66171575", "0.6610276", "0.6610276", "0.6610276", "0.6610276", "0.6610276", "0.6610276", "0.6599275", "0.65978974", "0.6584784", "0.6583263", "0.6577867", "0.65719116", "0.6570493", "0.65587115", "0.65565866", "0.65565866", "0.65549755", "0.652271", "0.6509924", "0.6507809", "0.6497283", "0.6490893", "0.64908534", "0.6488649", "0.6472934", "0.6471766", "0.6469162", "0.6465769", "0.64610565", "0.6457766", "0.64513665", "0.6445873", "0.6439046", "0.64361554", "0.64356595", "0.6434895", "0.6434795", "0.6427546", "0.6426731", "0.64243734", "0.6418554", "0.64181", "0.64164275", "0.6413261", "0.6412956", "0.64123935", "0.6404784", "0.6402987", "0.640093", "0.63978416", "0.6397023", "0.63945687", "0.6381715", "0.63789654", "0.63782084", "0.63776886", "0.63776886", "0.63760304" ]
0.0
-1
removes the max value from the heap
removeMin() { this.remove(this.heap[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "extractMax() {\r\n\t\tconst max = this.heap[0];\r\n\t\tthis.remove(max);\r\n\t\treturn max;\r\n\t}", "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "remove() {\n // Swap root value with last element in the heap\n // Pop the last element from heap array\n // Perform siftDown to correct position of swapped value\n // Return popped value\n this.swap(0, this.heap.length - 1, this.heap);\n const valueToRemove = this.heap.pop();\n this.siftDown(0, this.heap.length - 1, this.heap);\n \n return valueToRemove;\n }", "function maxHeapify(arr){\n\n}", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "function nMax(){\n var arr=[-3,3,5,7];\n var max= arr[0];\n for(var i = 0; i< arr.length; i++){\n if(arr[i]>max){\n max=arr[i];\n arr.splice(max);\n }\n }\n for(var i=0; i<arr.length;i++){\n if(arr[i]>max){\n max=arr[i];\n \n }\n }\n console.log(max);\n return max;\n }", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "delMin() {\n /*\n * Save reference to the min key.\n * Swap the min key with the last key in the heap.\n * Decrement n so that the key does not swim back up the heap.\n * Sink down the heap to fix any violations that have arisen.\n * Delete the min key to prevent loitering, and return its reference.\n */\n let min = this.heap[1];\n\n [this.heap[1], this.heap[this.n]] = [this.heap[this.n], this.heap[1]];\n this.n--;\n this.sink(1);\n this.heap[this.n+1] = null;\n\n return min;\n }", "function deleteMax(h) { \n if (isRed(h.left))\n h = rotateRight(h);\n\n if (h.right == null || h.right == undefined)\n return null;\n\n if (!isRed(h.right) && !isRed(h.right.left))\n h = moveRedRight(h);\n\n h.right = deleteMax(h.right);\n\n return balance(h);\n }", "heapDown(index) {\n const [leftIndex, rightIndex] = this.children(index);\n \n if (!leftIndex && !rightIndex) return;\n\n let min;\n rightIndex ? min = rightIndex : min = leftIndex;\n if ((leftIndex && rightIndex) &&\n this.store[leftIndex].key < this.store[rightIndex].key) {\n min = leftIndex;\n }\n\n if (this.store[index].key > this.store[min].key) {\n this.swap(index, min);\n this.heapDown(min);\n }\n }", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "extractMax(){\n const max = this.values.shift();\n let current = this.values.pop();\n if(this.values.length > 0){\n this.values.unshift(current);\n this.sinkDown();\n }\n return max;\n }", "findMax() {\r\n\t\treturn this.heap[0];\r\n\t}", "extractMax(){\r\n if(this.values.length === 1) return this.values.pop();\r\n const oldRoot = this.values[0];\r\n this.values[0] = this.values[this.values.length-1];\r\n this.values.pop();\r\n let idx = 0;\r\n let child1 = (2*idx) + 1;\r\n let child2 = (2*idx) + 2;\r\n\r\n while(this.values[idx] < this.values[child1] || \r\n this.values[idx] < this.values[child2]){\r\n child1 = (2*idx) + 1;\r\n child2 = (2*idx) + 2;\r\n if(this.values[child1] >= this.values[child2]){\r\n let temp = this.values[child1];\r\n this.values[child1] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child1;\r\n } else {\r\n let temp = this.values[child2];\r\n this.values[child2] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child2;\r\n }\r\n }\r\n return oldRoot;\r\n }", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.minHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let index = 0\n let element = this.values[index]\n // repeat until neither child is greater than the element\n while(true) {\n let swapped = null\n let leftIndex = 2 * index + 1\n let rightIndex = 2 * index + 2\n if (leftIndex < this.values.length) {\n if(this.values[leftIndex] > element) {\n swapped = leftIndex\n }\n }\n if (rightIndex < this.values.length) {\n if( (!swapped && this.values[rightIndex] > element || !!swapped && this.values[rightIndex] > this.values[leftIndex])) {\n swapped = rightIndex\n }\n }\n if (swapped===null) break\n this.values[index] = this.values[swapped]\n this.values[swapped] = element\n index = swapped\n }\n return max\n }", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "extractMax() {\n let values = this.values;\n if (values.length === 0) return;\n let max = values[0];\n // For time complexity reasons, I swap first then remove the old root node\n values[0] = values[values.length - 1];\n values.pop();\n console.log(values);\n // instatiate child nodes\n let child1, child2, indexToSwap;\n let currentIndex = 0;\n while (true) {\n child1 = currentIndex * 2 + 1;\n child2 = currentIndex * 2 + 2;\n if (values[currentIndex] >= Math.max(values[child1], values[child2])) {\n break;\n }\n indexToSwap = values[child1] > values[child2] ? child1 : child2;\n if (!values[indexToSwap]) break;\n let oldNode = values[currentIndex];\n values[currentIndex] = values[indexToSwap];\n values[indexToSwap] = oldNode;\n currentIndex = indexToSwap;\n }\n this.values = values;\n return max;\n }", "buildMaxHeap() {}", "maxToBack(){\n var runner = this.head;\n var max = this.head\n var prevnode = this.head\n var maxprev = null\n while (runner != null) {\n if (runner.val > max.val) {\n max = runner;\n maxprev = prevnode\n }\n prevnode = runner\n runner = runner.next\n }\n prevnode.next = max\n maxprev.next = max.next\n max.next = null;\n }", "function MaxPriorityQueue(array){\r\n MaxHeap.call(this, array)\r\n}", "maxHeap(index) {\n var left = this.left(index);\n var right = this.right(index);\n var largest = index;\n if (left < this.heapSize && this.array[left] > this.array[index]) {\n largest = left;\n }\n if (right < this.heapSize && this.array[right] > this.array[largest]) {\n largest = right;\n }\n if (largest != index) {\n this.swap(this.array, index, largest);\n this.maxHeap(largest);\n }\n }", "function buildMaxHeap() {\n for (let i = Math.floor(array.length / 2) - 1; i >= 0; i--) {\n maxHeapify(i, array.length);\n }\n}", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "extractMax() {\n const max = this.values[0];\n const end = this.values.pop();\n this.values[0] = end;\n this.sinkDown();\n return max;\n }", "remove() {\n if (this.isEmpty()) return;\n this.swap(0, this.store.length - 1);\n const { value } = this.store.pop();\n if (!this.isEmpty()) this.heapDown(0);\n return value;\n }", "static maxHeapify(a, i) {\n let left = Heap.left(i);\n let right = Heap.right(i);\n\n // Find largest node between current, left and right\n let largest;\n if (left < a.heap_size && a[left] > a[i])\n largest = left;\n else\n largest = i;\n\n if (right < a.heap_size && a[right] > a[largest])\n largest = right;\n\n // Move current element to 'largest' position, and\n // continue until the element is positioned correctly\n if (largest != i) {\n let temp = a[i];\n a[i] = a[largest];\n a[largest] = temp;\n\n Heap.maxHeapify(a, largest);\n }\n }", "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\n }\n\n for (let endOfHeap = array.length - 1; endOfHeap >= 0; endOfHeap--) { // 2) loop from end of maxHeap to begin/left, and \"delete\" max val until heap region is \"empty\"\n [array[endOfHeap], array[0]] = [array[0], array[endOfHeap]]; // 3) swap the root of the heap with the last element of the heap, this shrinks the heap by 1 and grows the sorted array by 1\n\n console.log(array);\n\n heapify(array, endOfHeap, 0); // 4) sift down the new root, but not past the end of the heap\n }\n\n return array;\n}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function heapSort(array){\n // 1: Construction\n let heap = new MaxHeap()\n array.forEach(ele => {\n heap.insert(ele)\n });\n\n// 2: sortdown \n let sorted = []\n while (heap.array.length > 1){\n sorted.push(heap.deleteMax())\n }\n return sorted\n}", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "dequeue (){\n // let removedRoot = this.values[0];\n //replace with last added value\n //TEACHERS SOLUTION\n const min = this.values[0];\n const end = this.values.pop();\n //EDGE CASE IF NOTHING LEFT IN\n if(this.values.length > 0){\n //LINE 97 CAUSES A FOREVER LOOP WITH THE LAST ELEMENT IF WE DON'T ADD THE CONDITIONAL, BECAUSE WE REASSIGN THE ROOT TO BE END (WHICH WAS THE ORIGINAL ROOT IF THERE'S ONLY ONE ELEMENT)\n this.values[0] = end;\n //START TRICKLE DOWN\n this.sinkDown();\n }\n \n \n return min;\n }", "remove(key) {\n this.storage.set(getIndexBelowMax(key), undefined);\n }", "extractMax() {\n // swap the first value in the values property with the last value\n // pop from the values property, so you can return the value at the end.\n // 'sink down' to the correct spot\n const max = this.values[0];\n const end = this.values.pop();\n if (this.values.length > 0) {\n this.values[0] = end;\n // move it to the correct position\n this.bubbleDown();\n }\n return max;\n }", "function maxHeapify(arr, length, parent) {\n var largest = parent;\n var leftChild = 2 * parent + 1;\n var rightChild = 2 * parent + 2;\n\n if (leftChild < length && arr[leftChild] > arr[largest]) {\n largest = leftChild;\n }\n\n if (rightChild < length && arr[rightChild] > arr[largest]) {\n largest = rightChild;\n }\n\n if (largest != parent) {\n var temp = arr[largest];\n arr[largest] = arr[parent];\n arr[parent] = temp;\n\n maxHeapify(arr, length, largest);\n }\n}", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "maxToBack(){\n // your code here\n var runner = this.head\n var max = runner\n while (runner.next != null){\n if (runner.next.value > max.value){\n max = runner.next\n }\n runner = runner.next\n }\n var temp = runner.value\n runner.value = max.value\n max.value = temp\n return this\n }", "function heapifyStandart(currentIndex, heapSize ,arr){\n\n var largestElement = currentIndex\n var leftIndex = 2 * currentIndex + 1\n var rightIndex = 2 * currentIndex + 2\n\n if (leftIndex < heapSize && arr[currentIndex] < arr[leftIndex]){\n largestElement = leftIndex\n }\n \n if (rightIndex < heapSize && arr[largestElement] < arr[rightIndex]){\n largestElement = rightIndex\n }\n\n if (largestElement != currentIndex){\n swapArrayElement(currentIndex, largestElement, arr)\n heapifyStandart(largestElement, heapSize, arr)\n }\n}", "static buildMaxHeap(a) {\n a.heap_size = a.length;\n\n // Max-heapify the first n/2 elements as\n // they are tree nodes, and the remaining are\n // usually tree leaves\n let mid = parseInt(a.length / 2);\n for (let i = mid; i >= 0; i -= 1) {\n Heap.maxHeapify(a, i);\n }\n }", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "function heap_root(input, i) { \n var left = 2 * i + 1; \n var right = 2 * i + 2; \n var max = i; \n \n if (left < array_length && input[left] > input[max]) { \n max = left; \n } \n \n if (right < array_length && input[right] > input[max]) { \n max = right; \n } \n \n if (max != i) { \n swap(input, i, max); \n heap_root(input, max); \n } \n}", "function heapDown(i) {\n\t var w = heapWeight(i)\n\t while(true) {\n\t var tw = w\n\t var left = 2*i + 1\n\t var right = 2*(i + 1)\n\t var next = i\n\t if(left < heapCount) {\n\t var lw = heapWeight(left)\n\t if(lw < tw) {\n\t next = left\n\t tw = lw\n\t }\n\t }\n\t if(right < heapCount) {\n\t var rw = heapWeight(right)\n\t if(rw < tw) {\n\t next = right\n\t }\n\t }\n\t if(next === i) {\n\t return i\n\t }\n\t heapSwap(i, next)\n\t i = next \n\t }\n\t }", "function heapDown(i) {\n\t var w = heapWeight(i)\n\t while(true) {\n\t var tw = w\n\t var left = 2*i + 1\n\t var right = 2*(i + 1)\n\t var next = i\n\t if(left < heapCount) {\n\t var lw = heapWeight(left)\n\t if(lw < tw) {\n\t next = left\n\t tw = lw\n\t }\n\t }\n\t if(right < heapCount) {\n\t var rw = heapWeight(right)\n\t if(rw < tw) {\n\t next = right\n\t }\n\t }\n\t if(next === i) {\n\t return i\n\t }\n\t heapSwap(i, next)\n\t i = next \n\t }\n\t }", "function heapDown(i) {\n var w = heapWeight(i)\n while(true) {\n var tw = w\n var left = 2*i + 1\n var right = 2*(i + 1)\n var next = i\n if(left < heapCount) {\n var lw = heapWeight(left)\n if(lw < tw) {\n next = left\n tw = lw\n }\n }\n if(right < heapCount) {\n var rw = heapWeight(right)\n if(rw < tw) {\n next = right\n }\n }\n if(next === i) {\n return i\n }\n heapSwap(i, next)\n i = next \n }\n }", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "function heapSort(inputArr){\n var heap = new Heap;\n for(i=0; i<inputArr.length; i++){\n heap.add(inputArr[i])\n }\n var outputArr = []\n for(i=0; i<inputArr.length; i++){\n outputArr.push(heap.remove())\n }\n console.log(outputArr)\n return outputArr\n}", "function heapify(arr) {\n if (arr.length < 1) return arr\n for (let i = arr.length - 1; i >= 0; i--) {\n minHeapify(arr, i)\n }\n return arr\n}", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "function maxHeapify(idx, hSize) {\n let largest;\n const left = (2 * idx) + 1;\n const right = (2 * idx) + 2;\n if (left < hSize && array[left] > array[idx]) {\n largest = left;\n } else {\n largest = idx;\n }\n if (right < hSize && array[right] > array[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n const temp = array[idx];\n array[idx] = array[largest];\n array[largest] = temp;\n maxHeapify(largest, hSize);\n }\n}", "extractMax() {\n const max = this.values[0]\n const end = this.values.pop()\n\n if (this.values.length > 0) {\n this.values[0] = end\n this._sinkDown()\n }\n\n return max\n }", "async function MaxHeapify( i, heapSize)\n{\n\n let hasLeft = (2 * i + 1 < heapSize) ? true : false;\n let hasRight = (2 * i + 2 < heapSize) ? true : false;\n let l, r;\n let largest = i;\n if (hasLeft)\n l = arr[2 * i + 1].offsetHeight;\n if (hasRight)\n r = arr[2 * i + 2].offsetHeight;\n if (hasLeft && arr[i].offsetHeight < l)\n {\n largest = 2 * i + 1;\n }\n if (hasRight && arr[largest].offsetHeight < r)\n {\n largest = 2 * i + 2;\n }\n if (largest != i)\n {\n arr[i].style.backgroundColor='white';\n arr[largest].style.backgroundColor='green';\n await timer(delay);\n await swap(i, largest);\n arr[i].style.backgroundColor='red';\n arr[largest].style.backgroundColor='red';\n await MaxHeapify(largest, heapSize);\n }\n}", "remove(element,comparator=this.compare){\r\n let totalOccurenceOfElement=this.find(element,comparator).length;\r\n for(let i=0;i<totalOccurenceOfElement;i++){\r\n let removeIndex=this.heapContainer.findIndex((x)=> comparator.equal(x,element)); // findIndex is used for finding first found element's index\r\n let heapSize=this.heapContainer.length;\r\n // if the element is at last index simply remove it as we\r\n // don't need to haepify\r\n if(removeIndex===heapSize-1){\r\n this.heapContainer.pop();\r\n }\r\n else{\r\n this.heapContainer[removeIndex]=this.heapContainer[heapSize-1]; \r\n this.heapContainer.pop();\r\n let parentElement=this.getParent(removeIndex);\r\n let elementAtRemovedIndex=this.heapContainer[removeIndex];\r\n // if at index where the element is removed does not have a parent element that means it was on root and we cannot go up to heapify and alternately if the parent element\r\n // is in right order as compare to the new element that is moved to removed index that means we dont' have to take care of upper part of heap as if it is i right position to parent than it will also be in correct position to it's\r\n // parent's parent and we have used hasLeftChild because we only need to heapify down if there exists element in \r\n // down side\r\n if(!parentElement || this.isPairInRightOrder(parentElement,elementAtRemovedIndex) && this.hasLeftChild(removeIndex)){\r\n this.heapifyDown(removeIndex);\r\n }\r\n else{\r\n this.heapifyUp(removeIndex);\r\n }\r\n }\r\n \r\n }\r\n return this;\r\n }", "pop(){\r\n if (this.top === -1){\r\n return undefined;\r\n }else{\r\n delete this.storage[this.top];\r\n this.top -= 1;\r\n }\r\n }", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "heapify(/*index*/ i) {\n let l = this.left(i);\n let r = this.right(i);\n let biggest = i;\n if (l < this.heap_size && this.harr[i].element.compareByMulKeys(this.harr[l].element, this.compareValues) == -1)\n biggest = l;\n if (r < this.heap_size && this.harr[biggest].element.compareByMulKeys(this.harr[r].element, this.compareValues) == -1)\n biggest = r;\n if (biggest != i) {\n this.swap(this.harr, i, biggest);\n this.heapify(biggest);\n }\n }", "dequeue() {\n const [next] = this.values;\n this.values[0] = this.values.pop();\n let childLeft, childRight;\n let curr = 0;\n while (true) {\n let childLeftIdx = 2 * curr + 1;\n let childRightIdx = childLeft + 1;\n let swap = null;\n if (childLeftIdx < this.values.length) {\n childLeft = this.values[childLeftIdx];\n if (childLeft.priority > this.values[curr].priority) {\n swap = childLeft;\n }\n\n if (childRightIdx < this.values.length) {\n childRight = this.values[childRight];\n if (\n (swap === null &&\n childRight.priority < this.values[curr].priority) ||\n (swap !== null && childRight < childLeft.priority)\n ) {\n swap = childRightIdx;\n }\n }\n\n if (swap === null) break;\n const temp = this.values[curr];\n this.values[curr] = this.values[swap];\n this.values[swap] = temp;\n curr = swap;\n }\n }\n }", "function maxHeapify(arr , n , i)\n\t{\n\t\n\t\t// Find largest of node and its children\n\t\tif (i >= n) {\n\t\t\treturn;\n\t\t}\n\t\tvar l = i * 2 + 1;\n\t\tvar r = i * 2 + 2;\n\t\tvar max;\n\t\tif (l < n && arr[l] > arr[i]) {\n\t\t\tmax = l;\n\t\t} else\n\t\t\tmax = i;\n\t\tif (r < n && arr[r] > arr[max]) {\n\t\t\tmax = r;\n\t\t}\n\n\t\t// Put maximum value at root and\n\t\t// recur for the child with the\n\t\t// maximum value\n\t\tif (max != i) {\n\t\t\tvar temp = arr[max];\n\t\t\tarr[max] = arr[i];\n\t\t\tarr[i] = temp;\n\t\t\tmaxHeapify(arr, n, max);\n\t\t}\n\t}", "function minheap_extract(heap) {\n swap(heap,0,heap.length - 1);\n var to_pop = heap.pop();\n var parent = 0;\n var child = parent * 2 + 1;\n while(child < heap.length){\n if(child + 1 < heap.length && heap[child] > heap[child + 1]){\n child = child + 1;\n }\n if(heap[child] < heap[parent]){\n swap(heap,child,parent);\n parent = child;\n child = parent * 2 + 1; \n }\n else{\n break;\n }\n }\n return to_pop;\n // STENCIL: implement your min binary heap extract operation\n}", "function heapify(currentIndex, arr){\n\n if (isHavingChildrenLeft(currentIndex, arr)) {\n let parent = arr[currentIndex]\n\n if (isHavingChildrenRight(currentIndex, arr)){\n let maxChildren = Math.max(arr[currentIndex * 2 + 1], arr[currentIndex * 2 + 2])\n if (parent < maxChildren){\n let maxChilrenIndex = maxChildren == arr[currentIndex * 2 + 1] ? currentIndex * 2 + 1 : currentIndex * 2 + 2 \n swapArrayElement(currentIndex, maxChilrenIndex, arr)\n heapify(maxChilrenIndex, arr)\n }\n }else {\n if (parent < arr[currentIndex * 2 + 1]){\n swapArrayElement(currentIndex, currentIndex * 2 + 1, arr)\n heapify(currentIndex * 2 + 1, arr)\n }\n }\n }else {\n console.log(\"skipping index %d\", currentIndex)\n }\n}", "function extractMin(heap) {\n if (heap.length < 1) return null\n // swap first and last element\n let temp = heap[0]\n heap[0] = heap[heap.length-1]\n heap[heap.length-1] = temp\n\n const result = heap.pop()\n minHeapify(heap, 0)\n return result\n}", "function heapSort(arr){\n var sorted = [];\n var heap1 = new MaxHeap();\n \n for(let i=0; i<arr.length; i++){\n heap1.insert(arr[i]);\n }\n \n for(let i=0; i<arr.length; i++){\n sorted.push(heap1.delete());\n }\n return sorted;\n}", "maxHeapify(arr, n, i) {\r\n\t\tlet largest = i;\r\n\t\tlet leftIndex = 2 * i + 1;\r\n\t\tlet rightIndex = 2 * i + 2;\r\n\r\n\t\tif (leftIndex < n && arr[leftIndex] > arr[largest]) {\r\n\t\t\tlargest = leftIndex;\r\n\t\t}\r\n\t\tif (rightIndex < n && arr[rightIndex] > arr[largest]) {\r\n\t\t\tlargest = rightIndex;\r\n\t\t}\r\n\t\tif (largest != i) {\r\n\t\t\tlet temp = arr[i];\r\n\t\t\tarr[i] = arr[largest];\r\n\t\t\tarr[largest] = temp;\r\n\t\t\tthis.maxHeapify(arr, n, largest);\r\n\t\t}\r\n\t}", "function thirdLargestNode(tree) {\n tree.remove(tree._findMax().key);\n tree.remove(tree._findMax().key);\n return tree._findMax().key;\n}", "function maxHeap(array, n, i) {\n let largest = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if (left < n && array[left] > array[largest]) {\n largest = left;\n }\n\n // If right child is larger than largest so far\n if (right < n && array[right] > array[largest]) {\n largest = right;\n }\n\n // If largest is not root\n if (largest != i) {\n let swap = array[i];\n array[i] = array[largest];\n array[largest] = swap;\n\n // Recursively heapify the affected sub-tree\n maxHeap(array, n, largest);\n }\n}", "function buildHeap(arr, type) {\n // gets the last index\n var lastIndex = arr.length - 1;\n // While the last index is greater than 0\n while (lastIndex > 0) {\n // get the parent index\n var parentIndex = Math.floor((lastIndex - 1) / 2);\n // get the items inside the parent\n // and the last index \n var lastItem = arr[lastIndex];\n var parentItem = arr[parentIndex];\n\n if (type === 'maxHeap') {\n // checks to see if the lastItem is greater\n // than the parentItem if so then do a swap\n if (lastItem > parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n else if (type === 'minHeap') {\n // checks to see if the lastItem is less\n // than the parentItem if so then do a swap\n if (lastItem < parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n\n }\n }", "insert_num(num) {\n // Insert a number if the num is less than the top ele in maxHeap, or maxHeap top is null\n if (!this.maxHeap.values.length || this.maxHeap.peek() >= num) {\n this.maxHeap.insert(num);\n } else {\n this.minHeap.insert(num);\n }\n\n // Rebalance the heaps. Max heap should have 1 extra element if total num of elements is odd\n if (this.maxHeap.values.length > this.minHeap.heap.length + 1) {\n this.minHeap.insert(this.maxHeap.extractMax());\n } else if (this.maxHeap.values.length < this.minHeap.heap.length) {\n this.maxHeap.insert(this.minHeap.remove());\n }\n }", "extractMax() {\n let extracted = this.values[0]\n let end = this.values.pop()\n if (this.values.length > 0) {\n this.values[0] = end\n this.sinkDown()\n }\n return extracted\n }", "maxValue() {\n let currNode = this.top;\n let maxValue = this.top.value;\n \n while (currNode.next) {\n if (currNode.next.value > maxValue) maxValue = currNode.next.value;\n currNode = currNode.next;\n }\n \n return maxValue;\n }", "extractMin() {\n if (this.size <= 0) return;\n if (this.size === 1) {\n this.size--;\n return this.data[0];\n }\n let root = this.data[0];\n this.data[0] = this.data[this.size - 1];\n this.size--;\n this.MinHeapify(0);\n return root;\n }", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "function largestNum(arr, k) {\n\tif (!arr && !arr.length && !k) return false;\n\n\tlet shunk = arr.slice(0, k); //first shunk\n\tlet heap = [];\n\tshunk.forEach(n => insertHeap(heap, n));\n\n\tfor (let i = k; i < arr.length; i++) {\n\t\tif (arr[i] >= heap[0]) {\n\t\t\tupdateHeap(heap, arr[i]);\n\t\t}\n\t}\n\n\treturn heap;\n}", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "function heapify(arr,comp){\r\n // arr[n/2-1:n-1] already satisfies the heap property because they are the leaves.\r\n for(let i = Math.floor((arr.length-2)/2); i >= 0; i--){\r\n // Restore the heap property for i\r\n siftDown(arr, comp, i);\r\n }\r\n // Now that the heap property is satisfied for all i from 0 to n-1, the array is a heap\r\n}", "function max(arr){\n \n if(arr.length==2) //BASE CASE\n return arr[0]>arr[1]?arr[0]:arr[1]\n else //\n {\n arr[1]=arr[0]>arr[1]?arr[0]:arr[1]\n return max(arr.splice(1,arr.length-1))\n }\n \n}", "pop() {\n //delete the current top values within the stack\n delete this.items[this.top];\n //deduct 1 from the top to show the new top index\n this.top = this.top -1;\n }", "function heapify(A, idx, max) {\n var largest = idx,\n left = 2 * idx + 1,\n right = 2 * idx + 2;\n\n if (left < max && A[left] > A[idx]) {\n largest = left;\n }\n if (right < max && A[right] > A[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n swap(A, idx, largest);\n heapify(A, largest, max);\n }\n}", "remove(item) {\n // Find number of items to remove.\n const numberOfItemsToRemove = this.find(item).length;\n\n for (let iteration = 0; iteration < numberOfItemsToRemove; iteration += 1) {\n // We need to find item index to remove each time after removal since\n // indices are being changed after each heapify process.\n const indexToRemove = this.find(item).pop();\n\n // If we need to remove last child in the heap then just remove it.\n // There is no need to heapify the heap afterwards.\n if (indexToRemove === this.heapContainer.length - 1) {\n this.heapContainer.pop();\n } else {\n // Move last element in heap to the vacant (removed) position.\n this.heapContainer[indexToRemove] = this.heapContainer.pop();\n\n // Get parent.\n const parentItem = this.parent(indexToRemove);\n\n // If there is no parent or parent is in correct order with the node\n // we're going to delete then heapify down. Otherwise heapify up.\n if (\n this.hasLeftChild(indexToRemove) &&\n (!parentItem || parentItem <= this.heapContainer[indexToRemove])\n ) {\n this.heapifyDown(indexToRemove);\n } else {\n this.heapifyUp(indexToRemove);\n }\n }\n }\n\n return this;\n }", "function heapify(array, size, i) {\n let max = i // initialize max as root\n let left = 2 * i + 1\n let right = 2 * i + 2\n \n // if left child is larger than root\n if (left < size && array[left] > array[max])\n max = left\n \n // if right child is larger than max\n if (right < size && array[right] > array[max])\n max = right\n \n // if max is not root\n if (max != i) {\n // swap\n let temp = array[i]\n array[i] = array[max]\n array[max] = temp\n \n // recursively heapify the affected sub-tree\n heapify(array, size, max)\n }\n }", "function heapSort(arr,comp){\r\n // Turn arr into a heap\r\n heapify(arr,comp);\r\n for(let i = arr.length-1; i > 0; i--){\r\n // The 0th element of a heap is the largest so move it to the top.\r\n [arr[0],arr[i]] = [arr[i],arr[0]];\r\n // The 0th element is no longer the largest; restore the heap property\r\n siftDown(arr,comp,0);\r\n }\r\n}", "async function heapify(arr,length,i){\n chosen.style.color=\"black\";\n chosen.innerHTML=`Turning the remaining array into max heap...`;\n let largest=i;\n let left=i*2+1;\n let right=left+1;\n let rightBar=document.querySelector(`.bar${right}`);\n let leftBar=document.querySelector(`.bar${left}`);\n let iBar=document.querySelector(`.bar${i}`);\n await sleep(speed);\n iBar.style.backgroundColor=\"#3500d3\";//selected\n if (left<length)\n leftBar.style.backgroundColor=\"#f64c72\";//checking\n if (right<length)\n rightBar.style.backgroundColor=\"#f64c72\";//checking\n if (left<length && arr[left]>arr[largest])\n largest=left;\n if (right<length && arr[right]>arr[largest])\n largest=right;\n if(largest!=i){\n let largestBar=document.querySelector(`.bar${largest}`);\n iBar=document.querySelector(`.bar${i}`);\n [arr[largest],arr[i]]=[arr[i],arr[largest]];\n [largestBar.style.height,iBar.style.height]=[iBar.style.height,largestBar.style.height];\n [largestBar.innerHTML,iBar.innerHTML]=[iBar.innerHTML,largestBar.innerHTML];\n await sleep(speed);\n iBar.style.backgroundColor=\"#17a2b8\";//original\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n\n await heapify(arr,length,largest);\n }\n iBar.style.backgroundColor=\"#17a2b8\";//original\n if (left<length)\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n if (right<length)\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n}", "function pqdownheap(tree, k) {\n\t\tvar v = heap[k],\n\t\t\tj = k << 1; // left son of k\n\n\t\twhile (j <= heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < heap_len && SMALLER(tree, heap[j + 1], heap[j])) {\n\t\t\t\tj++;\n\t\t\t}\n\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (SMALLER(tree, v, heap[j])) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t}", "dequeue() {\n // set a variable equal to the object keys array\n var keys = Object.keys(this.storage);\n // set a variable equal to the lowest key value\n var lowest = this.storage[keys[0]];\n // delete the lowest key value\n delete this.storage[keys[0]];\n // return the lowest key value variable\n return lowest;\n }", "function fix_extrema(slot) {\n if (slot.maximum !== undefined) {\n slot.max = slot.maximum;\n delete slot.maximum;\n }\n if (slot.minimum !== undefined) {\n slot.min = slot.minimum;\n delete slot.minimum;\n }\n }", "delete(value) {\n if (this.head.back === this.head && this.head.value === value) {\n this.head = null;\n } else {\n let temp = this.head;\n\n while (temp.value !== value) {\n if (temp.forward.value <= temp.value) {\n return false;\n }\n temp = temp.forward;\n }\n\n temp.back.forward = temp.forward;\n temp.forward.back = temp.back;\n\n if (temp === this.head) {\n this.head = temp.forward;\n }\n\n delete this.temp;\n }\n this.size--;\n return true;\n }", "remove() {\n if (!this.value) {\n this.value = this.min || 0;\n }\n const step = this.ctrl_key ? 100 : this.shift_key ? 10 : this.step || 1;\n this.value -= step;\n if (this.value < this.min) {\n this.value = this.min || 0;\n }\n this.setValue(this.value);\n }" ]
[ "0.88500553", "0.8017225", "0.762636", "0.7623454", "0.7433278", "0.728619", "0.72537774", "0.71495926", "0.71142554", "0.70889926", "0.69997257", "0.6982289", "0.69431186", "0.6823337", "0.67177093", "0.67000633", "0.66962206", "0.6652222", "0.6639554", "0.6618666", "0.66110706", "0.6583024", "0.6576373", "0.64911616", "0.64856577", "0.64669216", "0.6464628", "0.64557457", "0.6450055", "0.64311546", "0.63740087", "0.637112", "0.63508713", "0.63361806", "0.63044816", "0.6297384", "0.62704605", "0.62690824", "0.6257644", "0.62206984", "0.6218686", "0.6191195", "0.6191195", "0.6190149", "0.6185546", "0.617834", "0.6151276", "0.61479914", "0.61302006", "0.61302006", "0.61302006", "0.61302006", "0.61302006", "0.6113292", "0.6110042", "0.6110042", "0.60981536", "0.6091502", "0.60913044", "0.60833424", "0.60649", "0.6061322", "0.60444885", "0.60409665", "0.60361713", "0.6029652", "0.60163754", "0.60163754", "0.59973544", "0.59939426", "0.59922594", "0.59894145", "0.59768707", "0.5976001", "0.59643745", "0.59623677", "0.5957637", "0.5939153", "0.59378827", "0.5928781", "0.5926082", "0.5909945", "0.590944", "0.590881", "0.5908189", "0.5901202", "0.5892333", "0.58861375", "0.58773625", "0.58762693", "0.5865893", "0.58577454", "0.58477545", "0.5831387", "0.58102095", "0.57982033", "0.5797247", "0.5795191", "0.5793246", "0.579167" ]
0.7505327
4
stores the max value and then removes it from the heap
extractMin() { const min = this.heap[0]; this.remove(min); return min; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeMax() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "extractMax() {\r\n\t\tconst max = this.heap[0];\r\n\t\tthis.remove(max);\r\n\t\treturn max;\r\n\t}", "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "function maxHeapify(arr){\n\n}", "function insert_max_heap(A, no, value) {\n A[no] = value //Insert , a new element will be added always at last \n const n = no\n let i = n\n\n //apply hepify method till we reach root (i=1)\n while (i >= 1) {\n const parent = Math.floor((i - 1) / 2)\n if (A[parent] < A[i]) {\n swap(A, parent, i)\n i = parent\n } else {\n i = parent\n //return ;\n }\n }\n}", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "remove() {\n // Swap root value with last element in the heap\n // Pop the last element from heap array\n // Perform siftDown to correct position of swapped value\n // Return popped value\n this.swap(0, this.heap.length - 1, this.heap);\n const valueToRemove = this.heap.pop();\n this.siftDown(0, this.heap.length - 1, this.heap);\n \n return valueToRemove;\n }", "removeMin() {\r\n\t\tthis.remove(this.heap[0]);\r\n\t}", "function nMax(){\n var arr=[-3,3,5,7];\n var max= arr[0];\n for(var i = 0; i< arr.length; i++){\n if(arr[i]>max){\n max=arr[i];\n arr.splice(max);\n }\n }\n for(var i=0; i<arr.length;i++){\n if(arr[i]>max){\n max=arr[i];\n \n }\n }\n console.log(max);\n return max;\n }", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "findMax() {\r\n\t\treturn this.heap[0];\r\n\t}", "buildMaxHeap() {}", "maxToBack(){\n var runner = this.head;\n var max = this.head\n var prevnode = this.head\n var maxprev = null\n while (runner != null) {\n if (runner.val > max.val) {\n max = runner;\n maxprev = prevnode\n }\n prevnode = runner\n runner = runner.next\n }\n prevnode.next = max\n maxprev.next = max.next\n max.next = null;\n }", "extractMax(){\r\n if(this.values.length === 1) return this.values.pop();\r\n const oldRoot = this.values[0];\r\n this.values[0] = this.values[this.values.length-1];\r\n this.values.pop();\r\n let idx = 0;\r\n let child1 = (2*idx) + 1;\r\n let child2 = (2*idx) + 2;\r\n\r\n while(this.values[idx] < this.values[child1] || \r\n this.values[idx] < this.values[child2]){\r\n child1 = (2*idx) + 1;\r\n child2 = (2*idx) + 2;\r\n if(this.values[child1] >= this.values[child2]){\r\n let temp = this.values[child1];\r\n this.values[child1] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child1;\r\n } else {\r\n let temp = this.values[child2];\r\n this.values[child2] = this.values[idx];\r\n this.values[idx] = temp;\r\n idx = child2;\r\n }\r\n }\r\n return oldRoot;\r\n }", "extractMax() {\n let values = this.values;\n if (values.length === 0) return;\n let max = values[0];\n // For time complexity reasons, I swap first then remove the old root node\n values[0] = values[values.length - 1];\n values.pop();\n console.log(values);\n // instatiate child nodes\n let child1, child2, indexToSwap;\n let currentIndex = 0;\n while (true) {\n child1 = currentIndex * 2 + 1;\n child2 = currentIndex * 2 + 2;\n if (values[currentIndex] >= Math.max(values[child1], values[child2])) {\n break;\n }\n indexToSwap = values[child1] > values[child2] ? child1 : child2;\n if (!values[indexToSwap]) break;\n let oldNode = values[currentIndex];\n values[currentIndex] = values[indexToSwap];\n values[indexToSwap] = oldNode;\n currentIndex = indexToSwap;\n }\n this.values = values;\n return max;\n }", "extractMax(){\n const max = this.values.shift();\n let current = this.values.pop();\n if(this.values.length > 0){\n this.values.unshift(current);\n this.sinkDown();\n }\n return max;\n }", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "extractMax() {\n if (this.values.length===1) {\n return this.values.pop()\n }\n let max = this.values[0]\n let tail = this.values.pop()\n this.values[0] = tail\n let index = 0\n let element = this.values[index]\n // repeat until neither child is greater than the element\n while(true) {\n let swapped = null\n let leftIndex = 2 * index + 1\n let rightIndex = 2 * index + 2\n if (leftIndex < this.values.length) {\n if(this.values[leftIndex] > element) {\n swapped = leftIndex\n }\n }\n if (rightIndex < this.values.length) {\n if( (!swapped && this.values[rightIndex] > element || !!swapped && this.values[rightIndex] > this.values[leftIndex])) {\n swapped = rightIndex\n }\n }\n if (swapped===null) break\n this.values[index] = this.values[swapped]\n this.values[swapped] = element\n index = swapped\n }\n return max\n }", "delMin() {\n /*\n * Save reference to the min key.\n * Swap the min key with the last key in the heap.\n * Decrement n so that the key does not swim back up the heap.\n * Sink down the heap to fix any violations that have arisen.\n * Delete the min key to prevent loitering, and return its reference.\n */\n let min = this.heap[1];\n\n [this.heap[1], this.heap[this.n]] = [this.heap[this.n], this.heap[1]];\n this.n--;\n this.sink(1);\n this.heap[this.n+1] = null;\n\n return min;\n }", "maxHeap(index) {\n var left = this.left(index);\n var right = this.right(index);\n var largest = index;\n if (left < this.heapSize && this.array[left] > this.array[index]) {\n largest = left;\n }\n if (right < this.heapSize && this.array[right] > this.array[largest]) {\n largest = right;\n }\n if (largest != index) {\n this.swap(this.array, index, largest);\n this.maxHeap(largest);\n }\n }", "function deleteMax(h) { \n if (isRed(h.left))\n h = rotateRight(h);\n\n if (h.right == null || h.right == undefined)\n return null;\n\n if (!isRed(h.right) && !isRed(h.right.left))\n h = moveRedRight(h);\n\n h.right = deleteMax(h.right);\n\n return balance(h);\n }", "function MaxPriorityQueue(array){\r\n MaxHeap.call(this, array)\r\n}", "static maxHeapify(a, i) {\n let left = Heap.left(i);\n let right = Heap.right(i);\n\n // Find largest node between current, left and right\n let largest;\n if (left < a.heap_size && a[left] > a[i])\n largest = left;\n else\n largest = i;\n\n if (right < a.heap_size && a[right] > a[largest])\n largest = right;\n\n // Move current element to 'largest' position, and\n // continue until the element is positioned correctly\n if (largest != i) {\n let temp = a[i];\n a[i] = a[largest];\n a[largest] = temp;\n\n Heap.maxHeapify(a, largest);\n }\n }", "function maxHeapify(arr, length, parent) {\n var largest = parent;\n var leftChild = 2 * parent + 1;\n var rightChild = 2 * parent + 2;\n\n if (leftChild < length && arr[leftChild] > arr[largest]) {\n largest = leftChild;\n }\n\n if (rightChild < length && arr[rightChild] > arr[largest]) {\n largest = rightChild;\n }\n\n if (largest != parent) {\n var temp = arr[largest];\n arr[largest] = arr[parent];\n arr[parent] = temp;\n\n maxHeapify(arr, length, largest);\n }\n}", "heapDown(index) {\n const [leftIndex, rightIndex] = this.children(index);\n \n if (!leftIndex && !rightIndex) return;\n\n let min;\n rightIndex ? min = rightIndex : min = leftIndex;\n if ((leftIndex && rightIndex) &&\n this.store[leftIndex].key < this.store[rightIndex].key) {\n min = leftIndex;\n }\n\n if (this.store[index].key > this.store[min].key) {\n this.swap(index, min);\n this.heapDown(min);\n }\n }", "remove(key) {\n this.storage.set(getIndexBelowMax(key), undefined);\n }", "insert_num(num) {\n // Insert a number if the num is less than the top ele in maxHeap, or maxHeap top is null\n if (!this.maxHeap.values.length || this.maxHeap.peek() >= num) {\n this.maxHeap.insert(num);\n } else {\n this.minHeap.insert(num);\n }\n\n // Rebalance the heaps. Max heap should have 1 extra element if total num of elements is odd\n if (this.maxHeap.values.length > this.minHeap.heap.length + 1) {\n this.minHeap.insert(this.maxHeap.extractMax());\n } else if (this.maxHeap.values.length < this.minHeap.heap.length) {\n this.maxHeap.insert(this.minHeap.remove());\n }\n }", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "remove(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tlet i;\r\n\t\tfor (i = 0; i < size; i++) {\r\n\t\t\tif (data === this.heap[i]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[this.heap[i], this.heap[size - 1]] = [this.heap[size - 1], this.heap[i]];\r\n\t\tthis.heap.splice(size - 1);\r\n\r\n\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\tthis.minHeapify(this.heap, this.heap.length, i);\r\n\t\t}\r\n\t}", "remove() {\n if (this.isEmpty()) return;\n this.swap(0, this.store.length - 1);\n const { value } = this.store.pop();\n if (!this.isEmpty()) this.heapDown(0);\n return value;\n }", "function buildMaxHeap() {\n for (let i = Math.floor(array.length / 2) - 1; i >= 0; i--) {\n maxHeapify(i, array.length);\n }\n}", "maxToBack(){\n // your code here\n var runner = this.head\n var max = runner\n while (runner.next != null){\n if (runner.next.value > max.value){\n max = runner.next\n }\n runner = runner.next\n }\n var temp = runner.value\n runner.value = max.value\n max.value = temp\n return this\n }", "extractMax() {\n const max = this.values[0];\n const end = this.values.pop();\n this.values[0] = end;\n this.sinkDown();\n return max;\n }", "function maxHeapify(idx, hSize) {\n let largest;\n const left = (2 * idx) + 1;\n const right = (2 * idx) + 2;\n if (left < hSize && array[left] > array[idx]) {\n largest = left;\n } else {\n largest = idx;\n }\n if (right < hSize && array[right] > array[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n const temp = array[idx];\n array[idx] = array[largest];\n array[largest] = temp;\n maxHeapify(largest, hSize);\n }\n}", "Dequeue() {\r\n if (this.heap.length == 0) return;\r\n const highestPriority = this.heap[0];\r\n const leastPriority = this.heap[this.heap.length - 1];\r\n //swap first and last priority\r\n this.heap[this.heap.length - 1] = highestPriority;\r\n this.heap[0] = leastPriority;\r\n this.heap.pop();\r\n let nodeIndex = 0; //sink down\r\n while (true) {\r\n const left = this.heap[2 * nodeIndex + 1];\r\n const right = this.heap[2 * nodeIndex + 2];\r\n const leastElement = this.heap[nodeIndex];\r\n if (\r\n right &&\r\n right.priority < left.priority &&\r\n right.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 2] = leastElement;\r\n this.heap[nodeIndex] = right;\r\n nodeIndex = 2 * nodeIndex + 2;\r\n } else if (\r\n left &&\r\n left.priority < right.priority &&\r\n left.priority < leastElement.priority\r\n ) {\r\n this.heap[2 * nodeIndex + 1] = leastElement;\r\n this.heap[nodeIndex] = left;\r\n nodeIndex = 2 * nodeIndex + 1;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return highestPriority;\r\n }", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "dequeue (){\n // let removedRoot = this.values[0];\n //replace with last added value\n //TEACHERS SOLUTION\n const min = this.values[0];\n const end = this.values.pop();\n //EDGE CASE IF NOTHING LEFT IN\n if(this.values.length > 0){\n //LINE 97 CAUSES A FOREVER LOOP WITH THE LAST ELEMENT IF WE DON'T ADD THE CONDITIONAL, BECAUSE WE REASSIGN THE ROOT TO BE END (WHICH WAS THE ORIGINAL ROOT IF THERE'S ONLY ONE ELEMENT)\n this.values[0] = end;\n //START TRICKLE DOWN\n this.sinkDown();\n }\n \n \n return min;\n }", "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\n }\n\n for (let endOfHeap = array.length - 1; endOfHeap >= 0; endOfHeap--) { // 2) loop from end of maxHeap to begin/left, and \"delete\" max val until heap region is \"empty\"\n [array[endOfHeap], array[0]] = [array[0], array[endOfHeap]]; // 3) swap the root of the heap with the last element of the heap, this shrinks the heap by 1 and grows the sorted array by 1\n\n console.log(array);\n\n heapify(array, endOfHeap, 0); // 4) sift down the new root, but not past the end of the heap\n }\n\n return array;\n}", "extractMax() {\n // swap the first value in the values property with the last value\n // pop from the values property, so you can return the value at the end.\n // 'sink down' to the correct spot\n const max = this.values[0];\n const end = this.values.pop();\n if (this.values.length > 0) {\n this.values[0] = end;\n // move it to the correct position\n this.bubbleDown();\n }\n return max;\n }", "function heap_root(input, i) { \n var left = 2 * i + 1; \n var right = 2 * i + 2; \n var max = i; \n \n if (left < array_length && input[left] > input[max]) { \n max = left; \n } \n \n if (right < array_length && input[right] > input[max]) { \n max = right; \n } \n \n if (max != i) { \n swap(input, i, max); \n heap_root(input, max); \n } \n}", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "static buildMaxHeap(a) {\n a.heap_size = a.length;\n\n // Max-heapify the first n/2 elements as\n // they are tree nodes, and the remaining are\n // usually tree leaves\n let mid = parseInt(a.length / 2);\n for (let i = mid; i >= 0; i -= 1) {\n Heap.maxHeapify(a, i);\n }\n }", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "function heap_root(input, i) {\n var left = 2 * i + 1;\n var right = 2 * i + 2;\n var max = i;\n\n if (left < array_length && input[left] > input[max]) {\n max = left;\n }\n\n if (right < array_length && input[right] > input[max]) {\n max = right;\n }\n\n if (max != i) {\n swap(input, i, max);\n heap_root(input, max);\n }\n}", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "insert(val) {\n this.array.push(val);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// push value to end of array (add node to farthest bottom left of tree)\n\n this.siftUp(this.array.length - 1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuously swap value toward front of array to maintain maxHeap property\n }", "async function MaxHeapify( i, heapSize)\n{\n\n let hasLeft = (2 * i + 1 < heapSize) ? true : false;\n let hasRight = (2 * i + 2 < heapSize) ? true : false;\n let l, r;\n let largest = i;\n if (hasLeft)\n l = arr[2 * i + 1].offsetHeight;\n if (hasRight)\n r = arr[2 * i + 2].offsetHeight;\n if (hasLeft && arr[i].offsetHeight < l)\n {\n largest = 2 * i + 1;\n }\n if (hasRight && arr[largest].offsetHeight < r)\n {\n largest = 2 * i + 2;\n }\n if (largest != i)\n {\n arr[i].style.backgroundColor='white';\n arr[largest].style.backgroundColor='green';\n await timer(delay);\n await swap(i, largest);\n arr[i].style.backgroundColor='red';\n arr[largest].style.backgroundColor='red';\n await MaxHeapify(largest, heapSize);\n }\n}", "function maxHeapify(arr , n , i)\n\t{\n\t\n\t\t// Find largest of node and its children\n\t\tif (i >= n) {\n\t\t\treturn;\n\t\t}\n\t\tvar l = i * 2 + 1;\n\t\tvar r = i * 2 + 2;\n\t\tvar max;\n\t\tif (l < n && arr[l] > arr[i]) {\n\t\t\tmax = l;\n\t\t} else\n\t\t\tmax = i;\n\t\tif (r < n && arr[r] > arr[max]) {\n\t\t\tmax = r;\n\t\t}\n\n\t\t// Put maximum value at root and\n\t\t// recur for the child with the\n\t\t// maximum value\n\t\tif (max != i) {\n\t\t\tvar temp = arr[max];\n\t\t\tarr[max] = arr[i];\n\t\t\tarr[i] = temp;\n\t\t\tmaxHeapify(arr, n, max);\n\t\t}\n\t}", "extractMax() {\n const max = this.values[0]\n const end = this.values.pop()\n\n if (this.values.length > 0) {\n this.values[0] = end\n this._sinkDown()\n }\n\n return max\n }", "heapify(/*index*/ i) {\n let l = this.left(i);\n let r = this.right(i);\n let biggest = i;\n if (l < this.heap_size && this.harr[i].element.compareByMulKeys(this.harr[l].element, this.compareValues) == -1)\n biggest = l;\n if (r < this.heap_size && this.harr[biggest].element.compareByMulKeys(this.harr[r].element, this.compareValues) == -1)\n biggest = r;\n if (biggest != i) {\n this.swap(this.harr, i, biggest);\n this.heapify(biggest);\n }\n }", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "function buildHeap(arr, type) {\n // gets the last index\n var lastIndex = arr.length - 1;\n // While the last index is greater than 0\n while (lastIndex > 0) {\n // get the parent index\n var parentIndex = Math.floor((lastIndex - 1) / 2);\n // get the items inside the parent\n // and the last index \n var lastItem = arr[lastIndex];\n var parentItem = arr[parentIndex];\n\n if (type === 'maxHeap') {\n // checks to see if the lastItem is greater\n // than the parentItem if so then do a swap\n if (lastItem > parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n else if (type === 'minHeap') {\n // checks to see if the lastItem is less\n // than the parentItem if so then do a swap\n if (lastItem < parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n\n }\n }", "maxValue() {\n let currNode = this.top;\n let maxValue = this.top.value;\n \n while (currNode.next) {\n if (currNode.next.value > maxValue) maxValue = currNode.next.value;\n currNode = currNode.next;\n }\n \n return maxValue;\n }", "function heapifyStandart(currentIndex, heapSize ,arr){\n\n var largestElement = currentIndex\n var leftIndex = 2 * currentIndex + 1\n var rightIndex = 2 * currentIndex + 2\n\n if (leftIndex < heapSize && arr[currentIndex] < arr[leftIndex]){\n largestElement = leftIndex\n }\n \n if (rightIndex < heapSize && arr[largestElement] < arr[rightIndex]){\n largestElement = rightIndex\n }\n\n if (largestElement != currentIndex){\n swapArrayElement(currentIndex, largestElement, arr)\n heapifyStandart(largestElement, heapSize, arr)\n }\n}", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "function heapify(A, idx, max) {\n var largest = idx,\n left = 2 * idx + 1,\n right = 2 * idx + 2;\n\n if (left < max && A[left] > A[idx]) {\n largest = left;\n }\n if (right < max && A[right] > A[largest]) {\n largest = right;\n }\n if (largest !== idx) {\n swap(A, idx, largest);\n heapify(A, largest, max);\n }\n}", "function heapify(array, size, i) {\n let max = i // initialize max as root\n let left = 2 * i + 1\n let right = 2 * i + 2\n \n // if left child is larger than root\n if (left < size && array[left] > array[max])\n max = left\n \n // if right child is larger than max\n if (right < size && array[right] > array[max])\n max = right\n \n // if max is not root\n if (max != i) {\n // swap\n let temp = array[i]\n array[i] = array[max]\n array[max] = temp\n \n // recursively heapify the affected sub-tree\n heapify(array, size, max)\n }\n }", "pop(){\r\n if (this.top === -1){\r\n return undefined;\r\n }else{\r\n delete this.storage[this.top];\r\n this.top -= 1;\r\n }\r\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "function heapSort(array){\n // 1: Construction\n let heap = new MaxHeap()\n array.forEach(ele => {\n heap.insert(ele)\n });\n\n// 2: sortdown \n let sorted = []\n while (heap.array.length > 1){\n sorted.push(heap.deleteMax())\n }\n return sorted\n}", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "dequeue() {\n const [next] = this.values;\n this.values[0] = this.values.pop();\n let childLeft, childRight;\n let curr = 0;\n while (true) {\n let childLeftIdx = 2 * curr + 1;\n let childRightIdx = childLeft + 1;\n let swap = null;\n if (childLeftIdx < this.values.length) {\n childLeft = this.values[childLeftIdx];\n if (childLeft.priority > this.values[curr].priority) {\n swap = childLeft;\n }\n\n if (childRightIdx < this.values.length) {\n childRight = this.values[childRight];\n if (\n (swap === null &&\n childRight.priority < this.values[curr].priority) ||\n (swap !== null && childRight < childLeft.priority)\n ) {\n swap = childRightIdx;\n }\n }\n\n if (swap === null) break;\n const temp = this.values[curr];\n this.values[curr] = this.values[swap];\n this.values[swap] = temp;\n curr = swap;\n }\n }\n }", "dequeue(){\n const oldRoot = this.values[0];\n const lastNode = this.values.pop();\n \n if(this.values.length > 0){\n this.values[0] = lastNode;\n this.bubbleDown();\n }\n \n return oldRoot;\n }", "function maxHeap(array, n, i) {\n let largest = i;\n let left = 2 * i + 1;\n let right = 2 * i + 2;\n if (left < n && array[left] > array[largest]) {\n largest = left;\n }\n\n // If right child is larger than largest so far\n if (right < n && array[right] > array[largest]) {\n largest = right;\n }\n\n // If largest is not root\n if (largest != i) {\n let swap = array[i];\n array[i] = array[largest];\n array[largest] = swap;\n\n // Recursively heapify the affected sub-tree\n maxHeap(array, n, largest);\n }\n}", "function heapify(currentIndex, arr){\n\n if (isHavingChildrenLeft(currentIndex, arr)) {\n let parent = arr[currentIndex]\n\n if (isHavingChildrenRight(currentIndex, arr)){\n let maxChildren = Math.max(arr[currentIndex * 2 + 1], arr[currentIndex * 2 + 2])\n if (parent < maxChildren){\n let maxChilrenIndex = maxChildren == arr[currentIndex * 2 + 1] ? currentIndex * 2 + 1 : currentIndex * 2 + 2 \n swapArrayElement(currentIndex, maxChilrenIndex, arr)\n heapify(maxChilrenIndex, arr)\n }\n }else {\n if (parent < arr[currentIndex * 2 + 1]){\n swapArrayElement(currentIndex, currentIndex * 2 + 1, arr)\n heapify(currentIndex * 2 + 1, arr)\n }\n }\n }else {\n console.log(\"skipping index %d\", currentIndex)\n }\n}", "insert(value) {\n // Insert value to the end of array\n // Perform siftUp to correct position of value in the heap tree\n this.heap.push(value);\n this.siftUp(this.heap.length - 1, this.heap);\n }", "bubble_down (p) {\n // var max_index = max_by(\n // [p, this.right_child(p), this.left_child(p)], // indices\n // index => this.queue[index] || -1 // scoring function\n // )\n\n // var max_index = p\n // var left_child_index = this.left_child(p)\n // var right_child_index = this.right_child(p)\n // if (this.queue[left_child_index] > this.queue[max_index]) {\n // max_index = left_child_index\n // }\n // if (this.queue[right_child_index] > this.queue[max_index]) {\n // max_index = right_child_index\n // }\n //\n // if (max_index !== p) {\n // this.swap(p, max_index)\n // this.bubble_down(max_index)\n // }\n\n\n // // latest and greatest\n var length = this.queue.length;\n var element = this.queue[p]\n\n while(true) {\n var child1N = this.left_child(p)\n var child2N = this.right_child(p)\n\n var swap = null\n if(child1N < length) {\n var child1 = this.queue[child1N]\n\n if (child1 > element)\n swap = child1N\n }\n\n if (child2N < length) {\n var child2 = this.queue[child2N]\n if(child2 > (swap === null ? element : this.queue[child1N]))\n swap = child2N\n }\n\n if (swap == null) {\n break;\n }\n\n this.queue[p] = this.queue[swap]\n this.queue[swap] = element\n p = swap\n }\n }", "function thirdLargestNode(tree) {\n tree.remove(tree._findMax().key);\n tree.remove(tree._findMax().key);\n return tree._findMax().key;\n}", "pop() {\n //delete the current top values within the stack\n delete this.items[this.top];\n //deduct 1 from the top to show the new top index\n this.top = this.top -1;\n }", "function setHighest() {\n highest = i;\n if (typeof (Storage) !== \"undefined\") {\n window.localStorage.setItem(\"maxScore\", highest);\n }\n maxElement.innerHTML = highest;\n}", "dequeue() {\n // set a variable equal to the object keys array\n var keys = Object.keys(this.storage);\n // set a variable equal to the lowest key value\n var lowest = this.storage[keys[0]];\n // delete the lowest key value\n delete this.storage[keys[0]];\n // return the lowest key value variable\n return lowest;\n }", "function MaxStack () {\n this.max;\n this.array = [];\n}", "delete(value) {\n if (this.head.back === this.head && this.head.value === value) {\n this.head = null;\n } else {\n let temp = this.head;\n\n while (temp.value !== value) {\n if (temp.forward.value <= temp.value) {\n return false;\n }\n temp = temp.forward;\n }\n\n temp.back.forward = temp.forward;\n temp.forward.back = temp.back;\n\n if (temp === this.head) {\n this.head = temp.forward;\n }\n\n delete this.temp;\n }\n this.size--;\n return true;\n }", "poll() {\n const { queue } = this;\n // remove the top priority value at index 0\n const topPriority = queue[0];\n // new queue has bottom value at top & we shrink the size\n // of the queue as there is one less value\n queue[0] = queue.pop();\n let replacedValIndex = 0;\n let replacedVal = queue[replacedValIndex];\n let leftChildNodeIndex = this.getLeftChildNodeIndex(replacedValIndex);\n let leftChildNodeVal = queue[leftChildNodeIndex];\n let rightChildNodeIndex = this.getRightChildNodeIndex(replacedValIndex);\n let rightChildNodeVal = queue[rightChildNodeIndex];\n while (\n (replacedVal > leftChildNodeVal) |\n (replacedVal > rightChildNodeVal)\n ) {\n if (rightChildNodeVal < leftChildNodeVal) {\n queue[replacedValIndex] = rightChildNodeVal;\n queue[rightChildNodeIndex] = replacedVal;\n replacedValIndex = rightChildNodeIndex;\n leftChildNodeIndex = this.getLeftChildNodeIndex(replacedValIndex);\n leftChildNodeVal = queue[leftChildNodeIndex];\n rightChildNodeIndex = this.getRightChildNodeIndex(replacedValIndex);\n rightChildNodeVal = queue[rightChildNodeIndex];\n } else {\n queue[replacedValIndex] = leftChildNodeVal;\n queue[leftChildNodeIndex] = replacedVal;\n replacedValIndex = leftChildNodeIndex;\n leftChildNodeIndex = this.getLeftChildNodeIndex(replacedValIndex);\n leftChildNodeVal = queue[leftChildNodeIndex];\n rightChildNodeIndex = this.getRightChildNodeIndex(replacedValIndex);\n rightChildNodeVal = queue[rightChildNodeIndex];\n }\n }\n console.log(\"Polled val:\", topPriority);\n }", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "maxHeapify(arr, n, i) {\r\n\t\tlet largest = i;\r\n\t\tlet leftIndex = 2 * i + 1;\r\n\t\tlet rightIndex = 2 * i + 2;\r\n\r\n\t\tif (leftIndex < n && arr[leftIndex] > arr[largest]) {\r\n\t\t\tlargest = leftIndex;\r\n\t\t}\r\n\t\tif (rightIndex < n && arr[rightIndex] > arr[largest]) {\r\n\t\t\tlargest = rightIndex;\r\n\t\t}\r\n\t\tif (largest != i) {\r\n\t\t\tlet temp = arr[i];\r\n\t\t\tarr[i] = arr[largest];\r\n\t\t\tarr[largest] = temp;\r\n\t\t\tthis.maxHeapify(arr, n, largest);\r\n\t\t}\r\n\t}", "function MinHeap() {\n\n /**\n * Insert an item into the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} x\n */\n this.insert = function(x) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:)\n *\n * @return{number}\n */\n this.peek = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Remove and return the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.pop = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the size of the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.size = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Convert the heap data into a string\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{string}\n */\n MinHeap.prototype.toString = function() {\n // INSERT YOUR CODE HERE\n }\n\n /*\n * The following are some optional helper methods. These are not required\n * but may make your life easier\n */\n\n /**\n * Get the index of the parent node of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var parent = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the index of the left child of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var leftChild = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Swap the values at 2 indices in our heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @param{number} j\n */\n var swap = function(i, j) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble up the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleUp = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble down the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleDown = function(i) {\n // INSERT YOUR CODE HERE\n }\n}", "function max() {\n // set node to the root value\n var node = this.root;\n // loop until there is no more values to the right\n while( node.right != null ) {\n node = node.right; // move to the right value\n } // end while\n return node.data;\n} // end max", "function heapify(arr,comp){\r\n // arr[n/2-1:n-1] already satisfies the heap property because they are the leaves.\r\n for(let i = Math.floor((arr.length-2)/2); i >= 0; i--){\r\n // Restore the heap property for i\r\n siftDown(arr, comp, i);\r\n }\r\n // Now that the heap property is satisfied for all i from 0 to n-1, the array is a heap\r\n}", "remove(element,comparator=this.compare){\r\n let totalOccurenceOfElement=this.find(element,comparator).length;\r\n for(let i=0;i<totalOccurenceOfElement;i++){\r\n let removeIndex=this.heapContainer.findIndex((x)=> comparator.equal(x,element)); // findIndex is used for finding first found element's index\r\n let heapSize=this.heapContainer.length;\r\n // if the element is at last index simply remove it as we\r\n // don't need to haepify\r\n if(removeIndex===heapSize-1){\r\n this.heapContainer.pop();\r\n }\r\n else{\r\n this.heapContainer[removeIndex]=this.heapContainer[heapSize-1]; \r\n this.heapContainer.pop();\r\n let parentElement=this.getParent(removeIndex);\r\n let elementAtRemovedIndex=this.heapContainer[removeIndex];\r\n // if at index where the element is removed does not have a parent element that means it was on root and we cannot go up to heapify and alternately if the parent element\r\n // is in right order as compare to the new element that is moved to removed index that means we dont' have to take care of upper part of heap as if it is i right position to parent than it will also be in correct position to it's\r\n // parent's parent and we have used hasLeftChild because we only need to heapify down if there exists element in \r\n // down side\r\n if(!parentElement || this.isPairInRightOrder(parentElement,elementAtRemovedIndex) && this.hasLeftChild(removeIndex)){\r\n this.heapifyDown(removeIndex);\r\n }\r\n else{\r\n this.heapifyUp(removeIndex);\r\n }\r\n }\r\n \r\n }\r\n return this;\r\n }", "function checkHighest(value) {\n if (isHighest < value) {\n isHighest = value;\n }\n}", "function heapSort(arr,comp){\r\n // Turn arr into a heap\r\n heapify(arr,comp);\r\n for(let i = arr.length-1; i > 0; i--){\r\n // The 0th element of a heap is the largest so move it to the top.\r\n [arr[0],arr[i]] = [arr[i],arr[0]];\r\n // The 0th element is no longer the largest; restore the heap property\r\n siftDown(arr,comp,0);\r\n }\r\n}", "grow() {\n this.capacity *= 2;\n this.capacity = this.closestLargestPrime(this.capacity);\n for (let i = 0; i < this.table.length; i++) {\n let currentBucket = this.table[i];\n this.table[i] = [];\n if (currentBucket) {\n if (currentBucket.length > 0) {\n this.elements--;\n currentBucket.forEach(item => {\n this.add(item.key, item.value);\n });\n }\n }\n }\n }", "function Heap(){\n this.heap = [];\n}", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "async function heapify(arr,length,i){\n chosen.style.color=\"black\";\n chosen.innerHTML=`Turning the remaining array into max heap...`;\n let largest=i;\n let left=i*2+1;\n let right=left+1;\n let rightBar=document.querySelector(`.bar${right}`);\n let leftBar=document.querySelector(`.bar${left}`);\n let iBar=document.querySelector(`.bar${i}`);\n await sleep(speed);\n iBar.style.backgroundColor=\"#3500d3\";//selected\n if (left<length)\n leftBar.style.backgroundColor=\"#f64c72\";//checking\n if (right<length)\n rightBar.style.backgroundColor=\"#f64c72\";//checking\n if (left<length && arr[left]>arr[largest])\n largest=left;\n if (right<length && arr[right]>arr[largest])\n largest=right;\n if(largest!=i){\n let largestBar=document.querySelector(`.bar${largest}`);\n iBar=document.querySelector(`.bar${i}`);\n [arr[largest],arr[i]]=[arr[i],arr[largest]];\n [largestBar.style.height,iBar.style.height]=[iBar.style.height,largestBar.style.height];\n [largestBar.innerHTML,iBar.innerHTML]=[iBar.innerHTML,largestBar.innerHTML];\n await sleep(speed);\n iBar.style.backgroundColor=\"#17a2b8\";//original\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n\n await heapify(arr,length,largest);\n }\n iBar.style.backgroundColor=\"#17a2b8\";//original\n if (left<length)\n leftBar.style.backgroundColor=\"#17a2b8\";//original\n if (right<length)\n rightBar.style.backgroundColor=\"#17a2b8\";//original\n}", "remove(key) {\n\n // getIndexBelowMax(this.storage[key]);\n }", "get maximumValue() {\r\n return this.i.bk;\r\n }", "function heapDown(i) {\n var w = heapWeight(i)\n while(true) {\n var tw = w\n var left = 2*i + 1\n var right = 2*(i + 1)\n var next = i\n if(left < heapCount) {\n var lw = heapWeight(left)\n if(lw < tw) {\n next = left\n tw = lw\n }\n }\n if(right < heapCount) {\n var rw = heapWeight(right)\n if(rw < tw) {\n next = right\n }\n }\n if(next === i) {\n return i\n }\n heapSwap(i, next)\n i = next \n }\n }" ]
[ "0.8409095", "0.7877608", "0.7585467", "0.73500264", "0.73173934", "0.7304062", "0.7143545", "0.70733887", "0.7040378", "0.7005794", "0.69212705", "0.69015676", "0.6883216", "0.6674372", "0.6661336", "0.6651813", "0.66323894", "0.6611787", "0.6607657", "0.6603595", "0.6594041", "0.6590008", "0.6561784", "0.6522226", "0.64889723", "0.6476614", "0.6445646", "0.64444745", "0.64257395", "0.64036345", "0.6375218", "0.63559127", "0.6351474", "0.6346451", "0.6343195", "0.63107824", "0.6290287", "0.62822074", "0.6270549", "0.62603486", "0.6249749", "0.6240726", "0.61943597", "0.6190101", "0.6189247", "0.6179705", "0.6155469", "0.61366546", "0.6118917", "0.6116565", "0.6116565", "0.6093352", "0.6093352", "0.6093352", "0.6093352", "0.6093352", "0.60921216", "0.60537666", "0.60477406", "0.60449743", "0.6039253", "0.6038892", "0.6025458", "0.602423", "0.6016807", "0.600551", "0.6003344", "0.599103", "0.5983915", "0.5960869", "0.5960869", "0.5953174", "0.5952029", "0.5943364", "0.59276116", "0.5907756", "0.5887367", "0.5872507", "0.5869296", "0.58586186", "0.58583283", "0.5849378", "0.5845216", "0.5835212", "0.5815588", "0.5808637", "0.5807188", "0.5800628", "0.5800081", "0.57911754", "0.5790973", "0.57878053", "0.57748115", "0.5758137", "0.5754946", "0.5748891", "0.5746044", "0.5738877", "0.5737881", "0.5717096", "0.5715291" ]
0.0
-1
return the size of the heap
size() { return this.heap.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "size() {\n\t\treturn this.heap.length;\n\t}", "getHeap() {\r\n\t\treturn this.heap;\r\n\t}", "getHeap() {\r\n\t\treturn this.heap;\r\n\t}", "get size() {\n let size = 0;\n for (let i = 0; i < this.children.length; i++)\n size += this.children[i].size;\n return size;\n }", "function size() {\r\n var counter = 0;\r\n for (var i = 0; i < this.PriorityQueueContents.length; i++) {\r\n counter += this.PriorityQueueContents[i].ids.length;\r\n }\r\n return counter;\r\n }", "function size() {\n\t return n;\n\t }", "function size() {\n return n;\n }", "size() {\n return Math.abs(this.tail - this.head);\n }", "function size() {\n return stack_size;\n }", "function heapisEmpty() {\n return this.size == 0 ? true : false;\n}", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "size() {\n return this.rootNode.size(this.storage);\n }", "buildMaxHeap() {}", "function getSize(){\n return queue.length;\n }", "function size(node) {\n return node.size ? node.size : 1;\n }", "size() {\n return this.tail - this.head;\n }", "function size(self) {\n return self.size();\n}", "get size() {}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "size() {\n return this.stack.length;\n }", "childCount() {\n\t\tif (!this.state()) { return 0 }\n\n\t\tif (this[_size] === undefined) {\n\t\t\tthis[_size] = Object.keys(this.state()).length;\n\t\t}\n\n\t\treturn this[_size];\n\t}", "function GetSize() : int\n\t{\n\t\tvar n = 0;\n\t\tfor( var i = 0; i < key2down.length; i++ )\n\t\t{\n\t\t\tif( key2down[i] )\n\t\t\t\tn++;\n\t\t}\n\t\treturn n;\n\t}", "function maxHeapify(arr){\n\n}", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "function Heap()\n{\n\t// h[0] not used, heap initially empty\n\n\tthis.h = [null]; // heap of integer keys\n\tthis.h_item = [null]; // corresponding heap of data-items (any object)\n\tthis.size = 0; // 1 smaller than array (also index of last child)\n\n\n\t// --------------------\n\t// PQ-required only; more could be added later when needed\n\t// the 2 basic shape maintaining operations heapify and reheapify simplify\n\t// processing functions\n\n\tthis.isEmpty = heapisEmpty; // return true if heap empty\n\tthis.deleteRoot = heapDeleteRoot; // return data-item in root\n\tthis.insert = heapInsert; // insert data-item with key\n\n\tthis.heapify = heapheapify; // make subtree heap; top-down heapify (\"sink\") used by .deleteRoot()\n\tthis.reheapify = heapreheapify; // bottom-up reheapify (\"swim\") used by .insert()\n\tthis.show = heapShow; \t // utility: return pretty formatted heap as string\n\t \t // ... etc\n\n\t// --------------------\n}", "function size(x) {\n if (x === null || x == undefined) return 0;\n return x.size;\n }", "size() {\n let count = 0;\n let node = this.head; // Declare a node variable initialize to this.head\n // While the node exist\n while (node) {\n count++; // Increment count variable\n node = node.next; // reinitialize node to next node (if node.next is null the loop will break)\n }\n return count; // return count (which is the size)\n }", "get size() {\n return this._queue.size;\n }", "get size() {\n return this._queue.size;\n }", "size(){\n return this.rear-this.front + 1;\n }", "function heapShow()\n{\n\tvar n = this.size;\n\tvar m = Math.floor(n/2); // last parent node\n\n\tvar k = this.h.slice(1,n+1), a = this.h_item.slice(1,n+1);\n\n\tvar out=\"<h2>Heap (size=\"+ n+ \"):</h2><p>Keys: \" + k + \"<br>Data: \"+ a + \"</p>\";\n\tfor (var i=1; i<=m; i++)\n\t{\n\t\tout += \"<p>\"+ i+ \": <b>\"+ this.h[i]+ \"(\"+ this.h_item[i]+ \")</b><ul>\";\n\t\tif ( 2*i <= n )\n\t\t\tout += \"<li>\"+ this.h[2*i]+ \"</li>\";\n\t\tif ( 2*i+1 <= n )\n\t\t\tout+= \"<li>\"+ this.h[2*i+1]+ \"</li>\";\n\t\tout+= \"</ul></p>\";\n\t}\n\n\treturn out;\n}", "size() {\n return this.queue.size();\n }", "function heapUp(i) {\n\t var w = heapWeight(i)\n\t while(i > 0) {\n\t var parent = heapParent(i)\n\t if(parent >= 0) {\n\t var pw = heapWeight(parent)\n\t if(w < pw) {\n\t heapSwap(i, parent)\n\t i = parent\n\t continue\n\t }\n\t }\n\t return i\n\t }\n\t }", "function heapUp(i) {\n\t var w = heapWeight(i)\n\t while(i > 0) {\n\t var parent = heapParent(i)\n\t if(parent >= 0) {\n\t var pw = heapWeight(parent)\n\t if(w < pw) {\n\t heapSwap(i, parent)\n\t i = parent\n\t continue\n\t }\n\t }\n\t return i\n\t }\n\t }", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "function MinHeap() {\n\n /**\n * Insert an item into the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} x\n */\n this.insert = function(x) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:)\n *\n * @return{number}\n */\n this.peek = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Remove and return the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.pop = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the size of the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.size = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Convert the heap data into a string\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{string}\n */\n MinHeap.prototype.toString = function() {\n // INSERT YOUR CODE HERE\n }\n\n /*\n * The following are some optional helper methods. These are not required\n * but may make your life easier\n */\n\n /**\n * Get the index of the parent node of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var parent = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the index of the left child of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var leftChild = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Swap the values at 2 indices in our heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @param{number} j\n */\n var swap = function(i, j) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble up the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleUp = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble down the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleDown = function(i) {\n // INSERT YOUR CODE HERE\n }\n}", "get nodeSize() {\n return this.isLeaf ? 1 : 2 + this.content.size;\n }", "queueSize() {\n return this.queue.length\n }", "size() {\n let _size = node => node === null ? 0 : 1 + _size(node.left) + _size(node.right)\n return _size(this.root)\n }", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "size() {\n return this.root ? this.root.size() : 0;\n }", "get size() {\n if (this._available && this._available.length > 0) {\n return this._available.length;\n }\n if (this._pending && this._pending.length > 0) {\n return -this._pending.length;\n }\n return 0;\n }", "function maxHeap(val, parentVal) {\n return val > parentVal;\n}", "get size() {\n return this._queue.size;\n }", "size() {\n if (this.isEmpty()){\n return 0;\n }\n\n var size = 1;\n var runner = this.head;\n while (runner.next != null) {\n runner = runner.next;\n size ++;\n }\n return size;\n }", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "get size() {\n return this.#queue.length;\n }", "function heapWeight(i) {\n\t return weights[heap[i]]\n\t }", "function heapWeight(i) {\n\t return weights[heap[i]]\n\t }", "size(arr){\n var count = 0;\n while(this.data !== []){\n count++;\n this.pop;\n }\n return count;\n }", "function size() {\n\t return k;\n\t }", "get freeSize() {\n\t\treturn this._free.length;\n\t}", "function size() {\n return k;\n }", "function Heap(){\n this.heap = [];\n}", "capacity() {\n return (this.arr.length);\n }", "function heapUp(i) {\n var w = heapWeight(i)\n while(i > 0) {\n var parent = heapParent(i)\n if(parent >= 0) {\n var pw = heapWeight(parent)\n if(w < pw) {\n heapSwap(i, parent)\n i = parent\n continue\n }\n }\n return i\n }\n }", "size(){\n return this.queue.length;\n }", "sizeOf() {\n return this.size;\n }", "get size() {\n // Return the quad count if if was cached\n let size = this._size;\n if (size !== null) return size;\n\n // Calculate the number of quads by counting to the deepest level\n size = 0;\n const graphs = this._graphs;\n let subjects, subject;\n for (const graphKey in graphs) for (const subjectKey in subjects = graphs[graphKey].subjects) for (const predicateKey in subject = subjects[subjectKey]) size += Object.keys(subject[predicateKey]).length;\n return this._size = size;\n }", "getSize() {\n return this._node.__execute(() => this.element.getElementSize());\n }", "get size() {\n\t\treturn this._size;\n\t}", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "get size() {\n // Return the quad count if if was cached\n var size = this._size;\n if (size !== null) return size; // Calculate the number of quads by counting to the deepest level\n\n size = 0;\n var graphs = this._graphs,\n subjects,\n subject;\n\n for (var graphKey in graphs) for (var subjectKey in subjects = graphs[graphKey].subjects) for (var predicateKey in subject = subjects[subjectKey]) size += Object.keys(subject[predicateKey]).length;\n\n return this._size = size;\n }", "length() {\n const queueLen = this.queue.length;\n debug(`\\nLOG: There are total ${queueLen} data in the queue`);\n return queueLen;\n }", "get size() {\n\t\treturn wm.get(this).size;\n\t}", "get fullQueueLength()\n {\n return this.insert - this.end;\n }", "deleteMax() {\n // recall that we have an empty position at the very front of the array, \n // so an array length of 2 means there is only 1 item in the heap\n\n if (this.array.length === 1) return null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if no nodes in tree, exit\n\n if (this.array.length === 2) return this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t// edge case- if only 1 node in heap, just remove it (2 bec. null doesnt count)\n\n let max = this.array[1];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// save reference to root value (max)\n\n this.array[1] = this.array.pop();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // remove last val in array (farthest right node in tree), and update root value with it\n\n this.siftDown(1);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// continuoully swap the new root toward the back of the array to maintain maxHeap property\n\n return max;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// return max value\n }", "size() {\n return this.sizeNum;\n }", "insert(data) {\r\n\t\tconst size = this.heap.length;\r\n\r\n\t\tif (size === 0) {\r\n\t\t\tthis.heap.push(data);\r\n\t\t} else {\r\n\t\t\tthis.heap.push(data);\r\n\r\n\t\t\tfor (let i = parseInt(this.heap.length / 2 - 1); i >= 0; i--) {\r\n\t\t\t\tthis.maxHeapify(this.heap, this.heap.length, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "nodeSize(node) {\n let size = 1;\n if (!node.children) {\n return size;\n }\n let children = this.getChild(node.children);\n do {\n size++;\n children = children.children\n ? this.getChild(children.children)\n : undefined;\n } while (children);\n return size;\n }", "get length(): number {\n // Provide a mechanism for a class to set length on push for O(1) lookup\n if (this.__length) {\n return this.__length;\n }\n\n return this._length(this.root);\n }", "size() {\n return this.nodes.length;\n }", "function heapWeight(i) {\n return weights[heap[i]]\n }", "extractMax() {\n\t\tconst max = this.heap[0];\n\t\tconst tmp = this.heap.pop();\n\t\tif (!this.empty()) {\n\t\t\tthis.heap[0] = tmp;\n\t\t\tthis.sinkDown(0);\n\t\t}\n\t\treturn max;\n\t}", "get length() {\n if (this.isDynamic) {\n return this.placeholderContext.resolve(this.allocation.size);\n }\n else {\n return this.allocation.size;\n }\n }", "function size() {\n out = 1;\n for (var dim in dimensions) {\n out *= dimensions[dim].members.length;\n }\n return out;\n }", "min() {\n if (this.heap.length == 0)\n throw Error(\"Heap is empty\");\n\n return this.heap[0];\n }", "get size() {\n\t\treturn this._l;\n\t}", "get size() {\n\t\treturn this._l;\n\t}", "get size() {\n\t\treturn this._l;\n\t}", "function BinaryHeap() {\n this.array = [];\n }", "size() {\n return this._size;\n }", "size() {\n let len = 0;\n let runner = this.head;\n\n while (runner) {\n len += 1;\n runner = runner.next;\n }\n return len;\n }", "get totalSize() {\n return this.length + (this.current ? 1 : 0);\n }", "size() {\n return this._size;\n }", "size() {\n return this._size;\n }", "size() {\n return this._size;\n }", "size() {\n let current = this.head;\n let counter = 0;\n while (current) {\n counter++;\n current = current.next;\n }\n return counter;\n }", "get length() {\n return stack.length;\n }", "size() {\n let count = 0;\n let node = this.head;\n while (node) {\n count++;\n node = node.both.next;\n }\n return count;\n }", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "size() {\n let output = 0;\n this.traverse((currentNode) => {\n output++;\n });\n return output;\n }", "function PriorityQueue() {\n this.heap = [];\n this.size = 0;\n}" ]
[ "0.8232244", "0.6720662", "0.6720662", "0.6595036", "0.658402", "0.6490136", "0.6471042", "0.64250314", "0.64119965", "0.636866", "0.6362219", "0.6324369", "0.6306118", "0.6303182", "0.62492096", "0.62391216", "0.62245953", "0.6194299", "0.61576664", "0.61351967", "0.6093203", "0.6073549", "0.6068318", "0.6066446", "0.60509115", "0.60509115", "0.6044252", "0.60250926", "0.6022354", "0.5996662", "0.5996662", "0.5981068", "0.5960992", "0.5951613", "0.5949226", "0.5949226", "0.59294534", "0.5927446", "0.5901933", "0.5897896", "0.5892234", "0.5889457", "0.58829445", "0.58829445", "0.58829445", "0.58778924", "0.58655727", "0.5858132", "0.5858066", "0.5852464", "0.5849926", "0.58403015", "0.58386457", "0.58386457", "0.58333224", "0.5829525", "0.5824754", "0.58198714", "0.5803857", "0.5803326", "0.5801384", "0.58000076", "0.5793527", "0.57904786", "0.5786135", "0.5785781", "0.5783159", "0.5778058", "0.57687664", "0.57645595", "0.57601124", "0.5752751", "0.57505625", "0.57463336", "0.5742516", "0.5731611", "0.57252204", "0.5720252", "0.57147026", "0.5713739", "0.5707602", "0.5707021", "0.57069993", "0.57069993", "0.57069993", "0.5706811", "0.5698575", "0.5665368", "0.56546897", "0.5653796", "0.5653796", "0.5653796", "0.5647185", "0.56469357", "0.5644176", "0.5642494", "0.5636589", "0.5623665", "0.56152385" ]
0.8241832
0
check if the heap is empty
isEmpty() { return this.heap.length === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function heapisEmpty() {\n return this.size == 0 ? true : false;\n}", "isEmpty() {\n return !this.heapContainer.length;\n }", "function isEmpty() {\n return this.top === 0;\n}", "heapHasIndex(index){\r\n if(index>=0 && index<this.heapContainer.length)\r\n return true;\r\n \r\n return false;\r\n }", "checkEmpty () {\n if (this.front === 0 && this.rear === 0) {\n return true\n }\n }", "function isEmpty(){\n return (queue.length === 0);\n }", "isEmpty() {\n return this.top === null;\n }", "isEmpty() {\n if (this.top === null){\n return true;\n } else {\n return false;\n }\n }", "get empty() {\n if(this.children.length === 0) {\n return true\n } else {\n return false\n }\n }", "queueIsFull() {\n return this.queue.length >= this.maxSize\n }", "isEmpty() {\n if (this._storage.head === null) {\n return true;\n }\n return false;\n }", "isEmpty() {\n return this.front == -1;\n }", "isEmpty() {\n if (this.queue.length) {\n return false;\n }\n return true;\n }", "function isEmptyQ(queue){\n queue.first === null;\n\n const currNode = queue.first;\n\n if(!currNode){\n // is empty!\n return true;\n } else {\n // not empty!\n return false;\n }\n}", "empty(){\r\n return this.size == 0;\r\n }", "isEmpty()\n {\n if(this.front===null)\n return true;\n else\n return false;\n }", "isEmpty(){\n return (this.rear +1 === this.front);\n }", "empty(){ return this.stack.length === 0; }", "isEmpty() {\n return this.queue.size() === 0;\n }", "isEmpty() {\n\t\treturn this.size === 0;\n\t}", "isEmpty() {\n return _size == 0;\n }", "isEmpty() {\n return this.items.length === 0; // return true if the queue is empty.\n }", "isEmpty() {\n return this._size === 0;\n }", "isEmpty () {\n return Boolean(this.queue.length === 0)\n }", "isEmpty() {\n return this.head === -1;\n }", "isFull() {\n return ((this.tail + 1) % this.size) === this.head;\n }", "function boardHasEmptySpaces() {\n let $emptySpaces = emptyBoardSpaceElements();\n return $emptySpaces.length > 0;\n}", "function isEmpty() {\n if (stack_top === -1) {\n return true;\n }\n return false;\n }", "isEmpty() {\n console.log(this.size === 0);\n }", "isEmpty() {\n return (this._size === 0);\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\n return this.size === 0;\n }", "isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "size() {\r\n\t\treturn this.heap.length;\r\n\t}", "size() {\r\n\t\treturn this.heap.length;\r\n\t}", "size() {\n\t\treturn this.heap.length;\n\t}", "isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}", "isEmpty() {\n if (this.Size > 0) {\n return true;\n }\n return false;\n }", "isFull() {\n if (this.front == 0 && this.rear == this.size - 1 || (this.rear + 1 == this.front)) {\n return true;\n }\n return false;\n }", "isEmpty() { \n return this.size == 0; \n }", "isEmpty(){ return this.size == 0; }", "isEmpty(){\n if(!this.head){\n console.log('Stack is empty');\n }\n }", "isEmpty() \n { \n return this.size == 0; \n }", "isEmpty() {\n return this.head === null;\n }", "isEmpty() {\n return this.head === null;\n }", "checkEmptyStack(numstack)\n {\n return (this.posting[numstack-1].length===0 || this.posting[numstack-1].length===null)\n }", "function isEmpty(stack) {\n return !stack.top;\n}", "function isEmpty(stack) {\n return !stack.top;\n}", "function isEmpty(stack) {\n return stack.length == 0\n}", "isEmpty() {\n return this.size == 0;\n }", "function isStackEmpty(stack){\n return !(stack.length>0);\n }", "function isStackEmpty()\r\n{\r\n\tif (this.intIndex == 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "isEmpty() {\n try {\n const diff = this._head - this._length\n if(diff >= 0) {\n this._revertToOriginal()\n }\n return diff >= 0 ? true : false\n } catch(err) {\n throw new Error(err)\n }\n }", "isEmpty() {\n return this.head == null;\n }", "isEmpty() {\n\t\tif (this.head == null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "isEmpty() {\n\t\tif (this.head == null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function _isStackEmpty()\n {\n if (this.intIndex == 0)\n return true;\n else\n return false;\n }", "isEmpty(){\n return this.size==0;\n }", "isEmpty(){\n let top = this.peek();\n return top == null || top == \"\";\n }", "empty () { return this.length === 0 }", "isEmpty() {\n if (this.head == null && this.tail == null){\n return true;\n }\n else {\n return false;\n }\n }", "function isStackEmpty()\n{\n\tif (this.intIndex == 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "get empty() {return !this._p.size;}", "isEmpty(){\r\n return this.head === null;\r\n }", "isFull() {\n return this.length() === this.capacity;\n }", "isEmpty() {\n return this.storage.length === 0;\n }", "isEmpty() {\n return !this.front;\n }", "function isEmpty(stack) {\n return stack.length === 0;\n}", "function isEmpty() {\n return N === 0;\n }", "isEmpty() {\n return this.vertexCount === 0;\n }", "isEmpty(){\n return (this.size === 0); \n }", "get isEmpty() {\n return this.#queue.length === 0;\n }", "isEmpty() {\n if (this.head) {\n return true;\n } else {\n return false;\n }\n }", "isEmpty() {\n if (this.head) {\n return true;\n } else {\n return false;\n }\n }", "get empty() {\n return this._head.next === this._tail;\n }", "isEmpty() {\n return this.catQueue.isEmpty() && this.dogQueue.isEmpty();\n }", "isEmpty() {\n return (this.elements > 0) ? false : true;\n }", "isEmpty() {\n return (this.elements > 0) ? false : true;\n }", "isEmpty() {\n if (this.#size == 0) {\n return true;\n } else {\n return false;\n }\n }", "isEmpty(){\n if(this.head == null){\n return true;\n }\n else{\n return false;\n }\n }", "isEmpty() {\n if (this.size == 0) {\n return true;\n }\n return false;\n }", "isFull() {\n return (this.lastIndex === (this.capacity() - 1));\n }", "isEmpty() {\n \n if (this.head == null){\n return true\n }\n else {\n return false\n }\n\n }", "isEmpty() {\n return this.head ? false : true\n }", "isEmpty() {\n if (this.head == this.tail) return true;\n return false;\n }", "empty() {\n\t\tif (this.size() === 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "isEmpty() {\n if (this.stack1.length == 0 && this.stack2.length == 0 ) {\n console.log(\"The two stack queue is empty.\");\n return true, this;\n }\n else {\n console.log(\"The two stack queue is not empty.\");\n return false, this;\n }\n }", "function isBoardFull(){\n let board = $box.map((index, currBox) => {\n let $currBox = $(currBox);\n return isEmpty($currBox);\n });\n return !board.get().includes(true);\n }", "isFull() {\n return (this.tail + 1) % this.capacty == this.head\n }", "isEmpty()\r\n {\r\n if(this.getSize() === 0){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "isFull(){\n if(this.maxSize){\n return this.size() === this.maxSize;\n }\n else{\n return false;\n }\n }", "isEmpty () {\n return this.queued.length === 0 && this.active.length === 0\n }", "isEmpty() {\n return 0 == this.q.length;\n }", "empty() { return this.m == 0; }", "isEmpty(){\n return this.count - this.lowestCount === 0;\n }" ]
[ "0.8801127", "0.7740314", "0.69832236", "0.6907285", "0.6777653", "0.6752135", "0.6746486", "0.67290246", "0.65971357", "0.6547033", "0.65308535", "0.6521938", "0.6514921", "0.65049946", "0.6492355", "0.64725035", "0.64722633", "0.6470793", "0.64603376", "0.64533764", "0.64189154", "0.64147365", "0.64121425", "0.64099336", "0.6407907", "0.6386726", "0.63847196", "0.63835406", "0.63575613", "0.6351252", "0.63450295", "0.63450295", "0.63450295", "0.63450295", "0.63450295", "0.633856", "0.6327916", "0.6327916", "0.6325016", "0.63243693", "0.6315395", "0.6313607", "0.6307072", "0.630354", "0.62965316", "0.6295238", "0.6276328", "0.6276328", "0.62669015", "0.62611616", "0.6251105", "0.6244401", "0.62405014", "0.62399167", "0.6235413", "0.62349766", "0.62334234", "0.6229515", "0.6229515", "0.6220916", "0.621215", "0.62019014", "0.61948025", "0.6193371", "0.6190803", "0.6188068", "0.61837274", "0.61815184", "0.61794376", "0.6178325", "0.61730874", "0.61690986", "0.6166842", "0.6165227", "0.615763", "0.6155618", "0.6155618", "0.6153883", "0.61406285", "0.61314684", "0.61314684", "0.612108", "0.6113774", "0.6112227", "0.6110725", "0.6094651", "0.60880136", "0.60770077", "0.6069082", "0.60665673", "0.60651433", "0.60649663", "0.60495555", "0.604129", "0.6039117", "0.60211825", "0.60201937", "0.5993393", "0.5983102" ]
0.82852596
2
returns the heap structure
getHeap() { return this.heap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Heap()\n{\n\t// h[0] not used, heap initially empty\n\n\tthis.h = [null]; // heap of integer keys\n\tthis.h_item = [null]; // corresponding heap of data-items (any object)\n\tthis.size = 0; // 1 smaller than array (also index of last child)\n\n\n\t// --------------------\n\t// PQ-required only; more could be added later when needed\n\t// the 2 basic shape maintaining operations heapify and reheapify simplify\n\t// processing functions\n\n\tthis.isEmpty = heapisEmpty; // return true if heap empty\n\tthis.deleteRoot = heapDeleteRoot; // return data-item in root\n\tthis.insert = heapInsert; // insert data-item with key\n\n\tthis.heapify = heapheapify; // make subtree heap; top-down heapify (\"sink\") used by .deleteRoot()\n\tthis.reheapify = heapreheapify; // bottom-up reheapify (\"swim\") used by .insert()\n\tthis.show = heapShow; \t // utility: return pretty formatted heap as string\n\t \t // ... etc\n\n\t// --------------------\n}", "function heapShow()\n{\n\tvar n = this.size;\n\tvar m = Math.floor(n/2); // last parent node\n\n\tvar k = this.h.slice(1,n+1), a = this.h_item.slice(1,n+1);\n\n\tvar out=\"<h2>Heap (size=\"+ n+ \"):</h2><p>Keys: \" + k + \"<br>Data: \"+ a + \"</p>\";\n\tfor (var i=1; i<=m; i++)\n\t{\n\t\tout += \"<p>\"+ i+ \": <b>\"+ this.h[i]+ \"(\"+ this.h_item[i]+ \")</b><ul>\";\n\t\tif ( 2*i <= n )\n\t\t\tout += \"<li>\"+ this.h[2*i]+ \"</li>\";\n\t\tif ( 2*i+1 <= n )\n\t\t\tout+= \"<li>\"+ this.h[2*i+1]+ \"</li>\";\n\t\tout+= \"</ul></p>\";\n\t}\n\n\treturn out;\n}", "function Heap(){\n this.heap = [];\n}", "function Heap(type) {\n var heapBuf = utils.expandoBuffer(Int32Array),\n indexBuf = utils.expandoBuffer(Int32Array),\n heavierThan = type == 'max' ? lessThan : greaterThan,\n itemsInHeap = 0,\n dataArr,\n heapArr,\n indexArr;\n\n this.init = function(values) {\n var i;\n dataArr = values;\n itemsInHeap = values.length;\n heapArr = heapBuf(itemsInHeap);\n indexArr = indexBuf(itemsInHeap);\n for (i=0; i<itemsInHeap; i++) {\n insertValue(i, i);\n }\n // place non-leaf items\n for (i=(itemsInHeap-2) >> 1; i >= 0; i--) {\n downHeap(i);\n }\n };\n\n this.size = function() {\n return itemsInHeap;\n };\n\n // Update a single value and re-heap\n this.updateValue = function(valIdx, val) {\n var heapIdx = indexArr[valIdx];\n dataArr[valIdx] = val;\n if (!(heapIdx >= 0 && heapIdx < itemsInHeap)) {\n error(\"Out-of-range heap index.\");\n }\n downHeap(upHeap(heapIdx));\n };\n\n this.popValue = function() {\n return dataArr[this.pop()];\n };\n\n this.getValue = function(idx) {\n return dataArr[idx];\n };\n\n this.peek = function() {\n return heapArr[0];\n };\n\n this.peekValue = function() {\n return dataArr[heapArr[0]];\n };\n\n // Return the idx of the lowest-value item in the heap\n this.pop = function() {\n var popIdx;\n if (itemsInHeap <= 0) {\n error(\"Tried to pop from an empty heap.\");\n }\n popIdx = heapArr[0];\n insertValue(0, heapArr[--itemsInHeap]); // move last item in heap into root position\n downHeap(0);\n return popIdx;\n };\n\n function upHeap(idx) {\n var parentIdx;\n // Move item up in the heap until it's at the top or is not lighter than its parent\n while (idx > 0) {\n parentIdx = (idx - 1) >> 1;\n if (heavierThan(idx, parentIdx)) {\n break;\n }\n swapItems(idx, parentIdx);\n idx = parentIdx;\n }\n return idx;\n }\n\n // Swap item at @idx with any lighter children\n function downHeap(idx) {\n var minIdx = compareDown(idx);\n\n while (minIdx > idx) {\n swapItems(idx, minIdx);\n idx = minIdx; // descend in the heap\n minIdx = compareDown(idx);\n }\n }\n\n function swapItems(a, b) {\n var i = heapArr[a];\n insertValue(a, heapArr[b]);\n insertValue(b, i);\n }\n\n // Associate a heap idx with the index of a value in data arr\n function insertValue(heapIdx, valId) {\n indexArr[valId] = heapIdx;\n heapArr[heapIdx] = valId;\n }\n\n // comparator for Visvalingam min heap\n // @a, @b: Indexes in @heapArr\n function greaterThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b],\n val1 = dataArr[idx1],\n val2 = dataArr[idx2];\n // If values are equal, compare array indexes.\n // This is not a requirement of the Visvalingam algorithm,\n // but it generates output that matches Mahes Visvalingam's\n // reference implementation.\n // See https://hydra.hull.ac.uk/assets/hull:10874/content\n return (val1 > val2 || val1 === val2 && idx1 > idx2);\n }\n\n // comparator for max heap\n function lessThan(a, b) {\n var idx1 = heapArr[a],\n idx2 = heapArr[b];\n return dataArr[idx1] < dataArr[idx2];\n }\n\n function compareDown(idx) {\n var a = 2 * idx + 1,\n b = a + 1,\n n = itemsInHeap;\n if (a < n && heavierThan(idx, a)) {\n idx = a;\n }\n if (b < n && heavierThan(idx, b)) {\n idx = b;\n }\n return idx;\n }\n }", "function heapreheapify() {\n\n var node = this.size; // set the size to heap\n var pn = Math.floor(node/2); // use math floor to set last parent node to pn = parent node\n\n var i = pn; // set new varibale and get value pn.\n while(i >= 1)\n {\n var key = i;\n var v = this.h[key];\n var v2 = this.h_item[key];\n var heap = false; // here intitalize heap with boolean value false\n\n for (var j = 2 * key; !heap && 2 * key <= node;)\n {\n if (j < node)\n {\n if (this.h[j] < this.h[j + 1]) {\n j += 1;\n } // end the inner if\n } // end the outer if\n\n\n if (v >= this.h[j])\n {\n heap = true;\n } // end if\n else\n {\n this.h_item[key] = this.h_item[j];\n this.h[key] = this.h[j];\n key = j;\n } // end wlse\n\n this.h[key] = v;\n this.h_item[key] = v2;\n }\n i = i-1; // here decreese the number in each iteration\n } // end while\n}", "heapify() {\n\t\t// last index is one less than the size\n\t\tlet index = this.size() - 1;\n\n\t\t/*\n Property of ith element in binary heap - \n left child is at = (2*i)th position\n right child is at = (2*i+1)th position\n parent is at = floor(i/2)th position\n */\n\n\t\t// converting entire array into heap from behind to front\n\t\t// just like heapify function to create it MAX HEAP\n\t\twhile (index > 0) {\n\t\t\t// pull out element from the array and find parent element\n\t\t\tlet element = this.heap[index],\n\t\t\t\tparentIndex = Math.floor((index - 1) / 2),\n\t\t\t\tparent = this.heap[parentIndex];\n\n\t\t\t// if parent is greater or equal, its already a heap hence break\n\t\t\tif (parent[0] >= element[0]) break;\n\t\t\t// else swap the values as we're creating a max heap\n\t\t\tthis.heap[index] = parent;\n\t\t\tthis.heap[parentIndex] = element;\n\t\t\tindex = parentIndex;\n\t\t}\n\t}", "function BinaryHeap() {\n this.array = [];\n }", "getRoot() {\n if(this.heap_size <= 0) {\n console.log(\"Heap underflow\");\n return null;\n }\n return this.harr[0];\n }", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "constructor(){\n this.heap = [];\n this.count = 0;\n }", "function BinaryHeap() {\n this.nodes = [];\n}", "function heapDeleteRoot()\n{\n\tif (!this.isEmpty()) { \n\t\t// save root key and item pair\n\t\tvar root = [ this.h[1], this.h_item[1] ]; \n }\n\telse { //if heap is empty\n\t\treturn \"The heap is empty\";\n\t}\n\t// ... complete\n\tthis.h_item[1] = this.h_item[this.size];\n\n this.h[1] = this.h[this.size];\n this.heapify(1);\n\t\n //decrease the heap size by 1 since we delete from it\n this.size = this.size-1;\n\n\treturn root;\n}", "function minheap_extract(heap) {\n swap(heap,0,heap.length - 1);\n var to_pop = heap.pop();\n var parent = 0;\n var child = parent * 2 + 1;\n while(child < heap.length){\n if(child + 1 < heap.length && heap[child] > heap[child + 1]){\n child = child + 1;\n }\n if(heap[child] < heap[parent]){\n swap(heap,child,parent);\n parent = child;\n child = parent * 2 + 1; \n }\n else{\n break;\n }\n }\n return to_pop;\n // STENCIL: implement your min binary heap extract operation\n}", "function MinHeap(){\n\tthis.maxIndex = -1;\n\tthis.arr = {};\n}", "constructor() {\n\t\tthis.heap = [];\n\t}", "function heapify (heap) {\n // Get the parent idx of the last node\n var start = iparent(heap.arr.length - 1)\n while (start >= 0) {\n siftDown(start, heap)\n start -= 1\n }\n return heap\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function h$HeapSet() {\n this._keys = [];\n this._prios = [];\n this._vals = [];\n this._size = 0;\n}", "function setupHeap(lists) {\n var heap = new MinHeap();\n for (var i = 0; i < lists.length; i++) {\n var node = new ListNode(lists[i][0], lists[i][1]);\n heap.insert(node);\n }\n return heap;\n}", "static heapInMemory() {\n return this.inMemory(function () {\n return new Heap();\n }, (heap) => {\n return heap.array;\n }, (array) => {\n return new Heap(array);\n });\n }", "buildMaxHeap() {}", "toString() {\n return this.heapContainer.toString();\n }", "getHead() {\n return this.maxheap[1]\n }", "function make_heap_obj(node1_id, node2_id, weight) {\n return [node1_id, node2_id, weight];\n }", "function Heap(key) {\n this._array = [];\n this._key = key || function (x) { return x; };\n}", "function MinHeap() {\n\n /**\n * Insert an item into the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} x\n */\n this.insert = function(x) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:)\n *\n * @return{number}\n */\n this.peek = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Remove and return the smallest value in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.pop = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the size of the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{number}\n */\n this.size = function() {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Convert the heap data into a string\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @return{string}\n */\n MinHeap.prototype.toString = function() {\n // INSERT YOUR CODE HERE\n }\n\n /*\n * The following are some optional helper methods. These are not required\n * but may make your life easier\n */\n\n /**\n * Get the index of the parent node of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var parent = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Get the index of the left child of a given index\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @return{number}\n */\n var leftChild = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Swap the values at 2 indices in our heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n * @param{number} j\n */\n var swap = function(i, j) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble up the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleUp = function(i) {\n // INSERT YOUR CODE HERE\n }\n\n /**\n * Starting at index i, bubble down the value until it is at the correct\n * position in the heap\n *\n * Time Complexity:\n * Space Complexity:\n *\n * @param{number} i\n */\n var bubbleDown = function(i) {\n // INSERT YOUR CODE HERE\n }\n}", "allocateHeap(hexData) {\n let addr = \"H\" + this.heapLength++; //Create placeholder address\n this.heap[addr] = { data: hexData, loc: \"\" };\n return addr;\n }", "function displayHeap() {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i].father == arr[i]) {\n arr[i].x = width / 2;\n arr[i].y = 100;\n }\n else {\n if (arr[i] == arr[i].father.leftson)\n arr[i].x = arr[i].father.x - arr[i].father.gap;\n else if (arr[i] == arr[i].father.rightson)\n arr[i].x = arr[i].father.x + arr[i].father.gap;\n\n arr[i].y = arr[i].father.y + 50;\n }\n }\n\n for (var ii = 0; ii < arr.length; ii++)\n arr[ii].edge = new edge(arr[ii]);\n}", "function makeHeap(){\n\n //add a node to a heap and set it to current\n if(makeHeapStep == 1){\n heapAddNode();\n return;\n }else if(makeHeapStep == 2){ //Swim the node up if needed\n\n //We are at the start of the heap. No more swimming possible\n if(currentHeapPosition == 0){\n setNodeOneHeap();\n heapSwimStep = 1;\n \n \n return;\n }\n\n if(heapSwimStep == 1){ //set the parent Node\n heapSetParent();\n }else if(heapSwimStep == 2){ //compare to the parent Node\n if(orderArray[currentHeapPosition] > orderArray[heapParentIndex]){ //we must swap\n heapSwapWithParent();\n }else{ //do not swap. Node is now in the heap proper\n setToHeap();\n }\n \n heapSwimStep = 1;\n }\n }\n\n //sorting is now done\n if(heapSize == numNodes){\n doneMakingHeap = true;\n heapOldPosition = -1;\n addStep(\"The heap is now complete.\");\n }\n}", "function minheap_extract(heap) \n{\n var PrintE;\n PrintE = heap[0];\n heap[0] = heap[heap.length - 1];\n\n var a,large;\n var temp = heap.pop();\n for (a=0;a<heap.length;a=large)\n {\n if (2*a+2>heap.length)\n {break;}\n if (heap[2*a+1] > heap[2*a+2]) // use to swap those two numbers\n {\n if (heap[a]>heap[2*a+2])\n {\n temp = heap [a];\n heap[a] = heap[2*a+2];\n heap[2*a+2] = temp; \n large = 2*a+2; \n }\n else\n {break;}\n }\n else\n {\n if (heap[a]>heap[2*a+1])\n {\n temp = heap [2*a+1];\n heap[2*a+1] = heap[a];\n heap[a] = temp; \n large = 2*a+1;\n }\n else\n {break;}\n }\n }\n return PrintE;\n}", "function BinaryHeap(scoreFunction){\n this.content = [];\n this.scoreFunction = scoreFunction;\n}", "function BinaryHeap(scoreFunction){\n this.content = [];\n this.scoreFunction = scoreFunction;\n}", "function buildHeap(arr, type) {\n // gets the last index\n var lastIndex = arr.length - 1;\n // While the last index is greater than 0\n while (lastIndex > 0) {\n // get the parent index\n var parentIndex = Math.floor((lastIndex - 1) / 2);\n // get the items inside the parent\n // and the last index \n var lastItem = arr[lastIndex];\n var parentItem = arr[parentIndex];\n\n if (type === 'maxHeap') {\n // checks to see if the lastItem is greater\n // than the parentItem if so then do a swap\n if (lastItem > parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n else if (type === 'minHeap') {\n // checks to see if the lastItem is less\n // than the parentItem if so then do a swap\n if (lastItem < parentItem) {\n // replaces item at parentIndex with\n // last item and do the same for the\n // lastIndex\n arr[parentIndex] = lastItem;\n arr[lastIndex] = parentItem;\n\n // Keeps track of the lastItem that was\n // inserted by changing the lastIndex \n // to be the parentIndex which is \n // currently where the lastItem is located\n lastIndex = parentIndex;\n }\n else {\n break;\n }\n }\n\n }\n }", "function heap(a, lo, hi) {\n\t var n = hi - lo,\n\t i = (n >>> 1) + 1;\n\t while (--i > 0) sift(a, i, n, lo);\n\t return a;\n\t }", "function BinaryHeap(scoreFunction) {\r\n this.content = [];\r\n this.scoreFunction = scoreFunction;\r\n}", "function minheap_extract(heap) {\n var min = heap[0];\n heap[0] = heap.pop();\n var index = 0;\n while(true){\n var child1 = (index+1)*2;\n var child2 = child1 -1;\n var toSwap = null;\n if(heap[index] > heap[child1]){\n toSwap = child1;\n }\n if(heap[index] > heap[child2] &&\n (heap[child1] == null || (heap[child1] !== null && heap[child2] < heap[child1]))){\n toSwap = child2;\n }\n if(toSwap == null){\n break;\n }\n var temp = heap[toSwap];\n heap[toSwap] = heap[index];\n heap[index] = temp;\n index = toSwap;\n }\n return min;\n // STENCIL: implement your min binary heap extract operation\n}", "buildHeap(left, right) {\r\n var x = this.values[left];\r\n var i = left;\r\n\r\n while(true) {\r\n let j = 2 * i;\r\n if (j > right) break;\r\n if ((j < right) && (Item.compare(this.values[j + 1], this.values[j]) >= 0)) {\r\n j++;\r\n }\r\n\r\n if (Item.compare(x, this.values[j]) >= 0) break;\r\n let temp = this.values[i];\r\n this.values[i] = this.values[j];\r\n this.values[j] = temp;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n i = j;\r\n }\r\n\r\n this.values[i] = x;\r\n\r\n this.values[i].selected = true;\r\n this.printStorage.pushTimedPrint(this.values);\r\n this.values[i].selected = false;\r\n }", "function BinaryHeap(scoreFunction){\n this.content = [];\n this.scoreFunction = scoreFunction;\n}", "function BinaryHeap(options) {\n options = options || {};\n\n this._elements = options.elements || [];\n this._score = options.score || this._score;\n}", "buildHeap(array) {\n const firstParentIdx = Math.floor((array.length - 2) / 2);\n for (let currentIdx = firstParentIdx; currentIdx >= 0; currentIdx--) {\n this.siftDown(currentIdx, array.length - 1, array);\n }\n return array;\n }", "size() {\r\n\t\treturn this.heap.length;\r\n\t}", "size() {\r\n\t\treturn this.heap.length;\r\n\t}", "function SimpleHeap(f) {\n var data = [];\n\n // By default just use standard comparison\n var compareFunc = f;\n if (!compareFunc) {\n compareFunc = function(a,b) {\n if (a < b) return -1;\n return 1;\n }\n }\n\n this.insert = function(x) {\n data.push(x);\n data.sort(compareFunc);\n }\n\n this.pop = function() {\n return data.pop();\n }\n\n this.peek = function() {\n return data[data.length - 1];\n }\n\n this.size = function() {\n return data.length;\n }\n\n SimpleHeap.prototype.toString = function() {\n return data.toString();\n }\n}", "function PriorityQueue() {\n this.heap = [];\n this.size = 0;\n}", "size() {\n\t\treturn this.heap.length;\n\t}", "function buildHeap(A) {\n var n = A.length;\n for (var i = n/2 - 1; i >= 0; i--) {\n heapify(A, i, n);\n }\n}", "extractMax(){\n // bubble down\n // swap first and last element.\n // then pop\n [this.values[0],this.values[this.values.length-1]] = [this.values[this.values.length-1], this.values[0]]\n // console.log(element + ' removed from the heap');\n this.values.pop();\n let index = 0;\n while(true){\n // compare with both the children and swap with the larger one.\n let leftParent = 2 * index + 1;\n let rightParent = 2 * index + 2;\n if(this.values[index] < this.values[leftParent] || this.values[index] < this.values[rightParent]){\n if(this.values[leftParent] > this.values[rightParent]){\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent;\n\n }\n else if(this.values[rightParent] > this.values[leftParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent;\n }\n else {\n if(this.values[rightParent]){\n [this.values[index], this.values[rightParent]] = [this.values[rightParent], this.values[index]]\n index = rightParent\n }\n else {\n [this.values[index], this.values[leftParent]] = [this.values[leftParent], this.values[index]]\n index = leftParent\n }\n \n };\n }\n else return;\n }\n }", "function heapSort(inputArr){\n var heap = new Heap;\n for(i=0; i<inputArr.length; i++){\n heap.add(inputArr[i])\n }\n var outputArr = []\n for(i=0; i<inputArr.length; i++){\n outputArr.push(heap.remove())\n }\n console.log(outputArr)\n return outputArr\n}", "function heapSort(arr){\n var sorted = [];\n var heap1 = new MaxHeap();\n \n for(let i=0; i<arr.length; i++){\n heap1.insert(arr[i]);\n }\n \n for(let i=0; i<arr.length; i++){\n sorted.push(heap1.delete());\n }\n return sorted;\n}", "function maxHeapBuild(arr) {\n if (arr.length <= 1) return;\n createHeap(arr, arr.length);\n return arr;\n}", "function heap(a, lo, hi) {\n var n = hi - lo,\n i = (n >>> 1) + 1;\n while (--i > 0) sift(a, i, n, lo);\n return a;\n }", "function maxHeapify(arr){\n\n}", "get HEAP8() {\n return libzip_1.default.HEAP8;\n }", "peek() {\n return this.heap[0];\n }", "delete() {\n // implement delete\n // only delete if the heap has elements\n if (this.heap.length > 0) {\n // save the smallest element\n let smallest = this.heap[0];\n // swap the last element in the heap whatever it is \n this.heap[0] = this.heap[this.heap.length -1];\n this.heap.pop();\n this.minHeapifyDown(0, this.heap);\n return smallest;\n }\n }", "min() {\n return this.heap[1];\n }", "function heapSort(array){\n // 1: Construction\n let heap = new MaxHeap()\n array.forEach(ele => {\n heap.insert(ele)\n });\n\n// 2: sortdown \n let sorted = []\n while (heap.array.length > 1){\n sorted.push(heap.deleteMax())\n }\n return sorted\n}", "function startHeap(){\n makeHeapStep = 1;\n numHeapNodes = 1;\n orderArray = getOrder();\n console.log(orderArray);\n heapSize = 0; \n heapStarted = true;\n heapSwimStep = 1;\n heapOldPosition = -1;\n doneMakingHeap = false;\n sortHeapStep = 1;\n heapSinkStep = 1\n}", "function Heap(size) {\n this.size = size;\n // A map of size classes per chunk (see above).\n this._sizeMap = {};\n this._buffer = new Buffer(size);\n this._remaining = size; // the whole thing is available.\n this._offset = 0; // start of the buffer.\n // Initialize the freelists.\n this._freeLists = new Array(Heap._numSizeClasses);\n for (var i = 0; i < Heap._numSizeClasses; i++) {\n this._freeLists[i] = [];\n }\n }", "function heapAddNode(){\n setClass(nodes[heapSize], 2, \"Current\"); //set the first Node to the heap\n currentHeapPosition = heapSize;\n addStep(\"Add Node \" + (heapSize + 1) + \" to the heap and set it to \\\"current\\\".\");\n makeHeapStep = 2;\n}", "min() {\n if (this.heap.length == 0)\n throw Error(\"Heap is empty\");\n\n return this.heap[0];\n }", "function generateHeapCellHtml(row){\n var cellDisplayState = 'display:none;';\n if (isMemberRowExpanded[row.diskStoreUUID]) {\n cellDisplayState = 'display:block;';\n }\n\n var heapHtml = \"NA\";\n var heapStorageHtml = \"NA\";\n var heapExecutionHtml = \"NA\";\n\n if(row.memberType.toUpperCase() !== \"LOCATOR\"){\n var heapUsed = convertSizeToHumanReadable(row.heapMemoryUsed);\n var heapSize = convertSizeToHumanReadable(row.heapMemorySize);\n heapHtml = heapUsed[0] + \" \" + heapUsed[1]\n + \" / \" + heapSize[0] + \" \" + heapSize[1];\n var heapStorageUsed = convertSizeToHumanReadable(row.heapStoragePoolUsed);\n var heapStorageSize = convertSizeToHumanReadable(row.heapStoragePoolSize);\n heapStorageHtml = heapStorageUsed[0] + \" \" + heapStorageUsed[1]\n + \" / \" + heapStorageSize[0] + \" \" + heapStorageSize[1];\n var heapExecutionUsed = convertSizeToHumanReadable(row.heapExecutionPoolUsed);\n var heapExecutionSize = convertSizeToHumanReadable(row.heapExecutionPoolSize);\n heapExecutionHtml = heapExecutionUsed[0] + \" \" + heapExecutionUsed[1]\n + \" / \" + heapExecutionSize[0] + \" \" + heapExecutionSize[1];\n }\n var jvmHeapUsed = convertSizeToHumanReadable(row.usedMemory);\n var jvmHeapSize = convertSizeToHumanReadable(row.totalMemory);\n var jvmHeapHtml = jvmHeapUsed[0] + \" \" + jvmHeapUsed[1]\n + \" / \" + jvmHeapSize[0] + \" \" + jvmHeapSize[1];\n\n var heapCellHtml =\n '<div style=\"width: 95%; float: left; padding-right:10px;'\n + 'text-align:right;\">' + heapHtml\n + '</div>'\n + '<div class=\"cellDetailsBox\" id=\"'+ row.diskStoreUUID + '-heap\" '\n + 'style=\"width: 90%; ' + cellDisplayState + '\">'\n + '<span><strong>JVM Heap:</strong>'\n + '<br>' + jvmHeapHtml\n + '<br><strong>Storage Memory:</strong>'\n + '<br>' + heapStorageHtml\n + '<br><strong>Execution Memory:</strong>'\n + '<br>' + heapExecutionHtml\n + '</span>'\n + '</div>';\n return heapCellHtml;\n}", "remove() {\n if (this.heap.length < 2) {\n return this.heap.pop(); //easy\n }\n\n const removed = this.heap[0]; // save to return later\n this.heap[0] = this.heap.pop(); // replace with last el\n\n let currentIdx = 0;\n let [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n let currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n // right if heap[right].priority >= heap[left].priority, else left\n // index of max(left.priority, right.priority)\n\n while (\n this.heap[currentChildIdx] && this.heap[currentIdx].priority <= this.heap[currentChildIdx].priority\n ) {\n let currentNode = this.heap[currentIdx];\n let currentChildNode = this.heap[currentChildIdx];\n\n // swap parent & max child\n\n this.heap[currentChildIdx] = currentNode;\n this.heap[currentIdx] = currentChildNode;\n\n\n // update pointers\n currentIdx = currentChildIdx;\n [left, right] = [currentIdx * 2 + 1, currentIdx * 2 + 2];\n currentChildIdx = (\n this.heap[right] && this.heap[right].priority >= this.heap[left].priority ? right : left\n );\n }\n\n return removed;\n }", "poll() {\r\n let rootElement = null;\r\n if (this.isEmpty()) {\r\n rootElement = null;\r\n } else if (this.hasSingleElement()) {\r\n rootElement = this.heapContainer.pop();\r\n } else { \r\n rootElement = this.heapContainer[0];\r\n this.heapContainer[0] = this.heapContainer.pop();\r\n this.heapifyDown();\r\n }\r\n \r\n return rootElement;\r\n }", "function heapify(arr) {\n if (arr.length < 1) return arr\n for (let i = arr.length - 1; i >= 0; i--) {\n minHeapify(arr, i)\n }\n return arr\n}", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "remove() {\n if (this.heap.length === 0) {\n return null;\n }\n const item = this.heap[0];\n this.heap[0] = this.heap[this.heap.length - 1];\n this.heap.pop();\n this.heapifyDown();\n return item;\n }", "function heap(compareFunction, array = []) {\n const data = array;\n const heapSort = ()=>{data.sort(compareFunction)};\n const add = function (node) {\n data.push(node);\n heapSort();\n };\n\n const remove = function () {\n const node = data.shift();\n return node;\n };\n\n const empty = function () {\n return data.length === 0;\n };\n const updateItems = function () {\n heapSort();\n };\n return {\n data: data,\n add: add,\n remove: remove,\n empty: empty,\n update: updateItems,\n };\n}", "peek() {\n return (this.heap.length) ? this.heap[0] : null;\n }", "function heapifyStandart(currentIndex, heapSize ,arr){\n\n var largestElement = currentIndex\n var leftIndex = 2 * currentIndex + 1\n var rightIndex = 2 * currentIndex + 2\n\n if (leftIndex < heapSize && arr[currentIndex] < arr[leftIndex]){\n largestElement = leftIndex\n }\n \n if (rightIndex < heapSize && arr[largestElement] < arr[rightIndex]){\n largestElement = rightIndex\n }\n\n if (largestElement != currentIndex){\n swapArrayElement(currentIndex, largestElement, arr)\n heapifyStandart(largestElement, heapSize, arr)\n }\n}", "function _main()\n{\n\nvar heap = new Heap();\n //operation sequence from the Figure :\n var ListOfSequence = [\n\t\t{KEY: 2, Vlaue: \"a\"},\n\t\t{KEY: 9, Vlaue: \"b\"},\n\t\t{KEY: 7, Vlaue: \"c\"},\n\t\t{KEY: 6, Vlaue: \"d\"},\n\t\t{KEY: 5, Vlaue: \"e\"},\n\t\t{KEY: 8, Vlaue: \"f\"}];\n\n\tfor (var i = 0; i < ListOfSequence.length; i++) {\n\t\theap.insert(ListOfSequence[i].KEY , ListOfSequence[i].Vlaue);\n\t}\n document.write(heap.show());\n heap.insert(10, \"g\");\n document.write(heap.show());\n heap.insert(15, \"h\");\n document.write(heap.show());\n\n\n // set input graph properties then implement the graph\n var g = new Graph();\n g.label = \"Exercise 9.2: 1b (Levitin, 3rd edition)\";\n g.readGraph(_v, _e);\n g.printGraph();\n\n\n\n\n/** print output of first prim------------------------------------------------*/\n\n document.write('<br>MST by first Prim<br>');\n\n g.primImpl1();\n for (var i = 0; i < g.Prim_Edge.length; i++) {\n document.write(\"(\", g.Prim_Edge[i].v, \",\", g.Prim_Edge[i].u, \")\");\n \tg.Prim_Edge.length-1 == i ? document.write(\".<p>\") : document.write(\", \");\n\t}\n\n/**print output of second prim---------------------------------------*/\n\ndocument.write(\"<br>MST by Prim2 (PQ-Heap): <br>\");\n g.primImpl2();\n\n for (var n = 0; n < g.verticesTree.length; n++) {\n if (g.verticesTree[n].parent != null) {\n document.write(\"(\", g.verticesTree[n].parent, \",\", g.verticesTree[n].V, \")\");\n g.Prim_Edge.length-1 == i ? document.write(\".<p>\") : document.write(\", \");\n } else if (g.verticesTree[n].parent == null) {\n document.write(\"(-, \", g.verticesTree[n].tree, \"), \");\n }\n }\n\n}", "function heapSort(array){\n let heapify = new MinHeap;\n let sortedArray = [];\n let length = array.length;\n\n for(let i = 0; i < length; i++){\n heapify.add(array.pop());\n }\n\n for(let j = 0; j < length; j++){\n sortedArray.push(heapify.extract());\n }\n\n return sortedArray;\n}", "function build_initial_heap(ast) {\n var state = {heap: {}, stack: [{}], next: 0, dump: [], heapinfo: {}, user_types: {}};\n var decls = ast[\"decls\"];\n\n _(decls).map(function(n) {\n return compileDecl[n[\"node\"]](n, state);\n });\n\n return state;\n }", "function minheap_insert(heap, new_element) {\n var length = heap.push(new_element);\n var child = length - 1;\n var parent = (child + child%2)/2 - 1;\n while(parent >= 0 && heap[child] < heap[parent]){\n swap(heap,parent,child);\n child = parent;\n parent = (child + child%2)/2 - 1;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "static buildMaxHeap(a) {\n a.heap_size = a.length;\n\n // Max-heapify the first n/2 elements as\n // they are tree nodes, and the remaining are\n // usually tree leaves\n let mid = parseInt(a.length / 2);\n for (let i = mid; i >= 0; i -= 1) {\n Heap.maxHeapify(a, i);\n }\n }", "function extractMin(heap) {\n if (heap.length < 1) return null\n // swap first and last element\n let temp = heap[0]\n heap[0] = heap[heap.length-1]\n heap[heap.length-1] = temp\n\n const result = heap.pop()\n minHeapify(heap, 0)\n return result\n}", "function heapSortV2(array) {\n\n for (let i = array.length - 1; i >= 0; i--) { // 1) loop through array, and convert it to maxHeap using heapify helper\n heapify(array, array.length, i); // array length not really used for this part\n }\n\n for (let endOfHeap = array.length - 1; endOfHeap >= 0; endOfHeap--) { // 2) loop from end of maxHeap to begin/left, and \"delete\" max val until heap region is \"empty\"\n [array[endOfHeap], array[0]] = [array[0], array[endOfHeap]]; // 3) swap the root of the heap with the last element of the heap, this shrinks the heap by 1 and grows the sorted array by 1\n\n console.log(array);\n\n heapify(array, endOfHeap, 0); // 4) sift down the new root, but not past the end of the heap\n }\n\n return array;\n}", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "function minheap_insert(heap, new_element) {\n heap.push(new_element);\n var index = heap.length - 1;\n while(index > 0){\n var parent = Math.floor((index+1)/2)-1;\n if(heap[parent] > new_element){\n var temp = heap[parent];\n heap[parent] = new_element;\n heap[index] = temp;\n }\n index = parent;\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function FibonacciHeap() {\n if (!(this instanceof FibonacciHeap)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // initialize fields\n\n\n this._minimum = null;\n this._size = 0;\n }", "function FibonacciHeap() {\n if (!(this instanceof FibonacciHeap)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // initialize fields\n\n\n this._minimum = null;\n this._size = 0;\n }", "function heapify(arr,comp){\r\n // arr[n/2-1:n-1] already satisfies the heap property because they are the leaves.\r\n for(let i = Math.floor((arr.length-2)/2); i >= 0; i--){\r\n // Restore the heap property for i\r\n siftDown(arr, comp, i);\r\n }\r\n // Now that the heap property is satisfied for all i from 0 to n-1, the array is a heap\r\n}", "function MaxHeap(array){\r\n Heap.call(this, array);\r\n \r\n // Build-max-heap method: produces a max-heap from an unordered input array\r\n // The elements in the subarray A[(floor(n/2)+1) .. n] are all leaves of the tree, and so\r\n // start doing Float-down from the top non-leave element ( floor(A.length/2) ) to the bottom ( A[i] )\r\n for (var i = Math.floor( this.heapSize / 2 ); i>0; i--){\r\n this.floatDownElementOfIndex(i)\r\n }\r\n}", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "heapify() {\n if (this.size() < 2) return;\n for (let i = 1; i < this.size(); i++) {\n this.bubbleUp(i);\n }\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "poll(){\n if(this.length()==1)return this.heap.pop()\n\n let result=this.heap[0]\n this.heap[0]=this.heap.pop()\n this.bubbleDown(0)\n return result\n }", "function heapWeight(i) {\n\t return weights[heap[i]]\n\t }", "function heapWeight(i) {\n\t return weights[heap[i]]\n\t }", "heapifyDown(){\n let idx = 0,\n element = this.values[idx],\n swap,\n leftChildIdx,\n rightChildIdx,\n leftChild,\n rightChild;\n while (true){\n swap = null;\n leftChildIdx = (2 * idx) + 1;\n rightChildIdx = (2 * idx) + 2;\n leftChild = leftChildIdx < this.values.length ? this.values[leftChildIdx] : null;\n rightChild = rightChildIdx < this.values.length ? this.values[rightChildIdx] : null;\n if (leftChild <= rightChild && leftChild < element && leftChild !== null){\n swap = leftChildIdx\n }\n if (leftChild >= rightChild && rightChild < element && rightChild !== null){\n swap = rightChildIdx;\n }\n if (swap === null) break;\n this.values[idx] = this.values[swap];\n this.values[swap] = element;\n idx = swap; \n } \n }", "heapify(currentParent) {\n let left = this.left(currentParent);\n let right = this.right(currentParent);\n let bestParent = currentParent;\n\n // looking for the best parent that fulfills the heap property for this node and it's children\n if (left < this.size && !this.validParent(left, bestParent)) {\n bestParent = left;\n }\n if (right < this.size && !this.validParent(right, bestParent)) {\n bestParent = right;\n }\n\n // if the current parent is not the best parent, we have some work to do\n if (currentParent != bestParent) {\n // swapping new parent with old parent\n let currentParentValue = this.heap[currentParent];\n this.heap[currentParent] = this.heap[bestParent];\n this.heap[bestParent] = currentParentValue;\n\n // set locations on the swap\n this.locations.set(this.hash(this.heap[bestParent]), bestParent);\n this.locations.set(this.hash(this.heap[currentParent]), currentParent);\n\n // recurse from the best parent's old position\n this.heapify(bestParent);\n }\n }", "function pq_insert(heap, new_element) {\n var eIntIdx = heap.length;\n var prntIdx = Math.floor((eIntIdx - 1 ) / 2);\n heap.push(new_element);\n var heaped = (eIntIdx <= 0) || (heap[prntIdx].priority <= heap[eIntIdx]).priority;\n\n while(!heaped){\n var tmp = heap[prntIdx];\n heap[prntIdx] = heap[eIntIdx];\n heap[eIntIdx] = tmp;\n\n eIntIdx = prntIdx;\n prntIdx = Math.floor((eIntIdx - 1)/2);\n heaped = (eIntIdx <= 0) ||(heap[prntIdx].priority <= heap[eIntIdx].priority);\n }\n // STENCIL: implement your min binary heap insert operation\n}", "function insert(maxHeap, value) {\n let currentIndex = maxHeap.length;\n let parent = Math.floor((currentIndex - 1) / 2);\n maxHeap.push(value);\n while (maxHeap[currentIndex] > maxHeap[parent]) {\n let temp = maxHeap[parent];\n maxHeap[parent] = maxHeap[currentIndex];\n maxHeap[currentIndex] = temp;\n currentIndex = parent;\n parent = Math.floor((currentIndex - 1) / 2);\n }\n return maxHeap;\n}" ]
[ "0.7372717", "0.7307348", "0.7011272", "0.6944502", "0.69332767", "0.6875817", "0.6830716", "0.6772608", "0.6742784", "0.6742784", "0.6671171", "0.66410375", "0.6612922", "0.6560505", "0.6552577", "0.65003353", "0.6475312", "0.6475312", "0.6475312", "0.6475312", "0.6440758", "0.64238054", "0.6406391", "0.6403313", "0.6397833", "0.6360772", "0.6356306", "0.6356154", "0.6333905", "0.63059485", "0.62865573", "0.626258", "0.62353927", "0.62353927", "0.6234043", "0.62239444", "0.62157536", "0.61793935", "0.6164515", "0.6156568", "0.61380476", "0.6132039", "0.60622555", "0.60622555", "0.60527307", "0.6024933", "0.6020929", "0.600897", "0.59998244", "0.59827125", "0.5959588", "0.59465295", "0.59389997", "0.5932473", "0.59115505", "0.5824829", "0.58123994", "0.5794111", "0.57884043", "0.57761925", "0.577206", "0.5752562", "0.57471824", "0.57463634", "0.5732342", "0.57160807", "0.5697671", "0.56517076", "0.56517076", "0.56483126", "0.5643262", "0.56414926", "0.5576851", "0.55709165", "0.55655974", "0.55498785", "0.5547026", "0.5542077", "0.5539308", "0.55371356", "0.55371356", "0.55200267", "0.55154496", "0.55154496", "0.5507538", "0.5507194", "0.5506195", "0.5506195", "0.55061704", "0.55061704", "0.55061704", "0.55061704", "0.55061704", "0.5499725", "0.5499725", "0.54900473", "0.5479493", "0.547868", "0.5478141" ]
0.74754506
1
function that sets time and displays on screen
function setTime() { //set interval function var timerInterval = setInterval(function () { secondsLeft--; timeEl.textContent = secondsLeft + " seconds left till game ends."; if (secondsLeft === 0) { clearInterval(timerInterval); endGame(); //displays message at end of game } }, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set_time( t ){ this.current_time = t; this.draw_fg(); return this; }", "function displayTime() {\n var today = new Date();\n \n //gathers information about current hour, min and sec. \n //Add zero at the head if it is a single digit number.\n var currentHour = addZero(today.getHours());\n var currentMin = addZero(today.getMinutes());\n var currentSec = addZero(today.getSeconds());\n \n // for formatting the display.\n hourElement.innerHTML = currentHour + \":\";\n minElement.innerHTML = currentMin + \":\";\n secElement.innerHTML = currentSec;\n }", "function time() {\n\t// storing the variable of the Date() function to call on to get hours, minutes, seconds\n\tvar current = new Date()\n\t// Storing the variables of hours, minutes, seconds\n\tvar currentHour = current.getHours()\n\tvar currentMinutes = current.getMinutes()\n\tvar currentSeconds = current.getSeconds()\n\t// changing the hours to to standard time instead of military time\n\tif(currentHour > 12) {\n\t\t// removing 12 hours from clock to make standard time\n\t\tcurrentHour = currentHour - 12\n\t}\n\t// at hour 00 in military aka midnight\n\tif(currentHour == 0) {\n\t\t// adding 12 hours so the clock reads 12 instead of 00\n\t\tcurrentHour = currentHour + 12\n\t}\n\tminutes = addZero(currentMinutes)\n\tseconds = addZero(currentSeconds)\n\t// adding the information to the div in my html\n\tdocument.getElementById(\"time\").textContent =\"Time: \" + currentHour + \":\" + minutes + \":\" + seconds\n\t// making the fuction time run every second\n\tsetTimeout(function() {\n\t\ttime()\n\t\t// 1000 milliseconds = 1 second\n\t}, 1000)\n}", "function showTime() {\n\t\ttry {\n\t\t\tvar hours = time.getUTCHours();\n\t\t\tvar minutes = time.getUTCMinutes();\n\t\t\tvar seconds = time.getUTCSeconds();\n\t\n\t\t\t// build the human-readable format\n\t\t\tvar timeValue = \"\" + ((hours > 12) ? hours - 12 : hours);\n\t\t\ttimeValue += ((minutes < 10) ? \":0\" : \":\") + minutes;\n\t\t\ttimeValue += ((seconds < 10) ? \":0\" : \":\") + seconds;\n\t\t\ttimeValue += (hours >= 12) ? \" pm\" : \" am\";\n\t\n\t\t\tvar clockElement;\n\t\t\tif ((piratequesting.sidebar) && (clockElement = sidebar.contentDocument.getElementById('servertime'))) {\n\t\t\t\tclockElement.setAttribute(\"value\", timeValue);\n\t\t\t}\n\t\t} \n\t\tcatch (e) {\n\t\t\tdumpError(e);\n\t\t}\t\n\t}", "function updateTime() {\n var strHours = document.getElementById(\"str-hours\"),\n strConsole = document.getElementById(\"str-console\"),\n strMinutes = document.getElementById(\"str-minutes\"),\n datetime = tizen.time.getCurrentDateTime(),\n hour = datetime.getHours(),\n minute = datetime.getMinutes();\n\n strHours.innerHTML = hour;\n strMinutes.innerHTML = minute;\n\n if (minute < 10) {\n strMinutes.innerHTML = \"0\" + minute;\n }\n if (hour < 10) {\n \t\tstrHours.innerHTML = \"0\" + hour;\n }\n\n if (flagDigital) {\n strConsole.style.visibility = flagConsole ? \"visible\" : \"hidden\";\n flagConsole = !flagConsole;\n } else {\n strConsole.style.visibility = \"visible\";\n flagConsole = false;\n }\n }", "function displayTime() {\n\t\t// Get the current time.\n\t var now = new Date();\n\t var h = now.getHours() > 12 ? now.getHours() % 12 : now.getHours();\n\t var m = now.getMinutes();\n\t var s = now.getSeconds();\n\n\t // Create a formatted string for the time.\n\t var timeString = (h < 10 ? \"\" : \"\") + now.toLocaleTimeString();\n\n\t // Set the time label's value to the time string.\n\t document.getElementById(\"current-time\").innerHTML = timeString;\n\t\t\n\t\t\n\t\t// Draw the clock using SVG\n\t\tfunction svgClock() {\n\t\t\t// Get current time.. again\n\t\t\tvar now = new Date();\n\t\t\tvar h, m, s;\n\t\t\th = 30 * ((now.getHours() % 12) + now.getMinutes() / 60);\n\t\t\tm = 6 * now.getMinutes();\n\t\t\ts = 6 * now.getSeconds();\n\n\t\t\t// Find pointers of the clock, rotate\n\t\t\tdocument.getElementById('h_pointer').setAttribute('transform', 'rotate(' + h + ', 50, 50)');\n\t\t\tdocument.getElementById('m_pointer').setAttribute('transform', 'rotate(' + m + ', 50, 50)'); \n\t\t\tdocument.getElementById('s_pointer').setAttribute('transform', 'rotate(' + s + ', 50, 50)');\n\t\t\t\n\t\t\t// Loop every second\n\t\t\tsetTimeout(svgClock, 1000);\n\t\t}\n\t svgClock();\n\t}", "function updateTime() {\r\n const date = new Date();\r\n const hour = formatTime(date.getHours());\r\n const minutes = formatTime(date.getMinutes());\r\n const seconds = formatTime(date.getSeconds());\r\n\r\n display.innerText=`${hour} : ${minutes} : ${seconds}`\r\n}", "function updateTime(){\n setTimeContent(\"timer\");\n}", "function updatetime() {\n time.innerHTML = new Date;\n \n}", "function setTimeDisplay() {\n timeDisplay.textContent = formattedFocusTime;\n}", "function updateTime() {\n\n}", "function showTime() {\n // get the time\n let tdy = new Date();\n let hrs = tdy.getHours();\n let min = tdy.getMinutes();\n let sec = tdy.getSeconds();\n\n // display AM or PM\n const amPm = hrs > 12 ? \"PM\" : \"AM\";\n\n // set 12 hr format\n hrs = hrs % 12 || 12;\n\n // add Zero in min and sec\n function addZero(e) {\n return (parseInt(e, 10) < 10 ? \"0\" : \"\") + e;\n }\n time.innerHTML = `${hrs}<span>:</span>${addZero(min)}<span>:</span>${addZero(sec)}<span> </span>${amPm}`;\n setTimeout(showTime, 1000);\n}", "function time(){\n\tvar\thours = dateobj.getHours(),\n\t\tminutes = dateobj.getMinutes(),\n\t\tseconds = dateobj.getSeconds();\n\n\t//make clock a 12 hour clock instead of 24 hour clock\n\thours = (hours > 12) ? (hours - 12) : hours;\n\thours = (hours === 0) ? 12 : hours;\n\n\t//invokes function to make sure number has at least two digits\n\thours = addZero(hours);\n\tminutes = addZero(minutes);\n\tseconds = addZero(seconds);\n\n\t//changes the html to match results\n\tdocument.getElementsByClassName('hours')[0].innerHTML = hours;\n\tdocument.getElementsByClassName('minutes')[0].innerHTML = minutes;\n\tdocument.getElementsByClassName('seconds')[0].innerHTML = seconds;\n}", "function setTime()\n {\n ++totalSeconds;\n $('#timer > #seconds').html(pad(totalSeconds%60));\n $('#timer > #minutes').html(pad(parseInt(totalSeconds/60)));\n }", "function startTime() {\n var today = new Date();\n var h = today.getHours();\n var m = today.getMinutes();\n var s = today.getSeconds();\n m = checkTime(m);\n s = checkTime(s);\n document.getElementById('txt').innerHTML =\n h + \":\" + m + \":\" + s;\n var t = setTimeout(startTime, 500);\n }", "displayTime() {\n if(app === 1){\n this.d1.value = this.twoDigitNum(stopwatch.t1);\n this.d2.value = this.twoDigitNum(stopwatch.t2);\n this.d3.value = this.twoDigitNum(stopwatch.t3);\n }\n else{\n this.d1.value = this.twoDigitNum(timer.t1);\n this.d2.value = this.twoDigitNum(timer.t2);\n this.d3.value = this.twoDigitNum(timer.t3);\n }\n }", "function displayTime() {\n //Calculate the number of minutes and seconds based on the current time\n var min = Math.floor(currentTime / 60);\n var sec = Math.floor(currentTime % 60);\n \n //Add a 0 to the front of the second when appropriate\n if (sec < 10) {\n sec = \"0\" + sec;\n }\n \n $(\"#time-text\").text(min + \":\" + sec);\n }", "function startTime2() {\n if (t == 0) {\n //h, m and s are assigned to the real time\n var today = new Date();\n h = today.getHours();\n m = today.getMinutes();\n s = today.getSeconds();\n }\n if (t == 1) { \n //h, m and s are assigned to the set time\n h = hSetTime;\n m = mSetTime;\n s = sSetTime; \n }\n\n\t\t\tseconds.animate({transform: [ 'r',((s*6) + 180),200,200]}); //secondhand animation\n\t\t\tminutes.animate({transform: ['r',((m*6) + 180),200,200]}); //minute hand animation\n\t\t\thours.animate({transform: ['r',((h*30) + 180),200,200]}); //hours hand animation\t\t\n\t\t\t\n\t\t\tsetTimeout(function(){startTime2()}, 250); //funtion refreshes at 1/4 second intervals\n\n //Changes the AM/PM text depending on the time\n\t\t\tif (h < 12){\n ampmtxt.attr({text: \"AM\", \"font-size\": 15, fill: outline1 });\n\t\t\t} else {\n ampmtxt.attr({text: \"PM\" , \"font-size\": 15, fill: outline1});\n\t\t\t}\t\n\t\t}", "function updateTimeDisplay()\n{\n // Get the current time in seconds and then get the difference from the stop seconds.\n var diff = globalStopSeconds - currentSeconds();\n\n // Set the time on the screen.\n $(\"#timer-display\").text( secondsToMinutes( diff));\n\n // Update the sand column graph. \n sandColumnUpdate( diff);\n\n}", "function startTime() {\n\tvar now = new Date();\n\tvar hour = ('0' + now.getHours()).slice(-2);\n\tvar mins = now.getMinutes();\n\tvar secs = now.getSeconds();\n\tvar ampm = hour >= 12 ? 'PM' : 'AM';\n\tvar day = ('0' + now.getDate()).slice(-2);\n\tvar month = ('0' + (now.getMonth()+1)).slice(-2);\n\tvar year = now.getFullYear();\n \thour = hour ? hour : 12;\n\tmins = mins < 10 ? '0' + mins : mins;\n\tsecs = secs < 10 ? '0' + secs : secs;\n\tvar timeString = hour + ':' + mins;\n\tvar dateString = month + '/' + day + '/' + year;\n\tdocument.getElementById('time').innerHTML = timeString;\n\tdocument.getElementById('date').innerHTML = dateString;\n\tvar t = setTimeout(startTime, 500);\n}", "function time(){\n\t $('#Begtime').mobiscroll().time({\n\t theme: 'wp',\n\t display: 'inline',\n\t mode: 'scroller'\n\t });\n\t $('#Endtime').mobiscroll().time({\n\t theme: 'wp',\n\t display: 'inline',\n\t mode: 'scroller'\n\t });\n\t removeUnwanted(); \n\t insertClass(); \n\t getTimeFromInput(\"Begtime\");\n\t getTimeFromInput(\"Endtime\");\n\t}", "function showTime(){\n // let today=new Date(2020,06,10,08,33,30);{Testing purpose}\n let today=new Date(),\n date=today.getDate(),\n hour=today.getHours(),\n min=today.getMinutes(),\n sec=today.getSeconds();\n\n //Set AM or PM using ternanary operator(Shortend)\n const amPm=hour >= 12 ? 'PM' :'AM' ;\n\n //12 hour format\n hour = hour % 12 || 12;\n time.innerHTML=`${hour}<span>:</span>${addZero(min)}<span>:</span>${addZero(sec)} ${showAmPm ? amPm :''}`;\n setTimeout(showTime,1000); \n\n }", "function startTime() {\n var today = new Date();\n var h = today.getHours();\n var m = today.getMinutes();\n var s = today.getSeconds();\n m = checkTime(m);\n s = checkTime(s);\n document.getElementById('txt').innerHTML =\n h + \":\" + m + \":\" + s;\n var t = setTimeout(startTime, 500);\n }", "function showTime() {\r\n // stocam in variabila time un string cu ora curenta obtinut din libraria moment.js\r\n const time = moment().format(\"HH:mm:ss\");\r\n // orice e in elementul clockContainer va fi rescris.\r\n clockContainer.innerHTML = time;\r\n // trimitem functia ca parametru in metoda requestAnimationFrame de pe obiectul window.\r\n window.requestAnimationFrame(showTime);\r\n}", "function updateDisplayTime() {\n\t\tvar date = new Date();\n\n\t\tvar hours = date.getHours();\n\t\tvar minutes = date.getMinutes();\n\t\tvar seconds = date.getSeconds();\n\t\tvar year = date.getFullYear();\n\t\tvar month = date.getMonth() + 1;\n\t\tvar day = date.getDate();\n\t\tvar ampm = \"AM\";\n\n\t\tif (hours > 11) {\n\t\t\tampm = \"PM\";\n\t\t}\n\n\t\tif (hours > 12) {\n\t\t\thours -=12;\n\t\t}\n\n\t\tif(minutes < 10) {\n\t\t\tminutes = \"0\" + minutes;\n\t\t}\n\n\t\tif (seconds < 10) {\n\t\t\tseconds = \"0\" + seconds;\n\t\t}\n\n\t\tvar displayTime = hours + \":\" + minutes + \":\" + seconds + \" \" + ampm;\n\n\t\t$(\"#displayTime\").html(displayTime)\n\t}", "function displayTime() {\n var time = moment().format('HH:mm:ss');\n $('#clock').html(time);\n setTimeout(displayTime, 1000);\n }", "function showTime(){\r\n var date = new Date();\r\n var h = date.getHours(); // 0 - 23\r\n var m = date.getMinutes(); // 0 - 59\r\n var s = date.getSeconds(); // 0 - 59\r\n var session = \"AM\";\r\n\r\n if(h == 0){\r\n h = 12;\r\n }\r\n\r\n if(h > 12){\r\n h = h - 12;\r\n session = \"PM\";\r\n }\r\n\r\n h = (h < 10) ? \"0\" + h : h;\r\n m = (m < 10) ? \"0\" + m : m;\r\n s = (s < 10) ? \"0\" + s : s;\r\n\r\n var time = h + \":\" + m + \":\" + s + \" \" + session;\r\n document.getElementById(\"time\").innerText = time;\r\n document.getElementById(\"time\").textContent = time;\r\n\r\n setTimeout(showTime, 1000);\r\n }", "function setTime() {\n // Create date instance\n var date = new Date();\n // Get hours and minutes and store in variables\n var hours = date.getHours(),\n minutes = date.getMinutes();\n // If number of minutes < 10, the time looks like this: 6:6. We want 6:06 instead, so add a 0\n if (minutes < 10) {\n minutes = '0' + minutes;\n }\n // Define elements where to put hours and minutes\n var $hoursElement = $('#time .time-hours'),\n $minutesElement = $('#time .time-minutes');\n // Put hours and minutes in the elements\n $hoursElement.text(hours);\n $minutesElement.text(minutes);\n }", "function time() {\n\t$(\"#clock\").html(number);\n}", "display(){\n $('#timer').text(timer.hours + \":\" + timer.minutes + \":\"+ timer.secondes);\n }", "function updateTimeDisplay(newTime) {\n $(\".timer\").text(time);\n time = newTime;\n}", "function time(){\n\tvar date = new Date(),\n\t\thours = date.getHours(),\n\t\tminutes = date.getMinutes(),\n\t\tseconds = date.getSeconds();\n\n\t//make clock a 12 hour clock instead of 24 hour clock\n\thours = (hours > 12) ? (hours - 12) : hours;\n\n\t//invokes function to make sure number has at least two digits\n\thours = addZero(hours);\n\tminutes = addZero(minutes);\n\tseconds = addZero(seconds);\n\n\t//changes the html to match results\n\tdocument.getElementsByClassName('hours')[0].innerHTML = hours;\n\tdocument.getElementsByClassName('minutes')[0].innerHTML = minutes;\n\tdocument.getElementsByClassName('seconds')[0].innerHTML = seconds;\n\n}", "function clock() {\n\t\tconst d = new Date();\n\t\tlet hour = d.getHours();\n\t\tlet min = d.getMinutes();\n\t\tlet sec = d.getSeconds();\n\t\tif(hour > 12) {\n\t\t\thour-=12;\t\t\t\n\t\t}\n\t\tif(min < 10) {\n\t\t\tmin=\"0\"+min;\n\t\t}\n\t\tif(sec < 10) {\n\t\t\tsec=\"0\"+sec;\n\t\t}\n\t\t$(\"#clock-time\").html(hour+\":\"+min+\":\"+sec);\t\t\n\t\tsetTimeout(clock, 250);\n\t}", "function updateTime() {\n\t\tvar dateTime = tizen.time.getCurrentDateTime(), secondToday = dateTime.getSeconds() + dateTime.getMinutes() * 60 + dateTime.getHours() * 3600,\n\t\tminDigitLeft = document.querySelector(\"#time-min-digit-left\"),\n\t\tminDigitRight = document.querySelector(\"#time-min-digit-right\"),\n\t\thourDigitLeft = document.querySelector(\"#time-hour-digit-left\"), \n\t\thourDigitRight = document.querySelector(\"#time-hour-digit-right\");\n\n\t\tvar minutesNow = (secondToday % 3600) / 60;\n\t\tvar hourNow = (secondToday / 3600);\n\t\tslideDigit(minDigitRight, minutesNow % 10.0);\n\t\tslideDigit(minDigitLeft, minutesNow / 10.0);\n\t\tslideDigit(hourDigitRight, hourNow % 10.0);\n\t\tslideDigit(hourDigitLeft, hourNow / 10.0);\n\t}", "function startTime() {\n\ttime = setInterval(() => {\n\t\tseconds = seconds + 1;\n\t\tif (seconds == 59) {\n\t\t\tseconds = 0;\n\t\t\tmin = min + 1;\n\t\t}\n\t\tif (min == 60) {\n\t\t\tmin = 0;\n\t\t\thour = hour + 1;\n\t\t}\n\t\ttimeSpace.innerHTML = \"h\" + hour + \":\" + min + \"m : \" + seconds + \"s\";\n\t\t// to Show time\n\t}, 1000)\n}", "function setTime() {\n document.getElementById(\"time\").innerHTML=timeItTookToClick/1000;\n}", "function showTime(){\r\n var today = new Date();\r\n var h = today.getHours();\r\n var m = today.getMinutes();\r\n var s = today.getSeconds();\r\n m = checkTime(m);\r\n s = checkTime(s);\r\n document.getElementById('clock').innerHTML =\r\n h + \":\" + m + \":\" + s;\r\n var day = today.getDate();\r\n var month = today.getMonth() + 1;\r\n var year = today.getFullYear();\r\n document.getElementById('date').innerHTML = day + \"/\" + month + \"/\" + year;\r\n var t = setTimeout(showTime, 500);\r\n}", "function showTime() {\n\tclockDate = new Date(); \n\t\tclockHour = clockDate.getHours();\n\t\tclockMinutes = clockDate.getMinutes();\n\t\tclockSeconds = clockDate.getSeconds();\n\t\n// Display 24-hour clock: precede single-digit hour, minute or second with 0.\n\tif (clockHour <= 9) clockHour = '0' + clockHour;\n\tif (clockMinutes <= 9) clockMinutes = '0'+ clockMinutes;\n\tif (clockSeconds <= 9) clockSeconds = '0' + clockSeconds;\n\t\n// Append hex symbol to hours, minutes and seconds\n\tclockColour = '#' + clockHour + ':' + clockMinutes + ':' + clockSeconds;\n\n// Remove colons to display the corresponding hex colour in the body background.\n\tclockColourPure = clockColour.replace(/:/g, '');\n\t\n\n// Display the hex colour in the clockface\n\tdocument.getElementById('hex').style.backgroundColor = clockColourPure;\n\tdocument.getElementById('hex-container').style.backgroundColor = clockColourPure;\n\n// Display the current time on clock-face\n\tdocument.getElementById('hex').innerHTML = clockColour;\n\t\n// Call the function once per second to update clock and colour\n\tsetTimeout(showTime, 1000);\n}", "function displayTime() {\n $(\"tbody\").empty();\n setInterval(displayTime, 10 * 1000);\n $(\"#currentTime\").html(\"<h2>\" + moment().format(\"hh:mm a\") + \"</h2>\");\n displayTrain();\n }", "function updateTime() {\n time -= 1000;\n showTime(); \n}", "function showTime() {\n let today = new Date(),\n hour = today.getHours(),\n min = today.getMinutes(),\n seconds = today.getSeconds();\n\n //Set AM or PM\n const amOrPm = hour >= 12 ? \"PM\" : \"AM\";\n\n //Format to 12 hours\n hour = hour % 12 || 12;\n console.log(time);\n //Outputting time\n time.innerHTML = `${hour} <span>:</span> ${min} <span>:</span> ${seconds}`;\n\n setTimeout(showTime, 1000);\n}", "function setTime() {\n //increments timer\n ++totalSeconds;\n //temporarily stops timer at 5 seconds for my sanity\n if (totalSeconds === 59) {\n totalMinutes += 1;\n totalSeconds = 0;\n }\n\n //stops timer when game is won\n if (gameWon === true) {\n return;\n }\n //calls function to display timer in DOM\n domTimer();\n }", "function initTime()\r\n{\r\n\ttempoDiv = document.getElementById(\"time\");\r\n\ttempoDiv.style.display = \"inline\";\r\n\ttime=0;\r\n\ttimeIncrement(time);\r\n}", "function startTime(){\n clearInterval(timer);\n timer = setInterval(displayTime, 1000);\n }", "function displayTime() {\n var today = new Date();\n var d = today.getDate();\n var m = today.getMonth()+1;\n var y = today.getFullYear();\n var h = today.getHours();\n var mm = today.getMinutes();\n var s = today.getSeconds();\n d = checkNumber(d);\n m = checkNumber(m);\n mm = checkNumber(mm);\n s = checkNumber(s);\n document.getElementById('displayTime').innerHTML = d + \"/\" + m + \"/\" + y + \" \" + h + \":\" + mm + \":\" + s;\n var t = setTimeout(displayTime, 500);\n}", "function showTime() {\n let today = new Date(),\n hour = today.getHours(),\n min = today.getMinutes(),\n sec = today.getSeconds();\n weekDay = today.getDay();\n day = today.getDate();\n month = today.getMonth();\n\n\n // Set AM or PM\n //const amPm = hour >= 12 ? 'PM' : 'AM';\n\n // 12hr Format\n // hour = hour % 12 || 12;\n\n // Output Time\n time.innerHTML = `${hour}<span>:</span>${addZero(min)}<span>:</span>${addZero(\n sec\n )}`;\n date.innerHTML = `${DAYS[weekDay]}<span> </span>${day}<span> </span>${MONTHS[month]}`;\n //${showAmPm ? amPm : ''}`;\n\n setTimeout(showTime, 1000);\n}", "function showTime() {\n var date = new Date();\n var h = date.getHours();\n var m = date.getMinutes();\n var s = date.getSeconds();\n var session = \"AM\";\n\n // if (h == 0) {\n // h = 12;\n // }\n\n if (h > 12) {\n h = h - 12;\n session = \"PM\";\n }\n\n h = h < 10 ? \"0\" + h : h;\n m = m < 10 ? \"0\" + m : m;\n s = s < 10 ? \"0\" + s : s;\n\n var time = h + \":\" + m + \":\" + s + \"\" + session;\n document.getElementById(\"time\").innerHTML = time;\n // document.getElementById(\"time\").textContent = time;\n\n setTimeout(showTime, 1000);\n}", "function getTime() {\n\tOutput('<span>It\\'s the 21st century man! Get a SmartWatch</span></br>');\n}", "function printTime()\n\t{\n\t\tvar time = getTime();\n\n\t\t// Print time\n\t\ttaskline.obj.time_timeday.innerHTML = time.hour + ':' + time.min;\n\t}", "function time() {\r\nvar d = new Date();\r\ndocument.getElementById(\"tx\").innerHTML = d.toLocaleTimeString();\r\n document.getElementById(\"ti\").innerHTML = d.toLocaleDateString();\r\n}", "showTime(time) {\n const current = new Date(time.time);\n\n const currentMonth = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"][current.getMonth()];\n const currentDay = current.getDate();\n const currentYear = current.getFullYear();\n\n const curTime = ui.formatTime(current);\n\n\n this.sunrise.innerHTML = ui.formatTime(new Date(time.sunrise));\n this.sunset.innerHTML = ui.formatTime(new Date(time.sunset));\n this.currentTime.innerHTML = `${curTime}, ${currentMonth} ${currentDay}, ${currentYear}`;\n }", "function displayTime() {\n let time = new Date();\n document.getElementById(\"timeNow\").innerHTML = time;\n}", "function clock()\r\n{\r\n\tvar today=new Date();\r\n\tvar h=today.getHours();\r\n\tvar m=today.getMinutes();\r\n\tvar s=today.getSeconds();\r\n\t// add a zero in front of numbers<10\r\n\tm=checkTime(m);\r\n\ts=checkTime(s);\r\n\t\r\n\t$(\"#menu-hour\").html(h+\":\"+m+\":\"+s);\r\n}", "function updateTime() {\n var time = 0;\n if (global.startTime != null) {\n time = (new Date()).getTime() - global.startTime;\n time = (time/1000)|0;\n }\n var timeDiv = document.getElementById(\"timeDisplay\");\n timeDiv.innerHTML = formatTime(time);\n}", "set displayTime(time) {\n this._timeEl.innerHTML = time;\n }", "function GetTime() {\n window.setTimeout( \"GetTime()\", 1000 );\n LiveTime = new Date()\n $(\"time\").innerHTML=LiveTime;\n }", "function timeDigtal(){\r\n\tvar currentTime = new Date();\r\n\tvar hours = currentTime.getHours();\r\n\tvar minutes = currentTime.getMinutes();\r\n\tvar seconds = currentTime.getSeconds();\r\n document.getElementById(\"digtime\").innerHTML=\"<b>TIME IS: \" + hours + \":\" + minutes + \" \" + \":\" + seconds + \" \" + \"</b>\";\r\n}", "function startTime() {\n setTimer();\n}", "function updateTime() {\n let date = getToday();\n let hours = date.getHours();\n let minutes = date.getMinutes();\n let seconds = date.getSeconds();\n\n hours = addZero(hours);\n minutes = addZero(minutes);\n seconds = addZero(seconds);\n\n document.querySelector(\".date .time\").innerText = hours + \":\" + minutes + \":\" + seconds;\n // $('.date .time').text(`${hours}:${minutes}:${seconds}`);\n update = setTimeout(function () { updateTime() }, 500)\n}", "function displayTime (){\n\tif(mins<10){\n\t\tmins=\"0\"+mins;\n\t}\n\tif(secs<10){\n\t\tsecs=\"0\"+secs;\n\t}\n\t$('#mins').html(mins);\n\t$('#secs').html(secs);\n}", "function Showtime() {\n var date = new Date();\n var h = date.getHours(); //0 - 23\n var m = date.getMinutes();//0 - 59\n var s = date.getSeconds();//0 - 59\n\n if (h < 10) {\n h = \"0\" + h;\n }\n if (m < 10) {\n m = \"0\" + m;\n }\n if (s < 10) {\n s = \"0\" + s;\n }\n\n var time = h + \":\" + m + \":\" + s;\n document.getElementById('clock').innerText = time;\n document.getElementById('clock').textContent = time;\nsetTimeout(Showtime, 1000);\n\n}", "function displayTime() {\n var time = new Date().toLocaleTimeString();\n document.querySelector('#display').textContent = time;\n}", "function draw() {\n\n var hr = hour();\n var mi = minute();\n var sec = second();\n\n if (clockSec < 10) {\n clockSec = \"0\" + clockSec;\n }\n if (clocKMin < 10) {\n clockMi = \"0\" + clockMi;\n }\n if (clockHr < 10) {\n clockHr = \"0\" + clockHr;\n }\n\n\n clockText();\n}", "function startTime() {\r\n var today=new Date();\r\n var h=today.getHours();\r\n var m=today.getMinutes();\r\n var s=today.getSeconds();\r\n m = checkTime(m);\r\n s = checkTime(s);\r\n document.getElementById('currentTime').innerHTML = h+\":\"+m+\":\"+s;\r\n var t = setTimeout(function(){startTime()},500);\r\n}", "function updateTime() {\n let m = String(new Date().getMinutes());\n let h = String(new Date().getHours());\n if (h.length == 1) {\n h = \"0\" + h;\n }\n if (m.length == 1) {\n m = \"0\" + m;\n }\n var time = h + \":\" + m;\n document.getElementById(\"time\").innerHTML = time;\n}", "function printTime() {\r\nvar d = new Date();\r\nvar hours = d.getHours();\r\nvar mins = d.getMinutes();\r\nvar secs = d.getSeconds();\r\ndocument.body.innerHTML = hours+\":\"+mins+\":\"+secs;\r\n}", "function startTime() {\n const today = new Date();\n let hour = today.getHours();\n let minute = today.getMinutes();\n let second = today.getSeconds();\n hour = formatTime(hour);\n minute = formatTime(minute);\n second = formatTime(second);\n\n document.querySelector(\"#current-time\").innerHTML = hour + \":\" + minute + \":\" + second;\n setTimeout(function () {\n startTime();\n }, 500);\n}", "function printTimedisplay (hours, minutes, seconds, milliseconds) {\n maintimeDisplay.innerHTML = hours + ':' + minutes + ':' + seconds;\n millisecondDisplay.innerHTML = '.' + milliseconds;\n}", "function updateClock() {\n\tdocument.getElementById(\"time\").innerHTML = timeSinceStart();\n}", "function startTime() {\n var today = new Date();\n var h = today.getHours();\n var m = today.getMinutes();\n var s = today.getSeconds();\n m = checkTime(m);\n s = checkTime(s);\n $(\"#clock\").text(h + \":\" + m + \":\" + s);\n var t = setTimeout(startTime, 500);\n}", "function drawTime() {\n buf.clear();\n buf.setColor(1);\n var d = new Date();\n var da = d.toString().split(\" \");\n var time = da[4];\n buf.setFont(\"Vector\",50);\n buf.setFontAlign(0,-1);\n buf.drawString(time,buf.getWidth()/2,0);\n buf.setFont(\"Vector\",18);\n buf.setFontAlign(0,-1);\n var date = d.toString().substr(0,15);\n buf.drawString(date, buf.getWidth()/2, 70);\n flip();\n}", "function printTime(){\n\tvar now = new Date();\n\tvar hours = now.getHours();\n\tvar mins = now.getMinutes();\n\tvar seconds = now.getSeconds();\n\tvar amPm=\"\";\n\tif(hours>12) {\n\t\thours=hours-12;\n\t\tamPm = \"PM\";\n\t}else {\n\t\tamPm=\"AM\";\n\t}\n\tif (hours<10) hours=\"0\"+hours;\n\tif (mins<10) mins=\"0\"+mins;\n\tif (seconds<10) seconds=\"0\"+seconds;\n\tvar time=document.getElementById(\"time\");\n\ttime.innerHTML= \"\"+hours+\":\"+mins+\":\"+seconds+\" \"+amPm;\n}", "function startTime() {\n s = (s+1) % 60;\n if (s == 0)\n m = (m+1) % 60;\n var ms=checkTime(m);\n var ss=checkTime(s);\n document.getElementById('time').innerHTML=ms+\":\"+ss;\n t=setTimeout(function(){startTime()},1000);\n }", "function setTime() {\n\t\tseconds += 500;\n\t}", "function updateTimerDisplay(){\n // Update current time text display.\n $('#current-time').text(formatTime( player.getCurrentTime() ));\n $('#duration').text(formatTime( player.getDuration() ));\n }", "function tellTime() {\n var now = new Date(); \n document.write(\"Current time: \"+ now);\n }", "function set_clock(message) { document.getElementById(\"clock\").innerHTML = message; }", "function output_time() { // output the current time\r\n\ttime.value = player_data.current_time;\r\n}", "function printTime() {\r\n var d = new Date(); \r\n var hours = d.getHours(); \r\n var mins = d.getMinutes(); \r\n var secs = d.getSeconds(); \r\n document.body.innerHTML = \r\nhours+\":\"+mins+\":\"+secs; \r\n}", "function renderTimeLabel() {\n renderText(\"TIME\", \"end\", \"#FF0\", Frogger.drawingSurfaceWidth, Frogger.drawingSurfaceHeight);\n }", "function updateTimerDisplay() {\n // Update current time text display.\n //$('#current-time').text(formatTime(player.getCurrentTime()))\n //$('#duration').text(formatTime(player.getDuration()))\n}", "function startClock() { \n timer = setInterval(displayTime, 500); \n }", "function showCurrentTime(time) {\n document.querySelector(\".time p\").textContent = currentTime(time);\n}", "function startTime()\n{\t\n\tvar today=new Date();\n\tvar h=today.getUTCHours();\n\tvar m=today.getUTCMinutes();\n\tvar s=today.getUTCSeconds();\n\tvar day=today.getUTCDate();\n\tvar month=today.getUTCMonth()+1;\n\tvar year=today.getUTCFullYear()\n\t\n\t// add a zero in front of numbers<10\n\tm=if0(m);\n\ts=if0(s);\n\th=if0(h);\n\tday=if0(day);\n\tmonth=if0(month);\n\t$('.showUTCTime').text(day+\".\"+month+\".\"+year+\" \"+h+\":\"+m+\":\"+s);\n\tsetTimeout(\"startTime()\",1000);\n}", "function time() {\n seconds += 1;\n if (seconds >= 60) {\n seconds = 0;\n minutes += 1;\n }\n\n if (seconds > 9) {\n mySeconds = seconds;\n } else if (seconds <= 9) {\n mySeconds = `0${seconds}`;\n } else {\n mySeconds = '00';\n }\n\n if (minutes > 9) {\n myMinutes = minutes;\n } else if (minutes <= 9) {\n myMinutes = `0${minutes}`;\n } else {\n myMinutes = '00';\n }\n myStopWatch.textContent = (`${myMinutes}:${mySeconds}`);\n // Call timer function\n timer();\n }", "function setTime() {\n var secondsLeft = 3600;\n var timerInterval = setInterval(function() {\n secondsLeft--; \n if(secondsLeft === 0) {\n clearInterval(timerInterval);\n setTime();\n }\n timeManagement();\n colorCoding()\n\n }, 1000);\n \n }", "function updateTimerDisplay(){\n // Update current time text display.\n $('#current-time').text(formatTime( r.getCurrentTime() ));\n $('#duration').text(formatTime( r.getDuration() ));\n}", "function startTime() {\n var today = new Date();\n var h = today.getHours();\n var m = today.getMinutes();\n var s = today.getSeconds();\n m = checkTime(m);\n s = checkTime(s);\n document.getElementById('time').innerHTML = \"Horário: \" + h + \":\" + m + \":\" + s;\n var t = setTimeout(startTime, 500);\n}", "function show5(){\r\nif (!document.layers&&!document.all)\r\nreturn\r\nvar Digital=new Date()\r\nvar hours=Digital.getHours()\r\nvar minutes=Digital.getMinutes()\r\nvar seconds=Digital.getSeconds()\r\n//var dn=\"AM\"\r\n//if (hours>12){\r\n//dn=\"PM\"\r\n//hours=hours-12\r\n//}\r\n//if (hours==0)\r\n//hours=12\r\nif (minutes<=9)\r\nminutes=\"0\"+minutes\r\nif (seconds<=9)\r\nseconds=\"0\"+seconds\r\n//change font size here to your desire\r\nmyclock=\"<font face='Arial' ><b></br><p>\"+hours+\":\"+minutes+\":\"\r\n+seconds+\" </b></font>\"\r\nif (document.layers){\r\ndocument.layers.liveclock.document.write(myclock)\r\ndocument.layers.liveclock.document.close()\r\n}\r\nelse if (document.all)\r\nliveclock.innerHTML=myclock\r\nsetTimeout(\"show5()\",1000)\r\n}", "function displayTime() {\n let hours = Math.floor(secondCount/3600);\n let minutes = Math.floor((secondCount % 3600)/60);\n let seconds = Math.floor(secondCount % 60)\n\n // Display a leading zero if the values are less than ten\n let displayHours = (hours < 10) ? '0' + hours : hours;\n let displayMinutes = (minutes < 10) ? '0' + minutes : minutes;\n let displaySeconds = (seconds < 10) ? '0' + seconds : seconds;\n\n setTotalTime(secondCount)\n setTimeLapse(displayHours + ':' + displayMinutes + ':' + displaySeconds)\n\n secondCount++;\n }", "function displayCurrentTime() {\n\tsetInterval(function(){\n\t\t$('#current-time').html(moment().format('hh:mm A'))\n\t }, 1000);\n\t}", "function updateTimeDisplay()\n{\n\t//the following code for getting the current beat time was written by melonking - https://wiki.melonland.net/swatch_time\n\t//get date in UTC/GMT\n var date = new Date();\n var hours = date.getUTCHours();\n var minutes = date.getUTCMinutes();\n var seconds = date.getUTCSeconds();\n var milliseconds = date.getUTCMilliseconds();\n //add hour to get time in Switzerland\n hours = (hours + 1) % 24;\n //time in seconds\n var timeInMilliseconds = ((hours * 60 + minutes) * 60 + seconds) * 1000 + milliseconds;\n //there are 86.4 seconds in a beat\n var millisecondsInABeat = 86400;\n //calculate beats to two decimal places\n\tvar current_beat_time = Math.abs(timeInMilliseconds / millisecondsInABeat).toFixed(2).padStart(6, \"0\");\n\t\n\t//display current beat time\n\tdocument.getElementById(\"current-beats\").childNodes[0].textContent = current_beat_time.split(\".\")[0];\n\tdocument.getElementById(\"current-centibeats\").innerText = current_beat_time.split(\".\")[1];\n}", "function printTime(){\n\tvar d = new Date();\n\tvar hours = d.getHours();\n\tvar mins = d.getMinutes();\n\tvar secs = d.getSeconds();\n\tdocument.body.innerHTML = hours + \":\" + mins + \":\" + secs;\n}", "function displayTime(time){\n\t\t//display the clock digits\n\t\tdocument.getElementById(\"clock-time\").innerHTML = time;\n\n\t\t//set current timer\n\t\tvar timeLeft = isBreak? breakTime - currentSessionTime:sessionTime - currentSessionTime;\n\t\tvar currentTimer = isBreak? breakTime:sessionTime;\n\n\t\t//calculate arc\n\t\tvar percentComplete =timeLeft / currentTimer * 100;\n\t\tvar arcDegrees = Math.floor(percentComplete * 3.6); //percent to degrees\n\n\t\t//display the clock bar\n\t\t$displayBar.attr(\"d\", describeArc(displayRadis, displayRadis, displayRadis - displayBorder, 0, arcDegrees));\n\t}", "function updateTime() {\n var now = new Date(),\n minutes = now.getMinutes(),\n month = now.toLocaleString('default', { month: 'long' }),\n date = now.getDate() + ' ' + month;\n \n //Add leading zero to minutes below 10\n if (minutes < 10) minutes = '0' + minutes;\n\n //Concatinate the time\n var time = now.getHours() + ':' + minutes;\n\n //Show date and time on the page\n theDateNow.innerHTML = date;\n theTimeNow.innerHTML = time;\n\n //Show time only in the tab label\n document.title = time;\n }", "function setClock() {\n let d = new Date(),\n dH = d.getHours(),\n dM = d.getMinutes(),\n dS = d.getSeconds(),\n time = `${dH}:${dM}:${dS}`;\n $('#headerTime').text(time);\n }", "function update_clock(time)\r\n{\r\n clock_time = time;\r\n document.getElementById('clock').innerHTML = hh_mm_ss(time);\r\n check_old_records(time);\r\n}", "function startTime() {\n var today = new Date();\n var hourNow = today.getHours();\n var h = formatHour(hourNow);\n var m = today.getMinutes();\n var ap = formatAmPm(hourNow);\n if(m==0) {\n writeDate();\n }\n m = checkTime(m);\n document.getElementById('clock').innerHTML = h + ':' + m + ap;\n var t = setTimeout(startTime, 10000);\n}", "function startTime() {\n\n var today = new Date();\n var h = today.getHours();\n var m = today.getMinutes();\n var s = today.getSeconds();\n m = checkTime(m);\n s = checkTime(s);\n document.getElementById('clock').innerHTML = h + ':' + m + ':' + s;\n var t = setTimeout(startTime, 500);\n}", "function currentTime() {\r\n let time = new Date();\r\n let h = time.getHours();\r\n let m = time.getMinutes();\r\n let s = time.getSeconds();\r\n if (m < 10) m = \"0\" + m;\r\n if (s < 10) s = \"0\" + s;\r\n document.getElementById('currentTime').innerHTML = h + \":\" + m + \":\" + s;\r\n}", "function getTime() {\n\tvar today = new Date();\n\tseperator();\n\tOutput('<span>>time:<span><br>');\n\tOutput('<span>' + today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate() + ' ' + today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds() + '</span></br>');\n}" ]
[ "0.79061556", "0.7867804", "0.7833104", "0.78100234", "0.76912004", "0.76705134", "0.7659492", "0.7658845", "0.76162374", "0.76118803", "0.76050484", "0.75970423", "0.7594395", "0.758446", "0.7583648", "0.756783", "0.7565811", "0.755161", "0.7543307", "0.7523902", "0.7521322", "0.7512159", "0.7509993", "0.7504301", "0.749056", "0.74895716", "0.74747545", "0.74738777", "0.74730724", "0.7452847", "0.74508446", "0.74363637", "0.74287975", "0.7426348", "0.7425745", "0.7419692", "0.7417817", "0.74104947", "0.7409436", "0.73990893", "0.7383852", "0.73791164", "0.7377862", "0.7376942", "0.7371823", "0.73682", "0.736181", "0.7359109", "0.7343717", "0.73344857", "0.7334188", "0.7331798", "0.73191917", "0.73176533", "0.7304614", "0.7291054", "0.72806793", "0.7266006", "0.72623175", "0.72551054", "0.72507215", "0.72469354", "0.7240762", "0.72369534", "0.7236858", "0.72361684", "0.7228312", "0.7223337", "0.7208639", "0.7203502", "0.72013503", "0.72012097", "0.7199683", "0.71878564", "0.71874315", "0.7184804", "0.7184628", "0.7178691", "0.71696043", "0.71658", "0.716455", "0.71577877", "0.71574736", "0.7154176", "0.7152343", "0.7150578", "0.71452606", "0.71401155", "0.7135124", "0.7130429", "0.71298593", "0.7125621", "0.7124861", "0.7120011", "0.711645", "0.7115605", "0.71139705", "0.71116513", "0.7111149", "0.7110815", "0.71086645" ]
0.0
-1
function that starts the game
function start() { setTime(); //set timer //next question function next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startGame() { }", "function start()\r\n{\r\ninit();\r\ngame.start();\r\n}", "function startGame() {\n init();\n}", "function startGame() {\n\tsetup();\n\tmainLoop();\n}", "function startgame() {\t\r\n\tloadImages();\r\nsetupKeyboardListeners();\r\nmain();\r\n}", "function startGame(){\n initialiseGame();\n}", "function start(){\n\t\t //Initialize this Game. \n newGame(); \n //Add mouse click event listeners. \n addListeners();\n\t\t}", "function startGame() {\n myGameArea.start();\n}", "function startGame(){\n hideContent();\n unhideContent();\n assignButtonColours();\n generateDiffuseOrder();\n clearInterval(interval);\n setlevel();\n countdown(localStorage.getItem(\"theTime\"));\n listeningForClick();\n}", "function start() {\n\tclear();\n\tc = new GameManager();\n\tc.startGame();\t\n}", "function init() {\n gameStart();\n}", "function startGame(){\n\tvar game = new Game();\n\tgame.init();\n}", "function startGame() {\n\t\tstatus.show();\n\t\tinsertStatusLife();\n\t\tsetLife(100);\n\t\tsetDayPast(1);\n\t}", "function startGame(){\n \t\tGameJam.sound.play('start');\n \t\tGameJam.sound.play('run');\n\t\t\n\t\t// Put items in the map\n\t\titemsToObstacles(true);\n\n\t\t// Create the prisoner path\n\t\tGameJam.movePrisoner();\n\n\t\t// Reset items, we dont want the user to be able to drag and drop them\n \t\tGameJam.items = [];\n \t\t\n \t\tfor (var item in GameJam.levels[GameJam.currentLevel].items) {\n \t\t\tGameJam.levels[GameJam.currentLevel].items[item].count = GameJam.levels[GameJam.currentLevel].items[item].countStart;\n \t\t}\n\n\t\t// Reset prisoner speed\n\t\tGameJam.prisoner[0].sprite.speed = 5;\n\n\t\t// Reset game time\n\t\tGameJam.tileCounter = 0;\n\t\tGameJam.timer.className = 'show';\n\t\tdocument.getElementById('obstacles').className = 'hide';\n\t\tdocument.getElementById('slider').className = 'hide';\n\t\tdocument.getElementById('start-button-wrapper').className = 'hide';\n\n\t\t// Game has started\n\t\tGameJam.gameStarted = true;\n\n\t\tGameJam.gameEnded = false;\n\n\t\tdocument.getElementById('static-canvas').className = 'started';\n\n\t\tconsole.log('-- Game started');\n\t}", "function startGame() {\n\tupdateGameState()\n\tmoveTetroDown()\n}", "function startGame() {\n\n\t\tvar gss = new Game(win.canvas);\n\n\t\t// shared zone used to share resources.\n gss.set('keyboard', new KeyboardInput());\n gss.set('loader', loader);\n\n\t\tgss.start();\n\t}", "function startGame() {\n\t\tvar game = document.getElementById(\"game-area\");\n\t\ttimeStart();\t\t\t\t\n\t}", "function startGame(){\n getDictionary();\n var state = $.deparam.fragment();\n options.variant = state.variant || options.variant;\n makeGameBoard();\n loadState();\n }", "function startGame() {\n\tinitGame();\n\tsetInterval(updateGame, 90);\n}", "function startGame(mapName = 'galaxy'){\n toggleMenu(currentMenu);\n if (showStats)\n $('#statsOutput').show();\n $('#ammoBarsContainer').show();\n scene.stopTheme();\n scene.createBackground(mapName);\n if (firstTime) {\n firstTime = false;\n createGUI(true);\n render();\n } else {\n requestAnimationFrame(render);\n }\n}", "function startGame(){\n countdown();\n question();\n solution();\n }", "function startGame() {\n //init the game\n gWorld = new gameWorld(6);\n gWorld.w = cvs.width;\n gWorld.h = cvs.height;\n \n gWorld.state = 'RUNNING';\n gWorld.addObject(makeGround(gWorld.w, gWorld.h));\n gWorld.addObject(makeCanopy(gWorld.w));\n gWorld.addObject(makeWalker(gWorld.w, gWorld.h));\n gWorld.addObject(makeWalker(gWorld.w, gWorld.h,true));\n gWorld.addObject(makePlayer());\n \n startBox.active = false;\n pauseBtn.active = true;\n soundBtn.active = true;\n touchRightBtn.active = true;\n touchLeftBtn.active = true;\n replayBtn.active = false;\n \n gameLoop();\n }", "function on_load()\n{\n\tgame.start();\n}", "function startGame() {\n (new SBar.Engine()).startGame();\n}", "function StartGame()\r\n {\r\n\r\n\t\r\n\tinit();\r\n\tanimate();\t\r\n\t}", "function startGame() {\n logger.log('Staring a new game');\n // Hide any dialog that might have started this game\n $('.modal').modal('hide');\n\n // Reset the board\n board.init();\n\n // Init the scores\n level = 1;\n score = 0;\n totalShapesDropped = 1;\n delay = 500; // 1/2 sec\n updateUserProgress();\n\n // Init the shapes\n FallingShape = previewShape;\n previewShape = dropNewShape();\n\n // Reset game state\n drawPreview();\n pauseDetected = false;\n isPaused = false;\n isGameStarted = true;\n isStopped = false;\n\n // Update the button if this is the first game\n $('#newGameButton').text(\"New Game\");\n\n // Start dropping blocks\n advance();\n }", "function loadGame(){\n myGameArea.start();\n}", "function start(){\n initializeBoard();\n playerTurn();\n }", "function startGame () {\n\tplay = true;\n\n}", "function startGame() {\n pairMovieWithSounds();\n randomSounds(movie);\n addPhraseToDisplay();\n keyboardSetup();\n}", "function startGame() {\n\t\t\tvm.gameStarted = true;\n\t\t\tMastermind.startGame();\n\t\t\tcurrentAttempt = 1;\n\t\t\tactivateAttemptRow();\n\t\t}", "function startGame () {\n if (!gameStarted) { // ensure setInterval only fires once\n setInterval(countdown, 1000)\n generateList() // start game generates first order, subsequent order generated by serve\n setTimeout(gameOver, 90000) // cause endGameOverlay DOM\n }\n gameStarted = true\n removeStartScreen() //remove instructions\n createBoard() //create title and bottom burger in playArea\n }", "function startGame(){\n gameArea.start();\n debuggerLog(\"The game has started!\");\n}", "function startGame() {\n incrementGameStep({ gameId, gameData });\n }", "function startGame() {\n if (isGameRunning) return;\n isGameRunning = true;\n hideAllMenus();\n setupScore();\n updateScoreDisplay();\n shootBulletsRandomlyLoop();\n}", "start() {\n\t\tthis.emit(\"game_start\");\n\t}", "function NewGame() {\n\t// Your code goes here for starting a game\n\tprint(\"Complete this method in Singleplayer.js\");\n}", "function GameStart() {\n\tGenerateCharacter();\n\tCreateTileGrid();\n\tCreateGraphicsGrid();\n\tCreateNoteGrid();\n\tGenerateDungeon();\n\tRoundTimer();\n}", "startGame () {\n game.state.start('ticTac')\n }", "function startGame()\r\n{\r\n\tcontext = loadCanvasContext();\r\n\tmarker = loadMarkerCanvas();\r\n\r\n\tif(context && marker)\r\n\t{\r\n\t\tsetArrays();\r\n\t\tisNewRound = false;\r\n\t\tstart();\r\n\t\tsetRound();\r\n\t\tdoSpeeding();\r\n\t\tisNewRound = true;\r\n\t\texplainHowToMove();\r\n\t\tspeed = startingSpeed;\r\n\t\t$(\"#rounds\").text(\"1\");\r\n\t\tchangeInterval(speed);\r\n\t}\r\n\telse\r\n\t{\r\n\t\talert(\"Cannot Load Canvas\");\r\n\t}\r\n}", "startGame() {\r\n\t\tthis.board.drawHTMLBoard();\r\n\t\tthis.activePlayer.activeToken.drawHTMLToken();\r\n\t\tthis.ready = true;\r\n\t}", "startGame() {\n //@todo: have this number set to the difficulty, easy = 3, normal = 6, hard = 9\n StateActions.onStart(5, 5, this.state.difficulty);\n StateStore.setGameState(1);\n this.gameState();\n }", "function startGame() {\n lobby.hide();\n game.start();\n animate();\n}", "runGame(){\n\t\t\tthis.scene.runGame();\n\t\t}", "function gamestart() {\n\t\tshowquestions();\n\t}", "function startGame(){\n gBoard = buildBoard()\n renderBoard(gBoard)\n placeMines()\n setMinesNegsCount(gBoard)\n openNegs(gBoard, gGame.safeCell.i, gGame.safeCell.j)\n renderBoard(gBoard)\n startTimer()\n}", "function startGame() {\n if(gameState.gameDifficulty === 'easy')\n {\n easyMode();\n } \n if(gameState.gameDifficulty ==='normal'){\n normalMode();\n }\n\n if(gameState.gameDifficulty ==='hard'){\n hardMode();\n }\n\n}", "function startGame() {\n createAnsArray();\n playAnswer();\n }", "function startGame() {\n removeSplashScreen();\n if (gameOverScreen) {\n removeGameOverScreen();\n } else if (youWinScreen){\n removeYouWinScreen();\n }\n createGameScreen();\n\n game = new Game(gameScreen);\n game.start();\n}", "function startGame() {\n\t\n\t// fill the question div with new random question\n\tgenerateQuestion();\n\t\n\t// start the timer\n\tmoveProgressBar();\n}", "function startGame() {\n //hide the deal button\n hideDealButton();\n //show the player and dealer's card interface\n showCards();\n //deal the player's cards\n getPlayerCards();\n //after brief pause, show hit and stay buttons\n setTimeout(displayHitAndStayButtons, 2000);\n }", "function startGame() {\n\n game.updateDisplay();\n game.randomizeShips();\n $(\"#resetButton\").toggleClass(\"hidden\");\n $(\"#startButton\").toggleClass(\"hidden\");\n game.startGame();\n game.updateDisplay();\n saveGame();\n}", "function startGame()\n{\n\tconsole.log(\"startGame()\");\n\n\taddEvent(window, \"keypress\", keyPressed);\n\n\tfor(var i = 0; i < app.coverImgArr.length; i++)\n\t\tapp.coverImgArr[i].style.visibility = 'visible';\n\n\tinitBgImg();\n\tinitTileImg();\n\tinitCoverImg();\n\n\tapp.startBtn.disabled = true;\n\tapp.endBtn.disabled = false;\n\n\tfor(var i = 0; i < app.coverImgArr.length; i++){\n\t\taddEvent(app.coverImgArr[i], \"click\", tileClick);\n\t}\n}", "function startGame() {\n\tinitGlobals();\n\n\t//set the game to call the 'update' method on each tick\n\t_intervalId = setInterval(update, 1000 / fps);\n}", "function gameStart() {\n\t//maybe add gameOverStatus\n\t//initial gameStatus\n\tmessageBoard.innerText = \"Game Start!\\n\" + \"Current Score: \" + counter + \" points\";\n\tcreateBoard();\n\tshuffleCards();\n}", "function start() {\n\t\t\t/* Stop the engine just in case it's already running. This function is called every time the Launch Button is hit. */\n\t\t\tengine.stop();\n\t\t\t/* Start the engine at 60fps. Why not? This is a simple game, run it at FULL SPEED, CAPTAIN!!! */\n\t\t\tengine.start(1000 / 60);\n\t\t\tdisplay.canvas.addEventListener(\"touchstart\", touchStartDisplay);\n\t\t\twindow.addEventListener(\"resize\", resizeWindow);\n\t\t\tresizeWindow();\n\t\t}", "StartGame(player, start){\n this.scene.start('level1');\n }", "function gameStart(){\n\t\tplayGame = true;\n\t\tmainContentRow.style.visibility = \"visible\";\n\t\tscoreRow.style.visibility = \"visible\";\n\t\tplayQuitButton.style.visibility = \"hidden\";\n\t\tquestionPool = getQuestionPool(answerPool,hintPool);\n\t\tcurrentQuestion = nextQuestion();\n}", "startGame() {\n if (this.tick <= 50) {\n this.tutorial.alpha -= 0.02;\n this.fireToContinue.alpha -= 0.02;\n this.bg.alpha -= 0.02;\n this.star.alpha -= 0.02;\n }\n else {\n this.startBgm.stop();\n this.scene.stop();\n this.scene.start('mainGame', { remapped: this.remapped, remapKeys: this.remapKeys });\n }\n }", "function startGame () {\n const deck = freshDeck()\n shuffleDeck(deck)\n const deckMidpoint = Math.ceil(deck.length / 2)\n // setPlayerDeck(deck.slice(0, deckMidpoint))\n // setComputerDeck(deck.slice(deckMidpoint, deck.length))\n setPlayerDeck(deck.slice(0, 3))\n setComputerDeck(deck.slice(3, 6))\n console.log(\"started Game\");\n setStart(true);\n setDoneWithGame(false);\n\n\n }", "function startGame() {\n\tdisplayCharacterStats(null);\n\n\treturn;\n}", "function startGame(){\n startScene.visible = false;\n helpScene.visible = false;\n gameOverScene.visible = false;\n gameScene.visible = true;\n\n //Reset starting variables\n //startTime = new Date;\n time = 0;\n slowTime = 10000; //in milliseconds\n player.x = 640;\n player.y = 360;\n activated = false;\n spawnTime = 0;\n createCircles(5);\n updateTime(time);\n updateSlow(slowTime);\n\n paused = false;\n}", "start() {\n if (this.state == STATES.WAITING || this.state == STATES.GAMEOVER) {\n var d = new Date();\n var t = d.getTime();\n this.gameStart = t;\n this.gameStart2 = t;\n this.gameMode = this.scene.gameMode;\n this.gameLevel = this.scene.gameLevel;\n this.makeRequest(\"initialBoard\", this.verifyTabReply);\n this.timeleft = TIME_LEFT;\n this.SaveForMovie();\n // if (this.state == STATES.DISPLAYED) {\n this.state = STATES.READY_TO_PICK_PIECE;\n //}\n }\n }", "function startGame() {\n gameScreen=1;\n}", "function startGame() {\n removeClicks();\n resetGame();\n addPattern();\n addPattern();\n playPattern();\n}", "function startGame() {\n console.log('start button clicked')\n $('.instructions').hide();\n $('.title').show();\n $('.grid_container').show();\n $('.score_container').show();\n $('#timer').show();\n // soundIntro('sound/Loading_Loop.wav');\n }", "function startGame() {\n isGameOver = false\n setUpGame()\n alienMoveTimer = setInterval(moveAliens, 1)\n gameTimer = setInterval(playGame, 1000)\n }", "function startRandomGame() {\n\n}", "function playGame() {\n}", "function runGame() {\n\tvar g = new Main('game', 'container');\n\tg.init();\n}", "function start() {\n room.sendToPeers(GAME_START);\n onStart();\n}", "start() {\n this.gameStart = true;\n }", "function startGame() {\n if(!presence.ballIsSpawned) {\n fill(start.color.c, start.color.saturation, start.color.brightness);\n stroke(start.color.c, start.color.saturation, start.color.brightness)\n if((windowWidth < 600) && (windowHeight < 600)) {\n textSize(20);\n text(\"PRESS ENTER TO START GAME\", windowWidth/4.2, windowHeight/2.5);\n textSize(15);\n text(\"(First to 7 Wins)\", windowWidth * 0.41, windowHeight * 0.47);\n }\n if((windowWidth > 601) && (windowHeight > 601)) {\n textSize(30)\n text(\"PRESS ENTER TO START GAME\", windowWidth * 0.35, windowHeight/2.5);\n textSize(20);\n text(\"(First to 7 Wins)\", start.textX + start.textX * 0.265, windowHeight * 0.44);\n }\n if(mode == 'single'){\n if((windowWidth > 601) && (windowHeight > 601)){\n text(\"Mode: \" + mode, windowWidth * 0.9, windowHeight * 0.08);\n textSize(18);\n text(\"USE ARROWS TO MOVE\", start.textX + start.textX * 0.2, windowHeight * 0.48);\n textSize(14);\n text(\"PRESS SHIFT FOR TWO PLAYER\", start.textX + start.textX * 0.2, windowHeight * 0.52);\n }\n if((windowWidth < 600) && (windowHeight < 600)){\n text(\"Mode: \" + mode, windowWidth * 0.8, windowHeight * 0.08);\n textSize(14);\n text(\"USE ARROWS TO MOVE\", start.textX + start.textX * 0.01, start.textY + start.textY * 0.04);\n textSize(12);\n text(\"PRESS SHIFT FOR TWO PLAYER\", windowWidth * 0.35, start.textY + start.textY * 0.16);\n defaultBallSpeed = 4;\n }\n }\n if(mode == 'two'){\n if((windowWidth > 601) && (windowHeight > 601)) {\n textSize(20);\n text(\"Mode: \" + mode, windowWidth * 0.9, windowHeight * 0.08)\n textSize(18);\n text(\"USE Q, A, P, L TO MOVE\", windowWidth * 0.43, windowHeight * 0.48);\n textSize(14);\n text(\"PRESS SHIFT FOR ONE PLAYER\", start.textX + start.textX * 0.2, windowHeight * 0.52);\n }\n }\n \n start.color.c += 1;\n if(start.color.c > 359) {\n start.color.c = 0;\n }\n }\n }", "function begin_game(){\n\tload_resources();\n\tController = new Control();\n\n\tPlayerGame = new Game(ctx, gameWidth, gameHeight, 10);\t\t// (context, x_boundary, y_boundary, ms_delay)\n\tPlayerGame.clearColor = \"rgb(50,43,32)\";\n\tCurrPlayer = new Player(50, 400);\t\t\t\t// (x-position, y-position)\n\n\tloadGame();\n\tframe();\n}", "start() {\n this.isRunning = true;\n this.secondsChecker = new SecondsChecker(Date.now(), Date.now() + 60);\n\n if (typeof this.onGameStart === 'function') {\n this.onGameStart();\n }\n }", "function StartNewGame() {\n\tsnowStorm.stop();\n\tsnowStorm.freeze();\n\n\tvar params = {\n\t\tchosen: \"riley\"\n\t};\n\n\t_gameObj = new Game();\n\t_gameObj.SetupCanvas(params);\n\t$j(window).resize(function () {\n\t\t_gameObj.SetupCanvas(params);\n\t});\n\n\t$j.mobile.changePage($j('#game'));\n}", "function startGame() {\n\t// Set variables\n\tpreviousNum = null;\n\tgameOn = true;\n\tguessedArray = [];\n\tletterString = \"\";\n\t// Clear displays\n\tclearWord();\n\tclearScreen();\n\tclearScore();\n\tupdateScore();\n\t// Set displays and media\n\tsetMedia();\n\tgetRandomNum();\n\tgetWord();\n\tdisplayWord();\n\n}", "function startGame() {\r\n if (pressed == 0) {\r\n createRain();\r\n animate();\r\n }\r\n }", "function start () {\n room.sendToPeers(GAME_START)\n onStart()\n}", "start() {\n this._state = 'RUNNING'\n this._start_time = _.now()\n Logger.info('Enabling the game modes')\n _.forEach(this._games, (game) => game._enable())\n Logger.info(`The game(${this._id}) has started as ${moment(this._start_time).format('l LTS')}...`)\n this.event_manager.trigger('game_start', [this])\n // spectators and players should be handle differently\n this._teams.forEach((team) => team.start())\n }", "start()\n {\n this.battle.start();\n this.gameMap.start();\n this.screen.start();\n\n Character.createPlayer();\n\n // Start game\n // show introduction, character creation screen, etc.\n // just start world movement for now\n emit('map'); \n }", "function realStartGame() {\n\t$.unblockUI();\n\n\t//$(\"body\").get(0).style.cursor = \"url('/static/cursor.cur')\";\n\t//$(\"body\").get(0).style.cursor = 'crosshair'; //\"url('/static/cursor.cur')\";\n\t\n\t//$(document).ajaxStop(getAll);\n\tsetTimeout( getAll, 500 );\n\t\n\tsetSelection( null );\n\tsetAction( null );\n\tdrawMap();\n\tshowAllActions( null );\n\t\n\t// Start anims loop\n\tsetInterval( loopObjects, 40 );\n\tsetInterval( loopStatus, 5000 );\n}", "function startGame() {\n hideStart();\n hideSaveScoreForm();\n resetFinalScore();\n clearCurrentQuestion();\n resetUserScore();\n displayCurrentQuestion();\n startTimer();\n}", "function startGame() {\n water = 0;\n corn = 2;\n beans = 2;\n squash = 2;\n month = 1;\n gameOver = false;\n \n initGameBoard();\n playGame();\n}", "function start(data) {\n startGameTimer();\n}", "function startTheGame() {\n if (opponentReady) {\n startNewRound();\n }\n }", "start() {\n\t\tplaySound( 'lvls' );\n\t\tgame.loading = true;\n\n\t\t// the game noticibly lags while setting the terrain, so this makes it look like a loading\n\t\t// black screen for 100 ms whenever it is loaded\n\t\tsetTimeout( () => {\n\t\t\tpause_name = '';\n\n\t\t\t//I think this maybe saved like 8 bytes over just saying game.loading, game.started... etc\n\t\t\tObject.assign( game, {\n\t\t\t\tloading: 0,\n\t\t\t\tstarted: 1,\n\t\t\t\tpaused: 0,\n\t\t\t\tscrolling: 1,\n\t\t\t\tlvln: 1,\n\t\t\t\ta: [],\n\t\t\t\tspawns: [],\n\t\t\t\tpl: new Player(),\n\t\t\t\tscore: 0,\n\t\t\t\tsmult: 1,\n\t\t\t\tspfr: 0,\n\t\t\t\ttss: TSS,\n\t\t\t\ti: null\n\t\t\t} );\n\t\t\tgame.createObjects();\n\t\t\tgame.camToLvl( game.lvln );\n\t\t\tgame.fade( true );\n\t\t}, 100 );\n\t}", "run() {\n logger.info('Starting game...');\n this.running = true;\n this.update();\n }", "startGame() {\r\n // Hide start screen overlay\r\n document.getElementById('overlay').style.display = 'none';\r\n\r\n // get a random phrase and set activePhrase property\r\n this.activePhrase = this.getRandomPhrase();\r\n this.activePhrase.addPhrasetoDisplay();\r\n }", "function startGame(playerCount) {\r\n\t\r\n\tGC.initalizeGame(playerCount);\r\n\t\r\n\tUI.setConsoleHTML(\"The game is ready to begin! There will be a total of \" + GC.playerCount + \" players.<br />Click to begin!\");\r\n\tUI.clearControls();\r\n\tUI.addControl(\"begin\",\"button\",\"Begin\",\"takeTurn()\");\r\n\t\r\n\tGC.drawPlayersOnBoard();\r\n}", "function startNewGame() {\n const newGame = new GameLoop();\n newGame.startGame(true);\n}", "function startGame() {\n renderNewWord();\n startBar();\n }", "function main(mainFunction){\n game.start=mainFunction;\n}", "function startGame(index){\n\tgamePaused = false;\n\tmapStarted = true;\n}", "function startGame(){\n /*\n Start the game.\n */\n bot_enabled = true;\n console.log(\"STARTING\");\n\n // Wait until the conexion is stablished\n start_game();\n setTimeout(update,1000);\n}", "function startPlayerGame(){\r\n\t\t\t\r\n\t\tdocument.getElementById(\"gameoverTitle\").style.display = 'none';\r\n\t\tdocument.getElementById(\"startTitle\").style.opacity = 0;\r\n\t\t\r\n\t\tlevel = 1;\r\n\t\tlifes = maxLifes;\r\n\t\tscore = 0;\r\n\t\tregisterPlayerGameEvents();\r\n\t\tgame.setLevel(level);\r\n\t\t\r\n\t\t//fade to white -> reset the game -> let the camera look and follow the paddle ->\r\n\t\t//pause the game -> start camera from certain position -> show blocks falling ->\r\n\t\t//fade to normal -> move camera to play position\r\n\t\tfade(0,1,function(){\r\n\t\t\tgame.reset(function(){\r\n\t\t\t\tgame.setCameraLookAtMesh(game.getPaddle().mesh);\r\n\t\t\t\tgame.cameraFollowsPaddle(true);\r\n\t\t\t\t\r\n\t\t\t\tgame.togglePause(function(){\r\n\t\t\r\n\t\t\t\t\tgame.getCamera().setLens(25)\r\n\t\t\t\t\tgame.getCamera().position.x = 0;\r\n\t\t\t\t\tgame.getCamera().position.y = -7;\r\n\t\t\t\t\tgame.getCamera().position.z = 2;\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tanimateBricksFadeIn(function(){\r\n\t\t\r\n\t\t\t\t\t\thud.drawGameStatistics(score,level,lifes);\r\n\t\t\t\t\t\tgame.togglePause();\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t\tfade(1,-1,function(){});\r\n\t\t\t\t\tgame.getComposer().passes[2].copyUniforms.opacity.value = 0.7;\r\n\t\t\t\t\tgame.tweenCamera(Tween.easeInOutQuad,{yTarget:-7,zTarget:6, xTarget:0});\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t}", "function startGame(){\n game = new Phaser.Game(790, 400, Phaser.AUTO, 'game', stateActions);\n}", "function startGame() {\n //START THE FIRST ROUND\n console.log(\"Game will Begin\");\n randomColor();\n playPattern();\n if (round === 0) {\n update();\n }\n}", "function run () {\n var $canvasBox;\n \n $('#newGameLink').removeAttr('disabled'); // can click new game link\n\n if (m.debug > m.NODEBUG) { console.log('screens.gameScreen.run'); }\n \n if (needsInit) {\n \n // disable mouse events on canvas and halt the game loop when we return to the menu\n $('#gameMenuLink')\n .click( function (event) {\n m.playtouch.unhookMouseEvents();\n m.Model.stopGameNow();\n m.Audio.beQuiet();\n m.screens.showScreen('menuScreen');\n });\n \n // shuffle and deal if we ask nicely\n $('#newGameLink')\n .click( function (event) {\n // disallow double-clicks, also disabled in the model while dealing\n if ( $(this).attr('disabled') === 'disabled' ) { return false; } \n $(this).attr('disabled', 'disabled'); \n // if you start a new game before winning, give 'em the not impressed face\n if (m.Settings.getPlaySounds() && !hasWon) {\n m.Sounds.playSoundFor(m.Sounds.QUIT);\n }\n \n // now we play\n setTimeout( function() {\n m.Model.stopGameNow();\n m.screens.showScreen('gameScreen');\n }, m.Settings.Delays.Quit);\n return false;\n });\n \n }\n needsInit = false;\n \n // start the game animation loop\n m.gameloop.setLoopFunction(m.view.refreshDisplay);\n \n // start a new game\n m.view.newGame($('#gameViewBox'));\n \n // hook up event handling\n m.playtouch.hookMouseEvents(); \n\n // resize the game pane if needed after a short delay\n $(window)\n .resize(function (event) {\n setTimeout( function () {\n mikeycell.view.setMetrics();\n }, 500);\n });\n\n }", "function startGame() {\n timerStat = true;\n showGamePanel();\n runTimer();\n displayImage();\n}", "function startGame()\n{\n\tcreateDeck();\n\tshuffleDeck();\n\tcreatePlayers(2);\n\n\tdrawCard(0, 0);\n\tdrawCard(1, 0);\n\tdrawCard(0, 0);\n\tdrawCard(1, 0);\n\n\n\n\tdisplayCards();\n\tdisplayOptions();\n}" ]
[ "0.8947497", "0.853883", "0.85360265", "0.846057", "0.83268464", "0.8302629", "0.82855785", "0.8213439", "0.81400234", "0.80515915", "0.8041017", "0.80409956", "0.8034612", "0.8003582", "0.7985927", "0.79599327", "0.79583174", "0.7946285", "0.78813124", "0.78753716", "0.7865101", "0.7863184", "0.78406906", "0.78379506", "0.78375834", "0.7833191", "0.7827397", "0.7812027", "0.780804", "0.77836835", "0.7783539", "0.7776656", "0.7743123", "0.77280617", "0.7717667", "0.77071303", "0.77055293", "0.77047616", "0.76977295", "0.76952475", "0.7670765", "0.76611924", "0.7637856", "0.76324445", "0.7628862", "0.76282185", "0.7625552", "0.7617091", "0.76159006", "0.76061076", "0.7602572", "0.7600971", "0.7599663", "0.75829864", "0.7578652", "0.7567142", "0.7566309", "0.7556113", "0.75505626", "0.7540673", "0.7535768", "0.75334203", "0.75309396", "0.7526981", "0.75162256", "0.7511098", "0.75077945", "0.75077426", "0.74879456", "0.74852604", "0.7484812", "0.7478747", "0.7477351", "0.747032", "0.7468082", "0.74676466", "0.7462838", "0.74583346", "0.7448829", "0.7443382", "0.7437859", "0.7433282", "0.74329233", "0.74311626", "0.74300396", "0.74233454", "0.741981", "0.74196506", "0.74190164", "0.7413455", "0.7393541", "0.7392748", "0.7392226", "0.73893434", "0.7383406", "0.73792535", "0.7379219", "0.7368142", "0.73661053", "0.73584", "0.73477155" ]
0.0
-1
function that clears messages and displays a picture onscreen
function endGame() { questions1El.textContent = "Game Over"; button1El.textContent = ""; button2El.textContent = ""; button3El.textContent = ""; button4El.textContent = ""; startEl.textContent = ""; //append img to questions window var imgEl = document.createElement("img"); imgEl.setAttribute("src", "assets/congrats.png"); questions1El.appendChild(imgEl); //create item to append to high scores var highScoresEl = document.getElementById("highScores"); var item = document.createElement("p"); item.textContent = prompt("Enter Initals")+" : "+ score;//put score in item //highScoresEl.setAttribute("visibility","visible"); highScoresEl.append(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearChat() {\n $(\"gameOutputField\").innerHTML = \"\";\n displayMessage(\"<a href='images/how-about-no-bear.jpg' target='_blank'>see chat history</a>\");\n $(\"gameInputField\").focus();\n }", "function clearMessages() {\n hint.textContent = \"\";\n hold.textContent = \"\";\n wrongGuess.textContent = \"\";\n usedLetters.textContent = \"\";\n usedLettersLabel.textContent = \"\";\n changeImageNull(\"\");\n \n }", "function clearPicture() {\n let context = canvas.getContext('2d');\n context.fillStyle = \"#FFF\";\n context.fillRect(0, 0, canvas.width, canvas.height);\n\n this.video.style.display = 'block';\n this.canvas.style.display = 'none';\n this.photo.style.display = 'none';\n }", "function displayMessage () {\n msgBtn.innerHTML = 'Gimme more blues!'\n const quoteDisplay = document.getElementById('song');\n const bgImage = document.getElementById('contentHolder');\n bgImage.style.backgroundImage=\"url('./images/white_rect.jpg')\";\n quoteDisplay.style.display = \"block\";\n quoteDisplay.style.marginTop = \"600px\";\n quoteDisplay.innerHTML = createSong();\n document.getElementById('instructions').style.display = 'none';\n}", "function consoleDisplay(img) {\n elements.gameMessageContainer.innerHTML = \"\";\n let html = `\n <img class=\"console-messages\" src=\"img/${img}.png\">\n `\n\n elements.gameMessageContainer.innerHTML = html;\n}", "function showChat(pathFotoProfilo, nomeUtente){\r\n\r\n\t//Div che contiene la chat (inizialmente non visibile)\r\n\tdocument.getElementById(\"divChatBackground\").style.display = \"block\";\r\n\r\n\t//Settaggio dell'immagine profilo\r\n\tif(pathFotoProfilo != \"default\"){ //Se l'immagine è quella di default, l'url è già nel CSS\r\n\t\tvar pathBase = \"../upload/\";\r\n\t\tvar pathFinale = pathBase + pathFotoProfilo;\r\n\t\tdocument.getElementById(\"divImgProfiloChat\").style.backgroundImage = \"url('\" + pathFinale + \"')\";\r\n\t}\r\n\r\n\t//Settaggio del nome dell'utente con cui stiamo parlando\r\n\tvar titoloNomeUtente = document.getElementById(\"chatNomeUtente\")\r\n\tif(titoloNomeUtente == null){\r\n\t\ttitoloNomeUtente = document.createElement(\"h5\");\r\n\t\ttitoloNomeUtente.id = \"chatNomeUtente\";\r\n\t\tdocument.getElementById(\"divChatUp\").appendChild(titoloNomeUtente);\r\n\t}\r\n\ttitoloNomeUtente.textContent = nomeUtente;\r\n\t\r\n\r\n\t//Richiamiamo periodicamente la funzione che controlla i nuovi messaggi in arrivo\r\n\tintervalloChat = setInterval(checkNewMessage, 1000);\r\n}", "function welcomeDisplay1() {\n push();\n background(boxOffice1.image);\n imageMode(CENTER);\n image(sonicSign.image, sonicSign.x, sonicSign.y, 600, 180);\n pop();\n}", "function msgCreator(message, correctAnswerText, correctAnswerImage) {\n var messageToDisplay = \"<h1>\" + message + \"</h1>\";\n messageToDisplay = messageToDisplay + \"<h4>\" + correctAnswerText + \"</h4>\" + '<img src=\"' + correctAnswerImage + '\">';\n $(\".messageDiv\").html(messageToDisplay);\n $(\".messageDiv\").show();\n setTimeout(function () {\n $(\".messageDiv\").hide();\n }, 3000);\n }", "function displayMessage(id, timestamp, name, text, picUrl, imageUrl) {\n var div = document.getElementById(id) || createAndInsertMessage(id, timestamp);\n\n // profile picture\n if (picUrl) {\n div.querySelector('.pic').style.backgroundImage = 'url(' + addSizeToGoogleProfilePic(picUrl) + ')';\n }\n\n div.querySelector('.name').textContent = name;\n var messageElement = div.querySelector('.message');\n\n if (messageListElement != null) {\n if (text) { // If the message is text.\n messageElement.textContent = text;\n // Replace all line breaks by <br>.\n messageElement.innerHTML = messageElement.innerHTML.replace(/\\n/g, '<br>');\n } else if (imageUrl) { // If the message is an image.\n var image = document.createElement('img');\n image.addEventListener('load', function () {\n messageListElement.scrollTop = messageListElement.scrollHeight;\n });\n image.src = imageUrl + '&' + new Date().getTime();\n messageElement.innerHTML = '';\n messageElement.appendChild(image);\n }\n // Show the card fading-in and scroll to view the new message.\n setTimeout(function () { div.classList.add('visible') }, 1);\n messageListElement.scrollTop = messageListElement.scrollHeight;\n messageInputElement.focus();\n }\n}", "function clearMsg() {\n document.getElementById('gameMsg').innerHTML = \"\";\n}", "function displayMessage(id, timestamp, name, text, picUrl, imageUrl) {\n var div = document.getElementById(id) || createAndInsertMessage(id, timestamp);\n\n // profile picture\n if (picUrl) {\n div.querySelector('.pic').style.backgroundImage = 'url(' + addSizeToGoogleProfilePic(picUrl) + ')';\n }\n\n div.querySelector('.name').textContent = name;\n var messageElement = div.querySelector('.message');\n\n if (text) { // If the message is text.\n messageElement.textContent = text;\n // Replace all line breaks by <br>.\n messageElement.innerHTML = messageElement.innerHTML.replace(/\\n/g, '<br>');\n } else if (imageUrl) { // If the message is an image.\n var image = document.createElement('img');\n image.addEventListener('load', function() {\n messageListElement.scrollTop = messageListElement.scrollHeight;\n });\n image.src = imageUrl + '&' + new Date().getTime();\n messageElement.innerHTML = '';\n messageElement.appendChild(image);\n }\n // Show the card fading-in and scroll to view the new message.\n setTimeout(function() {div.classList.add('visible')}, 1);\n messageListElement.scrollTop = messageListElement.scrollHeight;\n messageInputElement.focus();\n}", "function hideGameMsg() {\n clearMsg();\n document.getElementById('gameMsgBox').style.display = 'none';\n}", "function displayMessage(id, timestamp, name, text, picUrl, imageUrl) {\n var div = document.getElementById(id) || createAndInsertMessage(id, timestamp);\n\n // profile picture\n if (picUrl) {\n div.querySelector('.pic').style.backgroundImage = 'url(' + addSizeToGoogleProfilePic(picUrl) + ')';\n }\n\n div.querySelector('.name').textContent = name;\n var messageElement = div.querySelector('.message');\n\n if (text) { // If the message is text.\n messageElement.textContent = text;\n // Replace all line breaks by <br>.\n messageElement.innerHTML = messageElement.innerHTML.replace(/\\n/g, '<br>');\n } else if (imageUrl) { // If the message is an image.\n var image = document.createElement('img');\n image.addEventListener('load', function () {\n messageListElement.scrollTop = messageListElement.scrollHeight;\n });\n image.src = imageUrl + '&' + new Date().getTime();\n messageElement.innerHTML = '';\n messageElement.appendChild(image);\n }\n // Show the card fading-in and scroll to view the new message.\n setTimeout(function () { div.classList.add('visible') }, 1);\n messageListElement.scrollTop = messageListElement.scrollHeight;\n messageInputElement.focus();\n }", "function useSticker(e) {\n const message = `<img src=\"${e.src}\" class=\"graphics-container-item\" />`;\n socket.emit(\"chat-message\", message);\n graphics.classList.add(\"no-display\");\n graphics.innerHTML = \"\";\n}", "function view_messages(msg) {\n jQuery(\"#messages_plugin\").empty();\n jQuery(\"#messages_plugin\").html(msg);\n jQuery(\"#messages_plugin\").fadeIn(200);\n jQuery(\"#messages_plugin\").fadeOut(5000);\n }", "function timerGo_pic() {\n IDx('response_img_id').style.display = 'none'; //makes img disappear abruptly\n }", "function changepicture() {\n i = 0;\n sendinformation();\n \n}", "function resetDisplay() {\n\t\tctx.clearRect(0,0,610,550);\n\t\tctx.strokeRect(40, 10, 530, 539);\n\t\t$(\"#controls button\").button(\"disable\");\n\t\t$(\"#seeker\").slider(\"disable\");\n\t\t$(\"#display-options input\").attr(\"disabled\",\"disabled\");\n\t\t$(\".game-status .p1, .game-status .p2, .game-status .message\").empty();\n\t\t$(\".game-status .message\").removeClass(\"neutral-text p1-text p2-text\").css(\"visibility\",\"hidden\");\n\t\t$(\".display .p1-text, .display .p2-text\").html(1000);\n\t\t$(\".names-time .time\").html(0);\n\t\t$(\"#canvas-alt\").remove();\n\t}", "function display(picture, sizeX, sizeY){\n imageMode(CENTER);\n image(picture,stealer.pos.x, stealer.pos.y, sizeX, sizeY);\n}", "function showResetScreen(message) {\n resetScreen.classList.add('show_piece');\n resetScreen.querySelector('h3').textContent = message;\n}", "function onClearAll() {\n gMeme.txts = [];\n showImg();\n}", "function displayLoss(){\n\tpageOptions.reference.innerHTML = \t\"<img src='img/layer.png' style='display:block;width:100%;height:100%'>\"+\n\t\"<img src='img/tryagain.png' id='tryAgain'>\" +\n\t\"<img src='' onclick='playBackground()' id='ayy'>\" +\n \"<img src='img/button_menu.png' onclick='pageOptions.setPage()' id='menu'>\" +\n \"<img src='img/button_check.png' onclick='pageOptions.setPage1t()' id='yes'>\" +\n\t\"<img src='img/button_xmark.png' onclick='enterName()' id='no'>\";\n\tsetAudioImg();\n clock.lost = false;\n resetTimer();\n}", "function clear() {\n input.style.display = 'none';\n button.style.display = 'none';\n button2.style.display = 'block';\n ask.innerHTML = input.value;\n start.src =ballImageArray[Math.floor(Math.random() *ballImageArray.length)];\n}", "function showDisplayPicture() {\n\t\tif (settings.displayPicture != \"\") {\n\t\t\t$(\"#statusBoxDisplayPictureFrame\")\n\t\t\t\t.html(\"<div></div>\");\n\t\t\t$(\"#statusBoxDisplayPictureFrame div\")\n\t\t\t\t.css({backgroundImage: \"url(\" + settings.displayPicture + \")\"});\n\t\t}\n\t}", "function newGame() {\n resetGame()\n winTotal = 0\n removePicture()\n document.getElementById(\"poster\").style.display = \"inline\";\n}", "function displayMessage(id, timestamp, name, text, picUrl, imageUrl, lat, lng) {\n var div = document.getElementById(id) || createAndInsertMessage(id, timestamp);\n\n // profile picture\n if (picUrl) {\n div.querySelector('.pic').style.backgroundImage = 'url(' + addSizeToGoogleProfilePic(picUrl) + ')';\n }\n\n if (!timestamp) return;\n\n var dist_away = Math.round(latlng_dist(pos_lat,pos_lng, lat,lng));\n div.querySelector('.name').textContent = name + \" (\"+formatAMPM(timestamp.toDate()) + \" ~\" + dist_away + \"mi away)\";\n var messageElement = div.querySelector('.message');\n\n if (text) { // If the message is text.\n messageElement.textContent = text;\n // Replace all line breaks by <br>.\n messageElement.innerHTML = messageElement.innerHTML.replace(/\\n/g, '<br>');\n } else if (imageUrl) { // If the message is an image.\n var image = document.createElement('img');\n image.addEventListener('load', function() {\n messageListElement.scrollTop = messageListElement.scrollHeight;\n });\n image.src = imageUrl + '&' + new Date().getTime();\n messageElement.innerHTML = '';\n messageElement.appendChild(image);\n }\n // Show the card fading-in and scroll to view the new message.\n setTimeout(function() {div.classList.add('visible')}, 1);\n messageListElement.scrollTop = messageListElement.scrollHeight;\n messageInputElement.focus();\n}", "function output (){\n document.getElementById(\"finalMessage\").innerHTML = finalMessage(name, printSign, message);\n document.getElementById(\"image\").innerHTML = \"<img src= img/\"+ getImage(signNum)+ \"/>\";\n document.getElementById(\"birthdayMessage\").innerHTML = getBirthday(month,day);\n\n}", "function dispResults() {\n $('.qanda-disp').empty();\n $('.timer').hide();\n $('.response-feedback').text('Congratulations! Your score was: ' + score);\n //display end-of-game img \n}", "function showMessage(message)\n{\n $(\"messagesDiv\").innerHTML = message; \n $(\"messagesDiv\").style[\"visibility\"] = \"visible\";\n if (messageTimer) clearTimeout(messageTimer);\n messageTimer = setTimeout(clearMessages, prefs.getPref(\"MESSAGES_TIMEOUT\"));\n}", "function ClearMessagePane() {}", "function clearScreen() {\n displayScreen.innerHTML = \"\";\n}", "function textOnScreen() {\n createP('Refresh The Page To Reset');\n createP('Press W to Remove Obstacles');\n createP('Press Q To Increase Number of Obstacles');\n }", "function answerWrong() {\n displayImage();\n}", "displayBoard(message) {\n $('.menu').css('display', 'none');\n $('.gameBoard').css('display', 'block');\n $('#userHello').html(message);\n this.createGameBoard();\n }", "function out() {\n\tif (this.id == 0)\n\tthis.src = \"box.png\";\n}", "function clearScreen() {\n $('#details').text('You closed tab, Need to clear you from online users. If you didnt mean to leave, click HOME link and rejoin.');\n $('.sqr-con').css('display','none');\n}", "function displayRandomMessage() {\n showHide(loader, logo);\n hide(chosenMessage);\n // hide(favoriteButton);\n var timer;\n timer = setTimeout(showMessage, 1500);\n}", "function congratulationsScreen () {\n console.log('congratulationsScreen');\n \n $('#question').text(\"You Are Correct!\")\n $('#timer').empty();\n $(\"#answer1\").empty();\n $(\"#answer2\").empty();\n $(\"#answer3\").empty();\n $(\"#answer4\").empty();\n $(\"#gif\").show();\n startResponseScreen();\n winner = true;\n}", "noSignature(){\n\t\tthis.context.font = \"25px Arial\";\n\t\tthis.context.fillStyle = \"red\";\n\t\tthis.context.fillText(\"Informations incomplètes.\", 7, 80);\n\t\tsetTimeout(function(){ // retrait du message après deux secondes\n\t\t\tthis.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\t\t}.bind(this), 2000);\n\t}", "function feedNewPic () {\n closeRelay(A5, feedNewPicButtonTreshold, true);\n setTimeout(function() {\n takePicture();\n }, feedNewPicTreshold);\n}", "function displayImage(srcData,usernameData) {\r\n const div = document.createElement('div');\r\n\r\n const p = document.createElement('p');\r\n p.classList.add('meta');\r\n p.innerText = \"\";\r\n p.innerHTML += `<span>${usernameData}</span>`;\r\n p.style.color = 'green';\r\n p.style.fontFamily = 'Lucida Handwriting';\r\n div.appendChild(p);\r\n document.querySelector('.chat-messages').append(div);\r\n\r\n const div2 = document.createElement('div');\r\n var newImage = document.createElement('img');\r\n newImage.src = srcData;\r\n div2.append(newImage);\r\n\r\n //div.append(newImage);\r\n document.querySelector('.chat-messages').append(div2);\r\n \r\n}", "function eraseMessages() {\n\tanswer.innerHTML = '';\n\teraseButton.style.display = 'none';\n}", "function clearUserMessages() {\r\n document.getElementById(\"message1\").innerHTML = \"\"\r\n}", "function clearimage() {\n document.getElementById('image').innerText = \"\";\n\n }", "function displayGIF(status,correctAnswer) {\n \n if(status === \"win\") {\n $(\".triviaText\").html(`\n <p>Congrats you chose correctly!</p>\n <p>The correct answer was ${correctAnswer}</p>\n <img src=\"${randomImage()}\"/>\n `)\n }\n else if (status === \"lose\") {\n $(\".triviaText\").html(`\n <p>The answer you chose was incorrect!</p>\n <p>The correct answer was ${correctAnswer}</p>\n <img src=\"${randomImage()}\"/>\n `)\n }\n}", "function drawMessage() {\n ctx.fillStyle = questionBarColor;\n ctx.fillRect(canvas.width / 2 - 250, canvas.height - 325, 500, 150);\n ctx.fillStyle = \"white\";\n ctx.font = \" 32px cymraeg\";\n ctx.fillText(\"Dewiswch avatar,\", canvas.width / 2 - 5, canvas.height - 310);\n ctx.fillText(\"yna, rhowch eich enw\", canvas.width / 2 - 5, canvas.height - 270);\n ctx.fillText(\"a cliciwch parhau\", canvas.width / 2 - 5, canvas.height - 230);\n}", "function rpsFrontEnd(humanImageChoice, botImageChoice, finalMessage) {\n var imagesDatabase = {\n rock: document.getElementById(\"rock\").src,\n paper: document.getElementById(\"paper\").src,\n scissor: document.getElementById(\"scissor\").src,\n };\n document.getElementById(\"rock\").remove();\n document.getElementById(\"paper\").remove();\n document.getElementById(\"scissor\").remove();\n\n var humanDiv = document.createElement(\"div\");\n var messageDiv = document.createElement(\"div\");\n var botDiv = document.createElement(\"div\");\n\n humanDiv.innerHTML =\n \"<img src='\" +\n imagesDatabase[humanImageChoice] +\n \"' height=150,width=150 style= 'box-shadow:0px 10px 50px rgba(37,50,233,1)'>\";\n messageDiv.innerHTML =\n \"<h1 style='color:\" +\n finalMessage[\"color\"] +\n \"; font-size:60px; padding :30px '>\" +\n finalMessage[\"message\"] +\n \"</h1>\";\n botDiv.innerHTML =\n \"<img src='\" +\n imagesDatabase[botImageChoice] +\n \"' height=150,width=150 style= 'box-shadow:0px 10px 50px rgba(243,38,24,1)'>\";\n\n document.getElementById(\"flex-box-rps\").appendChild(humanDiv);\n document.getElementById(\"flex-box-rps\").appendChild(messageDiv);\n document.getElementById(\"flex-box-rps\").appendChild(botDiv);\n}", "function displayMessage(message) {\n closePopups();\n $(\"#message-box\").text(message);\n $(\".backdrop\").css(\"display\", \"inline\");\n $(\"#info-box\").css(\"display\", \"inline\");\n }", "function scoreboard(){\n $('#timeLeft').empty();\n $('#message').empty();\n $('#correctedAnswer').empty();\n $('#gif').hide();\n $(\"#gifCaption\").hide();\n \n $('#finalMessage').html(messages.finished);\n $('#correctAnswers').html(\"Correct Answers: \" + correctAnswer);\n $('#incorrectAnswers').html(\"Incorrect Answers: \" + incorrectAnswer);\n $('#unanswered').html(\"Unanswered: \" + unanswered);\n $('#startOverBtn').addClass('reset');\n $('#startOverBtn').show();\n $('#startOverBtn').html(\"PLAY AGAIN\");\n }", "function VictoryScreen(TopBorderX,TopBorderY){\n background(0);\n fill(58,134,183);\n textSize(75);\n text('CONGRATULATIONS',250,SmaeY);\n textSize(24);\n text('Thank You for Playing!',500,SmaeY+100);\n text('Press 0 to Begin Again',500,SmaeY+150);\n noLoop();\n}", "function update_message(m, clear)\n{\n if (clear) {\n $('#message').empty();\n }\n $('#message').append($('<div/>',{text:m}));\n}", "function showMeme(good) {\n\n // Show celebration meme or fail meme? Choose a suitable GIF.\n var choice=(good ? successMemes : failMemes);\n var whatWeWant=parseInt(Math.floor((choice.length-.1)*Math.random()))\n var gif = choice[whatWeWant];\n\n // Render it:\n meme.innerHTML='';\n img = document.createElement('img');\n img.className='meme';\n img.style.width='80%';\n img.src=gif;\n meme.appendChild(img);\n meme.style.display='inline';\n }", "drawOffscreen() { }", "function displayImage(){\n\n}", "function popupFinalResults(text) {\n if (winner) {\n memorygameResultImg.src = \"img/got-winner.png\";\n } else {\n memorygameResultImg.src = \"img/got-looser.png\";\n }\n finalMessage.innerText = text;\n popup.style.display = 'flex';\n popupResult.classList.remove(\"hidden\");\n}", "function deletePicture() {\n symbols = [];\n drawBG();\n }", "function ClearOldMessage(){\n document.getElementById(\"message\").innerHTML = \"\";\n}", "function show_liveview_img(msg_dec){\n\t// hide loading dialog, if there is one\n\tvar txt=$(\"#\"+msg_dec[\"mid\"]+\"_liveview_txt\");\n\tif(txt.length){\n\t\ttxt.hide();\n\t};\n\n\t// show debug speed\n\tif(msg_dec[\"up_down_debug\"]!=\"\"){\n\t\ttxt=$(\"#\"+msg_dec[\"mid\"]+\"_liveview_up_down_debug\");\n\t\tif(txt.length){\n\t\t\ttxt.show();\n\t\t}\n\t\ttxt.text(msg_dec[\"up_down_debug\"]);\n\t};\n\n\t// display picture\n\tvar img=$(\"#\"+msg_dec[\"mid\"]+\"_liveview_pic\");\n\tif(img.length){\n\t\t//console.log(\"mid_img: #\"+msg_dec[\"mid\"]+\"_liveview_pic gefunden!!\");\n\n\t\tif(msg_dec[\"img\"]!=\"\"){\n\t\t\t// if we receive the first image, scroll to it\n\t\t\tif(img.attr(\"src\")==host+\"images/support-loading.gif\"){\n\t\t\t$('html,body').animate({\n\t\t\t\t\tscrollTop: img.offset().top-($(window).height()/20)\n\t\t\t\t},1000);\n\t\t\t};\n\n\t\t\t// display image\n\t\t\tresize_alert_pic(msg_dec[\"mid\"],msg_dec[\"img\"]);\n\t\t};\n\t} else {\n\t\tconsole.log(\"konnte mid_img: #\"+msg_dec[\"mid\"]+\"_liveview_pic nicht finden!!\");\n\t};\n\n\t// handle countdown\n\tif(msg_dec[\"webcam_countdown\"]<90){\n\t\tvar cmd_data = { \"cmd\":\"reset_webcam_countdown\"};\n\t\tconsole.log(JSON.stringify(cmd_data));\n\t\tcon.send(JSON.stringify(cmd_data)); \t\t\n\t}\n}", "display() {\n // draw our player at their current position with the correct graphic\n image(this.myGraphic, this.xPos, this.yPos);\n }", "function changeUI() {\n //Show detected mood\n pageheader.innerHTML = \"You look like \" + age + \" years old. You feel like: \"; //Remember currentMood is a Mood object, which has a name and emoji linked to it. \n //Show mood emoji\n var img = $(\"#selected-img\")[0]; //getting a predefined area on our webpage to show the emoji\n img.src = recommendation.picture; //link that area to the emoji of our currentMood.\n img.style.display = \"block\"; //just some formating of the emoji's location\n //Display song refresh button\n refreshbtn.style.display = \"inline\";\n //Remove offset at the top\n pagecontainer.style.marginTop = \"20px\";\n}", "function drawMessageBox(msgService, title, face, lines, boxPosition, boxAutoSize, pictures) {\n\t// DROP PICTURES ONTO THE SCREEN\n\twhile (pictures.hasNext()) {\n\t\tmsgService.addActor(pictures.next().getImage());\n\t}\n\n\t// CREATE LAYOUT TABLE\n\ti18nContainer = \"messageText\";\n\tvar skin = msgService.skinNormal;\n\tvar t = new ui.Table().top();\n\tt.setBackground(msgService.createDrawable(\"data/image/customDesign/WindowBackground.png\"));\n\tt.setWidth($.screen.width);\n\tt.setHeight(200);\n\tt.setY($.screen.height-200);\n\n\t// TITLE\n\tt.row().fillX().expandX().pad(5);\n\tvar l = new ui.Label(i18nText(title), skin);\n\tl.setColor(0.7, 0.7, 0.7, 1);\n\tt.add(l).colspan(2);\n\n\t// FACE\n\tt.row().pad(5);\n\tif (face != null) {\n\t\tt.add(new ui.Image(face));\n\t} else {\n\t\tt.add(); // empty cell because of colspan=2\n\t}\n\n\t// CREATE MESSAGE-LINE TABLE\n\tvar t2 = new ui.Table().top();\n\tfor (var i = 0, n = lines.size; i < n; i++) {\n\t\tt2.row().fillX().expandX();\n\t\tvar msgLine = lines.get(i);\n\t\t// CONVERT TEXT LANGUAGE I18N\n\t\tmsgLine.text = i18nText(msgLine.text);\n\t\tt2.add(msgLine.getActor());\n\t}\n\n\t// CREATE SCROLLPANE\n\tvar s = new ui.ScrollPane(t2, skin);\n\ts.setFadeScrollBars(false);\n\tt.add(s).fill().expand();\n\n\t// MAKE WINDOW VISIBLE AND FOCUS FIRST INPUT-FIELD ON DESKTOP\n\tmsgService.addActor(t);\n\tif (desktopMode) msgService.focus(t2);\n}", "function clearScreen()\n {\n // TODO: find a way to do this cleaner and not on every draw call so I can \n // create animations that work correctly\n $(\"#pickJedi0\").empty();\n $(\"#pickJedi1\").empty();\n $(\"#pickJedi2\").empty();\n $(\"#pickJedi3\").empty();\n $(\"#playerJedi\").empty();\n $(\"#enemyJedi\").empty();\n $(\"#pickEnemyJedi0\").empty();\n $(\"#pickEnemyJedi1\").empty();\n $(\"#pickEnemyJedi2\").empty();\n $(\"#textField\").empty();\n $(\"#textField2\").empty();\n $(\"#fight\").hide();\n $(\"#replay\").hide();\n }", "function showMessage (parameters) {\n var message = parameters.message, position = parameters.position;\n if (!position) position = \"top-right\";\n\n uiOnboarding.messageHolder.toggleClass(\"yellow-background\");\n setTimeout(function () { uiOnboarding.messageHolder.toggleClass(\"yellow-background\"); }, 100);\n\n uiOnboarding.messageHolder.css({\n top: 0,\n left: 0,\n width: 300\n });\n\n\n if (!uiOnboarding.messageHolder.is(\":visible\")) uiOnboarding.messageHolder.show();\n\n\n uiOnboarding.background.css(\"visibility\", \"hidden\");\n if (parameters) {\n if (\"width\" in parameters) {\n uiOnboarding.messageHolder.css(\"width\", parameters.width);\n }\n\n if (\"left\" in parameters) {\n uiOnboarding.messageHolder.css(\"left\", parameters.left);\n }\n\n if (\"top\" in parameters) {\n uiOnboarding.messageHolder.css(\"top\", parameters.top);\n }\n\n if (\"background\" in parameters && parameters.background) {\n uiOnboarding.background.css(\"visibility\", \"visible\");\n }\n }\n\n uiOnboarding.messageHolder.html((typeof message == \"function\" ? message() : message));\n }", "function cerrar(){\n document.getElementById(\"up\").style.display = \"block\";\n document.getElementById(\"chat\").style.display = \"none\";\n}", "function image_display() {\r\n\r\n}", "function removePicture () {\n document.getElementById(\"swayze\").style.display = \"none\";\n document.getElementById(\"keanu\").style.display = \"none\";\n document.getElementById(\"skydive\").style.display = \"none\";\n document.getElementById(\"reagan\").style.display = \"none\";\n document.getElementById(\"kiedis\").style.display = \"none\";\n document.getElementById(\"poster\").style.display = \"none\";\n}", "function clearmessage(){\n\t$(\"#message\").html(\"<p></p>\");\n}", "function image() {\r\n // Set variable as the div in order to check if the div is there\r\n var location = document.getElementById('imgSection');\r\n // If an image IS there\r\n if (document.getElementById('charImage')) {\r\n // Remove the current character image from the div\r\n location.removeChild(characterImage);\r\n }\r\n // Get a random character image\r\n randomHira = imgRandom(hiraArray);\r\n // Set new img element's src as the \"character\" image src\r\n characterImage.src = randomHira.src;\r\n // Append img to page\r\n location.appendChild(characterImage);\r\n // Clear the text entry box of the User's previous answer\r\n document.forms['form1'].reset();\r\n}", "function displayImage(user , srcData ) {\r\n var newImage = document.createElement('img');\r\n newImage.src = srcData;\r\n \r\n // document.getElementById(\"historyMsg\").innerHTML = user + newImage.outerHTML;\r\n \r\n messageArea.append(newImage);\r\n appendMessage(`${user} send image...`);\r\n autoScrollDown();\r\n // alert(\"Converted Base64 version is \" + document.getElementById(\"historyMsg\").innerHTML);\r\n\r\n}", "function drawText(message,clear) {\n\tvar canvas = document.getElementById(\"game\");\n\tvar ctx = canvas.getContext('2d');\n\n\t//clear\n\tif (clear)\n\t\tctx.clearRect(0,0,canvas.width,canvas.height);\n\n\t//Draw needed game message\n\tctx.font = \"30px serif\";\n\tctx.fillStyle = \"white\";\n\tctx.fillText(message, canvas.width/2.5, canvas.height/3);\n\n}", "function hideOrShowMessage(){\n let displayOrHideMessage = localStorage.getItem('messageDisplay');\n let buttonOpenSource, buttonCloseSource;\n\n if(document.body.dataset.pagename == \"home\"){\n buttonOpenSource = \"./content/images/icons/open-news-64.png\";\n buttonCloseSource = \"./content/images/icons/close-news-64.png\";\n }\n else{\n buttonOpenSource = \"../images/icons/open-news-64.png\";\n buttonCloseSource = \"../images/icons/close-news-64.png\";\n }\n\n if( displayOrHideMessage !== null){\n if(displayOrHideMessage == \"true\"){\n closeBtn.src = buttonCloseSource;\n removeArea.style.display = \"block\";\n messageArea.style.border = \"none\"; \n }\n else{\n closeBtn.src = buttonOpenSource;\n removeArea.style.display = \"none\";\n messageArea.style.border = \"1px solid white\";\n }\n\n }\n else{\n console.log(\"empty messageDisplay\")\n localStorage.setItem('messageDisplay', \"true\");\n closeBtn.src = buttonCloseSource;\n removeArea.style.display = \"block\";\n messageArea.style.border = \"none\";\n }\n // console.log(closeBtn.src);\n }", "function abrir(){\n document.getElementById(\"up\").style.display = \"none\";\n document.getElementById(\"chat\").style.display = \"block\"; \n getMessages();\n}", "sendGif(e) {\n const imageData = {\n body: e.target.src,\n username: this.props.profile.given_name,\n timestamp: moment((new Date).getTime())\n .format(\"MMMM Do YYYY, h:mm:ss a\"),\n image: this.props.profile.picture\n }\n this.props.receiveMessage(imageData);\n this.props.saveToDatabase(imageData)\n }", "display() {\n if (this.isAvailable) {\n push();\n noStroke();\n imageMode(CENTER);\n tint(255, this.visibility);\n image(this.image, this.x, this.y, this.radius, this.radius);\n\n pop();\n }\n }", "function showMessage( msg )\r\n{\r\n\tdocument.getElementById(\"message\").style.visibility = \"visible\";\r\n\t document.getElementById(\"messageText\").innerHTML = msg;\r\n\tif ( msg == \"\" ) document.getElementById(\"message\").style.visibility = \"hidden\";\r\n}", "function clearThumbs() {\n var msgBox = document.getElementById('msgs');\n if ( msgBox.hasChildNodes() ) {\n while ( msgBox.childNodes.length >= 1 ) {\n msgBox.removeChild( msgBox.firstChild );\n }\n }\n}", "function clear() {\n var hidePanels = document.getElementsByClassName('hide');\n for (var i = 0; i < hidePanels.length; i++) {\n hidePanels[i].style.display = 'none';\n }\n gId(\"added_text\").style.background = \"#80B098\";\n gId(\"added_image\").style.background = \"#80B098\";\n gId(\"added_artifact\").style.background = \"#80B098\";\n gId('textarea').value = '';\n gId('textarea_artifact').value = '';\n gId('photo_cont').innerHTML = '';\n gId('photo_cont').style.display = 'none';\n}", "function showMessage() {\n checkPlayerGuess();\n message.innerHTML = messageStatus;\n}", "function clearMessages()\n{\n $(\"messagesDiv\").style[\"visibility\"] = \"hidden\";\n}", "function displayEndScreen() {\n //display image\n image(imgEndScreen, 0, 0, windowWidth, windowWidth * 0.4);\n //Set text size in push-pop\n push();\n textSize(19);\n //If player hits zero kids, display this\n if (player.sentence === 0) {\n text(\"It took you only \" + player.timeSpent + \" hours and you did it \\nwithout bumping into children! \\nAmazing job, Hieronymous! Back to \\nloitering!\", 0 + windowWidth / 20, windowWidth / 5);\n //If player hits less than three kids, display this\n } else if (player.sentence < 107) {\n text(\"It took you only \" + player.timeSpent + \" hours \\nand you only added \" + player.sentence + \" days \\n to your community service!\", 0 + windowWidth / 20, windowWidth / 5);\n } else {\n //otherwise, display this message\n text(\"It took you \" + player.timeSpent + \" hours... \\n...but holy crap Hieronymous you added \" + player.sentence + \" days \\nto your community service. Embarrassing.\", 0 + windowWidth / 20, windowWidth / 5);\n }\n pop();\n\n}", "function dogdate2Page() {\n image(date2, 0, 0, 800, 800);\n //text\n textSize(35);\n fill(255, 0, 220);\n text('you have a message from Chou Chou!', 550, 795);\n //exit box\n fill(180);\n rect(780, 0, 20, 19);\n line(780, 0, 800, 19);\n line(800, 0, 780, 19);\n if (mouseIsPressed && mouseX >= 780 && mouseX <= 800 && mouseY >= 0 && mouseY <= 19) {\n corgi1_s -= chouchouP;\n }\n //mail icon\n fill(250);\n rect(750, 780, 50, 20);\n line(750, 780, 775, 800);\n line(800, 780, 775, 800);\n if (mouseIsPressed && mouseX >= 750 && mouseX <= 800 && mouseY >= 780 && mouseY <= 800) {\n corgi1_s += 20;\n }\n}", "function displayUser() {\n imageMode(CENTER);\n image(userMG.img, mouseX, mouseY, userMG.size, userMG.size);\n}", "function clearMessage() {\n $(\".chat-wrapper\").empty();\n}", "function showMessage() {\n showHide(chosenMessage, loader);\n currentMessage = retrieveMessage();\n chosenMessage.innerHTML = \"\";\n chosenMessage.innerHTML += `${currentMessage}`;\n show(clearMessage);\n // show(favoriteButton);\n}", "function clearMsgs() {\n if(gameInfo.length != 0){\n gameInfo = [];\n }\n}", "function removeFinishMessage() {\n \tfinish.style.display = 'none';\n winMessage.appendChild(restartCopy);\n \twinMessage.appendChild(starsCopy);\n \twinMessage.appendChild(timeCopy);\n \twinMessage.appendChild(moveTrackerCopy);\n}", "function displayToScreen() {\n\n\n\t}", "function clearScreen() {\n getlocation.html(\"\");\n locationStatus.html(\"\");\n showTemp.html(\"\");\n shortNews.html(\"\");\n dataTable.hide();\n $(\"#errorMessage\").hide();\n content.hide();\n loader.hide();\n }", "function clearCanvas() {\n\t\tcontext.clearRect(0, 0, context.canvas.width, context.canvas.height);\n\t\tsmall_context.clearRect(0, 0, small_context.canvas.width, small_context.canvas.height);\n\t\t$(\".msg\").remove();\n\t}", "function MessageDisplayWidget() {}", "function clearMessage() {\r\n\t\t// For some reason, unless we call hide(), messages that were faded out\r\n\t\t// on a previous tab will be visible when we switch to that tab.\r\n\t\t$messageArea.fadeOut(\"slow\", function () { \r\n\t\t\t$(this).hide(); \r\n\t\t});\r\n\t}", "function tryAgainPage() {\n image(cat, octoX + 350, octoY - 300, 300, 300 * aspectRatio); // This calls the image at the defined\n tryAgainMessage(octoX, octoY); // This calls the message function at the defined x, y position. \n tryAgainButton(bubButX, bubButY); // This calls the button function at the defined x, y position. \n}", "function clearScreen() {\n\tletterString = \"\";\n\t$(\"#lettersGuessed\").html(\"<h3>Guesses Remaining: \" + guessesRemaining + \"</h3>\");\n\t$(\"#lettersGuessed\").append(\"<div>Letters Guessed Already</div>\");\n\t$(\"#lettersString\").text(letterString);\n}", "function rpsFrontend (humanImgChoise, computerImgChoise, message) {\n var rspImgDatabase = {\n 'rock': document.getElementById('rock').src,\n 'paper': document.getElementById('paper').src,\n 'scissors': document.getElementById('scissors').src\n }\n \n //let remove all the images\n document.getElementById('rock').remove();\n document.getElementById('paper').remove();\n document.getElementById('scissors').remove();\n \n var humanDiv = document.createElement('div');\n var compDiv = document.createElement('div');\n var msgDiv = document.createElement('div');\n \n humanDiv.innerHTML = \" <img src= '\" + rspImgDatabase[humanImgChoise] + \"' style='box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.8)' >\"\n \n msgDiv.innerHTML = \" <h1 style='color: \" + message['color'] + \"; font-size: 30px; padding: 20px; '>\" + message['message'] + \"</h1>\"\n \n compDiv.innerHTML = \" <img src= '\" + rspImgDatabase[computerImgChoise] + \"' style='box-shadow: 0px 0px 25px rgba(0, 8, 255, 0.8)' >\"\n \n document.getElementById('flex-box-img-div').appendChild(humanDiv);\n document.getElementById('flex-box-img-div').appendChild(msgDiv)\n document.getElementById('flex-box-img-div').appendChild(compDiv)\n \n}", "function victoryScreen() {\n winCounter++;\n winCounterField.innerHTML = winCounter;\n answerField.innerHTML = answer;\n hintField.innerHTML = hint;\n answerPic.setAttribute('src', `assets/img/${answer}.jpg`);\n}", "function flashImage(){\r\ndocument.getElementById('flash').innerHTML=\"<img src='http://lorempixel.com/600/400/'>\"\r\n// 5000 = 5 secs\r\nsetTimeout(function() {document.getElementById('flash').innerHTML='';},3000);\r\n}", "function wrongAnswerScreen() {\n console.log('wrongAnswerScreen');\n $('#question').text(\"You Are Wrong!\");\n $('#timer').empty();\n $(\"#answer1\").empty();\n $(\"#answer2\").empty();\n $(\"#answer3\").empty();\n $(\"#answer4\").empty();\n $(\"#gif\").show();\n startResponseScreen()\n loser = true;\n}", "display() {\n\t\tif (this.playerImage){\n\t\t\timageMode(CENTER);\n\t\t\timage(this.playerImage,this.x, this.y, this.size, this.size);\n\t\t} else {\n\t\t\tfill(this.col);\n\t\t\tellipse(this.x, this.y, this.size, this.size);\n\t\t}\n\t}", "function hidepicture() {\n $(\"#answerDiv\").append(\"<img src=\" + pick.photo + \">\");\n newArray.push(pick);\n triviaQuestions.splice(index, 1);\n\n // hides end of game content until needed\n var hidepic = setTimeout(function () {\n $(\"#answerDiv\").empty();\n timer = 10;\n\n // show score tally after all questions have been asked\n if ((wrongCount + rightCount + unansweredCount) === questionsCount) {\n // removes question from div\n $(\"#questionDiv\").empty();\n // shows end of game text\n $(\"#questionDiv\").html(\"<h2>Game Over!<br><small>Here's how you did: </small></h2>\");\n $(\"#answerDiv\").append(\"<h4> Correct: \" + rightCount + \"</h4>\");\n $(\"#answerDiv\").append(\"<h4> Incorrect: \" + wrongCount + \"</h4>\");\n $(\"#answerDiv\").append(\"<h4> Unanswered: \" + unansweredCount + \"</h4>\");\n $(\"#reset\").show();\n rightCount = 0;\n wrongCount = 0;\n unansweredCount = 0;\n\n // if questions remain, run timer and ask remaining questions\n } else {\n runTimer();\n showQuestion();\n\n }\n // wait three seconds until next question\n }, 3000);\n }", "display() {\n noStroke();\n fill(0);\n rect(this.frame.x,this.frame.y,1,1);\n imageMode(CENTER);\n image(girl_Img,this.frame.x+0.5,this.frame.y+0.5,2.25,2.75);\n }", "function clearphoto() {\n\t var context = canvas.getContext('2d');\n\t context.fillStyle = \"#AAA\";\n\t context.fillRect(0, 0, canvas.width, canvas.height);\n\n\t var data = canvas.toDataURL('image/png');\n\t photo.setAttribute('src', data);\n\t user_pic.setAttribute('src', data);\n\t }" ]
[ "0.69447803", "0.68114084", "0.67741245", "0.66152513", "0.6483633", "0.6464599", "0.6451905", "0.6437282", "0.639263", "0.63876086", "0.6363084", "0.6359913", "0.6336804", "0.63157374", "0.6287178", "0.62681925", "0.6220877", "0.6217493", "0.6178756", "0.6162305", "0.61603755", "0.6158888", "0.61515194", "0.6144166", "0.6129879", "0.61296296", "0.61284596", "0.61261743", "0.61136377", "0.61097574", "0.6108047", "0.6054198", "0.604713", "0.6044136", "0.6038829", "0.6035756", "0.60348225", "0.6025238", "0.60041213", "0.60022926", "0.60008883", "0.5994684", "0.59913284", "0.5990939", "0.5990276", "0.5985365", "0.59771496", "0.5969067", "0.5966799", "0.596579", "0.59613425", "0.595174", "0.5947698", "0.59452885", "0.59346694", "0.59336567", "0.5930597", "0.5920732", "0.59199595", "0.5915528", "0.5911165", "0.5909673", "0.5909336", "0.5907318", "0.5903417", "0.58927786", "0.5888893", "0.5884712", "0.5881018", "0.58795464", "0.58747023", "0.5874314", "0.5872578", "0.58705753", "0.58702755", "0.58692443", "0.58664304", "0.58610934", "0.5857036", "0.5855212", "0.58485734", "0.58425087", "0.5840448", "0.5836394", "0.5836172", "0.5834537", "0.5832274", "0.58310413", "0.5828991", "0.5827567", "0.58216137", "0.5817582", "0.581343", "0.58077854", "0.58075315", "0.580676", "0.5804145", "0.58021116", "0.57996845", "0.57953364", "0.579489" ]
0.0
-1
possible reset button implementation
function reset() { location.reload(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetButtonPressed() {\n reset();\n}", "function pressReset(){\n events.emit('resetBtn', true);\n }", "function reset(e){\n \n}", "_reset() {\r\n\t\tthis._pressed = false;\r\n\t}", "function resetButton() {\n\tvar r = getProgress();\n\tsetProgress(r = 0);\n}", "function reset() {\n reset_butt.click();\n}", "function reset() { }", "handleReset() {\n\n }", "function resetBtnFunctionality () {\n\tresetButton.addEventListener(\"click\", function() {\n\t\treset();\n\t});\n}", "function reset() {\n\n }", "Reset() {\n\n }", "function resetButton(){\r\n populate();\r\n}", "function reset() {\n generateButtons(currentCategory);\n}", "function buttonResetClicked()\n{\n resetFruitTally();\n resetAll();\n //init();\n}", "function reset_btn(){\n $(\"#access-result #quick_add\").text(\"Quick Add\").show();\n \t $(\"#access-result #quick_edit\").text(\"Quick Edit\").show();\n \t $(\"#access-result #cancel\").hide();\n \t $(\"#access-result #access_table\").removeClass(\"locked\");\n }", "resetButton(button) \n {\n button.body.hit = false;\n button.pressed = false;\n }", "function doReset() {\n $(\"*[id^='fragment_']\").css(\"background-color\", \"transparent\");\n $(\"*[id^='fragment_']\").hide();\n $('#explanation').html('');\n $(\".prev_btn\").css('visibility', 'hidden');\n $(\".next_btn\").css('visibility', 'visible');\n $(\"#btn_reset\").css('visibility', 'hidden');\n $(\"#forward_button_label\").text('Start');\n $(\"#forward_button_label\").css('cursor', 'pointer');\n $(\"#forward_button_label\").css('color', 'red');\n $(\"#forward_button_label\").css('font-size', '24px');\n $(\"#next_arrow\").hide();\n currentStep = 0;\n}", "setResetButton(){\n\t\tdocument.getElementsByClassName('acceptButton')[0].value = \"reset\";\n\t\tfadeIn(\"acceptButton\");\n\t}", "function resetButton(){\n $(\".fa-redo-alt\").click(function(){\n document.location.reload(true);\n })\n $(\"#replay\").click(function(){\n document.location.reload(true);\n })\n }", "Reset() {}", "function actionOnResetClick () {\n gameRestart();\n }", "Reset () {\n this.reset = true\n }", "function resetButton()\n{\n background(255, 0, 0);\n button = createButton('Reset!');\n button.size(100,34);\n button.style(\"font-size\", \"25px\");\n button.position((w2 + 720), (h2 + 400));\n button.mousePressed(reset);\n}", "function myResetButton(){\n\t\t\t\n\t\t\n\t\t\tvar resetb = document.createElement(\"BUTTON\");\n\t\t\tvar resetText = document.createTextNode(\"RESET\");\n\t\t\tresetb.setAttribute(\"id\",\"resetg\");\n\t\t\t\n\t\t\tresetb.appendChild(resetText);\n\t\t\t\n\t\t\t$(element).find(\"#hello\").get(0).appendChild(resetb);\n\t\t\t$(\"#resetg\").click(function(eventObject){\n\t\t\t\t\n\t\t\t\treset();\n\t\t\t\t\n\t\t\t});\n\t\t\n\t\t}", "function reset()\n\t{\n\t\tsetValue('')\n\t}", "function resetButton() {\n\t$('#textboxAbsolute').val(\"excluded\");\n\t$('#textboxAbsolute').css(\"background-color\", \"#FFFFFF\");\n\t$('#expressionLevelSlider').val(0);\n\t\n\t// get name of tissue we're adjusting\n\tvar tissue = $('#setLevel-tissueName').text()\n\t\n\t// figure out which index number that corresponds to in allTissues\n\tvar index = findIndexByKeyValue(allTissues, 'tissue', tissue);\n\t\n\t// reset the value and color in allTissues to null\n\tallTissues[index].value = \"excluded\";\n\tallTissues[index].color = \"#FFFFFF\";\n\t\n\t// update the color on the svg shape \n\tchangeFillColor(tissue, \"#FFFFFF\");\n\tsaveExpressionLevel();\n\tcloseCurrentTooltip();\n}", "function resetClicked(evt){\n\t//hide the modal\n modalHide();\t\n\t//reset the cards\n resetCards();\n\t//reset the turn counter\n resetCounter();\n //reset the card list\n cardList = [];\n\t//reset the timer\n resetTimer();\n //reset stars\n resetStars();\n //shuffle the deck\n shuffleCards();\n}", "function click(){\ndocument.getElementById(\"reset\").reset();}", "function reset()\n{\n\tneedsReset = 1;\n\t\n\t/*\n\tpost(\"Setting needsReset\");\n\tpost();\n\t*/\n}", "function resetButton() {\n d3.select(\"div.reset\")\n .append(\"li\")\n .text(\"Reset\")\n .on('click', function() {\n resetSelection();\n state.highlight = [];\n state.green = false;\n state.red = false;\n checkFiltered();\n updateReset();\n });\n }", "function myResetFunction() {\n document.getElementById(\"#reset-btn\").reset();\n }", "function setupResetBut(){\r\n resetButton.addEventListener(\"click\",setColors)\r\n }", "reset() {\r\n this.currentState = this.initial;\r\n }", "function ClickBtnReset() {\n $('#ppZapisnikKreatoriCmb').quiComboBox('clearSelection');\n $('#ppZapisnikDatum').quiDate('setDate', new Date());\n $('#ppZapisnikOrganiCmb').quiComboBox('clearSelection');\n\n $('#ppZapisnikNemaRez').hide();\n\n $('#ppZapisnikSlickGrid').empty();\n $('#ppZapisnikSlickGridPager').empty();\n\n columnFilters = {};\n grid = undefined;\n }", "function resetButtons() {\n $(\".letter\").css({\"pointer-events\": \"auto\", \"background-color\": \"#666600\"});\n /*\n $(\".letter\").removeClass(\"used\");\n $(\".letter\").removeClass(\"success fail\", 500);\n */\n $(\"#btn1\").removeClass(\"highlight\", 500);\n }", "function reactionReset () {\n setButton2State(0); // Zustand des Schaltknopfs Start/Pause/Weiter\n enableInput(true); // Eingabefelder aktivieren\n stopAnimation(); // Animation stoppen\n t = 0; // Zeitvariable zurücksetzen\n on = false; // Animation abgeschaltet\n reaction(); // Eingegebene Werte übernehmen und rechnen\n paint(); // Neu zeichnen\n }", "function resetState() {\n while (answerButtonsElement.firstChild) {\n answerButtonsElement.removeChild(answerButtonsElement.firstChild);\n }\n }", "function resetPressed(){\r\n //sets the background to grey\r\n background(80);\r\n//resets the height variable used when drawing\r\n y = 0;\r\n//removes the buttons, and redraws them using the function drawButtons\r\n removeElements();\r\n drawButtons();\r\n//resets the listState\r\n listState = 0;\r\n }", "function reactionReset () {\n setButton2State(0); // Zustand des Schaltknopfs Start/Pause/Weiter\n enableInput(true); // Eingabefelder aktivieren\n t = 0; // Zeitvariable zurücksetzen\n on = false; // Animation abgeschaltet\n slow = cbSlow.checked; // Flag für Zeitlupe\n reaction(true); // Eingegebene Werte übernehmen, rechnen, Ausgabe aktualisieren\n }", "function reset(){\n\t\t\tnumber1 = Number.MAX_SAFE_INTEGER;\n\t\t\tnumber2 = Number.MAX_SAFE_INTEGER;\n\t\t\topcode=\"\";\n\t\t\tlastPressed=\"\";\n\t\t}", "function contactameBtn()\n{\n\tdocument.btncontacto.reset();\n}", "function reset() {\n\t setState(null);\n\t} // in case of reload", "reset() {\n this.isActive = false;\n this.isLoading = false;\n this.$button.show();\n }", "function reset_btn(btn, ele) {\n btn.tooltip('hide');\n btn.prop('disabled', false);\n\n func.apply(this, args);\n }", "function reset() {\n for (var i = 0; i < 4; i++) {\n\t\t setColor('button' + eval(i + 311),vm.Mode,'Middle', 0, i, 0, 1);\n for (var j = 0; j < 4; j++) {\n setColor('button' + eval(i * 10 + j + 111),vm.Mode,'Left', i, j, 0, 1);\n\t\t setColor('button' + eval(i * 10 + j + 211),vm.Mode,'Right', i, j, 0, 1);\n }\n }\n var property = document.getElementById('buttonBuild');\n property.style.backgroundColor = \"#ffffff\";\n }", "function reset(input) {\n // YOUR SOLUTION HERE\n}", "function reset() {\n // noop\n }", "function resetear() {\n eliminarIntegrantesAnteriores();\n ocultarbotonCalculo();\n ocultarIntegrantes();\n ocultarTextoResultado();\n vaciarValorInput();\n}", "function resetHotkeyBtn(){\r\n\t\t\t\tchangeHotkeyBtn.html(\"Change hotkey\")\r\n\t\t\t\t\t.disabled = false;\r\n\t\t\t}", "_reset()\n {\n this.stopped = false;\n this.currentTarget = null;\n this.target = null;\n }", "function resetClick() {\n questionIndex = 0;\n incorrect = 0;\n correct = 0;\n renderQuestion();\n}", "function reset() {\r\n // noop\r\n }", "function Calculator_Reset() {\n Calculator.Display_Value = '0';\n Calculator.First_Operand = null;\n Calculator.Wait_Second_Operand = false;\n Calculator.operator = null;\n}", "reset(){\n this.enable();\n this.init();\n this.buildAll();\n }", "function resetPressed() {\n\n // go back to the \"graph loaded\" status\n hdxAV.setStatus(hdxStates.GRAPH_LOADED);\n\n hdxAV.startPause.innerHTML = \"Start\";\n\n // show waypoints, show connections\n initWaypointsAndConnections(true, true,\n visualSettings.undiscovered);\n\n hideTopControlPanel();\n hdxAVCP.cleanup();\n algorithmSelectionChanged();\n //hideAVStatusPanel();\n showAlgorithmSelectionPanel();\n document.getElementById(\"pscode\").style.display = \"none\";\n deleteCBPSelector();\n newMapTileSelected();\n}", "reset() {\n show(cacheDOM.setButton);\n hide(cacheDOM.setDisplay, cacheDOM.snoozeButton, cacheDOM.stopButton);\n this.alarm.hours = 0;\n this.alarm.minutes = 0;\n this.alarm.isSet = false;\n }", "function reset(){\r\n winnerRound.id = \"score-descr\";\r\n winnerRound.textContent = \"start playing\";\r\n score.textContent = \"0 : 0\";\r\n playerPoints = 0;\r\n computerPoints = 0;\r\n buttons.forEach(btn => btn.disabled = false);\r\n resetBtn.textContent = \"RESET\";\r\n}", "function resetButtons() {\r\n document.querySelector(\"#right-answer\").style.border = \"0\";\r\n document.querySelector(\"#left-answer\").style.border = \"0\";\r\n document.querySelector(\"#scenario-submit\").style.opacity = \"0.5\";\r\n document.querySelector(\"#scenario-submit\").style.pointerEvents = \"none\";\r\n}", "function onReset() {\n clear();\n}", "function resetButtonClicked()\n{\n document.getElementById('batteryLight').style.backgroundColor = \"rgb(165, 164, 164)\";\n powerState = 0;\n document.getElementById('screenTextTop').textContent = \"\";\n document.getElementById('screenTextBottom').textContent = \"\";\n batteryLife = 0;\n number1 = \"\";\n number2 = \"\";\n number3 = 0;\n operatorClicked = false;\n console.log(\"calculator reset\");\n}", "reset() {\r\n this.prevState=this.currentState;\r\n this.currentState = this.config.initial;\r\n }", "function resetUndoButtons () {\n\t\tdocument.getElementById(\"undoButton\").disabled = true;\n\t\tdocument.getElementById(\"redoButton\").disabled = true;\n\t\tundoStack = [];\n\t\tredoStack = [];\n\t}", "function reset() {\n calculatorData.isAtSecondValue = false;\n calculatorData.displayValue = '';\n calculatorData.result = '';\n calculatorData.isValueDecimal = false;\n updateDisplay();\n}", "reset() {\n this.setIrqMask(0);\n this.setNmiMask(0);\n this.resetCassette();\n this.keyboard.clearKeyboard();\n this.setTimerInterrupt(false);\n this.z80.reset();\n }", "function reset () {\n\t\tfillZero(xs,9);\n\t\tfillZero(os,9);\n\t\tremoveSelected(circles);\n\t\tcurrent = null;\n\t\tcounter = null;\n\t\twin = false;\n\t\tdisplay.textContent = \"tic tac toe\";\n\t}", "addResetButton() {\n this.interface.gui.add(this.gameOrchestrator, 'reset').name('Restart Game');\n }", "function resetState() {\n\tclearStatusClass(document.body);\n\tnextButton.classList.add(\"hide\");\n\t//if there is a child inside the answer buttons we remove it\n\twhile (answerButtonsElement.firstChild) {\n\t\tanswerButtonsElement.removeChild(answerButtonsElement.firstChild);\n\t}\n}", "reset() {\r\n this.currentState = this.config.initial;\r\n }", "function resetBtns() {\r\n answer_1.style.backgroundColor = \"transparent\";\r\n answer_1.disabled = false; \r\n answer_2.style.backgroundColor = \"transparent\";\r\n answer_2.disabled = false;\r\n answer_3.style.backgroundColor = \"transparent\";\r\n answer_3.disabled = false;\r\n answer_4.style.backgroundColor = \"transparent\";\r\n answer_4.disabled = false;\r\n}", "reset() {\n // do nothing\n }", "_reset() {\n const that = this;\n\n if (this.element.value) {\n // This discombulated line is to help the i18next parser pick up all 3 keys.\n const item =\n this.props.type === 'signature'\n ? t('drawwidget.signature')\n : this.props.type === 'drawing'\n ? t('drawwidget.drawing')\n : t('drawwidget.annotation');\n dialog\n .confirm(t('filepicker.resetWarning', { item }))\n .then((confirmed) => {\n if (!confirmed) {\n return;\n }\n that.pad.clear();\n that.cache = null;\n // Only upon reset is loadedFileName removed, so that \"undo\" will work\n // for drawings loaded from storage.\n delete that.element.dataset.loadedFileName;\n delete that.element.dataset.loadedUrl;\n that.element.dataset.filenamePostfix = '';\n $(that.element).val('').trigger('change');\n // Annotate file input\n that.$widget\n .find('input[type=file]')\n .val('')\n .trigger('change');\n that._updateDownloadLink('');\n that.disable();\n that.enable();\n });\n }\n }", "function resetBtnClicked() {\n if (confirm('คุณต้องการ ลบ / RESET ข้อมูลกิจกรรม Fit4Run ทั้งหมด ใช่ หรือ ไม่ ?')) {\n // Save it!\n return resetConfirmed();\n } else {\n // Do nothing!\n }\n }", "function reset() {\n self.taskActionList([]);\n self.selectedTasklist([]);\n self.isTaskSelected(false);\n self.actionName('');\n self.actionComments('');\n self.showConfirmation('none');\n }", "reset(){\n\t\tif(model.autoRunTimerId !== -1){\n\t\t\tclearInterval(model.autoRunTimerId) // stop autorun timer if it is started\n\t\t\t//document.getElementById('autoRunBtn').innerHTML='Autorun';\n\t\t}\n\n\t\t$(\"#infoBitNum\").prop('disabled', false);\n\t\t$(\"#parityBitNum\").prop('disabled', false);\n\t\t$(\"#cwBitNum\").prop('disabled', false);\n\t\t$(\"#errDetectNum\").prop('disabled', false);\n\t\t$(\"#selGenPolyBtn\").prop('disabled', false);\n\n\t\tthis.algorithm.reset();\n\t\tthis.stat.reset();\n\t\tthis.stat.remove();\n\t\tthis.layer.getStage().clear();\n\t\tthis.layer.destroy();\n\t\ttry{\n\t\t\t$(\".ui-dialog-content\").dialog(\"close\");\n\t\t} catch(e) {console.log(e)}\n\t}", "function pfClickedReset(mode){\n\tvar keyList = connectList(mode);\n\tvar targetArray = connectArray(mode);\n\tfor(x in targetArray){\n\t\ttargetArray[x].isRedacted = false;\n\t}\n\twhile(keyList.length > 0){\n\t\tkeyList.pop();\n\t}\n\tsetCookie();\n\tspawnPF(mode, 0);\n}", "_bindResetButton(settingsKey) {\n const resetButton = this._builder.get_object('reset-' + settingsKey);\n if (resetButton) {\n resetButton.connect('clicked', () => {\n this._settings.reset(settingsKey);\n if (this._settings.settings_schema.has_key(settingsKey + '-hover')) {\n this._settings.reset(settingsKey + '-hover');\n }\n });\n }\n }", "function reset_button_handler(){\n $('button[type=\"reset\"]').click(function(){\n modal_check_box.attr('checked',false); // unchecks modal checkbox\n shareble_url = window.location.origin+window.location.pathname+\"?urls=\"; // sets shareble_url back to it's default value;\n $('#share_url').val(shareble_url); // puts sharable url text inside modal\n $('#links div a').remove() // removes all the links from the bottom\n $('#links, #links + .row').addClass('collapse') // collapses footer\n })\n }", "function handleReset(click) {\n turnCount = 0;\n init();\n}", "_reset() {\n\t const that = this;\n\n\t if (this.element.value) {\n\t // This discombobulated line is to help the i18next parser pick up all 3 keys.\n\t const item =\n\t this.props.type === 'signature'\n\t ? t('drawwidget.signature')\n\t : this.props.type === 'drawing'\n\t ? t('drawwidget.drawing')\n\t : t('drawwidget.annotation');\n\t dialog\n\t .confirm(t('filepicker.resetWarning', { item }))\n\t .then((confirmed) => {\n\t if (!confirmed) {\n\t return;\n\t }\n\t that.pad.reset();\n\t that.cache = null;\n\t // Only upon reset is loadedFileName removed, so that \"undo\" will work\n\t // for drawings loaded from storage.\n\t delete that.element.dataset.loadedFileName;\n\t delete that.element.dataset.loadedUrl;\n\t that.element.dataset.filenamePostfix = '';\n\t jquery(that.element).val('').trigger('change');\n\n\t // Annotate file input\n\t that.$widget\n\t .find('input[type=file]')\n\t .val('')\n\t .trigger('change');\n\t that._updateDownloadLink('');\n\t that.disable();\n\t that.enable();\n\t });\n\t }\n\t }", "_resetHandler() {\n const that = this;\n if (that.resetButton) {\n that.resetButton.remove();\n }\n that.appearanceTextBox.value = that.appearanceTextBox.dataset.defaultValue;\n that.appearanceTextBox.addEventListener('keydown', () => that._showResetButton(), { 'once': true });\n }", "function resetState() {\n clearStatusClass(document.body)\n while (answerButtonsElement.firstChild) {\n answerButtonsElement.removeChild(answerButtonsElement.firstChild)\n }\n}", "reset({ text = 'Zurücksetzen', buttonClass = 'game-field-reset-btn' }) {\n const button = document.createElement('button');\n button.className = buttonClass;\n button.appendChild(document.createTextNode(text));\n document.querySelector(this.target).appendChild(button);\n }", "function reset() {\n resetFunc();\n }", "function reset () {\n setCurrentlyClicking(false);\n setCounter(1);\n clearInterval(currentInterval);\n setCurrentInterval(\"\");\n setClickingFast(false);\n setColors(initialColors);\n }", "reset() {\n\n }", "function reset() {\n spin3();\n ask.innerHTML = ' ';\n input.style.display = 'block';\n input.value = '';\n button.style.display = 'block';\n start.src = './img/start.png';\n button2.style.display = 'none';\n}", "function resetBtn() {\n if (isPlayerWon || isComputerWon) {\n guessBtn.innerHTML = 'RESET';\n playerGuess.setAttribute('disabled', 'disabled');\n } else {\n guessBtn.innerHTML = 'GUESS';\n guessBtn.setAttribute('disabled', 'disabled');\n playerGuess.removeAttribute('disabled');\n }\n}", "reset() {\r\n this.state = this.initial;\r\n }", "resetOnNextInput() {\n this._reset = true;\n }", "reset() {\n this.unbind();\n }", "@action.bound reset() {\n \n }", "function resetButton() {\n $('#reset').click(function() {\n startGame(gameSpaces);\n })\n}", "reset() {\n this.interacted = false;\n if (this._completedOverride != null) {\n this._completedOverride = false;\n }\n if (this._customError != null) {\n this._customError = false;\n }\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }", "function handleReset() {\n setBlur((blur = 0));\n setBrightness((brightness = 100));\n setContrast((contrast = 100));\n setGrayscale((grayscale = 0));\n setHue((hue = 0));\n setInvert((invert = 0));\n setOpacity((opacity = 100));\n setSaturate((saturate = 100));\n setSepia((sepia = 0));\n }", "function resetState() {\n clearStatusClass(document.body);\n nextButton.classList.add('hide');\n while (answerButtonsElement.firstChild) {\n answerButtonsElement.removeChild(answerButtonsElement.firstChild);\n }\n \n}", "function buttonReset() {\n image(imgReset, 350, 550);\n}", "function reset() {\n indexClicked = 0;\n trackClicked = 0;\n}", "function resetState(){\n clearStatusClass(document.body)\n nextButton.classList.add(\"hide\");\n while(answerButtonElement.firstChild){\n answerButtonElement.removeChild\n (answerButtonElement.firstChild)\n }\n}", "function resetcontainer(){\n answerbuttons.innerHTML = '';\n}", "function reset(data) {\r\n\t var btn = data.btn = data.form.find(':input[type=\"submit\"]');\r\n\t data.wait = data.btn.attr('data-wait') || null;\r\n\t data.success = false;\r\n\t btn.prop('disabled', false);\r\n\t data.label && btn.val(data.label);\r\n\t }", "handleResetClick(event){\n this.value = '';\n this.tableData = [];\n const evtCustomEvent = new CustomEvent('reset');\n this.dispatchEvent(evtCustomEvent);\n }" ]
[ "0.8312869", "0.8204711", "0.7796093", "0.7780912", "0.7737174", "0.77306217", "0.76953423", "0.76022285", "0.75823927", "0.7568529", "0.74940425", "0.7462029", "0.7458716", "0.7446697", "0.7443668", "0.7379343", "0.73692", "0.73537445", "0.7319036", "0.72946703", "0.72922176", "0.72842824", "0.7277917", "0.7275606", "0.7274036", "0.7268904", "0.7230642", "0.7212832", "0.72125524", "0.7166573", "0.7153208", "0.715263", "0.7138396", "0.7137441", "0.7127862", "0.7126112", "0.7109492", "0.7106429", "0.7105067", "0.70983744", "0.70908034", "0.7082147", "0.70813626", "0.70766675", "0.70699656", "0.70467806", "0.70447445", "0.7025998", "0.7024084", "0.7023533", "0.7022725", "0.7018922", "0.7016709", "0.7004715", "0.7001572", "0.6998917", "0.6990429", "0.69800615", "0.6969872", "0.6969073", "0.6966652", "0.6963281", "0.6960898", "0.6955797", "0.69533086", "0.6945783", "0.69413036", "0.69408894", "0.6939861", "0.6936085", "0.6935257", "0.6930496", "0.69240236", "0.69231623", "0.6907142", "0.69043386", "0.69023323", "0.6897211", "0.6895878", "0.6890708", "0.6888003", "0.6884247", "0.6882466", "0.6881072", "0.688055", "0.6879948", "0.68683815", "0.6859181", "0.68591803", "0.6858125", "0.6856994", "0.6855939", "0.68542206", "0.6853691", "0.6852452", "0.68397135", "0.6832379", "0.68314743", "0.6824583", "0.6823926", "0.68236035" ]
0.0
-1
Alyssa postulates the existence of an abstract object called an interval that has two endpoints: a lower bound and an upper bound. She also presumes that, given the endpoints of an interval, she can construct the interval using the data constructor make_interval. Alyssa first writes a function for adding two intervals. She reasons that the minimum value the sum could be is the sum of the two lower bounds and the maximum value it could be is the sum of the two upper bounds:
function addInterval(x, y) { return makeInterval( lowerBound(x) + lowerBound(y), upperBound(x) + upperBound(y) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTwo(range1, range2) {\n if (range1.overlaps(range2, {adjacent: true})) {\n var start = moment.min(range1.start, range2.start);\n var end = moment.max(range1.end, range2.end);\n var sum = moment.range(start, end);\n return sum;\n } else {\n return null;\n }\n}", "addInterval(low, high, value){\n const interval = new Interval(low, high, value);\n this.intervals.insert(interval);\n if(interval.high < this.minimumHigh) this.minimumHigh = interval.high;\n if(interval.high > this.maximumHigh) this.maximumHigh = interval.high;\n if(interval.high > this.high) this.high = interval.high;\n }", "function createSubintervals(start, end, unit) {\n var ints = makeIntervals(start, end, unit);\n var collection = toPairs(ints);\n completeInterval(collection, end);\n collection = collection.concat(addLostIntervals(collection));\n return collection;\n}", "function sub_interval(x, y) {\n return make_interval(\n lower_bound(x) - lower_bound(y),\n upper_bound(x) - upper_bound(y)\n );\n}", "add(range) {\n return new SubRange(\n Math.min(this.low, range.low),\n Math.max(this.high, range.high)\n );\n }", "add(range) {\n return new SubRange(Math.min((this || _global).low, range.low), Math.max((this || _global).high, range.high));\n }", "function addRanges(range1, range2) {\n const segments = [];\n // consider all possible segment combinations\n range1.forEach((segment1) => {\n range2.forEach((segment2) => {\n segments.push([segment1[0] + segment2[0], segment1[1] + segment2[1]]);\n });\n });\n // join segments that overlap using the classic algorithm\n segments.sort((segmentA, segmentB) => segmentA[0] - segmentB[0]);\n const newRange = [];\n let joinedSegment = segments[0].slice(0);\n segments.slice(1).forEach((segment) => {\n if (joinedSegment[1] >= segment[0]) {\n joinedSegment[1] = Math.max(joinedSegment[1], segment[1]);\n } else {\n newRange.push(joinedSegment);\n joinedSegment = segment.slice(0);\n }\n });\n newRange.push(joinedSegment);\n return newRange;\n}", "function makeIntervals(start, end, unit) {\n var r = moment.range(start, end);\n return getInterval(unit, r);\n}", "mergeIntervals (intervals)\n {\n if( intervals.length < 2 )\n {\n return intervals\n }\n\n intervals.sort((a, b) => a.start - b.start);\n\n const merged = [];\n\n let start = intervals[0].start,\n end = intervals[0].end;\n\n for (let i = 1; i < intervals.length; i++)\n {\n const interval = intervals[i];\n if (interval.start <= end)\n { // overlapping intervals, adjust the 'end'\n end = Math.max(interval.end, end);\n }\n else\n { // non-overlapping interval, add the previous interval and reset\n merged.push(new Interval(start, end));\n start = interval.start;\n end = interval.end;\n }\n }\n // add the last interval\n merged.push(new Interval(start, end));\n\n return merged;\n }", "function getRangeOverlap(first, second) {\n const result = {\n first: [],\n second: [],\n both: null\n };\n // Both\n if (first[0] < second[1] && second[0] < first[1]) {\n const start = Math.max(first[0], second[0]);\n const end = Math.min(first[1], second[1]);\n result.both = rangeOrIndividual(start, end);\n }\n // Before\n if (first[0] < second[0]) {\n const start = first[0];\n const end = Math.min(second[0], first[1]);\n result.first.push(rangeOrIndividual(start, end));\n }\n else if (second[0] < first[0]) {\n const start = second[0];\n const end = Math.min(second[1], first[0]);\n result.second.push(rangeOrIndividual(start, end));\n }\n // After\n if (first[1] > second[1]) {\n const start = Math.max(first[0], second[1]);\n const end = first[1];\n result.first.push(rangeOrIndividual(start, end));\n }\n else if (second[1] > first[1]) {\n const start = Math.max(first[1], second[0]);\n const end = second[1];\n result.second.push(rangeOrIndividual(start, end));\n }\n return result;\n}", "function Interval(start, end) {\n this.start = start\n this.end = end\n}", "insertInterval (intervals, new_interval)\n {\n const merged = [];\n\n let newStart = new_interval[0]\n let newEnd = new_interval[1]\n\n let i = 0\n while( i < intervals.length && intervals[i][1] <= newStart )\n {\n merged.push( intervals[i] )\n i++\n }\n\n if( intervals[i][1] === newStart )\n {\n newStart = intervals[i][0]\n }\n\n while( i < intervals.length && intervals[i][0] <= newEnd )\n {\n newEnd = Math.max( newEnd, intervals[i][1] )\n i++\n }\n\n merged.push( [newStart, newEnd] )\n\n while( i < intervals.length )\n {\n merged.push( intervals[i] )\n i++\n }\n\n return merged;\n }", "function Interval(start, end) {\n this.start = start;\n this.end = end;\n}", "function Interval(start, end) {\n this.start = start;\n this.end = end;\n}", "function Interval(start, end) {\n this.start = start;\n this.end = end;\n }", "function mulInterval(x, y) {\n const p1 = lowerBound(x) * lowerBound(y);\n const p2 = lowerBound(x) * upperBound(y);\n const p3 = upperBound(x) * lowerBound(y);\n const p4 = upperBound(x) * upperBound(y);\n return makeInterval(Math.min(p1, p2, p3, p4), Math.max(p1, p2, p3, p4));\n}", "findIntersection (intervals_a, intervals_b)\n {\n const result = [];\n\n let aIndex = 0, bIndex = 0\n\n while( aIndex < intervals_a.length && bIndex < intervals_b.length )\n {\n const aStart = intervals_a[aIndex][0],\n aEnd = intervals_a[aIndex][1],\n bStart = intervals_b[bIndex][0],\n bEnd = intervals_b[bIndex][1]\n\n if( bStart <= aEnd && aStart <= bEnd )\n {\n result.push( [Math.max(aStart, bStart), Math.min(aEnd, bEnd)] )\n aIndex++\n }\n else if( aStart <= bEnd && bStart <= aEnd )\n {\n result.push( [Math.max(aStart, bStart), Math.min(aEnd, bEnd)] )\n bIndex++\n }\n\n if( aEnd < bStart )\n {\n aIndex++\n }\n else if( bEnd < aStart )\n {\n bIndex++\n }\n }\n\n return result;\n}", "function addInterval(list, newInt){\n if(!list || !newInt) return 'please provide a list and a new list.'\n let newList = [];\n var holder = [null,null];\n var intGreaterThenNew = false;\n\n list.forEach(int => {\n let temp = [];\n if(holder[0]){\n temp[0] = holder;\n } else {\n temp[0] = newInt[0];\n }\n if(holder[1]){\n temp[1] = holder[1];\n } else {\n temp[1] = newInt[1];\n }\n if(temp[0] > int[1]){\n newList.push(int); //new Interval is greater then both parts of the other\n }\n if(temp[0] <= int[1]){\n if(temp[0] <= int[0]){\n if(temp[1] > int[1]){\n //larger of new interval is larger then larger of current interval\n holder[1] = newInt [1];\n }\n if(temp[1] <= int[1]){\n if(temp[1] <= int[0]){ //new Interval is less then both parts of this interval\n if(temp[0] && temp[1]) {\n newList.push(temp);\n }\n newList.push(int);\n intGreaterThenNew = true;\n return\n }\n //larger of newinterval is less then larger of current interval;\n holder[1] = int[1];\n }\n //newInt min is less then current interval min\n holder[0] = newInt[1];\n }\n //newInt min is less less then current int max but not less then its min.\n holder[0] = int[0];\n }\n })\n if(!intGreaterThenNew) newList.push(holder);\n return newList;\n}", "function IntervalPacker(lowerBoundToInt, upperBoundToInt, options) {\n options = options || {};\n\n this._lowerBoundToInt = lowerBoundToInt;\n this._upperBoundToInt = upperBoundToInt;\n this._minGap = options.minGap || 0;\n\n}", "function intervalDistance(minA, maxA, minB, maxB)\n{\n if (minA < minB)\n {\n return minB - maxA;\n }\n\n else return minA - maxB;\n}", "function rangeIntersection(a, b) {\n if (a[0] > b[1])\n return null;\n if (a[1] < b[0])\n return null;\n // We know they intersect, result is the larger lower bound to the smaller\n // upper bound.\n return [Math.max(a[0], b[0]), Math.min(a[1], b[1])];\n}", "function unionRanges(a, b) {\n if (!rangesOverlap(a, b)) {\n return null;\n } // Find the range with the earliest start point, and the range with the\n // latest end point.\n\n\n var starter = compareRangeBoundaryPoints(a, \"start\", b, \"start\") < 0 ? a : b;\n var ender = compareRangeBoundaryPoints(a, \"end\", b, \"end\") > 0 ? a : b;\n return spanRanges(starter, ender);\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n }", "function intervalContainsInterval(interval1, interval2) {\n\t\t\treturn interval1.start <= interval2.start && interval2.end <= interval1.end;\n\t\t}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function unionRanges(a, b) {\n\t if (!rangesOverlap(a, b)) {\n\t return null;\n\t }\n\n\t // Find the range with the earliest start point, and the range with the\n\t // latest end point.\n\t var starter = compareRangeBoundaryPoints(a, \"start\", b, \"start\") < 0 ? a : b;\n\t var ender = compareRangeBoundaryPoints(a, \"end\", b, \"end\") > 0 ? a : b;\n\n\t return spanRanges(starter, ender);\n\t}", "function sumIntervals(intervals) {\n let sum = 0;\n intervals = intervals.sort(sortFunction);\n\n function sortFunction(a, b) { // Сортировка по первому столбцу\n if (a[0] === b[0]) {\n return 0;\n } else {\n return (a[0] < b[0]) ? -1 : 1;\n }\n }\n\n sum += intervals[0][1] - intervals[0][0];\n let max = intervals[0][1];\n for (let key = 1; key < intervals.length; key++) {\n if (intervals[key][1] <= max) {\n // nothing\n } else if (intervals[key][1] >= intervals[key - 1][1] && intervals[key][0] <= intervals[key - 1][1]) {\n sum += intervals[key][1] - intervals[key - 1][1];\n max = intervals[key][1];\n } else {\n sum += intervals[key][1] - intervals[key][0];\n max = intervals[key][1];\n }\n }\n return sum;\n}", "_commonIntervalLength(i1start, i1end, i2start, i2end) {\n if (i1end < i2start || i2end < i1start) {\n return 0;\n }\n return Math.min(i1end, i2end) - Math.max(i1start, i2start);\n }", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`);\n } else {\n return null;\n }\n}", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\"end before start\", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`);\n } else {\n return null;\n }\n}", "function getSum( a,b ) {\n let min = Math.min(a,b);\n let max = Math.max(a,b);\n let sum = 0;\n if (min >= 0) {\n while (max-min >= 1) {\n sum = sum + max;\n max--;\n }\n } else if (min < 0) {\n while (-min-max >= 1) {\n sum += max;\n max--;\n }\n }\n\n \n \n console.log(min, max, sum)\n \n return;\n}", "function createIntervals(data) {\n var newArr = [];\n var start = Math.min(...data);\n var end = 0;\n var max = Math.max(...data);\n var i = start;\n while (i <= max) {\n //find end of interval\n while ( data.includes(i + 1) && i <= max) {\n i++;\n }\n end = i;\n newArr.push([start, end]);\n i++;\n //find new start\n while ( !data.includes(i) && i <= max ) {\n i++;\n }\n start = i;\n }\n return newArr;\n}", "function extendRange(range_arr, extend_coef) {\n var max = range_arr[1];\n var min = range_arr[0];\n max = max + Math.abs(max) * extend_coef;\n min = min - Math.abs(min) * extend_coef;\n var extended_arr = [min, max];\n return extended_arr;\n\n}", "function MultiInterval(intervals, isClone) {\n // Not very nice but it is hard to clone in js\n if (isClone) {\n this.intervals = [...intervals];\n return this;\n }\n if (!Array.isArray(intervals) || intervals.length === 0) {\n this.intervals = [];\n return this;\n }\n this.intervals = [];\n var checkedIntervals = [];\n // So we can check interval\n var intervalConstructor = interval(0, 1).constructor;\n for (let myInterval of intervals) {\n if (!myInterval instanceof intervalConstructor) {\n this.intervals = [];\n return this;\n }\n if (!myInterval.empty) {\n checkedIntervals.push(myInterval.clone());\n }\n }\n\n checkedIntervals.sort((i1, i2) => i1.start - i2.start);\n\n // Now we need to coalesce intervals if needed\n let nextInterval = null;\n for (let myInterval of checkedIntervals) {\n if (nextInterval === null) {\n nextInterval = myInterval;\n } else {\n if (!nextInterval.intersect(myInterval).empty) {\n nextInterval.coalesceInPlace(myInterval);\n } else {\n this.intervals.push(nextInterval.start, nextInterval.end);\n nextInterval = myInterval;\n }\n }\n }\n if (nextInterval) {\n this.intervals.push(nextInterval.start, nextInterval.end);\n }\n return this;\n}", "function insertInterval(arr, newInterval) {\n let intervals = arr; \n let reverseSortedIntervals = [];\n let newInt = newInterval; \n\n if (intervals.length < 1) {\n return [newInterval]\n }\n\n if (intervals.length === 1) {\n if (newInterval[0] < intervals[0][0]) {\n let newSecondInterval = intervals[0];\n intervals.pop();\n intervals.push(newInterval);\n intervals.push(newSecondInterval);\n } else {\n intervals.push(newInterval);\n }\n }\n\n // we sort the intervals array from latest end time to earliest end time, \n // inserting the new interval whenever appropriate.\n // big O of this part is O(n) due to us having to push into the \n // reverseSortedIntervals arr n times.\n while (intervals.length> 0) {\n if (newInt !== null) {\n // if the new interval start time is less than the 1st entry in the\n // intervals array, it is pushed into the reverseSortedIntervals \n // array first\n if (newInt[0]>=intervals[intervals.length-1][0]) {\n reverseSortedIntervals.push(newInt);\n newInt = null;\n } else {\n reverseSortedIntervals.push(intervals.pop());\n }\n } else {\n reverseSortedIntervals.push(intervals.pop());\n }\n }\n\n intervals = reverseSortedIntervals;\n let mergedIntervals = [];\n\n // bigO = O(n)\n while (intervals.length > 1) {\n let intervalA = intervals[intervals.length-1];\n let intervalB = intervals[intervals.length-2];\n\n // if end time of intervalA is greater than the start time of interval B, \n // we have overlap\n if (intervalB[0] < intervalA[1]) {\n // get the endTime of new merged interval\n let endTime = Math.max(intervalA[1], intervalB[1]);\n\n // replace intervalB value with the value of the new merged interval\n intervalB = [intervalA[0], endTime];\n\n // replace the old value of intervalB in the intervals array with the \n // new interval B \n intervals[intervals.length-2] = intervalB;\n\n // pop off intervalA from the intervals array\n intervals.pop();\n } else {\n // we do not have overlap, so we pop off the end value in intervals \n // and push it into mergedIntervals\n mergedIntervals.push(intervals.pop())\n }\n }\n\n // at this point the length of the intervals array is just one, so we just pop\n // it into the merged intervals array \n mergedIntervals.push(intervals.pop());\n\n return mergedIntervals\n}", "function GetSum( a,b ) {\n let min = Math.min(a,b)\n let max = Math.max(a,b)\n \n let total = 0\n \n for(let i = min; i <= max; i++){\n total += i\n }\n return total\n }", "function mergeRange(ranges, newRangeStart, newRangeEnd) {\n let inRange = false;\n for (let i = 0; i < ranges.length; i++) {\n const range = ranges[i];\n if (!inRange) {\n if (newRangeEnd <= range[0]) {\n // Case 1: New range is before the search range\n ranges.splice(i, 0, [newRangeStart, newRangeEnd]);\n return ranges;\n }\n else if (newRangeEnd <= range[1]) {\n // Case 2: New range is either wholly contained within the\n // search range or overlaps with the front of it\n range[0] = Math.min(newRangeStart, range[0]);\n return ranges;\n }\n else if (newRangeStart < range[1]) {\n // Case 3: New range either wholly contains the search range\n // or overlaps with the end of it\n range[0] = Math.min(newRangeStart, range[0]);\n inRange = true;\n }\n else {\n // Case 4: New range starts after the search range\n continue;\n }\n }\n else {\n if (newRangeEnd <= range[0]) {\n // Case 5: New range extends from previous range but doesn't\n // reach the current one\n ranges[i - 1][1] = newRangeEnd;\n return ranges;\n }\n else if (newRangeEnd <= range[1]) {\n // Case 6: New range extends from prvious range into the\n // current range\n ranges[i - 1][1] = Math.max(newRangeEnd, range[1]);\n ranges.splice(i, 1);\n inRange = false;\n return ranges;\n }\n else {\n // Case 7: New range extends from previous range past the\n // end of the current range\n ranges.splice(i, 1);\n i--;\n }\n }\n }\n if (inRange) {\n // Case 8: New range extends past the last existing range\n ranges[ranges.length - 1][1] = newRangeEnd;\n }\n else {\n // Case 9: New range starts after the last existing range\n ranges.push([newRangeStart, newRangeEnd]);\n }\n return ranges;\n}", "insert(low, high, value){\n // Validate input interval\n low = IntervalTree.validate(low, \"Low bound\", false);\n high = IntervalTree.validate(high, \"High bound\", false);\n if(high < low) throw new RangeError(\n `Invalid interval [${low}, ${high}]. ` + \n \"The high bound must be greater than or equal to the low bound.\"\n );\n // Handle the case where the tree is currently empty\n if(!this.root){\n this.root = new IntervalTreeNode(\n this.valuesEqual, low, high, null, Black\n );\n this.root.addInterval(low, high, value);\n return this.root;\n }\n // Otherwise, search for the place where this interval should be added\n let node = this.root;\n while(true){\n if(low < node.low){\n if(node.left){\n node = node.left;\n }else{ // Add the interval to a new left child of this node\n node.addLeftChild(this, low, high, value);\n break;\n }\n }else if(low > node.low){\n if(node.right){\n node = node.right;\n }else{ // Add the interval to a new right child of this node\n node.addRightChild(this, low, high, value);\n break;\n }\n }else{\n // Add the interval to this node (same low boundary)\n node.addInterval(low, high, value);\n node.addIntervalUpdateLimits();\n break;\n }\n }\n }", "function intersectRanges(a, b) {\n\t if (!rangesOverlap(a, b)) {\n\t return null;\n\t }\n\n\t // Find the range with the latest start point, and the range with the\n\t // earliest end point.\n\t var starter = compareRangeBoundaryPoints(a, \"start\", b, \"start\") > 0 ? a : b;\n\t var ender = compareRangeBoundaryPoints(a, \"end\", b, \"end\") < 0 ? a : b;\n\n\t return spanRanges(starter, ender);\n\t}", "function intersectRanges(a, b) {\n if (!rangesOverlap(a, b)) {\n return null;\n } // Find the range with the latest start point, and the range with the\n // earliest end point.\n\n\n var starter = compareRangeBoundaryPoints(a, \"start\", b, \"start\") > 0 ? a : b;\n var ender = compareRangeBoundaryPoints(a, \"end\", b, \"end\") < 0 ? a : b;\n return spanRanges(starter, ender);\n}", "addRange(high, low, mid) {\n this.range.push({\n 'high': high,\n 'low': low,\n 'mid': mid,\n })\n //return this.range\n }", "function rangesOverlap(a_start, a_end, b_start, b_end) {\n if (a_start <= b_start && b_start <= a_end) return true; // b starts in a\n if (a_start <= b_end && b_end <= a_end) return true; // b ends in a\n if (b_start < a_start && a_end < b_end) return true; // a in b\n return false;\n}", "calcIntervals()\n {\n let intervals = [];\n\n this.choices.reduce(\n function(p, c) {\n intervals.push(\n ((p && p.weight) || 0) +\n ((c && c.weight) || 0)\n );\n },\n null\n );\n\n intervals = intervals.map(function(cur, idx, array) {\n return cur + array.slice(0,idx).reduce((p, c) => p + c, 0);\n });\n\n this.intervals = intervals;\n this.maxInterval = intervals[intervals.length - 1];\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 });\n}", "function GetSum( a,b )\n{\n if (a === b) return a; else {\n let min,max; let out = 0;\n if (a < b) {min = a; max = b;} else {min = b; max = a}\n out = 0;\n\n for (let i = 0; i < Math.abs(max - min); i++){\n out += max - i;\n }\n return out + min;\n }\n}", "function computeSumBetween(num1, num2) {\n var rangeArray = [];\n var sumResult = 0;\n\n if (num1 < num2) {\n for (var i = num1; i < num2; i++) {\n rangeArray.push(i);\n }\n\n for (var i = 0; i < rangeArray.length; i++) {\n sumResult += rangeArray[i];\n }\n\n return sumResult;\n\n } else {\n return 0;\n }\n\n}", "function sumIntervals(intervals){ \n var removedSomething = false;\n //Keep reducing the list until no more elements are removed\n while(true)\n {\n removedSomething = false;\n //ensure that intervals are always sorted based where they start\n intervals.sort(function(a, b){return a[0]-b[0]});\n \n for(var i = 0; i < intervals.length-1; i++)\n {\n var current = intervals[i];\n var next = intervals[i+1];\n \n //if the 'next' range is 100% nested within 'current' range. Remove next without tracking it.\n if(next[0] >= current[0] && next[1] <= current[1])\n { \n removedSomething = true;\n intervals.splice(i+1,1);\n continue;\n }\n \n //Check if the end of the current range would step into the next range. Then merge and remove next.\n if(current[1] >= next[0])\n {\n removedSomething = true;\n current[1] = next[1];\n intervals.splice(i+1,1);\n }\n }\n \n if(!removedSomething) break;\n }\n \n var sum = 0;\n for(var interval of intervals) sum += interval[1] - interval[0];\n return sum;\n}", "function range(start, end) {\n start = Number(start) || 0;\n if (end === undefiend) {\n return function getEnd(end) {\n return getRange(start, end);\n }\n } else {\n end = Number(end) || 0;\n return getRange(start, end);\n }\n function getRange(start, end) {\n let ret = [];\n for (let i = start; i <= end; i++) {\n ret.push(i);\n }\n return ret;\n }\n}", "function sumIntervals(intervals) {\n let result = 0;\n intervals.sort((a, b) => a[0] - b[0]);\n for (let i = 0; i < intervals.length; i++){\n let restIntervals = intervals.slice(i+1, intervals.length);\n for (let j = 0; j < restIntervals.length; j++){\n let secondInterval = restIntervals[j];\n if (intervals[i][1] > secondInterval[0]){\n let newInterval = [intervals[i][0], Math.max(intervals[i][1], secondInterval[1])];\n intervals[i] = [...newInterval];\n restIntervals[j] = [...newInterval];\n intervals.splice(i+1, 1);\n }\n }\n result += intervals[i][1] - intervals[i][0];\n };\n return result;\n}", "function combineRanges(ranges){var ordered=ranges.map(mapWithIndex).sort(sortByRangeStart);for(var j=0,i=1;i<ordered.length;i++){var range=ordered[i];var current=ordered[j];if(range.start>current.end+1){// next range\nordered[++j]=range;}else if(range.end>current.end){// extend range\ncurrent.end=range.end;current.index=Math.min(current.index,range.index);}}// trim ordered array\nordered.length=j+1;// generate combined range\nvar combined=ordered.sort(sortByRangeIndex).map(mapWithoutIndex);// copy ranges type\ncombined.type=ranges.type;return combined;}", "function getSum(a,b) {\n let arrayOfNumbers = [];\n\n const min = (a <= b) ? a : b;\n const max = (a <= b) ? b : a;\n\n for (var item = min; item <= max; item++) {\n arrayOfNumbers = [...arrayOfNumbers, item];\n }\n\n const sum = arrayOfNumbers.reduce((total, item) => total + item);\n return sum;\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function between(num, bound1, bound2){\n return (((bound1 >= num) && (bound2 <= num)) || ((bound1 <= num) && (bound2 >= num)))\n}", "function spanRanges(a, b) {\n\t var range = a.cloneRange();\n\t range.setEnd(b.endContainer, b.endOffset);\n\t return range;\n\t}", "function Interval(start, stop) {\n\tthis.start = start;\n\tthis.stop = stop;\n\treturn this;\n}", "function Interval(start, stop) {\n\tthis.start = start;\n\tthis.stop = stop;\n\treturn this;\n}", "function spanRanges(a, b) {\n var range = a.cloneRange();\n range.setEnd(b.endContainer, b.endOffset);\n return range;\n}", "function addInterval(bpms, newInterval, numIntervals) {\n\t\tbpms.push(newInterval);\n\t\tif (bpms.length > numIntervals) {\n\t\t\tbpms.shift();\n\t\t}\n\t\treturn bpms;\n\t}", "function range(x, y, result = []) {\r\n let min = Math.min(x, y);\r\n let max = Math.max(x, y);\r\n if (min === max) {\r\n result.push(min);\r\n return result;\r\n }\r\n result.push(min);\r\n min++;\r\n return range(min, max, result);\r\n}", "function between(a, b) {\n // your code here\n let array = []\n let min = Math.min(a,b)\n let max = Math.max(a,b)\n for(let i=min; i<=max; i++){\n array.push(i)\n }\n return array\n\n}", "function updateRange(lo, hi, values, add) {\n let ranges = settings.process.ranges;\n let slices = {};\n let min = lo;\n let max = hi;\n\n // special case for belt loops which should not be flattened\n if (values.outputLoops) {\n ranges.push({\n lo, hi, fields: values\n });\n api.conf.update_fields(settings.process);\n api.show.alert(\"update ranges\", 2);\n api.event.emit(\"range.updates\", ranges);\n return;\n }\n\n // just remove values from matching ranges\n if (!add) {\n for (let range of getOverlappingRanges(lo, hi)) {\n for (let key of Object.keys(values)) {\n delete range.fields[key];\n }\n if (Object.keys(range.fields).length === 0) {\n let pos = ranges.indexOf(range);\n if (pos >= 0) {\n ranges.splice(pos,1);\n }\n }\n }\n api.event.emit(\"range.updates\", ranges);\n return;\n }\n\n // set aside belt loops and re-append later\n // since we do not want to collapse/merge loops\n let exclude = ranges.filter(r => r.fields.outputLoops);\n ranges = ranges.filter(r => !r.fields.outputLoops);\n\n // flatten ranges\n ranges.push({lo, hi, fields: values});\n for (let range of ranges) {\n min = Math.min(range.lo, min);\n max = Math.max(range.hi, max);\n for (let i=range.lo; i<=range.hi; i++) {\n let slice = slices[i];\n if (!slice) {\n slice = slices[i] = {};\n }\n for (let [key,val] of Object.entries(range.fields)) {\n slice[key] = val;\n }\n }\n }\n\n // merge contiguous matching ranges\n ranges = settings.process.ranges = [];\n let range;\n for (let i=min; i<=max; i++) {\n let slice = slices[i];\n if (slice && !range) {\n range = {lo: i, hi: i, fields: slice};\n } else if (slice && range && areEqual(range.fields, slice)) {\n range.hi = i;\n } else if (range) {\n ranges.push(range);\n if (slice) {\n range = {lo: i, hi: i, fields: slice};\n } else {\n range = undefined;\n }\n }\n }\n\n ranges.push(range);\n ranges.appendAll(exclude);\n\n api.conf.update_fields(settings.process);\n api.show.alert(\"update ranges\", 2);\n api.event.emit(\"range.updates\", ranges);\n}", "function map_range(value, low1, high1, low2, high2) {\r\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\r\n }", "function Interval(min, max) {\n this.min = min;\n this.max = max;\n if (max < min) {\n throw new Error('max less than min');\n }\n }", "function validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return new Invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return new Invalid(\"missing or invalid end\");\n } else if (end < start) {\n return new Invalid(\"end before start\", \"The end of an interval must be after its start, but you had start=\" + start.toISO() + \" and end=\" + end.toISO());\n } else {\n return null;\n }\n}", "function intersection(range1, range2) {\n var start1 = _Type__WEBPACK_IMPORTED_MODULE_0__[\"getValue\"](range1.start);\n var start2 = _Type__WEBPACK_IMPORTED_MODULE_0__[\"getValue\"](range2.start);\n var end1 = _Type__WEBPACK_IMPORTED_MODULE_0__[\"getValue\"](range1.end);\n var end2 = _Type__WEBPACK_IMPORTED_MODULE_0__[\"getValue\"](range2.end);\n var startMax = Math.max(start1, start2);\n var endMin = Math.min(end1, end2);\n if (endMin < startMax) {\n return undefined;\n }\n else {\n return { start: startMax, end: endMin };\n }\n}", "function rangeOrIndividual(start, end) {\n if (end - start === 1) {\n return start;\n }\n else {\n return [start, end];\n }\n}", "function intervalOutside(firstInterval, secondInterval) {\n const future = firstInterval[0] > secondInterval[1] && firstInterval[1] > secondInterval[1];\n const past = firstInterval[0] < secondInterval[0] && firstInterval[1] < secondInterval[0];\n return future || past;\n}", "function sumAll1(arr) {\n let max = Math.max(arr[0], arr[1]);\n let min = Math.min(arr[0], arr[1]);\n let sumBetween = 0;\n for (let i = min; i <= max; i++) {\n sumBetween += i;\n }\n return sumBetween;\n}", "extendToCover(min, max) {\r\n let x = this.min;\r\n while (min < x) {\r\n x = DateTimeSequence.ADD_INTERVAL(x, -this.interval, this.unit);\r\n this.sequence.splice(0, 0, x);\r\n }\r\n this.min = x;\r\n x = this.max;\r\n while (x < max) {\r\n x = DateTimeSequence.ADD_INTERVAL(x, this.interval, this.unit);\r\n this.sequence.push(x);\r\n }\r\n this.max = x;\r\n }", "function SimpleInterval(a, b) {\n if (!(a instanceof SimpleFloat) || !(b instanceof SimpleFloat) || a.add(b.negate()).sign() > 0) {\n throw new TypeError();\n }\n this.a = a;\n this.b = b;\n}", "function GetSum( a, b ) {\n var list = [];\n \n if ( a < b ) {\n for(var i = a; i <= b; i++) {\n list.push(i);\n }\n }\n \n else {\n for(var i = b; i <= a; i++) {\n list.push(i);\n }\n }\n \n // ES6 to the rescue\n var sum = list.reduce((a, b) => a + b);\n return sum; \n}", "function __WEBPACK_DEFAULT_EXPORT__(range, min, max) {\n var lo = range[0],\n hi = range[1],\n span;\n\n if (hi < lo) {\n span = hi;\n hi = lo;\n lo = span;\n }\n span = hi - lo;\n\n return span >= (max - min)\n ? [min, max]\n : [\n (lo = Math.min(Math.max(lo, min), max - span)),\n lo + span\n ];\n}", "constructor(interval_start, interval_end) {\n if (!(interval_start instanceof Date && interval_end instanceof Date)) {\n errorLog('Error: Attempted to construct interval object with non-Date parameters.');\n }\n\n this.start = !!interval_start && interval_start instanceof Date ? interval_start.getTime() : interval_start;\n this.end = !!interval_end && interval_end instanceof Date ? interval_end.getTime() : interval_end;\n }", "function rangeRad(a,b){\n var min = Math.min.apply(Math, [a, b]);\n var max = Math.max.apply(Math, [a, b]);\n console.log('min ' + min + ' max '+max);\n return this > min && this < max;\n }", "function intervalChoice(a, interval) {\n\n // filter numbers\n var numbers = interval.filter(function(a) { return typeof a === 'number'; });\n\n // get interval limits\n var amin = numbers[0];\n var amax = numbers[numbers.length - 1];\n\n // capture numbers beyond interval limits\n interval.unshift(-Infinity);\n interval.push(Infinity);\n\n // iterate over the interval, to find the function\n // that corresponds to our value 'a'\n var n = interval.length - 1;\n for(var i = 1; i < n; i++) {\n if(typeof interval[i] === 'function') {\n var abot = interval[i - 1];\n var afun = interval[i];\n var atop = interval[i + 1];\n if(abot <= a && a < atop) {\n return afun(a, abot, atop);\n }\n }\n }\n}", "function Interval(start, stop) {\n _classCallCheck(this, Interval);\n\n this.start = start;\n this.stop = stop;\n }", "function range(start, end) {\n //Input sanitization\n if (!start && !end) return \"Please provide both start and end points\";\n if (!end) return \"Please provide an endpoint\";\n if (isNaN(start) || isNaN(end))\n return \"Both start and end points must be numbers\";\n\n let arr = [];\n while (start <= end) {\n arr.push(start);\n start++;\n }\n return arr;\n}", "function intervalHelper(intervals, time) {\n var applicable = [];\n var next = Number.POSITIVE_INFINITY;\n for (var i = 0; i < intervals.length; i++) {\n var interval = intervals[i];\n var valid = true;\n if (interval.start) {\n valid = valid && interval.start <= time;\n if (interval.start > time && interval.start < next) {\n next = interval.start;\n }\n }\n if (interval.end) {\n valid = valid && interval.end >= time;\n if (valid && interval.end < next) {\n next = interval.end + 1;\n }\n }\n if (valid) {\n applicable.push(interval.name);\n }\n }\n next = next === Number.POSITIVE_INFINITY ? undefined : next;\n return { configs: applicable, next: next };\n }", "function range(start, end) {\n if ((start && end) || end == 0) {\n let result = [];\n for (i = start; i <= end; i++) {\n result.push(i);\n }\n return result;\n }\n\n if (arguments[1] === undefined) {\n return function rangeTill(end) {\n let result = [];\n for (i = start; i <= end; i++) {\n result.push(i);\n }\n return result;\n };\n }\n}", "function within(min1, max1, min2, max2) {\n return (min1 <= max2 && max1 >= min2);\n}", "function getSum( a,b )\r\n {\r\n let max = Math.max(a,b);\r\n let min = Math.min(a,b);\r\n let sum =0;\r\n if(a===b){\r\n return a;\r\n }else{\r\n for(let i =min ; i <= max ; i++) {\r\n sum +=i;\r\n }\r\n }\r\n return sum;\r\n \r\n }", "function getSumOf(lowerBound, higherBound) {\n if (lowerBound >= higherBound) {\n return 0;\n }\n\n let finalResult = 0;\n\n for (let i = lowerBound; i <= higherBound; i++) {\n finalResult += i;\n }\n\n return finalResult;\n}", "function makeBetweenFunc(min, max) {\n return function (num) {\n return num >= min && num <= max;\n };\n}", "function overlaps (min1, max1, min2, max2)\n\t{\n\t\treturn is_between (min2, min1, max1) || is_between (min1, min2, max2);\n\t}", "function makeBetweenFunc(min, max) {\n return function(value) {\n return value >= min && value <= max;\n }\n}", "function Interval(data, id, s, e) {\n\t this.id = id;\n\t this.start = data[s];\n\t this.end = data[e];\n\t this.data = data;\n\n\t if (typeof this.start != 'number' || typeof this.end != 'number') {\n\t throw new Error('start, end must be number. start: ' + this.start + ', end: ' + this.end);\n\t }\n\n\t if (this.start >= this.end) {\n\t throw new Error('start must be smaller than end. start: ' + this.start + ', end: ' + this.end);\n\t }\n\t}", "function sum (start, end) {\n if (start > end) {\n return sum(end, start);\n } else if (start === end) {\n return end;\n } else {\n return start + sum(start + 1, end);\n }\n}", "function compareRangeBoundaryPoints(a, whichA, b, whichB) {\n\t var mode = void 0;\n\t if (whichA === \"start\" && whichB === \"start\") {\n\t // $FlowFixMe(mdr)\n\t mode = Range.START_TO_START;\n\t } else if (whichA === \"start\" && whichB === \"end\") {\n\t // NOTE(mdr): Confusingly, the correct constant here is actually\n\t // `END_TO_START`, which is the reverse of what you'd expect.\n\t // $FlowFixMe(mdr)\n\t mode = Range.END_TO_START;\n\t } else if (whichA === \"end\" && whichB === \"start\") {\n\t // NOTE(mdr): Confusingly, the correct constant here is actually\n\t // `START_TO_END`, which is the reverse of what you'd expect.\n\t // $FlowFixMe(mdr)\n\t mode = Range.START_TO_END;\n\t } else {\n\t // $FlowFixMe(mdr)\n\t mode = Range.END_TO_END;\n\t }\n\t return a.compareBoundaryPoints(mode, b);\n\t}", "function midrange (a, b,c) {\n let min = Math.min(a, b,c);\n let max = Math.max(a, b,c);\n let mid = (max+min)/2\n\n\n return mid; \n}", "function h$ghcjsbn_add_bb(b1, b2) {\n ASSERTVALID_B(b1, \"add_bb b1\");\n ASSERTVALID_B(b2, \"add_bb b2\");\n var i, c = 0, l1 = b1[0], l2 = b2[0], t = [0];\n var bl, lmin, lmax;\n if(l1 <= l2) {\n lmin = l1;\n lmax = l2;\n bl = b2;\n } else {\n lmin = l2;\n lmax = l1;\n bl = b1;\n }\n for(i=1;i<=lmin;i++) {\n c += b1[i] + b2[i];\n t[i] = c & GHCJSBN_MASK;\n c >>= GHCJSBN_BITS;\n }\n for(i=lmin+1;i<=lmax;i++) {\n c += bl[i];\n t[i] = c & GHCJSBN_MASK;\n c >>= GHCJSBN_BITS;\n }\n if(c !== 0) t[++lmax] = c;\n t[0] = lmax;\n ASSERTVALID_B(t, \"add_bb result\");\n return t;\n}", "function sumOfRangeClever (start, end, step = 1){\r\n\tvar array = [];\r\n\tvar sum = 0;\r\n\tfor (var i = start; i <= end; i++) {\r\n\t\tarray.push(i);\r\n\t}\r\n\t\r\n\tfor(var value of array){\r\n\t\tsum = sum + value;\r\n }\r\n\treturn ({\"array\": array, \"sum\": sum});\r\n}", "function compareRangeBoundaryPoints(a, whichA, b, whichB) {\n var mode;\n\n if (whichA === \"start\" && whichB === \"start\") {\n // $FlowFixMe(mdr)\n mode = Range.START_TO_START;\n } else if (whichA === \"start\" && whichB === \"end\") {\n // NOTE(mdr): Confusingly, the correct constant here is actually\n // `END_TO_START`, which is the reverse of what you'd expect.\n // $FlowFixMe(mdr)\n mode = Range.END_TO_START;\n } else if (whichA === \"end\" && whichB === \"start\") {\n // NOTE(mdr): Confusingly, the correct constant here is actually\n // `START_TO_END`, which is the reverse of what you'd expect.\n // $FlowFixMe(mdr)\n mode = Range.START_TO_END;\n } else {\n // $FlowFixMe(mdr)\n mode = Range.END_TO_END;\n }\n\n return a.compareBoundaryPoints(mode, b);\n}", "function Interval(left, right) {\n this.left = left;\n this.right = right\n }" ]
[ "0.66479737", "0.6616013", "0.652245", "0.6456774", "0.6433727", "0.6431704", "0.6426851", "0.6387165", "0.6342265", "0.63171923", "0.63106346", "0.62977326", "0.62505305", "0.6249269", "0.6243401", "0.62178606", "0.61666274", "0.60571927", "0.6051225", "0.6029278", "0.60221106", "0.5993758", "0.59743655", "0.59701765", "0.5968611", "0.5968611", "0.5968611", "0.5968611", "0.59659415", "0.5940981", "0.59389496", "0.5924854", "0.5924854", "0.5914494", "0.59015536", "0.58805704", "0.58789223", "0.58539224", "0.58532476", "0.5822018", "0.5805663", "0.57981205", "0.57901", "0.57774127", "0.57740486", "0.5761674", "0.5759727", "0.57514495", "0.57313436", "0.57306945", "0.5721172", "0.5716875", "0.5711923", "0.5695444", "0.56941813", "0.56941813", "0.56941813", "0.56941813", "0.56941813", "0.5659945", "0.565251", "0.5639206", "0.5639206", "0.56257653", "0.56199855", "0.5615963", "0.56016266", "0.5596675", "0.5595994", "0.55949545", "0.5576037", "0.5557964", "0.55576706", "0.5556622", "0.55419254", "0.5526592", "0.5522213", "0.551683", "0.5505318", "0.55049384", "0.55046105", "0.5495122", "0.5493615", "0.5488941", "0.5486301", "0.5476728", "0.54727495", "0.5465565", "0.54636794", "0.5458502", "0.54511577", "0.54466456", "0.5445479", "0.54367536", "0.54256994", "0.5421447", "0.5399128", "0.5391737", "0.53886366", "0.5384562" ]
0.73323363
0
Alyssa also works out the product of two intervals by finding the minimum and the maximum of the products of the bounds and using them as the bounds of the resulting interval. (math_min and math_max are primitives that find the minimum or maximum of any number of arguments.)
function mulInterval(x, y) { const p1 = lowerBound(x) * lowerBound(y); const p2 = lowerBound(x) * upperBound(y); const p3 = upperBound(x) * lowerBound(y); const p4 = upperBound(x) * upperBound(y); return makeInterval(Math.min(p1, p2, p3, p4), Math.max(p1, p2, p3, p4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iclamp(a, min, max) {\n\treturn Math.max(min, Math.min(a, max));\n}", "function product_Range(a,b) {\n var prd = a,i = a;\n\n while (i++< b) {\n prd*=i;\n }\n return prd;\n}", "function map(x, in_min, in_max, out_min, out_max,checkRanges) {\n if ((typeof checkRanges != 'undefined') && checkRanges) {\n if (x < in_min) x = in_min;\n else if (x > in_max) x = in_max;\n }\n return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;\n}", "function linearScale (a1, b1, a2, b2) {\n return function (x1) {\n // in the interval [0, 1]\n var t = (x1 - a1) / (b1 - a1);\n // in the interval [a2, b2]\n return t * (b2 - a2) + a2;\n }\n}", "function solve(a) {\n let min = 1, max = 1;\n for (let x of a) {\n let cur = [];\n for (let y of x) cur.push(y * min), cur.push(y * max);\n min = Math.min(...cur);\n max = Math.max(...cur);\n }\n return max;\n }", "map(original, in_min, in_max, out_min, out_max) {\n return (original - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;\n }", "function map(x, oMin, oMax, nMin, nMax) {\n // check range\n\n if (oMin === oMax) {\n console.log(\"Warning: Zero input range\");\n return null;\n }\n\n if (nMin === nMax) {\n console.log(\"Warning: Zero output range\");\n return null;\n }\n\n // check reversed input range\n let reverseInput = false;\n let oldMin = Math.min(oMin, oMax);\n let oldMax = Math.max(oMin, oMax);\n\n if (oldMin != oMin) reverseInput = true;\n\n // check reversed output range\n let reverseOutput = false;\n let newMin = Math.min(nMin, nMax);\n let newMax = Math.max(nMin, nMax);\n\n if (newMin != nMin) reverseOutput = true;\n\n // calculate new range\n let portion = (x - oldMin) * (newMax - newMin) / (oldMax - oldMin);\n\n if (reverseInput) portion = (oldMax - x) * (newMax - newMin) / (oldMax - oldMin);\n\n let result = portion + newMin;\n\n if (reverseOutput) result = newMax - portion;\n\n return result;\n }", "function GetSum( a,b ) {\n let min = Math.min(a,b)\n let max = Math.max(a,b)\n \n let total = 0\n \n for(let i = min; i <= max; i++){\n total += i\n }\n return total\n }", "function area(a, b){\n return (a*b);\n}", "static map(val, inputMin, inputMax, outputMin, outputMax) {\n return ((outputMax - outputMin) * ((val - inputMin) / (inputMax - inputMin))) + outputMin;\n }", "function rangeRad(a,b){\n var min = Math.min.apply(Math, [a, b]);\n var max = Math.max.apply(Math, [a, b]);\n console.log('min ' + min + ' max '+max);\n return this > min && this < max;\n }", "function rangeIntersection(a, b) {\n if (a[0] > b[1])\n return null;\n if (a[1] < b[0])\n return null;\n // We know they intersect, result is the larger lower bound to the smaller\n // upper bound.\n return [Math.max(a[0], b[0]), Math.min(a[1], b[1])];\n}", "function maxOfTwoNumbers(a, b) {\n //\n}", "function constrain(x, x0, x1) {\r\n return Math.min(Math.max(x, x0), x1);\r\n}", "function maxOfTwoNumbers(a, b) {\n return Math.max(a, b);\n //\n}", "function map(x, inMin, inMax, outMin, outMax) {\n return (x - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;\n }", "function maxOfTwoNumbers(a, b) { \n return Math.max (a,b) }", "function within(min1, max1, min2, max2) {\n return (min1 <= max2 && max1 >= min2);\n}", "function getSum( a,b ) {\n let min = Math.min(a,b);\n let max = Math.max(a,b);\n let sum = 0;\n if (min >= 0) {\n while (max-min >= 1) {\n sum = sum + max;\n max--;\n }\n } else if (min < 0) {\n while (-min-max >= 1) {\n sum += max;\n max--;\n }\n }\n\n \n \n console.log(min, max, sum)\n \n return;\n}", "map(value, startRangeLower, startRangeHigher, targetRangeLower, targetRangeHigher)\n {\n let startSpan = startRangeHigher - startRangeLower;\n let targetSpan = targetRangeHigher - targetRangeLower;\n return (((value - startRangeLower) / startSpan) * targetSpan) + targetRangeLower;\n }", "function abTest(a, b){\n if (a < 0 || b < 0){\n return undefined;\n }\n\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map (num, in_min, in_max, out_min, out_max) {\n return (num - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;\n}", "function abTest(a, b) {\n if (a < 0 || b < 0) {\n return undefined;\n }\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function abTest(a, b) {\n\tif (a < 0 || b < 0) {\n\t\treturn undefined;\n\t}\n\treturn Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 0));\n}", "function abTest(a,b){\n if (a < 0 || b < 0){\n return undefined\n }\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b),2))\n}", "function abTest(a, b) {\n if (a < 0 || b < 0) {\n return undefined;\n }\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function map_range(value, low1, high1, low2, high2) {\r\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\r\n }", "function abTest(a, b) {\n if (a < 0 || b < 0) {\n return undefined;\n }\n\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function pitagoras(a, b) {\n\n c = Math.pow(a, 2) + Math.pow(b, 2) \n\n return Math.sqrt(c)\n\n\n}", "function map(value, in_min, in_max, out_min, out_max){\n return (value - in_min) * (out_max - out_min) / (in_max - in_min) + out_min\n}", "function rangeMatch(X1, minX1, maxX1, minX2, maxX2) {\n return minX2 + ((X1 - minX1) / (maxX1 - minX1)) * (maxX2 - minX2)\n}", "function map(x, in_min, in_max, out_min, out_max) {\n return Math.round((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min);\n}", "function max(x, y) {\n return lte(x, y) ? y : x;\n }", "function max(x, y) {\n return lte (x, y) ? y : x;\n }", "function maxOfTwoNumbers(a, b) {\n return Math.max(a, b);\n}", "mapVals(num, in_min, in_max, out_min, out_max) {\n return ((num - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min;\n }", "function mapNumbers(x, in_min, in_max, out_min, out_max)\t{\n return (x-in_min) * (out_max-out_min) / (in_max-in_min) + out_min;\n}", "function map(value, fromRangeMin, fromRangeMax, toRangeMin, toRangeMax) {\n return (value - fromRangeMin) * (toRangeMax - toRangeMin) / (fromRangeMax - fromRangeMin) + toRangeMin;\n }", "findIntersection (intervals_a, intervals_b)\n {\n const result = [];\n\n let aIndex = 0, bIndex = 0\n\n while( aIndex < intervals_a.length && bIndex < intervals_b.length )\n {\n const aStart = intervals_a[aIndex][0],\n aEnd = intervals_a[aIndex][1],\n bStart = intervals_b[bIndex][0],\n bEnd = intervals_b[bIndex][1]\n\n if( bStart <= aEnd && aStart <= bEnd )\n {\n result.push( [Math.max(aStart, bStart), Math.min(aEnd, bEnd)] )\n aIndex++\n }\n else if( aStart <= bEnd && bStart <= aEnd )\n {\n result.push( [Math.max(aStart, bStart), Math.min(aEnd, bEnd)] )\n bIndex++\n }\n\n if( aEnd < bStart )\n {\n aIndex++\n }\n else if( bEnd < aStart )\n {\n bIndex++\n }\n }\n\n return result;\n}", "function mapVal (num, in_min, in_max, out_min, out_max) {\n return (num - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;\n}", "function minl1 ( A, b) {\n\t/*\n\t\tSolves min ||x||_1 s.t. Ax = b\n\t\t\n\t\tas \n\t\t\n\t\t\tmin sum a_i s.t. -a <= x <= a and Ax = b\n\t\t\t\n\t\texample: \nA = randn(10,20)\nr = zeros(20)\nr[0:3] = randn(3)\nx=minl1(A,A*r)\n\n\t*/\n\tconst n = A.n;\n\t\n\tvar Aineq = zeros ( 2*n, 2*n ) ;\n\tvar i;\n\t\n\t//set ( Aineq, range(0,n),range(0,n) , I) ;\n\t//set ( Aineq, range(0,n),range(n,2*n) , I_) ;\n\t//set ( Aineq, range(n,2*n),range(0,n) , I_) ;\n\t//set ( Aineq, range(n,2*n),range(n,2*n) , I_) ;\n\tfor ( i=0; i < n; i++) {\n\t\tAineq.val[i*Aineq.n + i] = 1;\n\t\tAineq.val[i*Aineq.n + n+i] = -1;\n\t\tAineq.val[(n+i)*Aineq.n + i] = -1;\n\t\tAineq.val[(n+i)*Aineq.n + n+i] = -1;\n\t}\n\tvar bineq = zeros ( 2*n);\n\t\n\tvar Aeq = zeros(A.length, 2*n);\n\tset ( Aeq , [], range( 0,n), A );\n\t\n\tvar cost = zeros(2*n);\n\tset ( cost, range(n,2*n), ones(n) );\n\t\t\n\tvar lb = zeros(2*n);\t// better to constraint a>=0\n\tset ( lb, range(n), mulScalarVector(-Infinity , ones( n )) ) ;\t\n//console.log( cost, Aineq, bineq, Aeq, b, lb);\t\n//\tvar lpsol = lp( cost, Aineq, bineq, Aeq, b, lb, [], 0 , 1e-6 );\n\tvar lpsol = glp( cost, Aineq, bineq, Aeq, b, lb);\t\n\n\treturn get(lpsol, range(n) );\n}", "function getSum( a,b )\r\n {\r\n let max = Math.max(a,b);\r\n let min = Math.min(a,b);\r\n let sum =0;\r\n if(a===b){\r\n return a;\r\n }else{\r\n for(let i =min ; i <= max ; i++) {\r\n sum +=i;\r\n }\r\n }\r\n return sum;\r\n \r\n }", "function abTest(a, b) {\n // Only change code below this line\n if (a < 0){\n return undefined;\n } else if (b < 0){\n return undefined;\n } \n // Only change code above this line\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function bound(min, max, val)\n\t{\n\t\treturn Math.max(Math.min(val, max), min);\n\t}", "function multiplyBetween(num1, num2) {\n\n if (num2 <= num1) {\n return 0;\n }\n\n var product = 1;\n for (var start = num1; start < num2; start++) {\n product = product * start;\n }\n return product;\n}", "function csquareintsbetween (a, b) {\n return Math.floor(Math.sqrt(b)) - Math.ceil(Math.sqrt(a)) + 1;\n}", "function mapLinear( x, a1, a2, b1, b2 ) {\n\n\treturn b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 );\n\n}", "function intervalDistance(minA, maxA, minB, maxB)\n{\n if (minA < minB)\n {\n return minB - maxA;\n }\n\n else return minA - maxB;\n}", "function map (x, low1, high1, low2, high2) {\n const r1 = high1 - low1\n const r2 = high2 - low2\n return ((x - low1) * (r2 / r1)) + low2\n}", "function solve(args) {\n var min = +args[0],\n max = +args[0],\n sum = +args[0],\n avg = 0,\n len = args.length;\n\n for (var i = 1; i < len; i += 1) {\n min = Math.min(min, +args[i]);\n max = Math.max(max, +args[i]);\n sum += +args[i];\n }\n\n avg = sum / len;\n \n console.log(\"min=\" + min.toFixed(2));\n console.log(\"max=\" + max.toFixed(2));\n console.log(\"sum=\" + sum.toFixed(2));\n console.log(\"avg=\" + avg.toFixed(2));\n}", "function calculatesArea(a, b){\n let area = a * b\n return area\n}", "function multiplyBetween(num1, num2) {\n if(num1 >= num2){return 0};\n var array = [];\n for (var i=num1; i< num2; i++){\n array.push(i);\n }\n var mult =array.reduce((a,b)=>(a*b));\n return mult;\n}", "static clamp(num, a, b) {\n return Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));\n }", "function mapLinear(x, a1, a2, b1, b2) {\n return b1 + (x - a1) * (b2 - b1) / (a2 - a1);\n }", "function range(input,min,max) {\n\t\tif(min > max) { var x = min; min = max; max = x;}\n\t\treturn Math.max(Math.min(input,max),min);\n\t}", "function fmin(a, b) { return Math.min(a, b); }", "function maxOfTwoNumbers(a, b) {\n return a > b ? a : b;\n}", "function maxOfTwoNumbers(a, b) {\n return a > b ? a : b;\n}", "function intervalChoice(a, interval) {\n\n // filter numbers\n var numbers = interval.filter(function(a) { return typeof a === 'number'; });\n\n // get interval limits\n var amin = numbers[0];\n var amax = numbers[numbers.length - 1];\n\n // capture numbers beyond interval limits\n interval.unshift(-Infinity);\n interval.push(Infinity);\n\n // iterate over the interval, to find the function\n // that corresponds to our value 'a'\n var n = interval.length - 1;\n for(var i = 1; i < n; i++) {\n if(typeof interval[i] === 'function') {\n var abot = interval[i - 1];\n var afun = interval[i];\n var atop = interval[i + 1];\n if(abot <= a && a < atop) {\n return afun(a, abot, atop);\n }\n }\n }\n}", "function clamp(a,min,max)\r\n{return Math.min(Math.max(a,min),max);}", "function maxOfTwoNumbers(a,b){\n\treturn a > b ? a : b;\n}", "function mapLinear( x, a1, a2, b1, b2 ) {\n\n\t\treturn b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 );\n\n\t}", "function between(val, min, max) {\n\t\treturn Math.min(Math.max(min, val), max);\n\t}", "function multiply(num1, num2, cb) {\n const largest = Math.max(num1, num2);\n const smallest = Math.min(num1, num2);\n\n return cb(largest, smallest);\n}", "function range(a, b) {\n if ((a >= 40 && a <= 60) && (b >= 40 && b <= 60)) {\n console.log('given numbers are in range of 40 and 60')\n } else if ((a >= 70 && a <= 100) && (b >= 70 && b <= 100)) {\n console.log('given numbers are in range of 70 and 100')\n } else {\n console.log('one or both the numbers are not in range')\n }\n}", "function linearMap(x, minx, maxx, miny, maxy) {\n // t is in the range [0,1]\n t = (x - minx) / (maxx - minx);\n y = t * (maxy - miny) + miny;\n return y;\n}", "function getRecommendValue(a, b) {\n let x = a > b ? b : a\n let y = 0\n\n if (x >= 4000) {\n y = x * 0.015\n } else if (x >= 2000) {\n y = x * 0.013\n } else if (x >= 1000) {\n y = x * 0.011\n } else if (x >= 300) {\n y = x * 0.010\n }\n\n return y\n}", "function maxOfTwoNumbers(a, b) {\n const maxOfTwo = Math.max(a, b);\n return maxOfTwo;\n}", "function map(val, A, B, a, b) {\n return (val - A) * (b - a) / (B - A) + a;\n}", "function max(x, y){\n return Math.max(x, y)\n}", "function constrain(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}", "function pyt(a, b) {\r\n\t\treturn Math.sqrt(a * a + b * b);\r\n\t}", "function maxOfTwoNumbers(a, b) {\n if ( a > b){ //return either parameter if it is larger than the other. \n return a;\n }\n else return b;\n}", "function d(a,b) {\n var x = Math.max(0, a[0] - b[0], b[0] - a[1]),\n y = Math.max(0, a[2] - b[1], b[1] - a[3])\n return x+y;\n }", "function abTest(a, b) {\r\n if (a > 0 || b > 0) {\r\n return undefined;\r\n } else {\r\n console.log(\"not undefined\");\r\n }\r\n \r\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\r\n }", "function hypo(a, b) {\n function square(x) {\n return x * x;\n }\n return Math.sqrt(square(a)+ square(b))\n}", "function min (a, b) {\n return Math.min(a, b);\n}", "function getSum(a,b) {\n let arrayOfNumbers = [];\n\n const min = (a <= b) ? a : b;\n const max = (a <= b) ? b : a;\n\n for (var item = min; item <= max; item++) {\n arrayOfNumbers = [...arrayOfNumbers, item];\n }\n\n const sum = arrayOfNumbers.reduce((total, item) => total + item);\n return sum;\n}", "function d(a,b) {\r\n var x = Math.max(0, a[0] - b[0], b[0] - a[1]),\r\n y = Math.max(0, a[2] - b[1], b[1] - a[3])\r\n return x+y;\r\n }", "function d(a,b) {\r\n var x = Math.max(0, a[0] - b[0], b[0] - a[1]),\r\n y = Math.max(0, a[2] - b[1], b[1] - a[3])\r\n return x+y;\r\n }", "function findMinMax (x,y){\r\n var len = x.length\r\n if ( y === true ){\r\n return Math.max(...x)\r\n }else{\r\n return Math.min(...x)\r\n }\r\n }", "function midrange (a, b,c) {\n let min = Math.min(a, b,c);\n let max = Math.max(a, b,c);\n let mid = (max+min)/2\n\n\n return mid; \n}", "function highAndLow1(numbers){\n numbers = numbers.split(' ');\n return `${Math.max(...numbers)} ${Math.min(...numbers)}`;\n}", "function overlaps (min1, max1, min2, max2)\n\t{\n\t\treturn is_between (min2, min1, max1) || is_between (min1, min2, max2);\n\t}", "function __WEBPACK_DEFAULT_EXPORT__(range, min, max) {\n var lo = range[0],\n hi = range[1],\n span;\n\n if (hi < lo) {\n span = hi;\n hi = lo;\n lo = span;\n }\n span = hi - lo;\n\n return span >= (max - min)\n ? [min, max]\n : [\n (lo = Math.min(Math.max(lo, min), max - span)),\n lo + span\n ];\n}", "function mathOperations(arr){\n let max = arr[0],min=arr[0]\n\n for(let i = 0;i<arr.length;i++){\n if(arr[i]>max){\n max = arr[i]\n }\n if(arr[i]<min){\n min = arr[i]\n }\n }\n\n console.log(\"MAX = \" + max)\n\n console.log(\"Min = \" + min)\n\n console.log(\"Range = \" + (max-min))\n}", "function between(a, b) {\n // your code here\n let array = []\n let min = Math.min(a,b)\n let max = Math.max(a,b)\n for(let i=min; i<=max; i++){\n array.push(i)\n }\n return array\n\n}", "mapValues(n, start1, stop1, start2, stop2) {\n return ((n-start1)/(stop1-start1))*(stop2-start2)+start2;\n }", "function max(a, b){\n return a < b ? b : a;\n}", "function minMaxProduct(array){\n // your code here...\n}", "function getLowerEndOfBiggerIntervalOfTwoDegreeValues(a,b) {\n var bigger = Math.max(a,b)\n var smaller = Math.min(a,b)\n if (bigger - smaller > smaller + 360 - bigger) return smaller\n else return bigger\n}", "function getIterations(a, b) {\n\t\t// Guess required precision based and size of range...\n\t\t// TODO: There should be much better educated guesses for\n\t\t// this. Also, what does this depend on? Required precision?\n\t\treturn Math.max(2, Math.min(16, Math.ceil(Math.abs(b - a) * 32)));\n\t}", "function GetSum( a,b )\n{\n if (a === b) return a; else {\n let min,max; let out = 0;\n if (a < b) {min = a; max = b;} else {min = b; max = a}\n out = 0;\n\n for (let i = 0; i < Math.abs(max - min); i++){\n out += max - i;\n }\n return out + min;\n }\n}", "function range(x, y, result = []) {\r\n let min = Math.min(x, y);\r\n let max = Math.max(x, y);\r\n if (min === max) {\r\n result.push(min);\r\n return result;\r\n }\r\n result.push(min);\r\n min++;\r\n return range(min, max, result);\r\n}", "function computeBounds(x1, x2, y1, y2) {\n return [[x1, y1], [x2, y1], [x2, y2], [x1,y2]];\n }" ]
[ "0.63497293", "0.6287785", "0.6074114", "0.6001888", "0.5925367", "0.5914643", "0.58827174", "0.5819397", "0.58159214", "0.5801726", "0.5793916", "0.5776489", "0.5767991", "0.57658136", "0.576004", "0.5758149", "0.5742974", "0.5724646", "0.57046723", "0.5695718", "0.5684329", "0.56808263", "0.56808263", "0.56808263", "0.56808263", "0.56808263", "0.56747955", "0.5646715", "0.5638208", "0.5637244", "0.56340104", "0.5627914", "0.56274074", "0.5625329", "0.5619246", "0.56066453", "0.56059057", "0.55865777", "0.55827963", "0.558046", "0.5572082", "0.55535585", "0.5550361", "0.55335057", "0.5519923", "0.5518163", "0.5485798", "0.54741704", "0.5469226", "0.54513216", "0.5438479", "0.5437878", "0.54286706", "0.5419574", "0.54115963", "0.5403901", "0.53899455", "0.5383458", "0.5362327", "0.5355372", "0.5348948", "0.5334899", "0.5334899", "0.533277", "0.53322595", "0.53176653", "0.5315576", "0.5311551", "0.53112537", "0.5310999", "0.5307286", "0.53052145", "0.53009623", "0.5297193", "0.52854395", "0.52819186", "0.52809954", "0.52794343", "0.5278139", "0.52723676", "0.5269716", "0.5267234", "0.52661175", "0.52660763", "0.52660763", "0.5262995", "0.5259288", "0.5255173", "0.5252805", "0.52507716", "0.52484196", "0.52469534", "0.5237722", "0.5237295", "0.5237242", "0.52346486", "0.52336556", "0.5231243", "0.5228188", "0.52266735" ]
0.69145757
0
To divide two intervals, Alyssa multiplies the first by the reciprocal of the second. Note that the bounds of the reciprocal interval are the reciprocal of the upper bound and the reciprocal of the lower bound, in that order.
function divInterval(x, y) { return mulInterval(x, makeInterval(1.0 / upperBound(y), 1.0 / upperBound(y))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function divide(a, b) {\n\t\ta = a + 0.0;\n\t\tb = b + 0.0;\n\t\tif(Math.abs(b) < 0.00001) {\n\t\t\tb = 0.0001;\n\t\t}\t\n\t\treturn a / b;\n\t}", "function divide1(a, b) {\n return a / b; \n}", "function divide(a, b) {\n return divide(a, b);\n}", "function division(a, b) {\r\n\treturn a / b;\r\n}", "function divide(a,b) {\n\treturn a / b\n}", "div(a, b) {\n\t\tthis.registers[a] = Math.trunc(this.get(a) / this.get(b));\n\t}", "function divide(a, b) {\r\n // if (b === 0) {\r\n // throw 'Division by zero is undefined: ' + a + '/' + b;\r\n // }\r\n var sign = 1;\r\n if (a < 0) {\r\n a = -a;\r\n sign = -sign;\r\n }\r\n if (b < 0) {\r\n b = -b;\r\n sign = -sign;\r\n }\r\n var result = 0;\r\n while (a >= 0) {\r\n a -= b;\r\n result++;\r\n }\r\n return (result - 1) * sign;\r\n }", "function div(a, b) {\n return (a-(a%b))/b;\n}", "function divValues(firstValue, secondValue) {\n\t\tvar result = 0; \n\t\tresult = firstValue / secondValue;\n\t\treturn result;\n\t}", "function divide(a, b) {\n\t\tvar result = a / b;\n\t\treturn result;\n\t}", "function avgTwoNumbers(a, b) {\n\treturn (a+b)/2;\n}", "function Divide(This, A, B) {\n\n evaluate(A);\n evaluate(B);\n if (act[A] === true && act[b] === true && val[b] !== 0) {\n val[This] = val[A] / val[B];\n act[This] = true;} else \n {\n act[This] = false;}\n\n return true;}", "function fractionate(val, minVal, maxVal) {\n return (val - minVal)/(maxVal - minVal);\n}", "function divide(a,b){\n return a / b\n}", "function divide(a, b) {\n int1 = a / b;\n return int1;\n}", "function div(a, b) {\n return ~~(a / b);\n}", "function linearScale (a1, b1, a2, b2) {\n return function (x1) {\n // in the interval [0, 1]\n var t = (x1 - a1) / (b1 - a1);\n // in the interval [a2, b2]\n return t * (b2 - a2) + a2;\n }\n}", "function calculateRatio(l1, l2) {\n\t\treturn l1 > l2 ? l1 / l2 : l2 / l1;\n\t}", "function shitty_averagizer(a, b) {\r\n return (a + b) / 2;\r\n }", "function division(num1, num2){\n return -1;\n }", "function division(a, b) {\n\treturn printResult(parseInt(a) / parseInt(b));\n}", "function euclidDistNorm(a,b) {\n var diff=(a.map((a,i) => (a/b[i])));\n diff=(diff.map((a,i) => (1-a)*(1-a)));\n return(Math.sqrt(diff.reduce((acc,v) => acc + v)));\n}", "function div(a, b, bitPrecision) {\n if (a == 0) {\n return 0;\n }\n if (a < b) {\n return 1 / _div(b, a, bitPrecision);\n }\n return _div(a, b, bitPrecision);\n}", "function abTest(a, b) {\n\tif (a < 0 || b < 0) {\n\t\treturn undefined;\n\t}\n\treturn Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 0));\n}", "function revDivided(v1,v2){\r\n //return v1/v2;\r\n console.log(v1/v2);\r\n }", "function divide(n1, n2) {\n return n1 / n2;\n }", "function goldenRatio(a, b) {\n var ratio = b / a;\n\n function getNewRatio(x, y) {\n var newRatio = x / y;\n returnRatio = 0;\n\n if ((newRatio > 1.61800) && (newRatio < 1.61806)) {\n returnRatio = newRatio;\n } else {\n getNewRatio((x + y), x);\n }\n return returnRatio;\n }\n\n if ((ratio > 1.61800) && (ratio < 1.61806)) {\n return ratio;\n } else {\n var goldenRatio = getNewRatio((a + b), b);\n return goldenRatio;\n }\n\n}", "function average(a, b) {\n return (a + b) / 2;\n}", "function divide_(x,y,q,r) {\n var kx, ky;\n var i,j,y1,y2,c,a,b;\n copy_(r,x);\n for (ky=y.length;y[ky-1]==0;ky--); //ky is number of elements in y, not including leading zeros\n\n //normalize: ensure the most significant element of y has its highest bit set \n b=y[ky-1];\n for (a=0; b; a++)\n b>>=1; \n a=bpe-a; //a is how many bits to shift so that the high order bit of y is leftmost in its array element\n leftShift_(y,a); //multiply both by 1<<a now, then divide both by that at the end\n leftShift_(r,a);\n\n //Rob Visser discovered a bug: the following line was originally just before the normalization.\n for (kx=r.length;r[kx-1]==0 && kx>ky;kx--); //kx is number of elements in normalized x, not including leading zeros\n\n copyInt_(q,0); // q=0\n while (!greaterShift(y,r,kx-ky)) { // while (leftShift_(y,kx-ky) <= r) {\n subShift_(r,y,kx-ky); // r=r-leftShift_(y,kx-ky)\n q[kx-ky]++; // q[kx-ky]++;\n } // }\n\n for (i=kx-1; i>=ky; i--) {\n if (r[i]==y[ky-1])\n q[i-ky]=mask;\n else\n q[i-ky]=Math.floor((r[i]*radix+r[i-1])/y[ky-1]);\n\n //The following for(;;) loop is equivalent to the commented while loop, \n //except that the uncommented version avoids overflow.\n //The commented loop comes from HAC, which assumes r[-1]==y[-1]==0\n // while (q[i-ky]*(y[ky-1]*radix+y[ky-2]) > r[i]*radix*radix+r[i-1]*radix+r[i-2])\n // q[i-ky]--; \n for (;;) {\n y2=(ky>1 ? y[ky-2] : 0)*q[i-ky];\n c=y2;\n y2=y2 & mask;\n c = (c - y2) / radix;\n y1=c+q[i-ky]*y[ky-1];\n c=y1;\n y1=y1 & mask;\n c = (c - y1) / radix;\n\n if (c==r[i] ? y1==r[i-1] ? y2>(i>1 ? r[i-2] : 0) : y1>r[i-1] : c>r[i]) \n q[i-ky]--;\n else\n break;\n }\n\n linCombShift_(r,y,-q[i-ky],i-ky); //r=r-q[i-ky]*leftShift_(y,i-ky)\n if (negative(r)) {\n addShift_(r,y,i-ky); //r=r+leftShift_(y,i-ky)\n q[i-ky]--;\n }\n }\n\n rightShift_(y,a); //undo the normalization step\n rightShift_(r,a); //undo the normalization step\n }", "function rangeMatch(X1, minX1, maxX1, minX2, maxX2) {\n return minX2 + ((X1 - minX1) / (maxX1 - minX1)) * (maxX2 - minX2)\n}", "function abTest(a, b) {\n if (a < 0 || b < 0) {\n return undefined;\n }\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function abTest(a, b) {\n if (a < 0 || b < 0) {\n return undefined;\n }\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function abTest(a, b) {\n if (a < 0 || b < 0) {\n return undefined;\n }\n\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function csquareintsbetween (a, b) {\n return Math.floor(Math.sqrt(b)) - Math.ceil(Math.sqrt(a)) + 1;\n}", "function dividieren(a,b) {\n if(b!=0){\n return a / b;\n } \n return \"Divison durch 0 nicht OK!\";\n}", "function abTest(a, b){\n if (a < 0 || b < 0){\n return undefined;\n }\n\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}", "function convertRange( value, r1, r2 ) {\n return ( value - r1[ 0 ] ) * ( r2[ 1 ] - r2[ 0 ] ) / ( r1[ 1 ] - r1[ 0 ] ) + r2[ 0 ];\n }", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "static remapRange(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n }", "function abTest(a,b){\n if (a < 0 || b < 0){\n return undefined\n }\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b),2))\n}", "function compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - _mathJs.halfPi - _mathJs.epsilon : _mathJs.halfPi - a[1]) - ((b = b.x)[0] < 0 ? b[1] - _mathJs.halfPi - _mathJs.epsilon : _mathJs.halfPi - b[1]);\n}", "function avr(a,b) {\n return (a+b)/2;\n \n}", "function map_range(value, low1, high1, low2, high2) {\r\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\r\n }", "function devideTwoNumbers(x,y){\n return x / y;\n}", "function bcdiv(left_operand, right_operand, scale) {\n var first, second, result;\n\n if (typeof(scale) == 'undefined') {\n scale = libbcmath.scale;\n }\n scale = ((scale < 0) ? 0 : scale);\n\n // create objects\n first = libbcmath.bc_init_num();\n second = libbcmath.bc_init_num();\n result = libbcmath.bc_init_num();\n\n first = libbcmath.php_str2num(left_operand.toString());\n second = libbcmath.php_str2num(right_operand.toString());\n\n // normalize arguments to same scale.\n if (first.n_scale > second.n_scale) second.setScale(first.n_scale);\n if (second.n_scale > first.n_scale) first.setScale(second.n_scale);\n\n\n result = libbcmath.bc_divide(first, second, scale);\n if (result === -1) {\n // error\n throw new Error(11, \"(BC) Division by zero\");\n }\n if (result.n_scale > scale) {\n result.n_scale = scale;\n }\n return result.toString();\n}", "function percentage(a,b){\n return (a/b)*100;\n}", "function avg(a, b) {\r\n c = ((a + b) / 2);\r\n return c;\r\n\r\n}", "function avg(a, b) {\n console.log((a + b) / 2);\n}", "function bnDivide(a) {\n var r = nbi();this.divRemTo(a, r, null);return r;\n }", "function bnDivide(a) {\n var r = nbi();this.divRemTo(a, r, null);return r;\n }", "function bnDivide(a) {\n var r = nbi();this.divRemTo(a, r, null);return r;\n }", "function sumOfNumsBetween(a, b) {\n return (b * b - a * a + b - a) / 2;\n}", "function abTest(a, b) {\n // Only change code below this line\n if (a < 0){\n return undefined;\n } else if (b < 0){\n return undefined;\n } \n // Only change code above this line\n return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));\n}" ]
[ "0.6556227", "0.6140319", "0.6107507", "0.6097738", "0.60297906", "0.5959053", "0.59564245", "0.5914174", "0.5869834", "0.5859574", "0.5777394", "0.5768386", "0.57455504", "0.5718051", "0.5714318", "0.5704635", "0.5701839", "0.5690303", "0.56748295", "0.5670914", "0.5670283", "0.56592184", "0.5649269", "0.5610257", "0.5589122", "0.55734015", "0.5571114", "0.55605364", "0.55587626", "0.55499405", "0.55234", "0.552115", "0.55118483", "0.54924935", "0.5487931", "0.5480206", "0.5452431", "0.5446833", "0.5446833", "0.5446833", "0.5446833", "0.5446833", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5439156", "0.5430712", "0.5420088", "0.5413709", "0.54085493", "0.5403092", "0.5402116", "0.54013395", "0.5395657", "0.5383569", "0.5383128", "0.53806716", "0.53806716", "0.53806716", "0.5366134", "0.53628564" ]
0.6592287
0
it is not clear what it means to divide by an interval that spans zero. Modify the program to check for this condition and to signal an error if it occurs.
function log(x) { return console.log(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function divide (dividend, divisor) {\r\n// -------------------- Your Code Here --------------------\r\nif (divisor === 0) {\r\n console.log(\"Divide by 0 ERROR\");\r\n}\r\n\r\n\r\n\r\n\r\n// --------------------- End Code Area --------------------\r\n}", "function caml_raise_zero_divide () {\n caml_raise_constant(caml_global_data[6]);\n}", "divideByZeroHandler(dividend, divider) {\n if (parseInt(dividend, 10) === 0 && parseInt(divider, 10) === 0) {\n this.isResultUndefined = true;\n console.log(\"Result is not defined\");\n } else if (divider === \"\") {\n this.lastValue = \"1\";\n }\n }", "function dividePositiveZero(input) {\n return input / 0;\n}", "function dividieren(a,b) {\n if(b!=0){\n return a / b;\n } \n return \"Divison durch 0 nicht OK!\";\n}", "function divide(numerator, denominator) {\n let result = numerator / denominator;\n if (numerator || denominator === 0) {\n throw Error(\"Attempted to divide by zero.\");\n }\n return result;\n}", "function divide(numerator, denominator) {\n if (denominator === 0) {\n if (numerator === 0) {\n return 0;\n } else {\n return 99999999;\n }\n } else {\n return numerator / denominator;\n }\n}", "function divide(num1, num2) {\n if (num2 === 0) {\n console.log(\"Division by zero is not allowed!\");\n return null\n } else {\n return num1 / num2;\n }\n}", "function dividieren(a,b) {\r\n if (b!=0) \r\n {\r\n return a/b;\r\n } \r\n return \"Dividieren durch 0 nicht möglich!\";\r\n}", "function checkDivision(beginRange, endRange) {\n if ((endRange > beginRange) && (endRange > 0 && endRange <= 100) && (Number.isInteger(beginRange)) && (Number.isInteger(endRange))) {\n for (let i = beginRange; endRange >= beginRange; beginRange++)\n if (!(beginRange % 2) && (beginRange % 10 !== 0)) {\n console.log(`${beginRange} is even`)\n } else if (beginRange % 3 === 0 ) {\n console.log(`${beginRange} apply to 3`)\n } else if (beginRange % 10 === 0) {\n console.log(`${beginRange} is divisible by 10`)\n }\n } else {\n return 'wrong input'\n }\n}", "function division(num1, num2){\n return -1;\n }", "function checkDivisibility(divider, divisor) {\n if (!divider || !divisor) {\n return 'Please input a valid number not equal to zero ';\n }\n if (divider % divisor === 0) {\n return 'It is divideable';\n } else {\n return 'It is not divideable';\n }\n \n}", "function div(x, y) {\n if (y === 0) {\n throw division_by_zero;\n } else {\n return x / y | 0;\n }\n }", "function dividieren(a,b) {\r\n if (b==0) { //wenn b = 0 - dann Fehlermeldung\r\n return \"Dividieren durch 0 nicht möglich!\";\r\n }\r\n else {\r\n return a / b;\r\n } \r\n}", "function sakuraFall(v) {\n if(v <= 0){\n return 0;\n }\n else {\n return 400 / v;\n }\n}", "function ex_3_I(x) {\n var sum = 0;\n for (i = 0; i < x.length; i++) {\n if (x[i] >= 0) {\n sum = sum + x[i];\n } \n else {\n return sum;\n }\n }\n return sum/x.length;\n}", "function divitionIsInfinity(num) {\r\n if (num === 0) return true;\r\n}", "function validateInitialFractions(fractions){\n\tvar f = fractions;\n\tvar length = f.length;\n\tvar fractionSign = /((\\d*)\\/(\\d*))/g;\n\tvar intRegex = /^\\d+$/;\n\tfor(var i = 0; i < length; i++){\n\t\tconsole.log(i, f[i]);\n\t\tvar member = $.trim(f[i]);\n\t\tif ( !member.match(fractionSign)) {\n\t\t\treturn false;\n\t\t} else if(divisionByZero(member)){\n\t\t\tthrow new Error(\"Division by zero: \" + member);\n\t\t}\n\t}\n\treturn true;\n }", "function Divide(number, number2) {\n if (number2 === 0) {\n return console.log(\"Not possible\");\n } else {\n var result = number / number2;\n return console.log(result);\n }\n}", "function letsDivide() {\n if (solution1 == 0) {\n solution1 = Number(numberBucket);\n numberBucket = \"\";\n } else {\n operate();\n second2 = \"\";\n }\n chosenOperator = \"dividor\";\n setColor();\n}", "function DivisionByZero(msg){\n this.message = msg || \"\";\n }", "function divide(a, b) {\n\n if ( isNaN(parseInt(a)) || isNaN(parseInt(b)) || b == 0 )\n // lazy error\n throw 'beep boop. does not compute';\n\n return 'quotient: ' + Math.floor(a/b) + ' remainder: ' + a % b;\n}", "function divide(a, b) {\n\t\ta = a + 0.0;\n\t\tb = b + 0.0;\n\t\tif(Math.abs(b) < 0.00001) {\n\t\t\tb = 0.0001;\n\t\t}\t\n\t\treturn a / b;\n\t}", "fractionate(val, minVal, maxVal) {\n return (val - minVal) / (maxVal - minVal);\n }", "static divideTo(vec, value, out) {\n if (value !== 0) {\n out.v[0] = vec.v[0] / value;\n out.v[1] = vec.v[1] / value;\n out.v[2] = vec.v[2] / value;\n }\n else {\n console.error(\"0 division occurred!\");\n out.v[0] = Infinity;\n out.v[1] = Infinity;\n out.v[2] = Infinity;\n }\n return out;\n }", "function verifyFrac(test00)\n {\n \n if (/^(\\d{1,10}[.,]\\d{1,5})$/.test(test00) && !/^(\\d{1,10}[.,][0])$/.test(test00)\n && !/^(\\d{1,10}[.,][0][0])$/.test(test00) && !/^(\\d{1,10}[.,][0][0][0])$/.test(test00) \n && !/^(\\d{1,10}[.,][0][0][0][0])$/.test(test00) && !/^(\\d{1,10}[.,][0][0][0][0][0])$/.test(test00))\n {\n var msg0 = \"It's a fraction!\";\n \n message(msg0);\n return msg0; \n \n }\n else {\n var msg0 = \"It's not a fraction!\";\n \n message(msg0);\n return msg0;\n \n }\n\n }", "function divide(a, b) {\r\n // if (b === 0) {\r\n // throw 'Division by zero is undefined: ' + a + '/' + b;\r\n // }\r\n var sign = 1;\r\n if (a < 0) {\r\n a = -a;\r\n sign = -sign;\r\n }\r\n if (b < 0) {\r\n b = -b;\r\n sign = -sign;\r\n }\r\n var result = 0;\r\n while (a >= 0) {\r\n a -= b;\r\n result++;\r\n }\r\n return (result - 1) * sign;\r\n }", "static _divide(vec, value, type) {\n let x;\n let y;\n if (value !== 0) {\n x = vec.v[0] / value;\n y = vec.v[1] / value;\n }\n else {\n console.error(\"0 division occurred!\");\n x = Infinity;\n y = Infinity;\n }\n return new this(x, y, { type });\n }", "static divideTo(vec, value, out) {\n if (value !== 0) {\n out.v[0] = vec.v[0] / value;\n out.v[1] = vec.v[1] / value;\n out.v[2] = vec.v[2] / value;\n out.v[3] = vec.v[3] / value;\n }\n else {\n console.error(\"0 division occurred!\");\n out.v[0] = Infinity;\n out.v[1] = Infinity;\n out.v[2] = Infinity;\n out.v[3] = Infinity;\n }\n return out;\n }", "static divideTo(vec, value, out) {\n if (value !== 0) {\n out.v[0] = vec.v[0] / value;\n out.v[1] = vec.v[1] / value;\n }\n else {\n console.error(\"0 division occurred!\");\n out.v[0] = Infinity;\n out.v[1] = Infinity;\n }\n return out;\n }", "function divide() \n {\n \n var\tfnumber= parseInt(document.getElementById('firstoperand').value);\n var\tsnumber= parseInt(document.getElementById('secondoperand').value);\n var output=fnumber/snumber;\n if(!isNaN(output))\n {\n document.getElementById(\"result\").innerHTML = output;\n }\n else\n {\n alert(\"Please enter valid number in input\")\n }\n \n }", "function divideNumber() {\n var x = document.form1.firstInputValue.value;\n var y = document.form1.secondInputValue.value;\n validationForm();\n var divideNumber = 0;\n divideNumber = Number(x) / Number(y);\n if (isNaN(divideNumber)) {\n return 0;\n }\n return document.getElementById('result').value = divideNumber;\n}", "function divide1(a, b) {\n return a / b; \n}", "_verifyStep() {\n const divisor = (this.props.max - this.props.min) / this.props.step;\n if (divisor % 1 !== 0) {\n throw new Error(`Given step ( ${this.props.step} ) must be \\\n a divisor of max ( ${this.props.max} )`);\n }\n }", "function divide(a, b) {\n return null;\n}", "function problemThree(input) {\n\n//validating input\n if (input < 2 || isNaN(input)) {\n console.log(\"Please enter a number greater than 1\");\n }\n else {\n\n//Iteratively divides the input by the denominator if it divides \n//evenly; increments up the denominator if not.\n\n for (var denominator = 2; input >= denominator; denominator++) { \n while (input % denominator === 0) {\n \t\t input /= denominator;\n\t\t }\n\t }\n console.log(denominator-1);\n }\n}", "function zeroIfNanOrNull(numerator, denominator) {\n var result = numerator / denominator;\n return (isNaN(result) || (result === null)) ? 0 : result;\n }", "function safe_div(a, b) {\n if (b === 0) {\n return 0\n }\n\n if (a === -2147483648 && b === -1) {\n return 0\n }\n\n return Math.floor(a / b)\n}", "function div() {\r\n const y = this.stack.pop();\r\n \r\n if (y === 0) throw \"Division by zero error.\";\r\n\r\n const x = this.stack.pop();\r\n this.stack.push(x / y);\r\n}", "function fractionate(val, minVal, maxVal) {\n return (val - minVal)/(maxVal - minVal);\n}", "function div()\r\n{\r\n if(form.display.value==0)\r\n {\r\n form.display.value=\"Cannot divide by zero\";\r\n }\r\n\r\n else if(form.display.value==\".\" ||form.display.value==\"-\"||form.display.value==\"+\"||form.display.value==\"*\"||form.display.value==\"/\")\r\n {\r\n form.display.value=\"Invalid Expression\";\r\n }\r\n else\r\n {\r\n form.display.value=1/form.display.value;\r\n }\r\n}", "getSquareRoot(num)//takes userinput\n{\n try {\n var format = /[0-9]/;\n if (format.test(num)) {\n /*\n *initialize t with the given non-negative number\n */\n var t = num;\n var epsilon = 1e-15;\n /*\n *repeat until Math.abs(t- num/t)> epsilon*t\n */\n while (Math.abs(t - num / t) > epsilon * t) {\n /*\n *replacing t with average of num/t and t\n */\n t = (num / t + t) / 2;\n }\n console.log(\"Square root of \" + num + \" is \" + t);\n }\n else {\n console.log(\"enter only numbers\");\n\n }\n\n }\n catch (error) {\n console.log(error.message);\n\n }\n}", "function divorial(num){\n var i = num\n var num = num - 1\n while(num > 0){ \n var i = i / num\n num = num - 1\n }\n console.log(i)\n}", "function division(a, b) {\r\n\treturn a / b;\r\n}", "function divide(i,j){\n if (i==0) return \"NaN\";\n return i/j;\n}", "function dividetest(v1, v2, expected) {\n results.total++;\n var r = calculator.division(v1, v2);\n if (r !== expected) {\n results.bad++;\n console.log(\"Expected \" + expected +\n \", but was \" + r);\n }\n }", "function Divide(This, A, B) {\n\n evaluate(A);\n evaluate(B);\n if (act[A] === true && act[b] === true && val[b] !== 0) {\n val[This] = val[A] / val[B];\n act[This] = true;} else \n {\n act[This] = false;}\n\n return true;}", "function division() {\n //Declaration de la variable number1 qui contient la valeur du premier champ\n let number1 = document.getElementById('number1').value;\n //Declaration de la variable number2 qui contient la valeur du deuxieme champ\n let number2 = document.getElementById('number2').value;\n //Condition : si number1 ou number n'est pas un nombre alors... \n if (isNaN(number1) || isNaN(number2)) {\n //... on affiche un message d'erreur\n alert('Vous devez entrer un nombre !');\n }\n // Sinon...\n else {\n //Si la valeur du deuxieme nombre est egale a 0 alors...\n if (number2 == 0) {\n //... on affiche un message d'erreur\n alert('ERREUR Division impossible par 0');\n }\n //Sinon...\n else {\n //.. on calcule le reste de la dfivision\n let result = number1 % number2;\n // On affiche le resultat\n alert(`Le reste de la division \\n${number1} / ${number2} \\n est = ${result} `);\n }\n }\n\n}", "function calculateResult(a) {\n\t\n\tvar totalNums = a.length;\n\tvar positiveNums = 0;\n\tvar negativeNums = 0;\n\tvar nullNums = 0;\n\t\n\tfor(var i=0; i< totalNums; i++) {\n\t\tvar num = parseInt(a[i]);\n\t\tif(num == 0) {\n\t\t\tnullNums++;\n\t\t} else if(num > 0) {\n\t\t\tpositiveNums++;\n\t\t} else {\n\t\t\tnegativeNums++;\n\t\t}\n\t}\n\tconsole.log(calcFraction(positiveNums, totalNums));\n\tconsole.log(calcFraction(negativeNums, totalNums));\n\tconsole.log(calcFraction(nullNums, totalNums));\n}", "function greedy(num, den) {\n /*\n if (num >= den) {\n console.log(\"This is not a proper fraction, please choose a numerator smaller than the denominator\");\n return false;\n }\n if (num < 0 || den < 0) {\n console.log(\"Please use positive integers for both the numerators and denominators\");\n return false;\n }\n */\n if (num === 0) {\n console.log(\" \");\n return 0;\n } else { //always possible when numerator is not 0\n //only integer values w/o division and w/o math lib funcs\n //int division func + remainder func\n const unit_fraction_den = Math.ceil(den/num); //func for int div or directly here\n // next step of greedy is not necessarily the next unit fraction,\n // but the next step for int div\n console.log(unit_fraction_den); //just output result\n //fractions explanation\n greedy(num * unit_fraction_den - den, den * unit_fraction_den);\n }\n}", "function main() {\n var n = parseInt(readLine());\n arr = readLine().split(' ');\n arr = arr.map(Number);\n var b = 0;\n var z = 0;\n var l = 0;\n for (var i = arr.length - 1; i >= 0; i--) {\n \tif(arr[i] > 0){\n \t\tb++;\n \t} else if (arr[i] <0) {\n \t\tl++;\n \t} else{\n \t\tz++;\n \t}\n }\n var lr = l/arr.length;\n var zr = z/arr.length;\n var br = b/arr.length;\n\n console.log(br);\n console.log(lr);\n console.log(zr);\n}", "function isAroundZero(val){return val > -EPSILON && val < EPSILON;}", "function testFrac()\n {\n var test00 = testO.value;\n verifyFrac(test00);\n }", "function begin () {\r\n countSec = 20\r\n if (isNaN(countSec)) alert('NaN')\r\n count()\r\n }", "function isZero (f) {\n return Math.abs(f) < epsilon;\n }", "function testBadCall()\n{\n assert( 1 / 0);\n}", "function sakuraFall(v) {\n const s = 80 * 5;\n if (+v <= 0) return 0;\n return s / +v;\n}", "function checker () {\n d = document.getElementById('input').value\n d = parseInt(d)\n if (d <= 0) {\n alert('error:the inputed diameter must be above 0')\n }\n if (d > 0) {\n calculate()\n }\n}", "function diviser(n1,n2){\n if(n2 != 0){\n ajouterHistorique(n1 + ' ÷ ' + n2);\n return n1 / n2;\n }else{\n return '∞';\n }\n}", "static divideVectorTo(l_vec, r_vec, out) {\n if (r_vec.v[0] !== 0 && r_vec.v[1] !== 0) {\n out.v[0] = l_vec.v[0] / r_vec.v[0];\n out.v[1] = l_vec.v[1] / r_vec.v[1];\n }\n else {\n console.error(\"0 division occurred!\");\n out.v[0] = r_vec.v[0] === 0 ? Infinity : l_vec.v[0] / r_vec.v[0];\n out.v[1] = r_vec.v[1] === 0 ? Infinity : l_vec.v[1] / r_vec.v[1];\n }\n return out;\n }", "function isAroundZero(val) {\n\t return val > -EPSILON && val < EPSILON;\n\t}", "function contfrac(x, epsilon) {\n let i = Math.floor(x);\n let a = [i];\n x = x - i;\n let maxerr = x;\n while (maxerr > epsilon) {\n x = 1 / x;\n i = Math.floor(x);\n a.push(i);\n x = x - i;\n maxerr = x * maxerr / i;\n }\n//printuneval(a));\n return a.reduceRight(function (x, y) {return [x[0] * y + x[1], x[0]];}, [1, 0]);\n }", "function not_Anumber () {\n document.getElementById(\"Not\").innerHTML = 0/0;\n}", "function es_divisor(dividendo, divisor) {\n return dividendo % divisor == 0\n}", "function sc_div(x) {\n if (arguments.length === 1)\n\treturn 1/x;\n else {\n\tvar res = x;\n\tfor (var i = 1; i < arguments.length; i++)\n\t res /= arguments[i];\n\treturn res;\n }\n}", "function divide(a,b) {\n\treturn a / b\n}", "function divide(dividend, divisor) {\n let sign = 1;\n if ((dividend > 0 && divisor < 0) || (dividend < 0 && divisor > 0)) {\n sign = -1;\n }\n\n dividend = Math.abs(dividend);\n divisor = Math.abs(divisor);\n\n if (divisor === 1)\n return sign === 1\n ? Math.min(dividend, Math.pow(2, 31) - 1)\n : Math.max(-dividend, -Math.pow(2, 31));\n\n let counter = 0;\n while (dividend >= divisor) {\n counter++;\n dividend -= divisor;\n }\n\n return sign === 1\n ? Math.min(counter, Math.pow(2, 31) - 1)\n : Math.max(-counter, -Math.pow(2, 31));\n}", "function plusMinus(arr) {\n // Write your code here\n let length = arr.length\n let positiveCount = 0\n let negativeCount = 0\n let zeroCount = 0\n \n for(let i =0; i < length; i++){\n if (arr[i] > 0){\n positiveCount ++\n }\n else if (arr[i] < 0){\n negativeCount ++\n }\n else if (arr[i] == 0){\n zeroCount ++\n }\n }\nlet negRatio = (positiveCount/length)\nlet posRatio = (negativeCount/length)\nlet zeroRatio = (zeroCount/length)\n\nconsole.log(negRatio.toFixed(6))\nconsole.log(posRatio.toFixed(6))\nconsole.log(zeroRatio.toFixed(6))\n}", "static divideVectorTo(l_vec, r_vec, out) {\n if (r_vec.v[0] !== 0 && r_vec.v[1] !== 0 && r_vec.v[2] !== 0) {\n out.v[0] = l_vec.v[0] / r_vec.v[0];\n out.v[1] = l_vec.v[1] / r_vec.v[1];\n out.v[2] = l_vec.v[2] / r_vec.v[2];\n }\n else {\n console.error(\"0 division occurred!\");\n out.v[0] = r_vec.v[0] === 0 ? Infinity : l_vec.v[0] / r_vec.v[0];\n out.v[1] = r_vec.v[1] === 0 ? Infinity : l_vec.v[1] / r_vec.v[1];\n out.v[2] = r_vec.v[2] === 0 ? Infinity : l_vec.v[2] / r_vec.v[2];\n }\n return out;\n }", "static divideVectorTo(l_vec, r_vec, out) {\n if (r_vec.v[0] !== 0 && r_vec.v[1] !== 0 && r_vec.v[2] !== 0 && r_vec.v[3] !== 0) {\n out.v[0] = l_vec.v[0] / r_vec.v[0];\n out.v[1] = l_vec.v[1] / r_vec.v[1];\n out.v[2] = l_vec.v[2] / r_vec.v[2];\n out.v[3] = l_vec.v[3] / r_vec.v[3];\n }\n else {\n console.error(\"0 division occurred!\");\n out.v[0] = r_vec.v[0] === 0 ? Infinity : l_vec.v[0] / r_vec.v[0];\n out.v[1] = r_vec.v[1] === 0 ? Infinity : l_vec.v[1] / r_vec.v[1];\n out.v[2] = r_vec.v[2] === 0 ? Infinity : l_vec.v[2] / r_vec.v[2];\n out.v[3] = r_vec.v[3] === 0 ? Infinity : l_vec.v[3] / r_vec.v[3];\n }\n return out;\n }", "function divide(a,b){\n return a / b\n}", "function inputCheck(){ \n var test = document.getElementById(\"input\").value;\n test = test/1; // test would equal NaN if invalid number.\n\n // testing for NaN in JavaScript.\n // https://stackoverflow.com/questions/30314447/how-do-you-test-for-nan-in-javascript\n if( test !== test){\t\n \tlocation.reload(true);\t\n } else {\n \tstartCount(); \n }\n}", "function division_Function(a, b) { //Function returns a divided by b\n return a / b;\n}", "function calculateMissingValue(m){\n\n if (m.pv === undefined || m.pv == 0) {\n \n //Formula: \n m.pv = ((m.n * m.pmt) - m.fv)*(1 / Math.pow((1 + (m.i / 100)), m.n)); \n document.getElementById(\"displayO1pv\").innerHTML = `${m.pv}`;\n }\n else if (m.i === undefined || m.i == 0) { \n alert(\"i is undefined\");\n }\n else if (m.n === undefined || m.n == 0) {\n alert(\"n is undefined\");\n }\n else if (m.fv === undefined || m.fv == 0) {\n alert(\"fv is undefined\");\n }\n else if (m.pmt === undefined || m.pmt == 0) {\n alert(\"pmt is undefined\");\n }\n else{\n alert(\"Blowthrough error. Trace number 239fg9wfh032hf03.\");\n }\n}", "function divise(nbr1, nbr2){\n\t\tif(nbr2 == 0){\n\t\t\tresultat = \"math error !\"\n\t\t}else{\n\t\t\tresultat = nbr1 / nbr2;\n\t\t}\n\n\t}", "function validateNumber(value) {\n if (value % 1 === 0 && value > 0) {\n return true;\n } else {\n console.log(\" **** Please enter a whole number above zero. ****\");\n }\n}", "function main(input) {\nvar temp = input;\nif (temp <= 0) {\nconsole.log(\"Freezing Weather!\");\n}\n}", "function divide(a, b) {\n console.log(a/b);\n}", "sqrt(value)\n { var t=value;\n \n while(Math.abs(t-value/t)>Number.EPSILON*t)//condition for the step by step process of acalculting the loop.\n {\n t=((value/t)+t)/2;\n }\n \n console.log(\"THe approx root of the value is: \"+t);\n }", "function isAroundZero(val) {\n return val > -EPSILON && val < EPSILON;\n }", "function isAroundZero(val) {\n return val > -EPSILON && val < EPSILON;\n }", "function Infinity() {}", "function problem12(){\n let dividers = 2;\n let sum = 0;\n let x = 1;\n do{\n dividers = 2;\n sum = (x+1)*(x/2);\n let numRoot = (Math.floor(Math.sqrt(sum)));\n for(let y = 2; y <= numRoot; y++){\n if(sum % y === 0){\n dividers+=2;\n }\n }\n x++;\n } while(dividers<500);\n return sum;\n}", "function divInterval(x, y) {\n return mulInterval(x, makeInterval(1.0 / upperBound(y), 1.0 / upperBound(y)));\n}", "function testRemainder_17() {\n assertEquals(-0, -0 % Number.MAX_VALUE);\n}", "function IntDiv(nominator, denominator)\n{\n\t return Math.floor(nominator/denominator);\n}", "function divValues(firstValue, secondValue) {\n\t\tvar result = 0; \n\t\tresult = firstValue / secondValue;\n\t\treturn result;\n\t}", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function i(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}", "function divideNumbers() {\r\n const result = document.getElementById(\"addResult\");\r\n\r\n // Calculating Multiplication\r\n const divideResult = num1.value / num2.value;\r\n\r\n if (isFinite(divideResult)) {\r\n result.value = divideResult;\r\n // Hide results\r\n document.getElementById(\"result\").style.display = \"block\";\r\n\r\n // Show LOader\r\n document.getElementById(\"loading\").style.display = \"none\";\r\n } else {\r\n showError(\"Please check your Numbers..\");\r\n }\r\n}", "function valueRange(){\n try {\n//Pega valor de segurança do input range \n vrange = document.getElementById('iRange').value;//pega valor do input range\n//Se valor igual \"0\" range fica off\n if(vrange == 0){var segrang = 'Off';}else{var segrang = vrange+' mt';}\n document.getElementById('vrange').innerHTML = segrang;//Imprime valor\n seguro();\n }catch(e){\n console.error('Range: '+ e);\n }\n}", "function divide(num1, num2) {\r\n return num1 / num2;\r\n}", "function checkNotZero(figure) {\n if (figure !== 0){\n return true;\n }else {return false;}\n }", "function divi() {\r\n return 6 / 7\r\n}", "harmonicNumber(number) //Function harmonic\n{\n if(isNaN(number) || (number<=0 )) // check number is greater then zero\n {\n return \" Sorry!. Input Should be a number and should be greater then zero.\"\n }\n else\n {\n var sum = 0; // Intialing variable \n for( let i = 1; i<=number ; i++)\n {\n sum = sum + (1/i); // adding values and assigning into the variable \n }\n return \"The \"+number+\"th Harmonic value is \"+sum;\n }\n}", "function divide(num1, num2) {\n return num1 / num2;\n }", "function Div(call, callback) {\n var divisor = call.request.divisor;\n var dividend = call.request.dividend;\n if (divisor == 0) {\n callback({\n code: grpc.status.INVALID_ARGUMENT,\n details: 'Cannot divide by zero'\n });\n } else {\n setTimeout(function () {\n callback(null, {\n quotient: Math.floor(dividend / divisor),\n remainder: dividend % divisor\n });\n }, 1); // 1 millisecond, to make sure 1 microsecond timeout from test\n // will hit. TODO: Consider fixing this.\n }\n}", "function BASE_raised_EXP(base, exp) //this function not used at all; kept here for possible future use...\n{\n // for (var j = 1; j <= exp; j++)\n origexp = exp;\n if(exp < 0)\n {\n exp = exp * -1;\n }\n var z = 1;\n for (var k = 1; k <= exp ; k++)\n {\n //alert(\"begin\" + z);\n z = z * base;\n //alert(\"end\" + z);\n }\n //\n if(origexp >=0)\n {\n alert(\"answer = \" + z);\n }\n else\n {\n alert(\"answer = \" + (1/z));\n }\n}", "function divide(num, den) {\n return num / den;\n}", "function divide(numer, denom) {\n return numer / denom;\n}" ]
[ "0.7107541", "0.6943888", "0.66407484", "0.66097045", "0.62188107", "0.6172213", "0.6009928", "0.596499", "0.5939883", "0.58870673", "0.5883719", "0.5857439", "0.581766", "0.57899725", "0.5774233", "0.5692952", "0.5684881", "0.5644853", "0.56400067", "0.5629245", "0.56149054", "0.56010544", "0.5585648", "0.5569872", "0.55689985", "0.55509496", "0.55478144", "0.5545938", "0.5542001", "0.55404127", "0.5535717", "0.55335283", "0.54889894", "0.54853296", "0.5444469", "0.54007035", "0.53898126", "0.53797334", "0.5352572", "0.53491825", "0.53488743", "0.5348215", "0.53448516", "0.5337077", "0.5327391", "0.5325572", "0.532543", "0.52862144", "0.52810866", "0.52788645", "0.5266278", "0.5262404", "0.52620274", "0.5245243", "0.5227322", "0.522721", "0.5200344", "0.517439", "0.5153195", "0.51516265", "0.512685", "0.51236343", "0.51182836", "0.51170325", "0.51051366", "0.5102047", "0.509325", "0.50822765", "0.5081125", "0.5080005", "0.50771487", "0.5075763", "0.5070463", "0.506991", "0.50643945", "0.50641465", "0.5058342", "0.50534815", "0.5036306", "0.50311595", "0.50311595", "0.5029388", "0.5020617", "0.50187004", "0.5015201", "0.50067514", "0.5002418", "0.49988577", "0.49988577", "0.49988577", "0.4996582", "0.49921742", "0.49898285", "0.49887046", "0.49866244", "0.4982395", "0.49744675", "0.49713892", "0.49665686", "0.4955917", "0.4938594" ]
0.0
-1
Define a constructor make_center_percent that takes a center and a percentage tolerance and produces the desired interval. You must also define a selector percent that produces the percentage tolerance for a given interval. The center selector is the same as the one shown above.
function makeCenterPercent(center, percent, width = center * (percent / 100)) { return makeCenterWidth(center, width); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCubicBezierXYatPercent(startPt,controlPt1,controlPt2,endPt,percent){\n var x=CubicN(percent,startPt.x,controlPt1.x,controlPt2.x,endPt.x);\n var y=CubicN(percent,startPt.y,controlPt1.y,controlPt2.y,endPt.y);\n return({x:x,y:y});\n }", "percent(val) {\n this._percent = val;\n return this;\n }", "function percent(value) {\n return new Percent(value);\n}", "function calcPercent(target, total){ //Declare and define function\n return target / total * 100; //Code to be calculated and returned when the function is called\n}", "static interpolate(start, end, percent) {\n return (end - start) * percent + start;\n }", "function produceTipCalculator(percent) {\n return function(fare) {\n return percent * fare;\n };\n}", "function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = (location * 100) / baseSize();\n\n // Clamp proposal between 0% and 100%\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n // are used (e.g. contained handles feature)\n proposal = limit(proposal);\n\n return options.dir ? 100 - proposal : proposal;\n }", "function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = (location * 100) / baseSize();\n\n // Clamp proposal between 0% and 100%\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n // are used (e.g. contained handles feature)\n proposal = limit(proposal);\n\n return options.dir ? 100 - proposal : proposal;\n }", "function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = (location * 100) / baseSize();\n\n // Clamp proposal between 0% and 100%\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n // are used (e.g. contained handles feature)\n proposal = limit(proposal);\n\n return options.dir ? 100 - proposal : proposal;\n }", "function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = (location * 100) / baseSize();\n\n // Clamp proposal between 0% and 100%\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n // are used (e.g. contained handles feature)\n proposal = limit(proposal);\n\n return options.dir ? 100 - proposal : proposal;\n }", "function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = (location * 100) / baseSize();\n // Clamp proposal between 0% and 100%\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n // are used (e.g. contained handles feature)\n proposal = limit(proposal);\n return options.dir ? 100 - proposal : proposal;\n }", "function Range(percent) {\n\tthis.percent = percent;\n\tthis.pocketPairs = this.getPreFlopRange(this.percent);\n\tthis.cards = [];\n\tthis.MONTE_CARLO_COUNT = 100;\n\tthis.CONFIDENCE = 0.2;\n}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\n\t\t// Clamp proposal between 0% and 100%\n\t\t// Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n\t\t// are used (e.g. contained handles feature)\n\t\tproposal = limit(proposal);\n\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\n\t\t// Clamp proposal between 0% and 100%\n\t\t// Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n\t\t// are used (e.g. contained handles feature)\n\t\tproposal = limit(proposal);\n\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\n\t\t// Clamp proposal between 0% and 100%\n\t\t// Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n\t\t// are used (e.g. contained handles feature)\n\t\tproposal = limit(proposal);\n\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function setProgress(calcper, Maxvalue, type) {\n percent = (calcper / Maxvalue) *100\n if(percent > 100) percent = 100;\n if(percent < 0) percent = 0;\n if (0 < percent && percent < 10)\n {percent = 10 };\n if (10 < percent && percent < 20)\n {percent = 20};\n if (20 < percent && percent < 30)\n {percent = 30};\n if (30 < percent && percent < 40)\n {percent = 40};\n if (40 < percent && percent < 50)\n {percent = 50};\n if (50 < percent && percent < 60)\n {percent = 60};\n if (60 < percent && percent < 70)\n {percent = 70};\n if (70 < percent && percent < 80)\n {percent = 80};\n if (80 < percent && percent < 90)\n {percent = 90};\n if (90 < percent && percent < 100)\n {percent = 100};\n\n type(percent);\n }", "function parsePercent$1(percent, all) {\n\t switch (percent) {\n\t case 'center':\n\t case 'middle':\n\t percent = '50%';\n\t break;\n\t\n\t case 'left':\n\t case 'top':\n\t percent = '0%';\n\t break;\n\t\n\t case 'right':\n\t case 'bottom':\n\t percent = '100%';\n\t break;\n\t }\n\t\n\t if (typeof percent === 'string') {\n\t if (_trim(percent).match(/%$/)) {\n\t return parseFloat(percent) / 100 * all;\n\t }\n\t\n\t return parseFloat(percent);\n\t }\n\t\n\t return percent == null ? NaN : +percent;\n\t }", "function calcPointToPercentage ( calcPoint ) {\r\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\r\n\t\tvar proposal = ( location * 100 ) / baseSize();\r\n\t\treturn options.dir ? 100 - proposal : proposal;\r\n\t}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function calcPointToPercentage ( calcPoint ) {\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\n\t\tvar proposal = ( location * 100 ) / baseSize();\n\t\treturn options.dir ? 100 - proposal : proposal;\n\t}", "function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = (location * 100) / baseSize();\n return options.dir ? 100 - proposal : proposal;\n }", "function percentOf(val, percent) {\r\n return (val * percent) / 100;\r\n}", "setProgress(percent) {\n const offset = this.circumference - percent / 100 * this.circumference;\n\n let circle = this.container.querySelector('.radialcircle');\n circle.style.strokeDasharray = `${this.circumference} ${this.circumference}`;\n circle.style.strokeDashoffset = offset;\n\n if (this.segments) {\n\n let tickwidth = this.segments * 2;\n\n let seglength = (((this.radius * 2) * Math.PI) - tickwidth) / (this.segments);\n\n let tickmarks = this.container.querySelector('.tickmarks');\n tickmarks.style.strokeDasharray = `2px ${seglength}px`;\n tickmarks.style.strokeDashoffset = 0;\n\n }\n }", "static interpolateDelta(start, end, percent) {\n return (end - start) * percent;\n }", "function percentage() {\n return percent;\n}", "function circlePointsFromPercent(percent) {\n var x = Math.cos(2 * Math.PI * percent);\n var y = Math.sin(2 * Math.PI * percent);\n\n return [x, y];\n}", "function xValFromPct(percent) {\n return percent * canvas.width / 100;\n}", "set center(value) {}", "function update_center() {\n var targets = new Array(Centers.length);\n for (var c = 0; c < Centers.length; c++) {\n var X = 0;\n var Y = 0;\n var count = 0;\n for (var p = 0; p < Points.length; p++) {\n if (Points[p].group == Centers[c].group) {\n X += Points[p].x;\n Y += Points[p].y;\n count += 1;\n }\n }\n targets[c] = new Point(X/count, Y/count);\n }\n\n move_center_animation(targets);\n}", "function percentil(percent, collection) {\n var result = {};\n // First for selectorsInRule\n // Sort first to calculate median\n var selectorsInRuleCount = _.map(collection.rules, function(rule) {\n return rule.partIndices.length;\n });\n var partsInSelectorCount = _.pluck(collection.parts, 'count');\n\n var sortedCollections = [];\n sortedCollections.push({ \n name: \"selectorsInRule\",\n value: selectorsInRuleCount.sort(comparators.ascending)\n });\n sortedCollections.push({\n name: \"partsInSelector\",\n value: partsInSelectorCount.sort(comparators.ascending)\n });\n\n for (var i = 0; i < sortedCollections.length; ++i) {\n var currentCollection = sortedCollections[i].value;\n var currentName = sortedCollections[i].name;\n var point = currentCollection.length * percent;\n var currentResult;\n if ((point % 1) === 0) {\n currentResult = (currentCollection[point - 1] + currentCollection[point]) / 2;\n } else {\n // Exact match, so just return this value\n point = Math.floor(point);\n currentResult = currentCollection[point];\n }\n result[currentName] = currentResult;\n }\n return result;\n }", "constructor (center, radius) {\n if (!(center instanceof Point)) throw new Error('center is not instance of class Point')\n this.center = center\n this.radius = radius\n }", "function center(iv: Interval) {\n return Math.floor((iv.stop + iv.start) / 2);\n }", "calPercentage(totalIn){\n //Because we cannot divide a number with zero \n if(totalIn > 0){\n //Creates a percentage funciton inside each of the object\n this.percentage = Math.round((this.value / totalIn) * 100);\n }else{\n // -1 indicates NULL\n this.percentage = -1;\n }\n }", "function parsePercent(percent, all) {\n switch (percent) {\n case 'center':\n case 'middle':\n percent = '50%';\n break;\n\n case 'left':\n case 'top':\n percent = '0%';\n break;\n\n case 'right':\n case 'bottom':\n percent = '100%';\n break;\n }\n\n if (typeof percent === 'string') {\n if (_trim(percent).match(/%$/)) {\n return parseFloat(percent) / 100 * all;\n }\n\n return parseFloat(percent);\n }\n\n return percent == null ? NaN : +percent;\n}", "function calcPercent(number, percent) {\n return number / 100 * percent;\n}", "function tipPercent(arg) {\n if (!arg.innerHTML) return; // NaN is blocking\n percent = parseFloat(arg.innerHTML) / 100;\n}", "function ProgressCenterPanel() {}", "function generatePercentBar(percent) {\n return \"<span class='coverage-bar'>\" +\n \"<span class='coverage-bar-inner' style='width:\" + percent + \"px'>\" +\n \"</span></span>\";\n}", "_bi_arc(args, fn) {\n if (args.length == 1) {\n const radius = this.getCompassLength()\n const center = this.eval(args[0])\n expect.type(center, types.Point)\n\n return new types.Circle(center, radius.value)\n } else {\n throw errors.ArgMisMatch(fn, args.length)\n }\n }", "function loaderCircleType1(current, max) {\n var percent = (current / max) * 100;\n var loadLeft = Math.round((percent / 100) * (230));\n var loadRight = Math.round(230 * (percent / 100)) - 5; //(210-230); //100%\n /*<shape> = rect(<top>, <right>, <bottom>, <left>)*/\n document.getElementById(\"loaderCircleLeft\").style.clip = \"rect(-50px, \" + loadLeft + \"px, 310px, -50px)\";\n document.getElementById(\"loaderCircleRight\").style.clip = \"rect(-50px, 310px, 310px, \" + loadRight + \"px)\";\n document.getElementById(\"loaderCircleLabel\").innerHTML = Math.round(percent) + \"%\";\n}", "function produceTipCalculator(percentage) {\n return function(rideFare) {\n return rideFare * percentage;\n }\n}", "function getQuadraticBezierXYatPercent(startPt,controlPt,endPt,percent) {\n var x = Math.pow(1-percent,2) * startPt.x + 2 * (1-percent) * percent * controlPt.x + Math.pow(percent,2) * endPt.x; \n var y = Math.pow(1-percent,2) * startPt.y + 2 * (1-percent) * percent * controlPt.y + Math.pow(percent,2) * endPt.y; \n return( {x:x,y:y} );\n }", "function inputPercent() {\n $(\".caption\").each(function( index ) {\n var span = $(this);\n compareThis = $(this).attr('compare-this');\n compareTo = $(this).attr('compare-to');\n calculatePercent(compareThis,compareTo,span);\n });\n}", "function calculatePercentageCircle(num) {\n\treturn (440 - (440*num)/100);\n}", "function countToPercent(percent) {\n var interval = setInterval(counter,25);\n var n = 0;\n function counter() {\n if (n >= percent) {\n clearInterval(interval);\n valueProgressBarAnimated = true;\n }\n else {\n n += 1;\n // console.log(n);\n $(thisDiv).text(n + \"%\");\n }\n }\n }", "calculateDivisions(event) {\n var userInput = event.target.value;\n this.percentage = userInput.length === 0 ? 20 : 100 / userInput;\n console.log(this.percentage);\n this.applyWidth();\n }", "function calculatePercent(percent, num) {\n return (percent * 100) / num\n}", "function percentFromCenter(scroll_pos, window_height, element) {\n var element_center_pos = element.offsetTop + (element.offsetHeight / 2);\n var screen_center_post = scroll_pos + (window_height / 2);\n return element_center_pos / screen_center_post;\n}", "function percCalculator(perc){\n\tperc = perc * 100;\n\tperc = Math.round(perc);\n\tperc = perc / 100;\n\t\n\treturn perc;\n}", "function computeCenter(rect) {\n return {\n top: rect.top + (rect.height / 2),\n left: rect.left + (rect.width / 2)\n };\n}", "centerSelection() {\n var range = this.getSelectionRange();\n var pos = {\n row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),\n column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)\n };\n this.renderer.alignCursor(pos, 0.5);\n }", "function createCircle (percentageValue, candidateId, radius){\n var politicalCircle = Circles.create({\n id: candidateId,\n radius: radius,\n value: percentageValue,\n width: 3,\n text: '',\n colors: ['white', '#D05C5C'],\n duration: 400,\n });\n }", "function center(center)\n\t{\n\t\tcenter.lat=Number(vm.centerLat);\n\t\tcenter.lng=Number(vm.centerLng);\n\t\t$log.debug(center);\n\t\n\t}", "function calculateCompletion() {\r\n $(\"#stepNo\").html(step);\r\n var percentCompleted = Math.round((step - 1) / (maxStep - 1) * 100 / 5) * 5;\r\n if (percentCompleted == 0) {\r\n percentCompleted += 5;\r\n }\r\n $(\"#percentCompleted\").html(percentCompleted);\r\n $(\"#percentMeter\").css('width', percentCompleted + '%');\r\n}", "function makePercent() {\n\t\tinput2.value = \"%\";\n\t\tinput1.value = (input1.value * 100);\n\t}", "_getValidatedPercent() {\n\n //Set the default to undefined. We'll use it if it's in indeterminate mode. \n var percent = undefined;\n\n //If it's not indeterminate mode, let's find out what this value should be. \n if (!this.props.indeterminate) {\n percent = parseFloat(this.state._percent);\n\n //If it's not a number, set it to 0\n if (isNaN(percent)) {\n percent = 0;\n }\n\n //Check for min\n if (percent < 0) {\n percent = 0;\n }\n\n //Check for max\n if (percent > 1) {\n percent = 1.0;\n }\n }\n\n //Return the final value\n return percent;\n }", "function fromPercentage(range, value, startRange) {\n return (value * 100) / (range[startRange + 1] - range[startRange]);\n }", "function fromPercentage(range, value, startRange) {\n return (value * 100) / (range[startRange + 1] - range[startRange]);\n }", "function fromPercentage(range, value, startRange) {\n return (value * 100) / (range[startRange + 1] - range[startRange]);\n }", "function fromPercentage(range, value, startRange) {\n return (value * 100) / (range[startRange + 1] - range[startRange]);\n }", "function percent(covered, total) {\n let tmp;\n if (total > 0) {\n tmp = (1000 * 100 * covered) / total + 5;\n return Math.floor(tmp / 10) / 100;\n } else {\n return 100.0;\n }\n}", "function toPercent(pixels) {\n return pixels / outerWidth * 100;\n }", "function updateProgressCircle(circle, percent){\n circle.removeClass('p'+ percent -1).addClass('p' + percent);\n circle.find('span').text(percent + '%');\n}", "set Center(value) {}", "getPercentValue(xc, yc, x, y) {\n\t\tvar alpha = Math.atan2(x - xc, yc - y) / Math.PI * 180;\n\t\tvar halfRange = this._rotate_angle / 2;\n\n\t\tif (alpha < -halfRange) {\n\t\t\talpha = -halfRange;\n\t\t} else if (alpha > halfRange) {\n\t\t\talpha = halfRange;\n\t\t}\n\t\tvar percentValue = (alpha / this._rotate_angle + 0.5) * 100;\n\t\treturn percentValue;\n\t}", "function initProgressBarCircle(selector, value) {\r\n if (document.querySelector(selector)) {\r\n let bar = new ProgressBar.Circle(selector, {\r\n color: '#a7b51a',\r\n trailColor: '#e9e9e9',\r\n trailWidth: 12,\r\n duration: 1400,\r\n easing: 'bounce',\r\n strokeWidth: 12,\r\n text: {\r\n className: 'circle-progress-bar__lable',\r\n },\r\n from: {color: '#d75c2b', a:0},\r\n to: {color: '#a7b51a', a:1},\r\n // Set default step function for all animate calls\r\n step: function(state, circle) {\r\n circle.path.setAttribute('stroke', state.color);\r\n $(circle.text).css({color:state.color});\r\n circle.setText( (circle.value() * 10).toFixed(1) )\r\n },\r\n });\r\n\r\n bar.animate(value); // Number from 0.0 to 1.0\r\n }\r\n }", "static widthPercent( percent )\n\t{\n\t\treturn percent / 100 * window.width;\n\t}", "function usePresetPercent(percent) {\n return Math.round(percent / 100 * (scope.presetValues.length-1)) / (scope.presetValues.length - 1) * 100;\n }", "function _calculatePointPercentAlongLine(startPoint, endPoint, percent) {\n var x = startPoint.x + ((endPoint.x - startPoint.x) * percent / 100);\n var y = startPoint.y + ((endPoint.y - startPoint.y) * percent / 100);\n return { x: x, y: y };\n }", "function _calculatePointPercentAlongLine(startPoint, endPoint, percent) {\n var x = startPoint.x + ((endPoint.x - startPoint.x) * percent / 100);\n var y = startPoint.y + ((endPoint.y - startPoint.y) * percent / 100);\n return { x: x, y: y };\n }", "function createpercentagestudents(){\n return numberOfstudents * 100 / numberofpeople;\n}", "setPercentage(percentage) {\n const value = percentage * this.valueWidth + this.minValue;\n this.setValue(value);\n }", "function test (beforePercentage, perc) {\n if (beforePercentage < 25 && perc >= 25 && perc < 50) {\n console.log(`${beforePercentage} ${perc} it is 25%`)\n } else if (beforePercentage < 50 && perc >= 50 && perc <= 75) {\n console.log(`${beforePercentage} ${perc} it is 50%`)\n } else if (beforePercentage < 75 && perc >= 75 && perc <= 75) {\n console.log(`${beforePercentage} ${perc} it is 75%`)\n } else if (beforePercentage < 100 && perc >= 100) {\n console.log(`${beforePercentage} ${perc} it is 100%`)\n }\n}", "function getLineXYatPercent(startPt,endPt,percent) {\n var dx = endPt.x-startPt.x;\n var dy = endPt.y-startPt.y;\n var X = startPt.x + dx*percent;\n var Y = startPt.y + dy*percent;\n return( {x:X,y:Y} );\n }", "constructor({colorCode, context, x, y, radius, percentFromCenter}) {\n this.circles = [];\n this.percentFromCenter = percentFromCenter;\n\n if (Math.abs(this.percentFromCenter) < 0.01) {\n this.circles.push(new ColorCircle({\n x: 0,\n y: 0,\n radius: radius,\n colorCode: new ColorCode({\n base: colorCode.getBase(),\n bits: colorCode.getBits(),\n red: colorCode.getComponent('R'),\n green: colorCode.getComponent('G'),\n blue: colorCode.getComponent('B')\n }),\n context\n }));\n }\n else {\n // Add red circle in bottom left position\n this.circles.push(new ColorCircle({\n x: x - radius * MAX_CIRCLE_DIST_MULT * this.percentFromCenter * RT_3_OVER_2,\n y: y - radius * MAX_CIRCLE_DIST_MULT * this.percentFromCenter * ONE_HALF,\n radius: radius,\n colorCode: new ColorCode({\n base: colorCode.getBase(),\n bits: colorCode.getBits(),\n red: colorCode.getComponent('R'),\n green: 0,\n blue: 0,\n }),\n context\n }));\n // Add green circle in top position\n this.circles.push(new ColorCircle({\n x: x,\n y: y + radius * MAX_CIRCLE_DIST_MULT * this.percentFromCenter,\n radius: radius,\n colorCode: new ColorCode({\n base: colorCode.getBase(),\n bits: colorCode.getBits(),\n red: 0,\n green: colorCode.getComponent('G'),\n blue: 0,\n }),\n context\n }));\n // Add blue circle in bottom right position\n this.circles.push(new ColorCircle({\n x: x + radius * MAX_CIRCLE_DIST_MULT * this.percentFromCenter * RT_3_OVER_2,\n y: y - radius * MAX_CIRCLE_DIST_MULT * this.percentFromCenter * ONE_HALF,\n radius: radius,\n colorCode: new ColorCode({\n base: colorCode.getBase(),\n bits: colorCode.getBits(),\n red: 0,\n green: 0,\n blue: colorCode.getComponent('B'),\n }),\n context\n }));\n }\n }", "function produceTipCalculator (percentTip) {\n return function (fare) {\n return fare * percentTip;\n }\n}", "function styleCircle(circle, percentage, index) {\n circle.innerHTML = Math.round(wordCountData[index]);\n const radius = percentage * (viewWidth - 200);\n circle.style.backgroundColor = getColor(percentage);\n circle.style.width = radius + \"px\";\n circle.style.height = radius + \"px\";\n}", "function calculatePercentage( partialValue, totalValue ) {\n return ( 100 * partialValue ) / totalValue;\n }", "function clickPercent(e) {\n return (e.pageX - timeline.offsetLeft) / timelineWidth;\n}", "function convertPercentToValue(percent, min, length) {\n return percent * length + min;\n}", "function clickPercent(e) {\n\treturn (e.pageX - timeline.offsetLeft) / timelineWidth;\n}", "calculatePercent(data) {\n return Math.ceil((data - this.calculateWithDif()) / this.interactiveDomWidth * 100);\n }", "function percentage(a,b){\n return (a/b)*100;\n}", "constructor(stops, offsetXPercent, offsetYPercent, radiusPercent) {\r\n if (!arrayHelper_1.ArrayHelper.isArray(stops)) {\r\n throw new Error(\"The stops array must not be empty\");\r\n }\r\n if (!objectHelper_1.ObjectHelper.isEmpty(offsetXPercent) && !numberHelper_1.NumberHelper.isInteger(offsetXPercent)) {\r\n throw new Error(\"The offsetXPercent must be a number\");\r\n }\r\n if (!objectHelper_1.ObjectHelper.isEmpty(offsetYPercent) && !numberHelper_1.NumberHelper.isInteger(offsetYPercent)) {\r\n throw new Error(\"The offsetYPercent must be a number\");\r\n }\r\n if (!objectHelper_1.ObjectHelper.isEmpty(radiusPercent) && !numberHelper_1.NumberHelper.isInteger(radiusPercent)) {\r\n throw new Error(\"The radiusPercent must be a number\");\r\n }\r\n this._stops = stops;\r\n this._offsetXPercent = offsetXPercent;\r\n this._offsetYPercent = offsetYPercent;\r\n this._radiusPercent = radiusPercent;\r\n }", "function getPercentage(min, max) {\n return min / max * 100;\n }", "function setProgressBar(curStep){\n var percent = parseFloat(50 / steps) * curStep;\n percent = percent.toFixed();\n $(\".barrafinal\")\n .css(\"width\",percent+\"%\")\n .html(percent+\"%\"); \n }", "function clickPercent(e) {\n\t\t\treturn (e.pageX - timeline.offsetLeft) / timelineWidth;\n\t\t }", "function pct(a, b) {\n return Math.round(a / b * 100) + '%';\n }", "function primaryLabelInterval(pxPerSec) {\n var retval = 1;\n /*\n if (pxPerSec >= 25 * 100) {\n retval = 100;\n } else if (pxPerSec >= 25 * 40) {\n retval = 40;\n } else if (pxPerSec >= 25 * 10) {\n retval = 100;\n } else if (pxPerSec >= 25 * 4) {\n retval = 40;\n } else if (pxPerSec >= 25) {\n retval = 1;\n } else if (pxPerSec * 5 >= 25) {\n retval = 5;\n } else if (pxPerSec * 15 >= 25) {\n retval = 15;\n } else {\n retval = Math.ceil(0.5 / pxPerSec) * 60;\n } */\n if (pxPerSec >= 600) {\n retval = 5;\n }\n else if (pxPerSec >= 500) {\n retval = 7;\n }\n else if (pxPerSec >= 400) {\n retval = 8;\n }\n else if (pxPerSec >= 300) {\n retval = 10;\n }\n return retval;\n}", "function initRadial(sel, start, max) {\n var new_chart = new RadialProgressChart(sel, {\n diameter: 200,\n max: max,\n round: true,\n series: [{\n labelStart: \"\",\n value: start,\n color: {\n linearGradient: {\n x1: \"0%\",\n y1: \"100%\",\n x2: \"50%\",\n y2: \"0%\",\n spreadMethod: \"pad\"\n },\n stops: [{\n offset: \"0%\",\n \"stop-color\": \"#fe08b5\",\n \"stop-opacity\": 1\n },\n {\n offset: \"100%\",\n \"stop-color\": \"#ff1410\",\n \"stop-opacity\": 1\n }\n ]\n }\n }],\n center: {\n content: [\n function(value) {\n return value;\n },\n \" OF \" + max + \" Profiles\"\n ],\n y: 25\n }\n });\n return new_chart;\n}", "function disk(center, radius) {\n return function (point) { return distance(point, center) <= radius; };\n}", "function percent(str) {\n\tvar num = '', percentPos = str.indexOf('%'), leftNumPos = -1, rightNumPos = percentPos - 1;\n\tfor (var i = rightNumPos; i >= 0 && (isFinite(str[i]) || str[i] == '.'); i--) {\n\t\tnum += str[i];\n\t\tleftNumPos = i;\n\t}\n\tnum = num.split('').reverse().join('');\n\treturn {\n\t\tsubstr: num + '%',\n\t\tnum: num / 100\n\t};\n}", "function ConvertPercentByParent(vNum, selectorParent) {\n // Check name of properties have supported\n var nameIndex = $.inArray(name, aNamePercent);\n if (nameIndex !== -1) {\n var $parent = $anim.parent();\n if (!!selectorParent) {\n var $select = $anim.closest(selectorParent);\n if ($select.length)\n $parent = $select;\n }\n vNum = M[aFnSizeRef[nameIndex]]($parent) * vNum / 100;\n vNum = Math.round(vNum);\n }\n // Return result\n return vNum;\n }", "function percent(number, total) {\n return (number / total) * 100;\n}", "_setWrapperPosition() {\n this.wrapper.style.left = this.percentPosition.x + '%';\n this.wrapper.style.top = this.percentPosition.y + '%';\n }", "function ratio_to_cents(input) {\n return decimal_to_cents(ratio_to_decimal(input));\n}" ]
[ "0.5441083", "0.5423155", "0.53515947", "0.51415503", "0.5099301", "0.50814635", "0.50578564", "0.50578564", "0.50578564", "0.50578564", "0.5045009", "0.50370234", "0.50069755", "0.50069755", "0.50069755", "0.4975419", "0.49723375", "0.4970372", "0.49646857", "0.49646857", "0.49646857", "0.49646857", "0.49646857", "0.49646857", "0.49532548", "0.49466726", "0.49455425", "0.4914168", "0.49080184", "0.49056897", "0.48903885", "0.4882652", "0.48196083", "0.47946224", "0.4789447", "0.47891462", "0.47718602", "0.47688672", "0.4756065", "0.47515535", "0.46960318", "0.46871904", "0.46610355", "0.46550742", "0.46529207", "0.46481198", "0.46430263", "0.46390355", "0.46375364", "0.46346194", "0.4624403", "0.4616796", "0.46150455", "0.4598954", "0.4586789", "0.45861283", "0.45625618", "0.4559116", "0.4556337", "0.455128", "0.45505577", "0.45505577", "0.45505577", "0.45505577", "0.45503995", "0.45426065", "0.45325482", "0.45308164", "0.45130506", "0.44837978", "0.4478703", "0.4475832", "0.44736537", "0.44736537", "0.4471252", "0.44664112", "0.44663802", "0.446386", "0.44574752", "0.44452435", "0.44425488", "0.44334093", "0.44299436", "0.4426503", "0.44155443", "0.44153532", "0.44136703", "0.44093832", "0.44092283", "0.44065276", "0.43926775", "0.43854415", "0.4382808", "0.43800434", "0.4373569", "0.4371582", "0.43610272", "0.43423307", "0.43367413", "0.43357682" ]
0.7483115
0
I DON'T HAVE ENOUGH TIIIIIME FOR THIS
function buildTable(toBuildFrom1) { console.log('building'); let table = document.querySelector('table'); table.innerHTML = ''; let tableHeader = document.createElement('thead'); let tableBody = document.createElement('tbody'); let tableHeaderRow = document.createElement('tr'); let tableHeaderID = document.createElement('th'); let tableHeaderReporter = document.createElement('th'); let tableHeaderManufacturer = document.createElement('th'); let tableHeaderSerialNumber = document.createElement('th'); let tableHeaderDescription = document.createElement('th'); let tableHeaderDate = document.createElement('th'); let tableHeaderActions = document.createElement('th'); table.appendChild(tableHeader); table.appendChild(tableBody); tableHeader.appendChild(tableHeaderRow); tableHeaderID.appendChild(document.createTextNode('ID')); tableHeaderReporter.appendChild(document.createTextNode('Reporter')); tableHeaderManufacturer.appendChild(document.createTextNode('Manufacturer')); tableHeaderSerialNumber.appendChild(document.createTextNode('Serial number')); tableHeaderDescription.appendChild(document.createTextNode('Description')); tableHeaderDate.appendChild(document.createTextNode('Date')); tableHeaderActions.appendChild(document.createTextNode('Actions')); tableHeaderRow.appendChild(tableHeaderID); tableHeaderRow.appendChild(tableHeaderReporter); tableHeaderRow.appendChild(tableHeaderManufacturer); tableHeaderRow.appendChild(tableHeaderSerialNumber); tableHeaderRow.appendChild(tableHeaderDescription); tableHeaderRow.appendChild(tableHeaderDate); tableHeaderRow.appendChild(tableHeaderActions); toBuildFrom1.forEach((e, i) => { let tableBodyRow = document.createElement('tr'); let tableCellID = document.createElement('td'); let tableCellReporter = document.createElement('td'); let tableCellManufacturer = document.createElement('td'); let tableCellSerialNumber = document.createElement('td'); let tableCellDescription = document.createElement('td'); let tableCellDate = document.createElement('td'); let tableCellActions = document.createElement('td'); tableBody.appendChild(tableBodyRow); tableBodyRow.appendChild(tableCellID); tableBodyRow.appendChild(tableCellReporter); tableBodyRow.appendChild(tableCellManufacturer); tableBodyRow.appendChild(tableCellSerialNumber); tableBodyRow.appendChild(tableCellDescription); tableBodyRow.appendChild(tableCellDate); tableBodyRow.appendChild(tableCellActions); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "static private internal function m121() {}", "protected internal function m252() {}", "transient protected internal function m189() {}", "transient private internal function m185() {}", "static transient private protected internal function m55() {}", "transient private protected internal function m182() {}", "transient final protected internal function m174() {}", "static transient final private internal function m43() {}", "static final private internal function m106() {}", "static private protected internal function m118() {}", "static transient final private protected internal function m40() {}", "function Hx(a){return a&&a.ic?a.Mb():a}", "static transient final protected internal function m47() {}", "transient final private protected internal function m167() {}", "transient final private internal function m170() {}", "static transient private protected public internal function m54() {}", "transient final private protected public internal function m166() {}", "static transient private internal function m58() {}", "static transient private public function m56() {}", "static get INVALID()\n\t{\n\t\treturn 2;\n\t}", "static protected internal function m125() {}", "static private protected public internal function m117() {}", "static transient final private protected public internal function m39() {}", "function i(e){return null==e}", "transient private protected public internal function m181() {}", "static transient final protected public internal function m46() {}", "static final private protected internal function m103() {}", "transient private public function m183() {}", "function StupidBug() {}", "static transient final private protected public function m38() {}", "static final private public function m104() {}", "function TMP() {\n return;\n }", "static transient final private public function m41() {}", "function k(e){return null===e||void 0===e}", "static transient final protected function m44() {}", "static final private protected public internal function m102() {}", "function Le(){!function t(e){Ie[De++]^=255&e,Ie[De++]^=e>>8&255,Ie[De++]^=e>>16&255,Ie[De++]^=e>>24&255,De>=Ue&&(De-=Ue)}((new Date).getTime())}", "static transient protected internal function m62() {}", "function a(e){return void 0===e&&(e=null),Object(r[\"p\"])(null!==e?e:i)}", "function TMP(){return;}", "function TMP(){return;}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}", "function i(e,t){0}" ]
[ "0.692721", "0.66386545", "0.64107764", "0.640672", "0.63495654", "0.6288914", "0.61102325", "0.6092448", "0.60191995", "0.6005097", "0.592703", "0.5926077", "0.5923283", "0.59065974", "0.59034216", "0.5902647", "0.58892524", "0.5886282", "0.5871479", "0.5857213", "0.58538973", "0.58437485", "0.58205456", "0.5774715", "0.5746285", "0.5718578", "0.57091105", "0.5706614", "0.5684374", "0.5682865", "0.56735814", "0.55914456", "0.5573382", "0.55458885", "0.5491878", "0.5478924", "0.54682285", "0.54516345", "0.54485804", "0.5444094", "0.5436659", "0.5415213", "0.5415213", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303", "0.5409303" ]
0.0
-1
in "normal" function you have arguments
function main() { return argumentsAsString(...arguments) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function args() {\n\n}", "function SimpleArgs() {\r\n}", "function argsFor() {\n\n}", "function functionWithArgs (para1, para2) {\nconsole.log(para1 + para2);\n}", "function functionWithArgs(a,b){\n console.log(a+b);\n }", "function imprimeArguemntos(){\n console.log(arguments);\n}", "function blau(a,b,...params){\n return params;\n}", "function test () {\n return arguments\n}", "function functionWithArgs(x, y) {\n console.log(x + y)\n}", "function saludarArgumentos(referencia){\n console.log(arguments);\n}", "function funkcijosPavadinimas(argumntas1, argumentas2) {\n // funkcijos body. kodas kuris bus vygdomas kai iskviesim funkcija\n // argumntas1 - lokalus kintamasis naudojamas tik sioje funkcijoje\n console.log(argumntas1);\n}", "function functionWithArgs(a, b){\n console.log(a+b)\n}", "function normalFunction(normalFunctionparameters) {\n console.log(normalFunctionparameters);\n}", "function miFuncion(a, b){\n console.log(arguments.length);\n console.log(\"La suma es: \" + (a+b));\n}", "function miFuncionUno (a,b){\n console.log(\"Suma: \"+ (a+b));\n // \"arguments\" is a property of objects but functions work as objects\n console.log(arguments);\n // \"arguments.length\" Number of arguments that enter the function. Can only be used inside the function.\n console.log(arguments.length); \n // \"arguments[0]\" Accesses the firtst argument position.\n console.log(arguments[0]); \n}", "function example(param1, opt_param2, var_args){\n\t\n}", "function functionName(arguments) {\n //code here\n}", "function greetArgs(name) {\n console.log(\"hello \"+name+ \" , i am from greet function\");\n}", "function fun1( /*parametros opcionais*/ ){ /*retorno opcional*/ }", "function total1() {\n // return arguments['0'] + arguments['1'];\n return arguments[0] + arguments[1];\n}", "function methodName (arguments) {\n\t\n}", "function myFunc() {\n console.log(arguments)\n }", "function ciao(mandi, hola){\n\tconst args = Array.from(arguments)\n\tconsole.log(mandi, hola)\n}", "function india () {\n console.log(arguments); //undefined --there's still an arguments object inside the execution context\n console.log('warm')\n}", "function myFunction(a, b) {\n console.log(arguments);\n}", "function abc (a, b, bla ){\n return bla(a,b)\n }", "function functionWithArgs(a, b){\n console.log(a + b);\n}", "function imprimeArgumentos() {\n console.log(arguments);\n}", "function argsDataType() {\n\n}", "function abc(a,b) {\n var c = 6;\n return arguments[0] + b + c;\n}", "function functionWithArgs(a, b) {\n console.log(a+b);\n}", "function functionWithArgs(a, b) {\n console.log(a+b);\n}", "function f_arg (arguments)\n{\n return arguments;\n}", "function es1(params) {\n \n}", "function sum(a, b) {\n console.log(arguments); //retorna todos os argumentos da function\n return a + b;\n}", "function myFunction(){\n console.log(arguments);\n}", "function functionWithArgs(param1, param2) {\n console.log(param1 + param2);\n}", "apply(args) {\n // ... //\n }", "function miFuncion (){}", "function functionWithArgs(int1, int2) {\n console.log(int1 + int2);\n}", "function get_arg() { return arguments; }", "function a() {\n if(arguments.length<3) return;//arguments 갯수가 3보다 작으면 return해!\n console.log('my name is ', arguments[2])\n}", "function normal () {\n console.log(arguments);\n }", "function fn1([...args]) {}", "function paraArguments(parameterOne, parameterTwo) {//function declared, with two parameters.\n return parameterOne + parameterTwo + 'argument!'; //body of function.\n}", "function test_param(name, age, gender) {\n console.log(name);\n console.log(age);\n console.log(gender);\n}", "function functionWithArgs(n, m) {\n console.log(n + m); \n}", "function newArgs(a,b,...args){\r\n console.log(args[3]);//prints third element in rest parameter after the parameter that are defined\r\n\r\n}", "function functionWithArgs(a, b) {\n\tconsole.log(a + b);\n}", "function sum() {\n console.log( arguments );\n}", "function functionWithArgs(a, b) {\n console.log(a + b);\n}", "function functionWithArgs(a, b) {\n console.log(a + b);\n}", "function example3() {\n\n function hi() {\n for (var _len = arguments.length, fullName = Array(_len), _key = 0; _key < _len; _key++) {\n fullName[_key] = arguments[_key];\n }\n\n console.log(fullName.join(' '));\n }\n\n hi('vlad', 'argentum');\n}", "function greetLessArgs(name , age) {\n console.log('Hello ' + name + ' You Are ' + age + ' Years Old!');\n}", "function showAllArguments(...items) {\n console.log(items);\n console.log(arguments); //poprzednie\n return items;\n}", "function fun2() {\n console.log(arguments);\n}", "function test() {\n console.log(arguments);\n}", "function greetMoreArgs(name , age) {\n console.log('Hello ' + name + ' You Are ' + age + ' Years Old!');\n}", "function hello(name) {\n console.log(\"Hello \" + name + \"!\"); // function with arguments\n}", "function func(a, b, c, d){}", "function myFunc(...myArgs) {\n\treturn myArgs;\n\n}", "function functionWithArgs (param1, param2) {\n console.log (param1 + param2);\n}", "function ourFunctionWithArgs(a, b) {\n console.log(a - b);\n}", "function ourFunctionWithArgs(a, b) {\n console.log(a - b);\n}", "function ourFunctionWithArgs(a, b) {\n console.log(a - b);\n}", "function ourFunctionWithArgs(a, b) {\n console.log(a - b);\n}", "function ourFunctionWithArgs(a, b) {\n console.log(a - b);\n}", "function foo( {name , car, color} ) {\n c(name)\n c(color)\n // c(arguments[0])\n}", "function ourFunctionWithArgs(a, b) {\n\tconsole.log(a - b);\n}", "function customFunction ( Parameters ) {\n // Statements using Parameters\n // returen the result\n}", "function greetMoreArgs(name,age) {\n console.log(\"Hello \"+name+ \" you are \" +age+ \" yrs old\");\n}", "function marry(person1, person2) {\n // Arguments is a variable we have access to\n console.log(arguments);\n}", "function f3(a,...b){}", "function greetLessArgs(name,age) {\n console.log(\"Hello \"+name+ \" you are \"+age+ \" yrs old\");\n}", "function nums(){\n\tconst bindArgs = Array.from(arguments).slice(1);\n\tconst callArgs = Array.from(arguments);\n\tconsole.log(`bindArgs: ${bindArgs}`);\n\tconsole.log(`callArgs: ${callArgs}`);\n}", "function f(x,y,z){\n\tconsole.log(x);\n\tconsole.log(y);\n\tconsole.log(z);\n}", "function func1(str1, str2) {\n console.log(arguments[3]);\n console.log(arguments.length);\n}", "function fun1() {\n var a =\n typeof arguments[0] === \"undefined\" ?\n -1 : arguments[0];\n var b =\n typeof arguments[1] === \"undefined\" ?\n -1 : arguments[1];\n // return a + \"\" + b/* + arguments[5]*/;\n return a + \"\" + b;\n\n}", "function mary(person1, person2) {\n console.log(arguments);\n return true;\n}", "function paella(ing1,ing2,...masingredientes){\n console.log(\"Ingrediente 1: \",ing1);\n console.log(\"Ingrediente 2: \",ing2);\n console.log(\"masingredientes: \",masingredientes);\n}", "function myFunction(paramOne, paramTwo) {\n console.log(paramOne)\n console.log(paramTwo)\n}", "function message(message, input) {\n\tconsole.log(arguments); // array like object of the functions arguments \n}", "function g() {\n return g.arguments;\n}", "function myFunctionWithArgs(a, b){\n console.log(a - b);\n}", "function f(x, y, z) {\n\t// verifica se foi passado o numero correto de args\n\tif (arguments.length != 3) throw \"Numero de args incorreto!\";\n\t// continua o corpo...\n}", "function myFunction(x, y, z) { }", "function funcionParametro(fn) {\n\tfn();\n}", "function a(x, y, z) {\n console.log(x);\n console.log(y);\n console.log(z);\n}", "function doFunction() {\n\tfor (let item of arguments) {\t// this works\n\t\tconsole.log(item);\n\t}\n}", "function myfunction(x, y){\n console.log(x + \" \" + y);\n }", "function aa() {\n console.log(arguments)\n let [a, b] = arguments\n console.log(a, b)\n}", "function boo({first=\"10\", second=\"true\"}) {\n\n}", "function args() {\n\t\tvar params = slice.call(arguments);\n\t\tparams.isArgs = true;\n\t\treturn params;\n\t}", "function fun() {\n for(var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++)rest[_key] = arguments[_key];\n}", "function args() {\n return Array.prototype.slice.call(arguments[0]);\n }", "function X(a) {\n a = 5;\n arguments[1] = 12;\n console.log(arguments)\n}", "function otroDato(...params){\n agregarP(params);\n console.info(params);\n}", "function fun(a,...b,c){ \n //code \n return; \n}", "function foo(a, b, c, d, e) {\n console.log(a);\n console.log(b);\n console.log(c);\n console.log(d);\n console.log(e);\n}", "function pizzaVeg(ing1,ing2,ing3,...adiciones){// function \n console.log(\"Ingrediente 1: \",ing1);\n console.log(\"Ingrediente 2: \",ing2);\n console.log(\"Ingrediente 2: \",ing3);\n console.log(\"Adiciones: \",adiciones);\n }", "function myFunction4(arg){\n return arg[1]; \n }" ]
[ "0.7216065", "0.7063855", "0.69777256", "0.6775883", "0.67742324", "0.6650073", "0.6642892", "0.66353196", "0.66227317", "0.6579017", "0.65786034", "0.65367085", "0.6509908", "0.65036905", "0.64986616", "0.64883626", "0.6445828", "0.6445764", "0.6444234", "0.64341795", "0.64224637", "0.6405667", "0.63995653", "0.637322", "0.6368235", "0.6363888", "0.6346686", "0.63242364", "0.6308785", "0.63078487", "0.6302529", "0.6302529", "0.62926793", "0.6283203", "0.6277505", "0.62715846", "0.6246422", "0.6238703", "0.623563", "0.62347", "0.62264526", "0.62217444", "0.6218738", "0.62147254", "0.62098736", "0.6191992", "0.61804307", "0.6177119", "0.61762565", "0.61717635", "0.6166869", "0.6166869", "0.6165747", "0.6162582", "0.6154858", "0.61453384", "0.61414915", "0.61385626", "0.61351895", "0.6134466", "0.6130715", "0.61242974", "0.61207247", "0.61207247", "0.61207247", "0.61207247", "0.61207247", "0.6111105", "0.6111081", "0.6107089", "0.6104325", "0.60950625", "0.609497", "0.6088661", "0.6086091", "0.6084172", "0.6083646", "0.60748756", "0.6069096", "0.6050017", "0.6041737", "0.60357356", "0.60336626", "0.6032593", "0.6030955", "0.60260147", "0.6024471", "0.6021569", "0.6011093", "0.6009819", "0.5997469", "0.5987225", "0.5986115", "0.59850675", "0.5976747", "0.5975096", "0.5974268", "0.59656894", "0.5961977", "0.5961644", "0.5960118" ]
0.0
-1
validate number function, ensure user input is greater than 0
function validateNumber(value) { var valid = Number.isInteger(parseFloat(value)); var sign = Math.sign(value); if (valid && (sign === 1)) { return true; } else { return "Please enter a number"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validInput(input) {\n return isInteger(input) && input > 0\n}", "function validNumber(input){\r\n\treturn (input.length == 10 || input[0] == \"0\");\r\n}", "function validateInput(value) {\n\tvar integer = Number.isInteger(parseFloat(value));\n\tvar sign = Math.sign(value);\n\tif (integer && (sign === 1)) {\n\t\treturn true;\n\t} else {\n\t\treturn \"You must enter a positive number higher than zero.\";\n\t}\n}", "function validateInput(input) {\n\n var number = parseInt(input);\n \n if (isNaN(number) || number < 0 || number > 7) {\n return 0;\n }\n else {\n return number;\n }\n}", "function numberCheck (input) {\n\tif (input >= 0 && input <= 9) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function verifyInt(input)\n{\n var x = parseInt(input.value, 10);\n if (isNaN(x) || x < 0) {\n input.value = \"\";\n input.focus();\n } else\n gasUse();\n return;\n}", "function validateNumber(value) {\n if (value % 1 === 0 && value > 0) {\n return true;\n } else {\n console.log(\" **** Please enter a whole number above zero. ****\");\n }\n}", "function validNumber(num, maxNum) {\r\n while (isNaN(num) || num <= 0 || num > maxNum) {\r\n num = parseInt(prompt('ERROR. The value you entered is not valid. Please enter a number ranging from 1 to ' + maxNum + '.'));\r\n };\r\n return num;\r\n}", "function validate(num) {\r\n // return Number.isInteger(num);\r\n\r\n //return num !== isNaN && num >= 0 && num <= 100;\r\n return typeof num === \"number\" && num >= 0 && num <= 100;\r\n\r\n\r\n\r\n}", "function checkNumber (input) {\n\t\tif (input <= 100 && input >= 1) {\n\t\t\tfizzbuzz();\n\t\t} else if (isNaN(input)) {\n\t\t\tprompt('You did not enter a number. Please enter a number between 1 and 100');\n\t\t} else {\n\t\t\tprompt('Your number (' + input + ') is not between 1 and 100. Please enter a number between 1 and 100');\n\t\t}\n\t}", "function validNumberAboveZero(inputNumber){\n inputNumber = inputNumber.replace(/\\s+/,\"\");\n inputNumber = inputNumber.replace(/\\,+/,\".\");\n if(isNaN(parseFloat(+inputNumber))){\n return false;\n }\n if(parseFloat(+inputNumber)<=0){\n return false;\n }\n return true;\n }", "function isValidNumber(input) {\n return typeof input === 'number' && isFinite(input);\n }", "function checkNum() {\n for (let i = arguments.length - 1; i >= 0; i--) {\n if (isNaN(arguments[i]) || arguments[i] < 0) {\n return false;\n }\n continue;\n }\n return true;\n }", "function validateInput(value) {\n\tvar integer = Number.isInteger(parseFloat(value));\n\tvar sign = Math.sign(value);\n\n\tif (integer && (sign === 1)) {\n\t\treturn true;\n\t} else {\n\t\treturn 'Please enter a whole non-zero number.';\n\t}\n}", "function numberValidation(input) {\n var name = input.id;\n var value = parseFloat(input.value);\n var min = parseFloat(input.min);\n var max = parseFloat(input.max);\n if (!(value >= min && value <= max)) {\n return name + \" not in range (\" + input.min + \", \" + input.max + \")\";\n } else return \"valid\";\n}", "function validateInput(value) {\n var integer = Number.isInteger(parseFloat(value));\n var sign = Math.sign(value);\n\n if (integer && (sign === 1)) {\n return true;\n } else {\n return 'Please enter a whole number larger than zero.';\n }\n}", "function validateInput(value) {\n var integer = Number.isInteger(parseFloat(value));\n var sign = Math.sign(value);\n\n if (integer && (sign === 1)) {\n return true;\n } else {\n return 'Please enter a whole non-zero number.';\n }\n}", "verifyPositiveNumber(value) {\n return parseInt(value) >= 0;\n }", "function isValidNumber(input) {\n return typeof input === 'number' && isFinite(input);\n }", "function isValidNumber ( input ) {\r\n\t\treturn typeof input === 'number' && isFinite( input );\r\n\t}", "function isValidNumber ( input ) {\r\n\t\treturn typeof input === 'number' && isFinite( input );\r\n\t}", "function isValidNumber(input) {\n return typeof input === \"number\" && isFinite(input);\n }", "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "function validateInput(input) {\n\t\n\t/*---------- check if string contains only digits, space & non-zero value ----------*/\n\t\n\tif(isAllAreDigits(input)){\n\n\t\tinput.trim(); \n\n\t\t/*---------- remove intermediate spaces ----------*/\n\t\t\n\t\tinput = input.replace(/\\s+/g,' ').trim();\n\n\t\tinputDigits = input.split(\" \");\n\n\n\t\t/*---------- check maximum value limit ----------*/\n\t\t\n\t\tif( !isLessThanMaxValuePlusNonZero() ){\n\n\t\t\treturn false;\n\t\t}\n\n\n\t\t/*---------- check input length ----------*/\n\t\t\n\t\tif(inputDigits.length > 10){\n\n\t\t\terrorMessage = \"Numbers exceed maximum limit, Please try again\";\n\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function checkisNum(number) {\n if(typeof number=== 'number' && number>0 ){\n return true;\n }\n return false;\n}", "function isGreaterThanZero()\n{\n let num = document.getElementsByClassName(\"donation-input\")[0].value;\n num = parseInt(num);\n if(num>0) return true;\n else return false;\n}", "function inputNumberValid(inputVal) {\n if ( !(inputVal && inputVal.trim().length) || isNaN(Number(inputVal)) || inputVal < 0) {\n throw new Error(\"Invalid input! A positive numbers only accepted\");\n }\n return inputVal;\n}", "function isValidNumber(input) {\n // var num = Number.parseInt(input);\n // var numText = num + \"\";\n if (isNaN(input)) {\n return false;\n }\n return true;\n}", "function validNumber(value) {\n const intNumber = Number.isInteger(parseFloat(value));\n const sign = Math.sign(value);\n\n if (intNumber && (sign === 1)) {\n return true;\n } else {\n return 'Please use whole non-zero numbers only.';\n }\n}", "function validateNumber(val) {\n if(Number.isInteger(parseFloat(val)) == true && Math.sign(val) == 1) {\n return true\n } else {\n return 'Invalid quantity input!!'\n } \n}", "function validateNum(){\r\n\tvar num = document.survey_form.informative.value; //get the value\r\n\t//make sure the entry is a number\r\n\tvar numPattern = /^[0-9]+$/;\r\n\tif(!numPattern.test(num)){alert(\"Please enter a numerical value.\" )}\r\n\t//if the value is less than 0 or greater than 10, it is not valid.\r\n\tif (num < 0 || num > 10)\t\t\t\r\n\t\t{alert(\"Please enter a number between 0 and 10\" )}\t\r\n\t}", "function validateInputNumber(input) {\n\tinput.value = formatNumber(input.value);\n\tif (!isNumber(input.value)) {\n\t\tinput.value = '';\n\t}\n}", "function inputChecksOut(input){\n // if(Number.isInteger(input)){\n // return true\n // }\n // else{\n // return false\n // }\n\n //Or ?\n\n return Number.isInteger(input) && input > 0\n }", "function isNumberOk(num) {\n if (num > 0 && num < 99999999) return true;\n return false;\n}", "function validateNum(numberToBeValidated){\n if (numberToBeValidated % 1 != 0){\n alert(\"Please input an integer\");\n return false; //the function will have false value if the if condition is true\n }\n else if (numberToBeValidated < 0 || numberToBeValidated > 100){\n alert(\"Please input the number between the range of 1 and 100\");\n return false;\n }\n clearText();\n // else if for past guesses ask Casey for help about the past guesses else if \n }", "function validateValue(input_value) {\n\t\tif (input_value===0) return true; //show limit when value===0\n\t\tif (input_value != '') {\n\t\t\tif (input_value.length > 9) {\n\t\t\t\treturn false;\n\t\t\t} else if ((input_value < 0) || (input_value.match(/^0+[,.]0+$/) != null)){\n\t\t\t\treturn false;\n\t\t\t} else if (input_value >= 1000000){\n\t\t\t\treturn false;\n\t\t\t} else if ((input_value.match(/^\\d{1,6}[,.]?\\d{0,2}$/) != null) \n\t\t\t\t\t\t\t&& (input_value.match(/^\\d{1,6}[,.]$/) == null)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function validateNumber(numberInput) {\n var x = numberInput;\n \n try {\n if(x == \"\") throw \"is empty\"\n if(isNaN(x)) throw \"is not a number\"\n x = Number(x);\n if(x > 10) throw \"is too high\"\n if(x < 5) throw \"is too low\"\n \n }\n catch(err) {\n console.log(\"Catch : \" + err);\n }\n finally {\n console.log(\"Finally : \");\n }\n}", "checkNumInput(txt, min, max, err_reason, err_msg){\n var val\n // Handle input with errors\n if (txt === ''){\n val = ''\n }\n else if (Number.isNaN(parseInt(txt))){\n val = ''\n this.setInputNumberErrorMessage(err_reason, err_msg)\n } else if (parseInt(txt).toString() !== txt){\n val = parseInt(txt)\n this.setInputNumberErrorMessage(err_reason, err_msg)\n } else if (parseInt(txt) < min){\n val = min\n this.setInputNumberErrorMessage(err_reason, err_msg)\n } else if (parseInt(txt) > max){\n val = max\n this.setInputNumberErrorMessage(err_reason, err_msg)\n } else {\n val = parseInt(txt)\n }\n\n return val\n }", "function oneDigitAtLeastInput(input) {\n return /\\d+/.test(input.value);\n}", "function validateForm(inputCheck) {\n if ( (isNaN(inputCheck.value)) || (inputCheck.value <= 0) ) {\n document.getElementById(\"errorP\").innerHTML = \"The input was not correct. Please input valid positive numbers\";\n document.getElementById(\"errorP\").style.display = \"block\";\n }\n}", "function isLessThanMaxValuePlusNonZero() {\n\t\n\tvar len = inputDigits.length;\n\n\tvar i, j;\n\n\tfor(i = 0; i < len; i++){\n\n\t\tif(inputDigits[i] > MAXVAL){\n\n\t\t\terrorMessage = \"Maximum value limit exccded, Please try again\";\n\n\t\t\treturn false\n\t\t}\n\n\t\tif(inputDigits[i] == 0){\n\n\t\t\terrorMessage = \"Input value must be non-zero, Please try again\";\n\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "function validateTime(){\r\n\t\tvar t = document.survey_form.knittime.value; //get the value\r\n\t\tvar numPattern = /^[0-9]+$/;\r\n\t\tif(!numPattern.test(t)){alert(\"Please enter a numerical value equal to or greater than 0.\" )}\r\n\t\tif( t < 0){alert(\"Please enter a value equal to or greater than 0\")}\r\n\t}", "function verifyCost(input, min, max)\n{\n var num = parseFloat(input.value);\n if (isNaN(num) || num < min || num > max) {\n alert(\"Please enter a number between \" + min.toFixed(2) + \" and \" + max.toFixed(2));\n input.value = \"\";\n input.focus();\n } else\n gasUse();\n return;\n}", "function validateInput() {\n if (number < 1 || number > 100) {\n alert(\"Number must be between 1 and 100\")\n inputBox.value = \"\"\n return false\n }\n return true\n}", "function checkNum(str){\n var num = parseInt(str, 10);\n return (!isNaN(num) && !(num < 1));\n}", "function isNumeric(input) { return (input - 0) == input && input.length > 0;}", "function isInputNumber(e) {\n let regularExpresion = new RegExp('^[1-9]?[0-9]{1}$|^100$');\n let regExpOk = regularExpresion.test(e.target.value);\n if ( !regExpOk && (e.target.value != '') ){\n e.preventDefault();\n e.target.value = '';\n return false;\n } else {\n return true;\n }\n}", "function lessThanOrEqualToZero(num) {\n if(num <= 0){\n return true;\n } else{\n return false;\n }\n}", "function validar() {\n if (number < 1) {\n alert(\"Numero ingresado es menor a 1, intente nuevamente.\");\n return false;\n } else if (number > 20) {\n alert(\"Numero ingresado es mayor a 20, intente nuevamente.\");\n return false;\n } else if (isNaN(number)) {\n alert(\"No ingresaste un numero, intenta nuevamente.\");\n return false;\n }\n}", "function inputCheck(input){\n if ( input >= max || input < min || isNaN(input) ){\n alert('ho detto da 1 a 100');\n gioca();\n }\n}", "validate(value){\n value = parseInt(value)\n if(!isNaN(value)){\n throw new Error (\"Tidak boleh angka\")\n }\n }", "validate(value) {\n if (value < 0) return 0;\n else if (value > 5) return 5;\n }", "function ValidarRangoNumerico(id, min, max) {\r\n if (min === void 0) { min = -1; }\r\n if (max === void 0) { max = -1; }\r\n var value = parseInt(document.getElementById(id).value);\r\n if ((max != -1 ? max > value : true) && (min != -1 ? value > min : true)) {\r\n return true;\r\n }\r\n return false;\r\n}", "function validateNumber (inputVal) {\n let inputNum = Number(inputVal);\n if (inputNum || inputVal === '' || inputVal === '.' || Number.isInteger(inputNum)) {\n return true;\n }\n return false;\n}", "function numberIsNumber(userInput) {\n var userInputNumber = parseInt(userInput)\n\n if (Number.isNaN(userInputNumber) && !userInput) {\n\n return false\n }\n return true\n}", "function checkTournamentNumberInput(){\n const isNumberValid = !isNaN(parseInt(tournamentNumberInput.value)) && tournamentNumberInput.value < 99\n\n if(isNumberValid) {\n tournamentNumberErrorMessage.classList.add('hidden')\n } else {\n tournamentNumberErrorMessage.classList.remove('hidden')\n }\n return isNumberValid\n}", "function checkNumber (input, error, extra) {\n if (input.length > extra) {\n return true\n }\n error.classList.remove('hidden')\n return false\n}", "function check(num) {\n if (Number.isNaN(num) || num <= 0) {\n return console.log(\"ERROR!\");\n }\n if (num >= 1000000) {\n return num;\n }\n num *= 10;\n\n return check(num);\n}", "function validateNumberRange(control, min, max, message, showMessage)\n{\n var result = true;\n \n if (control != null && (isNaN(control.value) || control.value < min || control.value > max))\n {\n informUser(control, message, showMessage);\n result = false;\n }\n \n return result;\n}", "function numeroEhValido(numero) {\n if (numero < 0 || numero > 100) {\n return false\n } else {\n return true\n }\n}", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n\t\t if ( n < min || n > max || n != truncate(n) ) {\r\n\t\t raise( caller, ( name || 'decimal places' ) +\r\n\t\t ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n\t\t }\r\n\t\t\r\n\t\t return true;\r\n\t\t }", "function checkbatchnumber() {\r\n var x = new Number;\r\n x = Number(document.getElementById(\"userbatchnumber\").value);\r\n if (isNaN(x) || x < 1 || x > document.getElementById(\"workload\").value) {window.alert(\"Illegal workload! Please enter again!\");} else {\r\n window.alert(\"Success\");\r\n }\r\n}", "function checkInput(value) {\n return !isNaN(value);\n}", "function checkbatchnumber() {\n var x = new Number;\n if(document.getElementById(\"userbatchnumber\") != null){\n x = Number(document.getElementById(\"userbatchnumber\").value);\n if (isNaN(x) || x < 1 || x > document.getElementById(\"workload\").value) {\n window.alert(\"Illegal workload! Please enter again!\");\n } else {\n //window.alert(\"Success\");\n generate_batch_inputs(x);\n }\n }\n\n}", "function validateForm(inputCheck) {\n if ( (isNaN(inputCheck.value)) || (inputCheck.value <= 0) ) {\n document.getElementById(\"errorP\").innerHTML = \"The <span id=\\\"msgError\\\">Number of Nights</span> was not correct. Please input valid positive numbers\";\n document.getElementById(\"errorP\").style.display = \"block\";\n }\n}", "function checkNumber() {\n const divParent = quantity.parentNode\n const quantityReg = new RegExp('^[0-9]+$'); // valeur entre 0 et 9 à entrer\n if (!quantityReg.test(quantity.value)) { // On teste la valeur sur la base de la RegExp\n divParent.setAttribute('data-error-visible', 'true')\n divParent.setAttribute('data-error', 'Vous devez entrer un chiffre positif')\n return false;\n } else {\n divParent.setAttribute('data-error-visible', 'false')\n return true\n }\n}", "function numCheck(){\n let input = document.querySelector('input[type=\"text\"]').value;\n let check = parseInt(input);\n if (isNaN(check) && input != \"\"){\n return false;\n } else {\n return true;\n }\n}", "function myFunction() {\n var x, text;\n\n // Get the value of the input field with id=\"numb\"\n x = document.getElementById(\"numb\").value;\n\n // If x is Not a Number or less than one or greater than 10\n if (isNaN(x) || x < 1 || x > 10) {\n text = \"Input not valid\";\n } else {\n text = \"Input OK\";\n }\n document.getElementById(\"demo\").innerHTML = text;\n}", "function checkInteger( pValue, pName, pMinimum, pMaximum ) \n{\n if ( !checkFormat( pValue, pName, \"integer\", \"\" ) ) \n {\n return false;\n } \n else \n {\n var lNumber = 0 + pValue;\n if ( pMinimum <= pMaximum && lNumber < pMinimum ) \n {\n alert( \"Field: \" + pName + \" contains a number less than the minimum: \" + pMinimum );\n return false;\n }\n if ( lNumber > pMaximum ) \n {\n alert( \"Field: \" + pName + \" contains a number greater than the maximum: \" + pMaximum );\n return false;\n }\n } //end if/else\n\n return true;\n\n} // End function checkInteger", "function validarNumeros(parametro) {\r\n\tif (!/^([0-9])*$/.test(parametro)) {\r\n\t\treturn false;\r\n\t}else {\r\n\t\treturn true;\r\n\t}\r\n}", "function intValidatorWithErrors(n, min, max, caller, name) {\n if (n < min || n > max || n != truncate(n)) {\n raise(caller, (name || 'decimal places') + (n < min || n > max ? ' out of range' : ' not an integer'), n);\n }\n\n return true;\n }", "function EntryCheckForNumbers() {\r\n let userEntry ; \r\n do {userEntry = +prompt('attention please - only Numbers');} \r\n while (userEntry !== +userEntry || userEntry === 0); \r\n console.log ('Thank you very much');\r\n return userEntry;\r\n}", "async function checkBottomRange(input) {\n if (!isNumeric(input)) {\n console.log(\n `\\n${input} is not a valid number. Enter something else please!\\n`\n );\n await getBottomRange();\n } else if (isNumeric(input) === true && parseFloat(input) % 1 != 0) {\n console.log(\"\\nIntegers only, please!\\n\");\n await getBottomRange();\n } else if (isNumeric(input) === true && parseFloat(input) < 0) {\n console.log(\"\\nNo negative numbers, please. Let's try again.\\n\");\n await getBottomRange();\n } else {\n return;\n };\n }", "function validar(num1){\n if(isNaN(num1)){\n return false;\n } else {\n return true;\n }\n}", "function validateNum(num){\n var reg = /^\\d+$/;\n return reg.test(num) || \"Please enter a number!\";\n}", "function validation(){\n\tvar withpeople = document.getElementById(\"switch-people\").checked;\n\tif (withpeople){\n\t\tvar x=document.getElementById(\"people-num\").value;\n\t var regex=/^[0-9]+$/;\n\t if (x.match(regex) == null)\n\t {\n\t \t//alert(\"Must input a number\");\n\t document.getElementById(\"num_alert\").style.display=\"block\";\n\t $(\"#people-num\").focus();\n\t return false;\n\t }\n\t}\n\telse\n\t\tdocument.getElementById(\"people-num\").value = 0;\n}", "function intValidatorWithErrors( n, min, max, caller, name ) {\n\t if ( n < min || n > max || n != truncate(n) ) {\n\t raise( caller, ( name || 'decimal places' ) +\n\t ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\n\t }\n\t\n\t return true;\n\t }", "function intValidatorWithErrors( n, min, max, caller, name ) {\n\t if ( n < min || n > max || n != truncate(n) ) {\n\t raise( caller, ( name || 'decimal places' ) +\n\t ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\n\t }\n\t\n\t return true;\n\t }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n\t if ( n < min || n > max || n != truncate(n) ) {\r\n\t raise( caller, ( name || 'decimal places' ) +\r\n\t ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n\t }\r\n\r\n\t return true;\r\n\t }", "function intValidatorWithErrors( n, min, max, caller, name ) {\n\t if ( n < min || n > max || n != truncate(n) ) {\n\t raise( caller, ( name || 'decimal places' ) +\n\t ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\n\t }\n\n\t return true;\n\t }", "function intValidatorWithErrors( n, min, max, caller, name ) {\n\t if ( n < min || n > max || n != truncate(n) ) {\n\t raise( caller, ( name || 'decimal places' ) +\n\t ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\n\t }\n\n\t return true;\n\t }", "function isValid(value) {\n return value || value === 0;\n}", "function validaMaximo(numero){ \n if (!/^([0-9])*$/.test(numero)||(numero === \"\")){\n alert(\"[ERROR] Stock Maximo invalido\");\n document.getElementById(\"maximo\").value= \"0\"; \n document.getElementById(\"maximo\").focus();\n }\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }", "function intValidatorWithErrors(n, min, max, caller, name) {\n if (n < min || n > max || n != truncate(n)) {\n raise(caller, (name || 'decimal places') + (n < min || n > max ? ' out of range' : ' not an integer'), n);\n }\n\n return true;\n }", "function intValidatorWithErrors(n, min, max, caller, name) {\n if (n < min || n > max || n != truncate(n)) {\n raise(caller, (name || 'decimal places') + (n < min || n > max ? ' out of range' : ' not an integer'), n);\n }\n\n return true;\n }", "function validator(guess){ \n// return true if guess is a valid integer within range \nif (guess > 0 && guess < 101) return true;\n// otherwise, guess is not valid. Return false. \nelse return false;\n// Close Function Definition \n}", "validateValue (value) {\n return TypeNumber.isNumber(value) && !isNaN(value)\n }", "function numericTypeCheck(input) {\r\n return /^-?[0-9]\\d*(\\.\\d+)?$/.test(input);\r\n}", "function lessThanOrEqualToZero(num) {\n if (num <= 0) {\n return true;\n }\n return false;\n}", "function numberCheck(value, valueName){\n if(!Utils.isNumber(value) ){\n handleEmtpyValue(valueName +\" is not a number.\\n\");\n }\n }", "function intValidatorWithErrors( n, min, max, caller, name ) {\n if ( n < min || n > max || n != truncate(n) ) {\n raise( caller, ( name || 'decimal places' ) +\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\n }\n\n return true;\n }" ]
[ "0.7979747", "0.7878278", "0.7802421", "0.77656823", "0.7717826", "0.7703171", "0.7676109", "0.7575973", "0.7508404", "0.7434431", "0.74314135", "0.7429841", "0.7421819", "0.74133444", "0.7400117", "0.7379163", "0.73684", "0.7354481", "0.735385", "0.73500985", "0.73500985", "0.7327965", "0.7311206", "0.7311206", "0.7279865", "0.72783357", "0.7276084", "0.72108424", "0.7181422", "0.71654296", "0.7119357", "0.71021897", "0.70906603", "0.70673543", "0.70647806", "0.7039814", "0.7001522", "0.69884795", "0.69661635", "0.6961926", "0.694043", "0.6939429", "0.6908258", "0.68876183", "0.6875919", "0.6866108", "0.6854818", "0.68440634", "0.6842502", "0.6837907", "0.6835796", "0.68067324", "0.6806488", "0.67858154", "0.67753226", "0.6772848", "0.67697024", "0.67630756", "0.67624784", "0.67562634", "0.6744166", "0.67355454", "0.6733163", "0.67271006", "0.67102873", "0.6696811", "0.66816014", "0.6678938", "0.66721696", "0.6670561", "0.6662026", "0.66617197", "0.66597337", "0.66586316", "0.6645738", "0.6643478", "0.66427445", "0.66396916", "0.66396916", "0.6637801", "0.66287094", "0.66287094", "0.66251713", "0.66185987", "0.6606865", "0.6606865", "0.6606865", "0.6606865", "0.6606865", "0.6606865", "0.6606865", "0.6606865", "0.6605873", "0.6605873", "0.6602874", "0.6602186", "0.6599764", "0.65800244", "0.6574157", "0.65730506" ]
0.7191338
28
user prompt function to capture and validate the id/quantity they would like to purchase
function purchase() { inquirer.prompt([{ name: "item_id", type: "input", message: "What is the ID of the item you would like to purchase?", validate: validateNumber, filter: Number }, { name: "quantity", type: "input", message: "How many units would you like to purchase?", validate: validateNumber, filter: Number } ]).then(function (input) { //capture user response in variables var chosenID = input.item_id; var userAmount = input.quantity; //query mysql table to grab selected item information var queryStr = 'SELECT * FROM products WHERE ?'; connection.query(queryStr, { item_id: chosenID }, function (err, data) { if (err) throw err; //display item selected to verify user input is being captured and correctly pulled from database // console.log(res); // if user amount requested is less than or equal to stock quantity value, subtract value from stock quantity else { var itemData = data[0]; //if the requested amount is less than or equal to the quantity in stock, purchase is valid if (userAmount <= itemData.stock_quantity) { console.log("Sending out your order!"); //capture query string to update table where the item is equal to the user chosen id var updateQueryStr = 'UPDATE products SET stock_quantity = ' + (itemData.stock_quantity - userAmount) + ' WHERE item_id = ' + chosenID; //update the table stock quantity connection.query(updateQueryStr, function (err, data) { if (err) throw err; console.log("Your order is on it's way! The total price is $" + itemData.price * userAmount); connection.end(); }); } else { console.log("Sorry! There is not enough product in stock"); //display table after values are updated start(); } } }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userPurchase() {\n inquirer\n .prompt([\n {\n name: \"id\",\n type: \"input\",\n message: \"\\nWhat's the item ID of the product you would like to buy? \",\n filter: Number\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many items do you wish to buy? \",\n filter: Number\n },\n\n]).then(function(answer) {\n var selectedID = answer.id;\n var numberOfItems = answer.quantity;\n console.log(selectedID, numberOfItems);\n calcPurchase(selectedID, numberOfItems);\n });\n}", "function promptUserPurchase() {\n inquirer.prompt([\n {\n name: \"itemID\",\n message: \"What is the id number of the item you wish to purchase?\"\n },\n {\n name: \"quantity\",\n message: \"How many do you wish to buy?\"\n }\n ]).then(function (answers) {\n if ((answers.itemID === \"x\") || (answers.quantity === \"x\")) {\n process.exit();\n }\n var purchaseItem = answers.itemID;\n var purchaseQty = answers.quantity;\n checkStockQuantity(purchaseItem, purchaseQty);\n });\n}", "function purchaseItem(){\n inquirer.prompt([\n {\n name: \"id\",\n type: \"input\",\n message: \"Please enter item ID of item you would like to purchase.\",\n filter: Number\n },\n {\n name: \"Quantity\",\n type: \"input\",\n message: \"How many would you like to purchase?\",\n filter: Number\n },\n ]).then(function(response){\n var quantity = response.Quantity;\n var itemId = response.id;\n orderItem(itemId, quantity);\n });\n}", "function promptCustomer() {\n inquirer.prompt([{\n name: \"ID\",\n type: \"input\",\n message: \"Please enter Item ID you like to purhcase.\",\n filter: Number\n },\n {\n name: \"Quantity\",\n type: \"input\",\n message: \"How many copies would you like?\",\n filter: Number\n },\n ]).then(function (answers) {\n var quantityNeeded = answers.Quantity;\n var IDrequested = answers.ID;\n purchaseOrder(IDrequested, quantityNeeded);\n });\n}", "function handleUser(){\n inq.prompt([\n {\n name: \"id\",\n message: \"Which product that you want to purchase? Please enter its ID.\",\n validate: function(input){\n input = parseInt(input);\n // User input needs to be integer and has to be a valid id\n return ! (isNaN(input) || input > last_id || input <= 0);\n }\n },\n {\n name: \"quantity\",\n message: \"How many do you want to order?\",\n validate: function(input){\n input = parseInt(input);\n // User input needs to be integer and cannot less than 0\n return ! (isNaN(input) || input < 0 );\n }\n } \n ]).then((ans)=>{\n printReceipt(ans);\n });\n}", "function shopping() {\n inquirer.prompt([\n {\n name: \"idSearch\",\n type: \"input\",\n message: \"Please enter the id of the product you would like.\"\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How much would you like?\"\n }\n ]).then(function (response) {\n //sets inputs to variables and pushes them into the purchase function\n var requestedId = response.idSearch;\n var desiredQuantity = response.quantity;\n purchase(requestedId, desiredQuantity);\n });\n}", "function promptUser() {\n inquirer\n .prompt([\n {\n message: \"Please, insert ID of item you would like to buy\",\n type: \"input\",\n name: \"ID\"\n },\n {\n message: \"How many items would you like to purchase?\",\n type: \"input\",\n name: \"count\"\n }\n ])\n .then(answers => {\n checkQuantity(answers.count, answers.ID);\n });\n }", "function promptUserPurchase() {\n\t// console.log('___ENTER promptUserPurchase___');\n\n\t// Prompt the user to select an item\n\tinquirer.prompt([\n\t\t{\n\t\t\ttype: 'input',\n\t\t\tname: 'item_id',\n\t\t\tmessage: 'Please enter the Item ID which you would like to purchase.',\n\t\t\tvalidate: validateInput,\n\t\t\tfilter: Number\n\t\t},\n\t\t{\n\t\t\ttype: 'input',\n\t\t\tname: 'quantity',\n\t\t\tmessage: 'How many do you need?',\n\t\t\tvalidate: validateInput,\n\t\t\tfilter: Number\n\t\t}\n\t]).then(function(input) {\n\t\t// console.log('Customer has selected: \\n item_id = ' + input.item_id + '\\n quantity = ' + input.quantity);\n\n\t\tvar item = input.item_id;\n\t\tvar quantity = input.quantity;\n\n\t\t// Query db to confirm that the given item ID exists in the desired quantity\n\t\tvar queryStr = 'SELECT * FROM products WHERE ?';\n\n\t\tconnection.query(queryStr, {item_id: item}, function(err, data) {\n\t\t\tif (err) throw err;\n\n\t\t\t// If the user has selected an invalid item ID, data attay will be empty\n\t\t\t// console.log('data = ' + JSON.stringify(data));\n\n\t\t\tif (data.length === 0) {\n\t\t\t\tconsole.log('ERROR: Invalid Item ID. Please select a valid Item ID.');\n\t\t\t\tdisplayInventory();\n\n\t\t\t} else {\n\t\t\t\tvar productData = data[0];\n\n\t\t\t\t// console.log('productData = ' + JSON.stringify(productData));\n\t\t\t\t// console.log('productData.stock_quantity = ' + productData.stock_quantity);\n\n\t\t\t\t// If the quantity requested by the user is in stock\n\t\t\t\tif (quantity <= productData.stock_quantity) {\n\t\t\t\t\tconsole.log('Congratulations, the product you requested is in stock! Placing order!');\n\n\t\t\t\t\t// Construct the updating query string\n\t\t\t\t\tvar updateQueryStr = 'UPDATE products SET stock_quantity = ' + (productData.stock_quantity - quantity) + ' WHERE item_id = ' + item;\n\t\t\t\t\t// console.log('updateQueryStr = ' + updateQueryStr);\n\n\t\t\t\t\t// Update the inventory\n\t\t\t\t\tconnection.query(updateQueryStr, function(err, data) {\n\t\t\t\t\t\tif (err) throw err;\n\n\t\t\t\t\t\tconsole.log('Your oder has been placed! Your total is $' + productData.price * quantity);\n\t\t\t\t\t\tconsole.log('Thank you for shopping with us!');\n\t\t\t\t\t\tconsole.log(\"\\n---------------------------------------------------------------------\\n\");\n\n\t\t\t\t\t\t// End the database connection\n\t\t\t\t\t\tconnection.end();\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('Sorry, there is not enough product in stock, your order can not be placed as is.');\n\t\t\t\t\tconsole.log('Please modify your order.');\n\t\t\t\t\tconsole.log(\"\\n---------------------------------------------------------------------\\n\");\n\n\t\t\t\t\tdisplayInventory();\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t})\n}", "function startpurchase() {\n inquirer\n .prompt([\n {\n name: \"itemID\",\n type: \"input\",\n message: \"What is the ID of the product you wish to purchase?\",\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many units would you like to buy?\"\n }\n ]).then(function(inquirerResponse) {\n userAnswer = {\n item_id: parseInt(inquirerResponse.item_id),\n quantity: parseInt(inquirerResponse.quantity)\n }\n {\n checkStore(userAnswer);\n }\n })\n}", "function orderPrompt(greatestId){\n inquirer.prompt([\n {\n name: \"id\",\n message: \"Which item would you like to purchase(id)?\".question,\n validate: function(input){\n // Input must be a positive number that cannot be greater than the id of the last product in database\n if(input > greatestId || !numberRegex.test(input)){\n console.log(\"\\n Please enter a valid Id\".error);\n return false;\n }\n else{\n return true;\n }\n }\n },\n {\n name: \"quantity\",\n message: \"How many would you like to purchase?\".question,\n validate: function(input){\n // Input must be a whole number\n if(numberRegex.test(input)){\n return true;\n }\n else{\n console.log(\"Please enter whole numbers\".error);\n return false;\n }\n }\n }\n ]).then(function(input){\n var id = input.id;\n var quantity = input.quantity;\n console.log(\"\\n Checking out...\".cyan);\n checkStorage(id, quantity);\n })\n}", "function purchaseItem() {\n\tinquirer.prompt([{\n\t\tname: \"puchaseItemID\",\n\t\ttype: \"input\",\n\t\tmessage: \"What is the ID Number of the item you'd like to purchase?\",\n\t\tvalidate: function(value) {\n\t\t\tif (value >= 1 && value <= 12) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}, \n\n\t{\n\t\tname: \"purchaseQty\",\n\t\ttype: \"input\",\n\t\tmessage: \"How many of this item would you like to purchase?\",\n\t\tvalidate: function(value) {\n\t\t\tif (value) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\t\t\n\t}]).then(function(response) {\n\t\t// connection.query(\"SELECT * FROM products\", function(err, res) {\n\t\t\t// console.log(res);\n\t\t// });\n\t\torderItem(response);\n\t});\n}", "function customerSelect () {\n inquirer.prompt([\n {\n type: 'input',\n name: 'item_num',\n validate: (test_value) => { // check for an integer number > 0\n return (/^\\d*$/.test(test_value) && test_value > 0) ? true : 'Enter a whole number greater than zero';\n },\n message: 'Enter the Item ID (# above) of the product you wish to purchase'\n },\n {\n type: 'input',\n name: 'item_qty',\n validate: (test_value) => { // check for an integer number > 0\n return (/^\\d*$/.test(test_value) && test_value > 0) ? true : 'Enter a whole number from the list above.';\n },\n message: `Enter the quantity you wish to purcahse`\n }\n ])\n .then( (result) => {\n let id = result.item_num;\n let qty = result.item_qty;\n //console.log(id,qty);\n fillOrder(id, qty);\n });\n}", "function requestProduct() {\n inquirer.\n prompt([{\n name: \"productID\",\n type: \"input\",\n message: \"What product would you like to buy? (Enter Product ID #)\",\n validate: validateInput,\n filter: Number\n }, {\n name: \"productUnits\",\n type: \"input\",\n message: \"How many units would you like to buy?\",\n validate: validateInput,\n filter: Number\n\n }]).then(function (input) {\n completePurchase(input);\n\n });\n}", "function purchase() {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"itemID\",\n message: \"What is the ID of the item you would like to purchase?\",\n validate: function(value) {\n if (isNaN(value) === false && value !== '' && parseInt(value) > 0) {\n return true;\n } else {\n console.log(\"\\nPlease enter a valid ID.\");\n return false;\n }\n }\n },\n {\n type: \"input\",\n name: \"itemQuantity\",\n message: \"How many would you like?\",\n validate: function(value) {\n if (isNaN(value) === false && value !== '' && parseInt(value) > 0) {\n return true;\n } else {\n console.log(\"\\nPlease enter a valid quantity.\");\n return false;\n }\n }\n }\n ])\n .then(function(choice) {\n //console.log(\"User's choice: \", choice);\n\n var currentItem = currentInventory.filter(\n item => item.id === parseInt(choice.itemID)\n );\n \n // Above function if written in longer form\n // var currentItem = currentInventory.filter(function(item) {\n // return item.id === parseInt(choice.itemID);\n // });\n\n //console.log(\"currentItem\", currentItem);\n //console.log(\"choice.itemQuantity\", parseInt(choice.itemQuantity));\n //console.log(\"currentItem.stock_quantity\", currentItem[0].stock_quantity);\n \n // if item ID given by the customer does NOT match the ID in the 'products' table\n if (currentItem.length == 0) {\n console.log(\"Sorry that item doesn't exist\");\n // ask customer if they want to move onto a different purchase\n confirmNextPurchase();\n\n //if item ID given by the customer DOES match the ID in the 'products' table\n } else {\n // If the quantity requested is LESS THAN OR EQUAL to the stock quantity\n if (parseInt(choice.itemQuantity) <= currentItem[0].stock_quantity) {\n //fulfill order\n //console.log(\"Enough quantity\");\n console.log(\"You have picked \" + choice.itemQuantity + \" of the \" + currentItem[0].product_name + \".\")\n var cost = parseInt(choice.itemQuantity) * currentItem[0].price;\n console.log(\"Please pay the total of $\" + cost + \" before moving onto the next purchase!\")\n \n // Check if the customer paid\n paidOrUnpaid( function(isPaid) {\n if(isPaid){\n // ONLY update the inventory (aka the 'products' table) if the customer has PAID\n\n //console.log('isPaid working');\n var updatedStock = currentItem[0].stock_quantity - choice.itemQuantity;\n //console.log(\"updatedStock\", updatedStock);\n\n // UPDATE the 'stock_quantity' in the 'products' table using the product ID chosen by the customer after the purchase\n updateInventory(parseInt(choice.itemID), updatedStock);\n confirmNextPurchase();\n // Ends connection if the amount is NOT PAID\n } else {\n console.log(\"The amount is not paid.\");\n connection.end();\n }\n });\n // If the quantity requested is GREATER THAN the stock quantity\n } else {\n // Alert customer about the quantity left\n console.log(\"Insufficient quantity!\");\n console.log(\"We only have \" + currentItem[0].stock_quantity + \" of the \" + currentItem[0].product_name + \" left.\")\n // Ask if customer would like to move onto a new purchase\n confirmNextPurchase();\n }\n }\n });\n}", "function purchaseQuestions() {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"id\",\n message: \"Enter the ID of the product you would like to purchase.\"\n },\n {\n type: \"input\",\n name: \"amount\",\n message: \"How many units would you like?\"\n }\n ]).then(function (answer) {\n productId = answer.id;\n quantity = answer.amount;\n itemPurchase();\n })\n}", "function customerPrompt() {\r\n inquirer\r\n .prompt([{\r\n name: \"item_id\",\r\n type: \"input\",\r\n message: \"What is the ID of the product you would like to purchase?\",\r\n },\r\n\r\n {\r\n name: \"quantity\",\r\n type: \"input\",\r\n message: \"How many of this product would you like to purchase?\",\r\n\r\n\r\n }]).then(function (answer) {\r\n connection.query(\"SELECT item_id, product_name, department_name, price, stock_quantity FROM products WHERE?\", { item_id: answer.item_id }, function (err, res) {\r\n for (var i = 0; i < res.length; i++)\r\n if (res[i].stock_quantity >= answer.quantity) {\r\n \r\n console.log(\"There is sufficient stock to fill this order\" );\r\n }\r\n else {\r\n console.log(\"Insufficient stock, order cannot be completed, please try again\");\r\n\r\n }\r\n \r\n connection.end();\r\n })\r\n })\r\n }", "function mainPrompt() {\n inquirer.prompt([\n {\n type: \"input\",\n name: \"itemID\",\n message: \"Please enter the item ID of the item you would like to purchase.\",\n },\n {\n type: \"input\",\n name: \"quantity\",\n message: \"How many would you like to purchase?\"\n }\n ]).then(function(answer) {\n \n // Necessary to turn the string into an integer for future calculations\n purchaseQuantity = parseInt(answer.quantity);\n itemID = answer.itemID;\n\n // Error checking...looking to see if it the item ID selected is in range\n if (itemID < 1 || itemID > lastItemID) {\n console.log(\"\\n**** You did not enter a valid Item ID. Please try again.\\n\");\n start();\n } else {\n purchaseItem();\n }\n });\n} // End mainPrompt function", "function purchase() {\n connection.query(\"SELECT * FROM products\", function (err, res) {\n if (err) throw err;\n console.table(res);\n inquirer.prompt([{\n name: \"itemId\",\n type: \"number\",\n message: \"Enter the item ID of the item you want to buy.\".brightYellow\n },\n {\n name: \"itemQuantity\",\n type: \"number\",\n message: \"Excellent Choice! How many would you like?\".brightYellow\n }]).then(function (answer) {\n saleItem = answer.itemId - 1;\n saleQuantity = answer.itemQuantity;\n checkInv()\n\n });\n\n });\n\n}", "function buyPrompt() {\n inquirer\n .prompt([\n {\n name: \"prodChoice\",\n type: \"input\",\n message: \"What's the ID of the product you'd like to purchase?\",\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n },\n {\n name: \"count\",\n type: \"input\",\n message: \"How many units would you like to purchase?\",\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ])\n .then(function (answer) {\n\n checkPurchase(answer.prodChoice, answer.count);\n\n });\n}", "function userInput(){\n\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"itemId\",\n message: \"Type the ID of the item you would like to purchase\"\n },\n {\n type: \"input\",\n name: \"itemQuantity\",\n message: \"How many?\"\n }\n ])\n .then(answer => {\n \n var id = answer.itemId;\n var quantity = answer.itemQuantity;\n\n getProductQuantity(id,quantity);\n\n })\n }", "function whatToBuy() {\n inquirer.prompt([\n {\n type: \"input\",\n name: \"itemID\",\n message: \"Enter the Item ID of the item would you like to purchase\",\n validate: function (input) {\n if (isNaN(input)) {\n return \"Enter the product number\";\n } else {\n return true;\n }\n }\n }\n ]).then(function (user) {\n itemToBuy = user.itemID;\n // after user input is entered, call checkIfItem function\n checkIfItem();\n });\n}", "function promptForId(inventory) {\n inquirer\n .prompt([{\n name: \"item_id\",\n type: \"input\",\n message: \"What is the id of the product you would like to buy?\",\n // validates that the response is a number value\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ])\n .then(function (answer) {\n\n var id = parseInt(answer.item_id);\n // product = whole row resulting from checkinventory fxn\n var product = checkInventory(id, inventory);\n if (product) {\n promptForQuantity(product);\n } else {\n console.log(\"the item id is invalid\");\n readProducts();\n }\n });\n}", "function promptBuy() {\n\n //storing the item the user selects for validation in the second prompt\n var userItem = {\n id: 0,\n quantity: 0\n };\n inquirer.prompt([\n {\n type: \"input\",\n message: \"Please enter the [ID] for the item you would like to purchase\",\n name: \"id\",\n validate: function (value) {\n var isValid = false;\n\n //validates that the value entered matched an id for an item in stock\n for (var index in stock) {\n if (stock[index].ItemID == parseInt(value)) {\n isValid = true;\n //stores the data from the item the user selected in the local var to use later\n userItem.id = stock[index].ItemID;\n userItem.quantity = stock[index].StockQuantity;\n }\n }\n return (isValid) ? isValid : \"Please enter a valid [ID]\";\n\n }\n },\n {\n type: \"input\",\n message: \"Please enter the quantity you would like to purchase\",\n name: \"quantity\",\n validate: function (value) {\n var isValid = false;\n\n //validates that the quantity entered is a number\n if (isNaN(value) == false) {\n\n //validates that there is enough quantity in stock for the user to be able to purchase the quantity entered.\n for (var index in stock) {\n if (userItem.id == stock[index].ItemID && userItem.quantity >= parseInt(value)) {\n isValid = true;\n }\n }\n return (isValid) ? isValid : \"We do not have enough stock for that order\";\n } else {\n return \"Please enter a valid number\";\n }\n\n }\n }\n ]).then(function (buy) {\n //runs the buy update function\n buyUpdate(buy.id, buy.quantity);\n });\n}", "function askProductID(results){\n \n inquirer\n .prompt ([\n {\n type: \"Input\",\n name:\"selection\",\n message:\"What is the id for the item you want to buy?\"\n }\n\n ])\n .then (function (Input) {\n \n var selectionId = parseInt(Input.selection);\n \n var product=checkInventory(selectionId, results);\n\n //if product with selected id exists ask the user for quantity \n if(product){\n askForQuantity(product);\n }else \n {\n //if product was not found \n console.log(\"selected item is out of stock, please select another item from the list \")\n displyProducts();\n }\n });\n}", "function askUserForOder(){\n inquire.prompt([\n {\n type: \"input\",\n message: \"Enter item ID to purchase: \",\n name: \"itemID\"\n },\n {\n type: \"input\",\n message: \"Enter quantity to purchase: \",\n name: \"quantity\"\n }\n ]).then(function(inquirerResponse) {\n // console.log(inquirerResponse);\n // console.log(inquirerResponse.itemID);\n\n //loop itmes array to check if id entered exists and if not tell user. this piece I will code later.\n let validID = false;\n for (let j in itemsAvailable){\n if (itemsAvailable[j].itemid === parseInt(inquirerResponse.itemID)){\n validID = true; \n }\n }\n // check if no selection restart app\n if(!validID || inquirerResponse.itemID === \"\" || inquirerResponse.quantity === \"\"){\n console.log('A valid selection is needed !!');\n proceed();\n }else{\n var qString = \"\";\n var totalcost=0;\n const customerQuantity = parseInt(inquirerResponse.quantity);\n // query database to check if in stock\n qString = \"SELECT stock_quantity,price FROM products WHERE item_id =\"+parseInt(inquirerResponse.itemID);\n \n connection.query(qString,function(err,results){\n if(err) throw err;\n // console.log(results);\n // console.log(results[0].stock_quantity);\n\n //compare quantity to order and actual stock\n if(customerQuantity > results[0].stock_quantity){\n console.log('Your order exceeds items in stock.');\n console.log('Only '+results[0].stock_quantity+' item(s) in stock.');\n console.log(\"Your order was unsuccessful\");\n console.log(\"Please revise your order.\");\n initializeApp();\n }else{\n //place order and update stock.\n totalcost = results[0].price * customerQuantity;\n qString = \"UPDATE products SET stock_quantity = stock_quantity -\"+customerQuantity+\" WHERE ?\"\n connection.query(qString,\n [\n {\n item_id:parseInt(inquirerResponse.itemID)\n }\n ],function(err,results){\n if(err) throw err;\n console.log(\"Your order was successful. \\nYour order total is: \"+\"$\"+totalcost+\" \\nThank you\");\n proceed();\n });\n } \n });\n }\n });\n}", "function prompt() {\n inquirer\n .prompt([\n {\n // The first should ask them the ID of the product they would like to buy.\n name: \"itemID\",\n type: \"input\",\n message: \"What is the ID of the item you would like to purchase?\"\n },\n {\n //The second message should ask how many units of the product they would like to buy.\n name: \"numUnits\",\n type: \"input\",\n message: \"How many units would you like?\"\n }\n ])\n .then(function(answer) {\n // console.log(answer.itemID);\n // console.log(answer.numUnits);\n checkItem(answer.itemID, answer.numUnits);\n });\n }", "function purchase(quantityRemaining, quantityRequest, price, id) {\n if (quantityRemaining < quantityRequest) {\n inquirer\n .prompt({\n name: \"editRequest\",\n type: \"rawlist\",\n message:\n \"Insufficient quantity to fullfill order. Would you like to change your request to a smaller value?\",\n choices: [\"Yes\", \"No\"]\n })\n .then(function(data) {\n if (data.confirm === \"No\") {\n console.log(\"Thank you for your business!\");\n connection.end();\n } else {\n runSearch();\n }\n });\n } else {\n total = total + price * quantity;\n connection.query(\n \"UPDATE products SET stock_quantity = stock_quantity - \" +\n quantity +\n \" WHERE ?\",\n [\n {\n item_id: id\n }\n ],\n //alert user of the balance for their current request, if they want to make additional purchases \n //then price and quantity is added to the \"total\" variable.\n function(err, res) {\n if (err) throw err;\n\n inquirer\n .prompt({\n name: \"confirm\",\n type: \"rawlist\",\n message:\n \"\\nYour total for this transaction is: $\" +\n (price * quantity).toString() +\n \". Would you like to make another purchase?\",\n choices: [\"Yes\", \"No\"]\n })\n .then(function(data) {\n if (data.confirm === \"No\") {\n console.log(\"\\nThe total for today is: $\" + total.toString());\n connection.end();\n } else {\n runSearch();\n }\n });\n }\n );\n }\n}", "function prompt(){\n\tinquirer.prompt([{\n\t\tname: \"buy_item\",\n\t\ttype: \"input\",\n\t\tmessage: \"What would you like to purchase? (Type in Item ID)\",\n\t\tvalidate: function(val){//http://simiansblog.com/2015/05/06/Using-Inquirer-js/\n\t\t\tif (isNaN(val) === false){\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t},\n\t{\n\t\tname: \"buy_quant\",\n\t\ttype: \"input\",\n\t\tmessage: \"Hom many would you like?\",\n\t\tvalidate: function(val){ //or can read https://www.npmjs.com/package/inquirer\n\t\t\tif (isNaN(val) === false) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\t}]).then(function(res) {\n\t\tvar item = parseInt(res.buy_item); //user inputted item id: assumption that database will not change item id\n\t\tvar quant = parseInt(res.buy_quant); //user will give quantity\n\t\tvar product = productArr[item-1]; //get the product from the stored array list\n\t\t// this is instead of doing another query call to database, which probably is best if database is really large; don't want to be storing everything in js meomry\n\t\tif (quant > product.quant) {\n\t\t\tconsole.log(\"Not enough items in stock; there are only \"+product.quant+\" left!\");\n\t\t\tconsole.log(\"Please re-select: \");\n\t\t\tprompt(); //user will have to re-select what and how many they will buy\n\t\t}\n\t\telse {\n\t\t\tdisplay(product);\n\t\t\tvar total = quant*product.price;\n\t\t\tconsole.log(\"your total comes to $\"+total);\n\n\t\t\tinquirer.prompt([{\n\t\t\t\tname: \"confirm\",\n\t\t\t\ttype: \"confirm\",\n\t\t\t\tmessage: \"Confirm purchase?\",\n\t\t\t\tdefault: true\n\t\t\t}]).then(function(res){\n\t\t\t\tif (res.confirm){\n\t\t\t\t\tvar left = product.quant - quant;\n\t\t\t\t\tconsole.log(\"Purchase successful!!\");\n\t\t\t\t\tinventory(item, left);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//if don't want to purchase can end session\n\t\t\t\t\tconsole.log(\"Good Bye! Thanks for coming\");\n\t\t\t\t\tconnection.end();\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t});\n}", "function promptBuy(){\n var query = \"SELECT productID FROM products\"; \n connection.query(query, (err, result) => {\n if(err) throw err;\n inquirer.prompt([\n {\n name: \"getItem\",\n type: \"list\",\n message: \"Select the ID number of the product you wish to buy:\",\n choices: function(){\n var itemsArr = [];\n for(var i = 0; i < result.length; i++){\n itemsArr.push(`${result[i].productID}`);\n }\n return itemsArr;\n }\n },\n {\n name: \"getUnits\",\n message: \"How many units would you like to purchase?\",\n type: \"input\",\n validate: function(value){\n if (value.length){\n return true; \n } else{\n return \"Sorry, you must enter a quantity\"; \n } \n }\n }\n ]).then(answer => {\n console.log(\"Checking to see if enough inventory...\");\n checkInventory(answer); \n })\n }) \n}", "function promptCustomer() {\n\tinquirer.prompt([\n\t{\n\t\tname: \"id\",\n\t\ttype: \"input\",\n\t\tmessage: \"\\nPlease input the ID number of the item you would like to purchase\"\n\t}, {\n\t\tname: \"quantity\",\n\t\ttype: \"input\",\n\t\tmessage: \"\\nHow many of this item would you like to purchase?\"\n\t}\n\t]).then(function(response) {\n\t\tchosenId = parseFloat(response.id);\n\t\tchosenQuant = parseFloat(response.quantity);\n\t\tvar chosenItem;\n\t\tconnection.query(\"SELECT * FROM products\", function(err, res) {\n\t\t\tif (err) throw err;\n\t\t\tfor (var i = 0; i < res.length; i++) {\n\t\t\t\tif (res[i].item_id === chosenId) {\n\t\t\t\t\tchosenItem = res[i];\n\t\t\t\t};\n\t\t\t};\n\t\t\t// console.log(chosenItem.product_name); //for debugging\n\t\t\tif (chosenItem.stock_quantity < chosenQuant) {\n\t\t\t\tconsole.log(\"\\nWe do not have enough of this item in stock.\\n\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar totalCost = chosenItem.price * chosenQuant;\n\t\t\t\tvar newStockQuant = chosenItem.stock_quantity - chosenQuant;\n\t\t\t\t// console.log(newStockQuant);\n\t\t\t\t// console.log(chosenItem.stock_quantity);\n\t\t\t\t// console.log(chosenId);\n\t\t\t\tconsole.log(\"\\nThank you for your order. Your total is $\" + totalCost +\"\\n\");\n\t\t\t\t//function that updates inventory quantity\n\t\t\t\tconnection.query(\n\t\t\t\t\t\"UPDATE products SET ? WHERE ?\",\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstock_quantity: newStockQuant\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titem_id: chosenId\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\tfunction(err, res) {\n\t\t\t\t\t\tif (err) throw err;\n\t\t\t\t\t\t// console.log(\"Quantity updated\");\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\t\t\t// quantityCheck();\n\t\t\tconnection.end();\n\t\t});\n\t});\n}", "function addToInventory(){\n // viewProducts();\n\n inquirer\n .prompt([\n // Here we create a basic text prompt.\n {\n type: \"input\",\n message: \"What item (ID) would you like to update?\",\n name: \"id\", \n // validate: function validateID(name){\n \n // if(isNaN(name)===true){\n // console.log('\\nBe sure to specify the correct ID as a number!')\n // return false;\n // }\n // else if(name === \"\"){\n // console.log('\\nBe sure to specify the correct ID as a number!')\n // return false;\n // }\n // else {\n // return true;\n // }\n // }\n },\n {\n type: \"input\",\n message: \"How many would you like to order and add to the stock (whole number)?\",\n name: \"qty\", \n // validate: function validateID(name){\n \n // if(isNaN(name)===true){\n // console.log('\\nBe sure to specify the correct ID as a number!')\n // return false;\n // }\n // else if(name === \"\"){\n // console.log('\\nBe sure to specify the correct ID as a number!')\n // return false;\n // }\n // else {\n // return true;\n // }\n // }\n },\n\n ])\n .then(function(response) {\n getQty(response.id, response.qty); \n });\n}", "function userPurchase() {\n inquirer.prompt([\n {\n name: \"itemId\",\n message: \"ENTER THE ID OF THE ITEM YOU WISH TO PURCHASE\",\n type: \"input\",\n validate: function (value) {\n if (isNaN(value) === true || value == 0) {\n return false;\n }\n return true;\n }\n },\n {\n name: \"units\",\n message: \"HOW MANY UNITS WOULD YOU LIKE TO PURCHASE? (TYPE Q TO QUIT)\",\n type: \"input\"\n }\n ]).then(function (answer) {\n // In case the user changed their mind, they can type 'q' and it'll take them back to the starting prompt.\n if (answer.units.toLowerCase() === \"q\") {\n askUser();\n }\n else {\n // Converting the users input into numbers so it can be compared to the table's numerical values.\n answer.itemId = parseInt(answer.itemId);\n answer.units = parseInt(answer.units);\n\n var query = \"SELECT * FROM products WHERE item_id=?\";\n connection.query(query, answer.itemId, function (err, results) {\n if (err) throw err;\n\n // If there isn't as much of the product in stock as the user wanted to order, display message to them.\n if (answer.units > results[0].stock_quantity) {\n console.log(\"\\nNOT ENOUGH OF '\" + results[0].product_name + \"' IN STOCK!\\n\");\n askUser();\n } else {\n // If there is enough of the product in stock, run the function that handles updating the table data.\n // Passing the relevant data as arguements.\n validQuantity(answer.itemId, answer.units, results[0]);\n }\n });\n }\n });\n}", "function buyThis(){\n inqurier.prompt([\n {\n message: \"What is the ITEM ID of the PRODUCT you would like to buy?\",\n name: \"id\"\n },\n { \n message: \"How many UNITS would you like to buy?\",\n name: \"purchase\",\n },\n ]).then(function(answer){\n //convert to integers\n var id = parseInt(answer.id);\n var quantity = parseInt(answer.purchase)\n\n //purcahse logic\n\n if (isNaN(answer.id) == true || id <=0 || id > resultArray.length) {\n //error message for invalid number entry \n console.log(\"Error: INVALID ITEM ID\")\n }\n else if (isNan(answer.purcahse) == true || quantity <= 0){\n //error for purchasing zero items\n console.log(\"You must order more than one\")\n }\n else if (quantity > resultArray[id -1].stock_quantity){\n //error for not enough stock \n console.log(\"WE ARE OUT OF THAT\")\n }\n else {\n //for a sucessful order\n purchaes.push(resultArray[id - 1].product_name);\n amounts.push(quantity);\n\n //total of curent order and total order\n var orderCost = quantity * resultArray[id-1].price;\n orderCost = parseFloat(orderCost.toFixed(2));\n total += orderCost;\n total = parseFloat(total.toFixed(2))\n\n sales = resultArray[id - 1].product_sales + orderCost;\n\n console.log(\"You have selected ITEM\" + id + \",\" + resultArray[id - 1].product_name + \".\" )\n console.log(\"This item costs $\" + resultArray[id - 1].price + \" per unit. You have ordered \" + quantity + \" units.\");\n console.log(\"This purchase costs $\" + orderCost + \".\");\n \n //display quantites and ordered as well as cost\n console.log(\"YOU HAVE ORDERED\")\n for (var i = 0; i < purchaes.length; i++){\n console.log(amounts[i] + \"|\" + purchaes[i]);\n }\n console.log(\"mYour total cost is \" + total + \".\");\n\n\t\t\t// query to update the database\n\t\t\tupdate = \"UPDATE products SET stock_quantity = \" + (resultArray[id - 1].stock_quantity - quantity) + \", product_sales = \" + sales + \" WHERE item_id = \" + id;\n\n\t\t\t// updates the database\n\t\t\tconnection.query(update, function (error, results, fields) {\n\t\t\t\tif (error) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t};\n });\n keepGoing();\n }\n })\n}", "function go() {\n inquirer.prompt([\n {\n message: \"Enter the product id\",\n name: \"id_input\",\n type: \"input\",\n vaidate: validateNum\n },\n {\n message: \"How many units would you like to purchase\",\n name: \"amount_input\",\n type: \"input\",\n validate: validateNum\n }\n]).then(function(answers) {\n findID(answers);\n })\n}", "function buyItem () {\n inquirer.prompt([\n {\n type:\"input\",\n name:\"itemSelected\",\n message:\"Please type an item id to purchase.\"\n },\n {\n type:\"input\",\n name:\"quantity\",\n message:\"How many would you like to purchase?\"\n }\n ]).then(function (results) {\n itemSelected = results.itemSelected;\n quantity = Number(results.quantity);\n \n if (itemSelected > 10) {\n console.log(\"Invalid item, please select a new item.\")\n buyItem();\n }\n \n checkItemStock();\n });\n}", "function quantity(res){\n console.log(\" \");\n inquirer.prompt(\n {\n name: \"purchaseQty\",\n type: \"text\",\n message: \"How many would you like to purchase?\"\n }\n )\n .then(function(answer2) {\n if (answer2.purchaseQty == 0) {\n //User selected 0 products to purchase, so exit this question and go back up to the products selection\n products(res);\n }\n else if (answer2.purchaseQty < 1 || answer2.purchaseQty < '1' || answer2.purchaseQty > 999 || answer2.purchaseQty > '999') {\n //User made invalid selections, so display a message and ask for the quantity again\n console.log(\"\\nINVALID ENTRY!\".yellow)\n quantity(res);\n }\n else if (selectedStockQty == 0) {\n //The item selected is out of stock (out of stock items were already not displayed, but this is a safeguard)\n console.log(\"\\nSORRY, THAT ITEM IS CURRENTLY OUT OF STOCK!\".red);\n products(res);\n }\n else if (answer2.purchaseQty > selectedStockQty) {\n //User selected a quantity that is greater than what is in stock, so display qhat is in stock, and ask quantity again\n console.log(\"\\nSORRY, INSUFFICIENT QUANTITY! \".red + selectedStockQty + \" in stock. Please enter a lower amount:\");\n quantity(res);\n }\n else {\n //User entered valid quantity, proceed to complete the purchase\n var selectedPurchaseQty = answer2.purchaseQty;\n makePurchase(selectedStockQty, selectedPurchaseQty);\n };\n });\n }", "function purchase(action = \"\") {\n if (action == \"init\") {\n }\n\n // Prompt the user to enter Product's item_id to review detail of the product:\n inquirer.prompt([\n {\n name: \"ID\",\n type: \"input\",\n message:\n \"Enter the product's item ID to review detail. [Quit with Ctrl+C]\",\n filter: Number,\n validate: function(val) {\n return !isNaN(val);\n }\n },\n {\n name: \"qty\",\n type: \"input\",\n message: \"OK, how many would you like to buy? \",\n filter: Number,\n validate: function(value) {\n if (isNaN(value) == false) {\n return true;\n } else {\n return false;\n }\n }\n }\n ]).then(function(userInput) {\n connection.query(\"SELECT * FROM products WHERE item_id = ?\", [userInput.ID], function(err, inventoryRes) {\n if (err) {\n console.log(\"ERROR: \", err);\n }\n console.log(\"\");\n console.log(\n \"====================\",\n \"\\nPRODUCT DETAIL: \",\n inventoryRes,\n \"\\n====================\"\n );\n console.log(\"\");\n purchaseItem(userInput.ID, userInput.qty);\n });\n });\n // *** This is the end of the function purchase() ***\n}", "function promptItemQty() {\n inquirer.prompt([\n {\n name: \"quantity\",\n type: \"number\",\n message: \"Please enter the quantity you would like to order: \"\n }\n\n ])\n .then(function(answer3){\n if(answer3.quantity > 0){\n console.log(\"Your quantity is: \" + answer3.quantity + \".\\n\");\n itemOneQty = parseInt(answer3.quantity);\n console.log(\n \">>>Checking inventory...\\n\");\n inventoryCheck();\n }\n else {\n console.log(\"\\nYou didn't enter a quantity\\n\");\n retryItemQty();\n }\n });\n}", "function promptUser() {\n\n\tinquirer.prompt([\n\t\t{\n\t\t\ttype: 'input',\n\t\t\tname: 'item_id',\n\t\t\tmessage: 'Please enter the Item ID of the item you wish to purchase',\n\t\t\tvalidate: validateInput,\n\t\t\tfilter: Number\n\t\t},\n\t\t{\n\t\t\ttype: 'input',\n\t\t\tname: 'quantity',\n\t\t\tmessage: 'Please enter quantity',\n\t\t\tvalidate: validateInput,\n\t\t\tfilter: Number\n }\n ])\n .then(function(input) {\n\n var item = input.item_id;\n\t\tvar quantity = input.quantity;\n\n var check_db = 'SELECT * FROM products WHERE ?';\n\n connection.query(check_db, {item_id: item}, function(err, data) {\n if (err) throw err;\n \n if (data.length === 0) {\n\t\t\t\tconsole.log('Invalid Item ID. Please select a valid Item ID.');\n\t\t\t\tproductList();\n\n\t\t\t} else {\n var productData = data[0];\n \n if (quantity <= productData.stock_quantity) {\n\n var update_db = 'UPDATE products SET stock_quantity = ' + (productData.stock_quantity - quantity) + ' WHERE item_id = ' + item;\n\n\n connection.query(update_db, function(err, data) {\n\t\t\t\t\t\tif (err) throw err;\n\n console.log('Your total is $' + productData.price * quantity);\n console.log('Thank you for shopping with us!');\n\t\t\t\t// End the database connection\n //connection.end();\n productList();\n\t\t\t\t\t})\n\t\t\t\t} else {\n console.log('Sorry, the quantity you requested is not in stock.')\n console.log('Please modify your search and try again')\n\t\t\t\t\tproductList();\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t})\n}", "function userItemChoice(inventory){\n inquirer.prompt([\n {\n type: \"input\",\n name: \"choice\",\n message: \"Enter the ID of the item you would like to purchase [exit with q]\",\n\n // include a way to check if the input is a matching id number with an if/else statement, validate?\n\n validate: function(val) {\n return !isNaN(val) || val.toLowerCase() === \"q\";\n }\n }\n ]).then(function(val) {\n\n // save user quantity input to compare with the stock\n // turn string into a number\n\n quitShopping(val.choice);\n let chosenItemId = parseInt(val.choice);\n let itemName = checkInventory(chosenItemId, inventory);\n\n // prompt customer with desired quantity if there is a matching product ID in the database from other function\n // console log if not enough\n if (itemName) {\n userQuantityChoice(itemName);\n } else {\n console.log(\"Sorry, we do not have that item\");\n // send customer back to the product list\n displayProducts();\n }\n });\n}", "function start() {\n inquirer.prompt([ \n {\n name: \"ID\",\n type: \"input\",\n message: \"What item would you like to by?\", \n filter:Number\n },\n {\n name:\"Quantity\",\n\t\ttype:\"input\",\n\t\tmessage:\"How many items do you wish to purchase?\",\n\t\tfilter:Number\n\t},\n\n ]).then(function(answers){\n \tvar quantityNeeded = answers.Quantity;\n \tvar IDrequested = answers.ID;\n \tpurchaseOrder(IDrequested, quantityNeeded);\n });\n}", "function ask() {\n \n inquirer\n .prompt([\n {\n name: \"chooseItemID\",\n type: \"input\",\n message: \"What is the ID number of the product you would like to buy?\",\n },\n {\n name: \"chooseItemQuantity\",\n type: \"input\",\n message: \"How many would you like to buy?\",\n }\n ]).then(function (answer) {\n chosenQuantity = answer.chooseItemQuantity;\n chosenID = answer.chooseItemID;\n checkInventory();\n });\n \n}", "function askCustomer(item) {\n inquirer.prompt([\n {\n type: \"input\",\n name: \"idpicked\",\n message:\n \"What is the ID of the product you want to buy? || if you changed your mind then exit by tyiping. 'Nevermind'\",\n validate: function (value) {\n if (value === \"Nevermind\") {\n var quitingresponse = \"leave my store\";\n } else {\n var customerwants = parseInt(value);\n }\n }.then(function (value) {\n console.log(\"you chose to buy\" + value);\n }),\n },\n ]);\n}", "function userQuantityChoice(itemName) {\n inquirer.prompt([\n {\n type: \"input\",\n name: \"quantity\",\n message: \"How many would you like?\",\n validate: function(val){\n return val > 0 || val.toLowerCase() === \"q\";\n }\n }\n ]).then(function(val) {\n // turn strin into a number\n quitShopping(val.quantity);\n let quantity = parseInt(val.quantity);\n\n // loop through the database to check if there if enough inventory of the chosen item\n if (quantity > itemName.stock_quantity) {\n console.log(\"Sorry, we do not have enough of that item.\");\n displayProducts();\n } else {\n purchaseItem(itemName, quantity);\n }\n });\n}", "function purchase () {\n // prompting the user what they want and what quantity\n\tinquirer.prompt([\n \t{\n \ttype: \"input\",\n \tname: \"item\",\n \tmessage: \"Which item do you want to purchase? (Please type item ID)\"\n \t}, {\n \tname: \"quantity\",\n \ttype: \"input\",\n \tmessage: \"How many would you like?\"\n // processing customer purchase\n \t}]).then(function(answers) {\n var item = answers.item;\n var quantity = answers.quantity;\n\n // connecting the the database to check for availability and update stock quantity\n connection.query(\"SELECT stock_quantity, price FROM products WHERE id=\" + item, function (err,res) {\n var stockQuantity = res[0].stock_quantity;\n var total = res[0].price * quantity;\n var newStock = stockQuantity - quantity;\n\n // if their quantity exceeds the inventory the order does not go through\n if (newStock < 0){\n console.log(\"Insufficient quantity! Try again.\");\n purchase();\n }\n // if the inventory is available, quantity in the database is updated\n // and the customer is given their total\n else {\n connection.query(\"UPDATE products SET stock_quantity=\" + newStock + \"WHERE item_id=\" + item, function (err,res) {\n });\n console.log(\"Success! Your total is $\" + total);\n }\n\n });\n\t});\n}", "function select() {\n inquirer.prompt({\n name:\"itemToBuy\", \n type: \"input\",\n message: \"what is the ID number of the item you would like to buy\"\n }).then(function(answer){\n currentItemId = answer.itemToBuy;\n connection.query(\n \"SELECT * FROM products WHERE ?\", [{\n item_id: answer.itemToBuy\n }],\n function(error, results){\n if(error) throw error;\n var product = results[0].product_name;\n var price = results[0].price;\n currentQuantity = parseInt(results[0].stock_quantity);\n if(parseInt(results[0].stock_quantity) <= 0){\n console.log(\"Sorry. Out of stock.\");\n select();\n }\n confirm(product, price);\n }\n )\n \n //Validator function. Does not return anything other than undfined for now. \n /*if(validator(currentItemId)){\n } else {\n console.log(\"that item ID does not exist\");\n end();\n }*/\n\n });\n}", "function purchaserQuery() {\n\tinquirer.prompt([\n\t{\n\t\ttype: \"input\",\n\t\tname: \"query\",\n\t\tmessage: \"Input the item ID you wish to purchase.\",\n\t\t//Prevents the app from accepting non-numerical inputs\n\t\tvalidate: function(res) {\n\t\t\tif (isNaN(res) === false) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconsole.log(\"You need to enter a valid numerical ID.\");\n\t\t\treturn false;\n\t\t}\n\t},\n\t{\n\t\ttype: \"input\",\n\t\tname: \"quantity\",\n\t\tmessage: \"How many of this item will you purchase?\",\n\t\tvalidate: function(res) {\n\t\t\tif (isNaN(res) === false) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconsole.log(\"You need to enter a valid numerical amount.\");\n\t\t\treturn false;\n\t\t}\n\t}\n\t]).then(function(info) {\n\tvar item = info.query;\n\tvar quantity = info.quantity;\n\t//This grabs information from the MySQL database to assign as useable variables\n\tconnection.query(\"SELECT * FROM products WHERE item_id = ? \", item, function(err, res) {\n\t\t\tif (err) throw err;\n\t\t\tvar department = res[0].department_name;\n\t\t\tvar stock = res[0].stock_quantity;\n\t\t\tif (stock >= quantity) {\n\t\t\t\tvar stockTotal = stock - quantity;\n\t\t\t\tvar price = res[0].price;\n\t\t\t\tvar cost = quantity * price;\n\t\t\t\t//Alters the information within the database to reflect customer selections\n\t\t\t\tconnection.query(\"UPDATE departments SET ? WHERE ?\", [{total_sales: cost}, {department_name: department}], function(err, res) {});\n\t\t\t\t//Represents the user's \"Shopping cart\"\n\t\t\t\trunningTotal = runningTotal + cost;\n\t\t\t\tconsole.log(\"Your total comes to $\" + runningTotal);\n\t\t\t\t//Changes the quantity available after user check-out\n\t\t\t\tconnection.query(\"UPDATE products SET ? WHERE ?\", [{stock_quantity: stockTotal}, {item_id: item}], function(err, res) {});\n\t\t\t\t//Option to disconnect from server and end application\n\t\t\t\tinquirer.prompt([\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"confirm\",\n\t\t\t\t\t\tname: \"complete\",\n\t\t\t\t\t\tmessage: \"Have you finished shopping?\"\n\t\t\t\t\t}\n\t\t\t\t]).then(function(info){\n\t\t\t\t\tvar complete = info.complete;\n\n\t\t\t\t\tif (complete) {\n\t\t\t\t\t\tconsole.log(\"Thank you for shopping with the Bamazon Bookstore.\");\n\t\t\t\t\t\tconnection.end();\n\t\t\t\t\t} else {\n\t\t\t\t\t\trunProcess();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t//If the item is out-of-stock, the user will be prompted back to start.\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Insufficient quantity!\");\n\t\t\t\trunProcess();\n\t\t\t}\n\t\t});\n\t});\n}", "function promptBuyer() {\n\n // Prompt buyer to select an item by id\n console.log(` \n ______ \n (____ \\ \n ____) ) ____ ____ ____ _____ ___ ____ \n | __ ( / _ | \\ / _ (___ ) _ \\| _ \\ \n | |__) | ( | | | | ( ( | |/ __/ |_| | | | |\n |______/ \\_||_|_|_|_|\\_||_(_____)___/|_| |_| \\n\n \\n-------------------------------------------------------------------\\n`);\n\n inquirer.prompt([\n {\n type: 'input',\n name: 'item_id',\n message: 'Please enter the ID of the Desired Item.',\n validate: validNumber,\n filter: Number\n },\n {\n type: 'input',\n name: 'quantity',\n message: 'How many such items do you require?',\n validate: validNumber,\n filter: Number\n }\n ]).then(function (input) {\n\n const item = input.item_id;\n const quantity = input.quantity;\n\n // Query db to confirm that the given item ID exists in the desired quantity\n let querySelect = 'SELECT * FROM products WHERE ?';\n\n connection.query(querySelect, { item_id: item }, function (err, data) {\n if (err) throw err;\n\n if (data.length === 0) {\n console.log('ERROR: Invalid Item ID. Please select a valid Item ID.');\n displayInventory();\n\n } else {\n const productData = data[0];\n\n // If the quantity requested by the user is in stock\n if (quantity <= productData.stock_quantity) {\n console.log('Success, the product is available in this quantity! << Order Confirmed! >>');\n\n // Construct the updating query string\n const updatequerySelect = 'UPDATE products SET stock_quantity = ' + (productData.stock_quantity - quantity) + ' WHERE item_id = ' + item;\n\n // Update the inventory\n connection.query(updatequerySelect, function (err, data) {\n if (err) throw err;\n\n console.log('\\n---------------------------------------------------------------------\\n'\n + 'Order Placed! Your total is $' + productData.price * quantity\n + '\\n---------------------------------------------------------------------\\n'\n + '\\n Thank you for choosing Bamazon! \\n');\n // End the db connection\n connection.end();\n })\n } else {\n console.log('\\n---------------------------------------------------------------------\\n'\n + 'Sorry, there is not enough product in stock, your order can not be placed as is. \\n Please modify your order.'\n + '\\n---------------------------------------------------------------------\\n');\n //display inventory again\n displayInventory();\n }\n }\n })\n })\n}", "function shoppingCart(res) {\n inquirer\n .prompt([\n {\n name: \"id\",\n type: \"input\",\n message: \"\\nUse Item Id to Select Product.\"\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"\\nPlease enter number of units to purchase.\\n\"\n }\n ])\n .then(function(data) {\n id = data.id;\n quantity = data.quantity;\n stockQuantity(data.id, data.quantity);\n });\n}", "function userInput(){\n\tinquirer.prompt([\n\t{\n\t\tname: \"id\",\n\t\ttype: \"list\",\n\t\tmessage: \"What product would you like to buy?\",\n\t\tchoices: choicesArray\n\t},\n\t{\n\t\tname: \"quantity\",\n\t\ttype: \"input\",\n\t\tmessage: \"How many would you like to purchase?\"\n\t}\n\t]).then(function(answer){\n\t\t//splitting our id from product name\n\t\tvar splitId = answer.id.split(\":\");\n\t\t//storing only the id in a variable\n\t\tvar getId = splitId[0];\n\t\t//storing how much the user would like to purchase\n\t\tvar userQuantity = answer.quantity;\n\t\t//querying the database to get item id, quantity, and price\n\t\tconnection.query(\"SELECT item_id, stock_quantity, price FROM products\", function(error, results){\n\t\t\tif(error){\n\t\t\t\tconsole.log(error);\n\t\t\t}else{\n\t\t\t\t//looping through our products table\n\t\t\t\tfor(var i = 0; i < results.length; i++){\n\t\t\t\t\t//if the product choosen's id matches an id in our databse and its quantity is less than the quantity in our database, user may purchase the item(s)\n\t\t\t\t\tif(getId == results[i].item_id && userQuantity < results[i].stock_quantity){\n\t\t\t\t\t\t//storing database product quantity\n\t\t\t\t\t\tvar productQuantity = results[i].stock_quantity;\n\t\t\t\t\t\t//storing database product price\n\t\t\t\t\t\tvar productPrice = results[i].price;\n\t\t\t\t\t\t//multiplying how many products the user wants to the price of each item\n\t\t\t\t\t\tvar userPrice = userQuantity * productPrice;\n\t\t\t\t\t\t//updating our quantity by subtracting how much our user chooses and how much is in our database\n\t\t\t\t\t\tvar newQuantity = productQuantity - userQuantity;\n\t\t\t\t\t\t//calling our transaction function and passing it updated product quantity, price, and product id\n\t\t\t\t\t\ttransaction(newQuantity, userPrice, getId);\n\t\t\t\t\t};\n\t\t\t\t\t//if the user chooses a quantity higher than what is in our database, we will let them know\n\t\t\t\t\tif(getId == results[i].item_id && userQuantity > results[i].stock_quantity){\n\t\t\t\t\t\tconsole.log(\"We don't have enough in stock.\" + \"\\nPlease lower quantity.\");\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t});\n\t});\n}", "function Buy_Prompt() {\n inquirer.prompt([\n // Here we create an input text prompt for getting the ITEM ID.\n {\n type: \"input\",\n message: \"Please enter the ID of the product you would like to buy.\",\n name: \"ITEM_ID\",\n filter: Number\n },\n // Here we create an input text prompt for getting the quantity the user wants to buy.\n {\n type: \"input\",\n message: \"How many items would you like to buy?\",\n name: \"BUY_QUANTITY\",\n filter: Number\n },\n ]).then(function (inquirerResponse) {\n var buyQuantity = inquirerResponse.BUY_QUANTITY;\n var item = inquirerResponse.ITEM_ID;\n customerOrder(item, buyQuantity);\n });\n}", "function queryCustomer()\n{\n inquirer.prompt([\n {\n name: \"item\",\n type: \"input\",\n message: \"What is the item ID you would like to purchase?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many units would you like to purchase?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }]).then(function(answer) {\n processOrder(answer.item, answer.quantity);\n });\n}", "function select() {\n inquirer\n .prompt([\n // Here we create a basic text prompt.\n {\n // ask for product id\n type: \"input\",\n message: \"What ID # would you like to purchase?\",\n name: \"select\",\n },\n\n {\n // ask for quanitity\n type: \"input\",\n message: \"How many would you like to purchase?\",\n name: \"amount\"\n },\n\n ])\n // confirm their purchase\n .then(function(input) {\n var userInput = input.select;\n var userQuantity = input.amount;\n // check for id number to be between 1 and 10\n if (input.select >= 1 && input.select <= 20) {\n console.log(\"You have selected \" + userQuantity + \" of item id \" + userInput + \".\");\n \n connection.query(\"SELECT * FROM products\", function(err, res) {\n // var to subtract user quanitity from database\n var subtract = ((res[userInput - 1].quantity)-userQuantity)\n if (err) throw err;\n // Log all results of the SELECT statement\n if (userQuantity <= res[userInput - 1].quantity){\n console.log(\"Thank you for your purchase! Your total is $\" + userQuantity * (res[userInput - 1].price) + \".\");\n var query = connection.query(\n // update quantity by id\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n quantity: subtract\n },\n {\n id: userInput\n }\n ],\n function(err, res) {\n // end of update function message\n console.log(\" Have A Great Day!\\n\");\n connection.end();\n }\n );\n }\n else {\n // messeage if quantity is not available, reset to select function\n console.log(\"Sorry, we only have \" + res[userInput - 1].quantity + \" of this item.\")\n select();\n }\n });\n }\n else {\n // message if id is not an DataTransferItem, reset to select function\n console.log(\"Please pick an item number in the inventory.\");\n select();\n }\n })\n .catch(function(err){\n console.log(err);\n });\n \n}", "function productSelection(){\n inquirer.prompt([\n {\n name: \"id\",\n message: \"What product do you want? Provide the Item id:\"\n },\n {\n name: \"quantity\",\n message: \"How Many Do you Want?\"\n },\n {\n type: \"confirm\",\n name: \"confirm\",\n message: \"Are you sure?\",\n default: true\n }\n ]).then(answers=>{\n // console.log(\"Item ID:\", answers.id);\n // console.log(\"Quantity:\", answers.quantity);\n if(answers.confirm){\n inventoryUpdate(answers.id, answers.quantity);\n }\n else{\n displayProducts();\n }\n });\n}", "function addNewProduct() {\n console.log(\"\\nFantastic, let's add a new product! To get started let's answer a few questions:\\n\")\n inquirer\n .prompt([\n // Here we create a basic text prompt.\n {\n type: \"input\",\n message: \"What is the product name?\",\n name: \"prodName\", \n // validate: function validateID(name){\n \n // if(isNaN(name)===true){\n // console.log('\\nBe sure to specify the correct ID as a number!')\n // return false;\n // }\n // else if(name === \"\"){\n // console.log('\\nBe sure to specify the correct ID as a number!')\n // return false;\n // }\n // else {\n // return true;\n // }\n // }\n },\n {\n type: \"input\",\n message: \"What is the department Name it falls under?\",\n name: \"deptName\", \n // validate: function validateID(name){\n \n // if(isNaN(name)===true){\n // console.log('\\nBe sure to specify the correct ID as a number!')\n // return true;\n // }\n // else if(name === \"\"){\n // console.log('\\nBe sure to specify a text based department name!')\n // return false;\n // }\n // else {\n // return true;\n // }\n // }\n },\n {\n type: \"input\",\n message: \"What is the price of the item?\",\n name: \"price\", \n validate: function validateID(name){\n \n if(isNaN(name)===true){\n console.log('\\nBe sure to specify the correct ID as a number!')\n return false;\n }\n else if(name === \"\"){\n console.log('\\nBe sure to specify the correct ID as a number!')\n return false;\n }\n else {\n return true;\n }\n }\n },\n {\n type: \"input\",\n message: \"How many are in stock?\",\n name: \"stockQTY\", \n validate: function validateID(name){\n \n if(isNaN(name)===true){\n console.log('\\nBe sure to specify the correct ID as a number!')\n return false;\n }\n else if(name === \"\"){\n console.log('\\nBe sure to specify the correct ID as a number!')\n return false;\n }\n else {\n return true;\n }\n }\n },\n\n ])\n .then(function(response) {\n var buildProd = response.prodName; \n var buildDept = response.deptName;\n var buildPrice = response.price; \n var buildStock = response.stockQTY; \n \n var query = connection.query(\"INSERT INTO products (Product_Name, Dept_Name, Price, Stock_Qty) VALUES (?, ?, ?, ?);\",[buildProd, buildDept, buildPrice, buildStock],function(err, res) {\n if (err) throw err;\n console.log(\"\\nCongrats on adding a new product! Here is your product with the rest!\")\n viewProducts();\n \n\n });\n});\n\n}", "function displayPurchase(stock) {\n inquirer\n .prompt([\n {\n name: \"id\",\n type: \"input\",\n message: \"What is the ID of the product you would like to buy?\",\n\n },\n {\n name: \"units\",\n type: \"input\",\n message: \"How many units of the product you would like to buy?\",\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ])\n .then(function (answer) {\n let choice = stock.find(item => item.item_id === parseInt(answer.id))\n // Subtract thhe amount that I want from the amount that I have\n let new_quant = choice.stock_quantity - answer.units\n // If I have enough to give, give it and update\n if (new_quant >= 0) {\n // Amount chosen times unit price\n let total = choice.price * answer.units\n console.log(\"You spend : $\" + parseFloat(total, 2));\n // when finished prompting, insert a new item into the db with that info\n connection.query(\n `UPDATE bamazon.products SET stock_quantity = ${new_quant} WHERE item_id =${answer.id}`,\n function (err) {\n if (err) throw err;\n console.log(\"Your purchase was created successfully!\");\n // re-prompt the user for if they want to bid or post\n start();\n }\n );\n } else {\n console.log(\"Insuficient amount!\")\n start();\n }\n });\n\n}", "function prompt() {\n inquirer.prompt([\n {\n type: \"input\",\n message: \"What is the ID of the item you'd like to order?\",\n name: \"userPick\",\n filter: Number\n },\n {\n type: \"input\",\n message: \"How many do you want?\",\n name: \"amount\",\n filter: Number\n }\n \n ]).then(function (result) {\n //console.log(result.userPick);\n //console.log(result.amount);\n productID = result.userPick;\n\n\n //grabbing the number that users put for id and quantity and using it for the next function \n var query = \"SELECT * FROM products WHERE item_id = ?\";\n connection.query(query, [productID], function (err, res) {\n if (err) throw err;\n\n quantityFinal = res[0].stock_quantity - result.amount;\n\n if (quantityFinal < 0 || result.amount > res[0].stock_quantity) {\n console.log(\"Sorry, we can't do that! Talk to our manager!\");\n prompt();\n } else {\n console.log(\"You ordered \" + result.amount + \" \" + (chalk.blue(res[0].product_name)) + \".\\n Thank you, that wil be $\" + (chalk.black.bgGreen(result.amount * res[0].price)) + \".\"\n );\n updateProduct(quantityFinal, productID);\n }\n\n })\n })\n}", "function buyProduct(amount, product_id, price) {\n inquirer\n .prompt([\n {\n type: \"input\",\n message: \"How Many?\",\n name: \"amount\",\n validate: value => {\n let valid = !isNaN(parseFloat(value));\n return valid || \"Please Enter Item ID #\";\n }\n }\n ])\n .then(res => {\n if (amount > res.amount) {\n console.log(\"SUCCESS\");\n totalPrice(res.amount, price);\n updateStock(res.amount, product_id, amount);\n } else {\n console.log(\"Out of stock!\");\n buyProduct(amount, product_id, price);\n }\n });\n}", "function pickItemId() {\n inq.prompt([{\n type: 'input',\n name: 'whatId',\n message: '\\nPlease enter the ID of the item you would like to purchase'\n }]).then(function(inqRes) {\n connection.query(\"SELECT * FROM products WHERE item_id =\" +\n \"'\" + inqRes.whatId + \"'\",\n function(err, res) {\n // If there's an error log it\n if (err) {\n console.log(err);\n } else\n // If The response is not an empty array\n if (res.length > 0) {\n console.log(\"You have selected: \" +\n res[0].product_name + ' $' + res[0].price + '.00 ' +\n \"each \" + res[0].stock_quantity + \" left\");\n itemChosen = inqRes.whatId;\n itemQuantity = res[0].stock_quantity;\n itemPrice = res[0].price;\n chooseQuantity();\n }\n // If the response is an empty array i.e. not a valid ID\n else {\n console.log(\"Sorry, this is not a valid ID please try again\");\n pickItemId();\n }\n });\n });\n}", "function whatToBuy(){\n\tinquirer.prompt([\n\t\t\t{\n\t\t\t\tname:\"item\",\n\t\t\t\ttype:\"list\",\n\t\t\t\tmessage: \"Select the name of the item you would like to purchase:\", \n\t\t\t\tchoices: [\n\t\t\t\t\"purple wig\",\n\t\t\t\t\"round glasses\",\n\t\t\t\t\"red blazer\",\n\t\t\t\t\"black biker shorts\",\n\t\t\t\t\"red gown\",\n\t\t\t\t\"silver ring\", \n\t\t\t\t\"princess puppet\",\n\t\t\t\t\"pink wig\",\n\t\t\t\t\"stuffed cow\",\n\t\t\t\t\"sports car\"\n\t\t\n\t\t\t]},\n\t\t\t{\n\t\t\t\tname:\"itemNum\",\n\t\t\t\ttype:\"input\",\n\t\t\t\tmessage: \"What is your item's ID?\",\n\t\t\t\tvalidate: function(value){\n\t\t\t\t\tif(isNaN(value) === false){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tname:\"amount\",\n\t\t\t\ttype:\"input\",\n\t\t\t\tmessage: \"How many would you like to buy?\",\n\t\t\t\tvalidate: function(value){\n\t\t\t\t\tif(isNaN(value) === false){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t// ,\n\t\t\t// // { //optional confirm feature \n\t\t\t// \ttype: \"confirm\",\n\t\t\t// \tmessage: \"Is that your final amount?\",\n\t\t\t// \tname:\"confirm\",\n\t\t\t// \tdefault: true\n\t\t\t// }\n\t\t])\n\t\t.then(function(response){\n\t\t\t//double check to see what the response confirms about the order \n\t\t\t// console.log(response);\n\t\t\t// //name\n\t\t\t// console.log(response.item);\n\t\t\t// //item's id\n\t\t\t// console.log(response.itemNum);\n\t\t\t// //amount ordered\n\t\t\t// console.log(response.amount);\n\t\t\t\n\t\t\t//query to be sure the database has the item in stock \n\t\t\tconnection.query(\"SELECT stock_quantity FROM products WHERE item_id=\" + response.itemNum, function (error, data){\n\t\t\t\t//returns the stock_quantity of the item_id from above as data\n\t\t\t\t// console.log(data);\n\t\t\t\t// console.log(response.amount);\n\t\t\t\t// console.log(data[0].stock_quantity);\n\t\t\t\tif (error) throw error;\n\t\t\t\t//if not an error, then see if the data from the query is greater than the response.amount\n\t\t\t\t\tif(data[0].stock_quantity >= response.amount){\n\t\t\t\t\t\tconsole.log(\"You are in luck; enjoy your item!\");\n\t\t\t\t\t\t//update the amount of product left in the stock_quantity column\n\t\t\t\t\t\t//query to update the database to make sure the amount of stock_quantity goes down by the response.amount\n\t\t\t\t\t\tconnection.query(\"UPDATE products SET stock_quantity = stock_quantity -\" + response.amount +\" WHERE item_id=\" + response.itemNum, function(error, data){\n\t\t\t\t\t\t\tif(error) throw error;\n\t\t\t\t\t\t\t//show the price to the customer for that item data here is an ok packet with affectedRows and messaage\n\t\t\t\t\t\t\t// console.log(data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t//open another query to reveal the price for the item-- have to multiply by the response.amount to get total price\n\t\t\t\t\t\t\tconnection.query(\"SELECT price FROM products WHERE item_id=\" + response.itemNum, function(error, data){\n\t\t\t\t\t\t\t\t// console.log(JSON.stringify(data));\n\t\t\t\t\t\t\t\t//console.log(JSON.parse(data));\n\t\t\t\t\t\t\t\tif(error) throw error;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//data come from the rowdatapacket array/objects to give me the price for that response.itemNum \n\t\t\t\t\t\t\t\t\tnewPrice = data[0].price;\n\t\t\t\t\t\t\t\t\ttotalPrice = response.amount * newPrice;\n\t\t\t\t\t\t\t\t\tconsole.log(\"You ordered: \" + response.amount);\n\t\t\t\t\t\t\t\t\tconsole.log(\"Your total is: $\" + totalPrice);\n\t\t\t\t\t\t\t\tconsole.log(\"Thank you for using Bamazon! Make your next purchase below!\");\n\t\t\t\t\t\t\t\twhatToBuy();\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t})\n\t\t\t\t\t}\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.log(\"There was not enough stock; please try your purchase again with another item.\");\n\t\t\t\t\t\twhatToBuy();\n\t\t\t\t\t}\n\n\t\t\t\t})\n\t\t\t\n\t\t});\n}", "function chooseQuantity() {\n inq.prompt([{\n type: 'input',\n name: 'quantity',\n message: '\\nPlease enter the number of units to add',\n }]).then(function(inqRes) {\n // This value is for later use\n quantityToAdd = parseInt(inqRes.quantity);\n // This value is for updating the database with remaining quantity\n updatedQuantity = quantityToAdd + itemQuantity;\n // This calculates the total cost\n connection.query(\"SELECT * FROM products WHERE item_id=\" +\n \"'\" + itemChosen + \"'\",\n function(err, res) {\n if (err) {\n console.log(err);\n } else {\n connection.query(\"UPDATE products SET stock_quantity =\" + \"'\" +\n updatedQuantity + \"'\" + \"WHERE item_id =\" + \"'\" + itemChosen +\n \"'\");\n console.log(\"Add Inventory Successful!\");\n isActionDone = true;\n printTable();\n }\n });\n });\n }", "function promptCustomerForQuantity(product) {\n\tinquirer\n\t .prompt([\n\t\t{\n\t\t type: \"input\",\n\t\t name: \"quantity\",\n\t\t message: \"How many would you like? [Quit with Q]\",\n\t\t validate: function(val) {\n\t\t\treturn val > 0 || val.toLowerCase() === \"q\";\n\t\t }\n\t\t}\n\t ])\n\t .then(function(val) {\n\t\t// Check if the user wants to quit the program\n\t\tcheckIfShouldExit(val.quantity);\n\t\tvar quantity = parseInt(val.quantity);\n \n\t\t// If there isn't enough of the chosen product and quantity, let the user know and re-run loadProducts\n\t\tif (quantity > product.stock_quantity) {\n\t\t console.log(\"\\nInsufficient quantity!\");\n\t\t displayProducts();\n\t\t}\n\t\telse {\n\t\t // Otherwise run makePurchase, give it the product information and desired quantity to purchase\n\t\t makePurchase(product, quantity);\n\t\t}\n\t });\n }", "function customerPrompt(res) {\n\tinquirer.prompt([{\n\t\ttype: \"input\",\n\t\tname: \"selection\",\n\t\tmessage: \"What is the id of the product you wnat to buy?\"\n\t},\n\t{\n\t\ttype: \"input\",\n\t\tname: \"quantity\",\n\t\tmessage: \"How many do you want to buy?\"\n\t}]).then(function order) {\n\t\tvar quantity = order.quantity;\n\t\tvar itemId = order.id;\n\t\tdbConnection.query(\"SELECT * FROM products where id=\" itemID, function(err, selectedItem) {\n\t\t\tif (err) throw err;\n\t\t\t if (selectedItem[0])\n\t\t};\n\t}\n}", "function promptQuantity() {\n inquirer\n .prompt({\n name: \"quantity\",\n type: \"input\",\n message: \"How many would you like\",\n \n // validates that the answer is a number\n validate: function (value) {\n quantPass = value; \n if (quantPass > 0) {\n \n return true;\n }\n else {\n return \"This is not a number. Try again\";\n }\n }\n \n }).then(function (answer) {\n \n // quantPass is a string, so it's then turned into an int\n quantPass = parseInt(quantPass);\n \n // This selects all the rows from the table (\"products\") that has the id of the answerID\n connection.query(\"SELECT * FROM products WHERE item_id = \" + answerId,\n function (err, results) {\n \n /* The results are therefor the row that corresponds to that id,\n and we assign a variable to the stock_quantity value it contains*/\n var quantInStock = results[0].stock_quantity\n \n if (err) {\n throw err;\n }\n /* ----If there are no errors and quantPass (amount requested) is \n less than or equal to the following happens-----*/\n \n // Checks to make sure there is enough in stock\n else if (!err && quantPass <= quantInStock) {\n \n // -----------Get total cost------------\n // Gets price of product and puts into a variable\n let price = results[0].price\n \n // Gets quantity chosen and multiplies by cost for total cost\n let totalCost = quantPass * price;\n \n // Display the order confirmation an total cost);\n console.log(\"You want \" + chalk.bold.yellow(quantPass) + \" of item \" + chalk.bold.yellow(answerId));\n console.log(chalk.bold.green(\"Your order has been placed.\"));\n console.log(chalk.bold.green(\"Your total cost is: \" + \"$\" + totalCost));\n console.log(\"--------------------------------------\");\n \n // updateTable is fired\n updateTable(answerId)\n \n\n }\n /* If there isn't enough in stock, then notification is given and \n promptQuantity is refired*/\n else if (!err && quantPass > quantInStock) {\n console.log(chalk.bold.red(\"Not enough in stock. Choose a lower number.\"));\n console.log(\"--------------------------------------\");\n promptQuantity()\n };\n\n \n });\n\n\n });\n\n}", "function promptManagerForQuantity(product) {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"quantity\",\n message: \"How many would you like to add?\",\n validate: function(val) {\n return val > 0;\n }\n }\n ])\n .then(function(val) {\n var quantity = parseInt(val.quantity);\n addQuantity(product, quantity);\n });\n}", "function selectProduct() {\n inquirer.prompt([\n {\n name: \"enterID\",\n message: \"Please enter the ID of the item you'd like to purchase.\",\n type: \"input\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n },\n {\n name: \"quantity\",\n message: \"How many would you like to purchase?\",\n type: \"input\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ]).then(function(inquirerResponse) {\n connection.query(\n \"Select stock_quantity, price, product_name FROM products WHERE ?\",\n [\n { \n item_id: inquirerResponse.enterID\n },\n ], \n function(err, res) {\n if (err) throw err;\n\n let enteredID = inquirerResponse.enterID;\n let enteredQuantity = inquirerResponse.quantity;\n\n let stock = res[0].stock_quantity;\n let price = res[0].price;\n let product = res[0].product_name;\n\n if (stock >= inquirerResponse.quantity) {\n buyProduct(stock, price, product, enteredID, enteredQuantity);\n }\n else {\n console.log(\"------\")\n console.log(\"Sorry, there aren't enough of those in stock.\")\n orderAgain();\n }\n }\n\n )\n })\n}", "function userChoice(){\n inquirer\n .prompt([\n { \n type: \"input\",\n message: \"Enter the product number of the item you want: \",\n name: \"product\"\n },\n { \n type: \"input\",\n message: \"Enter the quantity you would like to purchase: \",\n name: \"quantity\"\n }\n ])\n .then(function(inqRes){\n // console.log(\"PN: \" + inqRes.product + \"\\nQT: \" + inqRes.quantity);\n checkInventory(inqRes.product, inqRes.quantity);\n });\n}", "function chooseQuantity() {\n inq.prompt([{\n type: 'input',\n name: 'quantity',\n message: '\\nPlease enter the quantity you would like to purchase',\n }]).then(function(inqRes) {\n // This value is for later use\n quantityRequested = inqRes.quantity;\n // This value is for updating the database with remaining quantity\n updatedQuantity = itemQuantity - quantityRequested;\n // This calculates the total cost\n totalCost = inqRes.quantity * itemPrice;\n connection.query(\"SELECT * FROM products WHERE item_id=\" +\n \"'\" + itemChosen + \"'\",\n function(err, res) {\n if (err) {\n console.log(err);\n } else if (quantityRequested <= itemQuantity) {\n connection.query(\"UPDATE products SET stock_quantity =\" + \"'\" +\n updatedQuantity + \"'\" + \"WHERE item_id =\" + \"'\" + itemChosen +\n \"'\");\n console.log(\"Purchase Successful! \" + \"Total Cost of Purchase: \" +\n \"$\" + totalCost);\n isPurchaseMade = true;\n printTable();\n } else if(quantityRequested > itemQuantity) {\n console.log(\"Sorry, We don't have that much in stock right now\");\n pickItemId();\n }\n });\n });\n}", "function addToInventory() {\n inquirer.prompt([\n {\n type: \"input\",\n name: \"id\",\n message: \"Input ID of item to restock:\",\n validate: function (input) {\n if (Number.isInteger(parseFloat(input)) && 1 <= input && input <= numProducts) {\n return true;\n }\n\n console.log(\" Invalid ID\");\n }\n },\n {\n type: \"input\",\n name: \"numExtraItems\",\n message: \"Input number of additional items to purchase:\",\n validate: function (input) {\n if (Number.isInteger(parseFloat(input)) && input >= 0) {\n return true;\n }\n\n console.log(\" Invalid quantity\");\n }\n }\n ]).then(function (answers) {\n //console.log(answers);\n var query = \"UPDATE products SET stock_quantity=? WHERE item_id=?\";\n var id = answers.id;\n var numExtraItems = parseInt(answers.numExtraItems);\n\n restock(id, numExtraItems);\n });\n}", "function start() {\n inquirer\n .prompt([\n {\n name: \"id\",\n type: \"input\",\n message: \"What is the Product ID of the item you would like to purchase?\",\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n },\n \n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many of the listed product would you like to buy?\",\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ])\n\n //This Notes the ID chosen and the Qualtity Chosen and Displays to User\n .then(function (input) {\n \n var item = input.id;\n var quantity = input.quantity;\n \n console.log('You Have Chosen: \\n id = ' + input.id + '\\n Quantity = ' + input.quantity);\n \n \n // Checks if there is enough product in the System\n var queryStr = 'SELECT * FROM products WHERE ?';\n \n connection.query(queryStr, { id: item }, function (err, data) {\n if (err) throw err;\n \n // If a Invalid ID is selected, an error message occurs and the connection is ended. \n \n if (data.length === 0) {\n console.log('ERROR: Please select a valid Item ID.');\n displayInventory();\n connection.end();\n } else {\n var productData = data[0];\n \n \n // Message Displayed with a Valid Order\n if (quantity <= productData.stock_quantity) {\n console.log('The product you requested is in stock! Placing order!');\n\n var updateQueryStr = 'UPDATE products SET stock_quantity = ' + (productData.stock_quantity - quantity) + ' WHERE id = ' + item;\n \n // Update Inventory then End Connection. Else Log that there is not enough product and modify connection \n connection.query(updateQueryStr, function (err, data) {\n if (err) throw err;\n \n console.log('Your order has been placed! Your total is $' + productData.price * quantity);\n console.log('Thank you for shopping with StoreApp!');\n console.log(\"\\n---------------------------------------------------------------------\\n\");\n connection.end();\n })\n } else {\n console.log('Sorry, there is not enough product in stock, your order cannot be placed');\n console.log('Please modify your order amount to a smaller number.');\n console.log(\"\\n---------------------------------------------------------------------\\n\");\n \n connection.end();\n }\n }\n })\n })\n }", "function promptUser(){\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"inputId\",\n message: \"Please input the product ID of the item you would like to purchase?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n },\n {\n type: \"input\",\n name: \"unitAmount\",\n message: \"Please enter the amount of units you would like to buy:\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ]).then(function(purchase){\n connection.query(\"SELECT * FROM products\", function(error, results) {\n if (error) throw error;\n let purchaseQuantity = purchase.unitAmount;\n let productQuantity;\n let productPrice;\n let productName;\n let productSales;\n let productId;\n let totalPurchased;\n for (let i = 0; i < results.length; i++) {\n if (parseInt(purchase.inputId) === results[i].item_id) {\n productQuantity = results[i].stock_quantity;\n productPrice = results[i].price;\n productName = results[i].product_name;\n productSales = results[i].product_sales;\n productId = results[i].item_id;\n totalPurchased = results[i].price * purchaseQuantity;\n }\n }\n if (purchaseQuantity <= productQuantity){\n console.log(\"========================= SHOPPING CART ========================\");\n console.log(\"| Product ID: \" + productId + \" | Product Name: \" + productName + \" | Quantity: \" + purchaseQuantity + \" | \");\n console.log(\"================================================================\");\n connection.query(\"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: productQuantity - purchaseQuantity,\n product_sales: productPrice * purchaseQuantity\n },\n {\n item_id: purchase.inputId\n }\n ],\n function(error) {\n if (error) throw error;\n console.log(\"Thank you for purchasing from Bamazon!\");\n console.log(\"The total amount of your purchase: $\" + totalPurchased);\n console.log(\"================================================================\");\n connection.end();\n }\n );\n } else {\n console.log(\"There aren't enough\" + productName + \" in stock, please check the amount in stock!\");\n printData();\n // connection.end();\n }\n});\n});\n\n}", "function addNewProductPrompt() {\n\n // ask user for information about new item to be inserted into database\n return inquirer.prompt([{\n name: \"product_name\",\n message: \"Product name:\",\n type: \"input\",\n validate: function (inputValue) {\n if (inputValue !== \"\") {\n return true;\n } else {\n return \"Please provide a product name\";\n }\n }\n },\n {\n name: \"department_name\",\n message: \"Department name:\",\n type: \"input\",\n validate: function (inputValue) {\n if (inputValue !== \"\") {\n return true;\n } else {\n return \"Please provide a department name\";\n }\n }\n },\n {\n name: \"price\",\n message: \"Price:\",\n type: \"input\",\n validate: function (inputValue) {\n if (!isNaN(inputValue) && inputValue >= 0) {\n return true;\n } else {\n return \"Please provide a valid price\";\n }\n }\n },\n {\n name: \"stock_quantity\",\n message: \"Stock Quantity:\",\n type: \"input\",\n validate: function (inputValue) {\n if (!isNaN(inputValue) && inputValue >= 0) {\n return true;\n } else {\n return \"Please provide a valid quantity\";\n }\n }\n }\n ]);\n\n}", "function quantityPrompt(res) {\n\t inquirer\n \t\t.prompt([\n \t\t\t{\n\t\t\t\ttype: \"input\",\n\t\t\t\tmessage: \"How many would you like to purchase?\",\n\t\t\t\tname: \"quantity\"\n\t\t }\n\t\t])\n\t\t.then(function(inqRes) {\n\t\t\tconsole.log(inqRes.quantity);\n\n\t\t\tvar inqQuan = parseInt(inqRes.quantity);\n\t\t\tif (inqQuan <= res[0].stock_quantity) {\n\n\t\t\t\tvar total = (inqQuan*res[0].price).toFixed(2);\n\t\t\t\tconsole.log(\"Your total is: $\" + total);\n\t\t\t\t\n\t\t\t\tconfirmPrompt(res, inqQuan);\n\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tconsole.log(\"Insufficient quantity!\");\n\t\t\t\tquantityPrompt(res);\n\n\t\t\t}\n\n\t\t});//ends then\n \n}// ends quantityPrompt", "function productid(res){\n inquirer.prompt({\n \n type : \"input\",\n name : \"items\",\n message : \"what product would you like to buy ? input the id\"\n \n\n }).then(function(answer){\n //loop through the table depending on user input and get the row \n for(var k = 0; k < res.length; k++){\n \n if(answer.items == res[k].item_id){\n var itemid =res[k].item_id;\n \n stockquantity=res[k].stock_quantity;\n price=res[k].price;\n console.log(\"stock quantity : \"+ res[k].stock_quantity);\n console.log(\"id : \"+res[k].item_id);\n units(stockquantity,itemid,price);\n \n }\n \n }\n \n });\n }", "function welcomePurchase(){\n inquirer.prompt([{\n name: \"item\",\n type: \"input\",\n message: \"What item would you like to purchase? Enter the Item ID to continue\",\n validate: function(input){\n if(isNaN(input) === false){\n return true;\n } else {\n console.log(\"Invalid Item ID. Please try again.\")\n return false;\n }\n }\n },\n {\n name: \"amount\",\n type: \"input\",\n message: \"How many would do you wish to purchase?\",\n validate: function(input){\n if(isNaN(input) === false){\n return true;\n } else {\n console.log(\"Invalid quantity. Please try again.\")\n return false;\n }\n } \n }]).then(function (customerSelect){\n \n // connect to database based on customer item and quantity selection\n query = connection.query (\"SELECT * FROM products WHERE item_id=?\", customerSelect.item, function (err, res){\n if (err) throw err;\n // console.log(\"affected rows: \", res.length)\n if(customerSelect.amount > res.stock_quantity){\n console.log(\"Insufficient quantity! Please input a value less than or equal to the quantity available in stock\");\n return;\n }\n if (!res){\n console.log(\"Oops! It looks like you did not select a product. Please select an item listen by typing in the corresponding Item ID\")\n }\n\n //////////////////////////////////////// Update table after purchase and print \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n connection.query(\"UPDATE products SET ? WHERE ?\", [\n {\n stock_quantity: (res[0].stock_quantity - customerSelect.amount)\n },\n {\n item_id: customerSelect.item\n }\n ], function(err, res) {\n if(customerSelect.amount == 0){\n console.log(\"\\n \\t Oops, you did not provide a valid number to purchase! \\n\");\n welcomePurchase();\n } else {\n console.log(`\n You've successfully purchased ${customerSelect.amount} units of Item ID: ${customerSelect.item}!\n `);\n nextPrompt();\n }\n }); \n });\n });\n }", "function promptId(results) {\n inquirer\n .prompt({\n name: \"item_id\",\n type: \"input\",\n message: \"What's the ID of the product you want?\",\n \n /* Validates that the input is actually a number */\n validate: function (value) {\n answerId = value\n if (answerId > 0) {\n return true;\n }\n else {\n return \"This is not a number. Try again\";\n }\n }\n }).then(function (answers) {\n \n // Reassigning answerID (the id chosen) to the answers (answer {item_id: \"3\"})\n answerId = answers.item_id;\n \n // If less than the result's index and greater than 0, console.log the id\n if (answerId < (results.length + 1) && answerId > 0) { \n console.log(\"You've chosen product ID: \" + chalk.bold.yellow(answerId));\n console.log(\"--------------------------------------\")\n \n // Fires promptQuantity function \n promptQuantity();\n }\n // Other let them know not valid and refire promptId\n else {\n console.log(\"Not a valid id. Try again\");\n promptId(results);\n \n }\n\n });\n}", "function promptUser(res){\n inquirer\n .prompt({\n name: \"productID\",\n message: \"Which product ID would you like to buy?\",\n })\n .then(function(answer1) {\n\n inquirer.prompt({\n name: \"quantity\",\n message: \"How many units of the product would you like to buy?\"\n\n }).then(function(answer2){\n var quantity = answer2.quantity;\n var productID = parseInt(answer1.productID);\n\n //find product\n\n var product = res.find(function(row){\n return row.id === productID;\n });\n\n if(product === undefined)\n {\n console.log(\"Product not found\");\n return;\n }\n\n //check quantity\n\n if(quantity > product.stock_quantity){\n console.log(\"Insufficient quantity!\");\n\n }else{\n console.log(\"----------------------\");\n \n //update the database with the new quantity\n\n //display the total cost of purchase\n \n }\n\n })\n \n });\n}", "function shoppingCart() {\n \n inquire.prompt([{\n message: \"Enter product ID you would like to purchase\",\n type: \"input\",\n name: \"userItems\"\n },\n {\n message: \"Enter Quantity\",\n type: \"input\",\n name: \"userQuantity\"\n }\n ]).then(function (answers) {\n var query = \"SELECT item_id, product_name, stock_quantity, price FROM products WHERE ?\";\n connection.query(query, {\n item_id: answers.userItems\n }, function (err, res) {\n for (var i = 0; i < res.length; i++) {\n if (res[i].stock_quantity < answers.userQuantity) {\n console.log(\"Sorry we only have \" + res[i].stock_quantity + \" in stock. But check back soon!\");\n shoppingCart();\n } else {\n itemCart.push(res[i]);\n cartQuant.push(parseInt(answers.userQuantity));\n continueShopping();\n };\n };\n });\n });\n}", "function selectItem() {\n inquirer.prompt([\n {\n type: \"input\",\n message: \"Enter the ID for the product you'd like to buy\",\n name: \"productID\"\n },\n {\n type: \"input\",\n message: \"How many units of the product would you like to buy?\",\n name: \"quantity\"\n }\n ]).then(function(inquirerResponse){\n var productID = parseInt(inquirerResponse.productID);\n var qty = inquirerResponse.quantity;\n isAvailable(productID, qty);\n })\n}", "function selectionPrompt() {\n\n inquirer.prompt([{\n\n type: \"input\",\n name: \"inputId\",\n validate: validateID,\n message: \"Enter the ID# of the item you want to purchase.\",\n },\n {\n type: \"input\",\n name: \"inputNumber\",\n validate: validateQty,\n message: \"How many would you like to purchase?\",\n\n }\n ]).then(function (userPurchase) {\n\n\n var sql = \"SELECT * FROM products WHERE item_id=?\";\n connection.query(sql, [userPurchase.inputId], function (err, res) {\n for (var i = 0; i < res.length; i++) {\n\n if (userPurchase.inputNumber > res[i].stock_quantity) {\n\n console.log(\"===================================================\");\n console.log(\"Sorry! Not enough in stock. Please try again later.\");\n console.log(res[i].stock_quantity + \" IN STOCK\");\n console.log(\"===================================================\");\n \n //@todo prompt revise quantity\n startPrompt();\n\n } else {\n console.log(\"===================================\");\n console.log(\"You've selected:\");\n console.log(\"===================================\");\n console.log(\"Item: \" + res[i].product_name);\n console.log(\"Department: \" + res[i].department_name);\n console.log(\"Price: \" + res[i].price);\n console.log(\"Quantity: \" + userPurchase.inputNumber);\n console.log(\"===================================\");\n console.log(\"Total: \" + res[i].price * userPurchase.inputNumber);\n console.log(\"===================================\");\n\n var newQty = (res[i].stock_quantity - userPurchase.inputNumber);\n var purchaseId = (userPurchase.inputId);\n var price = res[i].price;\n var productSales = res[i].product_sales;\n console.log(newQty);\n confirmPrompt(userPurchase.inputNumber, price, newQty, productSales, purchaseId);\n }\n }\n });\n });\n}", "function promptUser(){\n inquirer\n .prompt([\n {\n type: 'input',\n name: 'item_id',\n message: 'What is the id of the product you would like to buy',\n\n },\n //The second message should ask how many units of the product they would like to buy.\n\n {\n type: 'input',\n name: 'quantity',\n message: 'How many units would you like to buy?'\n }\n ]).then(function(answer){\n console.log('You have selected: ' + answer.item_id);\n console.log('the amount you have selected: ' + answer.quantity);\n\n var item = answer.item_id;\n var quantity = answer.quantity;\n \n\n var queryStr = 'SELECT * FROM products WHERE ?';\n connection.query(queryStr, {item_id: item}, function(err,data){\n // let table = new Tablefy('table');\n // table.draw(data);\n if(err) throw err;\n if(data.length === 0){\n console.log('Sorry! please select a valid id');\n } else {productData = data[0];\n if(quantity <= productData.stock_quantity){\n console.log('Order has been placed for '+ quantity);\n var updateQuery = 'UPDATE products SET stock_quantity ' +(productData.stock_quantity - quantity) + ' WHERE item_id: ' + item;\n\n } else {\n console.log(\"Sorry we do not have that much in stock\");\n } \n }\n })\n\n\n })\n}", "function promptCustomer(availableItems) {\n inquirer.prompt([\n {\n type: \"list\",\n message: \"What product would you like to buy?\",\n choices: availableItems,\n name: \"customerSelection\"\n },\n {\n type: \"input\",\n message: \"How many would you like to buy?\",\n name: \"purchaseQuantity\",\n validate: (value) => {\n// This makes it so you cannot type a word in for quantity\n return !isNaN(value);\n }\n }\n ]).then(customerSelection => {\n checkAvailability(customerSelection);\n });\n}", "function start() {\n inquirer.prompt([\n {\n type: \"input\",\n name: \"itemID\",\n message: \"What is the ID of the item you would like to purchase? [Quit with Q]\",\n validate: function(inputID) {\n //if users enter q or Q, exit the program.\n if (inputID.toLowerCase() === \"q\") {\n connection.end();\n process.exit();\n }\n //users need to enter a number between 1 to 10 because there are 10 items in the table.\n else if ((!isNaN(inputID)) && (inputID<=10) && (inputID>0)) {\n return true;\n }\n console.log(\"Please enter a valid ID.\");\n return false;\n }\n },\n {\n type: \"input\",\n name: \"quantity\",\n message: \"How many would you like? [Quit with Q]\",\n validate: function(inputQ) {\n //if users enter q or Q, exit the program.\n if (inputQ.toLowerCase() === \"q\") {\n connection.end();\n process.exit();\n }\n //users need to enter a number\n else if (!isNaN(inputQ)) {\n return true;\n }\n console.log(\"Please enter a valid quantity.\");\n return false;\n }\n }\n ]).then(function (answer) {\n\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n //query through out the table to find the matched ID as the selected item.\n var chosenItem =\"\";\n for (var i = 0; i < res.length; i++) {\n if (res[i].item_id === parseInt(answer.itemID)) {\n chosenItem = res[i];\n }\n }\n \n //check if the inventory has enough of the product to meet the customer's request.\n //if it has enough of the product, update the SQL database to reflect the remaining quantity\n if (chosenItem.stock_quantity >= parseInt(answer.quantity)) {\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: chosenItem.stock_quantity-= parseInt(answer.quantity)\n },\n {\n item_id: chosenItem.item_id\n }\n ],\n function(error) {\n if (error) throw err;\n //Once the update goes through, show the customer the total cost of their purchase.\n var totalCost = answer.quantity * chosenItem.price;\n console.log(\"Thank you. Successfully purchased \"+ answer.quantity + \" \" + chosenItem.product_name + \".\");\n console.log(\"Your total cost is $\"+ totalCost + \".\");\n display();\n }\n );\n }\n else {\n //show error message when inventory is not sufficient to prevent the order from going through.\n console.log(\"Sorry. Insufficient quantity! Please select another item or change your quantity.\");\n start();\n }\n });\n });\n\n}", "function promptUser() {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"itemId\",\n message:\n \"Please Type in the Item ID of the product you would like to buy! \",\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n },\n },\n\n {\n type: \"input\",\n name: \"itemQuantity\",\n message: \"How Many Would You like today??\",\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n },\n },\n ])\n .then(function (answer) {\n // We Want to store those answers in variables\n var itemIdSelected = answer.itemId;\n var itemQuantityEntered = answer.itemQuantity;\n\n // Checking up if the id selected exists in the inventory\n connection.query(\n \"SELECT * FROM products WHERE ?\",\n { item_id: itemIdSelected },\n function (err, data) {\n if (err) throw err;\n\n // If the id the user selected doesnt exist\n if (data.length === 0) {\n console.log(\"Error: Invalid Item ID, Please Select A valid one!\");\n\n setTimeout(displayInventory, 2000);\n\n // We do checking the quantity wanted and comparing it ....etc\n } else {\n // Store the product data in a variable\n var productSelectedData = data[0];\n\n // compare it to the quantity available if it's lower or equal we do the updates\n if (itemQuantityEntered <= productSelectedData.stock_quantity) {\n console.log(\n \"\\nCongratulations, the product quantity you requested is in stock! Placing order.....\"\n );\n // Updating our bamazon database\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity:\n productSelectedData.stock_quantity - itemQuantityEntered,\n },\n {\n item_id: itemIdSelected,\n },\n ],\n function (err, data) {\n if (err) throw err;\n\n // logging information for the user\n console.log(\n \"Your order has been placed! Your total is $\" +\n (productSelectedData.price * itemQuantityEntered).toFixed(\n 2\n )\n );\n console.log(\n \"Order Details: \" +\n itemQuantityEntered +\n \" \" +\n productSelectedData.product_name\n );\n console.log(\"Thank you for shopping with us!\");\n console.log(\n \"\\n---------------------------------------------------------------------\\n\"\n );\n\n // end connection\n connection.end();\n }\n );\n\n // IF Qantity enetered is more than inventory quantity log and prompt user again\n } else {\n console.log(\"\\nSorry, not enough quantity in our inventory.\");\n console.log(\"Please modify your order.\");\n console.log(\n \"\\n---------------------------------------------------------------------\\n\"\n );\n\n setTimeout(promptUser, 2000);\n }\n }\n }\n );\n });\n}", "function selectQuantity() {\n inquirer.prompt({\n name: \"quantity\",\n type: \"input\",\n message: \"How many would you like to purchase\"\n })\n .then(function (answer) {\n\n //Set customer total\n customerTotal = (answer.quantity * selectedItem.price);\n //Set new quantity\n var newQuantity = (selectedItem.stock_quantity - answer.quantity)\n\n //If the customer requests more of the item than we have left, alert them of how much of the product is remaining\n if (selectedItem.stock_quantity < answer.quantity) {\n console.log(\"Sorry, we only have \" + selectedItem.stock_quantity + \" left of that product\")\n selectQuantity();\n\n //If customer chooses none, fire purchase more function\n } else if (parseInt(answer.quantity) === 0) {\n console.log(\"No worries. It's okay to change your mind\")\n purchaseMore();\n\n } else {\n //Confirm the customer would like to make the purchase\n inquirer.prompt({\n name: \"verify\",\n type: \"confirm\",\n message: \"Your total comes to $\" + (customerTotal) + \". Would you like to make this purchase?\"\n })\n\n //If they answer yes, thank them and call the purchaseMore function\n .then(function (answer) {\n if (answer.verify === true) {\n\n //Otherwise, update the database by subtracting the customers request from the stock_quantity\n connection.query(\"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: newQuantity\n },\n {\n item_id: selectedItem.item_id\n }\n ])\n console.log(\"Thank you for shopping!\")\n purchaseMore();\n //Otherwise, redirect them to the selectQuantity function\n } else {\n console.log(\"Okay, let's try this again\")\n selectQuantity();\n }\n })\n }\n })\n}", "function start() {\n inquirer\n .prompt([\n {\n name: \"itemID\",\n type: \"input\",\n message: \"Please enter the ID of the bean you'd like to purchase.\",\n //make sure entry is a positive integer in the range of possible ids\n validate: function(value) {\n if (isNaN(value) === false && value > 0 && value < resLength) {\n return true;\n }\n return false;\n \n }\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"Please enter the quanity you'd like to purchase.\",\n //make sure entry is a positive integer\n validate: function(value) {\n if (isNaN(value) === false && value >= 1) {\n return true;\n }\n return false;\n \n }\n }\n ])\n .then(function(answer) {\n //clear selectionArray\n selectionArray = [];\n //populate selectionArray with relevant data from the user's choice. these values are used in subsequent code.\n for (i=0; i < iDarray.length; i++) {\n if (parseInt(iDarray[i]) === parseInt(answer.itemID)) {\n selectionArray.push(parseInt(iDarray[i]));\n selectionArray.push(productChoices[i]);\n selectionArray.push(parseInt(stockCounter[i]));\n //used parseFloat since the price needs to have 2 decimal values\n selectionArray.push(parseFloat(priceList[i]));\n }\n }\n //ensure there is enough stock on hand to fulfill the order. if there isn't, notify user.\n if (parseInt(answer.quantity) > parseInt(selectionArray[2])) {\n console.log(\"Sorry, we don't have enough \" + selectionArray[1].toLowerCase() + \" in stock to fulfill your order\");\n //call function that allows user to choose to continue or exit the application.\n endgame();\n }\n \n else{\n //if stock is sufficient, update the relevant stock_quantity from the mysql table.\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: parseInt(selectionArray[2]) - parseInt(answer.quantity)\n },\n {\n item_id: parseInt(answer.itemID)\n }\n ],\n function(err) {\n if (err) throw err;\n //set variable to hold the total cost of the order\n var cost = selectionArray[3] * parseInt(answer.quantity);\n //update the stock in the selectionArray. this prevents the user from being allowed to order more than is actually on hand.\n selectionArray[2] = parseInt(selectionArray[2]) - parseInt(answer.quantity);\n //inform user of the success of the order and give them a summary of the relevant order details.\n console.log(\"You have purchased \" + answer.quantity + \" kg of \" + selectionArray[1].toLowerCase() + \n \" & your account has been charged $\" + cost.toFixed(2) + \n \". Thanks for shopping with beanazon!!\");\n //call function that allows user to choose to continue or exit the application.\n endgame();\n }\n );\n }\n } \n \n )}", "function purchase() {\n inquirer.prompt([{\n name: 'id',\n type: 'input',\n message: \"What is the ID of the item you would like to purchase? [Quit with Q]\"\n }, {\n name: 'quantity',\n type: 'input',\n message: \"How many would you like? [Quit with Q]\"\n }])\n //product chosen\n .then(function (answer) {\n console.log(answer);\n\n connection.query(\"SELECT * FROM products WHERE item_id = ? \",\n [answer.id],\n function (err, res) {\n if (err) throw err;\n console.log(res);\n var chosenItem = res[0]; \n\n //update product quantity\n if (chosenItem.stock_quantity < parseInt(answer.number)) {\n connection.query(\"UPDATE products SET ? WHERE ?\", [{\n stock_quantity: number\n },\n {\n item_id: chosenItem\n }\n ],\n function (error) {\n if (error) throw err;\n console.log(\"Purchased!\");\n }\n );\n } else {\n console.log(\"Sorry, item not available. Select another item.\");\n }\n });\n }, )\n}", "function purchase() {\n\n inquirer\n .prompt([\n {\n name: \"itemID\",\n type: \"input\",\n message: \"\\nGreat! What is the Item # of the product you would like to purchase?\\n\"\n },\n {\n name: \"units\",\n type: \"number\",\n message: \"\\nHow many units of the item would you like to purchase?\\n\"\n },\n\n ])\n .then(function (selection) {\n // get the information of the chosen item\n\n // query the database for all items available to purchase\n connection.query(\"SELECT * FROM products WHERE id=?\", selection.itemID, function (err, res) {\n\n for (var i = 0; i < res.length; i++) {\n\n if (selection.units > res[i].stockQuantity) {\n\n console.log(chalk.green.bold(\"===================================================\"));\n console.log(chalk.green.bold(\"Sorry! Not enough of that item in stock.\"));\n console.log(chalk.green.bold(\"===================================================\"));\n newOrder();\n\n } else {\n //list item information for user for confirm prompt\n console.log(chalk.green.bold(\"===================================================\"));\n console.log(chalk.green.bold(\"Awesome! We can fulfull your order.\"));\n console.log(chalk.green.bold(\"===================================================\"));\n console.log(chalk.green.bold(\"You've selected:\"));\n console.log(chalk.green.bold(\"----------------\"));\n console.log(chalk.green.bold(\"Item: \" + res[i].productName));\n console.log(chalk.green.bold(\"Department: \" + res[i].departmentName));\n console.log(chalk.green.bold(\"Price: $\" + res[i].price));\n console.log(chalk.green.bold(\"Quantity: \" + selection.units));\n console.log(chalk.green.bold(\"----------------\"));\n console.log(chalk.green.bold(\"Total: $\" + res[i].price * selection.units));\n console.log(chalk.green.bold(\"===================================================\\n\"));\n\n var newStock = (res[i].stockQuantity - selection.units);\n var purchaseId = (selection.itemID);\n //console.log(newStock);\n confirmPrompt(newStock, purchaseId);\n }\n }\n });\n })\n}", "function placeOrder() {\n // First, should ask them the ID of the product they would like to buy\n inquirer.prompt([\n {\n type: 'input',\n name: 'productID',\n message: 'Which product ID which you like to buy?'\n },\n // Second, should ask how many units of the product they would like to buy\n {\n type: 'input',\n name: 'quantity',\n message: 'How many units of the product would you like to buy?'\n\n }\n ])\n // response of the user to the above two messages\n .then(({productID, quantity})=> {\n console.log(productID)\n console.log(quantity)\n })\n}", "function startTransaction() {\n inquirer.prompt([\n {\n type: \"input\",\n message: \"What is the id of the product you want to purchase?\",\n name: \"id\",\n validate: function validateId(id) {\n return id !== '';\n }\n },\n {\n type: \"input\",\n message: \"Please enter quantity of product you wish to purchase\",\n name: \"stock_quantity\",\n validate: function validateId(stock_quantity) {\n return stock_quantity !== '';\n }\n }\n\n\n ])\n //This function checks the input from inquirer to see if there is enough quantity on hand\n .then(function (checkQuantity) {\n var query = \"SELECT * FROM products WHERE ?\";\n connection.query(query, { id: checkQuantity.id },\n function (err, res) {\n\n\n\n if (checkQuantity.stock_quantity > res[0].stock_quantity) {\n console.log(\"We have insufficient quantity to place your order\");\n \n }\n else {\n console.log(\"We are placing your order!\");\n //This section calculates the cost of the purchase and lets the customer know\n var cost = checkQuantity.stock_quantity * res[0].price;\n console.log(\"Your cost is $\" + parseFloat(cost).toFixed(2));\n newQty = res[0].stock_quantity - checkQuantity.stock_quantity;\n\n //Once the previous function confirms that there is enough stock on hand\n //this function then takes the order quantity and subtracts it from the \n //quantity on hand to get the new quanity on hand and updates\n //sql with the new stock quantity\n var query = connection.query(\n \"UPDATE products SET stock_quantity = (stock_quantity - ?) WHERE id=?\",\n [checkQuantity.stock_quantity, checkQuantity.id],\n\n function (error) {\n if (error) throw err;\n \n\n }\n );\n }\n contShopping();\n\n }\n\n\n )\n\n\n });\n\n\n}", "function userPurchase () {\ninquirer\n .prompt ([\n {\n type: 'input',\n name: 'item_id',\n message: 'Please enter the ID of the item you would like to purchase.',\n filter: Number,\n validate: correctInput\n },\n {\n type: 'input',\n name: 'quantity',\n message: 'How many would you like to purchase?',\n validate: correctInput,\n filter: Number,\n }\n ]).then(function(input){\n var item = input.item_id;\n var quantity = input.stock_quantity;\n\n var queryID = 'SELECT * FROM products WHERE ?';\n\n connection.query(queryID, {item_id: item}, function (err, data) {\n if (err) throw err;\n\n if (data.length === 0) {\n console.log('Sorry, invalid item ID. Please select a valid ID.');\n displayInventory();\n } else {\n var productData = data [0];\n\n if (quantity <= productData.quantity) {\n console.log ('The product you requested is in stock! Placing your order now.');\n\n var updateQueryID = 'UPDATE products SET stock_quantity = ' + (productData.stock_quantity - quantity) + 'WHERE item_id =' + item;\n \n connection.query(updateQueryID, function(err, data) {\n if (err) throw err;\n\n console.log ('\\nYour order has been placed! Your total is $' + productData.price * quantity);\n console.log ('\\nThank you for shopping with us!');\n console.log ('\\n ----------------------------\\n');\n\n connection.end();\n })\n } else {\n console.log ('\\nInsufficient! There is not enough product in stock, therefore, your order cannot be placed.');\n console.log ('\\nPlease modify your order and replace your products again.');\n console.log('\\n----------------------------------------------\\n');\n\n displayInventory();\n }\n }\n })\n })\n}", "function userWants() {\n inquirer\n .prompt([\n {\n name: \"chooseId\",\n type: \"input\",\n message: \"What is the ID of the product you would like to buy?\",\n },\n {\n name: \"chooseQuant\",\n type: \"input\",\n message: \"How many of the selected item do you like to buy?\"\n }\n\n ])\n .then(function (answer) {\n\n var itemWanted = answer.chooseId; // Storing the name of the selected item\n var numberWanted = answer.chooseQuant; // Storing the quantity of the selected item\n if (itemWanted < 1 || itemWanted > 10){\n console.log(\"Invalid ID. Please try again\");\n userWants();\n } else {\n\n //checking to see if the selected item has enough stock. \n var query = connection.query(\"SELECT * FROM products WHERE item_id=?\", [itemWanted], function (err, res) {\n //When we DON'T have enough in stock\n if (res[0].stock_quantity < parseInt(numberWanted)) {\n console.log(\"=====================================================================\");\n console.log(\"Insufficient quantity! Please try again\");\n userWants();\n } else {\n //When we DO have enough in stock\n console.log(\"=====================================================================\");\n console.log(\"Thank you very much for your purchase. Your order has been placed.\");\n connection.query(\"UPDATE products SET ? WHERE ?\", [\n {\n stock_quantity: res[0].stock_quantity - parseInt(numberWanted)\n },\n {\n item_id: itemWanted\n }\n\n ], function (err, result) {\n console.log(\"The total price for your item is $\" + res[0].price * parseInt(numberWanted) + \". \\nThank you for using Bamazon\");\n console.log(\"=====================================================================\");\n console.log(\"If you want to make your next purchase, simply press upper arrow key :)\");\n\n connection.end();\n\n })\n }\n \n });\n };\n });\n\n \n\n}", "function qty() {\n inquirer\n .prompt({\n name: \"action\",\n type: \"input\",\n message: \"How many would you like?\",\n\n })\n .then(function(answer) {\n quantityToBuy = answer.action;\n checkqty();\n })\n}", "function purchasePrompt() {\n console.log(\"yes\");\n inquirer.prompt([{\n type: \"confirm\",\n name: \"purchase\",\n message: \"Would you like to purchase an item?\",\n default: true\n\n }]).then(function (user) {\n if (user.purchase === true) {\n selectionPrompt();\n } else {\n startPrompt();\n }\n });\n}", "function purchaseStart() {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"ID\",\n message: \"What is the id number of your product?\",\n validate: validateInput,\n filter: Number\n },\n {\n type: \"input\",\n name: \"stockQuantity\",\n message: \"How many units would you like to purchase today?\",\n validate: validateInput,\n filter: Number\n }\n ])\n .then(function(answer) {\n //take answers and pass through as variable parameters\n\n var requestedQuantity = answer.stockQuantity;\n var idRequested = answer.ID;\n // use the mysql command to select product from table created in bamazon_db\n query = \"SELECT * FROM products WHERE ?\";\n connection.query(query, { id: idRequested }, function(err, res) {\n if (res.length === 0) {\n console.log(\"error!\");\n throw err;\n\n // displayProduct();\n } else {\n var selection = res[0];\n\n if (requestedQuantity <= selection.stock_quantity) {\n console.log(\" Your order is now being processed!!!\");\n\n var stockUpdate =\n \"UPDATE products SET stock_quantity = \" +\n (selection.stock_quantity - requestedQuantity) +\n \" WHERE id = \" +\n idRequested;\n\n connection.query(stockUpdate, function(err, res) {\n if (err) throw err;\n\n console.log(\n \"Your order is completed cool beans!! Pay me now!!!\" +\n selection.price * requestedQuantity\n );\n console.log(requestedQuantity);\n // the inquirer list below has a case function that allows the user to decide if they want to continue shopping or not\n // the breaks are used to cut the connection of each option\n inquirer\n .prompt({\n name: \"choose\",\n type: \"list\",\n message: \"would you like to purchase more today?\",\n choices: [\"Yes I would!\", \"No, thanks\"]\n })\n .then(function(answer) {\n switch (answer.choose) {\n case \"Yes I would!\":\n displayProduct();\n break;\n\n case \"No, thanks\":\n connection.end();\n break;\n }\n });\n });\n } else {\n // returns back to the original table and prompts user to try again next time\n displayProduct();\n // change to error message\n console.log(\"Sorry but we cannot process that quantity amount\");\n console.log(\"We will have more in stock soon! \");\n }\n }\n });\n });\n}", "function productIDPrompt() {\n inquirer.prompt({\n name: \"ask\",\n message: \"Please input the ID of the product you would like to buy.\"\n }).then(function(answer) {\n productID = answer.ask;\n var query = \"SELECT item_id, product_name, price, stock_quantity FROM products WHERE ?\";\n connection.query(query, { item_id: answer.ask}, function(err, res) {\n if (err) throw err;\n selProductPrice = res[0].price;\n selProductStock = res[0].stock_quantity;\n \n console.log(`Here is the requested item information: \n________________________________________\n\nItem ID: ${res[0].item_id}\nItem Name: ${(res[0].product_name)}\nPrice: $${res[0].price}\nStock: ${res[0].stock_quantity}\n________________________________________\n`);\n quantityPrompt(selProductStock);\n })\n })\n}", "function updateQuantity() {\n //variable for locally storing information from the first prompt for the second one\n var userItem = {\n id: 0,\n quantity: 0\n };\n inquirer.prompt([\n {\n type: \"input\",\n message: \"Please enter the [id] for the item you would like to update: \",\n name: \"id\",\n validate: function (value) {\n //validates that the id they entered matches an id in the cart\n var isValid = false;\n for (var index in cart) {\n if (cart[index].id == parseInt(value)) {\n isValid = true;\n //if the id's match, stores the information locally for validating quantity.\n userItem.id = cart[index].id;\n userItem.quantity = parseInt(cart[index].quantity);\n }\n }\n return (isValid) ? isValid : \"Please enter a valid [ID]\";\n }\n },\n {\n type: \"input\",\n message: \"Please enter the updated quantity: \",\n name: \"quantity\",\n validate: function (value) {\n var isValid = false;\n //validates that the quantity is a number greater than 0\n if (isNaN(value) == false && value > 0) {\n\n for (var index in cart) {\n //find the id the user selected in the cart array\n if (userItem.id == cart[index].id) {\n for (var i in stock) {\n //find the id the user selected in the stock array\n if (userItem.id == stock[i].ItemID) {\n //check to see if the amount in stock and currently in the cart is greater than the quantity entered by the user\n if (stock[i].StockQuantity + cart[index].quantity >= value) {\n isValid = true;\n } else {\n isValid = \"We do not have that many in stock.\"\n }\n }\n }\n }\n }\n return (isValid);\n } else {\n return \"Please enter a valid number\";\n }\n }\n }\n ]).then(function (choice) {\n\n //put the quantity already in the cart back in stock\n for (var index in stock) {\n if (stock[index].ItemID == userItem.id) {\n stock[index].StockQuantity += parseInt(userItem.quantity);\n }\n }\n //subtract the new quantity from stock after the old quantity has been restocked\n for (var i in cart) {\n if (cart[i].id == userItem.id) {\n cart[i].quantity = parseInt(choice.quantity);\n for (var j in stock) {\n if (cart[i].id == stock[j].ItemID) {\n stock[j].StockQuantity -= parseInt(choice.quantity);\n }\n }\n }\n }\n //dispay items in stock, shopping cart, and promt the user\n displayStock();\n shoppingCart();\n promptOptions();\n });\n}", "function purchasePrompt() {\n\n inquirer.prompt([{\n\n type: \"confirm\",\n name: \"continue\",\n message: \"Would you like to purchase an item?\",\n default: true\n\n }]).then(function (user) {\n if (user.continue === true) {\n purchase();\n } else {\n console.log(chalk.green.bold(\"Thank you! Come back soon! Just enter: node bamazonCustomer.js\"));\n connection.end();\n }\n });\n}", "function itemQty(item, name, stock){\n \n inquirer.prompt({\n type: \"list\",\n name: \"purchase\",\n message: \"would you like to purchse this item?\",\n choices: [\n \"yes\",\n \"no\"\n ]\n }) \n .then(function(answer){\n switch (answer.purchase) {\n case \"yes\":\n getQty(item);\n break;\n \n case \"no\":\n console.log(\"please make another selection\");\n greetings();\n break;\n \n }\n });\n\n function getQty(item, stock, name) {\n \n inquirer.prompt({\n name: \"qty\",\n type: \"input\",\n message: \"please enter the quantity you would like\",\n })\n .then(function(value){ \n\n var qty = $parseInt(value.qty, 10); \n \n // if (qty > stock) {\n // console.log(\"qty: \" + qty + \", stock: \" + stock);\n // console.log(\"sorry, we have insufficient supply of \" + name);\n // } else {\n // function updateStock(item, stock, name) {\n // var query = connection.query(\n // \"UPDATE products SET ? WHERE ?\",\n // [\n // {\n // stock_qty: stock_qty - qty\n // },\n // {\n // item_ID: item\n // }\n // ],\n // function(err, res) {\n \n // console.log(res.affectedRows + \" stock has been update!\\n\");\n \n \n // }\n // );\n // }\n // }; \n purchaseItems(item, qty); \n });\n\n function purchaseItems(item, qty){ \n \n connection.query(\"SELECT item_name, price, stock_qty FROM products WHERE ?\", \n {\n item_ID: item\n }, \n function(err, res) {\n if (err) throw err;\n \n console.log(qty + \" \" + res[0].item_name + \"s will be mailed to the address we have on file.\\n\");\n console.log(\"$\" + ((qty * res[0].price).toFixed(2)) + \" will be billed to your account. \\n\");\n delay(750).then(() => {\n console.log(\"thank you for shopping with Bamazon!\");\n });\n \n\nconnection.end();\n});\n\n\n\n}\n}\n}", "function whatToBuy(){\n console.log(\" ~crunchy store~\")\nlet customerChoice = inquirer.prompt([\n\n {\n type: \"input\",\n name: \"item\",\n message:\"What would you like to buy?\"\n },\n {\n type: \"input\",\n name: \"qty\",\n message: \"How many would you like to buy?\"\n }\n ]).then(function(x) {\n let id = x.item;\n let qty = x.qty;\n\n console.log(\"Item: \" + products[x.item].item_name);\n console.log(\"QTY: \" + x.qty);\n console.log(\"Total Price: $\" + (products[x.item].sales_price * x.qty))\n\n // CHECK INVENTORY\n\n getInventory(id,qty,function(item,qty){\n \n // IF STATEMENT\n let newQty = item.inventory_qty - qty;\n\n console.log(\"Checking inventory..... \" + item.item_name);\n console.log(\"\");\n if(newQty > 0) {\n console.log(\"Purchase Complete!\")\n updateProducts(id,\"inventory_qty\",newQty);\n }\n else{\n console.log(\"Insufficient Qty for Order...\")\n }\n console.log(\"...\");\n console.log(\"\");\n console.log(\"\");\n console.log(\"\");\n\n runProgram();\n });\n\n });\n}" ]
[ "0.80536026", "0.8019164", "0.8015831", "0.7915313", "0.7897343", "0.7864858", "0.7813461", "0.7811712", "0.77833486", "0.7760087", "0.77232844", "0.77152956", "0.7707057", "0.7700719", "0.7656809", "0.76543355", "0.7651184", "0.7633634", "0.76255906", "0.7605903", "0.758634", "0.7552198", "0.7540215", "0.75074416", "0.749119", "0.7476586", "0.7457182", "0.744725", "0.74289936", "0.74245363", "0.74203134", "0.7415149", "0.7413866", "0.73916", "0.73903626", "0.7380966", "0.7377179", "0.737247", "0.737235", "0.73664737", "0.73513883", "0.73329246", "0.7332832", "0.7322839", "0.73044264", "0.7289735", "0.7288447", "0.7285602", "0.7275754", "0.72701424", "0.72571033", "0.72535187", "0.7251528", "0.7239511", "0.7234773", "0.7232033", "0.71886283", "0.71757466", "0.7175336", "0.7162954", "0.71525425", "0.7152116", "0.713564", "0.7132066", "0.7121018", "0.71206987", "0.7107146", "0.7104264", "0.7093874", "0.7093441", "0.7091296", "0.70893085", "0.7089109", "0.70864695", "0.7084808", "0.70789224", "0.70708996", "0.7068993", "0.7061374", "0.7059759", "0.7049292", "0.70483536", "0.7046549", "0.70463157", "0.7032551", "0.70295227", "0.7025416", "0.7013731", "0.70081526", "0.6987948", "0.698662", "0.6981911", "0.69816566", "0.69742423", "0.6971353", "0.6958533", "0.69539607", "0.69524705", "0.6940711", "0.6939311" ]
0.7197916
56